Interface CouponCodesGenerator
- All Known Implementing Classes:
DefaultCouponCodesGenerator
public interface CouponCodesGenerator
Interface to provide a unique method for generating a batch of coupon codes
-
Method Summary
Modifier and TypeMethodDescriptiongenerate next coupon code in the batchreturns the ratio of clear-text to cipher-text based on total length of the coupon code.
-
Method Details
-
generateNextCouponCode
generate next coupon code in the batch- Parameters:
coupon- instance ofMultiCodeCouponModelto generate coupons for- Returns:
- next coupon code, null otherwise
-
getCodeLengthMapping
returns the ratio of clear-text to cipher-text based on total length of the coupon code.key: coupon code length. value: clear-text length. implicit: cipher-text length = (key - value)
-