<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class SearchOrdersDateTimeFilter implements \JsonSerializable { private $createdAt; private $updatedAt; private $closedAt; public function getCreatedAt(): ?TimeRange { return $this->createdAt; } public function setCreatedAt(?TimeRange $createdAt): void { $this->createdAt = $createdAt; } public function getUpdatedAt(): ?TimeRange { return $this->updatedAt; } public function setUpdatedAt(?TimeRange $updatedAt): void { $this->updatedAt = $updatedAt; } public function getClosedAt(): ?TimeRange { return $this->closedAt; } public function setClosedAt(?TimeRange $closedAt): void { $this->closedAt = $closedAt; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } if (isset($this->closedAt)) { $json['closed_at'] = $this->closedAt; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 