Class ProductAddVariantActionBuilder
- All Implemented Interfaces:
Builder<ProductAddVariantAction>
Example to create an instance using the builder pattern
ProductAddVariantAction productAddVariantAction = ProductAddVariantAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAssets
(Function<AssetDraftBuilder, AssetDraft> builder) Media assets for the Product Variant.addAttributes
(Function<AttributeBuilder, Attribute> builder) Attributes for the Product Variant.addImages
(Function<ImageBuilder, Image> builder) Images for the Product Variant.addPrices
(Function<PriceDraftBuilder, PriceDraft> builder) Embedded Prices for the Product Variant.assets
(AssetDraft... assets) Media assets for the Product Variant.assets
(List<AssetDraft> assets) Media assets for the Product Variant.attributes
(Attribute... attributes) Attributes for the Product Variant.attributes
(List<Attribute> attributes) Attributes for the Product Variant.build()
builds ProductAddVariantAction with checking for non-null required valuesbuilds ProductAddVariantAction without checking for non-null required valuesMedia assets for the Product Variant.Attributes for the Product Variant.Images for the Product Variant.getKey()
Value to set.Embedded Prices for the Product Variant.getSku()
Value to set.Iftrue
the new Product Variant is only staged.Images for the Product Variant.Images for the Product Variant.Value to set.of()
factory method for an instance of ProductAddVariantActionBuilderof
(ProductAddVariantAction template) create builder for ProductAddVariantAction instanceplusAssets
(AssetDraft... assets) Media assets for the Product Variant.plusAssets
(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Media assets for the Product Variant.plusAttributes
(Attribute... attributes) Attributes for the Product Variant.Attributes for the Product Variant.plusImages
(Image... images) Images for the Product Variant.plusImages
(Function<ImageBuilder, ImageBuilder> builder) Images for the Product Variant.plusPrices
(PriceDraft... prices) Embedded Prices for the Product Variant.plusPrices
(Function<PriceDraftBuilder, PriceDraftBuilder> builder) Embedded Prices for the Product Variant.prices
(PriceDraft... prices) Embedded Prices for the Product Variant.prices
(List<PriceDraft> prices) Embedded Prices for the Product Variant.setAssets
(Function<AssetDraftBuilder, AssetDraft> builder) Media assets for the Product Variant.setAttributes
(Function<AttributeBuilder, Attribute> builder) Attributes for the Product Variant.setImages
(Function<ImageBuilder, Image> builder) Images for the Product Variant.setPrices
(Function<PriceDraftBuilder, PriceDraft> builder) Embedded Prices for the Product Variant.Value to set.Iftrue
the new Product Variant is only staged.withAssets
(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Media assets for the Product Variant.Attributes for the Product Variant.withImages
(Function<ImageBuilder, ImageBuilder> builder) Images for the Product Variant.withPrices
(Function<PriceDraftBuilder, PriceDraftBuilder> builder) Embedded Prices for the Product Variant.
-
Constructor Details
-
ProductAddVariantActionBuilder
public ProductAddVariantActionBuilder()
-
-
Method Details
-
sku
Value to set. Must be unique.
- Parameters:
sku
- value to be set- Returns:
- Builder
-
key
Value to set. Must be unique.
- Parameters:
key
- value to be set- Returns:
- Builder
-
prices
Embedded Prices for the Product Variant.
- Parameters:
prices
- value to be set- Returns:
- Builder
-
prices
Embedded Prices for the Product Variant.
- Parameters:
prices
- value to be set- Returns:
- Builder
-
plusPrices
Embedded Prices for the Product Variant.
- Parameters:
prices
- value to be set- Returns:
- Builder
-
plusPrices
public ProductAddVariantActionBuilder plusPrices(Function<PriceDraftBuilder, PriceDraftBuilder> builder) Embedded Prices for the Product Variant.
- Parameters:
builder
- function to build the prices value- Returns:
- Builder
-
withPrices
public ProductAddVariantActionBuilder withPrices(Function<PriceDraftBuilder, PriceDraftBuilder> builder) Embedded Prices for the Product Variant.
- Parameters:
builder
- function to build the prices value- Returns:
- Builder
-
addPrices
Embedded Prices for the Product Variant.
- Parameters:
builder
- function to build the prices value- Returns:
- Builder
-
setPrices
Embedded Prices for the Product Variant.
- Parameters:
builder
- function to build the prices value- Returns:
- Builder
-
images
Images for the Product Variant.
- Parameters:
images
- value to be set- Returns:
- Builder
-
images
Images for the Product Variant.
- Parameters:
images
- value to be set- Returns:
- Builder
-
plusImages
Images for the Product Variant.
- Parameters:
images
- value to be set- Returns:
- Builder
-
plusImages
Images for the Product Variant.
- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
withImages
Images for the Product Variant.
- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
addImages
Images for the Product Variant.
- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
setImages
Images for the Product Variant.
- Parameters:
builder
- function to build the images value- Returns:
- Builder
-
attributes
Attributes for the Product Variant.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
attributes
Attributes for the Product Variant.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
Attributes for the Product Variant.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
public ProductAddVariantActionBuilder plusAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Attributes for the Product Variant.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
withAttributes
public ProductAddVariantActionBuilder withAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Attributes for the Product Variant.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
addAttributes
Attributes for the Product Variant.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
setAttributes
Attributes for the Product Variant.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
staged
If
true
the new Product Variant is only staged. Iffalse
the new Product Variant is both current and staged.- Parameters:
staged
- value to be set- Returns:
- Builder
-
assets
Media assets for the Product Variant.
- Parameters:
assets
- value to be set- Returns:
- Builder
-
assets
Media assets for the Product Variant.
- Parameters:
assets
- value to be set- Returns:
- Builder
-
plusAssets
Media assets for the Product Variant.
- Parameters:
assets
- value to be set- Returns:
- Builder
-
plusAssets
public ProductAddVariantActionBuilder plusAssets(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Media assets for the Product Variant.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
withAssets
public ProductAddVariantActionBuilder withAssets(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Media assets for the Product Variant.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
addAssets
Media assets for the Product Variant.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
setAssets
Media assets for the Product Variant.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
getSku
Value to set. Must be unique.
- Returns:
- sku
-
getKey
Value to set. Must be unique.
- Returns:
- key
-
getPrices
Embedded Prices for the Product Variant.
- Returns:
- prices
-
getImages
Images for the Product Variant.
- Returns:
- images
-
getAttributes
Attributes for the Product Variant.
- Returns:
- attributes
-
getStaged
If
true
the new Product Variant is only staged. Iffalse
the new Product Variant is both current and staged.- Returns:
- staged
-
getAssets
Media assets for the Product Variant.
- Returns:
- assets
-
build
builds ProductAddVariantAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductAddVariantAction>
- Returns:
- ProductAddVariantAction
-
buildUnchecked
builds ProductAddVariantAction without checking for non-null required values- Returns:
- ProductAddVariantAction
-
of
factory method for an instance of ProductAddVariantActionBuilder- Returns:
- builder
-
of
create builder for ProductAddVariantAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-