<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderLineItemPricingBlocklists implements \JsonSerializable { private $blockedDiscounts; private $blockedTaxes; public function getBlockedDiscounts(): ?array { return $this->blockedDiscounts; } public function setBlockedDiscounts(?array $blockedDiscounts): void { $this->blockedDiscounts = $blockedDiscounts; } public function getBlockedTaxes(): ?array { return $this->blockedTaxes; } public function setBlockedTaxes(?array $blockedTaxes): void { $this->blockedTaxes = $blockedTaxes; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->blockedDiscounts)) { $json['blocked_discounts'] = $this->blockedDiscounts; } if (isset($this->blockedTaxes)) { $json['blocked_taxes'] = $this->blockedTaxes; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 