<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class ACHDetails implements \JsonSerializable { private $routingNumber; private $accountNumberSuffix; private $accountType; public function getRoutingNumber(): ?string { return $this->routingNumber; } public function setRoutingNumber(?string $routingNumber): void { $this->routingNumber = $routingNumber; } public function getAccountNumberSuffix(): ?string { return $this->accountNumberSuffix; } public function setAccountNumberSuffix(?string $accountNumberSuffix): void { $this->accountNumberSuffix = $accountNumberSuffix; } public function getAccountType(): ?string { return $this->accountType; } public function setAccountType(?string $accountType): void { $this->accountType = $accountType; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->routingNumber)) { $json['routing_number'] = $this->routingNumber; } if (isset($this->accountNumberSuffix)) { $json['account_number_suffix'] = $this->accountNumberSuffix; } if (isset($this->accountType)) { $json['account_type'] = $this->accountType; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 