<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class ListCatalogRequest implements \JsonSerializable { private $cursor; private $types; private $catalogVersion; public function getCursor(): ?string { return $this->cursor; } public function setCursor(?string $cursor): void { $this->cursor = $cursor; } public function getTypes(): ?string { return $this->types; } public function setTypes(?string $types): void { $this->types = $types; } public function getCatalogVersion(): ?int { return $this->catalogVersion; } public function setCatalogVersion(?int $catalogVersion): void { $this->catalogVersion = $catalogVersion; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->cursor)) { $json['cursor'] = $this->cursor; } if (isset($this->types)) { $json['types'] = $this->types; } if (isset($this->catalogVersion)) { $json['catalog_version'] = $this->catalogVersion; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 