Interface MatchingPriceNotFoundError

All Superinterfaces:
ErrorObject

public interface MatchingPriceNotFoundError extends ErrorObject

Returned when the Product Variant does not have a Price according to the Product priceMode value for a selected currency, country, Customer Group, or Channel.

The error can be returned as a failed response to all update actions on Carts and Staged Orders.

The error is also returned as a failed response to:

  • Authenticate (sign in) Customer and Authenticate (sign in) Customer in Store requests and Set CustomerGroup update action on Customers.
  • Authenticate (sign in) Customer and Authenticate (sign in) Customer in Store requests on My Customer Profile.
  • Create Cart, Create Cart in Store, Replicate Cart, and Replicate Cart in Store requests on Carts.
  • Create Cart and Create Cart in Store and Replicate My Cart requests on My Carts.
  • Create Cart in BusinessUnit and Replicate Cart in Business Unit requests on Associate Carts.
  • Create Order from Cart and Create Order in Store from Cart requests on Orders.
  • Create Order from Cart and Create Order in Store from Cart requests on My Orders.
  • Create Order from Cart in BusinessUnit request on Associate Orders.

Example to create an instance using the builder pattern

     MatchingPriceNotFoundError matchingPriceNotFoundError = MatchingPriceNotFoundError.builder()
             .message("{message}")
             .productId("{productId}")
             .variantId(1)
             .build()
 
  • Field Details

    • MATCHING_PRICE_NOT_FOUND

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

      "The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."

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

      @NotNull @NotNull String getProductId()

      Unique identifier of a Product.

      Returns:
      productId
    • getVariantId

      @NotNull @NotNull Integer getVariantId()

      Unique identifier of a ProductVariant in the Product.

      Returns:
      variantId
    • getCurrency

      String getCurrency()

      Currency code of the country.

      Returns:
      currency
    • getCountry

      String getCountry()

      Country code of the geographic location.

      Returns:
      country
    • getCustomerGroup

      @Valid @Valid CustomerGroupReference getCustomerGroup()

      Customer Group associated with the Price.

      Returns:
      customerGroup
    • getChannel

      @Valid @Valid ChannelReference getChannel()

      Channel associated with the Price.

      Returns:
      channel
    • setMessage

      void setMessage(String message)

      "The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."

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

      void setProductId(String productId)

      Unique identifier of a Product.

      Parameters:
      productId - value to be set
    • setVariantId

      void setVariantId(Integer variantId)

      Unique identifier of a ProductVariant in the Product.

      Parameters:
      variantId - value to be set
    • setCurrency

      void setCurrency(String currency)

      Currency code of the country.

      Parameters:
      currency - value to be set
    • setCountry

      void setCountry(String country)

      Country code of the geographic location.

      Parameters:
      country - value to be set
    • setCustomerGroup

      void setCustomerGroup(CustomerGroupReference customerGroup)

      Customer Group associated with the Price.

      Parameters:
      customerGroup - value to be set
    • setChannel

      void setChannel(ChannelReference channel)

      Channel associated with the Price.

      Parameters:
      channel - value to be set
    • of

      factory method
      Returns:
      instance of MatchingPriceNotFoundError
    • of

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

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

      builder factory method for MatchingPriceNotFoundError
      Returns:
      builder
    • builder

      create builder for MatchingPriceNotFoundError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMatchingPriceNotFoundError

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