Constants

AMCONFIG_AM_ONLY

AMCONFIG_AM_ONLY

AMCONFIG_AM_AND_LIVE

AMCONFIG_AM_AND_LIVE

AMCONFIG_LIVE_WITH_AMD

AMCONFIG_LIVE_WITH_AMD

AMCONFIG_LIVE_IMMEDIATE

AMCONFIG_LIVE_IMMEDIATE

BROADCAST_VOICE

BROADCAST_VOICE

BROADCAST_IVR

BROADCAST_IVR

BROADCAST_TEXT

BROADCAST_TEXT

COMMAND_START

COMMAND_START

COMMAND_STOP

COMMAND_STOP

COMMAND_ARCHIVE

COMMAND_ARCHIVE

EVENT_UNDEFINED_EVENT

EVENT_UNDEFINED_EVENT

EVENT_INBOUND_CALL_FINISHED

EVENT_INBOUND_CALL_FINISHED

EVENT_INBOUND_TEXT_FINISHED

EVENT_INBOUND_TEXT_FINISHED

EVENT_OUTBOUND_CALL_FINISHED

EVENT_OUTBOUND_CALL_FINISHED

EVENT_OUTBOUND_TEXT_FINISHED

EVENT_OUTBOUND_TEXT_FINISHED

EVENT_CAMPAIGN_STARTED

EVENT_CAMPAIGN_STARTED

EVENT_CAMPAIGN_STOPPED

EVENT_CAMPAIGN_STOPPED

EVENT_CAMPAIGN_FINISHED

EVENT_CAMPAIGN_FINISHED

FEATURE_UNSUPPORTED

FEATURE_UNSUPPORTED

FEATURE_PENDING

FEATURE_PENDING

FEATURE_DISABLED

FEATURE_DISABLED

FEATURE_ENABLED

FEATURE_ENABLED

FORMAT_XML

FORMAT_XML

FORMAT_JSON

FORMAT_JSON

FORMAT_SOAP

FORMAT_SOAP

FORMAT_EMAIL

FORMAT_EMAIL

INBOUND_TRACKING

INBOUND_TRACKING

INBOUND_IVR

INBOUND_IVR

RESULT_ANSWER_MACHINE

RESULT_ANSWER_MACHINE

RESULT_BUSY

RESULT_BUSY

RESULT_DO_NOT_CALL

RESULT_DO_NOT_CALL

RESULT_TRANSFER

RESULT_TRANSFER

RESULT_TRANSFER_LEG

RESULT_TRANSFER_LEG

RESULT_NO_ANSWER

RESULT_NO_ANSWER

RESULT_UNDIALED

RESULT_UNDIALED

RESULT_SENT

RESULT_SENT

RESULT_RECEIVED

RESULT_RECEIVED

RESULT_DID_NOT_TRY

RESULT_DID_NOT_TRY

RESULT_TOO_BIG

RESULT_TOO_BIG

RESULT_INTERNAL_ERROR

RESULT_INTERNAL_ERROR

RESULT_CARRIER_ERROR

RESULT_CARRIER_ERROR

RESULT_CARRIER_TEMP_ERROR

RESULT_CARRIER_TEMP_ERROR

STATE_READY

STATE_READY

STATE_SELECTED

STATE_SELECTED

STATE_FINISHED

STATE_FINISHED

STATE_DO_NOT_CALL

STATE_DO_NOT_CALL

STATE_DUPLICATE

STATE_DUPLICATE

STATE_INVALID

STATE_INVALID

STATE_TIMEOUT

STATE_TIMEOUT

STRATEGY_SEND_MULTIPLE

STRATEGY_SEND_MULTIPLE

STRATEGY_DO_NOT_SEND

STRATEGY_DO_NOT_SEND

STRATEGY_TRIM

STRATEGY_TRIM

Properties

$basePath

$basePath

$username

$username

$password

$password

$http

$http

Methods

SendText()

SendText(\CallFire\Api\Rest\Request\SendText $SendText)

Send text message and return broadcastId

Sending a text message requires at least a toNumber and a message. SendText starts a text campaign and returns the broadcastId if campaign is successful started. This returned broadcastId can be passed to QueryTexts to get state of text messages in campaign and get list of individual textId for use in GetText calls. The broadcastId can also be passed to GetBroadcastStats to get information about the text campaign, such as BilledAmount, Duration, State, etc... The industry standard is for text messages to be limited to 160 characters or less. If the message is over 160 characters then a BigMessageStrategy should be selected in the TextBroadcastConfig.

Parameters

\CallFire\Api\Rest\Request\SendText $SendText

