\Clx\Xms\ApiGroupAutoUpdate

A description of automatic group updates.

An automatic update is triggered by a mobile originated message to a given number containing special keywords.

The possible actions are to add or remove the sending number to or from the group, respectively.

Summary

Methods
Properties
Constants
__construct()
getRecipient()
getAddFirstWord()
getAddSecondWord()
getRemoveFirstWord()
getRemoveSecondWord()
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

__construct()

__construct(string  $recipient, array<mixed,string>  $addWordPair = array(null, null), array<mixed,string>  $removeWordPair = array(null, null)) 

Creates a new group auto update rule.

When the given recipient receives a mobile originated SMS containing keywords (first and/or second) matching the given add pair then the sender MSISDN is added to the group. Similarly, if the MO is matching the given remove keyword pair then the MSISDN is removed from the group.

The add and remove keyword pair may contain null for those keywords that should not be considered. For example,

new GroupAutoUpdate('12345', ['add', null], ['remove', null])

or equivalently

new GroupAutoUpdate('12345', ['add'], ['remove'])

would trigger based solely on the first keyword of the MO message. On the other hand,

new GroupAutoUpdate('12345', ['alert', 'add'], ['alert', 'remove'])

would trigger only when both keywords are given in the MO message.

Parameters

string $recipient

recipient that triggers this rule

array<mixed,string> $addWordPair

pair containing the add keywords

array<mixed,string> $removeWordPair

pair containing the remove keywords

getRecipient()

getRecipient() : string

Get the recipient of the mobile originated message.

Returns

string —

a short code or long number

getAddFirstWord()

getAddFirstWord() : string|null

Get first keyword that will trigger adding the sender to the group.

A null value indicates that this keyword is not used.

Returns

string|null —

a keyword

getAddSecondWord()

getAddSecondWord() : string|null

Get second keyword that will trigger adding the sender to the group.

A null value indicates that this keyword is not used.

Returns

string|null —

a keyword

getRemoveFirstWord()

getRemoveFirstWord() : string|null

Get first keyword that will trigger removing the sender from the group.

A null value indicates that this keyword is not used.

Returns

string|null —

a keyword

getRemoveSecondWord()

getRemoveSecondWord() : string|null

Get second keyword that will trigger removing the sender from the group.

A null value indicates that this keyword is not used.

Returns

string|null —

a keyword