Package com.nexmo.client.insight
Class AdvancedInsightRequest.Builder
- java.lang.Object
-
- com.nexmo.client.insight.AdvancedInsightRequest.Builder
-
- Enclosing class:
- AdvancedInsightRequest
public static class AdvancedInsightRequest.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String number)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdvancedInsightRequest.Builderasync(boolean async)AdvancedInsightRequestbuild()AdvancedInsightRequest.Buildercallback(java.lang.String url)AdvancedInsightRequest.Buildercnam(java.lang.Boolean cnam)AdvancedInsightRequest.Buildercountry(java.lang.String country)AdvancedInsightRequest.BuilderipAddress(java.lang.String ipAddress)AdvancedInsightRequest.Buildernumber(java.lang.String number)
-
-
-
Constructor Detail
-
Builder
public Builder(java.lang.String number)
- Parameters:
number- A single phone number that you need insight about in national or international format.
-
-
Method Detail
-
number
public AdvancedInsightRequest.Builder number(java.lang.String number)
- Parameters:
number- A single phone number that you need insight about in national or international format.- Returns:
- The
AdvancedInsightRequest.Builderto keep building.
-
country
public AdvancedInsightRequest.Builder country(java.lang.String country)
- Parameters:
country- If a number does not have a country code or it is uncertain, set the two-character country code.- Returns:
- The
AdvancedInsightRequest.Builderto keep building.
-
cnam
public AdvancedInsightRequest.Builder cnam(java.lang.Boolean cnam)
- Parameters:
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.- Returns:
- The
AdvancedInsightRequest.Builderto keep building.
-
ipAddress
public AdvancedInsightRequest.Builder ipAddress(java.lang.String ipAddress)
- Parameters:
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.- Returns:
- The
AdvancedInsightRequest.Builderto keep building.
-
async
public AdvancedInsightRequest.Builder async(boolean async)
- Parameters:
async- True if the call should be done asynchronously. When setting this value to true, thecallback(String)parameter must also be set.- Returns:
- The
AdvancedInsightRequest.Builderto keep building.
-
callback
public AdvancedInsightRequest.Builder callback(java.lang.String url)
- Parameters:
url- The URL that Nexmo will send a request to when the insight lookup is finished.- Returns:
- The
AdvancedInsightRequest.Builderto keep building.
-
build
public AdvancedInsightRequest build()
- Returns:
- A new
AdvancedInsightRequestobject from the stored builder options.
-
-