xero-ruby icon indicating copy to clipboard operation
xero-ruby copied to clipboard

Tax rate creation not working as advertised?

Open JSFernandes opened this issue 3 years ago • 2 comments

Heya 👋

I work in a project which recently migrated to XeroRuby. Today we came across a bug where tax rates were not being created correctly when passing a collection of XeroRuby::Accounting::TaxRates to XeroRuby::AccountingApi#create_tax_rates. Only one of the tax rates was being created, rather than the entire collection.

After looking at the Xero API documentation, it seems this is intended behaviour: https://developer.xero.com/documentation/api/accounting/taxrates/#post-taxrates

Use this method to create or update a tax rate. Only one tax rate can be created or updated per request.

I think that XeroRuby should drop create_tax_rates in favour of a single create_tax_rate. Would this be acceptable? Let me know if so, and I'll prepare a PR.

JSFernandes avatar Oct 07 '21 12:10 JSFernandes

Thanks for reporting @JSFernandes.

Agree with your thoughts here. We'll handle this internally, as it's a minor change & will be required upstream in the SDK generators or OpenAPI Spec (OAS).

rjaus avatar Oct 27 '21 05:10 rjaus

@JSFernandes fyi on the latest for this https://github.com/OAI/OpenAPI-Specification/discussions/2770

RettBehrens avatar Oct 27 '21 20:10 RettBehrens