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