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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for NoMatchingProductDiscountFoundError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for NoMatchingProductDiscountFoundErrorbuilder(NoMatchingProductDiscountFoundError template) create builder for NoMatchingProductDiscountFoundError instancecopyDeep()deepCopy(NoMatchingProductDiscountFoundError template) factory method to create a deep copy of NoMatchingProductDiscountFoundError@NotNull StringgetCode()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 NoMatchingProductDiscountFoundErrorvoidsetMessage(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> Taccessor 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:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
setMessage
"Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."- Specified by:
setMessagein 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
-
copyDeep
NoMatchingProductDiscountFoundError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
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
-