Interface ProductPriceChangedMessagePayload
- All Superinterfaces:
MessagePayload
,MessagePayloadMixin
Generated after a successful Change Price update action.
Example to create an instance using the builder pattern
ProductPriceChangedMessagePayload productPriceChangedMessagePayload = ProductPriceChangedMessagePayload.builder()
.variantId(0.3)
.oldPrice(oldPriceBuilder -> oldPriceBuilder)
.newPrice(newPriceBuilder -> newPriceBuilder)
.staged(true)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ProductPriceChangedMessagePayload -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductPriceChangedMessagePayloadbuilder
(ProductPriceChangedMessagePayload template) create builder for ProductPriceChangedMessagePayload instancedeepCopy
(ProductPriceChangedMessagePayload template) factory method to create a deep copy of ProductPriceChangedMessagePayload@NotNull @Valid Price
The Embedded Price after the Change Embedded Price update action.@NotNull @Valid Price
The current Embedded Price before the Change Embedded Price update action.@Valid Price
The staged Embedded Price before the Change Embedded Price update action.@NotNull Boolean
Whether the update was only applied to the staged Product Projection.@NotNull Long
Unique identifier of the ProductVariant for which the Price was changed.of()
factory methodof
(ProductPriceChangedMessagePayload template) factory method to create a shallow copy ProductPriceChangedMessagePayloadvoid
setNewPrice
(Price newPrice) The Embedded Price after the Change Embedded Price update action.void
setOldPrice
(Price oldPrice) The current Embedded Price before the Change Embedded Price update action.void
setOldStagedPrice
(Price oldStagedPrice) The staged Embedded Price before the Change Embedded Price update action.void
Whether the update was only applied to the staged Product Projection.void
setVariantId
(Long variantId) Unique identifier of the ProductVariant for which the Price was changed.static com.fasterxml.jackson.core.type.TypeReference<ProductPriceChangedMessagePayload>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.message.MessagePayload
getType, withMessagePayload
Methods inherited from interface com.commercetools.api.models.message.MessagePayloadMixin
as
-
Field Details
-
PRODUCT_PRICE_CHANGED
discriminator value for ProductPriceChangedMessagePayload- See Also:
-
-
Method Details
-
getVariantId
Unique identifier of the ProductVariant for which the Price was changed.
- Returns:
- variantId
-
getOldPrice
The current Embedded Price before the Change Embedded Price update action.
- Returns:
- oldPrice
-
getNewPrice
The Embedded Price after the Change Embedded Price update action.
- Returns:
- newPrice
-
getStaged
Whether the update was only applied to the staged Product Projection.
- Returns:
- staged
-
getOldStagedPrice
The staged Embedded Price before the Change Embedded Price update action.
- Returns:
- oldStagedPrice
-
setVariantId
Unique identifier of the ProductVariant for which the Price was changed.
- Parameters:
variantId
- value to be set
-
setOldPrice
The current Embedded Price before the Change Embedded Price update action.
- Parameters:
oldPrice
- value to be set
-
setNewPrice
The Embedded Price after the Change Embedded Price update action.
- Parameters:
newPrice
- value to be set
-
setStaged
Whether the update was only applied to the staged Product Projection.
- Parameters:
staged
- value to be set
-
setOldStagedPrice
The staged Embedded Price before the Change Embedded Price update action.
- Parameters:
oldStagedPrice
- value to be set
-
of
factory method- Returns:
- instance of ProductPriceChangedMessagePayload
-
of
factory method to create a shallow copy ProductPriceChangedMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductPriceChangedMessagePayload deepCopy(@Nullable ProductPriceChangedMessagePayload template) factory method to create a deep copy of ProductPriceChangedMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductPriceChangedMessagePayload- Returns:
- builder
-
builder
create builder for ProductPriceChangedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductPriceChangedMessagePayload
default <T> T withProductPriceChangedMessagePayload(Function<ProductPriceChangedMessagePayload, 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<ProductPriceChangedMessagePayload> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-