Closed applecran closed 2 years ago
Hey @applecran good catch. I've just tested this in the sample app and confirmed the API accepts both formats 🤔
We'll look to update the SDK method so it reflects the docs and accepts an array of PaymentServices
.
I just want to confirm with the API team regarding expected behavior before releasing the change
Sorry, github auto closed this issue. Will update/close once the updated SDK has been released
Describe the bug The api docs, and my testing show that this function should be posting an object with an array of Payment Services in it, and not a single payment service. (https://developer.xero.com/documentation/api/accounting/brandingthemes#post-paymentservices)
The api is expecting the body to be:
But it's currently sending:
line 966 of accountingApi.ts should be changed from
body: ObjectSerializer.serialize(paymentService, "PaymentService")
tobody: ObjectSerializer.serialize(paymentService, "PaymentServices")
Ideally we'd change the parameter name to paymentServices and line 966 to
body: ObjectSerializer.serialize(paymentServices, "PaymentServices").