当前位置: 首页>>代码示例>>PHP>>正文


PHP QuickBooks_Object类代码示例

本文整理汇总了PHP中QuickBooks_Object的典型用法代码示例。如果您正苦于以下问题:PHP QuickBooks_Object类的具体用法?PHP QuickBooks_Object怎么用?PHP QuickBooks_Object使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QuickBooks_Object类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _mapApplicationIDs

 /**
  * 
  * 
  * @param string $request
  * @param QuickBooks_Object $obj
  * @param boolean $continue_on_error
  * @param string $err
  * @return array
  */
 protected function _mapApplicationIDs($request, &$obj, $continue_on_error, &$err)
 {
     foreach ($obj->asList($request) as $key => $value) {
         if (is_array($value)) {
             // this function neeeds to beable to handle arrays, or objects
             /*
             foreach ($value as $subvalue)
             {
             	$err = '';
             	if ($this->_mapApplicationIDs($request, $subvalue, $continue_on_error, $err))
             	{
             		; // do nothing
             	}
             	else if (!$continue_on_error)
             	{
             		$err = 'Recursive map error: ' . $err;
             		return false;
             	}
             }
             */
         } else {
             /*
             				if (substr($key, strlen(QUICKBOOKS_API_APPLICATIONID) * -1, strlen(QUICKBOOKS_API_APPLICATIONID)) == QUICKBOOKS_API_APPLICATIONID)
             				{
             					$type = null;
             					$tag = null;
             					$ID = null;
             					$obj->decodeApplicationID($value, $type, $tag, $ID);
             					
             					if ($ListID_or_TxnID = $this->_mapToQuickBooksID($type, $ID))
             					{
             						$back = substr($key, 0, -1 * (strlen(QUICKBOOKS_API_APPLICATIONID) + 1));
             						
             						$obj->set($back . ' ' . $tag, $ListID_or_TxnID);
             					}
             					else if (!$continue_on_error)
             					{
             						$err = 'Unable to map key: ' . $key;
             						return false;
             					}
             				}*/
         }
     }
     return true;
 }
开发者ID:Edgargm87,项目名称:efapcom,代码行数:54,代码来源:API.php

示例2: __construct

 /**
  * Create a new QuickBooks_Object_Check_ExpenseLine object
  * 
  * @param array $arr
  */
 public function __construct($arr = array())
 {
     parent::__construct($arr);
 }
开发者ID:dsesar,项目名称:quickbooks-php-devkit,代码行数:9,代码来源:ExpenseLine.php

示例3: _integrateProduct

 /**
  * 
  * 
  * @param QuickBooks_Object $Product
  * @param mixed $ProductID
  * @return boolean
  */
 protected function _integrateProduct($Product, $ProductID)
 {
     // Call a hook to indicate the order is being pushed to QuickBooks
     $hook_data = array('ProductID' => $ProductID, 'Product' => $Product);
     $this->_callHooks(QUICKBOOKS_SERVER_INTEGRATOR_HOOK_INTEGRATEPRODUCT, null, $user, null, $err, $hook_data);
     switch ($Product->object()) {
         case QUICKBOOKS_OBJECT_INVENTORYITEM:
             return $this->_api->addInventoryItem($Product, 'QuickBooks_Server_Integrator_Callbacks::addInventoryItem', $ProductID);
         case QUICKBOOKS_OBJECT_NONINVENTORYITEM:
             return $this->_api->addNonInventoryItem($Product, 'QuickBooks_Server_Integrator_Callbacks::addNonInventoryItem', $ProductID);
         case QUICKBOOKS_OBJECT_SERVICEITEM:
             return $this->_api->addServiceItem($Product, 'QuickBooks_Server_Integrator_Callbacks::addServiceItem', $ProductID);
         case QUICKBOOKS_OBJECT_DISCOUNTITEM:
             return $this->_api->addDiscountItem($Product, 'QuickBooks_Server_Integrator_Callbacks::addDiscountItem', $ProductID);
         case QUICKBOOKS_OBJECT_OTHERCHARGEITEM:
             return $this->_api->addOtherChargeItem($Product, 'QuickBooks_Server_Integrator_Callbacks::addOtherChargeItem', $ProductID);
         default:
             return false;
     }
 }
