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 BuyerTransaction is or is to be associated with. this must be set for any Moxi Works Platform BuyerTransaction request

$moxi_works_transaction_id

$moxi_works_transaction_id : string

Type

string — the Moxi Works Platform ID of the BuyerTransaction

$moxi_works_contact_id

$moxi_works_contact_id : string

Type

string — the Moxi Works Platform ID of the Contact either moxi_works_contact_id or partner_contact_id can be used

$partner_contact_id

$partner_contact_id : string

Type

string — your system's unique ID for the contact *your system's* unique ID for the Contact associated with this BuyerTransaction either moxi_works_contact_id or partner_contact_id can be used

$transaction_name

$transaction_name : string

Type

string — A brief, human readable title that will be shown to the agent as the subject of the BuyerTransaction that you are updating.

$notes

$notes : string

Type

string — Brief, human readable content that will be shown to the agent as notes about the BuyerTransaction that you are updating.

$stage

$stage : integer

Type

integer — the stage of the transaction Each BuyerTransaction has five stages (1-5). stage displays the stage number that the BuyerTransaction is currently in. This will be a single digit integer that can be [1,2,3,4,5]. For more information on BuyerTransaction stages see The Moxi Works Platform BuyerTransaction Stages Documentation

$stage_name

$stage_name : string

Type

string — a human readable string representing the stage the transaction is in This attribute displays a human readable stage name that is associated with the current stage attribute. When created through the Moxi Works Platform BuyerTransaction objects will automatically be configured as 'active' transactions. This will be an enumerated string that can be can be 'initialized', 'configured' , 'active' , 'pending' or 'complete' For more information on BuyerTransaction stages see The Moxi Works Platform BuyerTransaction Stages Documentation

$address

$address : string

Type

string — street address of the property being sold

$city

$city : string

Type

string — city of the property being sold

$state

$state : string

Type

string — state of the property being sold

$zip_code

$zip_code : string

Type

string — zip_code of the property being sold

$sqft

$sqft : integer

Type

integer — living area of the property being sold

$beds

$beds : integer

Type

integer — bedrooms in the property being sold

$baths

$baths : float

Type

float — bathrooms the property being sold

$is_mls_transaction

$is_mls_transaction : boolean

Type

boolean — Whether the property being sold is being listed on an MLS.

$mls_number

$mls_number : string

**MLS TRANSACTIONS ONLY** mls number for the listing associated with this BuyerTransaction

Type

string — the MLS number of the listing associated with this BuyerTransaction -- mls_number should be populated only if is_mls_transaction is true.

$start_timestamp

$start_timestamp : Integer

Unix timestamp representing the date the agent initiated transaction discussions with the client.

Type

Integer — Unix timestamp

$commission_percentage

$commission_percentage : float

If the agent is to receive commission based on percentage of sale price for the property associated with this BuyerTransaction, then this will represent the commission that the agent is to receive.This should be null if the BuyerTransaction uses commission_flat_fee.

-- both commission_flat_fee and commission_percentage cannot be set

Type

float

$commission_flat_fee

$commission_flat_fee : integer

If the agent is to receive a flat-rate commission upon sale of the property associated with this BuyerTransaction, then this will represent the commission that the agent is to receive. This should be null if the BuyerTransaction uses commission_percentage.

-- both commission_flat_fee and commission_percentage cannot be set

Type

integer

$target_price

$target_price : integer

The desired selling price for the property if using target rather than range.

-- both target_price and price cannot be set

Type

integer

$min_price

$min_price : integer

The minimum price range for the property if using a price range rather than target price.

-- both target_price and min_price cannot be set

Type

integer

$max_price

$max_price : integer

The maximum price range for the property if using a price range rather than target price.

-- both target_price and max_price cannot be set

Type

integer

$closing_price

$closing_price : integer

This is the closing price for the sale . This should be null if the BuyerTransaction is not yet in complete state.

Type

integer

$closing_timestamp

$closing_timestamp : \MoxiworksPlatform\integer;

A Unix timestamp representing the point in time when the transaction for this BuyerTransaction object was completed. This should be null if the BuyerTransaction is not yet in complete state.

Type

\MoxiworksPlatform\integer;

$promote_transaction

