Class ProductSetPricesActionBuilder
- All Implemented Interfaces:
Builder<ProductSetPricesAction>
Example to create an instance using the builder pattern
ProductSetPricesAction productSetPricesAction = ProductSetPricesAction.builder()
.plusPrices(pricesBuilder -> pricesBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPrices(Function<PriceDraftBuilder, PriceDraft> builder) The Embedded Prices to set.build()builds ProductSetPricesAction with checking for non-null required valuesbuilds ProductSetPricesAction without checking for non-null required valuesThe Embedded Prices to set.getSku()Theskuof the ProductVariant to update.Whether only the staged ProductVariant is updated.Theidof the ProductVariant to update.of()factory method for an instance of ProductSetPricesActionBuilderof(ProductSetPricesAction template) create builder for ProductSetPricesAction instanceplusPrices(PriceDraft... prices) The Embedded Prices to set.plusPrices(Function<PriceDraftBuilder, PriceDraftBuilder> builder) The Embedded Prices to set.prices(PriceDraft... prices) The Embedded Prices to set.prices(List<PriceDraft> prices) The Embedded Prices to set.setPrices(Function<PriceDraftBuilder, PriceDraft> builder) The Embedded Prices to set.Theskuof the ProductVariant to update.Whether only the staged ProductVariant is updated.Theidof the ProductVariant to update.withPrices(Function<PriceDraftBuilder, PriceDraftBuilder> builder) The Embedded Prices to set.
-
Constructor Details
-
ProductSetPricesActionBuilder
public ProductSetPricesActionBuilder()
-
-
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
-
prices
The Embedded Prices to set.
If any two Embedded Prices in this array have the same key, a DuplicatePriceKey error is returned.
If any two Embedded Prices in this array have the same price scope, a DuplicatePriceScope error is returned.
If any two Embedded Prices in this array have overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.
- Parameters:
prices- value to be set- Returns:
- Builder
-
prices
The Embedded Prices to set.
If any two Embedded Prices in this array have the same key, a DuplicatePriceKey error is returned.
If any two Embedded Prices in this array have the same price scope, a DuplicatePriceScope error is returned.
If any two Embedded Prices in this array have overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.
- Parameters:
prices- value to be set- Returns:
- Builder
-
plusPrices
The Embedded Prices to set.
If any two Embedded Prices in this array have the same key, a DuplicatePriceKey error is returned.
If any two Embedded Prices in this array have the same price scope, a DuplicatePriceScope error is returned.
If any two Embedded Prices in this array have overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.
- Parameters:
prices- value to be set- Returns:
- Builder
-
plusPrices
public ProductSetPricesActionBuilder plusPrices(Function<PriceDraftBuilder, PriceDraftBuilder> builder) The Embedded Prices to set.
If any two Embedded Prices in this array have the same key, a DuplicatePriceKey error is returned.
If any two Embedded Prices in this array have the same price scope, a DuplicatePriceScope error is returned.
If any two Embedded Prices in this array have overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.
- Parameters:
builder- function to build the prices value- Returns:
- Builder
-
withPrices
public ProductSetPricesActionBuilder withPrices(Function<PriceDraftBuilder, PriceDraftBuilder> builder) The Embedded Prices to set.
If any two Embedded Prices in this array have the same key, a DuplicatePriceKey error is returned.
If any two Embedded Prices in this array have the same price scope, a DuplicatePriceScope error is returned.
If any two Embedded Prices in this array have overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.
- Parameters:
builder- function to build the prices value- Returns:
- Builder
-
addPrices
The Embedded Prices to set.
If any two Embedded Prices in this array have the same key, a DuplicatePriceKey error is returned.
If any two Embedded Prices in this array have the same price scope, a DuplicatePriceScope error is returned.
If any two Embedded Prices in this array have overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.
- Parameters:
builder- function to build the prices value- Returns:
- Builder
-
setPrices
The Embedded Prices to set.
If any two Embedded Prices in this array have the same key, a DuplicatePriceKey error is returned.
If any two Embedded Prices in this array have the same price scope, a DuplicatePriceScope error is returned.
If any two Embedded Prices in this array have overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.
- Parameters:
builder- function to build the prices value- Returns:
- Builder
-
staged
Whether only the staged ProductVariant is updated. If
false, both the current and staged ProductVariant are 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
-
getPrices
The Embedded Prices to set.
If any two Embedded Prices in this array have the same key, a DuplicatePriceKey error is returned.
If any two Embedded Prices in this array have the same price scope, a DuplicatePriceScope error is returned.
If any two Embedded Prices in this array have overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period.
- Returns:
- prices
-
getStaged
Whether only the staged ProductVariant is updated. If
false, both the current and staged ProductVariant are updated.- Returns:
- staged
-
build
builds ProductSetPricesAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductSetPricesAction>- Returns:
- ProductSetPricesAction
-
buildUnchecked
builds ProductSetPricesAction without checking for non-null required values- Returns:
- ProductSetPricesAction
-
of
factory method for an instance of ProductSetPricesActionBuilder- Returns:
- builder
-
of
create builder for ProductSetPricesAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-