Interface ProductAssignmentMissingError

All Superinterfaces:
ErrorObject

public interface ProductAssignmentMissingError extends ErrorObject

Returned when a Product is not assigned to the Product Selection. The error is returned as a failed response either to the Set Variant Selection or to the Set Variant Exclusion update action.


Example to create an instance using the builder pattern

     ProductAssignmentMissingError productAssignmentMissingError = ProductAssignmentMissingError.builder()
             .message("{message}")
             .product(productBuilder -> productBuilder)
             .build()
 
  • Field Details

    • PRODUCT_ASSIGNMENT_MISSING

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

      For Product Selection of mode Individual, the message is: "A Product Variant Selection can only be set for a Product that has previously been added to the Product Selection." For Product Selection of mode IndividualExclusion, the message is: "A Variant Exclusion can only be set for a Product that has previously been added to the Product Selection of type Individual Exclusion."

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

      @NotNull @Valid @NotNull @Valid ProductReference getProduct()

      Reference to the Product for which the error was returned.

      Returns:
      product
    • setMessage

      void setMessage(String message)

      For Product Selection of mode Individual, the message is: "A Product Variant Selection can only be set for a Product that has previously been added to the Product Selection." For Product Selection of mode IndividualExclusion, the message is: "A Variant Exclusion can only be set for a Product that has previously been added to the Product Selection of type Individual Exclusion."

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

      void setProduct(ProductReference product)

      Reference to the Product for which the error was returned.

      Parameters:
      product - value to be set
    • of

      factory method
      Returns:
      instance of ProductAssignmentMissingError
    • of

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

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

      builder factory method for ProductAssignmentMissingError
      Returns:
      builder
    • builder

      create builder for ProductAssignmentMissingError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductAssignmentMissingError

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