<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class TaxIds implements \JsonSerializable { private $euVat; private $frSiret; private $frNaf; private $esNif; public function getEuVat(): ?string { return $this->euVat; } public function setEuVat(?string $euVat): void { $this->euVat = $euVat; } public function getFrSiret(): ?string { return $this->frSiret; } public function setFrSiret(?string $frSiret): void { $this->frSiret = $frSiret; } public function getFrNaf(): ?string { return $this->frNaf; } public function setFrNaf(?string $frNaf): void { $this->frNaf = $frNaf; } public function getEsNif(): ?string { return $this->esNif; } public function setEsNif(?string $esNif): void { $this->esNif = $esNif; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->euVat)) { $json['eu_vat'] = $this->euVat; } if (isset($this->frSiret)) { $json['fr_siret'] = $this->frSiret; } if (isset($this->frNaf)) { $json['fr_naf'] = $this->frNaf; } if (isset($this->esNif)) { $json['es_nif'] = $this->esNif; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 