<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class InventoryTransfer implements \JsonSerializable { private $id; private $referenceId; private $state; private $fromLocationId; private $toLocationId; private $catalogObjectId; private $catalogObjectType; private $quantity; private $occurredAt; private $createdAt; private $source; private $employeeId; private $teamMemberId; public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getReferenceId(): ?string { return $this->referenceId; } public function setReferenceId(?string $referenceId): void { $this->referenceId = $referenceId; } public function getState(): ?string { return $this->state; } public function setState(?string $state): void { $this->state = $state; } public function getFromLocationId(): ?string { return $this->fromLocationId; } public function setFromLocationId(?string $fromLocationId): void { $this->fromLocationId = $fromLocationId; } public function getToLocationId(): ?string { return $this->toLocationId; } public function setToLocationId(?string $toLocationId): void { $this->toLocationId = $toLocationId; } 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 getQuantity(): ?string { return $this->quantity; } public function setQuantity(?string $quantity): void { $this->quantity = $quantity; } public function getOccurredAt(): ?string { return $this->occurredAt; } public function setOccurredAt(?string $occurredAt): void { $this->occurredAt = $occurredAt; } public function getCreatedAt(): ?string { return $this->createdAt; } public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } public function getSource(): ?SourceApplication { return $this->source; } public function setSource(?SourceApplication $source): void { $this->source = $source; } public function getEmployeeId(): ?string { return $this->employeeId; } public function setEmployeeId(?string $employeeId): void { $this->employeeId = $employeeId; } public function getTeamMemberId(): ?string { return $this->teamMemberId; } public function setTeamMemberId(?string $teamMemberId): void { $this->teamMemberId = $teamMemberId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->referenceId)) { $json['reference_id'] = $this->referenceId; } if (isset($this->state)) { $json['state'] = $this->state; } if (isset($this->fromLocationId)) { $json['from_location_id'] = $this->fromLocationId; } if (isset($this->toLocationId)) { $json['to_location_id'] = $this->toLocationId; } if (isset($this->catalogObjectId)) { $json['catalog_object_id'] = $this->catalogObjectId; } if (isset($this->catalogObjectType)) { $json['catalog_object_type'] = $this->catalogObjectType; } if (isset($this->quantity)) { $json['quantity'] = $this->quantity; } if (isset($this->occurredAt)) { $json['occurred_at'] = $this->occurredAt; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->source)) { $json['source'] = $this->source; } if (isset($this->employeeId)) { $json['employee_id'] = $this->employeeId; } if (isset($this->teamMemberId)) { $json['team_member_id'] = $this->teamMemberId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 