Mews.Fiscalizations.Italy
7.0.1
Prefix Reserved
See the version list below for details.
dotnet add package Mews.Fiscalizations.Italy --version 7.0.1
NuGet\Install-Package Mews.Fiscalizations.Italy -Version 7.0.1
<PackageReference Include="Mews.Fiscalizations.Italy" Version="7.0.1" />
paket add Mews.Fiscalizations.Italy --version 7.0.1
#r "nuget: Mews.Fiscalizations.Italy, 7.0.1"
// Install Mews.Fiscalizations.Italy as a Cake Addin #addin nuget:?package=Mews.Fiscalizations.Italy&version=7.0.1 // Install Mews.Fiscalizations.Italy as a Cake Tool #tool nuget:?package=Mews.Fiscalizations.Italy&version=7.0.1
📃 Description
A client library for reporting invoices through SDI (Sistema di interscambio) using Uniwix API. Here are the main parts of the library:
- Uniwix Client that handles communication with the SDI through Uniwix API.
- DTOs that can be serialized into XML conforming to the FatturaPA format (the official format in which all invoices need to be reported).
- DTOs for handling messages sent by the Uniwix/SDI.
⚙️ Installation
The library can be installed through NuGet packages or the command line as mentioned below:
Install-Package Mews.Fiscalizations.Italy
🎯 Features
- Functional approach via FuncSharp.
- No Italian abbreviations.
- Early data validation.
- Asynchronous I/O.
- All endpoints are covered with tests.
- Intuitive immutable DTOs.
- Cross platform (uses .NET Standard).
📦 NuGet
We have published the library as Mews.Fiscalizations.Italy.
🔐 Security protocol
- TLS 1.0 protocol must be enabled, that can be achieved by adding the following line to your code:
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls;
👀 Code Examples
Listed below are some of the common examples. If you want to see more code examples, please check the Tests.
Uniwix Client can be created using the Username and Password which can be created through Uniwix website.
- Invoices can be reported to the SDI using
SendInvoiceAsync
API which requires theElectronicInvoice
(the invoice to be reported) as a parameter. - Invoice can be retrieved using
SendInvoiceAsync
API which requires thefileId
of the invoice that was already submitted as a parameter. - It is possible to confirm that the credentials are valid using
VerifyCredentialsAsync
API which would return a flag that indicates if the credentials are valid or not.
Create Electronic invoice
var invoice = new ElectronicInvoice
{
Version = VersioneSchemaType.FPR12,
Header = invoiceHeader,
Body = new[] { invoiceBody }
};
Create invoice header
var header = new ElectronicInvoiceHeader
{
TransmissionData = new TransmissionData
{
SequentialNumber = "1",
DestinationCode = "1234567",
TransmitterId = senderId,
TransmissionFormat = TransmissionFormat.FPR12,
},
Provider = new Provider
{
IdentificationData = new IdentificationData
{
VatTaxId = senderId,
Identity = new Identity
{
CompanyName = "Italian company ltd."
},
FiscalRegime = FiscalRegime.Ordinary
},
OfficeAddress = address
},
Buyer = new Buyer
{
IdentityData = new SimpleIdentityData
{
Identity = new Identity
{
FirstName = "John",
LastName = "Smith"
},
TaxCode = "SDASDA96L27H501H"
},
OfficeAddress = address
}
};
Create sender id
var senderId = new SenderId
{
CountryCode = Countries.Italy.Alpha2Code,
TaxCode = "1234567"
};
Create address
var address = new Address
{
Street = "Roma Street",
City = "Rome",
CountryCode = Countries.Italy.Alpha2Code,
ProvinceCode = "RM",
Zip = "00031"
};
Create invoice body
var invoiceBody = new ElectronicInvoiceBody
{
GeneralData = new GeneralData
{
GeneralDocumentData = new GeneralDocumentData
{
DocumentType = DocumentType.Invoice,
CurrencyCode = "EUR",
IssueDate = DateTime.UtcNow,
DocumentNumber = "1",
TotalAmount = 100m
}
},
ServiceData = new ServiceData
{
InvoiceLines = new[] { invoiceLine },
TaxSummary = new[] { taxSummary }
},
PaymentData = new[] { paymentData }
};
Create invoice line
var invoiceLine = new InvoiceLine
{
LineNumber = "1",
Description = "Item 1",
UnitCount = 1m,
PeriodStartingDate = DateTime.UtcNow,
PeriodClosingDate = DateTime.UtcNow,
UnitPrice = 100m,
TotalPrice = 100m,
VatRate = 10m
};
Create tax rate summary
var taxSummary = new TaxRateSummary
{
VatRate = 10m,
TaxAmount = 9m,
TaxableAmount = 90m,
VatDueDate = VatDueDate.Immediate
};
Create payment data
var paymentData = new PaymentData
{
PaymentDetails = new [] { paymentDetail },
PaymentTerms = PaymentTerms.LumpSum
};
Create payment detail
var paymentDetail = new PaymentDetail
{
PaymentMethod = PaymentMethod.Cash,
PaymentAmount = 100m
};
Product | Versions 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. |
-
.NETStandard 2.0
- FuncSharp (>= 3.0.1)
- Mews.Fiscalizations.Core (>= 3.0.2)
- Newtonsoft.Json (>= 12.0.3)
- System.Net.Http (>= 4.3.4)
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 |
---|---|---|
13.0.0 | 363 | 1/29/2024 |
12.0.1 | 112 | 10/4/2023 |
12.0.0 | 626 | 8/27/2023 |
11.0.2 | 728 | 8/2/2023 |
11.0.1 | 794 | 7/26/2023 |
11.0.0 | 767 | 7/24/2023 |
10.0.0 | 848 | 3/24/2023 |
9.0.5 | 846 | 3/13/2023 |
9.0.4 | 828 | 3/10/2023 |
9.0.3 | 873 | 12/16/2022 |
9.0.2 | 994 | 10/21/2022 |
9.0.1 | 1,009 | 10/17/2022 |
9.0.0 | 988 | 9/6/2022 |
8.0.2 | 1,029 | 7/4/2022 |
8.0.1 | 1,035 | 1/20/2022 |
8.0.0 | 1,009 | 1/19/2022 |
7.0.1 | 940 | 11/5/2021 |
7.0.0 | 919 | 7/27/2021 |
6.0.0 | 920 | 7/21/2021 |
5.0.0 | 950 | 5/25/2021 |