Interface ProductSetDiscountedPriceAction
- All Superinterfaces:
ProductUpdateAction,ResourceUpdateAction<ProductUpdateAction>
Produces the ProductPriceExternalDiscountSet Message.
Example to create an instance using the builder pattern
ProductSetDiscountedPriceAction productSetDiscountedPriceAction = ProductSetDiscountedPriceAction.builder()
.priceId("{priceId}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ProductSetDiscountedPriceAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductSetDiscountedPriceActionbuilder(ProductSetDiscountedPriceAction template) create builder for ProductSetDiscountedPriceAction instancecopyDeep()deepCopy(ProductSetDiscountedPriceAction template) factory method to create a deep copy of ProductSetDiscountedPriceAction@Valid DiscountedPriceDraftValue to set.@NotNull StringTheidof the Price to set the Discount.Iftrue, only the staged Embedded Price is updated.of()factory methodof(ProductSetDiscountedPriceAction template) factory method to create a shallow copy ProductSetDiscountedPriceActionvoidsetDiscounted(DiscountedPriceDraft discounted) Value to set.voidsetPriceId(String priceId) Theidof the Price to set the Discount.voidIftrue, only the staged Embedded Price is updated.static com.fasterxml.jackson.core.type.TypeReference<ProductSetDiscountedPriceAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_DISCOUNTED_PRICE
discriminator value for ProductSetDiscountedPriceAction- See Also:
-
-
Method Details
-
getPriceId
The
idof the Price to set the Discount.- Returns:
- priceId
-
getStaged
Boolean getStaged()If
true, only the staged Embedded Price is updated. Iffalse, both the current and staged Embedded Price are updated.- Returns:
- staged
-
getDiscounted
Value to set. If empty, any existing value will be removed. The referenced ProductDiscount must have the Type
external, be active, and its predicate must match the referenced Price.- Returns:
- discounted
-
setPriceId
The
idof the Price to set the Discount.- Parameters:
priceId- value to be set
-
setStaged
If
true, only the staged Embedded Price is updated. Iffalse, both the current and staged Embedded Price are updated.- Parameters:
staged- value to be set
-
setDiscounted
Value to set. If empty, any existing value will be removed. The referenced ProductDiscount must have the Type
external, be active, and its predicate must match the referenced Price.- Parameters:
discounted- value to be set
-
of
factory method- Returns:
- instance of ProductSetDiscountedPriceAction
-
of
factory method to create a shallow copy ProductSetDiscountedPriceAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductSetDiscountedPriceAction copyDeep()- Specified by:
copyDeepin interfaceProductUpdateAction
-
deepCopy
@Nullable static ProductSetDiscountedPriceAction deepCopy(@Nullable ProductSetDiscountedPriceAction template) factory method to create a deep copy of ProductSetDiscountedPriceAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductSetDiscountedPriceAction- Returns:
- builder
-
builder
create builder for ProductSetDiscountedPriceAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductSetDiscountedPriceAction
default <T> T withProductSetDiscountedPriceAction(Function<ProductSetDiscountedPriceAction, 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<ProductSetDiscountedPriceAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-