<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class GiftCardActivityRefund implements \JsonSerializable { private $redeemActivityId; private $amountMoney; private $referenceId; private $paymentId; public function getRedeemActivityId(): ?string { return $this->redeemActivityId; } public function setRedeemActivityId(?string $redeemActivityId): void { $this->redeemActivityId = $redeemActivityId; } public function getAmountMoney(): ?Money { return $this->amountMoney; } public function setAmountMoney(?Money $amountMoney): void { $this->amountMoney = $amountMoney; } public function getReferenceId(): ?string { return $this->referenceId; } public function setReferenceId(?string $referenceId): void { $this->referenceId = $referenceId; } public function getPaymentId(): ?string { return $this->paymentId; } public function setPaymentId(?string $paymentId): void { $this->paymentId = $paymentId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->redeemActivityId)) { $json['redeem_activity_id'] = $this->redeemActivityId; } if (isset($this->amountMoney)) { $json['amount_money'] = $this->amountMoney; } if (isset($this->referenceId)) { $json['reference_id'] = $this->referenceId; } if (isset($this->paymentId)) { $json['payment_id'] = $this->paymentId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 