Interface ProductRemoveVariantAction
- All Superinterfaces:
ProductUpdateAction,ResourceUpdateAction<ProductUpdateAction>
Either id or sku is required. Produces the ProductVariantDeleted Message. If the Product Variant to remove is part of a ProductSelectionAssignment its SKU will be automatically removed from the respective ProductVariantSelection.
Example to create an instance using the builder pattern
ProductRemoveVariantAction productRemoveVariantAction = ProductRemoveVariantAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ProductRemoveVariantAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductRemoveVariantActionbuilder(ProductRemoveVariantAction template) create builder for ProductRemoveVariantAction instancecopyDeep()static ProductRemoveVariantActiondeepCopy(ProductRemoveVariantAction template) factory method to create a deep copy of ProductRemoveVariantActiongetId()Theidof the ProductVariant to remove.getSku()Theskuof the ProductVariant to remove.Iftrue, only the staged ProductVariant is removed.static ProductRemoveVariantActionof()factory methodstatic ProductRemoveVariantActionof(ProductRemoveVariantAction template) factory method to create a shallow copy ProductRemoveVariantActionvoidTheidof the ProductVariant to remove.voidTheskuof the ProductVariant to remove.voidIftrue, only the staged ProductVariant is removed.static com.fasterxml.jackson.core.type.TypeReference<ProductRemoveVariantAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
REMOVE_VARIANT
discriminator value for ProductRemoveVariantAction- See Also:
-
-
Method Details
-
getId
Long getId()The
idof the ProductVariant to remove.- Returns:
- id
-
getSku
String getSku()The
skuof the ProductVariant to remove.- Returns:
- sku
-
getStaged
Boolean getStaged()If
true, only the staged ProductVariant is removed. Iffalse, both the current and staged ProductVariant is removed.- Returns:
- staged
-
setId
The
idof the ProductVariant to remove.- Parameters:
id- value to be set
-
setSku
The
skuof the ProductVariant to remove.- Parameters:
sku- value to be set
-
setStaged
If
true, only the staged ProductVariant is removed. Iffalse, both the current and staged ProductVariant is removed.- Parameters:
staged- value to be set
-
of
factory method- Returns:
- instance of ProductRemoveVariantAction
-
of
factory method to create a shallow copy ProductRemoveVariantAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductRemoveVariantAction copyDeep()- Specified by:
copyDeepin interfaceProductUpdateAction
-
deepCopy
factory method to create a deep copy of ProductRemoveVariantAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductRemoveVariantAction- Returns:
- builder
-
builder
create builder for ProductRemoveVariantAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductRemoveVariantAction
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
-