Свойство | Тип | Описание | |
---|---|---|---|
$apiBase | string | The API's URL. | |
$callbackOption | string | The callbackOption to receive message delivery notifications. | |
$client | The Guzzle HTTP Client. |
Метод | Описание | |
---|---|---|
__construct ( |
ZenviaSMS constructor. | |
checkMessages ( array $options = [] ) : array | Checks the server for messages and returns their results. | |
getMessage ( integer | string $messageId ) : |
Gets a single message by it's ID. | |
receive ( mixed $raw ) : |
Receives an incoming message via REST call. | |
send ( |
Sends a SMS message. |
Метод | Описание | |
---|---|---|
getRequest ( ) : mixed | Creates and sends a GET request to the requested URL. | |
postRequest ( ) : mixed | Creates and sends a POST request to the requested URL. | |
processReceive ( $rawMessage ) : |
Parse a response from messageId check and returns a Message. |
Метод | Описание | |
---|---|---|
generateMessageBody ( $from, $number, $composeMessage ) : array | Message body generator based on the attributes. |
public __construct ( |
||
$client | ||
$accountKey | ||
$passCode | ||
$callbackOption | string |
public checkMessages ( array $options = [] ) : array | ||
$options | array | |
Результат | array |
public getMessage ( integer | string $messageId ) : |
||
$messageId | integer | string | |
Результат |
protected getRequest ( ) : mixed | ||
Результат | mixed |
protected postRequest ( ) : mixed | ||
Результат | mixed |
protected processReceive ( $rawMessage ) : |
||
$rawMessage | ||
Результат |
public send ( |
||
$message |
protected string $callbackOption | ||
Результат | string |