<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class RetrieveGiftCardFromGANRequest implements \JsonSerializable { private $gan; public function __construct(string $gan) { $this->gan = $gan; } public function getGan(): string { return $this->gan; } public function setGan(string $gan): void { $this->gan = $gan; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['gan'] = $this->gan; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 