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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
generateNextCouponCode(MultiCodeCouponModel coupon)
generate next coupon code in the batchjava.util.Map<java.lang.Integer,java.lang.Integer>
getCodeLengthMapping()
returns the ratio of clear-text to cipher-text based on total length of the coupon code.
-
-
-
Method Detail
-
generateNextCouponCode
java.lang.String generateNextCouponCode(MultiCodeCouponModel coupon)
generate next coupon code in the batch- Parameters:
coupon
- instance ofMultiCodeCouponModel
to generate coupons for- Returns:
- next coupon code, null otherwise
-
getCodeLengthMapping
java.util.Map<java.lang.Integer,java.lang.Integer> 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)
-
-