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