<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class RenewTokenRequest implements \JsonSerializable { private $accessToken; public function getAccessToken(): ?string { return $this->accessToken; } public function setAccessToken(?string $accessToken): void { $this->accessToken = $accessToken; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->accessToken)) { $json['access_token'] = $this->accessToken; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 