Class ProductPriceAddedMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.ProductPriceAddedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductPriceAddedMessagePayload>
public class ProductPriceAddedMessagePayloadBuilder
extends Object
implements Builder<ProductPriceAddedMessagePayload>
ProductPriceAddedMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductPriceAddedMessagePayload productPriceAddedMessagePayload = ProductPriceAddedMessagePayload.builder()
.variantId(0.3)
.price(priceBuilder -> priceBuilder)
.staged(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductPriceAddedMessagePayload with checking for non-null required valuesbuilds ProductPriceAddedMessagePayload without checking for non-null required valuesgetPrice()
The Embedded Price that was added to the ProductVariant.Whether the update was only applied to the staged Product Projection.Unique identifier of the ProductVariant for which the Price was added.of()
factory method for an instance of ProductPriceAddedMessagePayloadBuilderof
(ProductPriceAddedMessagePayload template) create builder for ProductPriceAddedMessagePayload instanceThe Embedded Price that was added to the ProductVariant.price
(Function<PriceBuilder, PriceBuilder> builder) The Embedded Price that was added to the ProductVariant.Whether the update was only applied to the staged Product Projection.Unique identifier of the ProductVariant for which the Price was added.withPrice
(Function<PriceBuilder, Price> builder) The Embedded Price that was added to the ProductVariant.
-
Constructor Details
-
ProductPriceAddedMessagePayloadBuilder
public ProductPriceAddedMessagePayloadBuilder()
-
-
Method Details
-
variantId
Unique identifier of the ProductVariant for which the Price was added.
- Parameters:
variantId
- value to be set- Returns:
- Builder
-
price
The Embedded Price that was added to the ProductVariant.
- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
withPrice
The Embedded Price that was added to the ProductVariant.
- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
price
The Embedded Price that was added to the ProductVariant.
- Parameters:
price
- 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
-
getVariantId
Unique identifier of the ProductVariant for which the Price was added.
- Returns:
- variantId
-
getPrice
The Embedded Price that was added to the ProductVariant.
- Returns:
- price
-
getStaged
Whether the update was only applied to the staged Product Projection.
- Returns:
- staged
-
build
builds ProductPriceAddedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductPriceAddedMessagePayload>
- Returns:
- ProductPriceAddedMessagePayload
-
buildUnchecked
builds ProductPriceAddedMessagePayload without checking for non-null required values- Returns:
- ProductPriceAddedMessagePayload
-
of
factory method for an instance of ProductPriceAddedMessagePayloadBuilder- Returns:
- builder
-
of
create builder for ProductPriceAddedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-