<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class SearchOrdersFulfillmentFilter implements \JsonSerializable { private $fulfillmentTypes; private $fulfillmentStates; public function getFulfillmentTypes(): ?array { return $this->fulfillmentTypes; } public function setFulfillmentTypes(?array $fulfillmentTypes): void { $this->fulfillmentTypes = $fulfillmentTypes; } public function getFulfillmentStates(): ?array { return $this->fulfillmentStates; } public function setFulfillmentStates(?array $fulfillmentStates): void { $this->fulfillmentStates = $fulfillmentStates; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->fulfillmentTypes)) { $json['fulfillment_types'] = $this->fulfillmentTypes; } if (isset($this->fulfillmentStates)) { $json['fulfillment_states'] = $this->fulfillmentStates; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 