<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CatalogItem implements \JsonSerializable { private $name; private $description; private $abbreviation; private $labelColor; private $availableOnline; private $availableForPickup; private $availableElectronically; private $categoryId; private $taxIds; private $modifierListInfo; private $variations; private $productType; private $skipModifierScreen; private $itemOptions; private $imageIds; private $sortName; public function getName(): ?string { return $this->name; } public function setName(?string $name): void { $this->name = $name; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): void { $this->description = $description; } public function getAbbreviation(): ?string { return $this->abbreviation; } public function setAbbreviation(?string $abbreviation): void { $this->abbreviation = $abbreviation; } public function getLabelColor(): ?string { return $this->labelColor; } public function setLabelColor(?string $labelColor): void { $this->labelColor = $labelColor; } public function getAvailableOnline(): ?bool { return $this->availableOnline; } public function setAvailableOnline(?bool $availableOnline): void { $this->availableOnline = $availableOnline; } public function getAvailableForPickup(): ?bool { return $this->availableForPickup; } public function setAvailableForPickup(?bool $availableForPickup): void { $this->availableForPickup = $availableForPickup; } public function getAvailableElectronically(): ?bool { return $this->availableElectronically; } public function setAvailableElectronically(?bool $availableElectronically): void { $this->availableElectronically = $availableElectronically; } public function getCategoryId(): ?string { return $this->categoryId; } public function setCategoryId(?string $categoryId): void { $this->categoryId = $categoryId; } public function getTaxIds(): ?array { return $this->taxIds; } public function setTaxIds(?array $taxIds): void { $this->taxIds = $taxIds; } public function getModifierListInfo(): ?array { return $this->modifierListInfo; } public function setModifierListInfo(?array $modifierListInfo): void { $this->modifierListInfo = $modifierListInfo; } public function getVariations(): ?array { return $this->variations; } public function setVariations(?array $variations): void { $this->variations = $variations; } public function getProductType(): ?string { return $this->productType; } public function setProductType(?string $productType): void { $this->productType = $productType; } public function getSkipModifierScreen(): ?bool { return $this->skipModifierScreen; } public function setSkipModifierScreen(?bool $skipModifierScreen): void { $this->skipModifierScreen = $skipModifierScreen; } public function getItemOptions(): ?array { return $this->itemOptions; } public function setItemOptions(?array $itemOptions): void { $this->itemOptions = $itemOptions; } public function getImageIds(): ?array { return $this->imageIds; } public function setImageIds(?array $imageIds): void { $this->imageIds = $imageIds; } public function getSortName(): ?string { return $this->sortName; } public function setSortName(?string $sortName): void { $this->sortName = $sortName; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->description)) { $json['description'] = $this->description; } if (isset($this->abbreviation)) { $json['abbreviation'] = $this->abbreviation; } if (isset($this->labelColor)) { $json['label_color'] = $this->labelColor; } if (isset($this->availableOnline)) { $json['available_online'] = $this->availableOnline; } if (isset($this->availableForPickup)) { $json['available_for_pickup'] = $this->availableForPickup; } if (isset($this->availableElectronically)) { $json['available_electronically'] = $this->availableElectronically; } if (isset($this->categoryId)) { $json['category_id'] = $this->categoryId; } if (isset($this->taxIds)) { $json['tax_ids'] = $this->taxIds; } if (isset($this->modifierListInfo)) { $json['modifier_list_info'] = $this->modifierListInfo; } if (isset($this->variations)) { $json['variations'] = $this->variations; } if (isset($this->productType)) { $json['product_type'] = $this->productType; } if (isset($this->skipModifierScreen)) { $json['skip_modifier_screen'] = $this->skipModifierScreen; } if (isset($this->itemOptions)) { $json['item_options'] = $this->itemOptions; } if (isset($this->imageIds)) { $json['image_ids'] = $this->imageIds; } if (isset($this->sortName)) { $json['sort_name'] = $this->sortName; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 