xero-ruby
xero-ruby copied to clipboard
Tax rate creation not working as advertised?
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.
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).
@JSFernandes fyi on the latest for this https://github.com/OAI/OpenAPI-Specification/discussions/2770