getAllPromotions method
Future<void>
getAllPromotions({
- required void onSuccess(),
- required void onError(
- SyneriseError error
This method retrieves all available promotions that are defined for a customer.
Implementation
Future<void> getAllPromotions(
{required void Function(PromotionResponse) onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<PromotionResponse> result =
await _methods.getAllPromotions();
result.onSuccess((result) {
onSuccess(result);
}).onError((error) {
onError(error);
});
}