public static class AdvancedInsightRequest.Builder extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
async |
protected java.lang.String |
callback |
protected java.lang.Boolean |
cnam |
protected java.lang.String |
country |
protected java.lang.String |
ipAddress |
protected java.lang.String |
number |
| Constructor and Description |
|---|
Builder(java.lang.String number) |
| Modifier and Type | Method and Description |
|---|---|
AdvancedInsightRequest.Builder |
async(boolean async) |
AdvancedInsightRequest |
build() |
AdvancedInsightRequest.Builder |
callback(java.lang.String url) |
AdvancedInsightRequest.Builder |
cnam(java.lang.Boolean cnam) |
AdvancedInsightRequest.Builder |
country(java.lang.String country) |
AdvancedInsightRequest.Builder |
ipAddress(java.lang.String ipAddress) |
AdvancedInsightRequest.Builder |
number(java.lang.String number) |
protected java.lang.String number
protected java.lang.String country
protected java.lang.Boolean cnam
protected java.lang.String ipAddress
protected boolean async
protected java.lang.String callback
public Builder(java.lang.String number)
number - A single phone number that you need insight about in national or international format.public AdvancedInsightRequest.Builder number(java.lang.String number)
number - A single phone number that you need insight about in national or international format.AdvancedInsightRequest.Builder to keep building.public AdvancedInsightRequest.Builder country(java.lang.String country)
country - If a number does not have a country code or it is uncertain, set the two-character country
code.AdvancedInsightRequest.Builder to keep building.public AdvancedInsightRequest.Builder cnam(java.lang.Boolean cnam)
cnam - Indicates if the name of the person who owns the phone number should also be looked up and
returned. Set to true to receive phone number owner name in the response. This is only available
for US numbers and incurs an additional charge.AdvancedInsightRequest.Builder to keep building.public AdvancedInsightRequest.Builder ipAddress(java.lang.String ipAddress)
ipAddress - The IP address of the user. If supplied, we will compare this to the country the user's
phone is located in and return an error if it does not match.AdvancedInsightRequest.Builder to keep building.public AdvancedInsightRequest.Builder async(boolean async)
async - True if the call should be done asynchronously. When setting this value to true, the callback(String) parameter must also be set.AdvancedInsightRequest.Builder to keep building.public AdvancedInsightRequest.Builder callback(java.lang.String url)
url - The URL that Nexmo will send a request to when the insight lookup is finished.AdvancedInsightRequest.Builder to keep building.public AdvancedInsightRequest build()
AdvancedInsightRequest object from the stored builder options.