public class VerifyRequest extends java.lang.Object
AbstractMethod.execute(Object))}.| Modifier and Type | Class and Description |
|---|---|
static class |
VerifyRequest.LineType
Types of phone line to be specified for
type. |
| Constructor and Description |
|---|
VerifyRequest(java.lang.String number,
java.lang.String brand)
Constructor.
|
VerifyRequest(java.lang.String number,
java.lang.String brand,
java.lang.String from)
Constructor.
|
VerifyRequest(java.lang.String number,
java.lang.String brand,
java.lang.String from,
int length,
java.util.Locale locale)
Constructor.
|
VerifyRequest(java.lang.String number,
java.lang.String brand,
java.lang.String from,
int length,
java.util.Locale locale,
VerifyRequest.LineType type)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBrand() |
java.lang.String |
getCountry()
The country for the destination phone number.
|
java.lang.String |
getFrom() |
int |
getLength() |
java.util.Locale |
getLocale() |
java.lang.Integer |
getNextEventWait()
Get the wait time between attempts to deliver the PIN.
|
java.lang.String |
getNumber() |
java.lang.Integer |
getPinExpiry()
Get the PIN validity time from generation, in seconds, or null if this has not been set.
|
VerifyRequest.LineType |
getType() |
void |
setCountry(java.lang.String country)
The country for the destination phone number.
|
void |
setFrom(java.lang.String from) |
void |
setLength(int length) |
void |
setLocale(java.util.Locale locale) |
void |
setNextEventWait(java.lang.Integer nextEventWait)
Set the wait time between attempts to deliver the PIN.
|
void |
setPinExpiry(java.lang.Integer pinExpiry)
Set the PIN validity time from generation, in seconds.
|
void |
setType(VerifyRequest.LineType type) |
public VerifyRequest(java.lang.String number, java.lang.String brand)
number - (required) The recipient's phone number in E.164
format.brand - (required) The name of the company or app to be verified for. Must not be longer than 18
characters.public VerifyRequest(java.lang.String number, java.lang.String brand, java.lang.String from)
number - (required) The recipient's phone number in E.164 format.brand - (required) The name of the company or app you are verifying for. Must not be longer than 18
characters.from - (optional The Nexmo number to use as the sender for the verification SMS message and calls, in
E.164 format.public VerifyRequest(java.lang.String number, java.lang.String brand, java.lang.String from, int length, java.util.Locale locale)
number - (required) The recipient's phone number in E.164 format.brand - (required) The name of the company or app you are verifying for. Must not be longer than 18
characters.from - (optional The Nexmo number to use as the sender for the verification SMS message and calls, in
E.164 format.length - (optional) The length of the verification code to be sent to the user. Must be either 4 or 6. Use
-1 to use the default value.locale - (optional) Override the default locale used for verification. By default the locale is determined
from the country code included in numberpublic VerifyRequest(java.lang.String number, java.lang.String brand, java.lang.String from, int length, java.util.Locale locale, VerifyRequest.LineType type)
number - (required) The recipient's phone number in E.164 format.brand - (required) The name of the company or app you are verifying for. Must not be longer than 18
characters.from - (optional A short alphanumeric string to specify the SenderID for SMS sent by Verify.
Depending on the destination of the phone number you are applying, restrictions may apply.
By default, sender_id is VERIFY. Must be 11 characters or fewer.length - (optional) The length of the verification code to be sent to the user. Must be either 4 or 6. Use
-1 to use the default value.locale - (optional) Override the default locale used for verification. By default the locale is determined
from the country code included in numbertype - (optional) If provided, restrict the verification to the specified network type. Contact
support@nexmo.com to enable this feature.public java.lang.String getNumber()
public java.lang.String getBrand()
public java.lang.String getFrom()
VerifyRequest constructors.
If this value is null, the sender_id used will be VERIFY.
public void setFrom(java.lang.String from)
public int getLength()
VerifyRequest
constructors. -1 indicates the default length will be used.public void setLength(int length)
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
public VerifyRequest.LineType getType()
public void setType(VerifyRequest.LineType type)
public java.lang.String getCountry()
public void setCountry(java.lang.String country)
If you wish to used localised number formats or you are not sure if number is correctly formatted, set this to a two-character country code. For example, GB, US. Verify will work out the international phone number for you.
country - a String containing a 2-character country codepublic java.lang.Integer getPinExpiry()
public void setPinExpiry(java.lang.Integer pinExpiry)
public java.lang.Integer getNextEventWait()
public void setNextEventWait(java.lang.Integer nextEventWait)
nextEventWait - An Integer value between 60 and 900 seconds, or null to use the default duration.