public class Message extends SidResource
Modifier and Type | Class and Description |
---|---|
static class |
Message.Direction |
static class |
Message.Status |
Modifier and Type | Method and Description |
---|---|
static MessageCreator |
create(String accountSid,
PhoneNumber to,
PhoneNumber from,
List<URI> mediaUrl)
Create a MessageCreator to execute create.
|
static MessageCreator |
create(String accountSid,
PhoneNumber to,
PhoneNumber from,
String body)
Create a MessageCreator to execute create.
|
static MessageDeleter |
delete(String accountSid,
String sid)
Create a MessageDeleter to execute delete.
|
boolean |
equals(Object o) |
static MessageFetcher |
fetch(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 |
read(String accountSid)
Create a MessageReader to execute read.
|
String |
toString() |
static MessageUpdater |
update(String accountSid,
String sid)
Create a MessageUpdater to execute update.
|
public static MessageCreator create(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 create(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 MessageDeleter delete(String accountSid, String sid)
accountSid
- The account_sidsid
- The message to deletepublic static MessageFetcher fetch(String accountSid, String sid)
accountSid
- The account_sidsid
- Fetch by unique message Sidpublic static MessageReader read(String accountSid)
accountSid
- The account_sidpublic static MessageUpdater update(String accountSid, String sid)
accountSid
- The account_sidsid
- 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()
getSid
in class SidResource
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.