<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class LoyaltyEventOrderFilter implements \JsonSerializable { private $orderId; public function __construct(string $orderId) { $this->orderId = $orderId; } public function getOrderId(): string { return $this->orderId; } public function setOrderId(string $orderId): void { $this->orderId = $orderId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['order_id'] = $this->orderId; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 