<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogQueryExact implements \JsonSerializable { private $attributeName; private $attributeValue; public function __construct(string $attributeName, string $attributeValue) { $this->attributeName = $attributeName; $this->attributeValue = $attributeValue; } public function getAttributeName(): string { return $this->attributeName; } public function setAttributeName(string $attributeName): void { $this->attributeName = $attributeName; } public function getAttributeValue(): string { return $this->attributeValue; } public function setAttributeValue(string $attributeValue): void { $this->attributeValue = $attributeValue; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['attribute_name'] = $this->attributeName; $json['attribute_value'] = $this->attributeValue; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 