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
Constructors -
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 usesExternalPriceLineItemPriceMode.externalPrice(Function<MoneyBuilder, MoneyBuilder> builder) Required when the Line Item usesExternalPriceLineItemPriceMode.externalTotalPrice(ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItempriceandtotalPriceto the given value when changing the quantity of a Line Item with theExternalTotalLineItemPriceMode.externalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItempriceandtotalPriceto the given value when changing the quantity of a Line Item with theExternalTotalLineItemPriceMode.Required when the Line Item usesExternalPriceLineItemPriceMode.Sets the LineItempriceandtotalPriceto the given value when changing the quantity of a Line Item with theExternalTotalLineItemPriceMode.idof the LineItem to update.keyof the LineItem to update.New value to set.lineItemId(String lineItemId) idof the LineItem to update.lineItemKey(String lineItemKey) keyof 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 usesExternalPriceLineItemPriceMode.withExternalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItempriceandtotalPriceto the given value when changing the quantity of a Line Item with theExternalTotalLineItemPriceMode.
-
Constructor Details
-
StagedOrderChangeLineItemQuantityActionBuilder
public StagedOrderChangeLineItemQuantityActionBuilder()
-
-
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
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
ExternalPriceLineItemPriceMode. Sets the LineItempriceto the given value when changing the quantity of a Line Item.The LineItem price is updated as described in Line Item price selection.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
builder- function to build the externalPrice value- Returns:
- Builder
-
withExternalPrice
public StagedOrderChangeLineItemQuantityActionBuilder withExternalPrice(Function<MoneyBuilder, Money> builder) Required when the Line Item uses
ExternalPriceLineItemPriceMode. Sets the LineItempriceto the given value when changing the quantity of a Line Item.The LineItem price is updated as described in Line Item price selection.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
builder- function to build the externalPrice value- Returns:
- Builder
-
externalPrice
Required when the Line Item uses
ExternalPriceLineItemPriceMode. Sets the LineItempriceto the given value when changing the quantity of a Line Item.The LineItem price is updated as described in Line Item price selection.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
externalPrice- value to be set- Returns:
- Builder
-
externalTotalPrice
public StagedOrderChangeLineItemQuantityActionBuilder externalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItem
priceandtotalPriceto the given value when changing the quantity of a Line Item with theExternalTotalLineItemPriceMode. IfexternalTotalPriceis not given and thepriceModeisExternalTotal, the external price is unset and thepriceModeis set toPlatform.- Parameters:
builder- function to build the externalTotalPrice value- Returns:
- Builder
-
withExternalTotalPrice
public StagedOrderChangeLineItemQuantityActionBuilder withExternalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItem
priceandtotalPriceto the given value when changing the quantity of a Line Item with theExternalTotalLineItemPriceMode. IfexternalTotalPriceis not given and thepriceModeisExternalTotal, the external price is unset and thepriceModeis set toPlatform.- Parameters:
builder- function to build the externalTotalPrice value- Returns:
- Builder
-
externalTotalPrice
public StagedOrderChangeLineItemQuantityActionBuilder externalTotalPrice(@Nullable ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItem
priceandtotalPriceto the given value when changing the quantity of a Line Item with theExternalTotalLineItemPriceMode. IfexternalTotalPriceis not given and thepriceModeisExternalTotal, the external price is unset and thepriceModeis set toPlatform.- Parameters:
externalTotalPrice- 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
New value to set. If
0, the LineItem is removed from the Order.- Returns:
- quantity
-
getExternalPrice
Required when the Line Item uses
ExternalPriceLineItemPriceMode. Sets the LineItempriceto the given value when changing the quantity of a Line Item.The LineItem price is updated as described in Line Item price selection.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Returns:
- externalPrice
-
getExternalTotalPrice
Sets the LineItem
priceandtotalPriceto the given value when changing the quantity of a Line Item with theExternalTotalLineItemPriceMode. IfexternalTotalPriceis not given and thepriceModeisExternalTotal, the external price is unset and thepriceModeis set toPlatform.- Returns:
- externalTotalPrice
-
build
builds StagedOrderChangeLineItemQuantityAction with checking for non-null required values- Specified by:
buildin 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
-