\Clx\Xms\ApiMtBatchTextSmsCreate

Class whose fields describe a text batch.

We can create two kinds of batches, textual and binary, described in the child classes MtBatchTextSmsCreate and MtBatchBinarySmsCreate, respectively.

Summary

Methods
Properties
Constants
getTags()
setTags()
getRecipients()
setRecipients()
getSender()
setSender()
getDeliveryReport()
setDeliveryReport()
getSendAt()
setSendAt()
getExpireAt()
setExpireAt()
getCallbackUrl()
setCallbackUrl()
getBody()
setBody()
getParameters()
setParameters()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getTags()

getTags() : array<mixed,string>

Get the initial set of tags to give the batch.

Returns

array<mixed,string> —

batch tags

setTags()

setTags(array<mixed,string>  $tags) : void

Set the initial set of tags to give the batch.

Parameters

array<mixed,string> $tags

batch tags

getRecipients()

getRecipients() : array<mixed,string>

Get the batch recipients.

Returns

array<mixed,string> —

one or more MSISDNs

setRecipients()

setRecipients(array<mixed,string>  $recipients) : void

Set the batch recipients.

Parameters

array<mixed,string> $recipients

one or more MSISDNs

getSender()

getSender() : string

Get the batch sender.

Returns

string —

a short code or long number

setSender()

setSender(string  $sender) : void

Set the batch sender.

Parameters

string $sender

a short code or long number

getDeliveryReport()

getDeliveryReport() : \Clx\Xms\Api\ReportType

Get the type of delivery report to use for this batch.

Returns

\Clx\Xms\Api\ReportType

the report type

setDeliveryReport()

setDeliveryReport(\Clx\Xms\Api\ReportType  $deliveryReport) : void

Set the type of delivery report to use for this batch.

Parameters

\Clx\Xms\Api\ReportType $deliveryReport

the report type

getSendAt()

getSendAt() : \DateTime

Get the time at which this batch should be sent.

Returns

\DateTime —

the send date and time

setSendAt()

setSendAt(\DateTime  $sendAt) : void

Set the time at which this batch should be sent.

Parameters

\DateTime $sendAt

the send date and time

getExpireAt()

getExpireAt() : \DateTime

Get the time at which this batch should expire.

Returns

\DateTime —

the expiry date and time

setExpireAt()

setExpireAt(\DateTime  $expireAt) : void

Set the time at which this batch should expire.

Parameters

\DateTime $expireAt

the expiry date and time

getCallbackUrl()

getCallbackUrl() : string

Get the URL to which callbacks should be sent.

Returns

string —

a valid URL

setCallbackUrl()

setCallbackUrl(string  $callbackUrl) : void

Set the URL to which callbacks should be sent.

Parameters

string $callbackUrl

a valid URL

getBody()

getBody() : string

Get the message body or template.

Returns

string —

the textual batch message

setBody()

setBody(string  $body) : void

Set the message body or template.

Parameters

string $body

the textual batch message

getParameters()

getParameters() : array<mixed,>

Get the template parameters.

Returns

array<mixed,> —

template parameters

setParameters()

setParameters(array<mixed,>  $parameters) : void

Set the template parameters.

This property is only relevant if the message body is a template. This is expected to be an associative array mapping parameter keys to associative arrays themselves mapping recipient numbers to substitution strings.

More concretely we may have for the parameterized message "Hello, ${name}!" have

$parameters = [
    'name' => [
        '123456789' => 'Mary',
        '987654321' => 'Joe',
        'default' => 'valued customer'
    ]
];

And the recipient with MSISDN "123456789" would then receive the message "Hello, Mary!".

Note the use of "default" to indicate the substitution for recipients not explicitly given. For example, the recipient "555555555" would receive the message "Hello, valued customer!".

Parameters

array<mixed,> $parameters

the template parameter definition