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