<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class RetrieveInventoryChangesResponse implements \JsonSerializable { private $errors; private $changes; private $cursor; public function getErrors(): ?array { return $this->errors; } public function setErrors(?array $errors): void { $this->errors = $errors; } public function getChanges(): ?array { return $this->changes; } public function setChanges(?array $changes): void { $this->changes = $changes; } public function getCursor(): ?string { return $this->cursor; } public function setCursor(?string $cursor): void { $this->cursor = $cursor; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->errors)) { $json['errors'] = $this->errors; } if (isset($this->changes)) { $json['changes'] = $this->changes; } if (isset($this->cursor)) { $json['cursor'] = $this->cursor; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 