<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class GiftCardActivityLoad implements \JsonSerializable { private $amountMoney; private $orderId; private $lineItemUid; private $referenceId; private $buyerPaymentInstrumentIds; public function getAmountMoney(): ?Money { return $this->amountMoney; } public function setAmountMoney(?Money $amountMoney): void { $this->amountMoney = $amountMoney; } public function getOrderId(): ?string { return $this->orderId; } public function setOrderId(?string $orderId): void { $this->orderId = $orderId; } public function getLineItemUid(): ?string { return $this->lineItemUid; } public function setLineItemUid(?string $lineItemUid): void { $this->lineItemUid = $lineItemUid; } public function getReferenceId(): ?string { return $this->referenceId; } public function setReferenceId(?string $referenceId): void { $this->referenceId = $referenceId; } public function getBuyerPaymentInstrumentIds(): ?array { return $this->buyerPaymentInstrumentIds; } public function setBuyerPaymentInstrumentIds(?array $buyerPaymentInstrumentIds): void { $this->buyerPaymentInstrumentIds = $buyerPaymentInstrumentIds; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->amountMoney)) { $json['amount_money'] = $this->amountMoney; } if (isset($this->orderId)) { $json['order_id'] = $this->orderId; } if (isset($this->lineItemUid)) { $json['line_item_uid'] = $this->lineItemUid; } if (isset($this->referenceId)) { $json['reference_id'] = $this->referenceId; } if (isset($this->buyerPaymentInstrumentIds)) { $json['buyer_payment_instrument_ids'] = $this->buyerPaymentInstrumentIds; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 