Class MyCartRemoveLineItemActionBuilder
- All Implemented Interfaces:
Builder<MyCartRemoveLineItemAction>
Example to create an instance using the builder pattern
MyCartRemoveLineItemAction myCartRemoveLineItemAction = MyCartRemoveLineItemAction.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds MyCartRemoveLineItemAction with checking for non-null required valuesbuilds MyCartRemoveLineItemAction without checking for non-null required valuesexternalPrice(Money externalPrice) Sets the LineItempriceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.externalPrice(Function<MoneyBuilder, MoneyBuilder> builder) Sets the LineItempriceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.externalTotalPrice(ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItempriceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.externalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItempriceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.Sets the LineItempriceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.Sets the LineItempriceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.idof the LineItem to update.keyof the LineItem to update.Amount to subtract from the LineItem'squantity.Container for Line Item-specific addresses to remove.lineItemId(String lineItemId) idof the LineItem to update.lineItemKey(String lineItemKey) keyof the LineItem to update.of()factory method for an instance of MyCartRemoveLineItemActionBuilderof(MyCartRemoveLineItemAction template) create builder for MyCartRemoveLineItemAction 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 LineItempriceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.withExternalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItempriceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.withShippingDetailsToRemove(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Container for Line Item-specific addresses to remove.
-
Constructor Details
-
MyCartRemoveLineItemActionBuilder
public MyCartRemoveLineItemActionBuilder()
-
-
Method Details
-
lineItemId
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemId- value to be set- Returns:
- Builder
-
lineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis 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
priceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
builder- function to build the externalPrice value- Returns:
- Builder
-
withExternalPrice
Sets the LineItem
priceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
builder- function to build the externalPrice value- Returns:
- Builder
-
externalPrice
Sets the LineItem
priceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
externalPrice- value to be set- Returns:
- Builder
-
externalTotalPrice
public MyCartRemoveLineItemActionBuilder externalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItem
priceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.- Parameters:
builder- function to build the externalTotalPrice value- Returns:
- Builder
-
withExternalTotalPrice
public MyCartRemoveLineItemActionBuilder withExternalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItem
priceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.- Parameters:
builder- function to build the externalTotalPrice value- Returns:
- Builder
-
externalTotalPrice
public MyCartRemoveLineItemActionBuilder externalTotalPrice(@Nullable ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItem
priceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.- Parameters:
externalTotalPrice- value to be set- Returns:
- Builder
-
shippingDetailsToRemove
public MyCartRemoveLineItemActionBuilder 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 MyCartRemoveLineItemActionBuilder 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 MyCartRemoveLineItemActionBuilder shippingDetailsToRemove(@Nullable ItemShippingDetailsDraft shippingDetailsToRemove) Container for Line Item-specific addresses to remove.
- Parameters:
shippingDetailsToRemove- value to be set- Returns:
- Builder
-
getLineItemId
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemId
-
getLineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis 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
priceto the given value when decreasing the quantity of a Line Item with theExternalPriceLineItemPriceMode.To set the money value in high precision, use HighPrecisionMoneyDraft.
- Returns:
- externalPrice
-
getExternalTotalPrice
Sets the LineItem
priceandtotalPriceto the given value when decreasing the quantity of a Line Item with theExternalTotalLineItemPriceMode.- Returns:
- externalTotalPrice
-
getShippingDetailsToRemove
Container for Line Item-specific addresses to remove.
- Returns:
- shippingDetailsToRemove
-
build
builds MyCartRemoveLineItemAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<MyCartRemoveLineItemAction>- Returns:
- MyCartRemoveLineItemAction
-
buildUnchecked
builds MyCartRemoveLineItemAction without checking for non-null required values- Returns:
- MyCartRemoveLineItemAction
-
of
factory method for an instance of MyCartRemoveLineItemActionBuilder- Returns:
- builder
-
of
create builder for MyCartRemoveLineItemAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-