$promote_transaction : boolean

In order to promote a BuyerTransaction to the next stage, set the promote_transaction attribute to true. For more information about BuyerTransaction stages, see The Moxi Works Platform Promoting BuyerTransaction Documentation.

promote_transaction is only available for BuyerTransaction updates. Newly created BuyerTransaction objects will automatically be created in stage 3 (active)

Type

boolean

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) 

BuyerTransaction constructor.

Parameters

array $data

create()

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

Create a BuyerTransaction on The Moxi Works Platform <code> MoxiworksPlatform\BuyerTransaction::create([ 'moxi_works_agent_id' => '123abc', 'moxi_works_contact_id' =>'deadbeef-dead-beef-bad4-feedfacebad', 'notes' => 'foo deeaz', 'name' => 'whateverz' 'address' => '1234 there ave', 'city' => 'cityville' 'state' => 'provinceland', 'zip_code' => '12323', 'beds' => 12, 'baths' => 34.5, 'sqft' => 12345, 'is_mls_transaction' => true, 'commission_flat_fee' => nil, 'commission_percentage' => 12.34, 'target_price' => 12345, 'min_price' => nil, 'max_price' => nil, 'mls_number' => 'abc1234']); </code>


moxi_works_agent_id REQUIRED The Moxi Works Agent ID for the agent to which this transaction is to be associated
partner_transaction_id REQUIRED Your system's unique ID for this transaction.
partner_contact_id REQUIRED Your system's unique id for associated contact. should already have been created in Moxi Works Platform.

     <h2>
         optional BuyerTransaction parameters
     </h2>

   <br><b> notes</b> human readable notes associated with the transaction meaningful to the agent
   <br><b> name</b> short description of the transaction meaningful to the agent
   <br><b> address</b> street address of the property associated with the transaction
   <br><b> city</b> city of the property associated with the transaction
   <br><b> state</b> state or province of the property associated with the transaction
   <br><b> zip_code</b>  postal code of the property associated with the transaction
   <br><b> beds</b> number of bedrooms associated with the transaction
   <br><b> baths</b> number of bathrooms associated with the transaction
   <br><b> sqft</b> square feet of living area associated with the transaction
   <br><b> max_sqft</b> maximum square feet of living area desired for transaction
   <br><b> area_of_interest</b> an area that desired for the transaction
   <br><b> transaction_state</b> current state of the transaction, can be 'marketing', 'prospects' , 'actives' , 'pending'  , 'completed'
   <br><b> transaction_category</b> category of transaction, can be 'buyer', 'buyer'
   <br><b> commission_flat_fee</b> how much the commission is if flat fee
   <br><b> commission_percentage</b> what percentage the commission is if percentage based
   <br><b> target_price</b>  target price associated with the transaction
   <br><b> price</b>  price associated with the transaction
   <br><b> max_price</b> maximum price associated with the transaction
   <br><b> mls_number</b>  mls number associated with the transaction
   <br><b> closing_price</b>  closing price associated with the transaction
   <br><b> closing_timestamp</b>  Unix timestamp representing the date the transaction closed associated with the transaction

Parameters

array $attributes

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\BuyerTransaction|null

update()

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

