<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class InventoryAdjustmentGroup implements \JsonSerializable { private $id; private $rootAdjustmentId; private $fromState; private $toState; public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getRootAdjustmentId(): ?string { return $this->rootAdjustmentId; } public function setRootAdjustmentId(?string $rootAdjustmentId): void { $this->rootAdjustmentId = $rootAdjustmentId; } public function getFromState(): ?string { return $this->fromState; } public function setFromState(?string $fromState): void { $this->fromState = $fromState; } public function getToState(): ?string { return $this->toState; } public function setToState(?string $toState): void { $this->toState = $toState; } #[\ReturnTypeWillChange] 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; } } 