Class RedemptionEngine

java.lang.Object
org.bhn.promotion.voucherify.engine.RedemptionEngine

public class RedemptionEngine extends Object

RedemptionEngine implementation

  • Field Details

  • Constructor Details

    • RedemptionEngine

      @Autowired public RedemptionEngine(VoucherifyClient voucherifyClient)
      Constructs a RedemptionEngine with the specified VoucherifyClient

      This constructor initializes the engine with the necessary services for interacting with the Voucherify API and managing promotion budgets. These services are injected via Spring's Autowired mechanism.

      Parameters:
      voucherifyClient - The client used to interact with the Voucherify API for managing vouchers.
  • Method Details

    • redeemPromotion

      public RedemptionResponseModel redeemPromotion(RedemptionRequestDto input)

      This method allows you redeem promotions supplied in a cart and return the final response after the promotions are redeemed

      Parameters:
      input - RedemptionRequest containing cart for which we want to redeem the promotion
      Returns:
      RedemptionResponseModel RedemptionResponseModel containing redeemed promos