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