<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class SearchTerminalRefundsRequest implements \JsonSerializable { private $query; private $cursor; private $limit; public function getQuery(): ?TerminalRefundQuery { return $this->query; } public function setQuery(?TerminalRefundQuery $query): void { $this->query = $query; } public function getCursor(): ?string { return $this->cursor; } public function setCursor(?string $cursor): void { $this->cursor = $cursor; } 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->query)) { $json['query'] = $this->query; } if (isset($this->cursor)) { $json['cursor'] = $this->cursor; } if (isset($this->limit)) { $json['limit'] = $this->limit; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 