Peppol.PintAe.CodeLists
1.0.4
dotnet add package Peppol.PintAe.CodeLists --version 1.0.4
NuGet\Install-Package Peppol.PintAe.CodeLists -Version 1.0.4
<PackageReference Include="Peppol.PintAe.CodeLists" Version="1.0.4" />
<PackageVersion Include="Peppol.PintAe.CodeLists" Version="1.0.4" />
<PackageReference Include="Peppol.PintAe.CodeLists" />
paket add Peppol.PintAe.CodeLists --version 1.0.4
#r "nuget: Peppol.PintAe.CodeLists, 1.0.4"
#:package Peppol.PintAe.CodeLists@1.0.4
#addin nuget:?package=Peppol.PintAe.CodeLists&version=1.0.4
#tool nuget:?package=Peppol.PintAe.CodeLists&version=1.0.4
Peppol.PintAe.CodeLists
Strongly typed .NET code lists for Peppol PINT AE electronic invoicing, generated from the official Peppol Genericode (.gc) files.
No magic strings — every code is a compile-time constant with validation, lookup, and enumeration built in.
Install
dotnet add package Peppol.PintAe.CodeLists
Quick Start
using Peppol.PintAe.CodeLists.Generated;
// Parse a code
var country = CountryCode.Parse("DK");
Console.WriteLine(country.Name); // "Denmark"
// Safe parse
if (CurrencyCode.TryParse("EUR", out var currency))
{
Console.WriteLine(currency.Name); // "Euro"
}
// Validate
bool valid = PaymentMeansCode.IsValid("42"); // true
// Enumerate
foreach (var vat in TaxCategoryCode.All)
{
Console.WriteLine($"{vat.Code} - {vat.Name}");
}
Available Code Lists
All classes live in the Peppol.PintAe.CodeLists.Generated namespace.
| Class | Purpose |
|---|---|
CountryCode |
ISO 3166 country codes |
CurrencyCode |
ISO 4217 currencies |
UnitOfMeasureCode |
UN/ECE Rec. 20 units of measure |
PaymentMeansCode |
UN/CEFACT CL.4461 payment methods |
DocumentNameCode |
UN/CEFACT CL.1001 document types |
TaxCategoryCode |
Aligned VAT categories |
TaxExemptionReason |
VAT exemption reasons |
CreditNoteReason |
PINT AE credit note reasons |
TransactionType |
PINT AE transaction types |
ElectronicAddressScheme |
EAS address schemes |
ICDCode |
ISO 6523 identifier schemes |
MediaTypes |
IANA MIME types |
GoodsType |
PINT AE goods types |
ItemType |
PINT AE item types |
BillingFrequency |
PINT AE billing frequencies |
ChargeReasonCode |
UN/CEFACT CL.7161 charge reasons |
AllowanceChargeIdentificationCode |
UN/CEFACT CL.5189 allowance codes |
ItemClassificationCode |
UN/CEFACT CL.7143 classification codes |
InvoicedObjectIdentifierScheme |
UN/CEFACT CL.1153 object ID schemes |
API
Every code list exposes the same static API:
| Member | Returns | Behavior |
|---|---|---|
Parse("CODE") |
entry | Throws CodeListException if not found |
TryParse("CODE", out entry) |
bool |
false if not found |
Find("CODE") |
entry or null |
No exceptions |
Contains("CODE") / IsValid("CODE") |
bool |
Validation |
All |
IReadOnlyList<entry> |
Enumerate all entries |
Count |
int |
Number of entries |
Entry Types
Each code list has an entry class (e.g. CountryCodeEntry) derived from CodeListEntry, with Code, Name, and Description. Each entry is also available as a static constant, e.g. CountryCodeEntry.Denmark, and entries support value equality.
Requirements
- .NET 10.0 or later
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.