PHP Class SimpleSoftwareIO\SMS\Drivers\ZenviaSMS

Inheritance: extends AbstractSMS, implements SimpleSoftwareIO\SMS\Drivers\DriverInterface
Afficher le fichier Open project: simplesoftwareio/simple-sms

Protected Properties

Свойство Type Description
$apiBase string The API's URL.
$callbackOption string The callbackOption to receive message delivery notifications.
$client GuzzleHttp\Client The Guzzle HTTP Client.

Méthodes publiques

Méthode Description
__construct ( Client $client, $accountKey, $passCode, string $callbackOption = 'NONE' ) ZenviaSMS constructor.
checkMessages ( array $options = [] ) : array Checks the server for messages and returns their results.
getMessage ( integer | string $messageId ) : IncomingMessage Gets a single message by it's ID.
receive ( mixed $raw ) : IncomingMessage Receives an incoming message via REST call.
send ( OutgoingMessage $message ) Sends a SMS message.

Méthodes protégées

Méthode Description
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 ) : IncomingMessage Parse a response from messageId check and returns a Message.

Private Methods

Méthode Description
generateMessageBody ( $from, $number, $composeMessage ) : array Message body generator based on the attributes.

Method Details

__construct() public méthode

ZenviaSMS constructor.
public __construct ( Client $client, $accountKey, $passCode, string $callbackOption = 'NONE' )
$client GuzzleHttp\Client
$accountKey
$passCode
$callbackOption string

checkMessages() public méthode

Checks the server for messages and returns their results.
public checkMessages ( array $options = [] ) : array
$options array
Résultat array

getMessage() public méthode

Gets a single message by it's ID.
public getMessage ( integer | string $messageId ) : IncomingMessage
$messageId integer | string
Résultat SimpleSoftwareIO\SMS\IncomingMessage

getRequest() protected méthode

Creates and sends a GET request to the requested URL.
protected getRequest ( ) : mixed
Résultat mixed

postRequest() protected méthode

Creates and sends a POST request to the requested URL.
protected postRequest ( ) : mixed
Résultat mixed

processReceive() protected méthode

Parse a response from messageId check and returns a Message.
protected processReceive ( $rawMessage ) : IncomingMessage
$rawMessage
Résultat SimpleSoftwareIO\SMS\IncomingMessage

receive() public méthode

Contact Zenvia Support to get this enabled to your account before using.
public receive ( mixed $raw ) : IncomingMessage
$raw mixed
Résultat SimpleSoftwareIO\SMS\IncomingMessage

send() public méthode

Sends a SMS message.
public send ( OutgoingMessage $message )
$message SimpleSoftwareIO\SMS\OutgoingMessage

Property Details

$apiBase protected_oe property

The API's URL.
protected string $apiBase
Résultat string

$callbackOption protected_oe property

The callbackOption to receive message delivery notifications.
protected string $callbackOption
Résultat string

$client protected_oe property

The Guzzle HTTP Client.
protected Client,GuzzleHttp $client
Résultat GuzzleHttp\Client