Class CartChangeCustomLineItemMoneyActionBuilder
- All Implemented Interfaces:
Builder<CartChangeCustomLineItemMoneyAction>
Example to create an instance using the builder pattern
CartChangeCustomLineItemMoneyAction cartChangeCustomLineItemMoneyAction = CartChangeCustomLineItemMoneyAction.builder()
.money(moneyBuilder -> moneyBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartChangeCustomLineItemMoneyAction with checking for non-null required valuesbuilds CartChangeCustomLineItemMoneyAction without checking for non-null required valuescustomLineItemId(String customLineItemId) idof the CustomLineItem to update.customLineItemKey(String customLineItemKey) keyof the CustomLineItem to update.idof the CustomLineItem to update.keyof 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) idof the CustomLineItem to update. EithercustomLineItemIdorcustomLineItemKeyis required.- Parameters:
customLineItemId- value to be set- Returns:
- Builder
-
customLineItemKey
public CartChangeCustomLineItemMoneyActionBuilder customLineItemKey(@Nullable String customLineItemKey) keyof the CustomLineItem to update. EithercustomLineItemIdorcustomLineItemKeyis 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.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
builder- function to build the money value- Returns:
- Builder
-
withMoney
Value to set. Must not be empty. Can be a negative amount.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
builder- function to build the money value- Returns:
- Builder
-
money
Value to set. Must not be empty. Can be a negative amount.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
money- value to be set- Returns:
- Builder
-
getCustomLineItemId
idof the CustomLineItem to update. EithercustomLineItemIdorcustomLineItemKeyis required.- Returns:
- customLineItemId
-
getCustomLineItemKey
keyof the CustomLineItem to update. EithercustomLineItemIdorcustomLineItemKeyis required.- Returns:
- customLineItemKey
-
getMoney
Value to set. Must not be empty. Can be a negative amount.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Returns:
- money
-
build
builds CartChangeCustomLineItemMoneyAction with checking for non-null required values- Specified by:
buildin 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
-