Interface DuplicatePriceKeyError
- All Superinterfaces:
ErrorObject
Returned when a Price key conflicts with an existing key.
Keys of Embedded Prices must be unique per ProductVariant.
Example to create an instance using the builder pattern
DuplicatePriceKeyError duplicatePriceKeyError = DuplicatePriceKeyError.builder()
.message("{message}")
.conflictingPrice(conflictingPriceBuilder -> conflictingPriceBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for DuplicatePriceKeyError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for DuplicatePriceKeyErrorbuilder(DuplicatePriceKeyError template) create builder for DuplicatePriceKeyError instancecopyDeep()static DuplicatePriceKeyErrordeepCopy(DuplicatePriceKeyError template) factory method to create a deep copy of DuplicatePriceKeyError@NotNull StringgetCode()Error identifier.@NotNull @Valid PriceConflicting Embedded Price.@NotNull String"Duplicate price key: $priceKey.static DuplicatePriceKeyErrorof()factory methodstatic DuplicatePriceKeyErrorof(DuplicatePriceKeyError template) factory method to create a shallow copy DuplicatePriceKeyErrorvoidsetConflictingPrice(Price conflictingPrice) Conflicting Embedded Price.voidsetMessage(String message) "Duplicate price key: $priceKey.static com.fasterxml.jackson.core.type.TypeReference<DuplicatePriceKeyError>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
-
DUPLICATE_PRICE_KEY
discriminator value for DuplicatePriceKeyError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"Duplicate price key: $priceKey. The price key must be unique per variant."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
getConflictingPrice
Conflicting Embedded Price.
- Returns:
- conflictingPrice
-
setMessage
"Duplicate price key: $priceKey. The price key must be unique per variant."- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
setConflictingPrice
Conflicting Embedded Price.
- Parameters:
conflictingPrice- value to be set
-
of
factory method- Returns:
- instance of DuplicatePriceKeyError
-
of
factory method to create a shallow copy DuplicatePriceKeyError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
DuplicatePriceKeyError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
factory method to create a deep copy of DuplicatePriceKeyError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DuplicatePriceKeyError- Returns:
- builder
-
builder
create builder for DuplicatePriceKeyError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withDuplicatePriceKeyError
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
-