Interface MatchingPriceNotFoundError
- All Superinterfaces:
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 Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for MatchingPriceNotFoundError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for MatchingPriceNotFoundErrorbuilder
(MatchingPriceNotFoundError template) create builder for MatchingPriceNotFoundError instancestatic MatchingPriceNotFoundError
deepCopy
(MatchingPriceNotFoundError template) factory method to create a deep copy of MatchingPriceNotFoundError@Valid ChannelReference
Channel associated with the Price.@NotNull String
getCode()
Error identifier.Country code of the geographic location.Currency code of the country.@Valid CustomerGroupReference
Customer Group associated with the Price.@NotNull String
"The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."
@NotNull String
Unique identifier of a Product.@NotNull Integer
Unique identifier of a ProductVariant in the Product.static MatchingPriceNotFoundError
of()
factory methodstatic MatchingPriceNotFoundError
of
(MatchingPriceNotFoundError template) factory method to create a shallow copy MatchingPriceNotFoundErrorvoid
setChannel
(ChannelReference channel) Channel associated with the Price.void
setCountry
(String country) Country code of the geographic location.void
setCurrency
(String currency) Currency code of the country.void
setCustomerGroup
(CustomerGroupReference customerGroup) Customer Group associated with the Price.void
setMessage
(String message) "The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."
void
setProductId
(String productId) Unique identifier of a Product.void
setVariantId
(Integer variantId) Unique identifier of a ProductVariant in the Product.static com.fasterxml.jackson.core.type.TypeReference<MatchingPriceNotFoundError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
MATCHING_PRICE_NOT_FOUND
discriminator value for MatchingPriceNotFoundError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getProductId
Unique identifier of a Product.
- Returns:
- productId
-
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
Customer Group associated with the Price.
- Returns:
- customerGroup
-
getChannel
Channel associated with the Price.
- Returns:
- channel
-
setMessage
"The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setProductId
Unique identifier of a Product.
- Parameters:
productId
- value to be set
-
setVariantId
Unique identifier of a ProductVariant in the Product.
- Parameters:
variantId
- value to be set
-
setCurrency
Currency code of the country.
- Parameters:
currency
- value to be set
-
setCountry
Country code of the geographic location.
- Parameters:
country
- value to be set
-
setCustomerGroup
Customer Group associated with the Price.
- Parameters:
customerGroup
- value to be set
-
setChannel
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
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-