QuickBooks online 如何确定 ExpenseAccountRef.value?我需要查询 ACCOUNT 对象来确定值吗? [英] How does QuickBooks online determine the ExpenseAccountRef.value? Do I need to QUERY an ACCOUNT object to determine the value?

查看:42
本文介绍了QuickBooks online 如何确定 ExpenseAccountRef.value?我需要查询 ACCOUNT 对象来确定值吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序将使用 QuickBooks Online API 来创建非库存项目"

My app will use QuickBooks Online API to to "Create a NonInventory Item"

我不明白这个值是如何确定的.
我是否必须使用 ExpenseAccountRef.value 初始化我的 NonInventory 项目?
在初始化一个新的值之前,我应该查询 ACCOUNT 对象以确定存在哪些值吗?

I don't understand how this value is determined.
Do I have to initialize my NonInventory Item with an ExpenseAccountRef.value?
Should I QUERY the ACCOUNT object to determine which values exist before initializing a new one?

以下是必填字段的示例:

Below is an example of the required fields:

{ 
  "Name": "Garden Supplies",  
  "Type": "NonInventory", 
  "ExpenseAccountRef": { 
    "value": "80"
  }
}

在文档中(位于:https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/item),它指出:

ExpenseAccountRef
"引用用于向供应商支付此项目的费用帐户.必须是账户类型为 Cost of Goods Sold 的账户.查询帐户名称列表资源以确定此引用的适当帐户对象.将来自该对象的 Account.Id 和 Account.Name 分别用于 ExpenseAccountRef.value 和 ExpenseAccountRef.name."

字符串
"在对象有效负载的 Id 字段中找到的引用对象的 ID.上下文由引用类型设置,并且特定于 QuickBooks 公司文件."

In the documentation (found at: https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/item), it states:

ExpenseAccountRef
"Reference to the expense account used to pay the vendor for this item. Must be an account with account type of Cost of Goods Sold. Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id and Account.Name from that object for ExpenseAccountRef.value and ExpenseAccountRef.name, respectively."

value String
"The ID for the referenced object as found in the Id field of the object payload. The context is set by the type of reference and is specific to the QuickBooks company file."

推荐答案

我是否必须使用 ExpenseAccountRef.value 初始化我的 NonInventory 项目?

Do I have to initialize my NonInventory Item with an ExpenseAccountRef.value?

它是否在文档中标记为必填字段?如果是,那么是.

Is it marked as a required field in the documentation? If so, then yes.

在初始化新值之前,我应该查询 ACCOUNT 对象以确定存在哪些值吗?

Should I QUERY the ACCOUNT object to determine which values exist before initializing a new one?

是的.您引用的文档也表明了这一点:

Yes. The docs you quoted indicate this as well:

"查询帐户名称列表资源以确定此引用的适当帐户对象.分别为 ExpenseAccountRef.value 和 ExpenseAccountRef.name 使用该对象中的 Account.Id 和 Account.Name."

"Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id and Account.Name from that object for ExpenseAccountRef.value and ExpenseAccountRef.name, respectively."

这篇关于QuickBooks online 如何确定 ExpenseAccountRef.value?我需要查询 ACCOUNT 对象来确定值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