<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class V1PaymentItemization implements \JsonSerializable { private $name; private $quantity; private $itemizationType; private $itemDetail; private $notes; private $itemVariationName; private $totalMoney; private $singleQuantityMoney; private $grossSalesMoney; private $discountMoney; private $netSalesMoney; private $taxes; private $discounts; private $modifiers; public function getName(): ?string { return $this->name; } public function setName(?string $name): void { $this->name = $name; } public function getQuantity(): ?float { return $this->quantity; } public function setQuantity(?float $quantity): void { $this->quantity = $quantity; } public function getItemizationType(): ?string { return $this->itemizationType; } public function setItemizationType(?string $itemizationType): void { $this->itemizationType = $itemizationType; } public function getItemDetail(): ?V1PaymentItemDetail { return $this->itemDetail; } public function setItemDetail(?V1PaymentItemDetail $itemDetail): void { $this->itemDetail = $itemDetail; } public function getNotes(): ?string { return $this->notes; } public function setNotes(?string $notes): void { $this->notes = $notes; } public function getItemVariationName(): ?string { return $this->itemVariationName; } public function setItemVariationName(?string $itemVariationName): void { $this->itemVariationName = $itemVariationName; } public function getTotalMoney(): ?V1Money { return $this->totalMoney; } public function setTotalMoney(?V1Money $totalMoney): void { $this->totalMoney = $totalMoney; } public function getSingleQuantityMoney(): ?V1Money { return $this->singleQuantityMoney; } public function setSingleQuantityMoney(?V1Money $singleQuantityMoney): void { $this->singleQuantityMoney = $singleQuantityMoney; } public function getGrossSalesMoney(): ?V1Money { return $this->grossSalesMoney; } public function setGrossSalesMoney(?V1Money $grossSalesMoney): void { $this->grossSalesMoney = $grossSalesMoney; } public function getDiscountMoney(): ?V1Money { return $this->discountMoney; } public function setDiscountMoney(?V1Money $discountMoney): void { $this->discountMoney = $discountMoney; } public function getNetSalesMoney(): ?V1Money { return $this->netSalesMoney; } public function setNetSalesMoney(?V1Money $netSalesMoney): void { $this->netSalesMoney = $netSalesMoney; } public function getTaxes(): ?array { return $this->taxes; } public function setTaxes(?array $taxes): void { $this->taxes = $taxes; } public function getDiscounts(): ?array { return $this->discounts; } public function setDiscounts(?array $discounts): void { $this->discounts = $discounts; } public function getModifiers(): ?array { return $this->modifiers; } public function setModifiers(?array $modifiers): void { $this->modifiers = $modifiers; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->quantity)) { $json['quantity'] = $this->quantity; } if (isset($this->itemizationType)) { $json['itemization_type'] = $this->itemizationType; } if (isset($this->itemDetail)) { $json['item_detail'] = $this->itemDetail; } if (isset($this->notes)) { $json['notes'] = $this->notes; } if (isset($this->itemVariationName)) { $json['item_variation_name'] = $this->itemVariationName; } if (isset($this->totalMoney)) { $json['total_money'] = $this->totalMoney; } if (isset($this->singleQuantityMoney)) { $json['single_quantity_money'] = $this->singleQuantityMoney; } if (isset($this->grossSalesMoney)) { $json['gross_sales_money'] = $this->grossSalesMoney; } if (isset($this->discountMoney)) { $json['discount_money'] = $this->discountMoney; } if (isset($this->netSalesMoney)) { $json['net_sales_money'] = $this->netSalesMoney; } if (isset($this->taxes)) { $json['taxes'] = $this->taxes; } if (isset($this->discounts)) { $json['discounts'] = $this->discounts; } if (isset($this->modifiers)) { $json['modifiers'] = $this->modifiers; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 