Class CartChangeCustomLineItemMoneyActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartChangeCustomLineItemMoneyActionBuilder
- All Implemented Interfaces:
Builder<CartChangeCustomLineItemMoneyAction>
public class CartChangeCustomLineItemMoneyActionBuilder
extends Object
implements Builder<CartChangeCustomLineItemMoneyAction>
CartChangeCustomLineItemMoneyActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartChangeCustomLineItemMoneyAction cartChangeCustomLineItemMoneyAction = CartChangeCustomLineItemMoneyAction.builder()
.money(moneyBuilder -> moneyBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartChangeCustomLineItemMoneyAction with checking for non-null required valuesbuilds CartChangeCustomLineItemMoneyAction without checking for non-null required valuescustomLineItemId
(String customLineItemId) id
of the CustomLineItem to update.customLineItemKey
(String customLineItemKey) key
of the CustomLineItem to update.id
of the CustomLineItem to update.key
of the CustomLineItem to update.getMoney()
Value to set.Value to set.money
(Function<MoneyBuilder, MoneyBuilder> builder) Value to set.of()
factory method for an instance of CartChangeCustomLineItemMoneyActionBuilderof
(CartChangeCustomLineItemMoneyAction template) create builder for CartChangeCustomLineItemMoneyAction instancewithMoney
(Function<MoneyBuilder, Money> builder) Value to set.
-
Constructor Details
-
CartChangeCustomLineItemMoneyActionBuilder
public CartChangeCustomLineItemMoneyActionBuilder()
-
-
Method Details
-
customLineItemId
public CartChangeCustomLineItemMoneyActionBuilder customLineItemId(@Nullable String customLineItemId) id
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Parameters:
customLineItemId
- value to be set- Returns:
- Builder
-
customLineItemKey
public CartChangeCustomLineItemMoneyActionBuilder customLineItemKey(@Nullable String customLineItemKey) key
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Parameters:
customLineItemKey
- value to be set- Returns:
- Builder
-
money
public CartChangeCustomLineItemMoneyActionBuilder money(Function<MoneyBuilder, MoneyBuilder> builder) Value to set. Must not be empty. Can be a negative amount.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
withMoney
Value to set. Must not be empty. Can be a negative amount.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
money
Value to set. Must not be empty. Can be a negative amount.
- Parameters:
money
- value to be set- Returns:
- Builder
-
getCustomLineItemId
id
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Returns:
- customLineItemId
-
getCustomLineItemKey
key
of the CustomLineItem to update. EithercustomLineItemId
orcustomLineItemKey
is required.- Returns:
- customLineItemKey
-
getMoney
Value to set. Must not be empty. Can be a negative amount.
- Returns:
- money
-
build
builds CartChangeCustomLineItemMoneyAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartChangeCustomLineItemMoneyAction>
- Returns:
- CartChangeCustomLineItemMoneyAction
-
buildUnchecked
builds CartChangeCustomLineItemMoneyAction without checking for non-null required values- Returns:
- CartChangeCustomLineItemMoneyAction
-
of
factory method for an instance of CartChangeCustomLineItemMoneyActionBuilder- Returns:
- builder
-
of
public static CartChangeCustomLineItemMoneyActionBuilder of(CartChangeCustomLineItemMoneyAction template) create builder for CartChangeCustomLineItemMoneyAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-