<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CashDrawerShiftSummary implements \JsonSerializable { private $id; private $state; private $openedAt; private $endedAt; private $closedAt; private $description; private $openedCashMoney; private $expectedCashMoney; private $closedCashMoney; public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getState(): ?string { return $this->state; } public function setState(?string $state): void { $this->state = $state; } public function getOpenedAt(): ?string { return $this->openedAt; } public function setOpenedAt(?string $openedAt): void { $this->openedAt = $openedAt; } public function getEndedAt(): ?string { return $this->endedAt; } public function setEndedAt(?string $endedAt): void { $this->endedAt = $endedAt; } public function getClosedAt(): ?string { return $this->closedAt; } public function setClosedAt(?string $closedAt): void { $this->closedAt = $closedAt; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): void { $this->description = $description; } public function getOpenedCashMoney(): ?Money { return $this->openedCashMoney; } public function setOpenedCashMoney(?Money $openedCashMoney): void { $this->openedCashMoney = $openedCashMoney; } public function getExpectedCashMoney(): ?Money { return $this->expectedCashMoney; } public function setExpectedCashMoney(?Money $expectedCashMoney): void { $this->expectedCashMoney = $expectedCashMoney; } public function getClosedCashMoney(): ?Money { return $this->closedCashMoney; } public function setClosedCashMoney(?Money $closedCashMoney): void { $this->closedCashMoney = $closedCashMoney; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->state)) { $json['state'] = $this->state; } if (isset($this->openedAt)) { $json['opened_at'] = $this->openedAt; } if (isset($this->endedAt)) { $json['ended_at'] = $this->endedAt; } if (isset($this->closedAt)) { $json['closed_at'] = $this->closedAt; } if (isset($this->description)) { $json['description'] = $this->description; } if (isset($this->openedCashMoney)) { $json['opened_cash_money'] = $this->openedCashMoney; } if (isset($this->expectedCashMoney)) { $json['expected_cash_money'] = $this->expectedCashMoney; } if (isset($this->closedCashMoney)) { $json['closed_cash_money'] = $this->closedCashMoney; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 