<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class Merchant implements \JsonSerializable { private $id; private $businessName; private $country; private $languageCode; private $currency; private $status; private $mainLocationId; private $createdAt; public function __construct(string $country) { $this->country = $country; } public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getBusinessName(): ?string { return $this->businessName; } public function setBusinessName(?string $businessName): void { $this->businessName = $businessName; } public function getCountry(): string { return $this->country; } public function setCountry(string $country): void { $this->country = $country; } public function getLanguageCode(): ?string { return $this->languageCode; } public function setLanguageCode(?string $languageCode): void { $this->languageCode = $languageCode; } public function getCurrency(): ?string { return $this->currency; } public function setCurrency(?string $currency): void { $this->currency = $currency; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): void { $this->status = $status; } public function getMainLocationId(): ?string { return $this->mainLocationId; } public function setMainLocationId(?string $mainLocationId): void { $this->mainLocationId = $mainLocationId; } public function getCreatedAt(): ?string { return $this->createdAt; } public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->businessName)) { $json['business_name'] = $this->businessName; } $json['country'] = $this->country; if (isset($this->languageCode)) { $json['language_code'] = $this->languageCode; } if (isset($this->currency)) { $json['currency'] = $this->currency; } if (isset($this->status)) { $json['status'] = $this->status; } if (isset($this->mainLocationId)) { $json['main_location_id'] = $this->mainLocationId; } if (isset($this->createdAt)) { $json['created_at'] = $this->createdAt; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 