View Source VatchexGreece (VatchexGreece v0.7.0)
Main module of VatchexGreece
that contains high-level functions that the
user typically will interact with.
Link to this section Summary
Functions
Define a new struct that will be manipulated from containing only the minimal information required to query the SOAP API, to containing the complete request, the SOAP API response, and the parsed information thereof into the corresponding structs.
Link to this section Functions
Pull information from the web service for the target VAT ID afm_called_for
defined in the Results
struct that has first been created with new/4
.
Note: the function minimizes and checks the source and target VAT IDs, and only sends the request to the API if both minimized VAT IDs are valid.
new(afm_called_for, username, password, afm_called_by)
View Source (since 0.7.0)Define a new struct that will be manipulated from containing only the minimal information required to query the SOAP API, to containing the complete request, the SOAP API response, and the parsed information thereof into the corresponding structs.
You need to pass authentication parameters username
, password
and the
source VAT ID afm_called_by
as parameters.
examples
Examples
Typically, you will pass a valid 9-digit VAT ID, with or without the "EL" prefix:
new("123456783", ...) # valid (dummy) 9-digit VAT ID
new("EL123456783", ...) # ditto, with "EL" prefix that will get stripped
Older VAT IDs only have 8 digits, and will get leading-zero-padded to 9 digits:
new("11111067", ...) # valid (dummy) 8-digit VAT ID