Interface DuplicatePriceScopeError
- All Superinterfaces:
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 Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for DuplicatePriceScopeError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for DuplicatePriceScopeErrorbuilder
(DuplicatePriceScopeError template) create builder for DuplicatePriceScopeError instancestatic DuplicatePriceScopeError
deepCopy
(DuplicatePriceScopeError template) factory method to create a deep copy of DuplicatePriceScopeError@NotNull String
getCode()
Error identifier.@NotNull @Valid Price
Conflicting Embedded Price.@NotNull String
"Duplicate price scope: $priceScope.
static DuplicatePriceScopeError
of()
factory methodstatic DuplicatePriceScopeError
of
(DuplicatePriceScopeError template) factory method to create a shallow copy DuplicatePriceScopeErrorvoid
setConflictingPrice
(Price conflictingPrice) Conflicting Embedded Price.void
setMessage
(String message) "Duplicate price scope: $priceScope.
static com.fasterxml.jackson.core.type.TypeReference<DuplicatePriceScopeError>
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
-
DUPLICATE_PRICE_SCOPE
discriminator value for DuplicatePriceScopeError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
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 interfaceErrorObject
- Returns:
- message
-
getConflictingPrice
Conflicting Embedded Price.
- Returns:
- conflictingPrice
-
setMessage
"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 interfaceErrorObject
- Parameters:
message
- value to be set
-
setConflictingPrice
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
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
-