quickbooks api 使用 RubyRails 应用根据发票添加付款

quickbooks api to add a payment against an invoice with RubyRails app

我正在尝试将发票标记为已付款,据我所知,我必须在发票上添加付款。我正在使用 qbwc gem,它正在使用 qbxml v.13。 我在这里找到了几个创建付款对象的示例 https://community-intuit.force.com/developer/s/article/QBO-REST-Apply-payments-to-invoice,但是我不清楚用于创建付款的 qbxml 标签。

这是我在 OSR ReceivePaymentAddRq、ItemPaymentAddRq 等中找到的几个 xml 标签

但我仍然不确定如何创建付款对象以及应该使用哪些 xml 标签,在此先感谢您的帮助。

一个最小的 qbXML 示例如下所示:

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="10.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <ReceivePaymentAddRq>
            <ReceivePaymentAdd>
                <CustomerRef>
                    <ListID>F230000-1196864585</ListID>
                    <!--<FullName>Keith Palmer</FullName>--> <!-- You can specify either ListID or FullName -->
                </CustomerRef>

                <TxnDate>2007-12-14</TxnDate>
                <RefNumber>00612361</RefNumber>
                <TotalAmount>195.00</TotalAmount>

                <!-- Specify the Invoice TxnID here, or see below for auto-apply... -->
                <AppliedToTxnAdd>
                    <TxnID>12006-1196864828</TxnID>
                    <PaymentAmount>195.00</PaymentAmount>
                </AppliedToTxnAdd>
    
                <!-- If you don't want to apply payments manually to a particular transaction, use <IsAutoApply>true</IsAutoApply> -->
                <!--   instead of the <AppliedToTxn> node. QuickBooks will make it's best guess how to apply the payment. -->
            </ReceivePaymentAdd>
        </ReceivePaymentAddRq>
    </QBXMLMsgsRq>
</QBXML>