quickbooks - Consolibyte QuickBooks PHP 库 - 如何将参数传递给队列函数?
问题描述
我希望使用 Consolibyte PHP 库将客户添加到我的 QB 安装中。我知道我需要使用以下命令来初始化和排队我的请求:
$Queue = new QuickBooks_WebConnector_Queue('mysql://root:password@localhost/my_database');
$Queue->enqueue(QUICKBOOKS_ADD_CUSTOMER, $id_value);
在上面,当我对请求进行排队时,我只是传递了一个唯一的 ID ( $id_value
)。查看_quickbooks_customer_add_request()
方法,我看到该函数有 9 个参数。我打电话时如何设置这些参数$Queue->enqueue()
?
解决方案
这是函数定义:
->enqueue($action, $ident = null, $priority = 0, $extra = null, $user = null, $qbxml = null, $replace = true)
从这里:
文档:
* @param string $action An action to be performed within QuickBooks (see the qbXML and QuickBooks SDK documentation, i.e.: "CustomerAdd", "InvoiceAdd", "CustomerMod", etc.)
* @param mixed $ident A unique identifier (if required) for a record being operated on (i.e. if you're doing a "CustomerAdd", you'd probaly put a unique customer ID number here, so you're SOAP handler function knows which customer it is supposed to add)
* @param integer $priority The priority of the update (higher priority actions will be pushed to QuickBooks before lower priority actions)
* @param array $extra If you need to make additional bits of data available to your request/response functions, you can pass an array of extra data here
* @param string $user The username of the QuickBooks Web Connector user this item should be queued for
* @param boolean $replace Whether or not to replace any other currently queued entries with the same action/ident
推荐阅读
- forms - 通过控制器 FosUserBundle 创建用户
- qt - QtCreator 插件路径应该在哪里?
- node.js - 如何使用 NodeJS 在 mongo Db 中与用户关联和给定记录
- java - @ConfigurationProperties 的默认值不存在
- android - 在 Android P 中以有效的方式获取 android.os.SystemProperties
- angular - 角度应用程序中的 Firebase 功能不起作用
- php - 使用 $_GET['value'] 作为指针的动态页面内容
- ajax - 如何检查记录是否存在于laravel中?
- asynchronous - 如何管理 Dialogflow / Api.ai 中的 5 秒响应超时限制?
- webmail - 如何删除网络邮件中任何给定日期之前的电子邮件?