Interface ProductSelectionSetVariantExclusionAction
- All Superinterfaces:
ProductSelectionUpdateAction
,ResourceUpdateAction<ProductSelectionUpdateAction>
Updates the Product Variant Exclusion of an existing Product Selection Assignment. A ProductVariantExclusion can only be set if the Product has already been excluded from the Product Selection with IndividualExclusion
ProductSelectionMode.
If the specified Product is not assigned to the Product Selection, a ProductAssignmentMissing error is returned.
Example to create an instance using the builder pattern
ProductSelectionSetVariantExclusionAction productSelectionSetVariantExclusionAction = ProductSelectionSetVariantExclusionAction.builder()
.product(productBuilder -> productBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ProductSelectionSetVariantExclusionAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductSelectionSetVariantExclusionActioncreate builder for ProductSelectionSetVariantExclusionAction instancefactory method to create a deep copy of ProductSelectionSetVariantExclusionAction@NotNull @Valid ProductResourceIdentifier
ResourceIdentifier of the Product@Valid ProductVariantExclusion
Determines which Variants of the previously excluded Product are to be included in the Product Selection withIndividualExclusion
ProductSelectionMode.of()
factory methodof
(ProductSelectionSetVariantExclusionAction template) factory method to create a shallow copy ProductSelectionSetVariantExclusionActionvoid
setProduct
(ProductResourceIdentifier product) ResourceIdentifier of the Productvoid
setVariantExclusion
(ProductVariantExclusion variantExclusion) Determines which Variants of the previously excluded Product are to be included in the Product Selection withIndividualExclusion
ProductSelectionMode.static com.fasterxml.jackson.core.type.TypeReference<ProductSelectionSetVariantExclusionAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductSelectionSetVariantExclusionAction
(Function<ProductSelectionSetVariantExclusionAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product_selection.ProductSelectionUpdateAction
getAction, withProductSelectionUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_VARIANT_EXCLUSION
discriminator value for ProductSelectionSetVariantExclusionAction- See Also:
-
-
Method Details
-
getProduct
ResourceIdentifier of the Product
- Returns:
- product
-
getVariantExclusion
Determines which Variants of the previously excluded Product are to be included in the Product Selection with
IndividualExclusion
ProductSelectionMode. Leave it empty to unset an existing Variant Exclusion.- Returns:
- variantExclusion
-
setProduct
ResourceIdentifier of the Product
- Parameters:
product
- value to be set
-
setVariantExclusion
Determines which Variants of the previously excluded Product are to be included in the Product Selection with
IndividualExclusion
ProductSelectionMode. Leave it empty to unset an existing Variant Exclusion.- Parameters:
variantExclusion
- value to be set
-
of
factory method- Returns:
- instance of ProductSelectionSetVariantExclusionAction
-
of
static ProductSelectionSetVariantExclusionAction of(ProductSelectionSetVariantExclusionAction template) factory method to create a shallow copy ProductSelectionSetVariantExclusionAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductSelectionSetVariantExclusionAction deepCopy(@Nullable ProductSelectionSetVariantExclusionAction template) factory method to create a deep copy of ProductSelectionSetVariantExclusionAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductSelectionSetVariantExclusionAction- Returns:
- builder
-
builder
static ProductSelectionSetVariantExclusionActionBuilder builder(ProductSelectionSetVariantExclusionAction template) create builder for ProductSelectionSetVariantExclusionAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductSelectionSetVariantExclusionAction
default <T> T withProductSelectionSetVariantExclusionAction(Function<ProductSelectionSetVariantExclusionAction, 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<ProductSelectionSetVariantExclusionAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-