Interface DuplicatePriceScopeError

All Superinterfaces:
ErrorObject

public interface DuplicatePriceScopeError extends ErrorObject

Returned when a Price scope conflicts with an existing one during an Update Product request.

Every Price of a Product Variant must have a distinct combination of currency, Customer Group, country, and Channel that constitute the scope of a Price.


Example to create an instance using the builder pattern

     DuplicatePriceScopeError duplicatePriceScopeError = DuplicatePriceScopeError.builder()
             .message("{message}")
             .conflictingPrice(conflictingPriceBuilder -> conflictingPriceBuilder)
             .build()
 
  • Field Details

    • DUPLICATE_PRICE_SCOPE

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

      "Duplicate price scope: $priceScope. The combination of currency, country, customerGroup and channel must be unique for each price of a product variant."

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

      @NotNull @Valid @NotNull @Valid Price getConflictingPrice()

      Conflicting Embedded Price.

      Returns:
      conflictingPrice
    • setMessage

      void setMessage(String message)

      "Duplicate price scope: $priceScope. The combination of currency, country, customerGroup and channel must be unique for each price of a product variant."

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

      void setConflictingPrice(Price conflictingPrice)

      Conflicting Embedded Price.

      Parameters:
      conflictingPrice - value to be set
    • of

      factory method
      Returns:
      instance of DuplicatePriceScopeError
    • of

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

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

      builder factory method for DuplicatePriceScopeError
      Returns:
      builder
    • builder

      create builder for DuplicatePriceScopeError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDuplicatePriceScopeError

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