<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class OrderReward implements \JsonSerializable { private $id; private $rewardTierId; public function __construct(string $id, string $rewardTierId) { $this->id = $id; $this->rewardTierId = $rewardTierId; } public function getId(): string { return $this->id; } public function setId(string $id): void { $this->id = $id; } public function getRewardTierId(): string { return $this->rewardTierId; } public function setRewardTierId(string $rewardTierId): void { $this->rewardTierId = $rewardTierId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['id'] = $this->id; $json['reward_tier_id'] = $this->rewardTierId; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 