<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderFulfillment implements \JsonSerializable { private $uid; private $type; private $state; private $lineItemApplication; private $entries; private $metadata; private $pickupDetails; private $shipmentDetails; public function getUid(): ?string { return $this->uid; } public function setUid(?string $uid): void { $this->uid = $uid; } public function getType(): ?string { return $this->type; } public function setType(?string $type): void { $this->type = $type; } public function getState(): ?string { return $this->state; } public function setState(?string $state): void { $this->state = $state; } public function getLineItemApplication(): ?string { return $this->lineItemApplication; } public function setLineItemApplication(?string $lineItemApplication): void { $this->lineItemApplication = $lineItemApplication; } public function getEntries(): ?array { return $this->entries; } public function setEntries(?array $entries): void { $this->entries = $entries; } public function getMetadata(): ?array { return $this->metadata; } public function setMetadata(?array $metadata): void { $this->metadata = $metadata; } public function getPickupDetails(): ?OrderFulfillmentPickupDetails { return $this->pickupDetails; } public function setPickupDetails(?OrderFulfillmentPickupDetails $pickupDetails): void { $this->pickupDetails = $pickupDetails; } public function getShipmentDetails(): ?OrderFulfillmentShipmentDetails { return $this->shipmentDetails; } public function setShipmentDetails(?OrderFulfillmentShipmentDetails $shipmentDetails): void { $this->shipmentDetails = $shipmentDetails; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->uid)) { $json['uid'] = $this->uid; } if (isset($this->type)) { $json['type'] = $this->type; } if (isset($this->state)) { $json['state'] = $this->state; } if (isset($this->lineItemApplication)) { $json['line_item_application'] = $this->lineItemApplication; } if (isset($this->entries)) { $json['entries'] = $this->entries; } if (isset($this->metadata)) { $json['metadata'] = $this->metadata; } if (isset($this->pickupDetails)) { $json['pickup_details'] = $this->pickupDetails; } if (isset($this->shipmentDetails)) { $json['shipment_details'] = $this->shipmentDetails; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 