deactivatePromotionsBatch method
Future<void>
deactivatePromotionsBatch(
- List<
PromotionIdentifier> promotionsToDeactivate, { - required void onSuccess(),
- required void onError(
- SyneriseError error
This method deactivates promotions with a code or with UUID in a batch.
Args: promotionsToDeactivate (List
Implementation
Future<void> deactivatePromotionsBatch(
List<PromotionIdentifier> promotionsToDeactivate,
{required void Function() onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<void> result =
await _methods.deactivatePromotionsBatch(promotionsToDeactivate);
result.onSuccess((result) {
onSuccess();
}).onError((error) {
onError(error);
});
}