@Value.Immutable public abstract class MtBatchTextSmsCreate extends MtBatchSmsCreate
A minimal definition has defined values for
Modifier and Type | Class and Description |
---|---|
static class |
MtBatchTextSmsCreate.Builder
A builder of textual batch messages.
|
Constructor and Description |
---|
MtBatchTextSmsCreate() |
Modifier and Type | Method and Description |
---|---|
abstract String |
body()
The message text or template.
|
static MtBatchTextSmsCreate.Builder |
builder()
Creates a builder of
MtBatchTextSmsCreate instances. |
abstract Map<String,ParameterValues> |
parameters()
The message template parameter substitutions.
|
callbackUrl, check, deliveryReport, expireAt, recipients, sendAt, sender, tags
@Nonnull public static final MtBatchTextSmsCreate.Builder builder()
MtBatchTextSmsCreate
instances.public abstract String body()
parameters()
must describe the parameter substitutions.
A parameterized message is a regular text message but having one or more
named parameters embedded using the syntax ${parameter_key}
where parameter_key
is your chosen parameter name. When the
messaging system is sending the message the template will be expanded and
any occurrence of ${parameter_key}
in the message body is
replaced by the parameter value for the message recipient.
The typical way to use templates is
ClxApi.batchTextSms() .sender("12345") .addRecipient("987654321") // Other initialization .body("Hello, ${name}") .putParameter("name", ClxApi.parameterValues() .putSubstitution("987654321", "Jane") .default("valued customer") .build()) .build();and here the recipient with MSISDN 987654321 will receive the message "Hello, Jane" while all other recipients would receive "Hello, valued customer".
public abstract Map<String,ParameterValues> parameters()
body()
describes a template then this must return the necessary substitutions
for all template parameters.body()
Copyright © 2016–2019 CLX Communications. All rights reserved.