adamcooke / json-vat

A Ruby client library for jsonvat.com
MIT License
69 stars 20 forks source link

vat-rates and jsonvat.com discontinued #17

Open filipkis opened 4 years ago

filipkis commented 4 years ago

Hi Adam,

I saw you discontinued the jsonvat.com and I understand the frustration that EU does not provide a free service like this. So much for open data initiative.

I wonder if the maintenance of the service was more an admin issue, or just not having the time to constantly check and update the rates?

If it's about rate updates, I've notice there are several nice services that provide VAT rate APIs with some free rates. What you could do, instead of hardcoding the data in vat-rates code, fetch it from one of the APIs and cache. For instance both APIs I link bellow have 100 calls for free. So doing a once a day update should be enough with free account. Or, alternatively, you could rewrite this gem to work with one of the APIs and let gem users to add their own API keys.

Either way, I hope you find a way to keep the lib alive, as it would help me and other users of your lib to not need to reimplement our code to achieve the same.

Thanks for all the work so far!

Mentioned services: https://vatsense.com/ https://vatlayer.com/

jarthod commented 4 years ago

Just noticed this too, it's always sad to see a helpful service goes away but I definitely understands and thank you @adamcooke for all the work put into this! I was wondering if you would consider transferring the project to another maintainer / hoster? I would be happy to take it over and host it on my side if you would let me :)

Edit: for people looking for alternatives ruby gems I also found https://github.com/VvanGemert/europe which looks young but interesting ;)

vincentritter commented 4 years ago

Thanks @jarthod and @filipkis for showing some alternatives here.

I recently started using, and integrating billing logic, with jsonvat.com also, and thought it was great and super helpful.

Working with the Europe gem now, although it’s a bit slow and missing the “GB” data. I think something like vatsense.com or vatlayer.com combined with providing a hosted JSON version would be really great - as suggested.

jarthod commented 4 years ago

In my case I ended up reducing my dependency on third parties by hardcoding the rates and adding a test case to verify the online rates from the europa.eu page so if they differ I just have to update the hash. I like the simplicity and robustness of this solution (and it does include UK rate):

https://gist.github.com/jarthod/865b52fa388bbad53da695aa92b4be2a

lemingos commented 4 years ago

@jarthod cool but doesn't work for me. Would probably be better to use some formatted source like https://github.com/valeriansaliou/node-sales-tax/blob/master/res/sales_tax_rates.json

jarthod commented 4 years ago

@lemingos Fell free to ;)

vincentritter commented 4 years ago

Thanks so very much for sharing @jarthod - I actually used the existing temp JSON file I had, and am using that now locally. The gem was too slow. I like the idea of you checking the rates using the part from the Europe gem!

Also agree, less third-party dependency :)