%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;
class InventoryAdjustmentGroup implements \JsonSerializable
{
/**
* @var string|null
*/
private $id;
/**
* @var string|null
*/
private $rootAdjustmentId;
/**
* @var string|null
*/
private $fromState;
/**
* @var string|null
*/
private $toState;
/**
* Returns Id.
*
* A unique ID generated by Square for the
* `InventoryAdjustmentGroup`.
*/
public function getId(): ?string
{
return $this->id;
}
/**
* Sets Id.
*
* A unique ID generated by Square for the
* `InventoryAdjustmentGroup`.
*
* @maps id
*/
public function setId(?string $id): void
{
$this->id = $id;
}
/**
* Returns Root Adjustment Id.
*
* The inventory adjustment of the composed variation.
*/
public function getRootAdjustmentId(): ?string
{
return $this->rootAdjustmentId;
}
/**
* Sets Root Adjustment Id.
*
* The inventory adjustment of the composed variation.
*
* @maps root_adjustment_id
*/
public function setRootAdjustmentId(?string $rootAdjustmentId): void
{
$this->rootAdjustmentId = $rootAdjustmentId;
}
/**
* Returns From State.
*
* Indicates the state of a tracked item quantity in the lifecycle of goods.
*/
public function getFromState(): ?string
{
return $this->fromState;
}
/**
* Sets From State.
*
* Indicates the state of a tracked item quantity in the lifecycle of goods.
*
* @maps from_state
*/
public function setFromState(?string $fromState): void
{
$this->fromState = $fromState;
}
/**
* Returns To State.
*
* Indicates the state of a tracked item quantity in the lifecycle of goods.
*/
public function getToState(): ?string
{
return $this->toState;
}
/**
* Sets To State.
*
* Indicates the state of a tracked item quantity in the lifecycle of goods.
*
* @maps to_state
*/
public function setToState(?string $toState): void
{
$this->toState = $toState;
}
/**
* 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 = [];
if (isset($this->id)) {
$json['id'] = $this->id;
}
if (isset($this->rootAdjustmentId)) {
$json['root_adjustment_id'] = $this->rootAdjustmentId;
}
if (isset($this->fromState)) {
$json['from_state'] = $this->fromState;
}
if (isset($this->toState)) {
$json['to_state'] = $this->toState;
}
$json = array_filter($json, function ($val) {
return $val !== null;
});
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
}
}