Properties

$moxi_works_agent_id

$moxi_works_agent_id : string

Type

string — the Moxi Works Platform ID of the agent moxi_works_agent_id is the Moxi Works Platform ID of the agent which a event is or is to be associated with. this must be set for any Moxi Works Platform transaction

$partner_event_id

$partner_event_id : string

Type

string — your system's unique ID for the event *your system's* unique ID for the Event this must be set for any Moxi Works Platform transaction

$event_subject

$event_subject : string

Type

string — a short description of the event

$event_location

$event_location : string

Type

string — a short description of the location of the event

$note

$note : string

Type

string — a more detailed description of the event. Any HTML formatting will be removed in the response

$remind_minutes_before

$remind_minutes_before : integer

Type

integer — how many minutes before to send a reminder. do not set, or set to null if you don't want a reminder sent.

$is_meeting

$is_meeting : boolean

Type

boolean — whether the event is a meeting or not

$event_start

$event_start : integer

Type

integer — Unix timestamp representing start time of the event

$event_end

$event_end : integer

Type

integer — Unix timestamp representing the end time of the event

$all_day

$all_day : boolean

Type

boolean — whether the event is an all day event

$attendees

$attendees : string

Type

string — a comma separated list of attendee IDs using Contact IDs from your system (partner_contact_id) that have already been added to The Moxi Works Platform as a Contact Contact must already have been created in order to be added as an attendee.

$send_reminder

$send_reminder : boolean

Type

boolean — whether a reminder should be sent to attendees

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) 

Event constructor.

Parameters

array $data

create()

create(array  $attributes = array()) : \MoxiworksPlatform\Event|null

Create an Event on The Moxi Works Platform <code> MoxiworksPlatform\Event::create([ moxi_works_agent_id: '123abc', partner_event_id: '1234', event_subject: 'Birthday Party', event_location: '123 this way, cityville, Stateswhere 86753', note: 'this is going to be the birthday. we like birthdays', remind_minutes_before: 23, is_meeting: true, event_start: 1463595006, event_end: 1463602226]); </code>

Parameters

array $attributes


moxi_works_agent_id REQUIRED The Moxi Works Agent ID for the agent to which this event is to be associated
partner_event_id REQUIRED Your system's unique ID for this event.

  <h2>
optional Event parameters

 <br><b>event_subject</b>  string  string a short description of the event
 <br><b>event_location</b>  string a short description of the location of the event
 <br><b>note</b>  string  a more detailed description of the event.
 <br><b>remind_minutes_before</b> integer  how many minutes before to send a reminder.
 <br><b>is_meeting</b> boolean  whether the event is a meeting or not
 <br><b>event_start</b>  integer Unix timestamp representing start time of the event
 <br><b>event_end</b>   integer Unix timestamp representing the end time of the event
 <br><b>all_day</b> boolean  whether the event is an all day event

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\Event|null

find()

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

Find a previously created Event on Moxi Works Platform.

find can be performed including your system's event id and the Moxi Works Agent ID in a parameter array \MoxiworksPlatform\Event::find([moxi_works_agent_id: 'abc123', partner_event_id: 'my_system_event_id'])

Parameters

array $attributes


moxi_works_agent_id REQUIRED The Moxi Works Agent ID for the agent to which this event is to be associated
partner_event_id REQUIRED Your system's unique ID for this event.

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\Event|null

search()

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

Search for Events between start/end date on Moxi Works Platform.

search can be performed by including date_start and date_end in a parameter array \MoxiworksPlatform\Event::search([moxi_works_agent_id: 'abc123', date_start: 1463595006, date_end: 1463599996])

Parameters

array $attributes


moxi_works_agent_id REQUIRED string The Moxi Works Agent ID for the agent to which this event is associated
date_start REQUIRED integer Unix timestamp representing the start time for the search
date_end REQUIRED integer Unix timestamp representing the end time for the search

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 —

of Event objects formatted as follows: { "date" => "MM/DD/YY", "events" => [ \MoxiworkPlatform\Event, \MoxiworkPlatform\Event ] }

update()

update(array  $attributes = array()) : \MoxiworksPlatform\Event|null

Update a previously created Event on The Moxi Works Platform <code> MoxiworksPlatform\Event::update([ moxi_works_agent_id: '123abc', partner_event_id: '1234', event_subject: 'Birthday Party', event_location: '123 this way, cityville, Stateswhere 86753', note: 'this is going to be the birthday. we like birthdays', remind_minutes_before: 23, is_meeting: true, event_start: 1463595006, event_end: 1463602226]); </code>

Parameters

array $attributes


moxi_works_agent_id REQUIRED The Moxi Works Agent ID for the agent to which this event is to be associated
partner_event_id REQUIRED Your system's unique ID for this event.

  <h2>
optional Event parameters

 <br><b>event_subject</b>  string  string a short description of the event
 <br><b>event_location</b>  string a short description of the location of the event
 <br><b>note</b>  string  a more detailed description of the event.
 <br><b>remind_minutes_before</b> integer  how many minutes before to send a reminder.
 <br><b>is_meeting</b> boolean  whether the event is a meeting or not
 <br><b>event_start</b>  integer Unix timestamp representing start time of the event
 <br><b>event_end</b>   integer Unix timestamp representing the end time of the event
 <br><b>all_day</b> boolean  whether the event is an all day event

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\Event|null

save()

save() : \MoxiworksPlatform\Event|null

Save Event to Moxi Works Platform

$event = MoxiworksPlatform\Event::find([ moxi_works_agent_id: '123abc']); $event->search_city = 'Cityville'; $event->save();

Returns

\MoxiworksPlatform\Event|null

delete()

delete() : \MoxiworksPlatform\Event|null

Remove a event your system has previously created on the Moxi Works Platform from an agent

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\Event|null

sendRequest()

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

Parameters

$method
array $opts
null $url

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\Event|null