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