<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class InvoiceCustomField implements \JsonSerializable { private $label; private $value; private $placement; public function getLabel(): ?string { return $this->label; } public function setLabel(?string $label): void { $this->label = $label; } public function getValue(): ?string { return $this->value; } public function setValue(?string $value): void { $this->value = $value; } public function getPlacement(): ?string { return $this->placement; } public function setPlacement(?string $placement): void { $this->placement = $placement; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->label)) { $json['label'] = $this->label; } if (isset($this->value)) { $json['value'] = $this->value; } if (isset($this->placement)) { $json['placement'] = $this->placement; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 