<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class LoyaltyEventAccumulatePoints implements \JsonSerializable { private $loyaltyProgramId; private $points; private $orderId; public function getLoyaltyProgramId(): ?string { return $this->loyaltyProgramId; } public function setLoyaltyProgramId(?string $loyaltyProgramId): void { $this->loyaltyProgramId = $loyaltyProgramId; } public function getPoints(): ?int { return $this->points; } public function setPoints(?int $points): void { $this->points = $points; } public function getOrderId(): ?string { return $this->orderId; } public function setOrderId(?string $orderId): void { $this->orderId = $orderId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->loyaltyProgramId)) { $json['loyalty_program_id'] = $this->loyaltyProgramId; } if (isset($this->points)) { $json['points'] = $this->points; } if (isset($this->orderId)) { $json['order_id'] = $this->orderId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 