Closed hdrsh closed 6 years ago
Hello,
While creating a bill payment, with the following body:
{"VendorRef"=>{"value"=>"238", "name"=>"Vendor"}, "DocNumber"=>"11761", "TxnDate"=>"2018-01-21", "TotalAmt"=>10.95, "PrivateNote"=>"For Purchase Order: XYZABC", "Line"=>[{"Amount"=>10.95, "LinkedTxn"=>[{"TxnId"=>3385, "TxnType"=>"Bill"}]}], "CurrencyRef"=>{"value"=>"USD"}, "ExchangeRate"=>5.66, "PayType"=>"CreditCard", "CreditCardPayment"=>{"CCAccountRef"=>{"value"=>"771", "name"=>"American Express - 5555"}}}
The payment gets created succesfully, but I get the following Debug Warning:
DEBUG -- : [QuickBooks] entity name not in response body: entity=:billpayment entity_name="Billpayment" body={..
When I then try to update the bill payment, instead of updating the payment, for some reason, a new payment gets created:
@qbo_api.update(:billpayment, id: qbo_payment_id, payload: purchase_transaction_payload)
Both the issues also happen with vendor credits (ie. Debug and duplication on update)
Should be :bill_payment. You snake case the resources' title case. e.g. AnExampleResource = :an_example_resource.
:bill_payment
AnExampleResource = :an_example_resource
Hello,
While creating a bill payment, with the following body:
{"VendorRef"=>{"value"=>"238", "name"=>"Vendor"}, "DocNumber"=>"11761", "TxnDate"=>"2018-01-21", "TotalAmt"=>10.95, "PrivateNote"=>"For Purchase Order: XYZABC", "Line"=>[{"Amount"=>10.95, "LinkedTxn"=>[{"TxnId"=>3385, "TxnType"=>"Bill"}]}], "CurrencyRef"=>{"value"=>"USD"}, "ExchangeRate"=>5.66, "PayType"=>"CreditCard", "CreditCardPayment"=>{"CCAccountRef"=>{"value"=>"771", "name"=>"American Express - 5555"}}}
The payment gets created succesfully, but I get the following Debug Warning:
When I then try to update the bill payment, instead of updating the payment, for some reason, a new payment gets created:
@qbo_api.update(:billpayment, id: qbo_payment_id, payload: purchase_transaction_payload)
Both the issues also happen with vendor credits (ie. Debug and duplication on update)