public class SMSMessage extends Object implements Serializable
| Constructor and Description |
|---|
SMSMessage() |
| Modifier and Type | Method and Description |
|---|---|
SMSMessage |
addSubstitutionsEntry(String key,
List<String> value)
Default message substitutions.
|
SMSMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
boolean |
equals(Object obj) |
String |
getBody()
The message body of the notification, the email body or the text message.
|
String |
getMessageType()
Is this a transaction priority message or lower priority.
|
String |
getSenderId()
Sender ID of sent message.
|
Map<String,List<String>> |
getSubstitutions()
Default message substitutions.
|
int |
hashCode() |
void |
setBody(String body)
The message body of the notification, the email body or the text message.
|
void |
setMessageType(MessageType messageType)
Is this a transaction priority message or lower priority.
|
void |
setMessageType(String messageType)
Is this a transaction priority message or lower priority.
|
void |
setSenderId(String senderId)
Sender ID of sent message.
|
void |
setSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SMSMessage |
withBody(String body)
The message body of the notification, the email body or the text message.
|
SMSMessage |
withMessageType(MessageType messageType)
Is this a transaction priority message or lower priority.
|
SMSMessage |
withMessageType(String messageType)
Is this a transaction priority message or lower priority.
|
SMSMessage |
withSenderId(String senderId)
Sender ID of sent message.
|
SMSMessage |
withSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
public String getBody()
public void setBody(String body)
body - The message body of the notification, the email body or the
text message.public SMSMessage withBody(String body)
Returns a reference to this object so that method calls can be chained together.
body - The message body of the notification, the email body or the
text message.public String getMessageType()
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
MessageTypepublic void setMessageType(String messageType)
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
messageType - Is this a transaction priority message or lower
priority.MessageTypepublic SMSMessage withMessageType(String messageType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
messageType - Is this a transaction priority message or lower
priority.MessageTypepublic void setMessageType(MessageType messageType)
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
messageType - Is this a transaction priority message or lower
priority.MessageTypepublic SMSMessage withMessageType(MessageType messageType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
messageType - Is this a transaction priority message or lower
priority.MessageTypepublic String getSenderId()
public void setSenderId(String senderId)
senderId - Sender ID of sent message.public SMSMessage withSenderId(String senderId)
Returns a reference to this object so that method calls can be chained together.
senderId - Sender ID of sent message.public Map<String,List<String>> getSubstitutions()
public void setSubstitutions(Map<String,List<String>> substitutions)
substitutions - Default message substitutions. Can be overridden by
individual address substitutions.public SMSMessage withSubstitutions(Map<String,List<String>> substitutions)
Returns a reference to this object so that method calls can be chained together.
substitutions - Default message substitutions. Can be overridden by
individual address substitutions.public SMSMessage addSubstitutionsEntry(String key, List<String> value)
The method adds a new key-value pair into Substitutions parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into Substitutions.value - The corresponding value of the entry to be added into
Substitutions.public SMSMessage clearSubstitutionsEntries()
Returns a reference to this object so that method calls can be chained together.
public String toString()
toString in class ObjectObject.toString()Copyright © 2018. All rights reserved.