Interface DuplicateVariantValuesError

All Superinterfaces:
ErrorObject
All Known Implementing Classes:
DuplicateVariantValuesErrorImpl

public interface DuplicateVariantValuesError extends ErrorObject

Returned when a Product Variant value conflicts with an existing one during an Update Product request.


Example to create an instance using the builder pattern

     DuplicateVariantValuesError duplicateVariantValuesError = DuplicateVariantValuesError.builder()
             .message("{message}")
             .variantValues(variantValuesBuilder -> variantValuesBuilder)
             .build()
 
  • Field Details

    • DUPLICATE_VARIANT_VALUES

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

      "A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."

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

      @NotNull @Valid @NotNull @Valid VariantValues getVariantValues()

      Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.

      Returns:
      variantValues
    • setMessage

      void setMessage(String message)

      "A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."

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

      void setVariantValues(VariantValues variantValues)

      Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.

      Parameters:
      variantValues - value to be set
    • of

      factory method
      Returns:
      instance of DuplicateVariantValuesError
    • of

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

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

      builder factory method for DuplicateVariantValuesError
      Returns:
      builder
    • builder

      create builder for DuplicateVariantValuesError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDuplicateVariantValuesError

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