<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class V1Settlement implements \JsonSerializable { private $id; private $status; private $totalMoney; private $initiatedAt; private $bankAccountId; private $entries; public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): void { $this->status = $status; } public function getTotalMoney(): ?V1Money { return $this->totalMoney; } public function setTotalMoney(?V1Money $totalMoney): void { $this->totalMoney = $totalMoney; } public function getInitiatedAt(): ?string { return $this->initiatedAt; } public function setInitiatedAt(?string $initiatedAt): void { $this->initiatedAt = $initiatedAt; } public function getBankAccountId(): ?string { return $this->bankAccountId; } public function setBankAccountId(?string $bankAccountId): void { $this->bankAccountId = $bankAccountId; } public function getEntries(): ?array { return $this->entries; } public function setEntries(?array $entries): void { $this->entries = $entries; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->status)) { $json['status'] = $this->status; } if (isset($this->totalMoney)) { $json['total_money'] = $this->totalMoney; } if (isset($this->initiatedAt)) { $json['initiated_at'] = $this->initiatedAt; } if (isset($this->bankAccountId)) { $json['bank_account_id'] = $this->bankAccountId; } if (isset($this->entries)) { $json['entries'] = $this->entries; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 