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