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