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