ExVatcheck.VIESClient (ExVatcheck v0.3.1) View Source
The ExVatcheck.Vies module provides a client for the VIES VAT identification number service.
Link to this section Summary
Functions
Queries the VIES service to determine whether or not the provided VAT identification number is valid.
Returns a new VIES client struct which can be used to make requests in
check_vat/3
. If the VIES service times out, or if invalid WSDL is returned
and the checkVat service URL cannot be parsed, an error is returned.
Link to this section Types
Specs
t() :: %ExVatcheck.VIESClient{url: binary()}
Link to this section Functions
Specs
check_vat(t(), binary(), binary()) :: {:ok, map()} | {:error, binary()} | {:error, HTTPoison.Error.t()}
Queries the VIES service to determine whether or not the provided VAT identification number is valid.
Returns {:ok, response}
in the case of a successful call to the service, and
{:error, error}
in the case that the service could not be reached or the XML
response could not be parsed.
Specs
Returns a new VIES client struct which can be used to make requests in
check_vat/3
. If the VIES service times out, or if invalid WSDL is returned
and the checkVat service URL cannot be parsed, an error is returned.