<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class PaymentRefund implements \JsonSerializable { private $id; private $status; private $locationId; private $amountMoney; private $appFeeMoney; private $processingFee; private $paymentId; private $orderId; private $reason; private $createdAt; private $updatedAt; private $teamMemberId; public function __construct(string $id, Money $amountMoney) { $this->id = $id; $this->amountMoney = $amountMoney; } public function getId(): string { return $this->id; } public function setId(string $id): void { $this->id = $id; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): void { $this->status = $status; } public function getLocationId(): ?string { return $this->locationId; } public function setLocationId(?string $locationId): void { $this->locationId = $locationId; } public function getAmountMoney(): Money { return $this->amountMoney; } public function setAmountMoney(Money $amountMoney): void { $this->amountMoney = $amountMoney; } public function getAppFeeMoney(): ?Money { return $this->appFeeMoney; } public function setAppFeeMoney(?Money $appFeeMoney): void { $this->appFeeMoney = $appFeeMoney; } public function getProcessingFee(): ?array { return $this->processingFee; } public function setProcessingFee(?array $processingFee): void { $this->processingFee = $processingFee; } public function getPaymentId(): ?string { return $this->paymentId; } public function setPaymentId(?string $paymentId): void { $this->paymentId = $paymentId; } public function getOrderId(): ?string { return $this->orderId; } public function setOrderId(?string $orderId): void { $this->orderId = $orderId; } public function getReason(): ?string { return $this->reason; } public function setReason(?string $reason): void { $this->reason = $reason; } 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 getTeamMemberId(): ?string { return $this->teamMemberId; } public function setTeamMemberId(?string $teamMemberId): void { $this->teamMemberId = $teamMemberId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['id'] = $this->id; if (isset($this->status)) { $json['status'] = $this->status; } if (isset($this->locationId)) { $json['location_id'] = $this->locationId; } $json['amount_money'] = $this->amountMoney; if (isset($this->appFeeMoney)) { $json['app_fee_money'] = $this->appFeeMoney; } if (isset($this->processingFee)) { $json['processing_fee'] = $this->processingFee; } if (isset($this->paymentId)) { $json['payment_id'] = $this->paymentId; } if (isset($this->orderId)) { $json['order_id'] = $this->orderId; } if (isset($this->reason)) { $json['reason'] = $this->reason; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->updatedAt)) { $json['updated_at'] = $this->updatedAt; } if (isset($this->teamMemberId)) { $json['team_member_id'] = $this->teamMemberId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 