freakboy3742 / pyxero

Python API for accessing the REST API of the Xero accounting tool.
BSD 3-Clause "New" or "Revised" License
279 stars 209 forks source link

Fix superfluous JSON/XML tagging in PaymentManager #343

Closed evrimoztamur closed 11 months ago

evrimoztamur commented 11 months ago

Hi team,

When testing payment deletions for a feature I am implementing for a live app (batch2sepa), I noticed that the PaymentManager._delete(self, id) was adding in a wrapping dictionary. This makes the request body get processed as a query encoded string. Xero, granted, fails to parse the body and returns a 500:

image

I only noticed this after checking the app history, making the change in the attached commit leads to the issue being resolved and the payments being deleted correctly.

Let me know if you need any additional information. I hope this will get admitted swiftly!

Kind regards,

Evrim Öztamur