Class VerificationRequest.Builder

java.lang.Object
com.vonage.client.verify2.VerificationRequest.Builder
Enclosing class:
VerificationRequest

public static final class VerificationRequest.Builder extends Object
  • Method Details

    • addWorkflow

      (REQUIRED) Workflows are a sequence of actions that Vonage use to reach the user you wish to verify with a PIN code. Each workflow represents a contact method - typically, the channel and number. A verification request must define at least one workflow. The order in which they are defined is the order in which they will be attempted, until one is successful. The first one you add will be the preferred contact method. Any subsequent ones act as a fallback / backup.
      Parameters:
      workflow - The workflow to add to the list.
      Returns:
      This builder.
    • workflows

      (REQUIRED if addWorkflow(Workflow)) has not been called. Workflows are a sequence of actions that Vonage use to reach the user you wish to verify with a PIN code. Each workflow represents a contact method - typically, the channel and number. A verification request must define at least one workflow. The order in which they are defined is the order in which they will be attempted, until one is successful. The first one you add will be the preferred contact method. Any subsequent ones act as a fallback / backup.
      Parameters:
      workflows - The workflows to use.This will replace the existing list.
      Returns:
      This builder.
    • brand

      (REQUIRED) The brand that is sending the verification request. This is what the user will see when they receive the notification.
      Parameters:
      brand - The brand name.
      Returns:
      This builder.
    • code

      (OPTIONAL) An optional alphanumeric custom code to use, if you don't want Vonage to generate the code. Must be between 4 and 10 alphanumeric characters. This is not used for Silent Auth or Whatsapp Interactive.
      Parameters:
      code - The code to use as a string.
      Returns:
      This builder.
    • codeLength

      public VerificationRequest.Builder codeLength(int codeLength)
      (OPTIONAL) Length of the code to send to the user, must be between 4 and 10 (inclusive). This is not used for Silent Auth or Whatsapp Interactive.
      Parameters:
      codeLength - The verification code length.
      Returns:
      This builder.
    • channelTimeout

      (OPTIONAL) Specifies the wait time in seconds between attempts to delivery the verification code between workflows. Must be between 60 and 900. Default is 300.
      Parameters:
      timeout - The delivery timeout in seconds.
      Returns:
      This builder.
    • locale

      (OPTIONAL) Set the language that this request will be delivered in. Refer to the documentation for a list of supported locales.
      Parameters:
      locale - The language locale.
      Returns:
      This builder.
      Since:
      8.0.0
    • locale

      (OPTIONAL) Set the language that this request will be delivered in.
      Parameters:
      locale - The language locale as a string. This should be a ISO 639-1 code.
      Returns:
      This builder.
      Since:
      8.0.0
      See Also:
    • clientRef

      (OPTIONAL) If this reference is set when the request is sent, it will be included in the callbacks.
      Parameters:
      clientRef - The callback reference for this request.
      Returns:
      This builder.
    • fraudCheck

      public VerificationRequest.Builder fraudCheck(boolean fraudCheck)
      (OPTIONAL) Set this parameter to false to force through the request even if it's blocked by the network's fraud protection. Refer to the documentation for details. This feature must be enabled on your account to take effect.
      Parameters:
      fraudCheck - Whether to enforce network block. Default is true. Set to false to bypass a network block for this request.
      Returns:
      This builder.
    • fraudCheck

      Bypasses the network block used for fraud check. See fraudCheck(boolean).
      Returns:
      This builder.
      See Also:
    • build

      Constructs a VerificationRequest with this builder's properties.
      Returns:
      A new VerificationRequest instance.