Class MessageCreator
- java.lang.Object
-
- com.twilio.base.Creator<Message>
-
- com.twilio.rest.conversations.v1.conversation.MessageCreator
-
public class MessageCreator extends Creator<Message>
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 MessageCreator(String pathConversationSid)
Construct a new MessageCreator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Message
create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.MessageCreator
setAttributes(String attributes)
A string metadata field you can use to store any data you wish.MessageCreator
setAuthor(String author)
The channel specific identifier of the message's author.MessageCreator
setBody(String body)
The content of the message, can be up to 1,600 characters long..MessageCreator
setDateCreated(org.joda.time.DateTime dateCreated)
The date that this resource was created..MessageCreator
setDateUpdated(org.joda.time.DateTime dateUpdated)
The date that this resource was last updated.-
Methods inherited from class com.twilio.base.Creator
create, createAsync, createAsync
-
-
-
-
Constructor Detail
-
MessageCreator
public MessageCreator(String pathConversationSid)
Construct a new MessageCreator.- Parameters:
pathConversationSid
- The unique id of the Conversation for this message.
-
-
Method Detail
-
setAuthor
public MessageCreator setAuthor(String author)
The channel specific identifier of the message's author. Defaults to `system`..- Parameters:
author
- The channel specific identifier of the message's author.- Returns:
- this
-
setBody
public MessageCreator setBody(String body)
The content of the message, can be up to 1,600 characters long..- Parameters:
body
- The content of the message.- Returns:
- this
-
setDateCreated
public MessageCreator setDateCreated(org.joda.time.DateTime dateCreated)
The date that this resource was created..- Parameters:
dateCreated
- The date that this resource was created.- Returns:
- this
-
setDateUpdated
public MessageCreator setDateUpdated(org.joda.time.DateTime dateUpdated)
The date that this resource was last updated. `null` if the message has not been edited..- Parameters:
dateUpdated
- The date that this resource was last updated.- Returns:
- this
-
setAttributes
public MessageCreator setAttributes(String attributes)
A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned..- Parameters:
attributes
- A string metadata field you can use to store any data you wish.- Returns:
- this
-
create
public Message create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.
-
-