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