Class CartRemoveLineItemActionBuilder
- All Implemented Interfaces:
Builder<CartRemoveLineItemAction>
Example to create an instance using the builder pattern
CartRemoveLineItemAction cartRemoveLineItemAction = CartRemoveLineItemAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartRemoveLineItemAction with checking for non-null required valuesbuilds CartRemoveLineItemAction without checking for non-null required valuesexternalPrice
(Money externalPrice) Sets the LineItemprice
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.externalPrice
(Function<MoneyBuilder, MoneyBuilder> builder) Sets the LineItemprice
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.externalTotalPrice
(ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItemprice
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.externalTotalPrice
(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItemprice
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.Sets the LineItemprice
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.Sets the LineItemprice
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.id
of the LineItem to update.key
of the LineItem to update.Amount to subtract from the LineItem'squantity
.Container for Line Item-specific addresses to remove.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 CartRemoveLineItemActionBuilderof
(CartRemoveLineItemAction template) create builder for CartRemoveLineItemAction instanceAmount to subtract from the LineItem'squantity
.shippingDetailsToRemove
(ItemShippingDetailsDraft shippingDetailsToRemove) Container for Line Item-specific addresses to remove.shippingDetailsToRemove
(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Container for Line Item-specific addresses to remove.withExternalPrice
(Function<MoneyBuilder, Money> builder) Sets the LineItemprice
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.withExternalTotalPrice
(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItemprice
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.withShippingDetailsToRemove
(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Container for Line Item-specific addresses to remove.
-
Constructor Details
-
CartRemoveLineItemActionBuilder
public CartRemoveLineItemActionBuilder()
-
-
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
Amount to subtract from the LineItem's
quantity
. If absent, the LineItem is removed from the Cart.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
externalPrice
Sets the LineItem
price
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.- Parameters:
builder
- function to build the externalPrice value- Returns:
- Builder
-
withExternalPrice
Sets the LineItem
price
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.- Parameters:
builder
- function to build the externalPrice value- Returns:
- Builder
-
externalPrice
Sets the LineItem
price
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.- Parameters:
externalPrice
- value to be set- Returns:
- Builder
-
externalTotalPrice
public CartRemoveLineItemActionBuilder externalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItem
price
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Parameters:
builder
- function to build the externalTotalPrice value- Returns:
- Builder
-
withExternalTotalPrice
public CartRemoveLineItemActionBuilder withExternalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItem
price
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Parameters:
builder
- function to build the externalTotalPrice value- Returns:
- Builder
-
externalTotalPrice
public CartRemoveLineItemActionBuilder externalTotalPrice(@Nullable ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItem
price
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Parameters:
externalTotalPrice
- value to be set- Returns:
- Builder
-
shippingDetailsToRemove
public CartRemoveLineItemActionBuilder shippingDetailsToRemove(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Container for Line Item-specific addresses to remove.
- Parameters:
builder
- function to build the shippingDetailsToRemove value- Returns:
- Builder
-
withShippingDetailsToRemove
public CartRemoveLineItemActionBuilder withShippingDetailsToRemove(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Container for Line Item-specific addresses to remove.
- Parameters:
builder
- function to build the shippingDetailsToRemove value- Returns:
- Builder
-
shippingDetailsToRemove
public CartRemoveLineItemActionBuilder shippingDetailsToRemove(@Nullable ItemShippingDetailsDraft shippingDetailsToRemove) Container for Line Item-specific addresses to remove.
- Parameters:
shippingDetailsToRemove
- 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
Amount to subtract from the LineItem's
quantity
. If absent, the LineItem is removed from the Cart.- Returns:
- quantity
-
getExternalPrice
Sets the LineItem
price
to the given value when decreasing the quantity of a Line Item with theExternalPrice
LineItemPriceMode.- Returns:
- externalPrice
-
getExternalTotalPrice
Sets the LineItem
price
andtotalPrice
to the given value when decreasing the quantity of a Line Item with theExternalTotal
LineItemPriceMode.- Returns:
- externalTotalPrice
-
getShippingDetailsToRemove
Container for Line Item-specific addresses to remove.
- Returns:
- shippingDetailsToRemove
-
build
builds CartRemoveLineItemAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartRemoveLineItemAction>
- Returns:
- CartRemoveLineItemAction
-
buildUnchecked
builds CartRemoveLineItemAction without checking for non-null required values- Returns:
- CartRemoveLineItemAction
-
of
factory method for an instance of CartRemoveLineItemActionBuilder- Returns:
- builder
-
of
create builder for CartRemoveLineItemAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-