Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup asQBXML() & some undefined constants. #321

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
16 changes: 8 additions & 8 deletions QuickBooks/QBXML/Object.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,16 +565,16 @@ protected function _cleanup()

/**
* Convert this object to a valid qbXML request/response
*
* @todo Support for qbXML versions
*
* @param boolean $compress_empty_elements
* @param string $indent
* @param string $root
*
* @param $request
* The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq)
* @param $version
* @todo Support for qbXML versions
* @param $locale
* Restrict it to a specific qbXML locale?
* @return string
*/
//public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_XML_XML_DROP, $indent = "\t", $root = null)
public function asQBXML($request, $version = null, $locale = null, $root = null)
public function asQBXML($request, $version = null, $locale = null)
{
$todo_for_empty_elements = QuickBooks_XML::XML_DROP;
$indent = "\t";
Expand Down
16 changes: 0 additions & 16 deletions QuickBooks/QBXML/Object/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,22 +279,6 @@ public function asArray($request, $nest = true)
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
*
Expand Down
14 changes: 0 additions & 14 deletions QuickBooks/QBXML/Object/Bill/ItemLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,20 +453,6 @@ public function asArray($request, $nest = true)
return parent::asArray($request, $nest);
}

/**
*
*
* @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);
}

public function object()
{
return 'ItemLine';
Expand Down
18 changes: 0 additions & 18 deletions QuickBooks/QBXML/Object/BillPaymentCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,24 +406,6 @@ public function asXML($root = null, $parent = null, $object = null)
return parent::asXML($root, $parent, $object);
}

/**
* 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
*
Expand Down
15 changes: 0 additions & 15 deletions QuickBooks/QBXML/Object/BillPaymentCheck/AppliedToTxn.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,6 @@ public function asXML($root = null, $parent = null, $object = null)
return parent::asXML($root, $parent, $object);
}

/**
*
*
* @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 the type of object this is
*
Expand Down
14 changes: 0 additions & 14 deletions QuickBooks/QBXML/Object/Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,20 +505,6 @@ public function asArray($request, $nest = true)
return parent::asArray($request, $nest);
}

/**
*
*
* @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_QBXML_Object::XML_DROP, $indent = "\t", $root = null, $parent = null)
{
$this->_cleanup();
return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root);
}

/**
*
*/
Expand Down
14 changes: 0 additions & 14 deletions QuickBooks/QBXML/Object/Check/ItemLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,20 +533,6 @@ public function asArray($request, $nest = true)
return parent::asArray($request, $nest);
}

/**
*
*
* @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);
}

public function object()
{
return 'ItemLine';
Expand Down
16 changes: 0 additions & 16 deletions QuickBooks/QBXML/Object/Class.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,6 @@ public function asArray($request, $nest = true)
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, $version = null, $locale = null, $root = null)
{
$this->_cleanup();

return parent::asQBXML($request, $version, $locale, $root);
}

/**
* Tell what type of object this is
*
Expand Down
16 changes: 0 additions & 16 deletions QuickBooks/QBXML/Object/CreditCardRefund.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,22 +370,6 @@ 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 (ARRefundCreditCardAddRq, or ARRefundCreditCardQuery)
* @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 = NULL, $indent = "\t", $root = null)
{
$this->_cleanup();

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

public function object()
{
Expand Down
15 changes: 0 additions & 15 deletions QuickBooks/QBXML/Object/CreditMemo.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,21 +274,6 @@ public function asArray($request, $nest = true)
return parent::asArray($request, $nest);
}

/**
*
*
* @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_QBXML_Object::XML_DROP, $indent = "\t", $root = null, $parent = null)
{
$this->_cleanup();

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

public function object() {
return QUICKBOOKS_OBJECT_CREDITMEMO;
}
Expand Down
13 changes: 0 additions & 13 deletions QuickBooks/QBXML/Object/CreditMemo/CreditMemoLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,6 @@ public function asXML($root = null, $parent = null, $object = null)

return parent::asXML($root, $parent, $object);
}

/**
* @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 the type of object this is
Expand Down
16 changes: 0 additions & 16 deletions QuickBooks/QBXML/Object/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -804,22 +804,6 @@ public function asArray($request, $nest = true)
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, $version = null, $locale = null, $root = null)
{
$this->_cleanup();

return parent::asQBXML($request, $version, $locale, $root);
}

/**
* Tell what type of object this is
*
Expand Down
16 changes: 0 additions & 16 deletions QuickBooks/QBXML/Object/CustomerType.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,22 +179,6 @@ public function asArray($request, $nest = true)
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
*
Expand Down
16 changes: 0 additions & 16 deletions QuickBooks/QBXML/Object/DataExt.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,6 @@ public function asArray($request, $nest = true)
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, $version = null, $locale = null, $root = null)
{
$this->_cleanup();

return parent::asQBXML($request, $version, $locale, $root);
}

/**
* Tell what type of object this is
*
Expand Down
16 changes: 0 additions & 16 deletions QuickBooks/QBXML/Object/Department.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,22 +155,6 @@ public function asArray($request, $nest = true)
// @TODO implement parent::asArray
return array();
}

/**
* Convert this object to a valid qbXML request
*
* @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq)
* @param string $version
* @param string $locale
* @param string $root
* @return string
*/
public function asQBXML($request, $version = null, $locale = null, $root = null)
{
$this->_cleanup();

return parent::asQBXML($request, $version, $locale, $root);
}

/**
* Tell what type of object this is
Expand Down
14 changes: 0 additions & 14 deletions QuickBooks/QBXML/Object/Deposit.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,20 +227,6 @@ public function asArray($request, $nest = true)
return parent::asArray($request, $nest);
}

/**
*
*
* @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, $parent = null)
{
$this->_cleanup();
return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root);
}

/**
*
*/
Expand Down
14 changes: 0 additions & 14 deletions QuickBooks/QBXML/Object/Deposit/DepositLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,20 +212,6 @@ public function asArray($request, $nest = true)
return parent::asArray($request, $nest);
}

/**
*
*
* @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);
}

public function object()
{
return 'DepositLine';
Expand Down
Loading