Package com.vonage.client.verify
Class VerifyRequest
java.lang.Object
com.vonage.client.verify.BaseRequest
com.vonage.client.verify.VerifyRequest
public class VerifyRequest extends BaseRequest
Describes a Verify request when passed to
VerifyEndpoint.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVerifyRequest.BuilderBuilder to create a Two Factor Authentication requeststatic classVerifyRequest.LineTypeTypes of phone line to be specified fortype.static classVerifyRequest.WorkflowEnumeration representing different verification workflows. -
Constructor Summary
Constructors Constructor Description VerifyRequest(VerifyRequest.Builder builder)VerifyRequest(java.lang.String number, java.lang.String brand)Deprecated.this construtor is deprecated useVerifyRequest.Builderto contruct a 2FA verify requestVerifyRequest(java.lang.String number, java.lang.String brand, java.lang.String from)Deprecated.this construtor is deprecated useVerifyRequest.Builderto contruct a 2FA verify requestVerifyRequest(java.lang.String number, java.lang.String brand, java.lang.String from, int length, java.util.Locale locale)Deprecated.this construtor is deprecated useVerifyRequest.BuilderinsteadVerifyRequest(java.lang.String number, java.lang.String brand, java.lang.String from, int length, java.util.Locale locale, VerifyRequest.LineType type)Deprecated. -
Method Summary
Modifier and Type Method Description static VerifyRequest.Builderbuilder(java.lang.String number, java.lang.String brand)java.lang.StringgetBrand()java.lang.StringgetFrom()VerifyRequest.LineTypegetType()VerifyRequest.WorkflowgetWorkflow()voidsetFrom(java.lang.String from)Deprecated.since 5.5.0 useVerifyRequest.Builderto create a 2FA verification requestvoidsetType(VerifyRequest.LineType type)Deprecated.since 5.5.0 useVerifyRequest.Builderto create a 2FA verification requestvoidsetWorkflow(VerifyRequest.Workflow workflow)Deprecated.since 5.5.0 useVerifyRequest.Builderto create a 2FA verification requestjava.lang.StringtoString()Methods inherited from class com.vonage.client.verify.BaseRequest
getCountry, getDashedLocale, getLength, getLocale, getNextEventWait, getNumber, getPinExpiry, setCountry, setLength, setLocale, setNextEventWait, setPinExpiry
-
Constructor Details
-
VerifyRequest
Deprecated.this construtor is deprecated useVerifyRequest.Builderto contruct a 2FA verify requestConstructor.- Parameters:
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.
-
VerifyRequest
@Deprecated public VerifyRequest(java.lang.String number, java.lang.String brand, java.lang.String from)Deprecated.this construtor is deprecated useVerifyRequest.Builderto contruct a 2FA verify requestConstructor.- Parameters:
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 Vonage number to use as the sender for the verification SMS message and calls, in E.164 format.
-
VerifyRequest
@Deprecated public VerifyRequest(java.lang.String number, java.lang.String brand, java.lang.String from, int length, java.util.Locale locale)Deprecated.this construtor is deprecated useVerifyRequest.BuilderinsteadConstructor.- Parameters:
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 Vonage 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 innumber
-
VerifyRequest
@Deprecated public VerifyRequest(java.lang.String number, java.lang.String brand, java.lang.String from, int length, java.util.Locale locale, VerifyRequest.LineType type)Deprecated.Constructor.- Parameters:
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 isVERIFY. 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 innumbertype- (optional) If provided, restrict the verification to the specified network type. Contact support@nexmo.com to enable this feature.
-
VerifyRequest
-
-
Method Details
-
getBrand
- Returns:
- the name of the company or app to be verified for.
-
getType
- Returns:
- the type of network the verification will be restricted to. This value has no effect unless it has been
enabled by contacting
support@nexmo.com.
-
setType
Deprecated.since 5.5.0 useVerifyRequest.Builderto create a 2FA verification request- Parameters:
type- the type of network the verification will be restricted to. This value has no effect unless it has been enabled by contactingsupport@nexmo.com.- See Also:
VerifyRequest.Builder.type(LineType)
-
getFrom
- Returns:
- the short alphanumeric string to specify the SenderID for SMS sent by Verify, or
nullif one was not provided. This value is specified in someBaseRequestsub-class constructors.If this value is
null</tt>, the sender_id used will be <tt>VERIFY.
-
setFrom
Deprecated.since 5.5.0 useVerifyRequest.Builderto create a 2FA verification request- Parameters:
from- the short alphanumeric string to specify the SenderID for SMS sent by Verify.- See Also:
VerifyRequest.Builder.senderId(String)
-
getWorkflow
- Returns:
- The predefined sequence of SMS and TTS (Text To Speech) actions to use in order to convey the PIN to your user.
-
setWorkflow
Deprecated.since 5.5.0 useVerifyRequest.Builderto create a 2FA verification request- Parameters:
workflow- The workflow to use for conveying the PIN to your user.- See Also:
VerifyRequest.Builder.workflow(Workflow)
-
toString
- Overrides:
toStringin classBaseRequest
-
builder
- Parameters:
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.- Returns:
- A new Builder to start building.
-