- No Greek abbreviations.
- Early data validation.
- Immutable DTOs.
- Logging support
We tend to use immutable DTOs wherever possible, especially to ensure data validity. We want the library to throw an error as soon as possible, i.e. when constructing corresponding data structures. That is why we even introduce wrappers for simple datatypes.
var record = new InvoiceDocument(
new List<Invoice>()
{
new Invoice(
issuer: new LocalInvoiceParty(new TaxIdentifier({UserVatNumber})),
header: new InvoiceHeader(new LimitedString1to50("0"), new LimitedString1to50("50020"), DateTime.Now, BillType.RetailSalesReceipt, new CurrencyCode("EUR")),
revenueItems: new List<RevenueItem>
{
new RevenueItem(new Amount(88.50m), TaxType.Vat13, new Amount(11.50m), ClassificationType.RetailSalesOfGoodsAndServicesPrivateClientele, ClassificationCategory.ProvisionOfServicesIncome, new PositiveInt(1)),
new RevenueItem(new Amount(5.00m), TaxType.Vat0, new Amount(0.00m), ClassificationType.RetailSalesOfGoodsAndServicesPrivateClientele, ClassificationCategory.ProductSaleIncome, new PositiveInt(2), VatExemptionType.VatIncludedArticle43),
new RevenueItem(new Amount(16.13m), TaxType.Vat24, new Amount(3.87m), ClassificationType.RetailSalesOfGoodsAndServicesPrivateClientele, ClassificationCategory.ProductSaleIncome, new PositiveInt(3))
},
payments: new List<Payment>
{
new Payment(new Amount(125.00m), PaymentType.Cash),
}
)
});
var client = new AadeClient({UserId}, {UserSubscriptionKey});
var response = await client.SendInvoicesAsync(invoiceDoc);We have published the library as Mews.Fiscalization.Greece.