Class RedemptionsApi

java.lang.Object
io.voucherify.client.api.RedemptionsApi

public class RedemptionsApi extends Object
  • Constructor Details

    • RedemptionsApi

      public RedemptionsApi()
    • RedemptionsApi

      public RedemptionsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • getRedemptionCall

      public okhttp3.Call getRedemptionCall(String redemptionId, ApiCallback _callback) throws ApiException
      Build call for getRedemption
      Parameters:
      redemptionId - ID of previously created redemption. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getRedemption

      public RedemptionsGetResponseBody getRedemption(String redemptionId) throws ApiException
      Get Redemption Return a redemption or redemption rollback object. This object can either be a successfull or failed redemption or redemption rollback.
      Parameters:
      redemptionId - ID of previously created redemption. (required)
      Returns:
      RedemptionsGetResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRedemptionWithHttpInfo

      public ApiResponse<RedemptionsGetResponseBody> getRedemptionWithHttpInfo(String redemptionId) throws ApiException
      Get Redemption Return a redemption or redemption rollback object. This object can either be a successfull or failed redemption or redemption rollback.
      Parameters:
      redemptionId - ID of previously created redemption. (required)
      Returns:
      ApiResponse<RedemptionsGetResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRedemptionAsync

      public okhttp3.Call getRedemptionAsync(String redemptionId, ApiCallback<RedemptionsGetResponseBody> _callback) throws ApiException
      Get Redemption (asynchronously) Return a redemption or redemption rollback object. This object can either be a successfull or failed redemption or redemption rollback.
      Parameters:
      redemptionId - ID of previously created redemption. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • getVoucherRedemptionsCall

      public okhttp3.Call getVoucherRedemptionsCall(String code, ApiCallback _callback) throws ApiException
      Build call for getVoucherRedemptions
      Parameters:
      code - A **code** that identifies the voucher. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getVoucherRedemptions

      public VouchersRedemptionGetResponseBody getVoucherRedemptions(String code) throws ApiException
      Get Voucher's Redemptions Retrieve the number of times a voucher was redeemed and each of the redemption details.
      Parameters:
      code - A **code** that identifies the voucher. (required)
      Returns:
      VouchersRedemptionGetResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getVoucherRedemptionsWithHttpInfo

      public ApiResponse<VouchersRedemptionGetResponseBody> getVoucherRedemptionsWithHttpInfo(String code) throws ApiException
      Get Voucher's Redemptions Retrieve the number of times a voucher was redeemed and each of the redemption details.
      Parameters:
      code - A **code** that identifies the voucher. (required)
      Returns:
      ApiResponse<VouchersRedemptionGetResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getVoucherRedemptionsAsync

      public okhttp3.Call getVoucherRedemptionsAsync(String code, ApiCallback<VouchersRedemptionGetResponseBody> _callback) throws ApiException
      Get Voucher's Redemptions (asynchronously) Retrieve the number of times a voucher was redeemed and each of the redemption details.
      Parameters:
      code - A **code** that identifies the voucher. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • listRedemptionsCall

      public okhttp3.Call listRedemptionsCall(Integer limit, Integer page, String result, String campaign, String customer, ParameterOrderListRedemptions order, ParameterCreatedBeforeAfter createdAt, ParameterFiltersListRedemptions filters, ApiCallback _callback) throws ApiException
      Build call for listRedemptions
      Parameters:
      limit - Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      result - A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param. (optional)
      campaign - A filter by the campaign **name** that the redemption resources originate from. (optional)
      customer - Return redemptions performed by the customer with given id or source_id. (optional)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      createdAt - A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z (optional)
      filters - Filters for listing responses. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • listRedemptions

      public RedemptionsListResponseBody listRedemptions(Integer limit, Integer page, String result, String campaign, String customer, ParameterOrderListRedemptions order, ParameterCreatedBeforeAfter createdAt, ParameterFiltersListRedemptions filters) throws ApiException
      List Redemptions Returns a list of redemptions previously created. The redemptions are returned in a sorted order, with the most recent redemptions appearing first. The response returns a list of redemptions of all vouchers. # Filtering results The result can be narrowed according to specified (or default) filters, for example, you can sort redemptions by date: https://api.voucherify.io/v1/redemptions?limit 3&[created_at][before] 2017-09-08T13:52:18.227Z. A filter based on the object created_at field narrows down the results and lists redemptions done before or after a particular date time. You can use the following options: [created_at][after], [created_at][before]. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z. # Failed Redemptions A redemption may fail for various reasons. You can figure out an exact reason from the failure_code: - resource_not_found - voucher with given code does not exist - voucher_not_active - voucher is not active yet (before start date) - voucher_expired - voucher has already expired (after expiration date) - voucher_disabled - voucher has been disabled (active: false) - quantity_exceeded - vouchers redemptions limit has been exceeded - gift_amount_exceeded - gift amount has been exceeded - customer_rules_violated - customer did not match the segment - order_rules_violated - order did not match validation rules - invalid_order - order was specified incorrectly - invalid_amount - order amount was specified incorrectly - missing_amount - order amount was not specified - missing_order_items - order items were not specified - missing_customer - customer was not specified
      Parameters:
      limit - Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      result - A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param. (optional)
      campaign - A filter by the campaign **name** that the redemption resources originate from. (optional)
      customer - Return redemptions performed by the customer with given id or source_id. (optional)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      createdAt - A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z (optional)
      filters - Filters for listing responses. (optional)
      Returns:
      RedemptionsListResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listRedemptionsWithHttpInfo

      public ApiResponse<RedemptionsListResponseBody> listRedemptionsWithHttpInfo(Integer limit, Integer page, String result, String campaign, String customer, ParameterOrderListRedemptions order, ParameterCreatedBeforeAfter createdAt, ParameterFiltersListRedemptions filters) throws ApiException
      List Redemptions Returns a list of redemptions previously created. The redemptions are returned in a sorted order, with the most recent redemptions appearing first. The response returns a list of redemptions of all vouchers. # Filtering results The result can be narrowed according to specified (or default) filters, for example, you can sort redemptions by date: https://api.voucherify.io/v1/redemptions?limit 3&[created_at][before] 2017-09-08T13:52:18.227Z. A filter based on the object created_at field narrows down the results and lists redemptions done before or after a particular date time. You can use the following options: [created_at][after], [created_at][before]. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z. # Failed Redemptions A redemption may fail for various reasons. You can figure out an exact reason from the failure_code: - resource_not_found - voucher with given code does not exist - voucher_not_active - voucher is not active yet (before start date) - voucher_expired - voucher has already expired (after expiration date) - voucher_disabled - voucher has been disabled (active: false) - quantity_exceeded - vouchers redemptions limit has been exceeded - gift_amount_exceeded - gift amount has been exceeded - customer_rules_violated - customer did not match the segment - order_rules_violated - order did not match validation rules - invalid_order - order was specified incorrectly - invalid_amount - order amount was specified incorrectly - missing_amount - order amount was not specified - missing_order_items - order items were not specified - missing_customer - customer was not specified
      Parameters:
      limit - Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      result - A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param. (optional)
      campaign - A filter by the campaign **name** that the redemption resources originate from. (optional)
      customer - Return redemptions performed by the customer with given id or source_id. (optional)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      createdAt - A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z (optional)
      filters - Filters for listing responses. (optional)
      Returns:
      ApiResponse<RedemptionsListResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listRedemptionsAsync

      public okhttp3.Call listRedemptionsAsync(Integer limit, Integer page, String result, String campaign, String customer, ParameterOrderListRedemptions order, ParameterCreatedBeforeAfter createdAt, ParameterFiltersListRedemptions filters, ApiCallback<RedemptionsListResponseBody> _callback) throws ApiException
      List Redemptions (asynchronously) Returns a list of redemptions previously created. The redemptions are returned in a sorted order, with the most recent redemptions appearing first. The response returns a list of redemptions of all vouchers. # Filtering results The result can be narrowed according to specified (or default) filters, for example, you can sort redemptions by date: https://api.voucherify.io/v1/redemptions?limit 3&[created_at][before] 2017-09-08T13:52:18.227Z. A filter based on the object created_at field narrows down the results and lists redemptions done before or after a particular date time. You can use the following options: [created_at][after], [created_at][before]. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z. # Failed Redemptions A redemption may fail for various reasons. You can figure out an exact reason from the failure_code: - resource_not_found - voucher with given code does not exist - voucher_not_active - voucher is not active yet (before start date) - voucher_expired - voucher has already expired (after expiration date) - voucher_disabled - voucher has been disabled (active: false) - quantity_exceeded - vouchers redemptions limit has been exceeded - gift_amount_exceeded - gift amount has been exceeded - customer_rules_violated - customer did not match the segment - order_rules_violated - order did not match validation rules - invalid_order - order was specified incorrectly - invalid_amount - order amount was specified incorrectly - missing_amount - order amount was not specified - missing_order_items - order items were not specified - missing_customer - customer was not specified
      Parameters:
      limit - Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      result - A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param. (optional)
      campaign - A filter by the campaign **name** that the redemption resources originate from. (optional)
      customer - Return redemptions performed by the customer with given id or source_id. (optional)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      createdAt - A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z (optional)
      filters - Filters for listing responses. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • redeemStackedDiscountsCall

      public okhttp3.Call redeemStackedDiscountsCall(RedemptionsRedeemRequestBody redemptionsRedeemRequestBody, ApiCallback _callback) throws ApiException
      Build call for redeemStackedDiscounts
      Parameters:
      redemptionsRedeemRequestBody - (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • redeemStackedDiscounts

      public RedemptionsRedeemResponseBody redeemStackedDiscounts(RedemptionsRedeemRequestBody redemptionsRedeemRequestBody) throws ApiException
      Redeem Stackable Discounts # How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: πŸ“˜ Rollbacks You cant roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your rollback request. πŸ“˜ Also available on client-side This method is also accessible through public keys which you can use in client-side​ apps: mobile and web browser apps. Go to the dedicated endpoint to learn more. - Use X-Client-Application-Id as the application ID header. - Use X-Client-Token as the appliction secret key header. - Use client-side base URL. - Use an origin header for your custom domain.
      Parameters:
      redemptionsRedeemRequestBody - (optional)
      Returns:
      RedemptionsRedeemResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • redeemStackedDiscountsWithHttpInfo

      public ApiResponse<RedemptionsRedeemResponseBody> redeemStackedDiscountsWithHttpInfo(RedemptionsRedeemRequestBody redemptionsRedeemRequestBody) throws ApiException
      Redeem Stackable Discounts # How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: πŸ“˜ Rollbacks You cant roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your rollback request. πŸ“˜ Also available on client-side This method is also accessible through public keys which you can use in client-side​ apps: mobile and web browser apps. Go to the dedicated endpoint to learn more. - Use X-Client-Application-Id as the application ID header. - Use X-Client-Token as the appliction secret key header. - Use client-side base URL. - Use an origin header for your custom domain.
      Parameters:
      redemptionsRedeemRequestBody - (optional)
      Returns:
      ApiResponse<RedemptionsRedeemResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • redeemStackedDiscountsAsync

      public okhttp3.Call redeemStackedDiscountsAsync(RedemptionsRedeemRequestBody redemptionsRedeemRequestBody, ApiCallback<RedemptionsRedeemResponseBody> _callback) throws ApiException
      Redeem Stackable Discounts (asynchronously) # How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: πŸ“˜ Rollbacks You cant roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your rollback request. πŸ“˜ Also available on client-side This method is also accessible through public keys which you can use in client-side​ apps: mobile and web browser apps. Go to the dedicated endpoint to learn more. - Use X-Client-Application-Id as the application ID header. - Use X-Client-Token as the appliction secret key header. - Use client-side base URL. - Use an origin header for your custom domain.
      Parameters:
      redemptionsRedeemRequestBody - (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • rollbackRedemptionCall

      public okhttp3.Call rollbackRedemptionCall(String redemptionId, String reason, String trackingId, RedemptionsRollbackCreateRequestBody redemptionsRollbackCreateRequestBody, ApiCallback _callback) throws ApiException
      Build call for rollbackRedemption
      Parameters:
      redemptionId - The original redemption ID to be rolled back (undone). (required)
      reason - Reason for the rollback. (optional)
      trackingId - Customers source_id. (optional)
      redemptionsRollbackCreateRequestBody - Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • rollbackRedemption

      public RedemptionsRollbackCreateResponseBody rollbackRedemption(String redemptionId, String reason, String trackingId, RedemptionsRollbackCreateRequestBody redemptionsRollbackCreateRequestBody) throws ApiException
      Rollback Redemption Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. 🚧 You can roll back a redemption up to 3 months back. # Effect The operation - creates a rollback entry in vouchers redemption history (redemption.redemption_entries) and - gives 1 redemption back to the pool (decreases redeemed_quantity by 1). # Returned funds In case of *gift card vouchers*, this method returns funds back according to the source redemption. In case of *loyalty card vouchers*, this method returns points back according to the source redemption.
      Parameters:
      redemptionId - The original redemption ID to be rolled back (undone). (required)
      reason - Reason for the rollback. (optional)
      trackingId - Customers source_id. (optional)
      redemptionsRollbackCreateRequestBody - Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. (optional)
      Returns:
      RedemptionsRollbackCreateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • rollbackRedemptionWithHttpInfo

      public ApiResponse<RedemptionsRollbackCreateResponseBody> rollbackRedemptionWithHttpInfo(String redemptionId, String reason, String trackingId, RedemptionsRollbackCreateRequestBody redemptionsRollbackCreateRequestBody) throws ApiException
      Rollback Redemption Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. 🚧 You can roll back a redemption up to 3 months back. # Effect The operation - creates a rollback entry in vouchers redemption history (redemption.redemption_entries) and - gives 1 redemption back to the pool (decreases redeemed_quantity by 1). # Returned funds In case of *gift card vouchers*, this method returns funds back according to the source redemption. In case of *loyalty card vouchers*, this method returns points back according to the source redemption.
      Parameters:
      redemptionId - The original redemption ID to be rolled back (undone). (required)
      reason - Reason for the rollback. (optional)
      trackingId - Customers source_id. (optional)
      redemptionsRollbackCreateRequestBody - Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. (optional)
      Returns:
      ApiResponse<RedemptionsRollbackCreateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • rollbackRedemptionAsync

      public okhttp3.Call rollbackRedemptionAsync(String redemptionId, String reason, String trackingId, RedemptionsRollbackCreateRequestBody redemptionsRollbackCreateRequestBody, ApiCallback<RedemptionsRollbackCreateResponseBody> _callback) throws ApiException
      Rollback Redemption (asynchronously) Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. 🚧 You can roll back a redemption up to 3 months back. # Effect The operation - creates a rollback entry in vouchers redemption history (redemption.redemption_entries) and - gives 1 redemption back to the pool (decreases redeemed_quantity by 1). # Returned funds In case of *gift card vouchers*, this method returns funds back according to the source redemption. In case of *loyalty card vouchers*, this method returns points back according to the source redemption.
      Parameters:
      redemptionId - The original redemption ID to be rolled back (undone). (required)
      reason - Reason for the rollback. (optional)
      trackingId - Customers source_id. (optional)
      redemptionsRollbackCreateRequestBody - Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • rollbackStackedRedemptionsCall

      public okhttp3.Call rollbackStackedRedemptionsCall(String parentRedemptionId, String reason, String trackingId, RedemptionsRollbacksCreateRequestBody redemptionsRollbacksCreateRequestBody, ApiCallback _callback) throws ApiException
      Build call for rollbackStackedRedemptions
      Parameters:
      parentRedemptionId - Unique identifier of a parent redemption, e.g. r_JQfm73zWSJFQxs3bGxweYjgm. (required)
      reason - Reason for the rollback. (optional)
      trackingId - Customers source_id. (optional)
      redemptionsRollbacksCreateRequestBody - Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • rollbackStackedRedemptions

      public RedemptionsRollbacksCreateResponseBody rollbackStackedRedemptions(String parentRedemptionId, String reason, String trackingId, RedemptionsRollbacksCreateRequestBody redemptionsRollbacksCreateRequestBody) throws ApiException
      Rollback Stackable Redemptions Rollback a stackable redemption. When you rollback a stacked redemption, all child redemptions will be rolled back. Provide the parent redemption ID as the path parameter. 🚧 You can roll back a redemption up to 3 months back.
      Parameters:
      parentRedemptionId - Unique identifier of a parent redemption, e.g. r_JQfm73zWSJFQxs3bGxweYjgm. (required)
      reason - Reason for the rollback. (optional)
      trackingId - Customers source_id. (optional)
      redemptionsRollbacksCreateRequestBody - Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. (optional)
      Returns:
      RedemptionsRollbacksCreateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • rollbackStackedRedemptionsWithHttpInfo

      public ApiResponse<RedemptionsRollbacksCreateResponseBody> rollbackStackedRedemptionsWithHttpInfo(String parentRedemptionId, String reason, String trackingId, RedemptionsRollbacksCreateRequestBody redemptionsRollbacksCreateRequestBody) throws ApiException
      Rollback Stackable Redemptions Rollback a stackable redemption. When you rollback a stacked redemption, all child redemptions will be rolled back. Provide the parent redemption ID as the path parameter. 🚧 You can roll back a redemption up to 3 months back.
      Parameters:
      parentRedemptionId - Unique identifier of a parent redemption, e.g. r_JQfm73zWSJFQxs3bGxweYjgm. (required)
      reason - Reason for the rollback. (optional)
      trackingId - Customers source_id. (optional)
      redemptionsRollbacksCreateRequestBody - Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. (optional)
      Returns:
      ApiResponse<RedemptionsRollbacksCreateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • rollbackStackedRedemptionsAsync

      public okhttp3.Call rollbackStackedRedemptionsAsync(String parentRedemptionId, String reason, String trackingId, RedemptionsRollbacksCreateRequestBody redemptionsRollbacksCreateRequestBody, ApiCallback<RedemptionsRollbacksCreateResponseBody> _callback) throws ApiException
      Rollback Stackable Redemptions (asynchronously) Rollback a stackable redemption. When you rollback a stacked redemption, all child redemptions will be rolled back. Provide the parent redemption ID as the path parameter. 🚧 You can roll back a redemption up to 3 months back.
      Parameters:
      parentRedemptionId - Unique identifier of a parent redemption, e.g. r_JQfm73zWSJFQxs3bGxweYjgm. (required)
      reason - Reason for the rollback. (optional)
      trackingId - Customers source_id. (optional)
      redemptionsRollbacksCreateRequestBody - Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object