phone_number; } /** * Contact's first name * * @return string */ public function getFirstName(): string { return $this->first_name; } /** * Optional. Contact's last name * * @return string|null */ public function getLastName(): ?string { return $this->last_name; } /** * Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes * * @see https://en.wikipedia.org/wiki/VCard * @return string|null */ public function getVcard(): ?string { return $this->vcard; } /** * Returns an array representation of the object * * @return array */ public function toArray(): array { return [ 'phone_number' => $this->phone_number, 'first_name' => $this->first_name, 'last_name' => $this->last_name, 'vcard' => $this->vcard, ]; } /** * Constructs object from an array representation * * @param array $data * @return ObjectTypeInterface */ public static function fromArray(array $data): ObjectTypeInterface { $object = new self(); $object->phone_number = $data['phone_number'] ?? null; $object->first_name = $data['first_name'] ?? null; $object->last_name = $data['last_name'] ?? null; $object->vcard = $data['vcard'] ?? null; return $object; } }