You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this in rails and what i currently do is
take the hash and mutate some keys into different ones that go along my Vat Model's attribute names
assign_attributes that hash to a Vat Model
This worked until it suddenly had these unexpected keys in the "Spanish response".
I understand that the Gem just pushes all the response field pairs into a hash and that's it. Also, there is no way to add country specific validation data to the request (i.e. company name, address, etc), right?
So my questions are:
Is there a set of response key/value pairs that are reliable for every country?
What does one usually do with the rest of the hash?
I could imagine i strip out the expectable key/values and then shove the rest into a jsonb column, never to be seen again? Maybe do something later with it or show it in a view for manual verification, etc. The Estonians send down everything, Germans nothing, and Spaniards comparison values. Not sure what other countries do.
The text was updated successfully, but these errors were encountered:
First of, thank you for the work put into this.
I usually verify only German and Estonian VAT-IDs, but now i came across a Spanish one and my integration blew up.
Turns out the "Spanish response" includes a bunch of abstract test result fields:
(VAT ID anonymized)
I'm using this in rails and what i currently do is
assign_attributes
that hash to a Vat ModelThis worked until it suddenly had these unexpected keys in the "Spanish response".
I understand that the Gem just pushes all the response field pairs into a hash and that's it. Also, there is no way to add country specific validation data to the request (i.e. company name, address, etc), right?
So my questions are:
I could imagine i strip out the expectable key/values and then shove the rest into a jsonb column, never to be seen again? Maybe do something later with it or show it in a view for manual verification, etc. The Estonians send down everything, Germans nothing, and Spaniards comparison values. Not sure what other countries do.
The text was updated successfully, but these errors were encountered: