KajetanKazimierczak.SwedishBankAccounts 1.0.16

There is a newer version of this package available.
See the version list below for details.
dotnet add package KajetanKazimierczak.SwedishBankAccounts --version 1.0.16                
NuGet\Install-Package KajetanKazimierczak.SwedishBankAccounts -Version 1.0.16                
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="KajetanKazimierczak.SwedishBankAccounts" Version="1.0.16" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KajetanKazimierczak.SwedishBankAccounts --version 1.0.16                
#r "nuget: KajetanKazimierczak.SwedishBankAccounts, 1.0.16"                
#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 KajetanKazimierczak.SwedishBankAccounts as a Cake Addin
#addin nuget:?package=KajetanKazimierczak.SwedishBankAccounts&version=1.0.16

// Install KajetanKazimierczak.SwedishBankAccounts as a Cake Tool
#tool nuget:?package=KajetanKazimierczak.SwedishBankAccounts&version=1.0.16                

SwedishBankAccounts

Info

Validate Swedish Bank Account numbers, PlusGiro and BankGiro. The account numbers are validated with checksum calculations.

Based on

bankernaskontonummeruppbyggnad_anvandarmanual_sv.pdf (2024-02-22)

11-modul.pdf

10-modul.pdf

Usage

Instantiate the BankAccount, PlusGiro or BankGiro class and check the IsValid property of the object. If the account is not valid, check the ValidationResult property for details.

Examples

Bank account
var account = new BankAccount(clearigNumber, accountNumber);

if (!account.IsValid)
{
    Console.WriteLine("Account number invalid");
    Console.WriteLine($"Reason: {account.ValidationResult.ToString()}");
    return;
}

Console.WriteLine("Account number valid");
Console.WriteLine($"Validation result: {account.ValidationResult.ToString()}");
Console.WriteLine($"Bank: {account.BankName}");
Console.WriteLine($"Clearing number: {account.ClearingNumber}");
Console.WriteLine($"Account number:  {account.AccountNumber}");

The BankAccount class can be instantiated with full account number (clearing number and account number combined), but the parsing could be wrong for Swedbank accounts starting with an 8 if the clearing number has 5 digits. If possible, use the above constructor.

var account = new BankAccount(fullAccountNumber);
PlusGiro
var account = new PlusGiro(accountNumber);

if (!account.IsValid)
{
    Console.WriteLine("Account number invalid");
    Console.WriteLine($"Reason: {account.ValidationResult.ToString()}");
    return;
}

Console.WriteLine("Account number valid");
Console.WriteLine($"Validation result: {account.ValidationResult.ToString()}");
BankGiro
var account = new BankGiro(accountNumber);

if (!account.IsValid)
{
    Console.WriteLine("Account number invalid");
    Console.WriteLine($"Reason: {account.ValidationResult.ToString()}");
    return;
}

Console.WriteLine("Account number valid");
Console.WriteLine($"Validation result: {account.ValidationResult.ToString()}");
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 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.0 is compatible.  netstandard1.1 was computed.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  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 tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wp8 was computed.  wp81 was computed.  wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 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.1.0-beta3 207 3/10/2024
1.1.0-beta2 651 8/15/2023
1.1.0-beta1 569 5/16/2023
1.0.17 85 12/23/2024
1.0.16 79 12/23/2024
1.0.15 10,915 3/10/2024
1.0.14 11,395 8/15/2023
1.0.13 5,685 3/7/2023
1.0.12 1,558 1/19/2023
1.0.11 3,530 7/29/2022
1.0.10 1,577 11/11/2021
1.0.9 12,246 1/11/2021
1.0.8 945 11/23/2020
1.0.7 2,421 6/27/2020
1.0.6 1,018 3/11/2020
1.0.5 978 3/11/2020
1.0.4 1,000 3/10/2020
1.0.3 1,162 4/9/2019
1.0.2 1,090 3/29/2019
1.0.1 1,102 3/28/2019
1.0.0 1,135 3/26/2019
1.0.0-beta 939 3/21/2019

Added .NET9 target.
     Removed .NET6 and .NET9