Interface ProductTailoringAddVariantAction
- All Superinterfaces:
ProductTailoringUpdateAction
Either id or sku is required to reference a ProductVariant that exists. Produces the ProductVariantTailoringAdded Message.
Example to create an instance using the builder pattern
ProductTailoringAddVariantAction productTailoringAddVariantAction = ProductTailoringAddVariantAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ProductTailoringAddVariantAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductTailoringAddVariantActionbuilder(ProductTailoringAddVariantAction template) create builder for ProductTailoringAddVariantAction instancecopyDeep()deepCopy(ProductTailoringAddVariantAction template) factory method to create a deep copy of ProductTailoringAddVariantAction@Valid List<AssetDraft>Media assets for the Product Variant Tailoring.@Valid List<ProductTailoringAttribute>Attributes for the Product Variant Tailoring.getId()Theidof the tailored ProductVariant to update.Images for the Product Variant Tailoring.getSku()Theskuof the tailored ProductVariant to update.Iftruethe new Product Variant Tailoring is only staged.of()factory methodof(ProductTailoringAddVariantAction template) factory method to create a shallow copy ProductTailoringAddVariantActionvoidsetAssets(AssetDraft... assets) Media assets for the Product Variant Tailoring.voidsetAssets(List<AssetDraft> assets) Media assets for the Product Variant Tailoring.voidsetAttributes(ProductTailoringAttribute... attributes) Attributes for the Product Variant Tailoring.voidsetAttributes(List<ProductTailoringAttribute> attributes) Attributes for the Product Variant Tailoring.voidTheidof the tailored ProductVariant to update.voidImages for the Product Variant Tailoring.voidImages for the Product Variant Tailoring.voidTheskuof the tailored ProductVariant to update.voidIftruethe new Product Variant Tailoring is only staged.static com.fasterxml.jackson.core.type.TypeReference<ProductTailoringAddVariantAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.product_tailoring.ProductTailoringUpdateAction
getAction, withProductTailoringUpdateAction
-
Field Details
-
ADD_VARIANT
discriminator value for ProductTailoringAddVariantAction- See Also:
-
-
Method Details
-
getId
Long getId()The
idof the tailored ProductVariant to update.- Returns:
- id
-
getSku
String getSku()The
skuof the tailored ProductVariant to update.- Returns:
- sku
-
getImages
Images for the Product Variant Tailoring.
- Returns:
- images
-
getAssets
Media assets for the Product Variant Tailoring.
- Returns:
- assets
-
getAttributes
Attributes for the Product Variant Tailoring.
- Returns:
- attributes
-
getStaged
Boolean getStaged()If
truethe new Product Variant Tailoring is only staged. Iffalsethe new Product Variant Tailoring is both current and staged.- Returns:
- staged
-
setId
The
idof the tailored ProductVariant to update.- Parameters:
id- value to be set
-
setSku
The
skuof the tailored ProductVariant to update.- Parameters:
sku- value to be set
-
setImages
Images for the Product Variant Tailoring.
- Parameters:
images- values to be set
-
setImages
Images for the Product Variant Tailoring.
- Parameters:
images- values to be set
-
setAssets
Media assets for the Product Variant Tailoring.
- Parameters:
assets- values to be set
-
setAssets
Media assets for the Product Variant Tailoring.
- Parameters:
assets- values to be set
-
setAttributes
Attributes for the Product Variant Tailoring.
- Parameters:
attributes- values to be set
-
setAttributes
Attributes for the Product Variant Tailoring.
- Parameters:
attributes- values to be set
-
setStaged
If
truethe new Product Variant Tailoring is only staged. Iffalsethe new Product Variant Tailoring is both current and staged.- Parameters:
staged- value to be set
-
of
factory method- Returns:
- instance of ProductTailoringAddVariantAction
-
of
factory method to create a shallow copy ProductTailoringAddVariantAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductTailoringAddVariantAction copyDeep()- Specified by:
copyDeepin interfaceProductTailoringUpdateAction
-
deepCopy
@Nullable static ProductTailoringAddVariantAction deepCopy(@Nullable ProductTailoringAddVariantAction template) factory method to create a deep copy of ProductTailoringAddVariantAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductTailoringAddVariantAction- Returns:
- builder
-
builder
create builder for ProductTailoringAddVariantAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductTailoringAddVariantAction
default <T> T withProductTailoringAddVariantAction(Function<ProductTailoringAddVariantAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<ProductTailoringAddVariantAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-