<?php
 declare(strict_types=1); namespace Square\Models; use stdClass; class VendorContact implements \JsonSerializable { private $id; private $name; private $emailAddress; private $phoneNumber; private $removed; private $ordinal; public function __construct(int $ordinal) { $this->ordinal = $ordinal; } public function getId(): ?string { return $this->id; } public function setId(?string $id): void { $this->id = $id; } public function getName(): ?string { return $this->name; } public function setName(?string $name): void { $this->name = $name; } public function getEmailAddress(): ?string { return $this->emailAddress; } public function setEmailAddress(?string $emailAddress): void { $this->emailAddress = $emailAddress; } public function getPhoneNumber(): ?string { return $this->phoneNumber; } public function setPhoneNumber(?string $phoneNumber): void { $this->phoneNumber = $phoneNumber; } public function getRemoved(): ?bool { return $this->removed; } public function setRemoved(?bool $removed): void { $this->removed = $removed; } public function getOrdinal(): int { return $this->ordinal; } public function setOrdinal(int $ordinal): void { $this->ordinal = $ordinal; } #[\ReturnTypeWillChange] public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { $json['id'] = $this->id; } if (isset($this->name)) { $json['name'] = $this->name; } if (isset($this->emailAddress)) { $json['email_address'] = $this->emailAddress; } if (isset($this->phoneNumber)) { $json['phone_number'] = $this->phoneNumber; } if (isset($this->removed)) { $json['removed'] = $this->removed; } $json['ordinal'] = $this->ordinal; $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } } 