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