Class ProductChangePriceActionBuilder
- All Implemented Interfaces:
Builder<ProductChangePriceAction>
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.Whether 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.Whether 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.
If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.
If the new Embedded Price has the same price scope as another Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.
If the new Embedded Price has 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 price value- Returns:
- Builder
-
withPrice
Value to set.
If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.
If the new Embedded Price has the same price scope as another Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.
If the new Embedded Price has 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 price value- Returns:
- Builder
-
price
Value to set.
If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.
If the new Embedded Price has the same price scope as another Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.
If the new Embedded Price has 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:
price- value to be set- Returns:
- Builder
-
staged
Whether only the staged Embedded Price is updated. If
false, 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.
If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.
If the new Embedded Price has the same price scope as another Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.
If the new Embedded Price has 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:
- price
-
getStaged
Whether only the staged Embedded Price is updated. If
false, 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
-