Interface DuplicateVariantValuesError

All Superinterfaces:
ErrorObject

public interface DuplicateVariantValuesError extends ErrorObject

The given combination of values of a Product Variant conflicts with an existing one. Every Product Variant must have a distinct combination of SKU, prices, and custom attribute values.


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

    • getVariantValues

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

      The offending variant values.

      Returns:
      variantValues
    • setVariantValues

      void setVariantValues(VariantValues variantValues)

      The offending variant 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