xero-node
xero-node copied to clipboard
CreateBrandingThemePaymentServices should expect an array of payment services, not a single payment service
- Version observed in 4.5.1 to current
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:
{
"PaymentServices": [{
"PaymentServiceID": "de5c978d-3cbf-4ebb-9ca9-20d7cb196ab1"
}]
}
But it's currently sending:
{
"PaymentService": {
"PaymentServiceID": "de5c978d-3cbf-4ebb-9ca9-20d7cb196ab1"
}
}
line 966 of accountingApi.ts should be changed from
body: ObjectSerializer.serialize(paymentService, "PaymentService")
to
body: ObjectSerializer.serialize(paymentService, "PaymentServices")
Ideally we'd change the parameter name to paymentServices and line 966 to
body: ObjectSerializer.serialize(paymentServices, "PaymentServices").