private ClaveTipoFacturaType Convert(InvoiceType type) { return(type.Match( InvoiceType.Invoice, _ => ClaveTipoFacturaType.F1, InvoiceType.CorrectedInvoice, _ => ClaveTipoFacturaType.R1, InvoiceType.CorrectedInvoice2, _ => ClaveTipoFacturaType.R2, InvoiceType.CorrectedInvoice3, _ => ClaveTipoFacturaType.R3, InvoiceType.CorrectedInvoice4, _ => ClaveTipoFacturaType.R4, InvoiceType.CorrectedInvoiceInSimplifiedInvoices, _ => ClaveTipoFacturaType.R5, InvoiceType.InvoiceIssuedToReplaceSimplifiedInvoices, _ => ClaveTipoFacturaType.F3, InvoiceType.InvoiceSummaryEntry, _ => ClaveTipoFacturaType.F4 )); }