Class ProductPricesSetMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.ProductPricesSetMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductPricesSetMessagePayload>
public class ProductPricesSetMessagePayloadBuilder
extends Object
implements Builder<ProductPricesSetMessagePayload>
ProductPricesSetMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductPricesSetMessagePayload productPricesSetMessagePayload = ProductPricesSetMessagePayload.builder()
.variantId(0.3)
.plusPrices(pricesBuilder -> pricesBuilder)
.staged(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddPrices
(Function<PriceBuilder, Price> builder) The Embedded Prices that were set on the ProductVariant.build()
builds ProductPricesSetMessagePayload with checking for non-null required valuesbuilds ProductPricesSetMessagePayload without checking for non-null required valuesThe Embedded Prices that were set on the ProductVariant.Whether the update was only applied to the staged Product Projection.Unique identifier of the ProductVariant for which the Price was set.of()
factory method for an instance of ProductPricesSetMessagePayloadBuilderof
(ProductPricesSetMessagePayload template) create builder for ProductPricesSetMessagePayload instanceplusPrices
(Price... prices) The Embedded Prices that were set on the ProductVariant.plusPrices
(Function<PriceBuilder, PriceBuilder> builder) The Embedded Prices that were set on the ProductVariant.The Embedded Prices that were set on the ProductVariant.The Embedded Prices that were set on the ProductVariant.setPrices
(Function<PriceBuilder, Price> builder) The Embedded Prices that were set on the ProductVariant.Whether the update was only applied to the staged Product Projection.Unique identifier of the ProductVariant for which the Price was set.withPrices
(Function<PriceBuilder, PriceBuilder> builder) The Embedded Prices that were set on the ProductVariant.
-
Constructor Details
-
ProductPricesSetMessagePayloadBuilder
public ProductPricesSetMessagePayloadBuilder()
-
-
Method Details
-
variantId
Unique identifier of the ProductVariant for which the Price was set.
- Parameters:
variantId
- value to be set- Returns:
- Builder
-
prices
The Embedded Prices that were set on the ProductVariant.
- Parameters:
prices
- value to be set- Returns:
- Builder
-
prices
The Embedded Prices that were set on the ProductVariant.
- Parameters:
prices
- value to be set- Returns:
- Builder
-
plusPrices
The Embedded Prices that were set on the ProductVariant.
- Parameters:
prices
- value to be set- Returns:
- Builder
-
plusPrices
public ProductPricesSetMessagePayloadBuilder plusPrices(Function<PriceBuilder, PriceBuilder> builder) The Embedded Prices that were set on the ProductVariant.
- Parameters:
builder
- function to build the prices value- Returns:
- Builder
-
withPrices
public ProductPricesSetMessagePayloadBuilder withPrices(Function<PriceBuilder, PriceBuilder> builder) The Embedded Prices that were set on the ProductVariant.
- Parameters:
builder
- function to build the prices value- Returns:
- Builder
-
addPrices
The Embedded Prices that were set on the ProductVariant.
- Parameters:
builder
- function to build the prices value- Returns:
- Builder
-
setPrices
The Embedded Prices that were set on the ProductVariant.
- Parameters:
builder
- function to build the prices value- 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 set.
- Returns:
- variantId
-
getPrices
The Embedded Prices that were set on the ProductVariant.
- Returns:
- prices
-
getStaged
Whether the update was only applied to the staged Product Projection.
- Returns:
- staged
-
build
builds ProductPricesSetMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductPricesSetMessagePayload>
- Returns:
- ProductPricesSetMessagePayload
-
buildUnchecked
builds ProductPricesSetMessagePayload without checking for non-null required values- Returns:
- ProductPricesSetMessagePayload
-
of
factory method for an instance of ProductPricesSetMessagePayloadBuilder- Returns:
- builder
-
of
create builder for ProductPricesSetMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-