Mews.Fiscalizations.Czechia 4.0.1

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

// Install Mews.Fiscalizations.Czechia as a Cake Tool
#tool nuget:?package=Mews.Fiscalizations.Czechia&version=4.0.1                

📃 Description

EET stands for Elektronická Evidence Tržeb, which is the Czech version of Fiscal Printers. It's an online API provided by the Ministry of Finance in a form of a SOAP Web Service.

⚙️ Installation

The library can be installed through NuGet packages or the command line as mentioned below:

Install-Package Mews.Fiscalizations.Czechia

🎯 Features

  • Functional approach via FuncSharp.
  • No Czech abbreviations.
  • Early data validation.
  • Asynchronous I/O.
  • All endpoints are covered with tests.
  • Intuitive immutable DTOs.
  • Cross platform (uses .NET Standard).
  • Logging support
  • SOAP communication (including WS-Security signing).
  • PKP and BKP security code computation.

❗ Known issues

  • 8: As the communication is done fully via HTTPS, we postponed the implementation of response signature verification. It's a potential security risk that will be addressed in upcoming releases.

🔐 Security protocol

  • TLS 1.2 protocol must be enabled, that can be achieved by adding the following line to your code:
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12

📦 NuGet

We have published the library as Mews.Fiscalizations.Czechia.

👀 Code Examples

Listed below are some of the common examples. If you want to see more code examples, please check the Tests.

var certificate = new Certificate(
    password: "certificatePassword",
    data: certificateContentsByteArray
);

var record = new RevenueRecord(
    identification: new Identification(
        taxPayerIdentifier: new TaxIdentifier("CZ1234567890"),
        registryIdentifier: new RegistryIdentifier("01"),
        premisesIdentifier: new PremisesIdentifier(1),
        certificate: certificate
    ),
    revenue: new Revenue(
        gross: new CurrencyValue(1234.00m)
    ),
    billNumber: new BillNumber("2016-321")
);

var securityCode = record.SecurityCode; // BKP
var signature = record.Signature; // PKP

var client = new EetClient(certificate);
var response = await client.SendRevenueAsync(record);
if (response.IsSuccess)
{
    var fiscalCode = response.Success.FiscalCode;
}
  • More examples are presented here.
  • Some of the data items are explained here.

🏭 Who uses the library in production?

  • Mews - Property Management Solution for the 21st century.
  • Hlídač EET - Watchdog of the EET API endpoint and related services.
  • Keszh, Neszh - Hart Internal ERP System
  • Ankerdata EasiPOS - POS system
  • sySOft - POS system

👍 Credits

Development: @jirihelmich

Code review: @siroky, @onashackem

Contribution: @tomasdeml: PR#3

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.