<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class V1UpdateOrderRequest implements \JsonSerializable { private $action; private $shippedTrackingNumber; private $completedNote; private $refundedNote; private $canceledNote; public function __construct(string $action) { $this->action = $action; } public function getAction(): string { return $this->action; } public function setAction(string $action): void { $this->action = $action; } public function getShippedTrackingNumber(): ?string { return $this->shippedTrackingNumber; } public function setShippedTrackingNumber(?string $shippedTrackingNumber): void { $this->shippedTrackingNumber = $shippedTrackingNumber; } public function getCompletedNote(): ?string { return $this->completedNote; } public function setCompletedNote(?string $completedNote): void { $this->completedNote = $completedNote; } public function getRefundedNote(): ?string { return $this->refundedNote; } public function setRefundedNote(?string $refundedNote): void { $this->refundedNote = $refundedNote; } public function getCanceledNote(): ?string { return $this->canceledNote; } public function setCanceledNote(?string $canceledNote): void { $this->canceledNote = $canceledNote; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['action'] = $this->action; if (isset($this->shippedTrackingNumber)) { $json['shipped_tracking_number'] = $this->shippedTrackingNumber; } if (isset($this->completedNote)) { $json['completed_note'] = $this->completedNote; } if (isset($this->refundedNote)) { $json['refunded_note'] = $this->refundedNote; } if (isset($this->canceledNote)) { $json['canceled_note'] = $this->canceledNote; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 