Class ProductAddPriceActionBuilder
- All Implemented Interfaces:
Builder<ProductAddPriceAction>
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.Whether only stagedpricesare 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.Whether only stagedpricesare 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.
If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.
If this Embedded Price has the same price scope as an existing Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.
If this 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
Embedded Price to add to the Product Variant.
If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.
If this Embedded Price has the same price scope as an existing Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.
If this 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
Embedded Price to add to the Product Variant.
If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.
If this Embedded Price has the same price scope as an existing Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.
If this 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 staged
pricesare updated. Iffalse, both 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.
If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.
If this Embedded Price has the same price scope as an existing Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.
If this 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 staged
pricesare updated. Iffalse, both 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
-