<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class AccumulateLoyaltyPointsRequest implements \JsonSerializable { private $accumulatePoints; private $idempotencyKey; private $locationId; public function __construct( LoyaltyEventAccumulatePoints $accumulatePoints, string $idempotencyKey, string $locationId ) { $this->accumulatePoints = $accumulatePoints; $this->idempotencyKey = $idempotencyKey; $this->locationId = $locationId; } public function getAccumulatePoints(): LoyaltyEventAccumulatePoints { return $this->accumulatePoints; } public function setAccumulatePoints(LoyaltyEventAccumulatePoints $accumulatePoints): void { $this->accumulatePoints = $accumulatePoints; } public function getIdempotencyKey(): string { return $this->idempotencyKey; } public function setIdempotencyKey(string $idempotencyKey): void { $this->idempotencyKey = $idempotencyKey; } public function getLocationId(): string { return $this->locationId; } public function setLocationId(string $locationId): void { $this->locationId = $locationId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; $json['accumulate_points'] = $this->accumulatePoints; $json['idempotency_key'] = $this->idempotencyKey; $json['location_id'] = $this->locationId; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 