Interface ProductSelectionExcludeProductAction
- All Superinterfaces:
ProductSelectionUpdateAction
,ResourceUpdateAction<ProductSelectionUpdateAction>
Excludes a Product from a Product Selection with IndividualExclusion
ProductSelectionMode.
If the specified Product is already assigned to the Product Selection, but the existing Product Selection has a different Product Variant Exclusion, a ProductPresentWithDifferentVariantSelection error is returned.
Example to create an instance using the builder pattern
ProductSelectionExcludeProductAction productSelectionExcludeProductAction = ProductSelectionExcludeProductAction.builder()
.product(productBuilder -> productBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ProductSelectionExcludeProductAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductSelectionExcludeProductActionbuilder
(ProductSelectionExcludeProductAction template) create builder for ProductSelectionExcludeProductAction instancedeepCopy
(ProductSelectionExcludeProductAction template) factory method to create a deep copy of ProductSelectionExcludeProductAction@NotNull @Valid ProductResourceIdentifier
ResourceIdentifier of the Product@Valid ProductVariantExclusion
Defines which Variants of the Product will be excluded from the Product Selection.of()
factory methodof
(ProductSelectionExcludeProductAction template) factory method to create a shallow copy ProductSelectionExcludeProductActionvoid
setProduct
(ProductResourceIdentifier product) ResourceIdentifier of the Productvoid
setVariantExclusion
(ProductVariantExclusion variantExclusion) Defines which Variants of the Product will be excluded from the Product Selection.static com.fasterxml.jackson.core.type.TypeReference<ProductSelectionExcludeProductAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
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
-
EXCLUDE_PRODUCT
discriminator value for ProductSelectionExcludeProductAction- See Also:
-
-
Method Details
-
getProduct
ResourceIdentifier of the Product
- Returns:
- product
-
getVariantExclusion
Defines which Variants of the Product will be excluded from the Product Selection. If not supplied all Variants are deemed to be excluded.
- Returns:
- variantExclusion
-
setProduct
ResourceIdentifier of the Product
- Parameters:
product
- value to be set
-
setVariantExclusion
Defines which Variants of the Product will be excluded from the Product Selection. If not supplied all Variants are deemed to be excluded.
- Parameters:
variantExclusion
- value to be set
-
of
factory method- Returns:
- instance of ProductSelectionExcludeProductAction
-
of
factory method to create a shallow copy ProductSelectionExcludeProductAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductSelectionExcludeProductAction deepCopy(@Nullable ProductSelectionExcludeProductAction template) factory method to create a deep copy of ProductSelectionExcludeProductAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductSelectionExcludeProductAction- Returns:
- builder
-
builder
static ProductSelectionExcludeProductActionBuilder builder(ProductSelectionExcludeProductAction template) create builder for ProductSelectionExcludeProductAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductSelectionExcludeProductAction
default <T> T withProductSelectionExcludeProductAction(Function<ProductSelectionExcludeProductAction, 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<ProductSelectionExcludeProductAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-