Class ValidationRequestCreator
- java.lang.Object
-
- com.twilio.base.Creator<ValidationRequest>
-
- com.twilio.rest.api.v2010.account.ValidationRequestCreator
-
public class ValidationRequestCreator extends Creator<ValidationRequest>
-
-
Constructor Summary
Constructors Constructor Description ValidationRequestCreator(PhoneNumber phoneNumber)
Construct a new ValidationRequestCreator.ValidationRequestCreator(String pathAccountSid, PhoneNumber phoneNumber)
Construct a new ValidationRequestCreator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidationRequest
create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.ValidationRequestCreator
setCallDelay(Integer callDelay)
The number of seconds to delay before initiating the verification call.ValidationRequestCreator
setExtension(String extension)
The digits to dial after connecting the verification call..ValidationRequestCreator
setFriendlyName(String friendlyName)
A descriptive string that you create to describe the new caller ID resource.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..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..ValidationRequestCreator
setStatusCallbackMethod(HttpMethod statusCallbackMethod)
The HTTP method we should use to call `status_callback`.-
Methods inherited from class com.twilio.base.Creator
create, createAsync, createAsync
-
-
-
-
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 IDphoneNumber
- 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
-
create
public ValidationRequest create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.- Specified by:
create
in classCreator<ValidationRequest>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- Created ValidationRequest
-
-