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