<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class LoyaltyProgramAccrualRuleVisitData implements \JsonSerializable { private $minimumAmountMoney; private $taxMode; public function __construct(string $taxMode) { $this->taxMode = $taxMode; } public function getMinimumAmountMoney(): ?Money { return $this->minimumAmountMoney; } public function setMinimumAmountMoney(?Money $minimumAmountMoney): void { $this->minimumAmountMoney = $minimumAmountMoney; } public function getTaxMode(): string { return $this->taxMode; } public function setTaxMode(string $taxMode): void { $this->taxMode = $taxMode; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->minimumAmountMoney)) { $json['minimum_amount_money'] = $this->minimumAmountMoney; } $json['tax_mode'] = $this->taxMode; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 