Interface ProductSelectionSetVariantSelectionAction
- All Superinterfaces:
ProductSelectionUpdateAction
,ResourceUpdateAction<ProductSelectionUpdateAction>
Updates the Product Variant Selection of an existing Product Selection Assignment. A ProductVariantSelection can only be set if the Product has already been included in the Product Selection with Individual
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
ProductSelectionSetVariantSelectionAction productSelectionSetVariantSelectionAction = ProductSelectionSetVariantSelectionAction.builder()
.product(productBuilder -> productBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ProductSelectionSetVariantSelectionAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductSelectionSetVariantSelectionActioncreate builder for ProductSelectionSetVariantSelectionAction instancefactory method to create a deep copy of ProductSelectionSetVariantSelectionAction@NotNull @Valid ProductResourceIdentifier
ResourceIdentifier of the Product@Valid ProductVariantSelection
Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection.of()
factory methodof
(ProductSelectionSetVariantSelectionAction template) factory method to create a shallow copy ProductSelectionSetVariantSelectionActionvoid
setProduct
(ProductResourceIdentifier product) ResourceIdentifier of the Productvoid
setVariantSelection
(ProductVariantSelection variantSelection) Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection.static com.fasterxml.jackson.core.type.TypeReference<ProductSelectionSetVariantSelectionAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductSelectionSetVariantSelectionAction
(Function<ProductSelectionSetVariantSelectionAction, 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_SELECTION
discriminator value for ProductSelectionSetVariantSelectionAction- See Also:
-
-
Method Details
-
getProduct
ResourceIdentifier of the Product
- Returns:
- product
-
getVariantSelection
Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection. Leave it empty to unset an existing Variant Selection.
- Returns:
- variantSelection
-
setProduct
ResourceIdentifier of the Product
- Parameters:
product
- value to be set
-
setVariantSelection
Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection. Leave it empty to unset an existing Variant Selection.
- Parameters:
variantSelection
- value to be set
-
of
factory method- Returns:
- instance of ProductSelectionSetVariantSelectionAction
-
of
static ProductSelectionSetVariantSelectionAction of(ProductSelectionSetVariantSelectionAction template) factory method to create a shallow copy ProductSelectionSetVariantSelectionAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductSelectionSetVariantSelectionAction deepCopy(@Nullable ProductSelectionSetVariantSelectionAction template) factory method to create a deep copy of ProductSelectionSetVariantSelectionAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductSelectionSetVariantSelectionAction- Returns:
- builder
-
builder
static ProductSelectionSetVariantSelectionActionBuilder builder(ProductSelectionSetVariantSelectionAction template) create builder for ProductSelectionSetVariantSelectionAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductSelectionSetVariantSelectionAction
default <T> T withProductSelectionSetVariantSelectionAction(Function<ProductSelectionSetVariantSelectionAction, 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<ProductSelectionSetVariantSelectionAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-