<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class LoyaltyAccountExpiringPointDeadline implements \JsonSerializable { private $points; private $expiresAt; public function __construct(int $points, string $expiresAt) { $this->points = $points; $this->expiresAt = $expiresAt; } public function getPoints(): int { return $this->points; } public function setPoints(int $points): void { $this->points = $points; } public function getExpiresAt(): string { return $this->expiresAt; } public function setExpiresAt(string $expiresAt): void { $this->expiresAt = $expiresAt; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['points'] = $this->points; $json['expires_at'] = $this->expiresAt; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 