开发者ID:Edgargm87,项目名称:efapcom,代码行数:27,代码来源:Integrator.php

示例4: print_r

	</CustomerRet>';
// Create the customer
$Object = QuickBooks_Object::fromQBXML($qbxml);
// Print it out
print_r($Object);
// Does it work for qbXML ADD requests too?
$qbxml = '
	<CustomerAdd>
		<Name>20706 - Eastern XYZ University</Name>
		<CompanyName>Eastern XYZ University</CompanyName>
		<FirstName>Keith</FirstName>
		<LastName>Palmer</LastName>
		<BillAddress>
			<Addr1>Eastern XYZ University</Addr1>
			<Addr2>College of Engineering</Addr2>
			<Addr3>123 XYZ Road</Addr3>
			<City>Storrs-Mansfield</City>
			<State>CT</State>
			<PostalCode>06268</PostalCode>
			<Country>United States</Country>
		</BillAddress>
		<Phone>860-634-1602</Phone>
		<AltPhone>860-429-0021</AltPhone>
		<Fax>860-429-5183</Fax>
		<Email>keith@consolibyte.com</Email>
		<Contact>Keith Palmer</Contact>
	</CustomerAdd>';
// Create it...
$Object = QuickBooks_Object::fromQBXML($qbxml);
// Print it...
print_r($Object);
开发者ID:dsesar,项目名称:quickbooks-php-devkit,代码行数:31,代码来源:example_qbxml_to_object.php

示例5: fromQBXML

 /**
  * Convert a qbXML string to a QuickBooks_Object_* object instance
  * 
  * @param string $qbxml
  * @param string $action_or_object
  * @return QuickBooks_Object
  */
 public static function fromQBXML($qbxml, $action_or_object = null)
 {
     $errnum = null;
     $errmsg = null;
     $Parser = new QuickBooks_XML_Parser($qbxml);
     if ($Doc = $Parser->parse($errnum, $errmsg)) {
         $XML = $Doc->getRoot();
         return QuickBooks_Object::fromXML($XML, $action_or_object);
     }
     return false;
 }
开发者ID:rme,项目名称:pm2qb,代码行数:18,代码来源:Object.php

示例6:

		<TimeModified>2009-10-11T14:26:12</TimeModified>
		<EditSequence>1234</EditSequence>
		<Name>7lb Box</Name>
		<IsActive>true</IsActive>
		<UnitOfMeasureType>Weight</UnitOfMeasureType>
		<BaseUnit>
			<Name>Pounds</Name>
			<Abbreviation>lbs</Abbreviation>
		</BaseUnit>
		<RelatedUnit>
			<Name>15lb Box</Name>
			<Abbreviation>15lbs</Abbreviation>
			<ConversionRatio>2</ConversionRatio>
		</RelatedUnit>
		<RelatedUnit>
			<Name>25lb Box</Name>
			<Abbreviation>25lbs</Abbreviation>
			<ConversionRatio>4</ConversionRatio>
		</RelatedUnit>
		<DefaultUnit>
			<UnitUsedFor>Sales</UnitUsedFor>
			<Unit>Pound</Unit>
		</DefaultUnit>
		<DefaultUnit>
			<UnitUsedFor>Purchase</UnitUsedFor>
			<Unit>2 Pounds</Unit>
		</DefaultUnit>
	</UnitOfMeasureSetRet>';
$UnitOfMeasureSet = QuickBooks_Object::fromQBXML($qbxml);
print_r($UnitOfMeasureSet);
print $UnitOfMeasureSet->asQBXML(QUICKBOOKS_ADD_UNITOFMEASURESET);
开发者ID:djeraseit,项目名称:quickbooks-php,代码行数:31,代码来源:test_unitofmeasureset_and_salestaxcode.php

示例7: _objectFromXML

 /**
  * 
  * 
  * 
  */
 protected static function _objectFromXML($action, $XML)
 {
     return QuickBooks_Object::fromXML($XML, $action);
 }
开发者ID:djeraseit,项目名称:quickbooks-php,代码行数:9,代码来源:Callbacks.php

示例8: asQBXML

 /**
  * 
  * 
  * @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);
 }
开发者ID:dsesar,项目名称:quickbooks-php-devkit,代码行数:13,代码来源:SalesTaxLine.php


注:本文中的QuickBooks_Object类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。