<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class CashAppDetails implements \JsonSerializable { private $buyerFullName; private $buyerCountryCode; private $buyerCashtag; public function getBuyerFullName(): ?string { return $this->buyerFullName; } public function setBuyerFullName(?string $buyerFullName): void { $this->buyerFullName = $buyerFullName; } public function getBuyerCountryCode(): ?string { return $this->buyerCountryCode; } public function setBuyerCountryCode(?string $buyerCountryCode): void { $this->buyerCountryCode = $buyerCountryCode; } public function getBuyerCashtag(): ?string { return $this->buyerCashtag; } public function setBuyerCashtag(?string $buyerCashtag): void { $this->buyerCashtag = $buyerCashtag; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->buyerFullName)) { $json['buyer_full_name'] = $this->buyerFullName; } if (isset($this->buyerCountryCode)) { $json['buyer_country_code'] = $this->buyerCountryCode; } if (isset($this->buyerCashtag)) { $json['buyer_cashtag'] = $this->buyerCashtag; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 