Class HostedNumberOrderCreator
- java.lang.Object
-
- com.twilio.base.Creator<HostedNumberOrder>
-
- com.twilio.rest.preview.hostedNumbers.HostedNumberOrderCreator
-
public class HostedNumberOrderCreator extends Creator<HostedNumberOrder>
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
-
-
Constructor Summary
Constructors Constructor Description HostedNumberOrderCreator(PhoneNumber phoneNumber, Boolean smsCapability)
Construct a new HostedNumberOrderCreator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HostedNumberOrder
create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.HostedNumberOrderCreator
setAccountSid(String accountSid)
This defaults to the AccountSid of the authorization the user is using.HostedNumberOrderCreator
setAddressSid(String addressSid)
Optional.HostedNumberOrderCreator
setCcEmails(String ccEmails)
Optional.HostedNumberOrderCreator
setCcEmails(List<String> ccEmails)
Optional.HostedNumberOrderCreator
setEmail(String email)
Optional.HostedNumberOrderCreator
setFriendlyName(String friendlyName)
A 64 character string that is a human readable text that describes this resource..HostedNumberOrderCreator
setSmsApplicationSid(String smsApplicationSid)
Optional.HostedNumberOrderCreator
setSmsFallbackMethod(HttpMethod smsFallbackMethod)
The HTTP method that should be used to request the SmsFallbackUrl.HostedNumberOrderCreator
setSmsFallbackUrl(String smsFallbackUrl)
A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl.HostedNumberOrderCreator
setSmsFallbackUrl(URI smsFallbackUrl)
A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl.HostedNumberOrderCreator
setSmsMethod(HttpMethod smsMethod)
The HTTP method that should be used to request the SmsUrl.HostedNumberOrderCreator
setSmsUrl(String smsUrl)
The URL that Twilio should request when somebody sends an SMS to the phone number.HostedNumberOrderCreator
setSmsUrl(URI smsUrl)
The URL that Twilio should request when somebody sends an SMS to the phone number.HostedNumberOrderCreator
setStatusCallbackMethod(HttpMethod statusCallbackMethod)
Optional.HostedNumberOrderCreator
setStatusCallbackUrl(String statusCallbackUrl)
Optional.HostedNumberOrderCreator
setStatusCallbackUrl(URI statusCallbackUrl)
Optional.HostedNumberOrderCreator
setUniqueName(String uniqueName)
Optional.HostedNumberOrderCreator
setVerificationDocumentSid(String verificationDocumentSid)
Optional.HostedNumberOrderCreator
setVerificationType(HostedNumberOrder.VerificationType verificationType)
Optional.-
Methods inherited from class com.twilio.base.Creator
create, createAsync, createAsync
-
-
-
-
Constructor Detail
-
HostedNumberOrderCreator
public HostedNumberOrderCreator(PhoneNumber phoneNumber, Boolean smsCapability)
Construct a new HostedNumberOrderCreator.- Parameters:
phoneNumber
- An E164 formatted phone number.smsCapability
- Specify SMS capability to host.
-
-
Method Detail
-
setAccountSid
public HostedNumberOrderCreator setAccountSid(String accountSid)
This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to..- Parameters:
accountSid
- Account Sid.- Returns:
- this
-
setFriendlyName
public HostedNumberOrderCreator setFriendlyName(String friendlyName)
A 64 character string that is a human readable text that describes this resource..- Parameters:
friendlyName
- A human readable description of this resource.- Returns:
- this
-
setUniqueName
public HostedNumberOrderCreator setUniqueName(String uniqueName)
Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID..- Parameters:
uniqueName
- A unique, developer assigned name of this HostedNumberOrder.- Returns:
- this
-
setCcEmails
public HostedNumberOrderCreator setCcEmails(List<String> ccEmails)
Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to..- Parameters:
ccEmails
- A list of emails.- Returns:
- this
-
setCcEmails
public HostedNumberOrderCreator setCcEmails(String ccEmails)
Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to..- Parameters:
ccEmails
- A list of emails.- Returns:
- this
-
setSmsUrl
public HostedNumberOrderCreator setSmsUrl(URI smsUrl)
The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource..- Parameters:
smsUrl
- SMS URL.- Returns:
- this
-
setSmsUrl
public HostedNumberOrderCreator setSmsUrl(String smsUrl)
The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource..- Parameters:
smsUrl
- SMS URL.- Returns:
- this
-
setSmsMethod
public HostedNumberOrderCreator setSmsMethod(HttpMethod smsMethod)
The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource..- Parameters:
smsMethod
- SMS Method.- Returns:
- this
-
setSmsFallbackUrl
public HostedNumberOrderCreator setSmsFallbackUrl(URI smsFallbackUrl)
A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource..- Parameters:
smsFallbackUrl
- SMS Fallback URL.- Returns:
- this
-
setSmsFallbackUrl
public HostedNumberOrderCreator setSmsFallbackUrl(String smsFallbackUrl)
A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource..- Parameters:
smsFallbackUrl
- SMS Fallback URL.- Returns:
- this
-
setSmsFallbackMethod
public HostedNumberOrderCreator setSmsFallbackMethod(HttpMethod smsFallbackMethod)
The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource..- Parameters:
smsFallbackMethod
- SMS Fallback Method.- Returns:
- this
-
setStatusCallbackUrl
public HostedNumberOrderCreator setStatusCallbackUrl(URI statusCallbackUrl)
Optional. The Status Callback URL attached to the IncomingPhoneNumber resource..- Parameters:
statusCallbackUrl
- Status Callback URL.- Returns:
- this
-
setStatusCallbackUrl
public HostedNumberOrderCreator setStatusCallbackUrl(String statusCallbackUrl)
Optional. The Status Callback URL attached to the IncomingPhoneNumber resource..- Parameters:
statusCallbackUrl
- Status Callback URL.- Returns:
- this
-
setStatusCallbackMethod
public HostedNumberOrderCreator setStatusCallbackMethod(HttpMethod statusCallbackMethod)
Optional. The Status Callback Method attached to the IncomingPhoneNumber resource..- Parameters:
statusCallbackMethod
- Status Callback Method.- Returns:
- this
-
setSmsApplicationSid
public HostedNumberOrderCreator setSmsApplicationSid(String smsApplicationSid)
Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application..- Parameters:
smsApplicationSid
- SMS Application Sid.- Returns:
- this
-
setAddressSid
public HostedNumberOrderCreator setAddressSid(String addressSid)
Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number..- Parameters:
addressSid
- Address sid.- Returns:
- this
-
setEmail
public HostedNumberOrderCreator setEmail(String email)
Optional. Email of the owner of this phone number that is being hosted..- Parameters:
email
- Email.- Returns:
- this
-
setVerificationType
public HostedNumberOrderCreator setVerificationType(HostedNumberOrder.VerificationType verificationType)
Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill..- Parameters:
verificationType
- Verification Type.- Returns:
- this
-
setVerificationDocumentSid
public HostedNumberOrderCreator setVerificationDocumentSid(String verificationDocumentSid)
Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill..- Parameters:
verificationDocumentSid
- Verification Document Sid- Returns:
- this
-
create
public HostedNumberOrder create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.- Specified by:
create
in classCreator<HostedNumberOrder>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- Created HostedNumberOrder
-
-