get method
Gets a QuickbooksVendor from the Quickbooks API with the given
accessToken
, companyId
and id
.
Returns null if no data found.
Implementation
Future<QuickbooksVendor?> get({
required String accessToken,
required String companyId,
required String id,
}) async {
Map<String, dynamic>? item = await getOne(
accessToken: accessToken,
companyId: companyId,
id: id,
location: 'Vendor',
);
if (item == null) {
return null;
}
try {
var result = QuickbooksVendor.fromMap(item);
return result;
} catch (_) {
return null;
}
}