deactivatePromotionByUUID method

Future<void> deactivatePromotionByUUID(
  1. String uuid, {
  2. required void onSuccess(),
  3. required void onError(
    1. SyneriseError error
    ),
})

This function deactivates a promotion by its UUID.

Args: uuid (String): The "uuid" parameter is a String that represents the unique identifier of a promotion that needs to be deactivated.

Implementation

Future<void> deactivatePromotionByUUID(String uuid,
    {required void Function() onSuccess,
    required void Function(SyneriseError error) onError}) async {
  SyneriseResult<void> result =
      await _methods.deactivatePromotionByUUID(uuid);

  result.onSuccess((result) {
    onSuccess();
  }).onError((error) {
    onError(error);
  });
}