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