Class MessageCreator
- java.lang.Object
-
- com.twilio.base.Creator<Message>
-
- com.twilio.rest.ipmessaging.v1.service.channel.MessageCreator
-
-
Constructor Summary
Constructors Constructor Description MessageCreator(String pathServiceSid, String pathChannelSid, String body)
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 valid JSON string that contains application-specific data..MessageCreator
setFrom(String from)
The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author.-
Methods inherited from class com.twilio.base.Creator
create, createAsync, createAsync
-
-
-
-
Constructor Detail
-
MessageCreator
public MessageCreator(String pathServiceSid, String pathChannelSid, String body)
Construct a new MessageCreator.- Parameters:
pathServiceSid
- The SID of the Service to create the resource underpathChannelSid
- The unique ID of the channel the new resource belongs tobody
- The message to send to the channel
-
-
Method Detail
-
setFrom
public MessageCreator setFrom(String from)
The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`..- Parameters:
from
- The identity of the new message's author- Returns:
- this
-
setAttributes
public MessageCreator setAttributes(String attributes)
A valid JSON string that contains application-specific data..- Parameters:
attributes
- A valid JSON string that contains application-specific data- Returns:
- this
-
create
public Message create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.
-
-