<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class SubscriptionEvent implements \JsonSerializable { private $id; private $subscriptionEventType; private $effectiveDate; private $planId; private $info; public function __construct(string $id, string $subscriptionEventType, string $effectiveDate, string $planId) { $this->id = $id; $this->subscriptionEventType = $subscriptionEventType; $this->effectiveDate = $effectiveDate; $this->planId = $planId; } public function getId(): string { return $this->id; } public function setId(string $id): void { $this->id = $id; } public function getSubscriptionEventType(): string { return $this->subscriptionEventType; } public function setSubscriptionEventType(string $subscriptionEventType): void { $this->subscriptionEventType = $subscriptionEventType; } public function getEffectiveDate(): string { return $this->effectiveDate; } public function setEffectiveDate(string $effectiveDate): void { $this->effectiveDate = $effectiveDate; } public function getPlanId(): string { return $this->planId; } public function setPlanId(string $planId): void { $this->planId = $planId; } public function getInfo(): ?SubscriptionEventInfo { return $this->info; } public function setInfo(?SubscriptionEventInfo $info): void { $this->info = $info; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['id'] = $this->id; $json['subscription_event_type'] = $this->subscriptionEventType; $json['effective_date'] = $this->effectiveDate; $json['plan_id'] = $this->planId; if (isset($this->info)) { $json['info'] = $this->info; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 