<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class ListDisputesRequest implements \JsonSerializable { private $cursor; private $states; private $locationId; 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 getLocationId(): ?string { return $this->locationId; } public function setLocationId(?string $locationId): void { $this->locationId = $locationId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->cursor)) { $json['cursor'] = $this->cursor; } if (isset($this->states)) { $json['states'] = $this->states; } if (isset($this->locationId)) { $json['location_id'] = $this->locationId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 