public static class Discount.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder(java.lang.String id,
java.lang.String currencyId,
java.math.BigDecimal couponAmount)
Builder for discount construction.
|
| Modifier and Type | Method and Description |
|---|---|
Discount |
build()
It creates the discount that will be applied.
|
Discount.Builder |
setAmountOff(java.math.BigDecimal amountOff)
This value represents the discount amount off which will be applied to the total amount.
|
Discount.Builder |
setName(java.lang.String name)
Discount name that will be shown along the payment process.
|
Discount.Builder |
setPercentOff(java.math.BigDecimal percentOff)
This value represents the discount percent off which will be applied to the total amount.
|
public Builder(@NonNull
java.lang.String id,
@NonNull
java.lang.String currencyId,
@NonNull
java.math.BigDecimal couponAmount)
id - discount idcurrencyId - amount currency idcouponAmount - amount that will be applied in discountpublic Discount.Builder setName(@NonNull java.lang.String name)
name - discount name.public Discount.Builder setPercentOff(@NonNull java.math.BigDecimal percentOff)
percentOff - discount percent off that will be applied.public Discount.Builder setAmountOff(@NonNull java.math.BigDecimal amountOff)
amountOff - discount amount that will be applied.public Discount build()