Constructor and Description |
---|
MessageCreator(PhoneNumber to,
PhoneNumber from,
List<URI> mediaUrl)
Construct a new MessageCreator.
|
MessageCreator(PhoneNumber to,
PhoneNumber from,
String body)
Construct a new MessageCreator.
|
MessageCreator(PhoneNumber to,
String messagingServiceSid,
List<URI> mediaUrl)
Construct a new MessageCreator.
|
MessageCreator(PhoneNumber to,
String messagingServiceSid,
String body)
Construct a new MessageCreator.
|
MessageCreator(String pathAccountSid,
PhoneNumber to,
PhoneNumber from,
List<URI> mediaUrl)
Construct a new MessageCreator.
|
MessageCreator(String pathAccountSid,
PhoneNumber to,
PhoneNumber from,
String body)
Construct a new MessageCreator.
|
MessageCreator(String pathAccountSid,
PhoneNumber to,
String messagingServiceSid,
List<URI> mediaUrl)
Construct a new MessageCreator.
|
MessageCreator(String pathAccountSid,
PhoneNumber to,
String messagingServiceSid,
String body)
Construct a new MessageCreator.
|
Modifier and Type | Method and Description |
---|---|
Message |
create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.
|
MessageCreator |
setAddressRetention(Message.AddressRetention addressRetention)
Determines if the address can be stored or obfuscated based on privacy
settings.
|
MessageCreator |
setApplicationSid(String applicationSid)
The SID of the application that should receive message status.
|
MessageCreator |
setAttempt(Integer attempt)
Total number of attempts made ( including this ) to send out the message
regardless of the provider used.
|
MessageCreator |
setBody(String body)
The text of the message you want to send.
|
MessageCreator |
setContentRetention(Message.ContentRetention contentRetention)
Determines if the message content can be stored or redacted based on privacy
settings.
|
MessageCreator |
setForceDelivery(Boolean forceDelivery)
Reserved.
|
MessageCreator |
setFrom(PhoneNumber from)
A Twilio phone number in
[E.164](https://www.twilio.com/docs/glossary/what-e164) format, an
[alphanumeric sender
ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send.
|
MessageCreator |
setFrom(String from)
A Twilio phone number in
[E.164](https://www.twilio.com/docs/glossary/what-e164) format, an
[alphanumeric sender
ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send.
|
MessageCreator |
setMaxPrice(BigDecimal maxPrice)
The maximum total price in US dollars that you will pay for the message to be
delivered.
|
MessageCreator |
setMediaUrl(List<URI> mediaUrl)
The URL of the media to send with the message.
|
MessageCreator |
setMediaUrl(String mediaUrl)
The URL of the media to send with the message.
|
MessageCreator |
setMediaUrl(URI mediaUrl)
The URL of the media to send with the message.
|
MessageCreator |
setMessagingServiceSid(String messagingServiceSid)
The SID of the [Messaging
Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message.
|
MessageCreator |
setPersistentAction(List<String> persistentAction)
Rich actions for Channels Messages..
|
MessageCreator |
setPersistentAction(String persistentAction)
Rich actions for Channels Messages..
|
MessageCreator |
setProvideFeedback(Boolean provideFeedback)
Whether to confirm delivery of the message.
|
MessageCreator |
setSmartEncoded(Boolean smartEncoded)
Whether to detect Unicode characters that have a similar GSM-7 character and
replace them.
|
MessageCreator |
setStatusCallback(String statusCallback)
The URL we should call using the `status_callback_method` to send status
information to your application.
|
MessageCreator |
setStatusCallback(URI statusCallback)
The URL we should call using the `status_callback_method` to send status
information to your application.
|
MessageCreator |
setValidityPeriod(Integer validityPeriod)
How long in seconds the message can remain in our outgoing message queue.
|
create, createAsync, createAsync
public MessageCreator(PhoneNumber to, PhoneNumber from, String body)
to
- The destination phone numberfrom
- The phone number that initiated the messagebody
- The text of the message you want to send. Can be up to 1,600
characters in length.public MessageCreator(String pathAccountSid, PhoneNumber to, PhoneNumber from, String body)
pathAccountSid
- The SID of the Account that will create the resourceto
- The destination phone numberfrom
- The phone number that initiated the messagebody
- The text of the message you want to send. Can be up to 1,600
characters in length.public MessageCreator(PhoneNumber to, PhoneNumber from, List<URI> mediaUrl)
to
- The destination phone numberfrom
- The phone number that initiated the messagemediaUrl
- The URL of the media to send with the messagepublic MessageCreator(String pathAccountSid, PhoneNumber to, PhoneNumber from, List<URI> mediaUrl)
pathAccountSid
- The SID of the Account that will create the resourceto
- The destination phone numberfrom
- The phone number that initiated the messagemediaUrl
- The URL of the media to send with the messagepublic MessageCreator(PhoneNumber to, String messagingServiceSid, String body)
to
- The destination phone numbermessagingServiceSid
- The SID of the Messaging Service you want to
associate with the message.body
- The text of the message you want to send. Can be up to 1,600
characters in length.public MessageCreator(String pathAccountSid, PhoneNumber to, String messagingServiceSid, String body)
pathAccountSid
- The SID of the Account that will create the resourceto
- The destination phone numbermessagingServiceSid
- The SID of the Messaging Service you want to
associate with the message.body
- The text of the message you want to send. Can be up to 1,600
characters in length.public MessageCreator(PhoneNumber to, String messagingServiceSid, List<URI> mediaUrl)
to
- The destination phone numbermessagingServiceSid
- The SID of the Messaging Service you want to
associate with the message.mediaUrl
- The URL of the media to send with the messagepublic MessageCreator(String pathAccountSid, PhoneNumber to, String messagingServiceSid, List<URI> mediaUrl)
pathAccountSid
- The SID of the Account that will create the resourceto
- The destination phone numbermessagingServiceSid
- The SID of the Messaging Service you want to
associate with the message.mediaUrl
- The URL of the media to send with the messagepublic MessageCreator setStatusCallback(URI statusCallback)
statusCallback
- The URL we should call to send status information to
your applicationpublic MessageCreator setStatusCallback(String statusCallback)
statusCallback
- The URL we should call to send status information to
your applicationpublic MessageCreator setApplicationSid(String applicationSid)
applicationSid
- The application to use for callbackspublic MessageCreator setMaxPrice(BigDecimal maxPrice)
maxPrice
- The total maximum price up to 4 decimal places in US dollars
acceptable for the message to be delivered.public MessageCreator setProvideFeedback(Boolean provideFeedback)
provideFeedback
- Whether to confirm delivery of the messagepublic MessageCreator setAttempt(Integer attempt)
attempt
- Total numer of attempts made , this inclusive to send out the
messagepublic MessageCreator setValidityPeriod(Integer validityPeriod)
validityPeriod
- The number of seconds that the message can remain in
our outgoing queue.public MessageCreator setForceDelivery(Boolean forceDelivery)
forceDelivery
- Reservedpublic MessageCreator setContentRetention(Message.ContentRetention contentRetention)
contentRetention
- Determines if the message content can be stored or
redacted based on privacy settingspublic MessageCreator setAddressRetention(Message.AddressRetention addressRetention)
addressRetention
- Determines if the address can be stored or
obfuscated based on privacy settingspublic MessageCreator setSmartEncoded(Boolean smartEncoded)
smartEncoded
- Whether to detect Unicode characters that have a similar
GSM-7 character and replace thempublic MessageCreator setPersistentAction(List<String> persistentAction)
persistentAction
- Rich actions for Channels Messages.public MessageCreator setPersistentAction(String persistentAction)
persistentAction
- Rich actions for Channels Messages.public MessageCreator setFrom(PhoneNumber from)
from
- The phone number that initiated the messagepublic MessageCreator setFrom(String from)
from
- The phone number that initiated the messagepublic MessageCreator setMessagingServiceSid(String messagingServiceSid)
messagingServiceSid
- The SID of the Messaging Service you want to
associate with the message.public MessageCreator setBody(String body)
body
- The text of the message you want to send. Can be up to 1,600
characters in length.public MessageCreator setMediaUrl(List<URI> mediaUrl)
mediaUrl
- The URL of the media to send with the messagepublic MessageCreator setMediaUrl(URI mediaUrl)
mediaUrl
- The URL of the media to send with the messagepublic MessageCreator setMediaUrl(String mediaUrl)
mediaUrl
- The URL of the media to send with the messagepublic Message create(TwilioRestClient client)
Copyright © 2019 Twilio, Inc. All Rights Reserved.