<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderLineItemModifier implements \JsonSerializable { private $uid; private $catalogObjectId; private $catalogVersion; private $name; private $quantity; private $basePriceMoney; private $totalPriceMoney; private $metadata; public function getUid(): ?string { return $this->uid; } public function setUid(?string $uid): void { $this->uid = $uid; } public function getCatalogObjectId(): ?string { return $this->catalogObjectId; } public function setCatalogObjectId(?string $catalogObjectId): void { $this->catalogObjectId = $catalogObjectId; } public function getCatalogVersion(): ?int { return $this->catalogVersion; } public function setCatalogVersion(?int $catalogVersion): void { $this->catalogVersion = $catalogVersion; } public function getName(): ?string { return $this->name; } public function setName(?string $name): void { $this->name = $name; } public function getQuantity(): ?string { return $this->quantity; } public function setQuantity(?string $quantity): void { $this->quantity = $quantity; } public function getBasePriceMoney(): ?Money { return $this->basePriceMoney; } public function setBasePriceMoney(?Money $basePriceMoney): void { $this->basePriceMoney = $basePriceMoney; } public function getTotalPriceMoney(): ?Money { return $this->totalPriceMoney; } public function setTotalPriceMoney(?Money $totalPriceMoney): void { $this->totalPriceMoney = $totalPriceMoney; } public function getMetadata(): ?array { return $this->metadata; } public function setMetadata(?array $metadata): void { $this->metadata = $metadata; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->uid)) { $json['uid'] = $this->uid; } if (isset($this->catalogObjectId)) { $json['catalog_object_id'] = $this->catalogObjectId; } if (isset($this->catalogVersion)) { $json['catalog_version'] = $this->catalogVersion; } if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->quantity)) { $json['quantity'] = $this->quantity; } if (isset($this->basePriceMoney)) { $json['base_price_money'] = $this->basePriceMoney; } if (isset($this->totalPriceMoney)) { $json['total_price_money'] = $this->totalPriceMoney; } if (isset($this->metadata)) { $json['metadata'] = $this->metadata; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 