VERSION
VERSION
The wrapper version.
The wrapper version number.
Message management web service.
setWebServicesServer(string $wsserver)
Set the web services server address.
This allows the web service requests to be directed to a specific server. The default is https://ws-<cloud_id>.aculabcloud.net
string | $wsserver | The base URL of the web services server. |
setCryptoMethod(integer $method)
Set the crypto method used when connectiing to the web services server.
This allows a specific crypto method to be used when connecting to the web service server. The values should be one of the STREAM_CRYPTO_METHOD_TLSv1_N_CLIENT constants. The default is STREAM_CRYPTO_METHOD_ANY_CLIENT.
integer | $method | The crypto method to use. |
sendMessage(\Aculab\WebServicesWrapper\Message $message) : array
Send an SMS/MMS message.
This queues an outbound SMS/MMS message for sending.
\Aculab\WebServicesWrapper\Message | $message | The message to queue for sending. |
Returns an array of one or more unique message reference ID strings.
If your content was short enough to fit into a single message then this will return a single reference ID. Otherwise, your message will have been split into two or more separate message parts, and a reference ID string will be returned for each one.
cancelMessage(array|string $message_ids) : array
Cancel a queued SMS/MMS message.
This attempts to cancel one or more messages that have been queued for sending. Once a message has been taken off the queue to be sent, it cannot be cancelled. To cancel a message which was split into two or more underlying messages, you need supply only one of its message_refs and, if all its underlying messages are queued, they will be cancelled.
array|string | $message_ids | An array of message IDs or a single message ID. |
Returns an array, keyed by message ID, containing the cancellation status, The cancellation status is one of "success", "unknown", or "failed".
"success" indicates that the message has been cancelled. "failed" indicates that the message reference was recognised but its message couldn't be cancelled, generally because it has already been sent. "unknown" indicates that the message reference was not recognised, either because it was incorrect or has expired.
messageStatus(array|string $message_ids) : array
Get the status of an SMS/MMS message.
This retrieves the status of one or more messages given their message reference IDs.
array|string | $message_ids | An array of message IDs or a single message ID. |
Returns an array of MessageStatus objects, keyed by message ID.
listBlockedTo(string $to) : array
Get numbers blocked from sending to a number.
This lists all your numbers which are blocked for sending to this number.
string | $to | A mobile number. |
Returns an array of MessageBlockedDetails objects.
listBlockedFrom(string $from) : array
Get numbers blocked from receiving from a number.
This lists all mobile numbers which the $from number is blocked for sending to.
string | $from | One of your numbers. |
Returns an array of MessageBlockedDetails objects.