<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class V1OrderHistoryEntry implements \JsonSerializable { private $action; private $createdAt; public function getAction(): ?string { return $this->action; } public function setAction(?string $action): void { $this->action = $action; } public function getCreatedAt(): ?string { return $this->createdAt; } public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->action)) { $json['action'] = $this->action; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 