public final class DiscountConfiguration
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Method and Description |
---|---|
static DiscountConfiguration |
forNotAvailableDiscount()
When you have the user have wasted all the discounts available
this kind of configuration will show a generic message to the user.
|
Campaign |
getCampaign() |
Discount |
getDiscount() |
boolean |
isNotAvailable() |
static DiscountConfiguration |
withDiscount(Discount discount,
Campaign campaign)
Set Mercado Pago discount that will be applied to total amount.
|
public static DiscountConfiguration withDiscount(@NonNull Discount discount, @NonNull Campaign campaign)
discount
- Mercado Pago discount.campaign
- Discount campaign with discount data.public static DiscountConfiguration forNotAvailableDiscount()
@Nullable public Discount getDiscount()
@Nullable public Campaign getCampaign()
public boolean isNotAvailable()