<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class ListBookingsRequest implements \JsonSerializable { private $limit; private $cursor; private $teamMemberId; private $locationId; private $startAtMin; private $startAtMax; public function getLimit(): ?int { return $this->limit; } public function setLimit(?int $limit): void { $this->limit = $limit; } public function getCursor(): ?string { return $this->cursor; } public function setCursor(?string $cursor): void { $this->cursor = $cursor; } public function getTeamMemberId(): ?string { return $this->teamMemberId; } public function setTeamMemberId(?string $teamMemberId): void { $this->teamMemberId = $teamMemberId; } public function getLocationId(): ?string { return $this->locationId; } public function setLocationId(?string $locationId): void { $this->locationId = $locationId; } public function getStartAtMin(): ?string { return $this->startAtMin; } public function setStartAtMin(?string $startAtMin): void { $this->startAtMin = $startAtMin; } public function getStartAtMax(): ?string { return $this->startAtMax; } public function setStartAtMax(?string $startAtMax): void { $this->startAtMax = $startAtMax; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->limit)) { $json['limit'] = $this->limit; } if (isset($this->cursor)) { $json['cursor'] = $this->cursor; } if (isset($this->teamMemberId)) { $json['team_member_id'] = $this->teamMemberId; } if (isset($this->locationId)) { $json['location_id'] = $this->locationId; } if (isset($this->startAtMin)) { $json['start_at_min'] = $this->startAtMin; } if (isset($this->startAtMax)) { $json['start_at_max'] = $this->startAtMax; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 