Interface InvalidItemShippingDetailsError

All Superinterfaces:
ErrorObject

public interface InvalidItemShippingDetailsError extends 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 Details

    • INVALID_ITEM_SHIPPING_DETAILS

      static final String INVALID_ITEM_SHIPPING_DETAILS
      discriminator value for InvalidItemShippingDetailsError
      See Also:
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      "Inconsistent shipping details for $subject with ID $itemId. $subject quantity is $itemQuantity and shippingTargets quantity sum is $quantitySum."

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • getSubject

      @NotNull @NotNull String getSubject()

      "LineItem" or "CustomLineItem"

      Returns:
      subject
    • getItemId

      @NotNull @NotNull String getItemId()

      Unique identifier of the Line Item or Custom Line Item.

      Returns:
      itemId
    • setMessage

      void setMessage(String message)

      "Inconsistent shipping details for $subject with ID $itemId. $subject quantity is $itemQuantity and shippingTargets quantity sum is $quantitySum."

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • setSubject

      void setSubject(String subject)

      "LineItem" or "CustomLineItem"

      Parameters:
      subject - value to be set
    • setItemId

      void setItemId(String itemId)

      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

      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