cartDiscountNotification method Null safety
- {required int customerId}
override
Called first thing in cart page to get all client's discounts
Implementation
@override
Future<String> cartDiscountNotification({required int customerId}) async {
final response = await getData(
path: 'TriggeredCart/cartDiscountNotification',
queryParameters: {"CustomerID": customerId});
final result = ApiReturnResult.fromJSON(response.data);
if (result.code == 200) {
return result.data;
} else {
throw ExceptionApi(code: result.code, message: result.error?.first);
}
}