Properties

$moxi_works_office_id

$moxi_works_office_id : string

Type

string — the UUID of the office which the Office is associated

$id

$id : string

Type

string — the id of the office

$image_url

$image_url : string

#

Type

string — a URL to an image of the office.

$name

$name : string

Type

string — the name of the office

$address

$address : string

Type

string — the office's address, street and number

$address2

$address2 : string

Type

string — address cont. (ex. suite number)

$city

$city : string

Type

string — the office's address, city

$county

$county : string

Type

string — the office's address, county

$state

$state : string

Type

string — the office's address, state

$zip_code

$zip_code : string

Type

string — the office's address, zip code

$alt_phone

$alt_phone : string

Type

string — the office's alternate phone number

$email

$email : string

Type

string — the office's email address

$facebook

$facebook : string

Type

string — the office's facebook page URL

$google_plus

$google_plus : string

Type

string — the office's google_plus account

$phone

$phone : string

Type

string — the office's primary phone number

$timezone

$timezone : string

Type

string — the office's timezone

$twitter

$twitter : string

Type

string — the office's twitter handle

$office_website

$office_website : string

Type

string — URL of the office website

$common_name

$common_name : string

Type

string — Common name of the office

$region

$region : string

Type

string — region of the office

Methods

headers()

headers() 

authHeader()

authHeader() 

acceptHeader()

acceptHeader() 

contentTypeHeader()

contentTypeHeader() 

userAgentHeader()

userAgentHeader() 

apiConnection()

apiConnection(  $method,   $url,   $attributes) 

Parameters

$method
$url
$attributes

checkForErrorInResponse()

checkForErrorInResponse(  $json) 

Parameters

$json

underscore()

underscore(  $attr) 

Parameters

$attr

__construct()

__construct(array  $data) 

Office constructor.

Parameters

array $data

find()

find(array  $attributes = array()) : \MoxiworksPlatform\Office|null

Find an Office on Moxi Works Platform.

find can be performed including the Moxi Works Office ID and Moxi Works Company ID in a parameter array \MoxiworksPlatform\Office::find([moxi_works_office_id: 'abc123', 'moxi_works_company_id' => 'foo_bar'])

Parameters

array $attributes


moxi_works_office_id REQUIRED The Moxi Works Office ID
moxi_works_company_id REQUIRED The Moxi Works Company ID

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\Office|null

search()

search(array  $attributes = array()) : Array

Search for Offices by Company on Moxi Works Platform.

search can be performed by including moxi_works_company_id in a parameter array \MoxiworksPlatform\Office::search([moxi_works_company_id: 'abc123'])

Parameters

array $attributes


moxi_works_company_id REQUIRED string The Moxi Works Company ID for the company in which we are searching for offices

  <h2>
optional Task search parameters

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\Exception\ArgumentException

if at least one search parameter is not defined

\MoxiworksPlatform\RemoteRequestFailureException

Returns

Array —

paged response array with the format: [ page_number: [Integer], total_pages: [Integer], offices: [Array] containing MoxiworkPlatform\Office objects ]

sendRequest()

sendRequest(  $method, array  $opts = array(), null  $url = null) : \MoxiworksPlatform\Office|null

Parameters

$method
array $opts
null $url

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\Office|null