Class ProductVariantDraftBuilder
- All Implemented Interfaces:
Builder<ProductVariantDraft>
Example to create an instance using the builder pattern
ProductVariantDraft productVariantDraft = ProductVariantDraft.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssets(Function<AssetDraftBuilder, AssetDraft> builder) Media assets for the Product Variant.addAttributes(Function<AttributeBuilder, Attribute> builder) Variant Attributes according to the respective AttributeDefinition.addImages(Function<ImageBuilder, Image> builder) Images for the Product Variant.addPrices(Function<PriceDraftBuilder, PriceDraft> builder) The 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) Variant Attributes according to the respective AttributeDefinition.attributes(List<Attribute> attributes) Variant Attributes according to the respective AttributeDefinition.build()builds ProductVariantDraft with checking for non-null required valuesbuilds ProductVariantDraft without checking for non-null required valuesMedia assets for the Product Variant.Variant Attributes according to the respective AttributeDefinition.Images for the Product Variant.getKey()User-defined unique identifier for the ProductVariant.The Embedded Prices for the Product Variant.getSku()User-defined unique SKU of the Product Variant.Images for the Product Variant.Images for the Product Variant.User-defined unique identifier for the ProductVariant.static ProductVariantDraftBuilderof()factory method for an instance of ProductVariantDraftBuilderstatic ProductVariantDraftBuilderof(ProductVariantDraft template) create builder for ProductVariantDraft instanceplusAssets(AssetDraft... assets) Media assets for the Product Variant.plusAssets(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Media assets for the Product Variant.plusAttributes(Attribute... attributes) Variant Attributes according to the respective AttributeDefinition.Variant Attributes according to the respective AttributeDefinition.plusImages(Image... images) Images for the Product Variant.plusImages(Function<ImageBuilder, ImageBuilder> builder) Images for the Product Variant.plusPrices(PriceDraft... prices) The Embedded Prices for the Product Variant.plusPrices(Function<PriceDraftBuilder, PriceDraftBuilder> builder) The Embedded Prices for the Product Variant.prices(PriceDraft... prices) The Embedded Prices for the Product Variant.prices(List<PriceDraft> prices) The Embedded Prices for the Product Variant.setAssets(Function<AssetDraftBuilder, AssetDraft> builder) Media assets for the Product Variant.setAttributes(Function<AttributeBuilder, Attribute> builder) Variant Attributes according to the respective AttributeDefinition.setImages(Function<ImageBuilder, Image> builder) Images for the Product Variant.setPrices(Function<PriceDraftBuilder, PriceDraft> builder) The Embedded Prices for the Product Variant.User-defined unique SKU of the Product Variant.withAssets(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Media assets for the Product Variant.Variant Attributes according to the respective AttributeDefinition.withImages(Function<ImageBuilder, ImageBuilder> builder) Images for the Product Variant.withPrices(Function<PriceDraftBuilder, PriceDraftBuilder> builder) The Embedded Prices for the Product Variant.
-
Constructor Details
-
ProductVariantDraftBuilder
public ProductVariantDraftBuilder()
-
-
Method Details
-
sku
User-defined unique SKU of the Product Variant.
- Parameters:
sku- value to be set- Returns:
- Builder
-
key
User-defined unique identifier for the ProductVariant.
- Parameters:
key- value to be set- Returns:
- Builder
-
prices
The Embedded Prices for the Product Variant. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel,
validFromandvalidUntil).- Parameters:
prices- value to be set- Returns:
- Builder
-
prices
The Embedded Prices for the Product Variant. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel,
validFromandvalidUntil).- Parameters:
prices- value to be set- Returns:
- Builder
-
plusPrices
The Embedded Prices for the Product Variant. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel,
validFromandvalidUntil).- Parameters:
prices- value to be set- Returns:
- Builder
-
plusPrices
The Embedded Prices for the Product Variant. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel,
validFromandvalidUntil).- Parameters:
builder- function to build the prices value- Returns:
- Builder
-
withPrices
The Embedded Prices for the Product Variant. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel,
validFromandvalidUntil).- Parameters:
builder- function to build the prices value- Returns:
- Builder
-
addPrices
The Embedded Prices for the Product Variant. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel,
validFromandvalidUntil).- Parameters:
builder- function to build the prices value- Returns:
- Builder
-
setPrices
The Embedded Prices for the Product Variant. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel,
validFromandvalidUntil).- Parameters:
builder- function to build the prices value- Returns:
- Builder
-
attributes
Variant Attributes according to the respective AttributeDefinition.
- Parameters:
attributes- value to be set- Returns:
- Builder
-
attributes
Variant Attributes according to the respective AttributeDefinition.
- Parameters:
attributes- value to be set- Returns:
- Builder
-
plusAttributes
Variant Attributes according to the respective AttributeDefinition.
- Parameters:
attributes- value to be set- Returns:
- Builder
-
plusAttributes
public ProductVariantDraftBuilder plusAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Variant Attributes according to the respective AttributeDefinition.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
withAttributes
public ProductVariantDraftBuilder withAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Variant Attributes according to the respective AttributeDefinition.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
addAttributes
Variant Attributes according to the respective AttributeDefinition.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
setAttributes
Variant Attributes according to the respective AttributeDefinition.
- Parameters:
builder- function to build the attributes 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
-
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
Media assets for the Product Variant.
- Parameters:
builder- function to build the assets value- Returns:
- Builder
-
withAssets
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
User-defined unique SKU of the Product Variant.
- Returns:
- sku
-
getKey
User-defined unique identifier for the ProductVariant.
- Returns:
- key
-
getPrices
The Embedded Prices for the Product Variant. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel,
validFromandvalidUntil).- Returns:
- prices
-
getAttributes
Variant Attributes according to the respective AttributeDefinition.
- Returns:
- attributes
-
getImages
Images for the Product Variant.
- Returns:
- images
-
getAssets
Media assets for the Product Variant.
- Returns:
- assets
-
build
builds ProductVariantDraft with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductVariantDraft>- Returns:
- ProductVariantDraft
-
buildUnchecked
builds ProductVariantDraft without checking for non-null required values- Returns:
- ProductVariantDraft
-
of
factory method for an instance of ProductVariantDraftBuilder- Returns:
- builder
-
of
create builder for ProductVariantDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-