<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class V1Tender implements \JsonSerializable { private $id; private $type; private $name; private $employeeId; private $receiptUrl; private $cardBrand; private $panSuffix; private $entryMethod; private $paymentNote; private $totalMoney; private $tenderedMoney; private $tenderedAt; private $settledAt; private $changeBackMoney; private $refundedMoney; private $isExchange; public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getType(): ?string { return $this->type; } public function setType(?string $type): void { $this->type = $type; } public function getName(): ?string { return $this->name; } public function setName(?string $name): void { $this->name = $name; } public function getEmployeeId(): ?string { return $this->employeeId; } public function setEmployeeId(?string $employeeId): void { $this->employeeId = $employeeId; } public function getReceiptUrl(): ?string { return $this->receiptUrl; } public function setReceiptUrl(?string $receiptUrl): void { $this->receiptUrl = $receiptUrl; } public function getCardBrand(): ?string { return $this->cardBrand; } public function setCardBrand(?string $cardBrand): void { $this->cardBrand = $cardBrand; } public function getPanSuffix(): ?string { return $this->panSuffix; } public function setPanSuffix(?string $panSuffix): void { $this->panSuffix = $panSuffix; } public function getEntryMethod(): ?string { return $this->entryMethod; } public function setEntryMethod(?string $entryMethod): void { $this->entryMethod = $entryMethod; } public function getPaymentNote(): ?string { return $this->paymentNote; } public function setPaymentNote(?string $paymentNote): void { $this->paymentNote = $paymentNote; } public function getTotalMoney(): ?V1Money { return $this->totalMoney; } public function setTotalMoney(?V1Money $totalMoney): void { $this->totalMoney = $totalMoney; } public function getTenderedMoney(): ?V1Money { return $this->tenderedMoney; } public function setTenderedMoney(?V1Money $tenderedMoney): void { $this->tenderedMoney = $tenderedMoney; } public function getTenderedAt(): ?string { return $this->tenderedAt; } public function setTenderedAt(?string $tenderedAt): void { $this->tenderedAt = $tenderedAt; } public function getSettledAt(): ?string { return $this->settledAt; } public function setSettledAt(?string $settledAt): void { $this->settledAt = $settledAt; } public function getChangeBackMoney(): ?V1Money { return $this->changeBackMoney; } public function setChangeBackMoney(?V1Money $changeBackMoney): void { $this->changeBackMoney = $changeBackMoney; } public function getRefundedMoney(): ?V1Money { return $this->refundedMoney; } public function setRefundedMoney(?V1Money $refundedMoney): void { $this->refundedMoney = $refundedMoney; } public function getIsExchange(): ?bool { return $this->isExchange; } public function setIsExchange(?bool $isExchange): void { $this->isExchange = $isExchange; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->type)) { $json['type'] = $this->type; } if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->employeeId)) { $json['employee_id'] = $this->employeeId; } if (isset($this->receiptUrl)) { $json['receipt_url'] = $this->receiptUrl; } if (isset($this->cardBrand)) { $json['card_brand'] = $this->cardBrand; } if (isset($this->panSuffix)) { $json['pan_suffix'] = $this->panSuffix; } if (isset($this->entryMethod)) { $json['entry_method'] = $this->entryMethod; } if (isset($this->paymentNote)) { $json['payment_note'] = $this->paymentNote; } if (isset($this->totalMoney)) { $json['total_money'] = $this->totalMoney; } if (isset($this->tenderedMoney)) { $json['tendered_money'] = $this->tenderedMoney; } if (isset($this->tenderedAt)) { $json['tendered_at'] = $this->tenderedAt; } if (isset($this->settledAt)) { $json['settled_at'] = $this->settledAt; } if (isset($this->changeBackMoney)) { $json['change_back_money'] = $this->changeBackMoney; } if (isset($this->refundedMoney)) { $json['refunded_money'] = $this->refundedMoney; } if (isset($this->isExchange)) { $json['is_exchange'] = $this->isExchange; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 