<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogItemOptionValue implements \JsonSerializable { private $itemOptionId; private $name; private $description; private $color; private $ordinal; public function getItemOptionId(): ?string { return $this->itemOptionId; } public function setItemOptionId(?string $itemOptionId): void { $this->itemOptionId = $itemOptionId; } public function getName(): ?string { return $this->name; } public function setName(?string $name): void { $this->name = $name; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): void { $this->description = $description; } public function getColor(): ?string { return $this->color; } public function setColor(?string $color): void { $this->color = $color; } public function getOrdinal(): ?int { return $this->ordinal; } public function setOrdinal(?int $ordinal): void { $this->ordinal = $ordinal; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->itemOptionId)) { $json['item_option_id'] = $this->itemOptionId; } if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->description)) { $json['description'] = $this->description; } if (isset($this->color)) { $json['color'] = $this->color; } if (isset($this->ordinal)) { $json['ordinal'] = $this->ordinal; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 