Interface ShippingMethodDoesNotMatchCartError
- All Superinterfaces:
ErrorObject
Returned when the Cart contains a ShippingMethod that is not allowed for the Cart. In this case, the ShippingMethodState value is DoesNotMatchCart.
When a Cart is frozen, the error can be returned as a failed response to all update actions on Carts and My Carts.
The error is also returned as a failed response to:
- Create Order from Cart and Create Order in Store from Cart requests on Orders.
- Create Order from Cart and Create Order in Store from Cart requests on My Orders.
- Create Order from Cart in BusinessUnit request on Associate Orders.
Example to create an instance using the builder pattern
ShippingMethodDoesNotMatchCartError shippingMethodDoesNotMatchCartError = ShippingMethodDoesNotMatchCartError.builder()
.message("{message}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ShippingMethodDoesNotMatchCartError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ShippingMethodDoesNotMatchCartErrorbuilder(ShippingMethodDoesNotMatchCartError template) create builder for ShippingMethodDoesNotMatchCartError instancecopyDeep()deepCopy(ShippingMethodDoesNotMatchCartError template) factory method to create a deep copy of ShippingMethodDoesNotMatchCartError@NotNull StringgetCode()Error identifier.@NotNull String"The predicate does not match the cart."of()factory methodof(ShippingMethodDoesNotMatchCartError template) factory method to create a shallow copy ShippingMethodDoesNotMatchCartErrorvoidsetMessage(String message) "The predicate does not match the cart."static com.fasterxml.jackson.core.type.TypeReference<ShippingMethodDoesNotMatchCartError>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
-
SHIPPING_METHOD_DOES_NOT_MATCH_CART
discriminator value for ShippingMethodDoesNotMatchCartError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"The predicate does not match the cart."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
setMessage
"The predicate does not match the cart."- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
of
factory method- Returns:
- instance of ShippingMethodDoesNotMatchCartError
-
of
factory method to create a shallow copy ShippingMethodDoesNotMatchCartError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ShippingMethodDoesNotMatchCartError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
@Nullable static ShippingMethodDoesNotMatchCartError deepCopy(@Nullable ShippingMethodDoesNotMatchCartError template) factory method to create a deep copy of ShippingMethodDoesNotMatchCartError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShippingMethodDoesNotMatchCartError- Returns:
- builder
-
builder
static ShippingMethodDoesNotMatchCartErrorBuilder builder(ShippingMethodDoesNotMatchCartError template) create builder for ShippingMethodDoesNotMatchCartError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withShippingMethodDoesNotMatchCartError
default <T> T withShippingMethodDoesNotMatchCartError(Function<ShippingMethodDoesNotMatchCartError, 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<ShippingMethodDoesNotMatchCartError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-