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