= null

QueryTexts()

QueryTexts(\CallFire\Api\Rest\Request\QueryTexts $QueryTexts)

List sent and received text messages

Query for text messages using standard ActionQuery which filters on batchId, broadcastId, toNumber, etc... Returns a list of text messages and all associated info. See GetText to return just a single text action by id.

Parameters

\CallFire\Api\Rest\Request\QueryTexts $QueryTexts

= null

GetText()

GetText(int $Id)

Gets a text message by ID

Return individual text message. See QueryTexts to return a list of text messages and determine individual textIds. General usage is to start a text campaign using SendText, then to pass returned broadcastId to QueryTexts to determine textIds of text messages created. This GetText can then be called with unique textId to determine info and state of text message.

Parameters

int $Id

Unique ID of resource

CreateAutoReply()

CreateAutoReply(\CallFire\Api\Rest\Request\CreateAutoReply $CreateAutoReply)

Configures a new auto-reply

Create and configure new autoreply message for existing Did Auto-Replys are text message replys sent to a customer when a customer replys to a text message from a campaign. A keyword will need to have been purchased before an Auto-Reply can be created.

Parameters

\CallFire\Api\Rest\Request\CreateAutoReply $CreateAutoReply

= null

QueryAutoReplies()

QueryAutoReplies(\CallFire\Api\Rest\Request\QueryAutoReplies $QueryAutoReplies)

Lists configured auto-replies

Query for autoreplies using optional number

Parameters

\CallFire\Api\Rest\Request\QueryAutoReplies $QueryAutoReplies

= null

GetAutoReply()

GetAutoReply(int $Id)

Gets an auto-reply by ID

Returns autoreply by id or error if doesn't exist

Parameters

int $Id

Unique ID of resource

DeleteAutoReply()

DeleteAutoReply(int $Id)

Deletes an auto-reply by ID

Delete autoreply by id if exists. Returns error if doesn't exist

Parameters

int $Id

Unique ID of resource

ns()

ns()

request()

request(string $type) : mixed

Instantiate a request object of the given type

Parameters

string $type

Request type

Returns

mixed —

Request object

response()

response(string $data, string $type) : mixed

Parse a response into a response type

Parameters

string $data

Response data to be parsed

string $type

= 'xml' Response format

Returns

mixed —

Response object

get()

get(string $uri, \CallFire\Api\Rest\Request $request) : string

Execute a GET request against an API endpoint, optionally with a given Request object as parameters

Parameters

string $uri

Endpoint URL

\CallFire\Api\Rest\Request $request

= null Request object for parameters

Returns

string —

Response data

post()

post(string $uri, \CallFire\Api\Rest\Request $request) : string

Execute a POST request against an API endpoint, optionally with a given Request object as parameters

Parameters

string $uri

Endpoint URL

\CallFire\Api\Rest\Request $request

= null Request object for parameters

Returns

string —

Response data

put()

put(string $uri, \CallFire\Api\Rest\Request $request) : string

Execute a PUT request against an API endpoint, optionally with a given Request object as parameters

Parameters

string $uri

Endpoint URL

\CallFire\Api\Rest\Request $request

= null Request object for parameters

Returns

string —

Response data

delete()

delete(string $uri, \CallFire\Api\Rest\Request $request) : string

Execute a DELETE request again an API endpoint, optionally with a given Request object as parameters

Parameters

string $uri

Endpoint URL

\CallFire\Api\Rest\Request $request

= null Request object for parameters

Returns

string —

Response data

buildQuery()

buildQuery(string $uri, array $parameters) : string

Build a request URI for a GET request

Parameters

string $uri

Endpoint URI

array $parameters

Key-value query parameters

Returns

string —

The resulting URL

buildPostData()

buildPostData(array $parameters) : string

Construct the POST fields data for a POST/PUT request, according to CallFire conventions

Reformats any array parameters to be a space-concatenated list of items. Any object parameters will be casted to a string, as possible.

Parameters

array $parameters

POST data

Returns

string —

Encoded POST data

getBasePath()

getBasePath()

setBasePath()

setBasePath( $basePath)

Parameters

$basePath

getUsername()

getUsername()

setUsername()

setUsername( $username)

Parameters

$username

getPassword()

getPassword()

setPassword()

setPassword( $password)

Parameters

$password

getHttpClone()

getHttpClone()

getHttp()

getHttp()

getUri()

getUri( $path,  $parameters)

Parameters

$path
$parameters

updateCredentials()

updateCredentials() : void

Rehashes the HTTP Basic Authentication on the HTTP client