Class CartChangeLineItemQuantityActionBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<CartChangeLineItemQuantityAction>
Example to create an instance using the builder pattern
CartChangeLineItemQuantityAction cartChangeLineItemQuantityAction = CartChangeLineItemQuantityAction.builder()
.quantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartChangeLineItemQuantityAction with checking for non-null required valuesbuilds CartChangeLineItemQuantityAction without checking for non-null required valuesexternalPrice
(Money externalPrice) Sets the LineItemprice
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.externalPrice
(Function<MoneyBuilder, MoneyBuilder> builder) Sets the LineItemprice
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.externalTotalPrice
(ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItemprice
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.externalTotalPrice
(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItemprice
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.Sets the LineItemprice
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.Sets the LineItemprice
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.id
of the LineItem to update.key
of the LineItem to update.New value to set.lineItemId
(String lineItemId) id
of the LineItem to update.lineItemKey
(String lineItemKey) key
of the LineItem to update.of()
factory method for an instance of CartChangeLineItemQuantityActionBuilderof
(CartChangeLineItemQuantityAction template) create builder for CartChangeLineItemQuantityAction instanceNew value to set.withExternalPrice
(Function<MoneyBuilder, Money> builder) Sets the LineItemprice
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.withExternalTotalPrice
(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItemprice
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.
-
Constructor Details
-
CartChangeLineItemQuantityActionBuilder
public CartChangeLineItemQuantityActionBuilder()
-
-
Method Details
-
lineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
lineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemKey
- value to be set- Returns:
- Builder
-
quantity
New value to set.
If
0
, the Line Item is removed from the Cart.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
externalPrice
public CartChangeLineItemQuantityActionBuilder externalPrice(Function<MoneyBuilder, MoneyBuilder> builder) Sets the LineItem
price
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.The LineItem price is updated as described in LineItem Price selection.
- Parameters:
builder
- function to build the externalPrice value- Returns:
- Builder
-
withExternalPrice
public CartChangeLineItemQuantityActionBuilder withExternalPrice(Function<MoneyBuilder, Money> builder) Sets the LineItem
price
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.The LineItem price is updated as described in LineItem Price selection.
- Parameters:
builder
- function to build the externalPrice value- Returns:
- Builder
-
externalPrice
Sets the LineItem
price
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.The LineItem price is updated as described in LineItem Price selection.
- Parameters:
externalPrice
- value to be set- Returns:
- Builder
-
externalTotalPrice
public CartChangeLineItemQuantityActionBuilder externalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItem
price
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Parameters:
builder
- function to build the externalTotalPrice value- Returns:
- Builder
-
withExternalTotalPrice
public CartChangeLineItemQuantityActionBuilder withExternalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItem
price
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Parameters:
builder
- function to build the externalTotalPrice value- Returns:
- Builder
-
externalTotalPrice
public CartChangeLineItemQuantityActionBuilder externalTotalPrice(@Nullable ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItem
price
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Parameters:
externalTotalPrice
- value to be set- Returns:
- Builder
-
getLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
getLineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemKey
-
getQuantity
New value to set.
If
0
, the Line Item is removed from the Cart.- Returns:
- quantity
-
getExternalPrice
Sets the LineItem
price
to the given value when changing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.The LineItem price is updated as described in LineItem Price selection.
- Returns:
- externalPrice
-
getExternalTotalPrice
Sets the LineItem
price
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Returns:
- externalTotalPrice
-
build
builds CartChangeLineItemQuantityAction with checking for non-null required values- Specified by:
build
in interfaceio.vrap.rmf.base.client.Builder<CartChangeLineItemQuantityAction>
- Returns:
- CartChangeLineItemQuantityAction
-
buildUnchecked
builds CartChangeLineItemQuantityAction without checking for non-null required values- Returns:
- CartChangeLineItemQuantityAction
-
of
factory method for an instance of CartChangeLineItemQuantityActionBuilder- Returns:
- builder
-
of
create builder for CartChangeLineItemQuantityAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-