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