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

CreateSubscription()

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

Creates a new subscription for CallFire event notifications

CreateSubscription registers a URI endpoint to start receiving CallFire notification events on. Returned is the subscriptionId that can be used later to query, update, or delete the subscription. The subscriptionId is also returned as part of all notification events as 'subscriptionId'. A URI endpoint will need to be provided that can handle the HTTP notification events coming from CallFire.com.

Parameters

\CallFire\Api\Rest\Request\CreateSubscription $CreateSubscription

= null

QuerySubscriptions()

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

Get a list of registered subscriptions

Return a list of all subscriptions registered to an account. Subscriptions returned contain info like id, enabled, endpoint, filter, etc...

Parameters

\CallFire\Api\Rest\Request\QuerySubscriptions $QuerySubscriptions

= null

GetSubscription()

GetSubscription(int $Id)

Gets an existing individual subscription by ID

Return a subscription registered to an account using subscriptionId returned from CreateSubscription request. Subscription returned contain info like id, enabled, endpoint, filter, etc...

Parameters

int $Id

Unique ID of resource

UpdateSubscription()

UpdateSubscription(int $Id, \CallFire\Api\Rest\Request\UpdateSubscription $UpdateSubscription)

Updates an existing subscription

Update existing subscription by ID Use this to enable or disable notification events, change the notification endpoint URI, or change the filtering so only receive notification for a subset of events. UpdateSubscription service call returns no response.

Parameters

int $Id
\CallFire\Api\Rest\Request\UpdateSubscription $UpdateSubscription

DeleteSubscription()

DeleteSubscription(int $Id)

Deletes a subscription by ID

Delete subscription to stop receiving CallFire notification events at the registered URI postback endpoint.

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