<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class RetrieveCatalogObjectRequest implements \JsonSerializable { private $includeRelatedObjects; private $catalogVersion; public function getIncludeRelatedObjects(): ?bool { return $this->includeRelatedObjects; } public function setIncludeRelatedObjects(?bool $includeRelatedObjects): void { $this->includeRelatedObjects = $includeRelatedObjects; } 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->includeRelatedObjects)) { $json['include_related_objects'] = $this->includeRelatedObjects; } 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; } } 