findById method

Future<Invoice?> findById(
  1. String id
)

Find an invoice by its id

Implementation

Future<Invoice?> findById(String id) async {
  final response = await WebClient().get(
      '${InvoiceNinjaAdmin.url}/api/v1/invoices/$id',
      token: InvoiceNinjaAdmin.token);

  return InvoiceItem.fromJson(response).data;
}