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