<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CalculateLoyaltyPointsRequest implements \JsonSerializable { private $orderId; private $transactionAmountMoney; public function getOrderId(): ?string { return $this->orderId; } public function setOrderId(?string $orderId): void { $this->orderId = $orderId; } public function getTransactionAmountMoney(): ?Money { return $this->transactionAmountMoney; } public function setTransactionAmountMoney(?Money $transactionAmountMoney): void { $this->transactionAmountMoney = $transactionAmountMoney; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->orderId)) { $json['order_id'] = $this->orderId; } if (isset($this->transactionAmountMoney)) { $json['transaction_amount_money'] = $this->transactionAmountMoney; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 