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 ProductVariantDraftBuilder
builder()
builder factory method for ProductVariantDraftstatic ProductVariantDraftBuilder
builder
(ProductVariantDraft template) create builder for ProductVariantDraft instancestatic ProductVariantDraft
deepCopy
(ProductVariantDraft template) factory method to create a deep copy of ProductVariantDraft@Valid List<AssetDraft>
Media assets for the Product 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 ProductVariantDraft
of()
factory methodstatic ProductVariantDraft
of
(ProductVariantDraft template) factory method to create a shallow copy ProductVariantDraftvoid
setAssets
(AssetDraft... assets) Media assets for the Product Variant.void
setAssets
(List<AssetDraft> assets) Media assets for the Product Variant.void
setAttributes
(Attribute... attributes) Attributes according to the respective AttributeDefinition.void
setAttributes
(List<Attribute> attributes) Attributes according to the respective AttributeDefinition.void
Images for the Product Variant.void
Images for the Product Variant.void
User-defined unique identifier for the ProductVariant.void
setPrices
(PriceDraft... prices) The Embedded Prices for the Product Variant.void
setPrices
(List<PriceDraft> prices) The Embedded Prices for the Product Variant.void
User-defined unique SKU of the Product Variant.static com.fasterxml.jackson.core.type.TypeReference<ProductVariantDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductVariantDraft
(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,
validFrom
andvalidUntil
).- Returns:
- prices
-
getAttributes
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,
validFrom
andvalidUntil
).- 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,
validFrom
andvalidUntil
).- Parameters:
prices
- values to be set
-
setAttributes
Attributes according to the respective AttributeDefinition.
- Parameters:
attributes
- values to be set
-
setAttributes
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
-
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
-