Interface InvalidItemShippingDetailsError
- All Superinterfaces:
ErrorObject
Returned when Line Item or Custom Line Item quantities set under ItemShippingDetails do not match the sum of the quantities in their respective shipping details.
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 Cart and Create Cart in Store requests and Add LineItem, Add CustomLineItem, Set LineItem ShippingDetails, Set CustomLineItem ShippingDetails, Add Shopping List, and Remove LineItem update actions on Carts.
- Create Cart and Create Cart in Store requests, and Add LineItem, Set LineItem ShippingDetails, and Remove LineItem update actions on My Carts.
- Create Cart in BusinessUnit request on Associate Carts.
- Create Order from Cart, Create Order in Store from Cart, Create Order from Quote, and Create Order by Import requests on Orders.
- Create Order from Cart, Create Order in Store from Cart, and Create Order from Quote requests on My Orders.
- Add LineItem, Add CustomLineItem, Set LineItem ShippingDetails, Set CustomLineItem ShippingDetails, Add Shopping List, and Remove LineItem update actions on Order Edits.
- Create Order from Cart in BusinessUnit and Create Order from Quote in BusinessUnit requests on Associate Orders.
Example to create an instance using the builder pattern
InvalidItemShippingDetailsError invalidItemShippingDetailsError = InvalidItemShippingDetailsError.builder()
.message("{message}")
.subject("{subject}")
.itemId("{itemId}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
discriminator value for InvalidItemShippingDetailsError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for InvalidItemShippingDetailsErrorbuilder
(InvalidItemShippingDetailsError template) create builder for InvalidItemShippingDetailsError instancedeepCopy
(InvalidItemShippingDetailsError template) factory method to create a deep copy of InvalidItemShippingDetailsError@NotNull String
getCode()
Error identifier.@NotNull String
Unique identifier of the Line Item or Custom Line Item.@NotNull String
"Inconsistent shipping details for $subject with ID $itemId.
@NotNull String
"LineItem"
or"CustomLineItem"
of()
factory methodof
(InvalidItemShippingDetailsError template) factory method to create a shallow copy InvalidItemShippingDetailsErrorvoid
Unique identifier of the Line Item or Custom Line Item.void
setMessage
(String message) "Inconsistent shipping details for $subject with ID $itemId.
void
setSubject
(String subject) "LineItem"
or"CustomLineItem"
static com.fasterxml.jackson.core.type.TypeReference<InvalidItemShippingDetailsError>
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
-
INVALID_ITEM_SHIPPING_DETAILS
discriminator value for InvalidItemShippingDetailsError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"Inconsistent shipping details for $subject with ID $itemId. $subject quantity is $itemQuantity and shippingTargets quantity sum is $quantitySum."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getSubject
"LineItem"
or"CustomLineItem"
- Returns:
- subject
-
getItemId
Unique identifier of the Line Item or Custom Line Item.
- Returns:
- itemId
-
setMessage
"Inconsistent shipping details for $subject with ID $itemId. $subject quantity is $itemQuantity and shippingTargets quantity sum is $quantitySum."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setSubject
"LineItem"
or"CustomLineItem"
- Parameters:
subject
- value to be set
-
setItemId
Unique identifier of the Line Item or Custom Line Item.
- Parameters:
itemId
- value to be set
-
of
factory method- Returns:
- instance of InvalidItemShippingDetailsError
-
of
factory method to create a shallow copy InvalidItemShippingDetailsError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static InvalidItemShippingDetailsError deepCopy(@Nullable InvalidItemShippingDetailsError template) factory method to create a deep copy of InvalidItemShippingDetailsError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InvalidItemShippingDetailsError- Returns:
- builder
-
builder
create builder for InvalidItemShippingDetailsError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withInvalidItemShippingDetailsError
default <T> T withInvalidItemShippingDetailsError(Function<InvalidItemShippingDetailsError, 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<InvalidItemShippingDetailsError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-