Class ProductChangePriceActionBuilder
java.lang.Object
com.commercetools.api.models.product.ProductChangePriceActionBuilder
- All Implemented Interfaces:
Builder<ProductChangePriceAction>
public class ProductChangePriceActionBuilder
extends Object
implements Builder<ProductChangePriceAction>
ProductChangePriceActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductChangePriceAction productChangePriceAction = ProductChangePriceAction.builder()
.priceId("{priceId}")
.price(priceBuilder -> priceBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ProductChangePriceAction with checking for non-null required valuesbuilds ProductChangePriceAction without checking for non-null required valuesgetPrice()Value to set.Theidof the Embedded Price to update.Iftrue, only the staged Embedded Price is updated.of()factory method for an instance of ProductChangePriceActionBuilderof(ProductChangePriceAction template) create builder for ProductChangePriceAction instanceprice(PriceDraft price) Value to set.price(Function<PriceDraftBuilder, PriceDraftBuilder> builder) Value to set.Theidof the Embedded Price to update.Iftrue, only the staged Embedded Price is updated.withPrice(Function<PriceDraftBuilder, PriceDraft> builder) Value to set.
-
Constructor Details
-
ProductChangePriceActionBuilder
public ProductChangePriceActionBuilder()
-
-
Method Details
-
priceId
The
idof the Embedded Price to update.- Parameters:
priceId- value to be set- Returns:
- Builder
-
price
Value to set.
- Parameters:
builder- function to build the price value- Returns:
- Builder
-
withPrice
Value to set.
- Parameters:
builder- function to build the price value- Returns:
- Builder
-
price
Value to set.
- Parameters:
price- value to be set- Returns:
- Builder
-
staged
If
true, only the staged Embedded Price is updated. Iffalse, both the current and staged Embedded Price are updated.- Parameters:
staged- value to be set- Returns:
- Builder
-
getPriceId
The
idof the Embedded Price to update.- Returns:
- priceId
-
getPrice
Value to set.
- Returns:
- price
-
getStaged
If
true, only the staged Embedded Price is updated. Iffalse, both the current and staged Embedded Price are updated.- Returns:
- staged
-
build
builds ProductChangePriceAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductChangePriceAction>- Returns:
- ProductChangePriceAction
-
buildUnchecked
builds ProductChangePriceAction without checking for non-null required values- Returns:
- ProductChangePriceAction
-
of
factory method for an instance of ProductChangePriceActionBuilder- Returns:
- builder
-
of
create builder for ProductChangePriceAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-