Class ProductPriceChangedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductPriceChangedMessagePayload>
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductPriceChangedMessagePayload with checking for non-null required valuesbuilds ProductPriceChangedMessagePayload without checking for non-null required valuesThe Embedded Price after the Change Embedded Price update action.The current Embedded Price before the Change Embedded Price update action.The staged Embedded Price before the Change Embedded Price update action.Whether the update was only applied to the staged Product Projection.Unique identifier of the ProductVariant for which the Price was changed.The Embedded Price after the Change Embedded Price update action.newPrice
(Function<PriceBuilder, PriceBuilder> builder) The Embedded Price after the Change Embedded Price update action.of()
factory method for an instance of ProductPriceChangedMessagePayloadBuilderof
(ProductPriceChangedMessagePayload template) create builder for ProductPriceChangedMessagePayload instanceThe current Embedded Price before the Change Embedded Price update action.oldPrice
(Function<PriceBuilder, PriceBuilder> builder) The current Embedded Price before the Change Embedded Price update action.oldStagedPrice
(Price oldStagedPrice) The staged Embedded Price before the Change Embedded Price update action.oldStagedPrice
(Function<PriceBuilder, PriceBuilder> builder) The staged Embedded Price before the Change Embedded Price update action.Whether the update was only applied to the staged Product Projection.Unique identifier of the ProductVariant for which the Price was changed.withNewPrice
(Function<PriceBuilder, Price> builder) The Embedded Price after the Change Embedded Price update action.withOldPrice
(Function<PriceBuilder, Price> builder) The current Embedded Price before the Change Embedded Price update action.withOldStagedPrice
(Function<PriceBuilder, Price> builder) The staged Embedded Price before the Change Embedded Price update action.
-
Constructor Details
-
ProductPriceChangedMessagePayloadBuilder
public ProductPriceChangedMessagePayloadBuilder()
-
-
Method Details
-
variantId
Unique identifier of the ProductVariant for which the Price was changed.
- Parameters:
variantId
- value to be set- Returns:
- Builder
-
oldPrice
public ProductPriceChangedMessagePayloadBuilder oldPrice(Function<PriceBuilder, PriceBuilder> builder) The current Embedded Price before the Change Embedded Price update action.
- Parameters:
builder
- function to build the oldPrice value- Returns:
- Builder
-
withOldPrice
The current Embedded Price before the Change Embedded Price update action.
- Parameters:
builder
- function to build the oldPrice value- Returns:
- Builder
-
oldPrice
The current Embedded Price before the Change Embedded Price update action.
- Parameters:
oldPrice
- value to be set- Returns:
- Builder
-
newPrice
public ProductPriceChangedMessagePayloadBuilder newPrice(Function<PriceBuilder, PriceBuilder> builder) The Embedded Price after the Change Embedded Price update action.
- Parameters:
builder
- function to build the newPrice value- Returns:
- Builder
-
withNewPrice
The Embedded Price after the Change Embedded Price update action.
- Parameters:
builder
- function to build the newPrice value- Returns:
- Builder
-
newPrice
The Embedded Price after the Change Embedded Price update action.
- Parameters:
newPrice
- value to be set- Returns:
- Builder
-
staged
Whether the update was only applied to the staged Product Projection.
- Parameters:
staged
- value to be set- Returns:
- Builder
-
oldStagedPrice
public ProductPriceChangedMessagePayloadBuilder oldStagedPrice(Function<PriceBuilder, PriceBuilder> builder) The staged Embedded Price before the Change Embedded Price update action.
- Parameters:
builder
- function to build the oldStagedPrice value- Returns:
- Builder
-
withOldStagedPrice
public ProductPriceChangedMessagePayloadBuilder withOldStagedPrice(Function<PriceBuilder, Price> builder) The staged Embedded Price before the Change Embedded Price update action.
- Parameters:
builder
- function to build the oldStagedPrice value- Returns:
- Builder
-
oldStagedPrice
The staged Embedded Price before the Change Embedded Price update action.
- Parameters:
oldStagedPrice
- value to be set- Returns:
- Builder
-
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
-
build
builds ProductPriceChangedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductPriceChangedMessagePayload>
- Returns:
- ProductPriceChangedMessagePayload
-
buildUnchecked
builds ProductPriceChangedMessagePayload without checking for non-null required values- Returns:
- ProductPriceChangedMessagePayload
-
of
factory method for an instance of ProductPriceChangedMessagePayloadBuilder- Returns:
- builder
-
of
public static ProductPriceChangedMessagePayloadBuilder of(ProductPriceChangedMessagePayload template) create builder for ProductPriceChangedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-