gpt4 book ai didi

quickbooks - Intuit any API 告诉我一个字段在已经指定时是必需的

转载 作者:行者123 更新时间:2023-12-04 05:13:27 26 4
gpt4 key购买 nike

我正在尝试在 QB 中为 Windows 创建发票。这是 XML:

<?xml version='1.0' encoding='utf-8'?>
<Add xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.intuit.com/sb/cdm/v2" xsi:schemaLocation="http://www.intuit.com/sb/cdm/V2./RestDataFilter.xsd " RequestId="1836474224e142c9ad9b7dd6cb0eaa41" FullResponse="true">
<OfferingId>ipp</OfferingId>
<ExternalRealmId>596059545</ExternalRealmId>
<Invoice>
<Header>
<TxnDate>2013-01-30</TxnDate>
<DiscountAmt>0</DiscountAmt>
<ARAccountName>Sales - Support and Maintenance</ARAccountName>
<DiscountAccountName>Discounts/Refunds</DiscountAccountName>
<DueDate>2013-02-17</DueDate>
<Currency>USD</Currency>
<CustomerId>4</CustomerId>
</Header>
<Line>
<Qty>1</Qty>
<UnitPrice>7.00</UnitPrice>
<Desc>Follow-up Test, Instant for Person138-Org3 Person138-Org3</Desc>
</Line>
</Invoice>
</Add>

这是回应:
-2001:  cvc-complex-type.2.4.a: Invalid content was found starting with element 'ARAccountName'. One of '{"http://www.intuit.com/sb/cdm/v2":DiscountAccountId, "http://www.intuit.com/sb/cdm/v2":DiscountAccountName, "http://www.intuit.com/sb/cdm/v2":DiscountTaxable, "http://www.intuit.com/sb/cdm/v2":TxnId}' is expected.

我不明白,因为我已经指定了 DiscountAccountName。我还尝试使用更像 create example 的东西。 (与上面相同,但删除了 ARAccountName 和 DiscountAccountName)并得到了类似的响应。预先感谢您的帮助。

最佳答案

Intuit XML 请求由 XSD 验证,而 XML 由 XSD 验证,您提供的标签顺序很重要。

这意味着如果文档 ( https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0600_Object_Reference/Invoice ) 规定 ARAccountName 位于 DiscountAmt 之前,那么您必须将 ARAccountName 置于 DiscountAmt 之前。

切换您的 XML 标记的顺序以匹配文档中显示的顺序,您就大功告成了。

关于quickbooks - Intuit any API 告诉我一个字段在已经指定时是必需的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14611054/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com