Interface GraphQLProductPresentWithDifferentVariantSelectionError
- All Superinterfaces:
GraphQLErrorObject
Returned when a Product is already assigned to a Product Selection, but the Product Selection has either a different Product Variant Selection or a different Product Variant Exclusion.
The error is returned as a failed response either to the Add Product or to the Exclude Product update action.
Example to create an instance using the builder pattern
GraphQLProductPresentWithDifferentVariantSelectionError graphQLProductPresentWithDifferentVariantSelectionError = GraphQLProductPresentWithDifferentVariantSelectionError.builder()
.product(productBuilder -> productBuilder)
.existingVariantSelection(existingVariantSelectionBuilder -> existingVariantSelectionBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for GraphQLProductPresentWithDifferentVariantSelectionError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for GraphQLProductPresentWithDifferentVariantSelectionErrorcreate builder for GraphQLProductPresentWithDifferentVariantSelectionError instancecopyDeep()factory method to create a deep copy of GraphQLProductPresentWithDifferentVariantSelectionError@NotNull StringgetCode()One of the error codes that is listed on the Errors page.@NotNull @Valid ProductVariantSelectionExisting Product Variant Selection or Exclusion for the Product in the Product Selection.@NotNull @Valid ProductReferenceof()factory methodfactory method to create a shallow copy GraphQLProductPresentWithDifferentVariantSelectionErrorvoidsetExistingVariantSelection(ProductVariantSelection existingVariantSelection) Existing Product Variant Selection or Exclusion for the Product in the Product Selection.voidsetProduct(ProductReference product) static com.fasterxml.jackson.core.type.TypeReference<GraphQLProductPresentWithDifferentVariantSelectionError>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithGraphQLProductPresentWithDifferentVariantSelectionError(Function<GraphQLProductPresentWithDifferentVariantSelectionError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
PRODUCT_PRESENT_WITH_DIFFERENT_VARIANT_SELECTION
discriminator value for GraphQLProductPresentWithDifferentVariantSelectionError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:GraphQLErrorObjectOne of the error codes that is listed on the Errors page.
- Specified by:
getCodein interfaceGraphQLErrorObject- Returns:
- code
-
getProduct
- Returns:
- product
-
getExistingVariantSelection
Existing Product Variant Selection or Exclusion for the Product in the Product Selection.
- Returns:
- existingVariantSelection
-
setProduct
- Parameters:
product- value to be set
-
setExistingVariantSelection
Existing Product Variant Selection or Exclusion for the Product in the Product Selection.
- Parameters:
existingVariantSelection- value to be set
-
of
factory method- Returns:
- instance of GraphQLProductPresentWithDifferentVariantSelectionError
-
of
static GraphQLProductPresentWithDifferentVariantSelectionError of(GraphQLProductPresentWithDifferentVariantSelectionError template) factory method to create a shallow copy GraphQLProductPresentWithDifferentVariantSelectionError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
- Specified by:
copyDeepin interfaceGraphQLErrorObject
-
deepCopy
@Nullable static GraphQLProductPresentWithDifferentVariantSelectionError deepCopy(@Nullable GraphQLProductPresentWithDifferentVariantSelectionError template) factory method to create a deep copy of GraphQLProductPresentWithDifferentVariantSelectionError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLProductPresentWithDifferentVariantSelectionError- Returns:
- builder
-
builder
static GraphQLProductPresentWithDifferentVariantSelectionErrorBuilder builder(GraphQLProductPresentWithDifferentVariantSelectionError template) create builder for GraphQLProductPresentWithDifferentVariantSelectionError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLProductPresentWithDifferentVariantSelectionError
default <T> T withGraphQLProductPresentWithDifferentVariantSelectionError(Function<GraphQLProductPresentWithDifferentVariantSelectionError, 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<GraphQLProductPresentWithDifferentVariantSelectionError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-