UNPKG

lbx-invoice

Version:

Provides functionality around generating invoices.

25 lines (24 loc) 1.28 kB
import { BaseCompanyInfo, BaseInvoice } from '../models'; /** * Provides functionality for handling factur-x conformance. */ export declare abstract class FacturXUtilities { /** * Creates and attaches a factur-x xml to the invoice pdf at the given path. * @param pdfFilePath - The path of the invoice pdf to attach to. * @param invoice - The invoice data to generate the xml from. * @param currency - The currency code, eg. 'USD'. * @param companyInfo - Info about the seller. * @param tradeContact - The trade contact. Defaults to companyInfo.ceo. */ static attachFacturX<Invoice extends BaseInvoice>(pdfFilePath: string, invoice: Invoice, currency: string, companyInfo: BaseCompanyInfo, tradeContact?: string | undefined): Promise<void>; /** * Adds the required factur-x metadata to the pdf file at the provided path. * @param pdfFilePath - The path of the invoice pdf. * @param author - The author that should be set. * @param id - The id to use in the metadata. * @param producer - The producer that should be set. Defaults to `lbx-invoice`. */ static addFacturXMetadata(pdfFilePath: string, author: string, id: string, producer?: string): Promise<void>; private static createFacturXBytes; }