<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderUpdatedObject implements \JsonSerializable { private $orderUpdated; public function getOrderUpdated(): ?OrderUpdated { return $this->orderUpdated; } public function setOrderUpdated(?OrderUpdated $orderUpdated): void { $this->orderUpdated = $orderUpdated; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->orderUpdated)) { $json['order_updated'] = $this->orderUpdated; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 