getAll method
Gets all QuickbooksInvoice in the Quickbooks API for the given accessToken
and companyId
Implementation
Future<List<QuickbooksInvoice>> getAll({
required String accessToken,
required String companyId,
String? conditions,
}) async {
List<Map<String, dynamic>> items = await getMany(
accessToken: accessToken,
companyId: companyId,
conditions: conditions,
location: 'Invoice',
);
List<QuickbooksInvoice> results = [];
for (var item in items) {
try {
results.add(QuickbooksInvoice.fromMap(item));
} catch (e) {
print(e);
}
}
return results;
}