<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class ApplicationDetails implements \JsonSerializable { private $squareProduct; private $applicationId; public function getSquareProduct(): ?string { return $this->squareProduct; } public function setSquareProduct(?string $squareProduct): void { $this->squareProduct = $squareProduct; } public function getApplicationId(): ?string { return $this->applicationId; } public function setApplicationId(?string $applicationId): void { $this->applicationId = $applicationId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->squareProduct)) { $json['square_product'] = $this->squareProduct; } if (isset($this->applicationId)) { $json['application_id'] = $this->applicationId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 