<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class InventoryCount implements \JsonSerializable { private $catalogObjectId; private $catalogObjectType; private $state; private $locationId; private $quantity; private $calculatedAt; private $isEstimated; public function getCatalogObjectId(): ?string { return $this->catalogObjectId; } public function setCatalogObjectId(?string $catalogObjectId): void { $this->catalogObjectId = $catalogObjectId; } public function getCatalogObjectType(): ?string { return $this->catalogObjectType; } public function setCatalogObjectType(?string $catalogObjectType): void { $this->catalogObjectType = $catalogObjectType; } public function getState(): ?string { return $this->state; } public function setState(?string $state): void { $this->state = $state; } public function getLocationId(): ?string { return $this->locationId; } public function setLocationId(?string $locationId): void { $this->locationId = $locationId; } public function getQuantity(): ?string { return $this->quantity; } public function setQuantity(?string $quantity): void { $this->quantity = $quantity; } public function getCalculatedAt(): ?string { return $this->calculatedAt; } public function setCalculatedAt(?string $calculatedAt): void { $this->calculatedAt = $calculatedAt; } public function getIsEstimated(): ?bool { return $this->isEstimated; } public function setIsEstimated(?bool $isEstimated): void { $this->isEstimated = $isEstimated; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->catalogObjectId)) { $json['catalog_object_id'] = $this->catalogObjectId; } if (isset($this->catalogObjectType)) { $json['catalog_object_type'] = $this->catalogObjectType; } if (isset($this->state)) { $json['state'] = $this->state; } if (isset($this->locationId)) { $json['location_id'] = $this->locationId; } if (isset($this->quantity)) { $json['quantity'] = $this->quantity; } if (isset($this->calculatedAt)) { $json['calculated_at'] = $this->calculatedAt; } if (isset($this->isEstimated)) { $json['is_estimated'] = $this->isEstimated; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 