<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderPricingOptions implements \JsonSerializable { private $autoApplyDiscounts; private $autoApplyTaxes; public function getAutoApplyDiscounts(): ?bool { return $this->autoApplyDiscounts; } public function setAutoApplyDiscounts(?bool $autoApplyDiscounts): void { $this->autoApplyDiscounts = $autoApplyDiscounts; } public function getAutoApplyTaxes(): ?bool { return $this->autoApplyTaxes; } public function setAutoApplyTaxes(?bool $autoApplyTaxes): void { $this->autoApplyTaxes = $autoApplyTaxes; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->autoApplyDiscounts)) { $json['auto_apply_discounts'] = $this->autoApplyDiscounts; } if (isset($this->autoApplyTaxes)) { $json['auto_apply_taxes'] = $this->autoApplyTaxes; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 