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