Update a previously created BuyerTransaction on The Moxi Works Platform <code> MoxiworksPlatform\BuyerTransaction::create([ 'moxi_works_agent_id' => '123abc', 'moxi_works_transaction_id' =>'deadbeef-dead-beef-bad4-feedfacebad', 'notes' => 'foo deeaz', 'name' => 'whateverz' 'address' => '1234 there ave', 'city' => 'cityville' 'state' => 'provinceland', 'zip_code' => '12323', 'beds' => 12, 'baths' => 34.5, 'sqft' => 12345, 'is_mls_transaction' => true, 'commission_flat_fee' => nil, 'commission_percentage' => 12.34, 'target_price' => 12345, 'min_price' => nil, 'max_price' => nil, 'mls_number' => 'abc1234', 'closing_timestamp' => time(), 'closing_price' => 123456, 'promote_transaction => true ]); </code>


moxi_works_agent_id REQUIRED The Moxi Works Agent ID for the agent to which this transaction is to be associated
partner_transaction_id REQUIRED The Moxi Works Platform unique ID for the BuyerTransaction you want to update.

     <h2>
         optional BuyerTransaction parameters
     </h2>

   <br><b> notes</b> human readable notes associated with the transaction meaningful to the agent
   <br><b> name</b> short description of the transaction meaningful to the agent
   <br><b> address</b> street address of the property associated with the transaction
   <br><b> city</b> city of the property associated with the transaction
   <br><b> state</b> state or province of the property associated with the transaction
   <br><b> zip_code</b>  postal code of the property associated with the transaction
   <br><b> beds</b> number of bedrooms associated with the transaction
   <br><b> baths</b> number of bathrooms associated with the transaction
   <br><b> sqft</b> square feet of living area associated with the transaction
   <br><b> max_sqft</b> maximum square feet of living area desired for transaction
   <br><b> area_of_interest</b> an area that desired for the transaction
   <br><b> transaction_state</b> current state of the transaction, can be 'marketing', 'prospects' , 'actives' , 'pending'  , 'completed'
   <br><b> transaction_category</b> category of transaction, can be 'buyer', 'buyer'
   <br><b> commission_flat_fee</b> how much the commission is if flat fee
   <br><b> commission_percentage</b> what percentage the commission is if percentage based
   <br><b> target_price</b>  target price associated with the transaction
   <br><b> price</b>  price associated with the transaction
   <br><b> max_price</b> maximum price associated with the transaction
   <br><b> mls_number</b>  mls number associated with the transaction
   <br><b> closing_price</b>  closing price associated with the transaction
   <br><b> closing_timestamp</b>  Unix timestamp representing the date the transaction closed associated with the transaction
   <br><b> promote_transaction</b> If this is set to true then The Moxi Works Platform will promote this transaction to the next stage

Parameters

array $attributes

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\BuyerTransaction|null

find()

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

Find a previously created BuyerTransaction on Moxi Works Platform.

find can be performed including the Moxi Works BuyerTransaction id and the Moxi Works Agent ID in a parameter array \MoxiworksPlatform\BuyerTransaction::find([moxi_works_agent_id: 'abc123', moxi_works_transaction_id: 'deadbeef-feed-face-bad4-dad2feedface'])

Parameters

array $attributes


moxi_works_agent_id REQUIRED The Moxi Works Platform Agent ID for the agent to which this transaction is to be associated
moxi_works_transaction_id REQUIRED The Moxi Works Platform BuyerTransaction ID.

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\BuyerTransaction|null

search()

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

Search for BuyerTransaction objects for an Agent on Moxi Works Platform.

search can be performed by including moxi_works_agent_id in a parameter array \MoxiworksPlatform\BuyerTransaction::search(['moxi_works_agent_id' => 'abc123', 'page_number' => 3, moxi_works_contact_id => 'deadbeef-feed-face-bad4-dad2feedface'])

Parameters

array $attributes


moxi_works_agent_id REQUIRED string The Moxi Works Agent ID for the agent to which this task is associated

  <h2>
optional BuyerTransaction search parameters


moxi_works_contact_id The Moxi Works Platform Contact ID for a specific Contact about whom BuyerTransactions are to be returned -- either moxi_works_contact_id or partner_contact_id can be used
partner_contact_id your system's ID for a specific contact for whom BuyerTransaction objects are to be returned -- either moxi_works_contact_id or partner_contact_id can be used
page_number page number of responses to return (if number of responses spans a beyond a single page of responses)

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], transactions: [Array] containing MoxiworkPlatform\BuyerTransaction objects ]

save()

save() : \MoxiworksPlatform\BuyerTransaction|null

Save BuyerTransaction to Moxi Works Platform

$transaction = MoxiworksPlatform\BuyerTransaction::find([ moxi_works_agent_id: '123abc', moxi_works_transaction_id: 'defjhi]); $transaction->city = 'Cityville'; $transaction->save();

Returns

\MoxiworksPlatform\BuyerTransaction|null

sendRequest()

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

Parameters

$method
array $opts
null $url

Throws

\MoxiworksPlatform\Exception\ArgumentException

if required parameters are not included

\MoxiworksPlatform\RemoteRequestFailureException

Returns

\MoxiworksPlatform\BuyerTransaction|null