findById method

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

Find an credit by its id

Implementation

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

  return CreditItem.fromJson(response).data;
}