Class CartDiscountValueFixedBuilder
- All Implemented Interfaces:
Builder<CartDiscountValueFixed>
Example to create an instance using the builder pattern
CartDiscountValueFixed cartDiscountValueFixed = CartDiscountValueFixed.builder()
.plusMoney(moneyBuilder -> moneyBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplicationMode
(DiscountApplicationMode applicationMode) Indicates how the discount is applied on CartDiscountLineItemTarget or CartDiscountCustomLineItemTarget.build()
builds CartDiscountValueFixed with checking for non-null required valuesbuilds CartDiscountValueFixed without checking for non-null required valuesIndicates how the discount is applied on CartDiscountLineItemTarget or CartDiscountCustomLineItemTarget.getMoney()
Money values in cent precision or high precision of different currencies.money
(TypedMoney... money) Money values in cent precision or high precision of different currencies.money
(List<TypedMoney> money) Money values in cent precision or high precision of different currencies.of()
factory method for an instance of CartDiscountValueFixedBuilderof
(CartDiscountValueFixed template) create builder for CartDiscountValueFixed instanceplusMoney
(TypedMoney... money) Money values in cent precision or high precision of different currencies.plusMoney
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money values in cent precision or high precision of different currencies.withMoney
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money values in cent precision or high precision of different currencies.
-
Constructor Details
-
CartDiscountValueFixedBuilder
public CartDiscountValueFixedBuilder()
-
-
Method Details
-
money
Money values in cent precision or high precision of different currencies.
- Parameters:
money
- value to be set- Returns:
- Builder
-
money
Money values in cent precision or high precision of different currencies.
- Parameters:
money
- value to be set- Returns:
- Builder
-
plusMoney
Money values in cent precision or high precision of different currencies.
- Parameters:
money
- value to be set- Returns:
- Builder
-
plusMoney
public CartDiscountValueFixedBuilder plusMoney(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money values in cent precision or high precision of different currencies.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
withMoney
public CartDiscountValueFixedBuilder withMoney(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money values in cent precision or high precision of different currencies.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
applicationMode
public CartDiscountValueFixedBuilder applicationMode(@Nullable DiscountApplicationMode applicationMode) Indicates how the discount is applied on CartDiscountLineItemTarget or CartDiscountCustomLineItemTarget.
For CartDiscountPatternTarget, the mode can also be
ProportionateDistribution
orEvenDistribution
.- Parameters:
applicationMode
- value to be set- Returns:
- Builder
-
getMoney
Money values in cent precision or high precision of different currencies.
- Returns:
- money
-
getApplicationMode
Indicates how the discount is applied on CartDiscountLineItemTarget or CartDiscountCustomLineItemTarget.
For CartDiscountPatternTarget, the mode can also be
ProportionateDistribution
orEvenDistribution
.- Returns:
- applicationMode
-
build
builds CartDiscountValueFixed with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartDiscountValueFixed>
- Returns:
- CartDiscountValueFixed
-
buildUnchecked
builds CartDiscountValueFixed without checking for non-null required values- Returns:
- CartDiscountValueFixed
-
of
factory method for an instance of CartDiscountValueFixedBuilder- Returns:
- builder
-
of
create builder for CartDiscountValueFixed instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-