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
-
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()
Thesku
of the ProductVariant to update.Iftrue
, only the stagedprices
is updated.Theid
of the ProductVariant to update.static ProductAddPriceActionBuilder
of()
factory method for an instance of ProductAddPriceActionBuilderstatic ProductAddPriceActionBuilder
of
(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.Thesku
of the ProductVariant to update.Iftrue
, only the stagedprices
is updated.Theid
of 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
id
of the ProductVariant to update.- Parameters:
variantId
- value to be set- Returns:
- Builder
-
sku
The
sku
of 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 stagedprices
is updated. Iffalse
, both the current and stagedprices
are updated.- Parameters:
staged
- value to be set- Returns:
- Builder
-
getVariantId
The
id
of the ProductVariant to update.- Returns:
- variantId
-
getSku
The
sku
of the ProductVariant to update.- Returns:
- sku
-
getPrice
Embedded Price to add to the Product Variant.
- Returns:
- price
-
getStaged
If
true
, only the stagedprices
is updated. Iffalse
, both the current and stagedprices
are updated.- Returns:
- staged
-
build
builds ProductAddPriceAction with checking for non-null required values- Specified by:
build
in 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
-