<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderLineItemPricingBlocklistsBlockedDiscount implements \JsonSerializable { private $uid; private $discountUid; private $discountCatalogObjectId; public function getUid(): ?string { return $this->uid; } public function setUid(?string $uid): void { $this->uid = $uid; } public function getDiscountUid(): ?string { return $this->discountUid; } public function setDiscountUid(?string $discountUid): void { $this->discountUid = $discountUid; } public function getDiscountCatalogObjectId(): ?string { return $this->discountCatalogObjectId; } public function setDiscountCatalogObjectId(?string $discountCatalogObjectId): void { $this->discountCatalogObjectId = $discountCatalogObjectId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->uid)) { $json['uid'] = $this->uid; } if (isset($this->discountUid)) { $json['discount_uid'] = $this->discountUid; } if (isset($this->discountCatalogObjectId)) { $json['discount_catalog_object_id'] = $this->discountCatalogObjectId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 