Class 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 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
      • create

        public Message create​(TwilioRestClient client)
        Make the request to the Twilio API to perform the create.
        Specified by:
        create in class Creator<Message>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Created Message