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