Class ValidationRequestCreator

    • Constructor Detail

      • ValidationRequestCreator

        public ValidationRequestCreator​(PhoneNumber phoneNumber)
        Construct a new ValidationRequestCreator.
        Parameters:
        phoneNumber - The phone number to verify in E.164 format
      • ValidationRequestCreator

        public ValidationRequestCreator​(String pathAccountSid,
                                        PhoneNumber phoneNumber)
        Construct a new ValidationRequestCreator.
        Parameters:
        pathAccountSid - The SID of the Account responsible for the new Caller ID
        phoneNumber - The phone number to verify in E.164 format
    • Method Detail

      • setFriendlyName

        public ValidationRequestCreator setFriendlyName​(String friendlyName)
        A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number..
        Parameters:
        friendlyName - A string to describe the resource
        Returns:
        this
      • setCallDelay

        public ValidationRequestCreator setCallDelay​(Integer callDelay)
        The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`..
        Parameters:
        callDelay - The number of seconds to delay before initiating the verification call
        Returns:
        this
      • setExtension

        public ValidationRequestCreator setExtension​(String extension)
        The digits to dial after connecting the verification call..
        Parameters:
        extension - The digits to dial after connecting the verification call
        Returns:
        this
      • setStatusCallback

        public ValidationRequestCreator setStatusCallback​(URI statusCallback)
        The URL we should call using the `status_callback_method` to send status information about the verification process to your application..
        Parameters:
        statusCallback - The URL we should call to send status information to your application
        Returns:
        this
      • setStatusCallback

        public ValidationRequestCreator setStatusCallback​(String statusCallback)
        The URL we should call using the `status_callback_method` to send status information about the verification process to your application..
        Parameters:
        statusCallback - The URL we should call to send status information to your application
        Returns:
        this
      • setStatusCallbackMethod

        public ValidationRequestCreator setStatusCallbackMethod​(HttpMethod statusCallbackMethod)
        The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`..
        Parameters:
        statusCallbackMethod - The HTTP method we should use to call status_callback
        Returns:
        this