Class StagedOrderChangeLineItemQuantityActionBuilder
- All Implemented Interfaces:
Builder<StagedOrderChangeLineItemQuantityAction>
Example to create an instance using the builder pattern
StagedOrderChangeLineItemQuantityAction stagedOrderChangeLineItemQuantityAction = StagedOrderChangeLineItemQuantityAction.builder()
.quantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds StagedOrderChangeLineItemQuantityAction with checking for non-null required valuesbuilds StagedOrderChangeLineItemQuantityAction without checking for non-null required valuesexternalPrice
(Money externalPrice) Required when the Line Item usesExternalPrice
LineItemPriceMode.externalPrice
(Function<MoneyBuilder, MoneyBuilder> builder) Required when the Line Item usesExternalPrice
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.Required when the Line Item usesExternalPrice
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 StagedOrderChangeLineItemQuantityActionBuilderof
(StagedOrderChangeLineItemQuantityAction template) create builder for StagedOrderChangeLineItemQuantityAction instanceNew value to set.withExternalPrice
(Function<MoneyBuilder, Money> builder) Required when the Line Item usesExternalPrice
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
-
StagedOrderChangeLineItemQuantityActionBuilder
public StagedOrderChangeLineItemQuantityActionBuilder()
-
-
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 LineItem is removed from the Order.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
externalPrice
public StagedOrderChangeLineItemQuantityActionBuilder externalPrice(Function<MoneyBuilder, MoneyBuilder> builder) Required when the Line Item uses
ExternalPrice
LineItemPriceMode. Sets the LineItemprice
to the given value when changing the quantity of a Line Item.The LineItem price is updated as described in Line Item price selection.
- Parameters:
builder
- function to build the externalPrice value- Returns:
- Builder
-
withExternalPrice
public StagedOrderChangeLineItemQuantityActionBuilder withExternalPrice(Function<MoneyBuilder, Money> builder) Required when the Line Item uses
ExternalPrice
LineItemPriceMode. Sets the LineItemprice
to the given value when changing the quantity of a Line Item.The LineItem price is updated as described in Line Item price selection.
- Parameters:
builder
- function to build the externalPrice value- Returns:
- Builder
-
externalPrice
Required when the Line Item uses
ExternalPrice
LineItemPriceMode. Sets the LineItemprice
to the given value when changing the quantity of a Line Item.The LineItem price is updated as described in Line Item price selection.
- Parameters:
externalPrice
- value to be set- Returns:
- Builder
-
externalTotalPrice
public StagedOrderChangeLineItemQuantityActionBuilder 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. IfexternalTotalPrice
is not given and thepriceMode
isExternalTotal
, the external price is unset and thepriceMode
is set toPlatform
.- Parameters:
builder
- function to build the externalTotalPrice value- Returns:
- Builder
-
withExternalTotalPrice
public StagedOrderChangeLineItemQuantityActionBuilder 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. IfexternalTotalPrice
is not given and thepriceMode
isExternalTotal
, the external price is unset and thepriceMode
is set toPlatform
.- Parameters:
builder
- function to build the externalTotalPrice value- Returns:
- Builder
-
externalTotalPrice
public StagedOrderChangeLineItemQuantityActionBuilder externalTotalPrice(@Nullable ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItem
price
andtotalPrice
to the given value when changing the quantity of a Line Item with theExternalTotal
LineItemPriceMode. IfexternalTotalPrice
is not given and thepriceMode
isExternalTotal
, the external price is unset and thepriceMode
is set toPlatform
.- 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 LineItem is removed from the Order.- Returns:
- quantity
-
getExternalPrice
Required when the Line Item uses
ExternalPrice
LineItemPriceMode. Sets the LineItemprice
to the given value when changing the quantity of a Line Item.The LineItem price is updated as described in Line Item 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. IfexternalTotalPrice
is not given and thepriceMode
isExternalTotal
, the external price is unset and thepriceMode
is set toPlatform
.- Returns:
- externalTotalPrice
-
build
builds StagedOrderChangeLineItemQuantityAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<StagedOrderChangeLineItemQuantityAction>
- Returns:
- StagedOrderChangeLineItemQuantityAction
-
buildUnchecked
builds StagedOrderChangeLineItemQuantityAction without checking for non-null required values- Returns:
- StagedOrderChangeLineItemQuantityAction
-
of
factory method for an instance of StagedOrderChangeLineItemQuantityActionBuilder- Returns:
- builder
-
of
public static StagedOrderChangeLineItemQuantityActionBuilder of(StagedOrderChangeLineItemQuantityAction template) create builder for StagedOrderChangeLineItemQuantityAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-