<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class GiftCardActivityAdjustDecrement implements \JsonSerializable { private $amountMoney; private $reason; public function __construct(Money $amountMoney, string $reason) { $this->amountMoney = $amountMoney; $this->reason = $reason; } public function getAmountMoney(): Money { return $this->amountMoney; } public function setAmountMoney(Money $amountMoney): void { $this->amountMoney = $amountMoney; } public function getReason(): string { return $this->reason; } public function setReason(string $reason): void { $this->reason = $reason; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['amount_money'] = $this->amountMoney; $json['reason'] = $this->reason; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 