Walter.Vat 2022.5.18.638 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved

.NET 5.0 .NET Core 3.1 .NET Standard 2.0
There is a newer version of this package available.
See the version list below for details.
Install-Package Walter.Vat -Version 2022.5.18.638
dotnet add package Walter.Vat --version 2022.5.18.638
<PackageReference Include="Walter.Vat" Version="2022.5.18.638" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Walter.Vat --version 2022.5.18.638
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Walter.Vat, 2022.5.18.638"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Walter.Vat as a Cake Addin
#addin nuget:?package=Walter.Vat&version=2022.5.18.638

// Install Walter.Vat as a Cake Tool
#tool nuget:?package=Walter.Vat&version=2022.5.18.638
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

About this package

Allows you to query the VAT interface for the European union or the united kingdom


var vies = await Walter.Vat.EuropeanVatInformationQuery.GetAsync("LU12345678").ConfigureAwait(false);

You can do UK VAT validation (even after brexit) using UK as county code and the 9 or 12 number VAT ID


var vies = await Walter.Vat.EuropeanVatInformationQuery.GetAsync("UK123456789").ConfigureAwait(false);

You could integrate this in a controller using the Walter.Bom NuGet package testing if a country is in the EU


[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> ProcessOrder(Order model)
{
    if (!ModelState.IsValid)
        return View(model);

    if (model.Country.IsInTheEuropeanUnion())
    {
        var vies = await Walter.Vat.EuropeanVatInformationQuery.GetAsync(model.VATNumber).ConfigureAwait(false);
        if (!vies.IsValid || !vies.CompanyName.Equals(model.CompanyName, StringComparison.OrdinalIgnoreCase))
        {
            if (!vies.IsValid)
            {
                if (vies.Exception is null)
                {
                    _logger?.Lazy().LogWarning(vies.Exception, "Query European VAT failed with a for {vat} in {country}", model.VATNumber, model.Country);
                }
                else
                {
                    _logger?.Lazy().LogWarning(vies.Exception, "Query European VAT failed with a {exception} exception error {message}", vies.Exception.GetType().Name, vies.Exception.Message);
                }

                ModelState.AddModelError(nameof(model.VATNumber), "The VAT number is not valid");
            }

            if (!vies.CompanyName.Equals(model.CompanyName, StringComparison.OrdinalIgnoreCase))
            {
                ModelState.AddModelError(nameof(model.VATNumber), $"The VAT ID provided is belongs to another company than the one you specified, did you enter the wrong ID?");
                if (vies.CompanyName.Contains(model.CompanyName, StringComparison.OrdinalIgnoreCase))
                {
                    ModelState.AddModelError(nameof(model.CompanyName), $"The VAT number provided is belongs to {vies.CompanyName}, this sounds like {model.CompanyName} but you should update it to avoid complications.");
                }
                else
                {
                    ModelState.AddModelError(nameof(model.CompanyName), $"The VAT number provided is belongs to {vies.CompanyName} did you provide the wrong name?");
                }
            }

            return View(model);
        }
    }
}
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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
2022.6.21.647 34 6/21/2022
2022.5.18.638 75 5/19/2022
2022.5.16.853 46 5/19/2022
2022.5.16.816 63 5/16/2022
2022.5.4.1010 70 5/4/2022
2022.4.10.947 90 4/10/2022
2022.4.10.925 67 4/10/2022
2022.4.10.828 64 4/10/2022
2022.4.1.1545 86 4/1/2022
2022.3.31.823 72 3/31/2022
2022.3.26.1103 67 3/26/2022
2022.3.26.820 58 3/26/2022
2022.3.25.840 66 3/26/2022
2022.3.24.1701 72 3/25/2022
2022.2.16.1131 105 2/17/2022
2022.2.16.834 93 2/17/2022
2022.2.5.1114 91 2/5/2022
2022.1.17.1158 98 1/17/2022
2022.1.10.1505 99 1/10/2022
2022.1.10.537 91 1/10/2022
2022.1.5.1139 92 1/8/2022
2021.12.28.1452 108 12/28/2021
2021.12.16.812 143 12/16/2021
2021.11.23.1528 6,363 11/24/2021
2021.11.21.925 105 11/22/2021
2021.11.19.847 189 11/19/2021
2021.11.18.1824 121 11/16/2021
2021.11.10.852 123 11/10/2021
2021.11.9.2021 118 11/9/2021
2021.11.8.2109 135 11/9/2021
2021.11.8.1612 140 11/8/2021
2021.11.7.1021 128 11/8/2021
2021.11.3.1612 142 11/4/2021
2021.11.1.1102 165 11/1/2021
2021.10.25.1206 205 10/25/2021
2021.10.23.1310 171 10/25/2021
2021.10.19.1522 174 10/19/2021
2021.10.16.1325 189 10/18/2021
2021.10.6.1546 326 10/6/2021
2021.10.5.1450 167 10/5/2021
2021.10.4.1155 209 10/5/2021
2021.10.4.807 192 10/5/2021
2021.10.1.753 163 10/1/2021
2021.9.29.1127 151 9/29/2021
2021.9.27.1005 175 9/28/2021
2021.9.26.1913 187 9/26/2021
2021.9.19.1015 184 9/19/2021
2021.9.17.1702 175 9/17/2021
2021.9.17.1449 155 9/17/2021
2021.9.13.1600 195 9/13/2021
2021.9.12.1100 178 9/13/2021
2021.9.11.2004 216 9/11/2021
2021.9.9.1110 183 9/9/2021
2021.9.7.1901 209 9/8/2021
2021.9.6.1518 169 9/7/2021
2021.9.4.1124 159 9/4/2021
2021.9.2.708 165 9/4/2021
2021.9.0.1259 163 9/2/2021
2021.8.2100 176 8/23/2021
2021.8.22.900 160 8/22/2021
2021.8.18.1500 179 8/18/2021
2021.8.18.930 182 8/18/2021
2021.8.14.1600 170 8/16/2021
2021.8.14.829 174 8/14/2021
2021.8.8.1612 163 8/8/2021
2021.8.8.1138 162 8/8/2021
2021.8.6.1044 220 8/6/2021
2021.8.4.1355 197 8/5/2021
2021.7.30.2118 230 7/31/2021
2021.7.27.926 192 7/28/2021
2021.7.23.931 152 7/26/2021
2021.7.22.1456 158 7/23/2021
2021.7.15.1547 179 7/15/2021
2021.7.13.812 206 7/13/2021
2021.7.8.1527 300 7/10/2021
2021.7.5.1649 183 7/5/2021
2021.6.29.1453 240 6/30/2021
2021.6.26.1753 221 6/27/2021
2021.6.25.1849 205 6/25/2021
2021.6.24.1518 200 6/24/2021
2021.6.20.729 236 6/20/2021
2021.6.15.2006 189 6/15/2021
2021.6.14.2025 195 6/15/2021
2021.6.13.2035 180 6/14/2021
2021.6.12.1154 167 6/13/2021
2021.6.9.1120 161 6/9/2021
2021.6.7.2103 165 6/7/2021
2021.6.3.1509 236 6/3/2021
2021.5.31.1533 229 5/31/2021
2021.5.31.1415 229 5/31/2021
2021.5.25.1732 233 5/25/2021
2021.5.24.1128 226 5/24/2021
2021.5.24.1019 185 5/24/2021
2021.5.12.1054 180 5/12/2021
2021.5.12.637 164 5/12/2021
2021.5.10.1442 189 5/11/2021
2021.5.8.1226 192 5/8/2021
2021.5.6.2037 229 5/6/2021
2021.5.5.1901 212 5/6/2021
2021.5.3.1621 183 5/4/2021
2021.5.1.905 212 5/1/2021
2021.4.28.1511 194 4/28/2021
2021.4.20.1520 187 4/21/2021
2021.4.16.738 197 4/21/2021
2021.4.14.1216 194 4/16/2021
2021.4.9.1538 187 4/13/2021
2021.4.8.947 176 4/13/2021
2021.4.6.1235 174 4/6/2021
2021.4.5.1653 200 4/5/2021
2021.4.1.913 194 4/1/2021
2021.3.31.2003 227 4/1/2021
2021.3.18.1622 185 3/18/2021
2021.3.3.1259 218 3/3/2021
2021.3.2.1415 173 3/2/2021
2021.3.1.11 203 2/28/2021
2021.3.1.1 199 2/27/2021
2021.3.1 205 2/27/2021
2021.2.23.6 226 2/23/2021
2021.2.21.1 189 2/21/2021
2021.2.20.1 204 2/20/2021
2021.2.19.2 183 2/19/2021
2021.2.18.6 191 2/19/2021
2021.2.17.1 202 2/17/2021
2021.2.16.1 182 2/16/2021
2021.2.15.3 189 2/15/2021
2021.2.15.1 182 2/14/2021
2021.2.14.3 196 2/14/2021
2021.2.12.6 185 2/12/2021
2021.2.12.2 198 2/12/2021
2021.2.11.1 201 2/11/2021
2021.2.10.1 196 2/10/2021
2021.2.8.1 197 2/9/2021
2021.2.7.1 196 2/6/2021
2020.12.27.6 252 12/27/2020
2020.12.27.1 220 12/27/2020
2020.12.26.7 233 12/27/2020
2020.12.26.5 226 12/27/2020
2020.12.26.3 231 12/27/2020
2020.12.19.1 340 12/19/2020
2020.12.16.1 222 12/16/2020
2020.12.15.1 213 12/15/2020
2020.12.14.5 237 12/14/2020
2020.12.14.4 236 12/14/2020
2020.12.14.3 257 12/14/2020
2020.12.5 319 12/5/2020
2020.12.4.1 236 12/4/2020
2020.12.4 235 12/4/2020
2020.12.2.3 267 12/2/2020
2020.12.1 252 12/1/2020
2020.11.28 256 11/28/2020
2020.11.27.2 234 11/27/2020
2020.11.25.1 219 11/25/2020
2020.11.22.3 482 11/23/2020
2020.11.20.1 302 11/21/2020
2020.11.19.3 262 11/19/2020
2020.11.18.1 285 11/18/2020
2020.11.15.1 270 11/15/2020
2020.11.11.1 243 11/11/2020
2020.11.8.1 4,870 11/8/2020
2020.11.5.1 235 11/5/2020
2020.11.3.1 267 11/3/2020
2020.10.30.1 281 11/1/2020
2020.10.15.3 256 10/15/2020
2020.10.15.2 230 10/15/2020
2020.10.14.1 246 10/14/2020
2020.10.13.1 264 10/13/2020
2020.10.12.2 326 10/12/2020
2020.10.12.1 254 10/12/2020
2020.10.10.1 398 10/10/2020
2020.10.9.6 255 10/9/2020
2020.10.9.5 259 10/9/2020
2020.10.9.2 265 10/9/2020
2020.10.9.1 266 10/9/2020
2020.10.6.8 286 10/7/2020
2020.10.6.7 294 10/7/2020
2020.10.6.6 270 10/7/2020
2020.10.6.5 282 10/7/2020
2020.10.6.4 261 10/7/2020
2020.10.6.3 297 10/7/2020
2020.10.6.1 274 10/7/2020
2020.10.5.1 288 10/6/2020
2020.10.1.3 241 10/1/2020
2020.10.1.2 245 10/1/2020
2020.10.1.1 238 10/1/2020
2020.9.29.10 298 9/29/2020
2020.9.29.9 299 9/29/2020
2020.9.28.1 265 9/28/2020
2020.9.25.1 404 9/26/2020
2020.9.24.2 258 9/24/2020
2020.9.17.2 276 9/17/2020
2020.9.16 302 9/16/2020
2020.9.15 316 9/16/2020
2020.9.14 284 9/14/2020

Major releases that add functionality other than optimization and minor bug fixing
4 May 2022
- Update NuGet References

15 March 2022
- update to 6.0.3


16 December 2021
- Update to .Net SDK update 14 December for .NET CORE 3.1.416, and .NET 5.0.404 and 6.0.101

9 November 2021
- Fix package dependency on vulnerable packages from Microsoft by upgrading vulnerable packages

8 November 2021
- Update to .Net NuGet packages .NET 6.0.0, .NET 5.0.403 and core 3.1.415

11 October 2021
- CodeSign the binaries as well as the NuGet package for executing in a trust-platform
- Add support for VAT lookup in Scotland,Norther island and England via country code GeoLocation.UnitedKingdom

19 September
- Update NuGet packages release for .Net 5.0.10

8 Aug 2021
- update to .NET 6.0 SDK (v6.0.100-preview.6)

30 June 2021
- Add .Net 6.0 binaries to the nuget package

15 June 2021
- Update to .Net Core 3.1.17 and .Net 5.0.8 SDK

09 June 2021
- Update to .Net SDK 5.0.301 and 3.1.410

07 June 2021
- Update NuGet Package references

25 May 2021
- Update after .net package updates

12 April 2021
- Update to new code base after .net security violation fix

05 April 2021
- update package references
- Add support for .Net Standard 2.0

22 March 2021
- Performance update

05 March 2021
- Update package reference
- Making it easier to integrate in Walter.Web.Firewall module

19  February 2021
- Add support for 32 bit
- Add AditLog storing the last 50 records

12 February 2021
- Framework extension changes
- Update package references

25 January 2021
- Update package references

02 January 2021
- Updated terms and conditions to REL. 2021.01.02

29 December 2020
- Update package references

19-20 December 2020
- Update package references

14 December 2020
- Update package references

11 December 2020
- Update package references
- Compile with Language version 9.0

04 December 2020
-Update package references

22 November 2020
- Update compiler hints improving .net Core 3.1 and .Net 5.0 compiled binaries

11 November 2020
- Update packages and support .Net 5.0

14 October 2020
- Update to .net core 3.1.4

05 October 2020
- Update NuGet Package References
- Update EULA

26 September 2020
- Add json constructor for ViesReply for easy json serialization

17 September 2020
- Add Exception to View response dataset documenting the reason of a failure without raising it

15 September 2020
- updated documentation
https://firewallapi.asp-waf.com/?topic=html/T-Walter.Vat.EuropeanVatInformationQuery.htm
14 September 2020 initial release