<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class ListGiftCardsRequest implements \JsonSerializable { private $type; private $state; private $limit; private $cursor; private $customerId; public function getType(): ?string { return $this->type; } public function setType(?string $type): void { $this->type = $type; } public function getState(): ?string { return $this->state; } public function setState(?string $state): void { $this->state = $state; } public function getLimit(): ?int { return $this->limit; } public function setLimit(?int $limit): void { $this->limit = $limit; } public function getCursor(): ?string { return $this->cursor; } public function setCursor(?string $cursor): void { $this->cursor = $cursor; } public function getCustomerId(): ?string { return $this->customerId; } public function setCustomerId(?string $customerId): void { $this->customerId = $customerId; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->type)) { $json['type'] = $this->type; } if (isset($this->state)) { $json['state'] = $this->state; } if (isset($this->limit)) { $json['limit'] = $this->limit; } if (isset($this->cursor)) { $json['cursor'] = $this->cursor; } if (isset($this->customerId)) { $json['customer_id'] = $this->customerId; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 