getPromotionList method
to get promo codes user need to use below API which returns promo code list
Implementation
Future<http.Response> getPromotionList() async {
Uri url = Uri.parse(
"$_baseUrl/promotion/list/${SharedPreference.getBusinessConfig()!.businessId}");
http.Response response =
await http.Client().get(url, headers: kGetRequestHeader);
if (response.statusCode == 200) {
printMessage("GET PROMOTION LIST RESPONSE = ${response.statusCode}");
printMessage("GET PROMOTION LIST RESPONSE = ${response.body}");
return response;
} else {
printMessage("GET PROMOTION LIST RESPONSE = ${response.statusCode}");
return response;
}
}