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