<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderFulfillmentUpdatedUpdate implements \JsonSerializable { private $fulfillmentUid; private $oldState; private $newState; public function getFulfillmentUid(): ?string { return $this->fulfillmentUid; } public function setFulfillmentUid(?string $fulfillmentUid): void { $this->fulfillmentUid = $fulfillmentUid; } public function getOldState(): ?string { return $this->oldState; } public function setOldState(?string $oldState): void { $this->oldState = $oldState; } public function getNewState(): ?string { return $this->newState; } public function setNewState(?string $newState): void { $this->newState = $newState; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->fulfillmentUid)) { $json['fulfillment_uid'] = $this->fulfillmentUid; } if (isset($this->oldState)) { $json['old_state'] = $this->oldState; } if (isset($this->newState)) { $json['new_state'] = $this->newState; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 