Class BaseRequest

java.lang.Object
com.vonage.client.verify.BaseRequest
All Implemented Interfaces:
QueryParamsRequest
Direct Known Subclasses:
Psd2Request, VerifyRequest

public abstract class BaseRequest extends Object implements QueryParamsRequest
Base request class for VerifyRequest and Psd2Request.
Since:
5.5.0
  • Constructor Details

  • Method Details

    • getNumber

      public String getNumber()
      Returns:
      the recipient's phone number provided in the constructor, in E.164 format.
    • getLength

      public Integer getLength()
      Returns:
      the length of the verification code to be sent to the user, specified in some VerifyRequest constructors. -1 indicates the default length will be used.
    • getLocale

      public Locale getLocale()
      Returns:
      the default locale used for verification. If this value is null, the locale will be determined from the country code included in number
    • getDashedLocale

      Returns:
      the default locale used for verification in snake case. Ex: en-gb If this value is null, the locale will be determined from the country code included in number
    • getCountry

      public String 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 both pin_expiry and next_event_wait then pin_expiry must be an integer multiple of next_event_wait, otherwise pin_expiry will be equal to next_event_wait.
      Returns:
      An Integer between 60 and 3600, or null.
    • getNextEventWait

      The wait time between attempts to deliver the PIN.
      Returns:
      An Integer between 60 and 900, or null.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • makeParams

      Description copied from interface: QueryParamsRequest
      Internal 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 as final. Duplicate entries can be handled by mapping the key to a list of the entries.
      Specified by:
      makeParams in interface QueryParamsRequest
      Returns:
      The query parameters as unique key-value pairs.