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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for MatchingPriceNotFoundError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for MatchingPriceNotFoundErrorbuilder(MatchingPriceNotFoundError template) create builder for MatchingPriceNotFoundError instancecopyDeep()static MatchingPriceNotFoundErrordeepCopy(MatchingPriceNotFoundError template) factory method to create a deep copy of MatchingPriceNotFoundError@Valid ChannelReferenceChannel associated with the Price.@NotNull StringgetCode()Error identifier.Country code of the geographic location.Currency code of the country.@Valid CustomerGroupReferenceCustomer 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 StringUnique identifier of a Product.@NotNull IntegerUnique identifier of a ProductVariant in the Product.static MatchingPriceNotFoundErrorof()factory methodstatic MatchingPriceNotFoundErrorof(MatchingPriceNotFoundError template) factory method to create a shallow copy MatchingPriceNotFoundErrorvoidsetChannel(ChannelReference channel) Channel associated with the Price.voidsetCountry(String country) Country code of the geographic location.voidsetCurrency(String currency) Currency code of the country.voidsetCustomerGroup(CustomerGroupReference customerGroup) Customer Group associated with the Price.voidsetMessage(String message) "The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."voidsetProductId(String productId) Unique identifier of a Product.voidsetVariantId(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> Taccessor 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:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."- Specified by:
getMessagein 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:
setMessagein 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
-
copyDeep
MatchingPriceNotFoundError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
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
-