deleteOne method
Deletes a QuickbooksVendor with
the given accessToken
and companyId
Sets the active
field to false
Implementation
Future<QuickbooksVendor> deleteOne({
required String accessToken,
required String companyId,
required String id,
}) async {
var data = await get(
accessToken: accessToken,
companyId: companyId,
id: id,
);
if (data == null) {
throw AlfredException(404, 'Data not found');
}
data.active = false;
var result = await post(
accessToken: accessToken,
companyId: companyId,
data: data.toMap(),
location: 'Vendor',
);
var newData = QuickbooksVendor.fromMap(result);
return newData;
}