public class Message extends Resource
Modifier and Type | Class and Description |
---|---|
static class |
Message.Direction |
static class |
Message.Status |
Modifier and Type | Method and Description |
---|---|
static MessageCreator |
creator(PhoneNumber to,
PhoneNumber from,
List<URI> mediaUrl)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(PhoneNumber to,
PhoneNumber from,
String body)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(PhoneNumber to,
String messagingServiceSid,
List<URI> mediaUrl)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(PhoneNumber to,
String messagingServiceSid,
String body)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(String accountSid,
PhoneNumber to,
PhoneNumber from,
List<URI> mediaUrl)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(String accountSid,
PhoneNumber to,
PhoneNumber from,
String body)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(String accountSid,
PhoneNumber to,
String messagingServiceSid,
List<URI> mediaUrl)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(String accountSid,
PhoneNumber to,
String messagingServiceSid,
String body)
Create a MessageCreator to execute create.
|
static MessageDeleter |
deleter(String sid)
Create a MessageDeleter to execute delete.
|
static MessageDeleter |
deleter(String accountSid,
String sid)
Create a MessageDeleter to execute delete.
|
boolean |
equals(Object o) |
static MessageFetcher |
fetcher(String sid)
Create a MessageFetcher to execute fetch.
|
static MessageFetcher |
fetcher(String accountSid,
String sid)
Create a MessageFetcher to execute fetch.
|
static Message |
fromJson(InputStream json,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Message object using the provided
ObjectMapper.
|
static Message |
fromJson(String json,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Message object using the provided ObjectMapper.
|
String |
getAccountSid()
Returns The The unique sid that identifies this account.
|
String |
getApiVersion()
Returns The The version of the Twilio API used to process the message..
|
String |
getBody()
Returns The The text body of the message.
|
org.joda.time.DateTime |
getDateCreated()
Returns The The date this resource was created.
|
org.joda.time.DateTime |
getDateSent()
Returns The The date the message was sent.
|
org.joda.time.DateTime |
getDateUpdated()
Returns The The date this resource was last updated.
|
Message.Direction |
getDirection()
Returns The The direction of the message.
|
Integer |
getErrorCode()
Returns The The error code associated with the message.
|
String |
getErrorMessage()
Returns The Human readable description of the ErrorCode.
|
PhoneNumber |
getFrom()
Returns The The phone number that initiated the message.
|
String |
getNumMedia()
Returns The Number of media files associated with the message.
|
String |
getNumSegments()
Returns The Indicates number of messages used to delivery the body.
|
BigDecimal |
getPrice()
Returns The The amount billed for the message.
|
Currency |
getPriceUnit()
Returns The The currency in which Price is measured.
|
String |
getSid()
Returns The A string that uniquely identifies this message.
|
Message.Status |
getStatus()
Returns The The status of this message.
|
Map<String,String> |
getSubresourceUris()
Returns The The subresource_uris.
|
String |
getTo()
Returns The The phone number that received the message.
|
String |
getUri()
Returns The The URI for this resource.
|
int |
hashCode() |
static MessageReader |
reader()
Create a MessageReader to execute read.
|
static MessageReader |
reader(String accountSid)
Create a MessageReader to execute read.
|
String |
toString() |
static MessageUpdater |
updater(String sid)
Create a MessageUpdater to execute update.
|
static MessageUpdater |
updater(String accountSid,
String sid)
Create a MessageUpdater to execute update.
|
public static MessageCreator creator(String accountSid, PhoneNumber to, PhoneNumber from, String body)
accountSid
- The account_sidto
- The phone number to receive the messagefrom
- The phone number that initiated the messagebody
- The bodypublic static MessageCreator creator(PhoneNumber to, PhoneNumber from, String body)
to
- The phone number to receive the messagefrom
- The phone number that initiated the messagebody
- The bodypublic static MessageCreator creator(String accountSid, PhoneNumber to, PhoneNumber from, List<URI> mediaUrl)
accountSid
- The account_sidto
- The phone number to receive the messagefrom
- The phone number that initiated the messagemediaUrl
- The media_urlpublic static MessageCreator creator(PhoneNumber to, PhoneNumber from, List<URI> mediaUrl)
to
- The phone number to receive the messagefrom
- The phone number that initiated the messagemediaUrl
- The media_urlpublic static MessageCreator creator(String accountSid, PhoneNumber to, String messagingServiceSid, String body)
accountSid
- The account_sidto
- The phone number to receive the messagemessagingServiceSid
- The messaging_service_sidbody
- The bodypublic static MessageCreator creator(PhoneNumber to, String messagingServiceSid, String body)
to
- The phone number to receive the messagemessagingServiceSid
- The messaging_service_sidbody
- The bodypublic static MessageCreator creator(String accountSid, PhoneNumber to, String messagingServiceSid, List<URI> mediaUrl)
accountSid
- The account_sidto
- The phone number to receive the messagemessagingServiceSid
- The messaging_service_sidmediaUrl
- The media_urlpublic static MessageCreator creator(PhoneNumber to, String messagingServiceSid, List<URI> mediaUrl)
to
- The phone number to receive the messagemessagingServiceSid
- The messaging_service_sidmediaUrl
- The media_urlpublic static MessageDeleter deleter(String accountSid, String sid)
accountSid
- The account_sidsid
- The message to deletepublic static MessageDeleter deleter(String sid)
sid
- The message to deletepublic static MessageFetcher fetcher(String accountSid, String sid)
accountSid
- The account_sidsid
- Fetch by unique message Sidpublic static MessageFetcher fetcher(String sid)
sid
- Fetch by unique message Sidpublic static MessageReader reader(String accountSid)
accountSid
- The account_sidpublic static MessageReader reader()
public static MessageUpdater updater(String accountSid, String sid)
accountSid
- The account_sidsid
- The message to redactpublic static MessageUpdater updater(String sid)
sid
- The message to redactpublic static Message fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
json
- Raw JSON StringobjectMapper
- Jackson ObjectMapperpublic static Message fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
json
- Raw JSON InputStreamobjectMapper
- Jackson ObjectMapperpublic final String getAccountSid()
public final String getApiVersion()
public final String getBody()
public final org.joda.time.DateTime getDateCreated()
public final org.joda.time.DateTime getDateUpdated()
public final org.joda.time.DateTime getDateSent()
public final Message.Direction getDirection()
public final Integer getErrorCode()
public final String getErrorMessage()
public final PhoneNumber getFrom()
public final String getNumMedia()
public final String getNumSegments()
public final BigDecimal getPrice()
public final Currency getPriceUnit()
public final String getSid()
public final Message.Status getStatus()
public final Map<String,String> getSubresourceUris()
public final String getTo()
public final String getUri()
Copyright © 2011 Twilio, Inc. All Rights Reserved.