Package com.vonage.client.verify2
Class VerificationRequest
java.lang.Object
com.vonage.client.verify2.VerificationRequest
- All Implemented Interfaces:
Jsonable
Defines properties for a verify request to be sent to the user. Such properties include the brand
(i.e. the sender that the user sees asking them for verification), language to send the message in,
length of the verification code and timeout between delivery channel workflows.
A verification request can have multiple "workflows". Each workflow defines a contact method for verification. The order of workflows defines the order in which each contact method will be attempted. Once a contact method has succeeded, the remaining workflows will be aborted. This flexibility exists as a fallback / backup verification. A different communication channel and/or number can be contacted if desired.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic VerificationRequest.Builderbuilder()Entry point for constructing an instance of this class.getBrand()The brand that is sending the verification request.Specifies the wait time in seconds between attempts to delivery the verification code.If the client_ref is set when the request is sent, it will be included in the callbacks.getCode()Custom alphanumeric verification code to send to the user instead of the Vonage-generated one.Length of the code to send to the user.Determines if the network level fraud check is enforced.Language for the request in ISO_639-1 format.protected StringWorkflows are a sequence of actions that Vonage use to reach the user you wish to verify with a PIN code.booleanDetermines if the workflows defined in this request do not prompt the user for code entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vonage.client.Jsonable
toJson, updateFromJson
-
Field Details
-
locale
-
channelTimeout
-
codeLength
-
fraudCheck
-
brand
-
code
-
clientRef
-
workflows
-
-
Method Details
-
getBrand
The brand that is sending the verification request. This is what the user will see when they receive the notification.- Returns:
- The verification sender name.
-
getLocale
Language for the request in ISO_639-1 format.- Returns:
- The locale, or
nullif not set (the default).
-
getLocaleAsString
-
getChannelTimeout
Specifies the wait time in seconds between attempts to delivery the verification code.- Returns:
- The delivery timeout, or
nullif not set (the default).
-
getCodeLength
Length of the code to send to the user. Does not apply to codeless verification channels.- Returns:
- The verification code length, or
nullif unset (the default) or not applicable.
-
getCode
Custom alphanumeric verification code to send to the user instead of the Vonage-generated one.- Returns:
- The custom code, or
nullif unset.
-
getClientRef
If the client_ref is set when the request is sent, it will be included in the callbacks.- Returns:
- The client reference, or
nullif not set.
-
getFraudCheck
Determines if the network level fraud check is enforced. See the documentation. This feature only takes effect if it has been enabled on your account.- Returns:
- Whether network block is respected, or
nullif not set ortrue(the default).
-
getWorkflows
Workflows are a sequence of actions that Vonage use to reach the user you wish to verify with a PIN code.- Returns:
- The list of workflows (contact methods) to be used in verification, in order of preference.
-
isCodeless
Determines if the workflows defined in this request do not prompt the user for code entry.- Returns:
trueif all the defined workflows do not require a code orfalseif at least one of the contact methods involves a code being sent to the user.
-
builder
Entry point for constructing an instance of this class.- Returns:
- A new Builder.
-