Class VoucherifyPromotionEngine
java.lang.Object
org.bhn.promotion.voucherify.engine.VoucherifyPromotionEngine
- All Implemented Interfaces:
PromotionEngine
VoucherifyPromotionEngine implementation
-
Constructor Summary
ConstructorsConstructorDescriptionVoucherifyPromotionEngine(ValidationEngine validationEngine, QualificationEngine qualificationEngine, RedemptionEngine redemptionEngine, RollbackEngine rollbackEngine) -
Method Summary
Modifier and TypeMethodDescriptionEvaluate the promotion requestFetch eligible promotions listRedeem the promotion as requestedrollbackPromotion(RollbackRequest rollbackRequest) Rollback the applied promotion
-
Constructor Details
-
VoucherifyPromotionEngine
@Autowired public VoucherifyPromotionEngine(ValidationEngine validationEngine, QualificationEngine qualificationEngine, RedemptionEngine redemptionEngine, RollbackEngine rollbackEngine)
-
-
Method Details
-
evaluatePromotion
Evaluate the promotion request- Specified by:
evaluatePromotionin interfacePromotionEngine- Parameters:
input- the input to be evaluated hereEvaluationRequest- Returns:
EvaluationResponseModelthe result of the evaluation
-
getEligiblePromotions
Fetch eligible promotions list- Specified by:
getEligiblePromotionsin interfacePromotionEngine- Parameters:
input- the input for which we need to find eligible promotionsEligibilityRequestDto- Returns:
EligibilityResponseModelthe result containing eligible promotions
-
redeemPromotion
Redeem the promotion as requested- Specified by:
redeemPromotionin interfacePromotionEngine- Parameters:
input- the input for which we want to do the redemptionRedemptionRequestDto- Returns:
RedemptionResponseModelthe result of the redemption
-
rollbackPromotion
Rollback the applied promotion- Specified by:
rollbackPromotionin interfacePromotionEngine- Parameters:
rollbackRequest- contains the redemption id which we want to rollback- Returns:
RollbackResponseModel
-