Interface CartSetLineItemPriceAction
- All Superinterfaces:
CartUpdateAction,ResourceUpdateAction<CartUpdateAction>
Sets the LineItem price and changes the priceMode to ExternalPrice LineItemPriceMode.
Example to create an instance using the builder pattern
CartSetLineItemPriceAction cartSetLineItemPriceAction = CartSetLineItemPriceAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartSetLineItemPriceAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartSetLineItemPriceActionbuilder(CartSetLineItemPriceAction template) create builder for CartSetLineItemPriceAction instancecopyDeep()static CartSetLineItemPriceActiondeepCopy(CartSetLineItemPriceAction template) factory method to create a deep copy of CartSetLineItemPriceAction@Valid MoneyValue to set.idof the LineItem to update.keyof the LineItem to update.static CartSetLineItemPriceActionof()factory methodstatic CartSetLineItemPriceActionof(CartSetLineItemPriceAction template) factory method to create a shallow copy CartSetLineItemPriceActionvoidsetExternalPrice(Money externalPrice) 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<CartSetLineItemPriceAction>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_PRICE
discriminator value for CartSetLineItemPriceAction- 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
-
getExternalPrice
Value to set. If
externalPriceis not given and thepriceModeisExternalPrice, the external price is unset and thepriceModeis set toPlatform.To set the money value in high precision, use HighPrecisionMoneyDraft.
- Returns:
- externalPrice
-
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
-
setExternalPrice
Value to set. If
externalPriceis not given and thepriceModeisExternalPrice, the external price is unset and thepriceModeis set toPlatform.To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
externalPrice- value to be set
-
of
factory method- Returns:
- instance of CartSetLineItemPriceAction
-
of
factory method to create a shallow copy CartSetLineItemPriceAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartSetLineItemPriceAction copyDeep()- Specified by:
copyDeepin interfaceCartUpdateAction
-
deepCopy
factory method to create a deep copy of CartSetLineItemPriceAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetLineItemPriceAction- Returns:
- builder
-
builder
create builder for CartSetLineItemPriceAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetLineItemPriceAction
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-