Interface StandalonePriceSetDiscountedPriceAction
- All Superinterfaces:
ResourceUpdateAction<StandalonePriceUpdateAction>
,StandalonePriceUpdateAction
Discounts a Standalone Price of a Product Variant on a published Product. If the Product Variant does not exist or if it exists only in the staged representation of a Product, an InvalidOperationError error is returned.
Produces the StandalonePriceExternalDiscountSet Message.
Example to create an instance using the builder pattern
StandalonePriceSetDiscountedPriceAction standalonePriceSetDiscountedPriceAction = StandalonePriceSetDiscountedPriceAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for StandalonePriceSetDiscountedPriceAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for StandalonePriceSetDiscountedPriceActioncreate builder for StandalonePriceSetDiscountedPriceAction instancefactory method to create a deep copy of StandalonePriceSetDiscountedPriceAction@Valid DiscountedPriceDraft
Value to set.of()
factory methodof
(StandalonePriceSetDiscountedPriceAction template) factory method to create a shallow copy StandalonePriceSetDiscountedPriceActionvoid
setDiscounted
(DiscountedPriceDraft discounted) Value to set.static com.fasterxml.jackson.core.type.TypeReference<StandalonePriceSetDiscountedPriceAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withStandalonePriceSetDiscountedPriceAction
(Function<StandalonePriceSetDiscountedPriceAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.standalone_price.StandalonePriceUpdateAction
getAction, withStandalonePriceUpdateAction
-
Field Details
-
SET_DISCOUNTED_PRICE
discriminator value for StandalonePriceSetDiscountedPriceAction- See Also:
-
-
Method Details
-
getDiscounted
Value to set. If empty, any existing value will be removed.
The referenced ProductDiscount must be of type external, active, and its predicate must match the referenced Price.
- Returns:
- discounted
-
setDiscounted
Value to set. If empty, any existing value will be removed.
The referenced ProductDiscount must be of type external, active, and its predicate must match the referenced Price.
- Parameters:
discounted
- value to be set
-
of
factory method- Returns:
- instance of StandalonePriceSetDiscountedPriceAction
-
of
factory method to create a shallow copy StandalonePriceSetDiscountedPriceAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static StandalonePriceSetDiscountedPriceAction deepCopy(@Nullable StandalonePriceSetDiscountedPriceAction template) factory method to create a deep copy of StandalonePriceSetDiscountedPriceAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StandalonePriceSetDiscountedPriceAction- Returns:
- builder
-
builder
static StandalonePriceSetDiscountedPriceActionBuilder builder(StandalonePriceSetDiscountedPriceAction template) create builder for StandalonePriceSetDiscountedPriceAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStandalonePriceSetDiscountedPriceAction
default <T> T withStandalonePriceSetDiscountedPriceAction(Function<StandalonePriceSetDiscountedPriceAction, 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<StandalonePriceSetDiscountedPriceAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-