Class ProductAddPriceActionBuilder
java.lang.Object
com.commercetools.api.models.product.ProductAddPriceActionBuilder
- All Implemented Interfaces:
Builder<ProductAddPriceAction>
ProductAddPriceActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductAddPriceAction productAddPriceAction = ProductAddPriceAction.builder()
.price(priceBuilder -> priceBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ProductAddPriceAction with checking for non-null required valuesbuilds ProductAddPriceAction without checking for non-null required valuesgetPrice()Embedded Price to add to the Product Variant.getSku()Theskuof the ProductVariant to update.Iftrue, only the stagedpricesis updated.Theidof the ProductVariant to update.static ProductAddPriceActionBuilderof()factory method for an instance of ProductAddPriceActionBuilderstatic ProductAddPriceActionBuilderof(ProductAddPriceAction template) create builder for ProductAddPriceAction instanceprice(PriceDraft price) Embedded Price to add to the Product Variant.price(Function<PriceDraftBuilder, PriceDraftBuilder> builder) Embedded Price to add to the Product Variant.Theskuof the ProductVariant to update.Iftrue, only the stagedpricesis updated.Theidof the ProductVariant to update.withPrice(Function<PriceDraftBuilder, PriceDraft> builder) Embedded Price to add to the Product Variant.
-
Constructor Details
-
ProductAddPriceActionBuilder
public ProductAddPriceActionBuilder()
-
-
Method Details
-
variantId
The
idof the ProductVariant to update.- Parameters:
variantId- value to be set- Returns:
- Builder
-
sku
The
skuof the ProductVariant to update.- Parameters:
sku- value to be set- Returns:
- Builder
-
price
Embedded Price to add to the Product Variant.
- Parameters:
builder- function to build the price value- Returns:
- Builder
-
withPrice
Embedded Price to add to the Product Variant.
- Parameters:
builder- function to build the price value- Returns:
- Builder
-
price
Embedded Price to add to the Product Variant.
- Parameters:
price- value to be set- Returns:
- Builder
-
staged
If
true, only the stagedpricesis updated. Iffalse, both the current and stagedpricesare updated.- Parameters:
staged- value to be set- Returns:
- Builder
-
getVariantId
The
idof the ProductVariant to update.- Returns:
- variantId
-
getSku
The
skuof the ProductVariant to update.- Returns:
- sku
-
getPrice
Embedded Price to add to the Product Variant.
- Returns:
- price
-
getStaged
If
true, only the stagedpricesis updated. Iffalse, both the current and stagedpricesare updated.- Returns:
- staged
-
build
builds ProductAddPriceAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductAddPriceAction>- Returns:
- ProductAddPriceAction
-
buildUnchecked
builds ProductAddPriceAction without checking for non-null required values- Returns:
- ProductAddPriceAction
-
of
factory method for an instance of ProductAddPriceActionBuilder- Returns:
- builder
-
of
create builder for ProductAddPriceAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-