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