<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class LoyaltyAccountMapping implements \JsonSerializable { private $id; private $createdAt; private $phoneNumber; public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getCreatedAt(): ?string { return $this->createdAt; } public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } public function getPhoneNumber(): ?string { return $this->phoneNumber; } public function setPhoneNumber(?string $phoneNumber): void { $this->phoneNumber = $phoneNumber; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } if (isset($this->phoneNumber)) { $json['phone_number'] = $this->phoneNumber; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 