<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class UpdateItemTaxesRequest implements \JsonSerializable { private $itemIds; private $taxesToEnable; private $taxesToDisable; 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 getTaxesToEnable(): ?array { return $this->taxesToEnable; } public function setTaxesToEnable(?array $taxesToEnable): void { $this->taxesToEnable = $taxesToEnable; } public function getTaxesToDisable(): ?array { return $this->taxesToDisable; } public function setTaxesToDisable(?array $taxesToDisable): void { $this->taxesToDisable = $taxesToDisable; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['item_ids'] = $this->itemIds; if (isset($this->taxesToEnable)) { $json['taxes_to_enable'] = $this->taxesToEnable; } if (isset($this->taxesToDisable)) { $json['taxes_to_disable'] = $this->taxesToDisable; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 