Class RedemptionEngine
java.lang.Object
org.bhn.promotion.voucherify.engine.RedemptionEngine
RedemptionEngine implementation
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRedemptionEngine(VoucherifyClient voucherifyClient) Constructs aRedemptionEnginewith the specifiedVoucherifyClient -
Method Summary
Modifier and TypeMethodDescriptionThis method allows you redeem promotions supplied in a cart and return the final response after the promotions are redeemed
-
Field Details
-
REDEMPTION_FLOW_ERROR
- See Also:
-
-
Constructor Details
-
RedemptionEngine
Constructs aRedemptionEnginewith the specifiedVoucherifyClientThis 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
Autowiredmechanism.- Parameters:
voucherifyClient- The client used to interact with the Voucherify API for managing vouchers.
-
-
Method Details
-
redeemPromotion
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:
RedemptionResponseModelRedemptionResponseModel containing redeemed promos
-