When modifying invoices and bills I can work with line items just fine. To add items I set the TxnLineID
to -1
and to remove the item you simply do not include it in the mod request. So instead of storing the TxnLineID
for later mods I set them all to -1
in mods, this effectively removes all the current items and adds all the items I want back in. This method does not seem to hold true for deposits. If I successfully create a deposit with a transaction line then run a mod request with zero lines. The deposit still has one transaction associated with it.
This request was processed successfully, but the response still included the original DepositLine
.
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<DepositModRq>
<DepositMod>
<TxnID>a68sdf4as-864564848</TxnID>
<EditSequence>1388524567</EditSequence>
<DepositToAccountRef>
<ListID>a65sd4fasd-468468465</ListID>
</DepositToAccountRef>
</DepositMod>
</DepositModRq>
</QBXMLMsgsRq>
</QBXML>
Looking at the OCR, it looks like I have to delete the deposit and create a new one. Are there any better options out there?