public static final class Campaign.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(java.lang.String id)
Builder for campaign construction.
|
Modifier and Type | Method and Description |
---|---|
Campaign |
build()
It creates the Campaign.
|
Campaign.Builder |
setCodeType(java.lang.String codeType)
Code type describes the kind of discount related with this campaign.
|
Campaign.Builder |
setEndDate(java.util.Date endDate)
This value represents discount campaign's end date (expiry date).
|
Campaign.Builder |
setMaxCouponAmount(java.math.BigDecimal maxCouponAmount)
When the campaign has amount cap per discount you should set it here
to communicate to the user that it exists.
|
Campaign.Builder |
setMaxRedeemPerUser(int maxRedeemPerUser)
This value represents how many times this discount will be applied.
|
public Builder(@NonNull java.lang.String id)
id
- campaign idpublic Campaign.Builder setMaxCouponAmount(java.math.BigDecimal maxCouponAmount)
maxCouponAmount
- amount to be shown in message.public Campaign.Builder setCodeType(@Nullable java.lang.String codeType)
codeType
- 'single', 'multiple' or null.public Campaign.Builder setMaxRedeemPerUser(int maxRedeemPerUser)
maxRedeemPerUser
- amount of times that will apply.public Campaign.Builder setEndDate(java.util.Date endDate)
endDate
- for discount campaign.public Campaign build()