Invoice.forClient constructor

Invoice.forClient(
  1. Client client, {
  2. required List<Product> products,
})

Create an invoice for a client

Implementation

factory Invoice.forClient(Client client, {required List<Product> products}) {
  return Invoice(
    clientId: client.id,
    lineItems: (products).map((product) => product.toLineItem).toList(),
  );
}