Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 44 additions & 85 deletions QuickBooks/QBXML/Object/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,116 +2,116 @@

/**
* QuickBooks Account object container
*
*
* @author Keith Palmer <[email protected]>
* @license LICENSE.txt
*
*
* @package QuickBooks
* @subpackage Object
*/

/**
*
*
*/
QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php');

/**
*
*
*/
class QuickBooks_QBXML_Object_Account extends QuickBooks_QBXML_Object
{
/**
* Create a new QuickBooks_Object_Account object
*
*
* @param array $arr
*/
public function __construct($arr = array())
{
parent::__construct($arr);
}

/**
* Set the ListID of the Class
*
*
* @param string $ListID
* @return boolean
*/
public function setListID($ListID)
{
return $this->set('ListID', $ListID);
}

/**
* Get the ListID of the Class
*
*
* @return string
*/
public function getListID()
{
return $this->get('ListID');
}

/**
*
*
*/
public function setParentListID($ListID)
{
return $this->set('ParentRef ListID', $ListID);
}

public function getParentListID()
{
return $this->get('ParentRef ListID');
}

public function setParentName($name)
{
return $this->set('ParentRef FullName', $name);
}

public function getParentName()
{
return $this->get('ParentRef FullName');
}

public function getParentFullName()
{
return $this->get('ParentRef FullName');
}

public function setParentApplicationID($value)
{
return $this->set('ParentRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value));
}

public function getParentApplicationID()
{
return $this->get('ParentRef ' . QUICKBOOKS_API_APPLICATIONID);
}

/**
* Set the name of the class
*
*
* @param string $name
* @return boolean
*/
public function setName($name)
{
return $this->set('Name', $name);
}

/**
* Get the name of the class
*
*
* @return string
*/
public function getName()
{
return $this->get('Name');
}

/**
*
*
*/
public function getFullName()
{
Expand All @@ -122,68 +122,68 @@ public function setFullName($name)
{
return $this->set('FullName', $name);
}

/**
* Set this Class active or not
*
*
* @param boolean $value
* @return boolean
*/
public function setIsActive($value)
{
return $this->set('IsActive', (boolean) $value);
}

/**
* Tell whether or not this class object is active
*
*
* @return boolean
*/
public function getIsActive()
{
return $this->getBooleanType('IsActive');
}

public function setAccountType($type)
{
return $this->setBooleanType('AccountType', $type);
}

public function getAccountType()
{
return $this->get('AccountType');
}

public function setAccountNumber($number)
{
return $this->set('AccountNumber', $number);
}

public function getAccountNumber()
{
return $this->get('AccountNumber');
}

public function setBankNumber($number)
{
return $this->set('BankNumber', $number);
}

public function getBankNumber()
{
return $this->get('BankNumber');
}

public function setDescription($descrip)
{
return $this->set('Desc', $descrip);
}

public function getDescription()
{
return $this->get('Desc');
}

public function setOpenBalance($balance)
{
return $this->set('OpenBalance', (float) $balance);
Expand All @@ -193,7 +193,7 @@ public function getOpenBalance()
{
return $this->get('OpenBalance');
}

public function setOpenBalanceDate($date)
{
return $this->setDateType('OpenBalanceDate', $date);
Expand All @@ -203,7 +203,7 @@ public function getOpenBalanceDate()
{
return $this->getDateType('OpenBalanceDate');
}

public function setTaxLineID($value)
{
return $this->set('TxLineID', $value);
Expand All @@ -213,7 +213,7 @@ public function getTaxLineID()
{
return $this->get('TxLineID');
}

public function getBalance()
{
return $this->get('Balance');
Expand All @@ -223,7 +223,7 @@ public function setBalance($value)
{
return $this->set('Balance', $value);
}

public function getTotalBalance()
{
return $this->get('TotalBalance');
Expand All @@ -233,7 +233,7 @@ public function setTotalBalance($value)
{
return $this->set('TotalBalance', $value);
}

public function getSpecialAccountType()
{
return $this->get('SpecialAccountType');
Expand All @@ -243,7 +243,7 @@ public function setSpecialAccountType($type)
{
return $this->set('SpecialAccountType', $type);
}

public function getCashFlowClassification()
{
return $this->get('CashFlowClassification');
Expand All @@ -254,50 +254,9 @@ public function setCashFlowClassification($type)
return $this->set('CashFlowClassification', $type);
}


/**
* Perform any needed clean-up of the object data members
*
* @return boolean
*/
protected function _cleanup()
{
return true;
}

/**
* Get an array representation of this Class object
*
* @param string $request
* @param boolean $nest
* @return array
*/
public function asArray($request, $nest = true)
{
$this->_cleanup();

return parent::asArray($request, $nest);
}

/**
* Convert this object to a valid qbXML request
*
* @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq)
* @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE
* @param string $indent
* @param string $root
* @return string
*/
public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null)
{
$this->_cleanup();

return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root);
}

/**
* Tell what type of object this is
*
* Tell what type of object this is
*
* @return string
*/
public function object()
Expand Down
Loading