<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogInfoResponse implements \JsonSerializable { private $errors; private $limits; private $standardUnitDescriptionGroup; public function getErrors(): ?array { return $this->errors; } public function setErrors(?array $errors): void { $this->errors = $errors; } public function getLimits(): ?CatalogInfoResponseLimits { return $this->limits; } public function setLimits(?CatalogInfoResponseLimits $limits): void { $this->limits = $limits; } public function getStandardUnitDescriptionGroup(): ?StandardUnitDescriptionGroup { return $this->standardUnitDescriptionGroup; } public function setStandardUnitDescriptionGroup(?StandardUnitDescriptionGroup $standardUnitDescriptionGroup): void { $this->standardUnitDescriptionGroup = $standardUnitDescriptionGroup; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->errors)) { $json['errors'] = $this->errors; } if (isset($this->limits)) { $json['limits'] = $this->limits; } if (isset($this->standardUnitDescriptionGroup)) { $json['standard_unit_description_group'] = $this->standardUnitDescriptionGroup; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 