<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class AdjustLoyaltyPointsRequest implements \JsonSerializable { private $idempotencyKey; private $adjustPoints; public function __construct(string $idempotencyKey, LoyaltyEventAdjustPoints $adjustPoints) { $this->idempotencyKey = $idempotencyKey; $this->adjustPoints = $adjustPoints; } public function getIdempotencyKey(): string { return $this->idempotencyKey; } public function setIdempotencyKey(string $idempotencyKey): void { $this->idempotencyKey = $idempotencyKey; } public function getAdjustPoints(): LoyaltyEventAdjustPoints { return $this->adjustPoints; } public function setAdjustPoints(LoyaltyEventAdjustPoints $adjustPoints): void { $this->adjustPoints = $adjustPoints; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['idempotency_key'] = $this->idempotencyKey; $json['adjust_points'] = $this->adjustPoints; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 