Properties

$baseURL

$baseURL : null|array

Base API URL

Base API URL comprised of environment variables passed to the ORM constructor.

Type

null|array

$route

$route : string

Base Mobile Phone Route

The base API route for the mobile phone client.

Type

string

$page

$page : integer

Results Page

The page of results to get.

Type

integer

$orm

$orm : null|\OpenResourceManager\ORM

ORM Connection

The current ORM connection.

Type

null|\OpenResourceManager\ORM

$validCodes

$validCodes : null|array

Valid Response Codes

Response codes that are used to determine if the api request was a success.

Type

null|array

Methods

__construct()

__construct(\OpenResourceManager\ORM  $orm) 

Client Constructor

Constructs a client.

Parameters

\OpenResourceManager\ORM $orm

getORM()

getORM() : \OpenResourceManager\ORM

Get ORM Connection

Returns the current ORM object

Returns

\OpenResourceManager\ORM

getPage()

getPage() : integer

Get Page

Returns the current page

Returns

integer

setPage()

setPage(integer  $page = 1) 

Set Page

Sets the target page.

Parameters

integer $page

addPage()

addPage(integer  $page = 1) 

Add Page

Adds to the target page.

Parameters

integer $page

subPage()

subPage(integer  $page = 1) 

Subtract Page

Sets the target page back.

Parameters

integer $page

getList()

getList() : \Unirest\Response

Get Mobile Phone List

Gets a list of mobile phones.

Returns

\Unirest\Response

get()

get(integer  $id) : \Unirest\Response

Get Mobile Phone

Gets a mobile phone by it's ID.

Parameters

integer $id

Returns

\Unirest\Response

delete()

delete(integer  $id) : \Unirest\Response

Delete A Mobile Phone

Delete a mobile phone based on it's ID.

Parameters

integer $id

Returns

\Unirest\Response

getForAccount()

getForAccount(integer  $id) : \Unirest\Response

Get Mobile Phones Owned By Account

Gets a list of mobile phones owned by an account using it's ID.

Parameters

integer $id

Returns

\Unirest\Response

getForIdentifier()

getForIdentifier(string  $identifier) : \Unirest\Response

Get Mobile Phones Owned By Account From Identifier

Gets a list of mobile phones owned by an account using it's identifier.

Parameters

string $identifier

Returns

\Unirest\Response

getForUsername()

getForUsername(string  $username) : \Unirest\Response

Get Mobile Phones Owned By Account From Username

Gets a list of mobile phones owned by an account using it's username.

Parameters

string $username

Returns

\Unirest\Response

getVerified()

getVerified() : \Unirest\Response

Get Verified Mobile Phones

Gets a list of mobile phones that are verified.

Returns

\Unirest\Response

getVerifiedForAccount()

getVerifiedForAccount(integer  $id) : \Unirest\Response

Get Verified Mobile Phones Owned By An Account

Gets a list of mobile phones that are verified and owned by the specified account id.

Parameters

integer $id

Returns

\Unirest\Response

getUnverified()

getUnverified() : \Unirest\Response

Get Unverified Mobile Phones

Gets a list of mobile phones that are unverified.

Returns

\Unirest\Response

getUnverifiedForAccount()

getUnverifiedForAccount(integer  $id) : \Unirest\Response

Get Unverified Mobile Phones Owned By An Account

Gets a list of mobile phones that are unverified and owned by the specified account id.

Parameters

integer $id

Returns

\Unirest\Response

getForCarrier()

getForCarrier(integer  $id) : \Unirest\Response

Get Mobile Phones That Belong To A Carrier

Gets a list of mobile phones that belong to a mobile carrier.

Parameters

integer $id

Returns

\Unirest\Response

getForCarrierCode()

getForCarrierCode(string  $code) : \Unirest\Response

Get Mobile Phones That Belong To A Carrier From Code

Gets a list of mobile phones that belong to a mobile carrier by the mobile carrier code.

Parameters

string $code

Returns

\Unirest\Response

store()

store(integer  $account_id = null, string  $identifier = null, string  $username = null, string  $number, string  $country_code = null, integer  $mobile_carrier_id = null, string  $mobile_carrier_code = null, boolean  $verified = null, string  $upstream_app_name = null, string  $verification_callback = null) : \Unirest\Response

Create Or Update Mobile Phone

Create or update a mobile phone, based the phone number. An account ID, identifier, or username can be provided to associate the mobile phone with an account.

Parameters

integer $account_id
string $identifier
string $username
string $number
string $country_code
integer $mobile_carrier_id
string $mobile_carrier_code
boolean $verified
string $upstream_app_name
string $verification_callback

Returns

\Unirest\Response

urlFromRoute()

urlFromRoute(string  $path = '') : string

URL From Route

Forms an API url from a route path.

Parameters

string $path

Returns

string

_get()

_get(string  $slug = '') : \Unirest\Response

_Get

Performs a get request to a specified url slug.

Parameters

string $slug

Returns

\Unirest\Response

_post()

_post(array  $fields = array(), string  $slug = '') : \Unirest\Response

_Post

Performs a post request to a specified url slug.

Parameters

array $fields
string $slug

Throws

\Exception

Returns

\Unirest\Response

_patch()

_patch(array  $fields = array(), string  $slug = '') : \Unirest\Response

_Patch

Performs a patch request to a specified url slug.

Parameters

array $fields
string $slug

Throws

\Exception

Returns

\Unirest\Response

_del()

_del(array  $fields = array(), string  $slug = '') : \Unirest\Response

_Del

Performs a delete request to a specified url slug.

Parameters

array $fields
string $slug

Throws

\Exception

Returns

\Unirest\Response

getFromCode()

getFromCode(string  $code) : \Unirest\Response

Get From Code

Gets an object by it's Code.

Parameters

string $code

Returns

\Unirest\Response

deleteFromCode()

deleteFromCode(string  $code) : \Unirest\Response

Delete From Code

Delete an object by it's code.

Parameters

string $code

Returns

\Unirest\Response

deleteFromIdentifier()

deleteFromIdentifier(string  $identifier) : \Unirest\Response

Delete From Identifier

Delete an object by it's identifier.

Parameters

string $identifier

Returns

\Unirest\Response

deleteFromUsername()

deleteFromUsername(string  $username) : \Unirest\Response

Delete From Username

Delete an object by it's username.

Parameters

string $username

Returns

\Unirest\Response