deleteOne method
Deletes a QuickbooksTaxRate with
the given accessToken
and companyId
Sets the active
field to false
Implementation
Future<QuickbooksTaxRate> 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: 'TaxRate',
);
var newData = QuickbooksTaxRate.fromMap(result);
return newData;
}