Can't edit Sale.SalePayments

NiguNigu Posts: 5Member

Hello!

I'm trying to replace Sale.SalePayments, but instead of replacement of old Payments with new one I just have new SalePayment item added. Also I can't find endpoint to remove SalePayments too. Is there any way to replace old SalePayments with new one? Sale is not completed.

Example:

Query: PUT ../Account/<account_number>/Sale/1889.json
Playload:  {"SalePayments":{"SalePayment":[{"amount":3.21,"paymentTypeID":7}]}}
Result: 
{
  "@attributes": {
    "count": "1"
  },
  "Sale": {
    "saleID": "1889",
    "timeStamp": "2019-02-11T08:36:36+00:00",
		...
    "SalePayments": {
      "SalePayment": [
        {
          "salePaymentID": "1393",
          "amount": "3.21",
					...
          }
        }
      ]
    },
    "taxTotal": "2.51"
  }
}
Sign In or Register to comment.