Class CartDiscountValueAbsoluteBuilder
java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountValueAbsoluteBuilder
- All Implemented Interfaces:
Builder<CartDiscountValueAbsolute>
public class CartDiscountValueAbsoluteBuilder
extends Object
implements Builder<CartDiscountValueAbsolute>
CartDiscountValueAbsoluteBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountValueAbsolute cartDiscountValueAbsolute = CartDiscountValueAbsolute.builder()
.plusMoney(moneyBuilder -> moneyBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCent precision money values in different currencies.applicationMode
(DiscountApplicationMode applicationMode) Determines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.build()
builds CartDiscountValueAbsolute with checking for non-null required valuesbuilds CartDiscountValueAbsolute without checking for non-null required valuesDetermines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.getMoney()
Cent precision money values in different currencies.money
(CentPrecisionMoney... money) Cent precision money values in different currencies.money
(List<CentPrecisionMoney> money) Cent precision money values in different currencies.of()
factory method for an instance of CartDiscountValueAbsoluteBuilderof
(CartDiscountValueAbsolute template) create builder for CartDiscountValueAbsolute instanceplusMoney
(CentPrecisionMoney... money) Cent precision money values in different currencies.Cent precision money values in different currencies.Cent precision money values in different currencies.Cent precision money values in different currencies.
-
Constructor Details
-
CartDiscountValueAbsoluteBuilder
public CartDiscountValueAbsoluteBuilder()
-
-
Method Details
-
money
Cent precision money values in different currencies.
- Parameters:
money
- value to be set- Returns:
- Builder
-
money
Cent precision money values in different currencies.
- Parameters:
money
- value to be set- Returns:
- Builder
-
plusMoney
Cent precision money values in different currencies.
- Parameters:
money
- value to be set- Returns:
- Builder
-
plusMoney
public CartDiscountValueAbsoluteBuilder plusMoney(Function<CentPrecisionMoneyBuilder, CentPrecisionMoneyBuilder> builder) Cent precision money values in different currencies.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
withMoney
public CartDiscountValueAbsoluteBuilder withMoney(Function<CentPrecisionMoneyBuilder, CentPrecisionMoneyBuilder> builder) Cent precision money values in different currencies.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
addMoney
public CartDiscountValueAbsoluteBuilder addMoney(Function<CentPrecisionMoneyBuilder, CentPrecisionMoney> builder) Cent precision money values in different currencies.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
setMoney
public CartDiscountValueAbsoluteBuilder setMoney(Function<CentPrecisionMoneyBuilder, CentPrecisionMoney> builder) Cent precision money values in different currencies.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
applicationMode
public CartDiscountValueAbsoluteBuilder applicationMode(@Nullable DiscountApplicationMode applicationMode) Determines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.
- Parameters:
applicationMode
- value to be set- Returns:
- Builder
-
getMoney
Cent precision money values in different currencies.
- Returns:
- money
-
getApplicationMode
Determines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.
- Returns:
- applicationMode
-
build
builds CartDiscountValueAbsolute with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartDiscountValueAbsolute>
- Returns:
- CartDiscountValueAbsolute
-
buildUnchecked
builds CartDiscountValueAbsolute without checking for non-null required values- Returns:
- CartDiscountValueAbsolute
-
of
factory method for an instance of CartDiscountValueAbsoluteBuilder- Returns:
- builder
-
of
create builder for CartDiscountValueAbsolute instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-