Interface EditPreviewFailedError

All Superinterfaces:
ErrorObject

public interface EditPreviewFailedError extends ErrorObject

Returned when a preview to find an appropriate Shipping Method for an OrderEdit could not be generated.

The error is returned as a failed response to the Get Shipping Methods for an OrderEdit request.


Example to create an instance using the builder pattern

     EditPreviewFailedError editPreviewFailedError = EditPreviewFailedError.builder()
             .message("{message}")
             .result(resultBuilder -> resultBuilder)
             .build()
 
  • Field Details

    • EDIT_PREVIEW_FAILED

      static final String EDIT_PREVIEW_FAILED
      discriminator value for EditPreviewFailedError
      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()

      "Error while applying staged actions. ShippingMethods could not be determined."

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

      @NotNull @Valid @NotNull @Valid OrderEditPreviewFailure getResult()

      State of the OrderEdit where the stagedActions cannot be applied to the Order.

      Returns:
      result
    • setMessage

      void setMessage(String message)

      "Error while applying staged actions. ShippingMethods could not be determined."

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

      void setResult(OrderEditPreviewFailure result)

      State of the OrderEdit where the stagedActions cannot be applied to the Order.

      Parameters:
      result - value to be set
    • of

      factory method
      Returns:
      instance of EditPreviewFailedError
    • of

      factory method to create a shallow copy EditPreviewFailedError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of EditPreviewFailedError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for EditPreviewFailedError
      Returns:
      builder
    • builder

      create builder for EditPreviewFailedError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withEditPreviewFailedError

      default <T> T withEditPreviewFailedError(Function<EditPreviewFailedError,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<EditPreviewFailedError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference