<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class UpdateItemModifierListsRequest implements \JsonSerializable { private $itemIds; private $modifierListsToEnable; private $modifierListsToDisable; public function __construct(array $itemIds) { $this->itemIds = $itemIds; } public function getItemIds(): array { return $this->itemIds; } public function setItemIds(array $itemIds): void { $this->itemIds = $itemIds; } public function getModifierListsToEnable(): ?array { return $this->modifierListsToEnable; } public function setModifierListsToEnable(?array $modifierListsToEnable): void { $this->modifierListsToEnable = $modifierListsToEnable; } public function getModifierListsToDisable(): ?array { return $this->modifierListsToDisable; } public function setModifierListsToDisable(?array $modifierListsToDisable): void { $this->modifierListsToDisable = $modifierListsToDisable; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['item_ids'] = $this->itemIds; if (isset($this->modifierListsToEnable)) { $json['modifier_lists_to_enable'] = $this->modifierListsToEnable; } if (isset($this->modifierListsToDisable)) { $json['modifier_lists_to_disable'] = $this->modifierListsToDisable; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 