Interface NoMatchingProductDiscountFoundError
- All Superinterfaces:
ErrorObject
Returned when a Product Discount could not be found that could be applied to the Price of a Product Variant.
The error is returned as a failed response to the Get Matching ProductDiscount request.
Example to create an instance using the builder pattern
NoMatchingProductDiscountFoundError noMatchingProductDiscountFoundError = NoMatchingProductDiscountFoundError.builder()
.message("{message}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for NoMatchingProductDiscountFoundError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for NoMatchingProductDiscountFoundErrorbuilder
(NoMatchingProductDiscountFoundError template) create builder for NoMatchingProductDiscountFoundError instancedeepCopy
(NoMatchingProductDiscountFoundError template) factory method to create a deep copy of NoMatchingProductDiscountFoundError@NotNull String
getCode()
Error identifier.@NotNull String
"Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."
of()
factory methodof
(NoMatchingProductDiscountFoundError template) factory method to create a shallow copy NoMatchingProductDiscountFoundErrorvoid
setMessage
(String message) "Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."
static com.fasterxml.jackson.core.type.TypeReference<NoMatchingProductDiscountFoundError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
NO_MATCHING_PRODUCT_DISCOUNT_FOUND
discriminator value for NoMatchingProductDiscountFoundError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
"Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of NoMatchingProductDiscountFoundError
-
of
factory method to create a shallow copy NoMatchingProductDiscountFoundError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static NoMatchingProductDiscountFoundError deepCopy(@Nullable NoMatchingProductDiscountFoundError template) factory method to create a deep copy of NoMatchingProductDiscountFoundError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for NoMatchingProductDiscountFoundError- Returns:
- builder
-
builder
static NoMatchingProductDiscountFoundErrorBuilder builder(NoMatchingProductDiscountFoundError template) create builder for NoMatchingProductDiscountFoundError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withNoMatchingProductDiscountFoundError
default <T> T withNoMatchingProductDiscountFoundError(Function<NoMatchingProductDiscountFoundError, 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<NoMatchingProductDiscountFoundError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-