Interface CartSetLineItemTotalPriceAction
- All Superinterfaces:
CartUpdateAction
,ResourceUpdateAction<CartUpdateAction>
Sets the LineItem totalPrice
and price
, and changes the priceMode
to ExternalTotal
LineItemPriceMode.
Example to create an instance using the builder pattern
CartSetLineItemTotalPriceAction cartSetLineItemTotalPriceAction = CartSetLineItemTotalPriceAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartSetLineItemTotalPriceAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartSetLineItemTotalPriceActionbuilder
(CartSetLineItemTotalPriceAction template) create builder for CartSetLineItemTotalPriceAction instancedeepCopy
(CartSetLineItemTotalPriceAction template) factory method to create a deep copy of CartSetLineItemTotalPriceAction@Valid ExternalLineItemTotalPrice
Value to set.id
of the LineItem to update.key
of the LineItem to update.of()
factory methodof
(CartSetLineItemTotalPriceAction template) factory method to create a shallow copy CartSetLineItemTotalPriceActionvoid
setExternalTotalPrice
(ExternalLineItemTotalPrice externalTotalPrice) Value to set.void
setLineItemId
(String lineItemId) id
of the LineItem to update.void
setLineItemKey
(String lineItemKey) key
of the LineItem to update.static com.fasterxml.jackson.core.type.TypeReference<CartSetLineItemTotalPriceAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateAction
Methods 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()id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
getLineItemKey
String getLineItemKey()key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemKey
-
getExternalTotalPrice
Value to set. If
externalTotalPrice
is not given and thepriceMode
isExternalTotal
, the external price is unset and thepriceMode
is set toPlatform
.- Returns:
- externalTotalPrice
-
setLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set
-
setLineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemKey
- value to be set
-
setExternalTotalPrice
Value to set. If
externalTotalPrice
is not given and thepriceMode
isExternalTotal
, the external price is unset and thepriceMode
is 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
-
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
-