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