<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class TerminalAction implements \JsonSerializable { private $id; private $deviceId; private $deadlineDuration; private $status; private $cancelReason; private $createdAt; private $updatedAt; private $appId; private $type; private $saveCardOptions; private $deviceMetadata; public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getDeviceId(): ?string { return $this->deviceId; } public function setDeviceId(?string $deviceId): void { $this->deviceId = $deviceId; } public function getDeadlineDuration(): ?string { return $this->deadlineDuration; } public function setDeadlineDuration(?string $deadlineDuration): void { $this->deadlineDuration = $deadlineDuration; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): void { $this->status = $status; } public function getCancelReason(): ?string { return $this->cancelReason; } public function setCancelReason(?string $cancelReason): void { $this->cancelReason = $cancelReason; } public function getCreatedAt(): ?string { return $this->createdAt; } public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } public function getUpdatedAt(): ?string { return $this->updatedAt; } public function setUpdatedAt(?string $updatedAt): void { $this->updatedAt = $updatedAt; } public function getAppId(): ?string { return $this->appId; } public function setAppId(?string $appId): void { $this->appId = $appId; } public function getType(): ?string { return $this->type; } public function setType(?string $type): void { $this->type = $type; } public function getSaveCardOptions(): ?SaveCardOptions { return $this->saveCardOptions; } public function setSaveCardOptions(?SaveCardOptions $saveCardOptions): void { $this->saveCardOptions = $saveCardOptions; } public function getDeviceMetadata(): ?DeviceMetadata { return $this->deviceMetadata; } public function setDeviceMetadata(?DeviceMetadata $deviceMetadata): void { $this->deviceMetadata = $deviceMetadata; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->deviceId)) { $json['device_id'] = $this->deviceId; } if (isset($this->deadlineDuration)) { $json['deadline_duration'] = $this->deadlineDuration; } if (isset($this->status)) { $json['status'] = $this->status; } if (isset($this->cancelReason)) { $json['cancel_reason'] = $this->cancelReason; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } if (isset($this->appId)) { $json['app_id'] = $this->appId; } if (isset($this->type)) { $json['type'] = $this->type; } if (isset($this->saveCardOptions)) { $json['save_card_options'] = $this->saveCardOptions; } if (isset($this->deviceMetadata)) { $json['device_metadata'] = $this->deviceMetadata; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 