Skip to content
/ viex Public
forked from Green-Edge/viex

Elixir package to validate European VAT numbers with the VIES service

License

Notifications You must be signed in to change notification settings

doofinder/viex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Viex

Build Status Coverage Status Hex.pm Hex.pm

Elixir package to validate European VAT numbers with the VIES service.

Installation

Add viex to your list of dependencies in mix.exs:

def deps do
  [{:viex, "~> 0.1.0"}]
end

Usage

Use Viex.lookup/1 to look up a European VAT number. Returns a Viex.Response struct containing the company name, address, and a valid key that is either true or false.

iex(1)> Viex.lookup("NL854265259B01")
%Viex.Response{address: "PRINS BERNHARDPLEIN 00200\n1097JB AMSTERDAM", company: "GITHUB B.V.",
  valid: true}

Use Viex.valid?/1 to check the validity of a European VAT number. Returns a boolean.

iex(1)> Viex.valid?("NL854265259B01")
true

About

Elixir package to validate European VAT numbers with the VIES service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%