<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class SearchOrdersRequest implements \JsonSerializable { private $locationIds; private $cursor; private $query; private $limit; private $returnEntries; public function getLocationIds(): ?array { return $this->locationIds; } public function setLocationIds(?array $locationIds): void { $this->locationIds = $locationIds; } public function getCursor(): ?string { return $this->cursor; } public function setCursor(?string $cursor): void { $this->cursor = $cursor; } public function getQuery(): ?SearchOrdersQuery { return $this->query; } public function setQuery(?SearchOrdersQuery $query): void { $this->query = $query; } public function getLimit(): ?int { return $this->limit; } public function setLimit(?int $limit): void { $this->limit = $limit; } public function getReturnEntries(): ?bool { return $this->returnEntries; } public function setReturnEntries(?bool $returnEntries): void { $this->returnEntries = $returnEntries; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->locationIds)) { $json['location_ids'] = $this->locationIds; } if (isset($this->cursor)) { $json['cursor'] = $this->cursor; } if (isset($this->query)) { $json['query'] = $this->query; } if (isset($this->limit)) { $json['limit'] = $this->limit; } if (isset($this->returnEntries)) { $json['return_entries'] = $this->returnEntries; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 