<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class InvoicePaymentRequest implements \JsonSerializable { private $uid; private $requestMethod; private $requestType; private $dueDate; private $fixedAmountRequestedMoney; private $percentageRequested; private $tippingEnabled; private $automaticPaymentSource; private $cardId; private $reminders; private $computedAmountMoney; private $totalCompletedAmountMoney; private $roundingAdjustmentIncludedMoney; public function getUid(): ?string { return $this->uid; } public function setUid(?string $uid): void { $this->uid = $uid; } public function getRequestMethod(): ?string { return $this->requestMethod; } public function setRequestMethod(?string $requestMethod): void { $this->requestMethod = $requestMethod; } public function getRequestType(): ?string { return $this->requestType; } public function setRequestType(?string $requestType): void { $this->requestType = $requestType; } public function getDueDate(): ?string { return $this->dueDate; } public function setDueDate(?string $dueDate): void { $this->dueDate = $dueDate; } public function getFixedAmountRequestedMoney(): ?Money { return $this->fixedAmountRequestedMoney; } public function setFixedAmountRequestedMoney(?Money $fixedAmountRequestedMoney): void { $this->fixedAmountRequestedMoney = $fixedAmountRequestedMoney; } public function getPercentageRequested(): ?string { return $this->percentageRequested; } public function setPercentageRequested(?string $percentageRequested): void { $this->percentageRequested = $percentageRequested; } public function getTippingEnabled(): ?bool { return $this->tippingEnabled; } public function setTippingEnabled(?bool $tippingEnabled): void { $this->tippingEnabled = $tippingEnabled; } public function getAutomaticPaymentSource(): ?string { return $this->automaticPaymentSource; } public function setAutomaticPaymentSource(?string $automaticPaymentSource): void { $this->automaticPaymentSource = $automaticPaymentSource; } public function getCardId(): ?string { return $this->cardId; } public function setCardId(?string $cardId): void { $this->cardId = $cardId; } public function getReminders(): ?array { return $this->reminders; } public function setReminders(?array $reminders): void { $this->reminders = $reminders; } public function getComputedAmountMoney(): ?Money { return $this->computedAmountMoney; } public function setComputedAmountMoney(?Money $computedAmountMoney): void { $this->computedAmountMoney = $computedAmountMoney; } public function getTotalCompletedAmountMoney(): ?Money { return $this->totalCompletedAmountMoney; } public function setTotalCompletedAmountMoney(?Money $totalCompletedAmountMoney): void { $this->totalCompletedAmountMoney = $totalCompletedAmountMoney; } public function getRoundingAdjustmentIncludedMoney(): ?Money { return $this->roundingAdjustmentIncludedMoney; } public function setRoundingAdjustmentIncludedMoney(?Money $roundingAdjustmentIncludedMoney): void { $this->roundingAdjustmentIncludedMoney = $roundingAdjustmentIncludedMoney; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->uid)) { $json['uid'] = $this->uid; } if (isset($this->requestMethod)) { $json['request_method'] = $this->requestMethod; } if (isset($this->requestType)) { $json['request_type'] = $this->requestType; } if (isset($this->dueDate)) { $json['due_date'] = $this->dueDate; } if (isset($this->fixedAmountRequestedMoney)) { $json['fixed_amount_requested_money'] = $this->fixedAmountRequestedMoney; } if (isset($this->percentageRequested)) { $json['percentage_requested'] = $this->percentageRequested; } if (isset($this->tippingEnabled)) { $json['tipping_enabled'] = $this->tippingEnabled; } if (isset($this->automaticPaymentSource)) { $json['automatic_payment_source'] = $this->automaticPaymentSource; } if (isset($this->cardId)) { $json['card_id'] = $this->cardId; } if (isset($this->reminders)) { $json['reminders'] = $this->reminders; } if (isset($this->computedAmountMoney)) { $json['computed_amount_money'] = $this->computedAmountMoney; } if (isset($this->totalCompletedAmountMoney)) { $json['total_completed_amount_money'] = $this->totalCompletedAmountMoney; } if (isset($this->roundingAdjustmentIncludedMoney)) { $json['rounding_adjustment_included_money'] = $this->roundingAdjustmentIncludedMoney; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 