<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderFulfillmentFulfillmentEntry implements \JsonSerializable { private $uid; private $lineItemUid; private $quantity; private $metadata; public function __construct(string $lineItemUid, string $quantity) { $this->lineItemUid = $lineItemUid; $this->quantity = $quantity; } public function getUid(): ?string { return $this->uid; } public function setUid(?string $uid): void { $this->uid = $uid; } public function getLineItemUid(): string { return $this->lineItemUid; } public function setLineItemUid(string $lineItemUid): void { $this->lineItemUid = $lineItemUid; } public function getQuantity(): string { return $this->quantity; } public function setQuantity(string $quantity): void { $this->quantity = $quantity; } public function getMetadata(): ?array { return $this->metadata; } public function setMetadata(?array $metadata): void { $this->metadata = $metadata; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->uid)) { $json['uid'] = $this->uid; } $json['line_item_uid'] = $this->lineItemUid; $json['quantity'] = $this->quantity; if (isset($this->metadata)) { $json['metadata'] = $this->metadata; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 