<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class BatchRetrieveInventoryCountsRequest implements \JsonSerializable { private $catalogObjectIds; private $locationIds; private $updatedAfter; private $cursor; private $states; private $limit; public function getCatalogObjectIds(): ?array { return $this->catalogObjectIds; } public function setCatalogObjectIds(?array $catalogObjectIds): void { $this->catalogObjectIds = $catalogObjectIds; } public function getLocationIds(): ?array { return $this->locationIds; } public function setLocationIds(?array $locationIds): void { $this->locationIds = $locationIds; } public function getUpdatedAfter(): ?string { return $this->updatedAfter; } public function setUpdatedAfter(?string $updatedAfter): void { $this->updatedAfter = $updatedAfter; } public function getCursor(): ?string { return $this->cursor; } public function setCursor(?string $cursor): void { $this->cursor = $cursor; } public function getStates(): ?array { return $this->states; } public function setStates(?array $states): void { $this->states = $states; } public function getLimit(): ?int { return $this->limit; } public function setLimit(?int $limit): void { $this->limit = $limit; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->catalogObjectIds)) { $json['catalog_object_ids'] = $this->catalogObjectIds; } if (isset($this->locationIds)) { $json['location_ids'] = $this->locationIds; } if (isset($this->updatedAfter)) { $json['updated_after'] = $this->updatedAfter; } if (isset($this->cursor)) { $json['cursor'] = $this->cursor; } if (isset($this->states)) { $json['states'] = $this->states; } if (isset($this->limit)) { $json['limit'] = $this->limit; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 