Interface ProductSetSkuAction
- All Superinterfaces:
ProductUpdateAction,ResourceUpdateAction<ProductUpdateAction>
SKU cannot be changed or removed if it is associated with an InventoryEntry. If the SKU to set or unset is part of a ProductSelectionAssignment it will be automatically added or removed from the respective ProductVariantSelection.
Example to create an instance using the builder pattern
ProductSetSkuAction productSetSkuAction = ProductSetSkuAction.builder()
.variantId(0.3)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ProductSetSkuActionBuilderbuilder()builder factory method for ProductSetSkuActionstatic ProductSetSkuActionBuilderbuilder(ProductSetSkuAction template) create builder for ProductSetSkuAction instancecopyDeep()static ProductSetSkuActiondeepCopy(ProductSetSkuAction template) factory method to create a deep copy of ProductSetSkuActiongetSku()Value to set.Iftrue, only the stagedskuis updated.@NotNull LongTheidof the ProductVariant to update.static ProductSetSkuActionof()factory methodstatic ProductSetSkuActionof(ProductSetSkuAction template) factory method to create a shallow copy ProductSetSkuActionvoidValue to set.voidIftrue, only the stagedskuis updated.voidsetVariantId(Long variantId) Theidof the ProductVariant to update.static com.fasterxml.jackson.core.type.TypeReference<ProductSetSkuAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithProductSetSkuAction(Function<ProductSetSkuAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_SKU
discriminator value for ProductSetSkuAction- See Also:
-
-
Method Details
-
getVariantId
The
idof the ProductVariant to update.- Returns:
- variantId
-
getSku
String getSku()Value to set. Must be unique. If empty, any existing value will be removed.
- Returns:
- sku
-
getStaged
Boolean getStaged()If
true, only the stagedskuis updated. Iffalse, both the current and stagedskuare updated.- Returns:
- staged
-
setVariantId
The
idof the ProductVariant to update.- Parameters:
variantId- value to be set
-
setSku
Value to set. Must be unique. If empty, any existing value will be removed.
- Parameters:
sku- value to be set
-
setStaged
If
true, only the stagedskuis updated. Iffalse, both the current and stagedskuare updated.- Parameters:
staged- value to be set
-
of
factory method- Returns:
- instance of ProductSetSkuAction
-
of
factory method to create a shallow copy ProductSetSkuAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductSetSkuAction copyDeep()- Specified by:
copyDeepin interfaceProductUpdateAction
-
deepCopy
factory method to create a deep copy of ProductSetSkuAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductSetSkuAction- Returns:
- builder
-
builder
create builder for ProductSetSkuAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductSetSkuAction
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
-