Elvia.Afiextensions.Schemas 6.2.1

dotnet add package Elvia.Afiextensions.Schemas --version 6.2.1
                    
NuGet\Install-Package Elvia.Afiextensions.Schemas -Version 6.2.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="Elvia.Afiextensions.Schemas" Version="6.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Elvia.Afiextensions.Schemas" Version="6.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Elvia.Afiextensions.Schemas" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Elvia.Afiextensions.Schemas --version 6.2.1
                    
#r "nuget: Elvia.Afiextensions.Schemas, 6.2.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.
#:package Elvia.Afiextensions.Schemas@6.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Elvia.Afiextensions.Schemas&version=6.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Elvia.Afiextensions.Schemas&version=6.2.1
                    
Install as a Cake Tool

Afiextensions Schemas

NuGet NuGet Downloads

A .NET library containing contracts and schemas for publishing messages outside Afiextensions. This package provides strongly-typed event schemas for various business domains including invoices, contracts, tariffs, and more.

📦 Installation

Install the package via NuGet Package Manager:

dotnet add package Elvia.Afiextensions.Schemas

Or via Package Manager Console:

Install-Package Elvia.Afiextensions.Schemas

🏗️ Available Schemas

This library contains event schemas and API contracts organized by domain and version. Each schema includes comprehensive XML documentation for all properties and is accessible through IntelliSense in your IDE.

Invoice Events

Events related to invoice lifecycle and management:

  • InvoiceCreatedEvents.V1 - Invoice creation events from CGI with invoice lines and header data
  • InvoicePostedEvents.V1 - Invoice posting and accounting events
  • InvoiceBalanceEvents.V1 - Invoice balance changes and payment tracking
  • InvoiceDebtCollectionEvents.V1 - Debt collection process events
  • InvoiceAgreementEvents.V1 - Invoice agreement lifecycle events

Contract Management

Contract operations and GDPR compliance:

  • ContractsApi.V1 / V2 - API contracts for managing billing blocks, payment agreements, sundry expenses, and supplementary products. V2 includes additional operations like UpdateBankAccountNumber, UpdateIndustryCode, and UpdateInvoiceDeliverySettings
  • ContractGdprDeletionCandidate.V1 - GDPR deletion candidates for contracts

Customer Data

Customer-related events and GDPR compliance:

  • CustomerGdprDeletionCandidate.V1 - GDPR deletion candidates for customer data

Billing & Sales

Sales order and billing events:

  • CompensationDemandEvents.V1 - Compensation demand creation and processing
  • SundryExpenseEvents.V1 - Sundry expense sale events
  • SupplementaryProductEvents.V1 - Supplementary product sale events
  • SalesOrderEvents.V1 - Sales order lifecycle events

Tariff & Pricing

Tariff and grid pricing schemas:

  • TariffEvents.V1 - Tariff change and update events
  • GridTariffEvents.V1 - Grid tariff specific events

Data Products

Data product schemas and APIs:

  • DataProduct.V1 - Core data product schemas (e.g., Invoice data products)
  • DataProductApi.V1 - Data product API contracts
  • EidsivaDataProductApi.V1 - Eidsiva-specific data product API

Power Management

Power consumption and rationing:

  • PowerRationingEvent.V1 - Power rationing events including metering point info, baseline/quota volumes, consumption surcharges, and rationing levels
  • AnnualConsumptionQuarantineEvents.V1 - Annual consumption quarantine processing

Time Series

Time series data requests:

  • TimeSeriesRequestEvents.V1 - Time series data request and processing events

Versioning: All schemas follow semantic versioning with separate V1, V2, etc. namespaces for breaking changes. Import the specific version namespace you need, e.g., using Afiextensions.Schemas.InvoiceCreatedEvents.V1;

🚀 Usage

All schemas include comprehensive XML documentation that appears in IntelliSense, making it easy to discover available properties and their meanings.

using Afiextensions.Schemas.InvoiceCreatedEvents.V1;

// Example: Working with invoice created events
var invoiceEvent = new InvoiceCreatedEvent(
    id: "event-123",
    accountCode: "12345",
    actorId: 87654321,
    cid: "123456789",
    createdTime: DateTime.UtcNow,
    dueDate: DateTime.UtcNow.AddDays(30),
    externalCustomerGuid: "guid-here",
    externalCustomerReference: "ref-123",
    invoice: myInvoice,
    invoiceAgreementId: 98765,
    invoiceBalance: 1500.50m,
    invoiceNumber: 123456
);
using Afiextensions.Schemas.ContractsApi.V2;

// Example: Creating a payment agreement
var paymentAgreement = new CreatePaymentAgreement(
    InvoiceNumber: 123456,
    FirstDueDate: DateTimeOffset.UtcNow.AddDays(7),
    IntervalDays: 30,
    NumberOfPayments: 3,
    CalculateInterestRate: true,
    ImmediatePrint: false
);
using Afiextensions.Schemas.PowerRationingEvent.V1;

// Example: Working with power rationing events
var rationingEvent = new PowerRationingInfoEvent(
    eventId: "event-456",
    meteringPointId: "707057500000000001",
    customerNumber: "12345678",
    customerGuid: Guid.NewGuid(),
    consumptionCode: "C01",
    industryCode: "I01",
    meteringPointAddress: address,
    baselineVolume: 1000m,
    quotaVolume: 900m,
    overConsumptionSurcharge: 1.5m,
    level: 2,
    fromDate: DateTime.UtcNow,
    toDate: DateTime.UtcNow.AddMonths(1)
);

💡 Tip: Hover over any type or property in your IDE to see detailed documentation including parameter descriptions, Norwegian translations, and field constraints.

🔄 Development & Release Process

Development Workflow

Every push to the trunk branch automatically creates a preview NuGet package with version format 1.2.3-preview.4

Release Process

To create a stable release:

  1. Navigate to Releases in the GitHub repository
  2. Click Draft release
  3. Create a new tag via Choose a tag (follow Semantic Versioning)
  4. Write a description of the changes
  5. Publish the release

This will trigger the creation of a stable release NuGet package (e.g., 1.2.3)

🛠️ Technical Details

  • Target Framework: .NET 10.0
  • Nullable Reference Types: Enabled
  • Documentation: XML documentation generated for all public APIs

📋 Requirements

  • .NET 10.0 or later

📄 License

This project is licensed under the MIT License.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Elvia.Afiextensions.Schemas:

Package Downloads
Elvia.Kunde.InvoiceFiltering

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.2.1 1,661 4/21/2026
6.2.1-preview.1-2 52 4/21/2026
6.2.0 421 4/17/2026
6.1.4-preview.1-2 63 4/16/2026
6.1.3 524 4/8/2026
6.1.3-preview.1-2 47 4/8/2026
6.1.2 120 4/8/2026
6.1.2-preview.1-2 51 4/8/2026
6.1.1 98 4/8/2026
6.1.1-preview.1-2 52 4/8/2026
6.1.0 289 4/7/2026
6.0.1-preview.1-3 52 4/7/2026
6.0.0 485 3/23/2026
5.6.3-preview.1-2 51 3/23/2026
5.6.2 596 3/16/2026
5.6.2-preview.1-2 61 3/16/2026
5.6.1 343 3/6/2026
5.6.0 293 3/2/2026
5.5.1-preview.1-9 60 3/2/2026
5.5.1-preview.1-6 58 2/17/2026
Loading failed