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 pathAccountSid,
PhoneNumber to,
PhoneNumber from,
List<URI> mediaUrl)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(String pathAccountSid,
PhoneNumber to,
PhoneNumber from,
String body)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(String pathAccountSid,
PhoneNumber to,
String messagingServiceSid,
List<URI> mediaUrl)
Create a MessageCreator to execute create.
|
static MessageCreator |
creator(String pathAccountSid,
PhoneNumber to,
String messagingServiceSid,
String body)
Create a MessageCreator to execute create.
|
static MessageDeleter |
deleter(String pathSid)
Create a MessageDeleter to execute delete.
|
static MessageDeleter |
deleter(String pathAccountSid,
String pathSid)
Create a MessageDeleter to execute delete.
|
boolean |
equals(Object o) |
static MessageFetcher |
fetcher(String pathSid)
Create a MessageFetcher to execute fetch.
|
static MessageFetcher |
fetcher(String pathAccountSid,
String pathSid)
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 |
getMessagingServiceSid()
Returns The The messaging_service_sid.
|
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 pathAccountSid)
Create a MessageReader to execute read.
|
String |
toString() |
static MessageUpdater |
updater(String pathSid,
String body)
Create a MessageUpdater to execute update.
|
static MessageUpdater |
updater(String pathAccountSid,
String pathSid,
String body)
Create a MessageUpdater to execute update.
|
public static MessageCreator creator(String pathAccountSid, PhoneNumber to, PhoneNumber from, String body)
pathAccountSid
- 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 pathAccountSid, PhoneNumber to, PhoneNumber from, List<URI> mediaUrl)
pathAccountSid
- 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 pathAccountSid, PhoneNumber to, String messagingServiceSid, String body)
pathAccountSid
- 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 pathAccountSid, PhoneNumber to, String messagingServiceSid, List<URI> mediaUrl)
pathAccountSid
- 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 pathAccountSid, String pathSid)
pathAccountSid
- The account_sidpathSid
- The message to deletepublic static MessageDeleter deleter(String pathSid)
pathSid
- The message to deletepublic static MessageFetcher fetcher(String pathAccountSid, String pathSid)
pathAccountSid
- The account_sidpathSid
- Fetch by unique message Sidpublic static MessageFetcher fetcher(String pathSid)
pathSid
- Fetch by unique message Sidpublic static MessageReader reader(String pathAccountSid)
pathAccountSid
- The account_sidpublic static MessageReader reader()
public static MessageUpdater updater(String pathAccountSid, String pathSid, String body)
pathAccountSid
- The account_sidpathSid
- The message to redactbody
- The bodypublic static MessageUpdater updater(String pathSid, String body)
pathSid
- The message to redactbody
- The bodypublic 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 getMessagingServiceSid()
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 © 2016 Twilio, Inc. All Rights Reserved.