Interface ProductVariantDraft
- All Superinterfaces:
Draft<ProductVariantDraft>,WithKey
Creates a Product Variant when included in the masterVariant and variants fields of the ProductDraft.
Example to create an instance using the builder pattern
ProductVariantDraft productVariantDraft = ProductVariantDraft.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductVariantDraftBuilderbuilder()builder factory method for ProductVariantDraftstatic ProductVariantDraftBuilderbuilder(ProductVariantDraft template) create builder for ProductVariantDraft instancecopyDeep()static ProductVariantDraftdeepCopy(ProductVariantDraft template) factory method to create a deep copy of ProductVariantDraft@Valid List<AssetDraft>Media 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.@Valid List<PriceDraft>The Embedded Prices for the Product Variant.getSku()User-defined unique SKU of the Product Variant.static ProductVariantDraftof()factory methodstatic ProductVariantDraftof(ProductVariantDraft template) factory method to create a shallow copy ProductVariantDraftvoidsetAssets(AssetDraft... assets) Media assets for the Product Variant.voidsetAssets(List<AssetDraft> assets) Media assets for the Product Variant.voidsetAttributes(Attribute... attributes) Variant Attributes according to the respective AttributeDefinition.voidsetAttributes(List<Attribute> attributes) Variant Attributes according to the respective AttributeDefinition.voidImages for the Product Variant.voidImages for the Product Variant.voidUser-defined unique identifier for the ProductVariant.voidsetPrices(PriceDraft... prices) The Embedded Prices for the Product Variant.voidsetPrices(List<PriceDraft> prices) The Embedded Prices for the Product Variant.voidUser-defined unique SKU of the Product Variant.static com.fasterxml.jackson.core.type.TypeReference<ProductVariantDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithProductVariantDraft(Function<ProductVariantDraft, T> helper) accessor map function
-
Method Details
-
getSku
String getSku()User-defined unique SKU of the Product Variant.
- Returns:
- sku
-
getKey
String getKey()User-defined unique identifier for the ProductVariant.
-
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
-
setSku
User-defined unique SKU of the Product Variant.
- Parameters:
sku- value to be set
-
setKey
User-defined unique identifier for the ProductVariant.
- Parameters:
key- value to be set
-
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:
prices- values to be set
-
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:
prices- values to be set
-
setAttributes
Variant Attributes according to the respective AttributeDefinition.
- Parameters:
attributes- values to be set
-
setAttributes
Variant Attributes according to the respective AttributeDefinition.
- Parameters:
attributes- values to be set
-
setImages
Images for the Product Variant.
- Parameters:
images- values to be set
-
setImages
Images for the Product Variant.
- Parameters:
images- values to be set
-
setAssets
Media assets for the Product Variant.
- Parameters:
assets- values to be set
-
setAssets
Media assets for the Product Variant.
- Parameters:
assets- values to be set
-
of
factory method- Returns:
- instance of ProductVariantDraft
-
of
factory method to create a shallow copy ProductVariantDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductVariantDraft copyDeep() -
deepCopy
factory method to create a deep copy of ProductVariantDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductVariantDraft- Returns:
- builder
-
builder
create builder for ProductVariantDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductVariantDraft
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-