Cryptolens.VATCalculator 1.0.1

dotnet add package Cryptolens.VATCalculator --version 1.0.1                
NuGet\Install-Package Cryptolens.VATCalculator -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cryptolens.VATCalculator" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cryptolens.VATCalculator --version 1.0.1                
#r "nuget: Cryptolens.VATCalculator, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Cryptolens.VATCalculator as a Cake Addin
#addin nuget:?package=Cryptolens.VATCalculator&version=1.0.1

// Install Cryptolens.VATCalculator as a Cake Tool
#tool nuget:?package=Cryptolens.VATCalculator&version=1.0.1                

VAT Calculator

This library does two things:

  1. Computes the VAT given a country and a VAT number.
  2. Verifies VAT number with the EU Comission's SOAP app.

When verifying VAT number, don't view this as an on-demand service, since it might fail occasionally due to errors or maintenance (see this document)

Examples

[Fact]
public void TestCalculateVAT()
{
    // if it's a Swedish company (or any other EU member state)
    // but no VAT is given, then the tax should be 25%.
    Assert.Equal(2500, VATService.CalculateVAT("SE", null).Tax);

    // if it's a Swedish company (or any other EU member state)
    // and a valid VAT is provided, then no tax is applied and
    // it's instead the responsibility of the buyer  to pay it
    // (reversed tax liability)
    Assert.Equal(0, VATService.CalculateVAT("SE", "valid VAT").Tax);

    // if it's a US company (or any other non-EU country), then
    // it's export and no tax should be applied.
    Assert.Equal(0, VATService.CalculateVAT("US", null).Tax);
}

[Fact]
public void TestIsValidVAT()
{
    // before we can compute the tax, we need to check the VAT
    // with the EU comission's API. Note, this service is not
    // working 24/7, so we may need to check the VAT serveral times.
    Assert.True(VATService.IsValidVAT("SE559116174901").IsValid);
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 990 9/3/2018
1.0.0 756 8/29/2018

Update metadata.