Class StagedOrderRemoveLineItemActionBuilder
- All Implemented Interfaces:
Builder<StagedOrderRemoveLineItemAction>
Example to create an instance using the builder pattern
StagedOrderRemoveLineItemAction stagedOrderRemoveLineItemAction = StagedOrderRemoveLineItemAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds StagedOrderRemoveLineItemAction with checking for non-null required valuesbuilds StagedOrderRemoveLineItemAction 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.New value to set.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 StagedOrderRemoveLineItemActionBuilderof
(StagedOrderRemoveLineItemAction template) create builder for StagedOrderRemoveLineItemAction instanceNew value to set.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
-
StagedOrderRemoveLineItemActionBuilder
public StagedOrderRemoveLineItemActionBuilder()
-
-
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 absent or
0
, the Line Item is removed from the Cart.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
externalPrice
public StagedOrderRemoveLineItemActionBuilder externalPrice(Function<MoneyBuilder, MoneyBuilder> builder) 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
public StagedOrderRemoveLineItemActionBuilder withExternalPrice(Function<MoneyBuilder, Money> builder) 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 StagedOrderRemoveLineItemActionBuilder 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 StagedOrderRemoveLineItemActionBuilder 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 StagedOrderRemoveLineItemActionBuilder 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 StagedOrderRemoveLineItemActionBuilder 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 StagedOrderRemoveLineItemActionBuilder 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 StagedOrderRemoveLineItemActionBuilder 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
New value to set. If absent or
0
, the Line Item 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 StagedOrderRemoveLineItemAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<StagedOrderRemoveLineItemAction>
- Returns:
- StagedOrderRemoveLineItemAction
-
buildUnchecked
builds StagedOrderRemoveLineItemAction without checking for non-null required values- Returns:
- StagedOrderRemoveLineItemAction
-
of
factory method for an instance of StagedOrderRemoveLineItemActionBuilder- Returns:
- builder
-
of
create builder for StagedOrderRemoveLineItemAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-