Interface CartSetLineItemTotalPriceAction
- All Superinterfaces:
CartUpdateAction,ResourceUpdateAction<CartUpdateAction>
Sets the LineItem totalPrice and price, and changes the priceMode to ExternalTotal LineItemPriceMode. Cannot be used on Gift Line Items (see LineItemMode).
Example to create an instance using the builder pattern
CartSetLineItemTotalPriceAction cartSetLineItemTotalPriceAction = CartSetLineItemTotalPriceAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartSetLineItemTotalPriceAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartSetLineItemTotalPriceActionbuilder(CartSetLineItemTotalPriceAction template) create builder for CartSetLineItemTotalPriceAction instancecopyDeep()deepCopy(CartSetLineItemTotalPriceAction template) factory method to create a deep copy of CartSetLineItemTotalPriceAction@Valid ExternalLineItemTotalPriceValue to set.idof the LineItem to update.keyof the LineItem to update.of()factory methodof(CartSetLineItemTotalPriceAction template) factory method to create a shallow copy CartSetLineItemTotalPriceActionvoidsetExternalTotalPrice(ExternalLineItemTotalPrice externalTotalPrice) Value to set.voidsetLineItemId(String lineItemId) idof the LineItem to update.voidsetLineItemKey(String lineItemKey) keyof the LineItem to update.static com.fasterxml.jackson.core.type.TypeReference<CartSetLineItemTotalPriceAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_LINE_ITEM_TOTAL_PRICE
discriminator value for CartSetLineItemTotalPriceAction- See Also:
-
-
Method Details
-
getLineItemId
String getLineItemId()idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemId
-
getLineItemKey
String getLineItemKey()keyof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemKey
-
getExternalTotalPrice
Value to set. If
externalTotalPriceis not given and thepriceModeisExternalTotal, the external price is unset and thepriceModeis set toPlatform.- Returns:
- externalTotalPrice
-
setLineItemId
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemId- value to be set
-
setLineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemKey- value to be set
-
setExternalTotalPrice
Value to set. If
externalTotalPriceis not given and thepriceModeisExternalTotal, the external price is unset and thepriceModeis set toPlatform.- Parameters:
externalTotalPrice- value to be set
-
of
factory method- Returns:
- instance of CartSetLineItemTotalPriceAction
-
of
factory method to create a shallow copy CartSetLineItemTotalPriceAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartSetLineItemTotalPriceAction copyDeep()- Specified by:
copyDeepin interfaceCartUpdateAction
-
deepCopy
@Nullable static CartSetLineItemTotalPriceAction deepCopy(@Nullable CartSetLineItemTotalPriceAction template) factory method to create a deep copy of CartSetLineItemTotalPriceAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetLineItemTotalPriceAction- Returns:
- builder
-
builder
create builder for CartSetLineItemTotalPriceAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetLineItemTotalPriceAction
default <T> T withCartSetLineItemTotalPriceAction(Function<CartSetLineItemTotalPriceAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<CartSetLineItemTotalPriceAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-