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