本文整理汇总了PHP中QuickBooks_Object::object方法的典型用法代码示例。如果您正苦于以下问题:PHP QuickBooks_Object::object方法的具体用法?PHP QuickBooks_Object::object怎么用?PHP QuickBooks_Object::object使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QuickBooks_Object
的用法示例。
在下文中一共展示了QuickBooks_Object::object方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _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;
}
}