%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/vendor/square/square/src/Models/ |
Upload File : |
<?php
declare(strict_types=1);
namespace Square\Models;
use stdClass;
/**
* The query filter to return the search result by exact match of the specified attribute name and
* value.
*/
class CatalogQueryExact implements \JsonSerializable
{
/**
* @var string
*/
private $attributeName;
/**
* @var string
*/
private $attributeValue;
/**
* @param string $attributeName
* @param string $attributeValue
*/
public function __construct(string $attributeName, string $attributeValue)
{
$this->attributeName = $attributeName;
$this->attributeValue = $attributeValue;
}
/**
* Returns Attribute Name.
*
* The name of the attribute to be searched. Matching of the attribute name is exact.
*/
public function getAttributeName(): string
{
return $this->attributeName;
}
/**
* Sets Attribute Name.
*
* The name of the attribute to be searched. Matching of the attribute name is exact.
*
* @required
* @maps attribute_name
*/
public function setAttributeName(string $attributeName): void
{
$this->attributeName = $attributeName;
}
/**
* Returns Attribute Value.
*
* The desired value of the search attribute. Matching of the attribute value is case insensitive and
* can be partial.
* For example, if a specified value of "sma", objects with the named attribute value of "Small",
* "small" are both matched.
*/
public function getAttributeValue(): string
{
return $this->attributeValue;
}
/**
* Sets Attribute Value.
*
* The desired value of the search attribute. Matching of the attribute value is case insensitive and
* can be partial.
* For example, if a specified value of "sma", objects with the named attribute value of "Small",
* "small" are both matched.
*
* @required
* @maps attribute_value
*/
public function setAttributeValue(string $attributeValue): void
{
$this->attributeValue = $attributeValue;
}
/**
* Encode this object to JSON
*
* @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
* are set. (default: false)
*
* @return mixed
*/
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;
}
}