Interface ProductSetSkuAction
- All Superinterfaces:
ProductUpdateAction
,ResourceUpdateAction<ProductUpdateAction>
- All Known Implementing Classes:
ProductSetSkuActionImpl
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductSetSkuActionBuilder
builder()
builder factory method for ProductSetSkuActionstatic ProductSetSkuActionBuilder
builder
(ProductSetSkuAction template) create builder for ProductSetSkuAction instancestatic ProductSetSkuAction
deepCopy
(ProductSetSkuAction template) factory method to create a deep copy of ProductSetSkuActiongetSku()
Value to set.Iftrue
, only the stagedsku
is updated.@NotNull Long
Theid
of the ProductVariant to update.static ProductSetSkuAction
of()
factory methodstatic ProductSetSkuAction
of
(ProductSetSkuAction template) factory method to create a shallow copy ProductSetSkuActionvoid
Value to set.void
Iftrue
, only the stagedsku
is updated.void
setVariantId
(Long variantId) Theid
of the ProductVariant to update.static com.fasterxml.jackson.core.type.TypeReference<ProductSetSkuAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductSetSkuAction
(Function<ProductSetSkuAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_SKU
discriminator value for ProductSetSkuAction- See Also:
-
-
Method Details
-
getVariantId
The
id
of 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 stagedsku
is updated. Iffalse
, both the current and stagedsku
are updated.- Returns:
- staged
-
setVariantId
The
id
of 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 stagedsku
is updated. Iffalse
, both the current and stagedsku
are 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
-
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
-