Package com.vonage.client.verify
Class BaseRequest
java.lang.Object
com.vonage.client.verify.BaseRequest
- All Implemented Interfaces:
QueryParamsRequest
- Direct Known Subclasses:
Psd2Request,VerifyRequest
Base request class for
VerifyRequest and Psd2Request.- Since:
- 5.5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe country for the destination phone number.The wait time between attempts to deliver the PIN.How long the generated verification code is valid for, in seconds.Internal method for serializing the fields of this class into query parameters.toString()
-
Constructor Details
-
BaseRequest
-
-
Method Details
-
getNumber
- Returns:
- the recipient's phone number provided in the constructor, in E.164 format.
-
getLength
- Returns:
- the length of the verification code to be sent to the user, specified in some
VerifyRequestconstructors.-1indicates the default length will be used.
-
getLocale
- Returns:
- the default locale used for verification. If this value is
null, the locale will be determined from the country code included innumber
-
getDashedLocale
- Returns:
- the default locale used for verification in snake case.
Ex:
en-gbIf this value isnull, the locale will be determined from the country code included innumber
-
getCountry
The country for the destination phone number.- Returns:
- a String containing a 2-character country code
-
getPinExpiry
How long the generated verification code is valid for, in seconds. When you specify bothpin_expiryandnext_event_waitthenpin_expirymust be an integer multiple ofnext_event_wait, otherwisepin_expirywill be equal tonext_event_wait.- Returns:
- An Integer between
60and3600, ornull.
-
getNextEventWait
The wait time between attempts to deliver the PIN.- Returns:
- An Integer between
60and900, ornull.
-
toString
-
makeParams
Description copied from interface:QueryParamsRequestInternal method for serializing the fields of this class into query parameters. The Map should be mutable so that subclasses can add fields, otherwise the method or implementing class should be marked asfinal. Duplicate entries can be handled by mapping the key to a list of the entries.- Specified by:
makeParamsin interfaceQueryParamsRequest- Returns:
- The query parameters as unique key-value pairs.
-