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