<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CreateMobileAuthorizationCodeResponse implements \JsonSerializable { private $authorizationCode; private $expiresAt; private $error; public function getAuthorizationCode(): ?string { return $this->authorizationCode; } public function setAuthorizationCode(?string $authorizationCode): void { $this->authorizationCode = $authorizationCode; } public function getExpiresAt(): ?string { return $this->expiresAt; } public function setExpiresAt(?string $expiresAt): void { $this->expiresAt = $expiresAt; } public function getError(): ?Error { return $this->error; } public function setError(?Error $error): void { $this->error = $error; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->authorizationCode)) { $json['authorization_code'] = $this->authorizationCode; } if (isset($this->expiresAt)) { $json['expires_at'] = $this->expiresAt; } if (isset($this->error)) { $json['error'] = $this->error; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 