<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderFulfillmentShipmentDetails implements \JsonSerializable { private $recipient; private $carrier; private $shippingNote; private $shippingType; private $trackingNumber; private $trackingUrl; private $placedAt; private $inProgressAt; private $packagedAt; private $expectedShippedAt; private $shippedAt; private $canceledAt; private $cancelReason; private $failedAt; private $failureReason; public function getRecipient(): ?OrderFulfillmentRecipient { return $this->recipient; } public function setRecipient(?OrderFulfillmentRecipient $recipient): void { $this->recipient = $recipient; } public function getCarrier(): ?string { return $this->carrier; } public function setCarrier(?string $carrier): void { $this->carrier = $carrier; } public function getShippingNote(): ?string { return $this->shippingNote; } public function setShippingNote(?string $shippingNote): void { $this->shippingNote = $shippingNote; } public function getShippingType(): ?string { return $this->shippingType; } public function setShippingType(?string $shippingType): void { $this->shippingType = $shippingType; } public function getTrackingNumber(): ?string { return $this->trackingNumber; } public function setTrackingNumber(?string $trackingNumber): void { $this->trackingNumber = $trackingNumber; } public function getTrackingUrl(): ?string { return $this->trackingUrl; } public function setTrackingUrl(?string $trackingUrl): void { $this->trackingUrl = $trackingUrl; } public function getPlacedAt(): ?string { return $this->placedAt; } public function setPlacedAt(?string $placedAt): void { $this->placedAt = $placedAt; } public function getInProgressAt(): ?string { return $this->inProgressAt; } public function setInProgressAt(?string $inProgressAt): void { $this->inProgressAt = $inProgressAt; } public function getPackagedAt(): ?string { return $this->packagedAt; } public function setPackagedAt(?string $packagedAt): void { $this->packagedAt = $packagedAt; } public function getExpectedShippedAt(): ?string { return $this->expectedShippedAt; } public function setExpectedShippedAt(?string $expectedShippedAt): void { $this->expectedShippedAt = $expectedShippedAt; } public function getShippedAt(): ?string { return $this->shippedAt; } public function setShippedAt(?string $shippedAt): void { $this->shippedAt = $shippedAt; } public function getCanceledAt(): ?string { return $this->canceledAt; } public function setCanceledAt(?string $canceledAt): void { $this->canceledAt = $canceledAt; } public function getCancelReason(): ?string { return $this->cancelReason; } public function setCancelReason(?string $cancelReason): void { $this->cancelReason = $cancelReason; } public function getFailedAt(): ?string { return $this->failedAt; } public function setFailedAt(?string $failedAt): void { $this->failedAt = $failedAt; } public function getFailureReason(): ?string { return $this->failureReason; } public function setFailureReason(?string $failureReason): void { $this->failureReason = $failureReason; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->recipient)) { $json['recipient'] = $this->recipient; } if (isset($this->carrier)) { $json['carrier'] = $this->carrier; } if (isset($this->shippingNote)) { $json['shipping_note'] = $this->shippingNote; } if (isset($this->shippingType)) { $json['shipping_type'] = $this->shippingType; } if (isset($this->trackingNumber)) { $json['tracking_number'] = $this->trackingNumber; } if (isset($this->trackingUrl)) { $json['tracking_url'] = $this->trackingUrl; } if (isset($this->placedAt)) { $json['placed_at'] = $this->placedAt; } if (isset($this->inProgressAt)) { $json['in_progress_at'] = $this->inProgressAt; } if (isset($this->packagedAt)) { $json['packaged_at'] = $this->packagedAt; } if (isset($this->expectedShippedAt)) { $json['expected_shipped_at'] = $this->expectedShippedAt; } if (isset($this->shippedAt)) { $json['shipped_at'] = $this->shippedAt; } if (isset($this->canceledAt)) { $json['canceled_at'] = $this->canceledAt; } if (isset($this->cancelReason)) { $json['cancel_reason'] = $this->cancelReason; } if (isset($this->failedAt)) { $json['failed_at'] = $this->failedAt; } if (isset($this->failureReason)) { $json['failure_reason'] = $this->failureReason; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 