deactivatePromotionByCode method
Future<void>
deactivatePromotionByCode(
- String code, {
- required void onSuccess(),
- required void onError(
- SyneriseError error
This function deactivates a promotion by its code.
Args: code (String): The "code" parameter is a string that represents the code of the promotion that needs to be deactivated.
Implementation
Future<void> deactivatePromotionByCode(String code,
{required void Function() onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<void> result =
await _methods.deactivatePromotionByCode(code);
result.onSuccess((result) {
onSuccess();
}).onError((error) {
onError(error);
});
}