- C#
- Python
- NodeJS
Lead Validation International C# Code Snippet
using System.Web;
namespace lead_validation_international_dot_net.REST
{
/// <summary>
/// Provides functionality to call the ServiceObjects Lead Validation International REST API's ValidateLeadInternational endpoint,
/// retrieving lead validation information (e.g., name, address, phone, email, and business details) with fallback to a backu endpoint
/// for reliability in live mode.
/// </summary>
public class ValidateLeadInternational
{
private const string LiveBaseUrl = "https://sws.serviceobjects.com/lvi/api.svc/";
private const string BackupBaseUrl = "https://swsbackup.serviceobjects.com/lvi/api.svc/";
private const string TrailBaseUrl = "https://trial.serviceobjects.com/lvi/api.svc/";
/// <summary>
/// Synchronously calls the ValidateLeadInternational REST endpoint to retrieve lead validation information,
/// attempting the primary endpoint first and falling back to the backup if the response is invalid
/// (Error.Number == "4") in live mode.
/// </summary>
/// <param name="input">The input parameters including full name, address, phone numbers, email, and license key.</param>
/// <returns>Deserialized <see cref="LVIResponse"/>.</returns>
public static LVIResponse Invoke(ValidateLeadInternationalInput input)
{
string url = BuildUrl(input, input.IsLive ? LiveBaseUrl : TrailBaseUrl);
LVIResponse response = Helper.HttpGet<LVIResponse>(url, input.TimeoutSeconds);
// Fallback on error payload in live mode
if (input.IsLive && !IsValid(response))
{
var fallbackUr = BuildUrl(input, BackupBaseUrl);
LVIResponse fallbackResponse = Helper.HttpGet<LVIResponse>(fallbackUr, input.TimeoutSeconds);
return fallbackResponse;
}
return response;
}
/// <summary>
/// Asynchronously calls the ValidateLeadInternational REST endpoint to retrieve lead validation information,
/// attempting the primary endpoint first and falling back to the backup if the response is invalid
/// (Error.Number == "4") in live mode.
/// </summary>
/// <param name="input">The input parameters including full name, address, phone numbers, email, and license key.</param>
/// <returns>Deserialized <see cref="LVIResponse"/>.</returns>
public static async Task<LVIResponse> InvokeAsync(ValidateLeadInternationalInput input)
{
//Use query string parameters so missing/options fields don't break
//the URL as path parameters would.
string url = BuildUrl(input, input.IsLive ? LiveBaseUrl : TrailBaseUrl);
LVIResponse response = await Helper.HttpGetAsync<LVIResponse>(url, input.TimeoutSeconds).ConfigureAwait(false);
if (input.IsLive && !IsValid(response))
{
var fallbackUrl = BuildUrl(input, BackupBaseUrl);
LVIResponse fallbackResponse = await Helper.HttpGetAsync<LVIResponse>(fallbackUrl, input.TimeoutSeconds).ConfigureAwait(false);
return fallbackResponse;
}
return response;
}
// Build the full request URL, including URL-encoded query string
public static string BuildUrl(ValidateLeadInternationalInput input, string baseUrl)
{
var qs = $"JSON/ValidateLeadInternational?FullName={HttpUtility.UrlEncode(input.FullName)}" +
$"&Salutation={HttpUtility.UrlEncode(input.Salutation)}" +
$"&FirstName={HttpUtility.UrlEncode(input.FirstName)}" +
$"&LastName={HttpUtility.UrlEncode(input.LastName)}" +
$"&BusinessName={HttpUtility.UrlEncode(input.BusinessName)}" +
$"&BusinessDomain={HttpUtility.UrlEncode(input.BusinessDomain)}" +
$"&BusinessEIN={HttpUtility.UrlEncode(input.BusinessEIN)}" +
$"&Address1={HttpUtility.UrlEncode(input.Address1)}" +
$"&Address2={HttpUtility.UrlEncode(input.Address2)}" +
$"&Address3={HttpUtility.UrlEncode(input.Address3)}" +
$"&Address4={HttpUtility.UrlEncode(input.Address4)}" +
$"&Address5={HttpUtility.UrlEncode(input.Address5)}" +
$"&Locality={HttpUtility.UrlEncode(input.Locality)}" +
$"&AdminArea={HttpUtility.UrlEncode(input.AdminArea)}" +
$"&PostalCode={HttpUtility.UrlEncode(input.PostalCode)}" +
$"&Country={HttpUtility.UrlEncode(input.Country)}" +
$"&Phone1={HttpUtility.UrlEncode(input.Phone1)}" +
$"&Phone2={HttpUtility.UrlEncode(input.Phone2)}" +
$"&Email={HttpUtility.UrlEncode(input.Email)}" +
$"&IPAddress={HttpUtility.UrlEncode(input.IPAddress)}" +
$"&Gender={HttpUtility.UrlEncode(input.Gender)}" +
$"&DateOfBirth={HttpUtility.UrlEncode(input.DateOfBirth)}" +
$"&UTCCaptureTime={HttpUtility.UrlEncode(input.UTCCaptureTime)}" +
$"&OutputLanguage={HttpUtility.UrlEncode(input.OutputLanguage)}" +
$"&TestType={HttpUtility.UrlEncode(input.TestType)}" +
$"&LicenseKey={HttpUtility.UrlEncode(input.LicenseKey)}";
return baseUrl + qs;
}
private static bool IsValid(LVIResponse response) => response?.Error == null || response.Error.TypeCode != "3";
/// <summary>
/// Lead Validation International (LVI) evaluates international lead data and scores the data quality into pass/fail/review categories. By evaluating the information quality of a contact, online marketers can more effectively weed-out fraudulent contacts.Online fraudsters are more likely to provide inaccurate contact information because the address and phone number can be easily traced. Unlike other validation services that perform simple data checks on single variables, Service Objects Lead Validation solution is able to cross-validate that a contact’s name, address, phone numbers, e-mail and IP address are all matched each other and are related to the consumer.
/// </summary>
/// <param name="FullName">The contact’s full name. e.g. Jane Doe</param>
/// <param name="Salutation">Salutation of the contact. Dr, Esq, Mr, Mrs etc</param>
/// <param name="FirstName">First name of the contact. e.g. Jane</param>
/// <param name="LastName">Last name of the contact. e.g. Doe</param>
/// <param name="BusinessName">The contacts company. e.g. Service Objects</param>
/// <param name="BusinessDomain">Website domain associated with the business. e.g. serviceobjects.com</param>
/// <param name="BusinessEIN">Represents the Company Tax Number. Used for Tax exempt checks for US leads.</param>
/// <param name="Address1">The address 1 of the contact or business address.</param>
/// <param name="Address2">The address 2 of the contact or business address.</param>
/// <param name="Address3">The address 3 of the contact or business address.</param>
/// <param name="Address4">The address 4 of the contact or business address.</param>
/// <param name="Address5">The address 5 of the contact or business address.</param>
/// <param name="Locality">The city of the contact’s postal address.</param>
/// <param name="AdminArea">The state of the contact’s postal address.</param>
/// <param name="PostalCode">The zip code of the contact’s postal address.</param>
/// <param name="Country">The country of the contact’s postal address. e.g. United States, US or USA</param>
/// <param name="Phone1">The contact’s primary phone number.</param>
/// <param name="Phone2">The contact’s secondary phone number.</param>
/// <param name="Email">The contact’s email address.</param>
/// <param name="IPAddress">The contact’s IP address in IPv4. (IPv6 coming in a future release)</param>
/// <param name="Gender">Male, Female or Neutral</param>
/// <param name="DateOfBirth">The contact’s date of birth</param>
/// <param name="UTCCaptureTime">The time the lead was submitted</param>
/// <param name="OutputLanguage">Language field indicating what language some of the output information will be.</param>
/// <param name="TestType">The name of the type of validation you want to perform on this contact.</param>
/// <param name="LicenseKey">Your license key to use the service.</param>
/// <param name="IsLive">Value to determine whether to use the live or trial servers</param>
/// <param name="TimeoutSeconds">Timeout, in seconds, for the call to the service. </param>
public record ValidateLeadInternationalInput(
string FullName = "",
string Salutation = "",
string FirstName = "",
string LastName = "",
string BusinessName = "",
string BusinessDomain = "",
string BusinessEIN = "",
string Address1 = "",
string Address2 = "",
string Address3 = "",
string Address4 = "",
string Address5 = "",
string Locality = "",
string AdminArea = "",
string PostalCode = "",
string Country = "",
string Phone1 = "",
string Phone2 = "",
string Email = "",
string IPAddress = "",
string Gender = "",
string DateOfBirth = "",
string UTCCaptureTime = "",
string OutputLanguage = "",
string TestType = "",
string LicenseKey = "",
bool IsLive = true,
int TimeoutSeconds = 15
);
}
}
using System.Runtime.Serialization;
using System.Linq;
namespace lead_validation_international_dot_net.REST
{
/// <summary>
/// Response object for the Lead Validation International REST API, containing information components and phone contact details.
/// </summary>
[DataContract]
public class LVIResponse
{
public string OverallCertainty { get; set; }
public string OverallQuality { get; set; }
public string LeadType { get; set; }
public string LeadCountry { get; set; }
public string NoteCodes { get; set; }
public string NoteDesc { get; set; }
public string NameCertainty { get; set; }
public string NameQuality { get; set; }
public string FirstNameLatin { get; set; }
public string LastNameLatin { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string NameNoteCodes { get; set; }
public string NameNoteDesc { get; set; }
public string AddressCertainty { get; set; }
public string AddressQuality { get; set; }
public string AddressResolutionLevel { get; set; }
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
public string AddressLine3 { get; set; }
public string AddressLine4 { get; set; }
public string AddressLine5 { get; set; }
public string AddressLocality { get; set; }
public string AddressAdminArea { get; set; }
public string AddressPostalCode { get; set; }
public string AddressCountry { get; set; }
public string AddressNoteCodes { get; set; }
public string AddressNoteDesc { get; set; }
public string EmailCertainty { get; set; }
public string EmailQuality { get; set; }
public string EmailCorrected { get; set; }
public string EmailNoteCodes { get; set; }
public string EmailNoteDesc { get; set; }
public string IPCertainty { get; set; }
public string IPQuality { get; set; }
public string IPLocality { get; set; }
public string IPAdminArea { get; set; }
public string IPCountry { get; set; }
public string IPNoteCodes { get; set; }
public string IPNoteDesc { get; set; }
public string Phone1Certainty { get; set; }
public string Phone1Quality { get; set; }
public string Phone1Locality { get; set; }
public string Phone1AdminArea { get; set; }
public string Phone1Country { get; set; }
public string Phone1NoteCodes { get; set; }
public string Phone1NoteDesc { get; set; }
public string Phone2Certainty { get; set; }
public string Phone2Quality { get; set; }
public string Phone2Locality { get; set; }
public string Phone2AdminArea { get; set; }
public string Phone2Country { get; set; }
public string Phone2NoteCodes { get; set; }
public string Phone2NoteDesc { get; set; }
public string BusinessCertainty { get; set; }
public string BusinessQuality { get; set; }
public string BusinessName { get; set; }
public string BusinessDomain { get; set; }
public string BusinessEmail { get; set; }
public string BusinessNoteCodes { get; set; }
public string BusinessNoteDesc { get; set; }
public InformationComponent[] InformationComponents { get; set; }
public PhoneContact PhoneContact { get; set; }
public Error Error { get; set; }
public override string ToString()
{
string informationComponents = InformationComponents?.Any() == true
? string.Join(", ", InformationComponents.Select(c => c.ToString()))
: "None";
string phoneContact = PhoneContact != null ? PhoneContact.ToString() : "None";
string error = Error != null ? Error.ToString() : "None";
return $"LVI Response: OverallCertainty = {OverallCertainty}, OverallQuality = {OverallQuality}, " +
$"LeadType = {LeadType}, LeadCountry = {LeadCountry}, NoteCodes = {NoteCodes}, NoteDesc = {NoteDesc}, " +
$"NameCertainty = {NameCertainty}, NameQuality = {NameQuality}, FirstNameLatin = {FirstNameLatin}, " +
$"LastNameLatin = {LastNameLatin}, FirstName = {FirstName}, LastName = {LastName}, " +
$"NameNoteCodes = {NameNoteCodes}, NameNoteDesc = {NameNoteDesc}, AddressCertainty = {AddressCertainty}, " +
$"AddressQuality = {AddressQuality}, AddressResolutionLevel = {AddressResolutionLevel}, " +
$"AddressLine1 = {AddressLine1}, AddressLine2 = {AddressLine2}, AddressLine3 = {AddressLine3}, " +
$"AddressLine4 = {AddressLine4}, AddressLine5 = {AddressLine5}, AddressLocality = {AddressLocality}, " +
$"AddressAdminArea = {AddressAdminArea}, AddressPostalCode = {AddressPostalCode}, " +
$"AddressCountry = {AddressCountry}, AddressNoteCodes = {AddressNoteCodes}, AddressNoteDesc = {AddressNoteDesc}, " +
$"EmailCertainty = {EmailCertainty}, EmailQuality = {EmailQuality}, EmailCorrected = {EmailCorrected}, " +
$"EmailNoteCodes = {EmailNoteCodes}, EmailNoteDesc = {EmailNoteDesc}, IPCertainty = {IPCertainty}, " +
$"IPQuality = {IPQuality}, IPLocality = {IPLocality}, IPAdminArea = {IPAdminArea}, IPCountry = {IPCountry}, " +
$"IPNoteCodes = {IPNoteCodes}, IPNoteDesc = {IPNoteDesc}, Phone1Certainty = {Phone1Certainty}, " +
$"Phone1Quality = {Phone1Quality}, Phone1Locality = {Phone1Locality}, Phone1AdminArea = {Phone1AdminArea}, " +
$"Phone1Country = {Phone1Country}, Phone1NoteCodes = {Phone1NoteCodes}, Phone1NoteDesc = {Phone1NoteDesc}, " +
$"Phone2Certainty = {Phone2Certainty}, Phone2Quality = {Phone2Quality}, Phone2Locality = {Phone2Locality}, " +
$"Phone2AdminArea = {Phone2AdminArea}, Phone2Country = {Phone2Country}, Phone2NoteCodes = {Phone2NoteCodes}, " +
$"Phone2NoteDesc = {Phone2NoteDesc}, BusinessCertainty = {BusinessCertainty}, BusinessQuality = {BusinessQuality}, " +
$"BusinessName = {BusinessName}, BusinessDomain = {BusinessDomain}, BusinessEmail = {BusinessEmail}, " +
$"BusinessNoteCodes = {BusinessNoteCodes}, BusinessNoteDesc = {BusinessNoteDesc}, " +
$"InformationComponents = [{informationComponents}], PhoneContact = {phoneContact}, Error = {error}";
}
}
/// <summary>
/// Represents an information component in the Lead Validation International REST API response.
/// </summary>
[DataContract]
public class InformationComponent
{
public string Name { get; set; }
public string Value { get; set; }
public override string ToString()
{
return $"InformationComponent: Name = {Name}, Value = {Value}";
}
}
/// <summary>
/// Represents phone contact information in the Lead Validation International REST API response.
/// </summary>
[DataContract]
public class PhoneContact
{
public string Name { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string State { get; set; }
public string Zip { get; set; }
public string Type { get; set; }
public override string ToString()
{
return $"PhoneContact: Name = {Name}, Address = {Address}, City = {City}, State = {State}, Zip = {Zip}, Type = {Type}";
}
}
/// <summary>
/// Represents error information in the Lead Validation International REST API response.
/// </summary>
[DataContract]
public class Error
{
public string Type { get; set; }
public string TypeCode { get; set; }
public string Desc { get; set; }
public string DescCode { get; set; }
public string Number { get; set; }
public override string ToString()
{
return $"Error: Type = {Type}, TypeCode = {TypeCode}, Desc = {Desc}, DescCode = {DescCode}";
}
}
}
using System.Text.Json;
using System.Web;
namespace lead_validation_international_dot_net.REST
{
public class Helper
{
public static T HttpGet<T>(string url, int timeoutSeconds)
{
using var httpClient = new HttpClient
{
Timeout = TimeSpan.FromSeconds(timeoutSeconds)
};
using var request = new HttpRequestMessage(HttpMethod.Get, url);
using HttpResponseMessage response = httpClient
.SendAsync(request)
.GetAwaiter()
.GetResult();
response.EnsureSuccessStatusCode();
using Stream responseStream = response.Content
.ReadAsStreamAsync()
.GetAwaiter()
.GetResult();
var options = new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true
};
object? obj = JsonSerializer.Deserialize(responseStream, typeof(T), options);
T result = (T)obj!;
return result;
}
// Asynchronous HTTP GET and JSON deserialize
public static async Task<T> HttpGetAsync<T>(string url, int timeoutSeconds)
{
HttpClient HttpClient = new HttpClient();
HttpClient.Timeout = TimeSpan.FromSeconds(timeoutSeconds);
using var httpResponse = await HttpClient.GetAsync(url).ConfigureAwait(false);
httpResponse.EnsureSuccessStatusCode();
var stream = await httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false);
return JsonSerializer.Deserialize<T>(stream)!;
}
public static string UrlEncode(string value) => HttpUtility.UrlEncode(value ?? string.Empty);
}
}
Lead Validation International Python Code Snippet
'''
Service Objects, Inc.
This module provides the validate_lead_international function to validate international lead data
using Service Objects LVI API. It handles live/trial endpoints, fallback logic, and JSON parsing.
Functions:
validate_lead_international(full_name: str,
salutation: str,
first_name: str,
last_name: str,
business_name: str,
business_domain: str,
business_EIN: str,
address_line1: str,
address_line2: str,
address_line3: str,
address_line4: str,
address_line5: str,
locality: str,
admin_area: str,
postal_code: str,
country: str,
phone1: str,
phone2: str,
email: str,
ip_address: str,
gender: str,
date_of_birth: str,
utc_capture_time: str,
output_language: str,
test_type: str,
license_key: str,
is_live: bool = True,
timeout_seconds: int = 15
'''
import requests # HTTP client for RESTful API calls
from lvi_response import LVIResponse, Error, InformationComponent, PhoneContact
# Endpoint URLs for LVI ValidateLeadInternational REST API
primary_url = 'https://sws.serviceobjects.com/lvi/api.svc/json/ValidateLeadInternational?'
backup_url = 'https://swsbackup.serviceobjects.com/lvi/api.svc/json/ValidateLeadInternational?'
trial_url = 'https://trial.serviceobjects.com/lvi/api.svc/json/ValidateLeadInternational?'
def validate_lead_international(
full_name: str,
salutation: str,
first_name: str,
last_name: str,
business_name: str,
business_domain: str,
business_EIN: str,
address_line1: str,
address_line2: str,
address_line3: str,
address_line4: str,
address_line5: str,
locality: str,
admin_area: str,
postal_code: str,
country: str,
phone1: str,
phone2: str,
email: str,
ip_address: str,
gender: str,
date_of_birth: str,
utc_capture_time: str,
output_language: str,
test_type: str,
license_key: str,
is_live: bool = True,
timeout_seconds: int = 15
) -> LVIResponse:
"""
Call LVI ValidateLeadInternational API to retrieve phone number information.
Parameters:
full_name: The contact's full name. e.g. Jane Doe
salutation: Salutation of the contact. Dr, Esq, Mr, Mrs etc
first_name: First name of the contact. e.g. Jane
last_name: Last name of the contact. e.g. Doe
business_name: The contact's company. e.g. Service Objects
business_domain: Website domain associated with the business. e.g. serviceobjects.com
business_EIN: Represents the Company Tax Number. Used for Tax exempt checks for US leads.
address_line1: The address 1 of the contact or business address.
address_line2: The address 2 of the contact or business address.
address_line3: The address 3 of the contact or business address.
address_line4: The address 4 of the contact or business address.
address_line5: The address 5 of the contact or business address.
locality: The city of the contact's postal address.
admin_area: The state of the contact's postal address.
postal_code: The zip code of the contact's postal address.
country: The country of the contact's postal address. e.g. United States, US or USA
phone1: The contact's primary phone number.
phone2: The contact's secondary phone number.
email: The contact's email address.
ip_address: The contact's IP address in IPv4. (IPv6 coming in a future release)
gender: Male, Female or Neutral
date_of_birth: The contact's date of birth
utc_capture_time: The time the lead was submitted
output_language: Language field indicating what language some of the output information will be.
test_type: The name of the type of validation you want to perform on this contact.
license_key: Your license key to use the service.
is_live: Value to determine whether to use the live or trial servers
timeout_seconds: Timeout, in seconds, for the call to the service.
Returns:
dict: Parsed JSON response with phone information or error details.
"""
params = {
'FullName': full_name,
'Salutation': salutation,
'FirstName': first_name,
'LastName': last_name,
'BusinessName': business_name,
'BusinessDomain': business_domain,
'BusinessEIN': business_EIN,
'AddressLine1': address_line1,
'AddressLine2': address_line2,
'AddressLine3': address_line3,
'AddressLine4': address_line4,
'AddressLine5': address_line5,
'Locality': locality,
'AdminArea': admin_area,
'PostalCode': postal_code,
'Country': country,
'Phone1': phone1,
'Phone2': phone2,
'Email': email,
'IPAddress': ip_address,
'Gender': gender,
'DateOfBirth': date_of_birth,
'UTCCaptureTime': utc_capture_time,
'OutputLanguage': output_language,
'TestType': test_type,
'LicenseKey': license_key,
'IsLive': is_live,
'TimeoutSeconds': timeout_seconds
}
# Select the base URL: production vs trial
url = primary_url if is_live else trial_url
# Attempt primary (or trial) endpoint first
try:
response = requests.get(url, params=params, timeout=timeout_seconds)
response.raise_for_status()
data = response.json()
# If API returned an error in JSON payload, trigger fallback
error = getattr(response, 'Error', None)
if not (error is None or getattr(error, 'Number', None) != "3"):
if is_live:
# Try backup URL
response = requests.get(backup_url, params=params, timeout=timeout_seconds)
response.raise_for_status()
data = response.json()
# If still error, propagate exception
if 'Error' in data:
raise RuntimeError(f"LVI backup error: {data['Error']}")
else:
# Trial mode error is terminal
raise RuntimeError(f"LVI trial error: {data['Error']}")
# Convert JSON response to LVIResponse for structured access
error = Error(**data.get('Error', {})) if data.get('Error') else None
info_components = [InformationComponent(**ic) for ic in data.get('InformationComponents', [])] if data.get('InformationComponents') else None
phone_contact = PhoneContact(**data.get('PhoneContact', {})) if data.get('PhoneContact') else None
return LVIResponse(
OverallCertainty=data.get('OverallCertainty'),
OverallQuality=data.get('OverallQuality'),
LeadType=data.get('LeadType'),
LeadCountry=data.get('LeadCountry'),
NoteCodes=data.get('NoteCodes'),
NoteDesc=data.get('NoteDesc'),
NameCertainty=data.get('NameCertainty'),
NameQuality=data.get('NameQuality'),
FirstNameLatin=data.get('FirstNameLatin'),
LastNameLatin=data.get('LastNameLatin'),
FirstName=data.get('FirstName'),
LastName=data.get('LastName'),
NameNoteCodes=data.get('NameNoteCodes'),
NameNoteDesc=data.get('NameNoteDesc'),
AddressCertainty=data.get('AddressCertainty'),
AddressQuality=data.get('AddressQuality'),
AddressResolutionLevel=data.get('AddressResolutionLevel'),
AddressLine1=data.get('AddressLine1'),
AddressLine2=data.get('AddressLine2'),
AddressLine3=data.get('AddressLine3'),
AddressLine4=data.get('AddressLine4'),
AddressLine5=data.get('AddressLine5'),
AddressLocality=data.get('AddressLocality'),
AddressAdminArea=data.get('AddressAdminArea'),
AddressPostalCode=data.get('AddressPostalCode'),
AddressCountry=data.get('AddressCountry'),
AddressNoteCodes=data.get('AddressNoteCodes'),
AddressNoteDesc=data.get('AddressNoteDesc'),
EmailCertainty=data.get('EmailCertainty'),
EmailQuality=data.get('EmailQuality'),
EmailCorrected=data.get('EmailCorrected'),
EmailNoteCodes=data.get('EmailNoteCodes'),
EmailNoteDesc=data.get('EmailNoteDesc'),
IPCertainty=data.get('IPCertainty'),
IPQuality=data.get('IPQuality'),
IPLocality=data.get('IPLocality'),
IPAdminArea=data.get('IPAdminArea'),
IPCountry=data.get('IPCountry'),
IPNoteCodes=data.get('IPNoteCodes'),
IPNoteDesc=data.get('IPNoteDesc'),
Phone1Certainty=data.get('Phone1Certainty'),
Phone1Quality=data.get('Phone1Quality'),
Phone1Locality=data.get('Phone1Locality'),
Phone1AdminArea=data.get('Phone1AdminArea'),
Phone1Country=data.get('Phone1Country'),
Phone1NoteCodes=data.get('Phone1NoteCodes'),
Phone1NoteDesc=data.get('Phone1NoteDesc'),
Phone2Certainty=data.get('Phone2Certainty'),
Phone2Quality=data.get('Phone2Quality'),
Phone2Locality=data.get('Phone2Locality'),
Phone2AdminArea=data.get('Phone2AdminArea'),
Phone2Country=data.get('Phone2Country'),
Phone2NoteCodes=data.get('Phone2NoteCodes'),
Phone2NoteDesc=data.get('Phone2NoteDesc'),
BusinessCertainty=data.get('BusinessCertainty'),
BusinessQuality=data.get('BusinessQuality'),
BusinessName=data.get('BusinessName'),
BusinessDomain=data.get('BusinessDomain'),
BusinessEmail=data.get('BusinessEmail'),
BusinessNoteCodes=data.get('BusinessNoteCodes'),
BusinessNoteDesc=data.get('BusinessNoteDesc'),
InformationComponents=info_components,
PhoneContact=phone_contact,
Error=error
)
except requests.RequestException as req_exc:
# Network or HTTP-level error occurred
if is_live:
try:
# Fallback to backup URL on network failure
response = requests.get(backup_url, params=params, timeout=timeout_seconds)
response.raise_for_status()
data = response.json()
if 'Error' in data:
raise RuntimeError(f"LVI backup error: {data['Error']}") from req_exc
# Convert JSON response to LVIResponse for structured access
error = Error(**data.get('Error', {})) if data.get('Error') else None
info_components = [InformationComponent(**inf) for inf in data.get('InformationComponents', [])] if data.get('InformationComponents') else None
phone_contact = PhoneContact(**data.get('PhoneContact', {})) if data.get('PhoneContact') else None
return LVIResponse(
OverallCertainty=data.get('OverallCertainty'),
OverallQuality=data.get('OverallQuality'),
LeadType=data.get('LeadType'),
LeadCountry=data.get('LeadCountry'),
NoteCodes=data.get('NoteCodes'),
NoteDesc=data.get('NoteDesc'),
NameCertainty=data.get('NameCertainty'),
NameQuality=data.get('NameQuality'),
FirstNameLatin=data.get('FirstNameLatin'),
LastNameLatin=data.get('LastNameLatin'),
FirstName=data.get('FirstName'),
LastName=data.get('LastName'),
NameNoteCodes=data.get('NameNoteCodes'),
NameNoteDesc=data.get('NameNoteDesc'),
AddressCertainty=data.get('AddressCertainty'),
AddressQuality=data.get('AddressQuality'),
AddressResolutionLevel=data.get('AddressResolutionLevel'),
AddressLine1=data.get('AddressLine1'),
AddressLine2=data.get('AddressLine2'),
AddressLine3=data.get('AddressLine3'),
AddressLine4=data.get('AddressLine4'),
AddressLine5=data.get('AddressLine5'),
AddressLocality=data.get('AddressLocality'),
AddressAdminArea=data.get('AddressAdminArea'),
AddressPostalCode=data.get('AddressPostalCode'),
AddressCountry=data.get('AddressCountry'),
AddressNoteCodes=data.get('AddressNoteCodes'),
AddressNoteDesc=data.get('AddressNoteDesc'),
EmailCertainty=data.get('EmailCertainty'),
EmailQuality=data.get('EmailQuality'),
EmailCorrected=data.get('EmailCorrected'),
EmailNoteCodes=data.get('EmailNoteCodes'),
EmailNoteDesc=data.get('EmailNoteDesc'),
IPCertainty=data.get('IPCertainty'),
IPQuality=data.get('IPQuality'),
IPLocality=data.get('IPLocality'),
IPAdminArea=data.get('IPAdminArea'),
IPCountry=data.get('IPCountry'),
IPNoteCodes=data.get('IPNoteCodes'),
IPNoteDesc=data.get('IPNoteDesc'),
Phone1Certainty=data.get('Phone1Certainty'),
Phone1Quality=data.get('Phone1Quality'),
Phone1Locality=data.get('Phone1Locality'),
Phone1AdminArea=data.get('Phone1AdminArea'),
Phone1Country=data.get('Phone1Country'),
Phone1NoteCodes=data.get('Phone1NoteCodes'),
Phone1NoteDesc=data.get('Phone1NoteDesc'),
Phone2Certainty=data.get('Phone2Certainty'),
Phone2Quality=data.get('Phone2Quality'),
Phone2Locality=data.get('Phone2Locality'),
Phone2AdminArea=data.get('Phone2AdminArea'),
Phone2Country=data.get('Phone2Country'),
Phone2NoteCodes=data.get('Phone2NoteCodes'),
Phone2NoteDesc=data.get('Phone2NoteDesc'),
BusinessCertainty=data.get('BusinessCertainty'),
BusinessQuality=data.get('BusinessQuality'),
BusinessName=data.get('BusinessName'),
BusinessDomain=data.get('BusinessDomain'),
BusinessEmail=data.get('BusinessEmail'),
BusinessNoteCodes=data.get('BusinessNoteCodes'),
BusinessNoteDesc=data.get('BusinessNoteDesc'),
InformationComponents=info_components,
PhoneContact=phone_contact,
Error=error
)
except Exception as backup_exc:
# Both primary and backup failed; escalate
raise RuntimeError("LVI service unreachable on both endpoints") from backup_exc
else:
raise RuntimeError(f"LVI trial error: {str(req_exc)}") from req_exc
from dataclasses import dataclass
from typing import Optional, List
@dataclass
class LVIResponse:
OverallCertainty: Optional[str] = None
OverallQuality: Optional[str] = None
LeadType: Optional[str] = None
LeadCountry: Optional[str] = None
NoteCodes: Optional[str] = None
NoteDesc: Optional[str] = None
NameCertainty: Optional[str] = None
NameQuality: Optional[str] = None
FirstNameLatin: Optional[str] = None
LastNameLatin: Optional[str] = None
FirstName: Optional[str] = None
LastName: Optional[str] = None
NameNoteCodes: Optional[str] = None
NameNoteDesc: Optional[str] = None
AddressCertainty: Optional[str] = None
AddressQuality: Optional[str] = None
AddressResolutionLevel: Optional[str] = None
AddressLine1: Optional[str] = None
AddressLine2: Optional[str] = None
AddressLine3: Optional[str] = None
AddressLine4: Optional[str] = None
AddressLine5: Optional[str] = None
AddressLocality: Optional[str] = None
AddressAdminArea: Optional[str] = None
AddressPostalCode: Optional[str] = None
AddressCountry: Optional[str] = None
AddressNoteCodes: Optional[str] = None
AddressNoteDesc: Optional[str] = None
EmailCertainty: Optional[str] = None
EmailQuality: Optional[str] = None
EmailCorrected: Optional[str] = None
EmailNoteCodes: Optional[str] = None
EmailNoteDesc: Optional[str] = None
IPCertainty: Optional[str] = None
IPQuality: Optional[str] = None
IPLocality: Optional[str] = None
IPAdminArea: Optional[str] = None
IPCountry: Optional[str] = None
IPNoteCodes: Optional[str] = None
IPNoteDesc: Optional[str] = None
Phone1Certainty: Optional[str] = None
Phone1Quality: Optional[str] = None
Phone1Locality: Optional[str] = None
Phone1AdminArea: Optional[str] = None
Phone1Country: Optional[str] = None
Phone1NoteCodes: Optional[str] = None
Phone1NoteDesc: Optional[str] = None
Phone2Certainty: Optional[str] = None
Phone2Quality: Optional[str] = None
Phone2Locality: Optional[str] = None
Phone2AdminArea: Optional[str] = None
Phone2Country: Optional[str] = None
Phone2NoteCodes: Optional[str] = None
Phone2NoteDesc: Optional[str] = None
BusinessCertainty: Optional[str] = None
BusinessQuality: Optional[str] = None
BusinessName: Optional[str] = None
BusinessDomain: Optional[str] = None
BusinessEmail: Optional[str] = None
BusinessNoteCodes: Optional[str] = None
BusinessNoteDesc: Optional[str] = None
InformationComponents: Optional[List['InformationComponent']] = None
PhoneContact: Optional['PhoneContact'] = None
Error: Optional['Error'] = None
def __str__(self) -> str:
info = ", ".join(str(c) for c in self.InformationComponents) if self.InformationComponents else "None"
contact = str(self.PhoneContact) if self.PhoneContact else "None"
error = str(self.Error) if self.Error else "None"
return (f"LVIResponse: OverallCertainty={self.OverallCertainty}, OverallQuality={self.OverallQuality}, "
f"LeadType={self.LeadType}, LeadCountry={self.LeadCountry}, NoteCodes={self.NoteCodes}, "
f"NoteDesc={self.NoteDesc}, FirstName={self.FirstName}, LastName={self.LastName}, "
f"BusinessName={self.BusinessName}, EmailCorrected={self.EmailCorrected}, "
f"PhoneContact={contact}, Error={error}, InformationComponents=[{info}]")
@dataclass
class InformationComponent:
Name: Optional[str] = None
Value: Optional[str] = None
def __str__(self) -> str:
return f"InformationComponent: Name={self.Name}, Value={self.Value}"
@dataclass
class PhoneContact:
Name: Optional[str] = None
Address: Optional[str] = None
City: Optional[str] = None
State: Optional[str] = None
Zip: Optional[str] = None
Type: Optional[str] = None
def __str__(self) -> str:
return (f"PhoneContact: Name={self.Name}, Address={self.Address}, City={self.City}, "
f"State={self.State}, Zip={self.Zip}, Type={self.Type}")
@dataclass
class Error:
Type: Optional[str] = None
TypeCode: Optional[str] = None
Desc: Optional[str] = None
DescCode: Optional[str] = None
Number: Optional[str] = None
def __str__(self) -> str:
return (f"Error: Type={self.Type}, TypeCode={self.TypeCode}, Desc={self.Desc}, "
f"DescCode={self.DescCode}")
Lead Validation International NodeJS Code Snippet
import axios from 'axios';
import querystring from 'querystring';
import { LVIResponse } from './lvi_response.js';
/**
* @constant
* @type {string}
* @description The base URL for the live ServiceObjects Lead Validation International API service.
*/
const liveBaseUrl = 'https://sws.serviceobjects.com/lvi/api.svc/';
/**
* @constant
* @type {string}
* @description The base URL for the backup ServiceObjects Lead Validation International API service.
*/
const backupBaseUrl = 'https://swsbackup.serviceobjects.com/lvi/api.svc/';
/**
* @constant
* @type {string}
* @description The base URL for the trial ServiceObjects Lead Validation International API service.
*/
const trialBaseUrl = 'https://trial.serviceobjects.com/lvi/api.svc/';
/**
* <summary>
* Checks if a response from the API is valid by verifying that it either has no Error object
* or the Error.Number is not equal to '4'.
* </summary>
* <param name="response" type="Object">The API response object to validate.</param>
* <returns type="boolean">True if the response is valid, false otherwise.</returns>
*/
const isValid = (response) => !response?.Error || response.Error.TypeCode !== '4';
/**
* <summary>
* Constructs a full URL for the ValidateLeadInternational API endpoint by combining the base URL
* with query parameters derived from the input parameters.
* </summary>
* <param name="params" type="Object">An object containing all the input parameters.</param>
* <param name="baseUrl" type="string">The base URL for the API service (live, backup, or trial).</param>
* <returns type="string">The constructed URL with query parameters.</returns>
*/
const buildUrl = (params, baseUrl) =>
`${baseUrl}JSON/ValidateLeadInternational?${querystring.stringify(params)}`;
/**
* <summary>
* Performs an HTTP GET request to the specified URL with a given timeout.
* </summary>
* <param name="url" type="string">The URL to send the GET request to.</param>
* <param name="timeoutSeconds" type="number">The timeout duration in seconds for the request.</param>
* <returns type="Promise<LVIResponse>">A promise that resolves to an LVIResponse object containing the API response data.</returns>
* <exception cref="Error">Thrown if the HTTP request fails, with a message detailing the error.</exception>
*/
const httpGet = async (url, timeoutSeconds) => {
try {
const response = await axios.get(url, { timeout: timeoutSeconds * 1000 });
return new LVIResponse(response.data);
} catch (error) {
throw new Error(`HTTP request failed: ${error.message}`);
}
};
/**
* <summary>
* Provides functionality to call the ServiceObjects Lead Validation International API's ValidateLeadInternational endpoint,
* retrieving lead validation information with fallback to a backup endpoint for reliability in live mode.
* </summary>
*/
const ValidateLeadInternationalClient = {
/**
* <summary>
* Asynchronously invokes the ValidateLeadInternational API endpoint, attempting the primary endpoint
* first and falling back to the backup if the response is invalid (Error.Number == '4') in live mode.
* </summary>
/**
* @param {string} fullName - The contact’s full name. e.g. Jane Doe
* @param {string} salutation - Salutation of the contact. Dr, Esq, Mr, Mrs etc
* @param {string} firstName - First name of the contact. e.g. Jane
* @param {string} lastName - Last name of the contact. e.g. Doe
* @param {string} businessName - The contact's company. e.g. Service Objects
* @param {string} businessDomain - Website domain associated with the business. e.g. serviceobjects.com
* @param {string} businessEIN - Represents the Company Tax Number. Used for Tax exempt checks for US leads.
* @param {string} addressLine1 - The address 1 of the contact or business address.
* @param {string} addressLine2 - The address 2 of the contact or business address.
* @param {string} addressLine3 - The address 3 of the contact or business address.
* @param {string} addressLine4 - The address 4 of the contact or business address.
* @param {string} addressLine5 - The address 5 of the contact or business address.
* @param {string} locality - The city of the contact’s postal address.
* @param {string} adminArea - The state of the contact’s postal address.
* @param {string} postalCode - The zip code of the contact’s postal address.
* @param {string} country - The country of the contact’s postal address. e.g. United States, US or USA
* @param {string} phone1 - The contact’s primary phone number.
* @param {string} phone2 - The contact’s secondary phone number.
* @param {string} email - The contact’s email address.
* @param {string} ipAddress - The contact’s IP address in IPv4. (IPv6 coming in a future release)
* @param {string} gender - Male, Female or Neutral
* @param {string} dateOfBirth - The contact’s date of birth
* @param {string} utcCaptureTime - The time the lead was submitted
* @param {string} outputLanguage - Language field indicating what language some of the output information will be.
* @param {string} testType - The name of the type of validation you want to perform on this contact.
* @param {string} licenseKey - Your license key to use the service.
* @param {boolean} isLive - Value to determine whether to use the live or trial servers
* @param {number} timeoutSeconds - Timeout, in seconds, for the call to the service.
*
* @returns {Promise<LVIResponse>} - A promise that resolves to an LVIResponse object.
*/
async invokeAsync(
fullName, salutation, firstName, lastName, businessName, businessDomain, businessEIN,
address1, address2, address3, address4, address5, aocality, adminArea, postalCode, country,
phone1, phone2, email, ipAddress, gender, dateOfBirth, utcCaptureTime, outputLanguage, testType, licenseKey,
isLive, timeoutSeconds
) {
const params = {
fullName, salutation, firstName, lastName, businessName, businessDomain, businessEIN,
address1, address2, address3, address4, address5, aocality, adminArea, postalCode, country,
phone1, phone2, email, ipAddress, gender, dateOfBirth, utcCaptureTime, outputLanguage, testType, licenseKey
};
const url = buildUrl(params, isLive ? liveBaseUrl : trialBaseUrl);
let response = await httpGet(url, timeoutSeconds || 15);
if (isLive && !isValid(response)) {
const fallbackUrl = buildUrl(params, BackupBaseUrl);
const fallbackResponse = await httpGet(fallbackUrl, timeoutSeconds || 15);
return fallbackResponse;
}
return response;
},
/**
* <summary>
* Synchronously invokes the ValidateLeadInternational API endpoint by wrapping the async call
* and awaiting its result immediately.
* </summary>
* @returns {LVIResponse} - An LVIResponse object with lead validation details or an error.
*/
invoke(
fullName, salutation, firstName, lastName, businessName, businessDomain, businessEIN,
address1, address2, address3, address4, address5, aocality, adminArea, postalCode, country,
phone1, phone2, email, ipAddress, gender, dateOfBirth, utcCaptureTime, outputLanguage, testType, licenseKey,
isLive, timeoutSeconds
) {
return (async () => await this.invokeAsync(
fullName, salutation, firstName, lastName, businessName, businessDomain, businessEIN,
address1, address2, address3, address4, address5, aocality, adminArea, postalCode, country,
phone1, phone2, email, ipAddress, gender, dateOfBirth, utcCaptureTime, outputLanguage, testType, licenseKey,
isLive, timeoutSeconds
))();
}
};
export { ValidateLeadInternationalClient, LVIResponse };
export class InformationComponent {
constructor(data = {}) {
this.Name = data.Name;
this.Value = data.Value;
}
toString() {
return `InformationComponent: Name = ${this.Name}, Value = ${this.Value}`;
}
}
export class PhoneContact {
constructor(data = {}) {
this.Name = data.Name;
this.Address = data.Address;
this.City = data.City;
this.State = data.State;
this.Zip = data.Zip;
this.Type = data.Type;
}
toString() {
return `PhoneContact: Name = ${this.Name}, Address = ${this.Address}, City = ${this.City}, State = ${this.State}, Zip = ${this.Zip}, Type = ${this.Type}`;
}
}
export class ErrorModel {
constructor(data = {}) {
this.Type = data.Type;
this.TypeCode = data.TypeCode;
this.Desc = data.Desc;
this.DescCode = data.DescCode;
this.Number = data.Number;
}
toString() {
return `Error: Type = ${this.Type}, TypeCode = ${this.TypeCode}, Desc = ${this.Desc}, DescCode = ${this.DescCode}`;
}
}
export class LVIResponse {
constructor(data = {}) {
this.OverallCertainty = data.OverallCertainty;
this.OverallQuality = data.OverallQuality;
this.LeadType = data.LeadType;
this.LeadCountry = data.LeadCountry;
this.NoteCodes = data.NoteCodes;
this.NoteDesc = data.NoteDesc;
this.NameCertainty = data.NameCertainty;
this.NameQuality = data.NameQuality;
this.FirstNameLatin = data.FirstNameLatin;
this.LastNameLatin = data.LastNameLatin;
this.FirstName = data.FirstName;
this.LastName = data.LastName;
this.NameNoteCodes = data.NameNoteCodes;
this.NameNoteDesc = data.NameNoteDesc;
this.AddressCertainty = data.AddressCertainty;
this.AddressQuality = data.AddressQuality;
this.AddressResolutionLevel = data.AddressResolutionLevel;
this.AddressLine1 = data.AddressLine1;
this.AddressLine2 = data.AddressLine2;
this.AddressLine3 = data.AddressLine3;
this.AddressLine4 = data.AddressLine4;
this.AddressLine5 = data.AddressLine5;
this.AddressLocality = data.AddressLocality;
this.AddressAdminArea = data.AddressAdminArea;
this.AddressPostalCode = data.AddressPostalCode;
this.AddressCountry = data.AddressCountry;
this.AddressNoteCodes = data.AddressNoteCodes;
this.AddressNoteDesc = data.AddressNoteDesc;
this.EmailCertainty = data.EmailCertainty;
this.EmailQuality = data.EmailQuality;
this.EmailCorrected = data.EmailCorrected;
this.EmailNoteCodes = data.EmailNoteCodes;
this.EmailNoteDesc = data.EmailNoteDesc;
this.IPCertainty = data.IPCertainty;
this.IPQuality = data.IPQuality;
this.IPLocality = data.IPLocality;
this.IPAdminArea = data.IPAdminArea;
this.IPCountry = data.IPCountry;
this.IPNoteCodes = data.IPNoteCodes;
this.IPNoteDesc = data.IPNoteDesc;
this.Phone1Certainty = data.Phone1Certainty;
this.Phone1Quality = data.Phone1Quality;
this.Phone1Locality = data.Phone1Locality;
this.Phone1AdminArea = data.Phone1AdminArea;
this.Phone1Country = data.Phone1Country;
this.Phone1NoteCodes = data.Phone1NoteCodes;
this.Phone1NoteDesc = data.Phone1NoteDesc;
this.Phone2Certainty = data.Phone2Certainty;
this.Phone2Quality = data.Phone2Quality;
this.Phone2Locality = data.Phone2Locality;
this.Phone2AdminArea = data.Phone2AdminArea;
this.Phone2Country = data.Phone2Country;
this.Phone2NoteCodes = data.Phone2NoteCodes;
this.Phone2NoteDesc = data.Phone2NoteDesc;
this.BusinessCertainty = data.BusinessCertainty;
this.BusinessQuality = data.BusinessQuality;
this.BusinessName = data.BusinessName;
this.BusinessDomain = data.BusinessDomain;
this.BusinessEmail = data.BusinessEmail;
this.BusinessNoteCodes = data.BusinessNoteCodes;
this.BusinessNoteDesc = data.BusinessNoteDesc;
this.InformationComponents = (data.InformationComponents || []).map(ic => new InformationComponent(ic));
this.PhoneContact = data.PhoneContact ? new PhoneContact(data.PhoneContact) : null;
this.Error = data.Error ? new ErrorModel(data.Error) : null;
}
toString() {
const infoComponents = this.InformationComponents.length
? this.InformationComponents.map(ic => ic.toString()).join(', ')
: 'None';
const phoneContact = this.PhoneContact ? this.PhoneContact.toString() : 'None';
const error = this.Error ? this.Error.toString() : 'None';
return `LVI Response: OverallCertainty = ${this.OverallCertainty}, OverallQuality = ${this.OverallQuality}, ` +
`LeadType = ${this.LeadType}, LeadCountry = ${this.LeadCountry}, NoteCodes = ${this.NoteCodes}, NoteDesc = ${this.NoteDesc}, ` +
`NameCertainty = ${this.NameCertainty}, NameQuality = ${this.NameQuality}, FirstNameLatin = ${this.FirstNameLatin}, ` +
`LastNameLatin = ${this.LastNameLatin}, FirstName = ${this.FirstName}, LastName = ${this.LastName}, ` +
`NameNoteCodes = ${this.NameNoteCodes}, NameNoteDesc = ${this.NameNoteDesc}, AddressCertainty = ${this.AddressCertainty}, ` +
`AddressQuality = ${this.AddressQuality}, AddressResolutionLevel = ${this.AddressResolutionLevel}, ` +
`AddressLine1 = ${this.AddressLine1}, AddressLine2 = ${this.AddressLine2}, AddressLine3 = ${this.AddressLine3}, ` +
`AddressLine4 = ${this.AddressLine4}, AddressLine5 = ${this.AddressLine5}, AddressLocality = ${this.AddressLocality}, ` +
`AddressAdminArea = ${this.AddressAdminArea}, AddressPostalCode = ${this.AddressPostalCode}, AddressCountry = ${this.AddressCountry}, ` +
`AddressNoteCodes = ${this.AddressNoteCodes}, AddressNoteDesc = ${this.AddressNoteDesc}, EmailCertainty = ${this.EmailCertainty}, ` +
`EmailQuality = ${this.EmailQuality}, EmailCorrected = ${this.EmailCorrected}, EmailNoteCodes = ${this.EmailNoteCodes}, ` +
`EmailNoteDesc = ${this.EmailNoteDesc}, IPCertainty = ${this.IPCertainty}, IPQuality = ${this.IPQuality}, ` +
`IPLocality = ${this.IPLocality}, IPAdminArea = ${this.IPAdminArea}, IPCountry = ${this.IPCountry}, IPNoteCodes = ${this.IPNoteCodes}, ` +
`IPNoteDesc = ${this.IPNoteDesc}, Phone1Certainty = ${this.Phone1Certainty}, Phone1Quality = ${this.Phone1Quality}, ` +
`Phone1Locality = ${this.Phone1Locality}, Phone1AdminArea = ${this.Phone1AdminArea}, Phone1Country = ${this.Phone1Country}, ` +
`Phone1NoteCodes = ${this.Phone1NoteCodes}, Phone1NoteDesc = ${this.Phone1NoteDesc}, Phone2Certainty = ${this.Phone2Certainty}, ` +
`Phone2Quality = ${this.Phone2Quality}, Phone2Locality = ${this.Phone2Locality}, Phone2AdminArea = ${this.Phone2AdminArea}, ` +
`Phone2Country = ${this.Phone2Country}, Phone2NoteCodes = ${this.Phone2NoteCodes}, Phone2NoteDesc = ${this.Phone2NoteDesc}, ` +
`BusinessCertainty = ${this.BusinessCertainty}, BusinessQuality = ${this.BusinessQuality}, BusinessName = ${this.BusinessName}, ` +
`BusinessDomain = ${this.BusinessDomain}, BusinessEmail = ${this.BusinessEmail}, BusinessNoteCodes = ${this.BusinessNoteCodes}, ` +
`BusinessNoteDesc = ${this.BusinessNoteDesc}, InformationComponents = [${infoComponents}], PhoneContact = ${phoneContact}, Error = ${error}`;
}
}
export default LVIResponse