Interface DuplicateStandalonePriceScopeError
- All Superinterfaces:
ErrorObject
Returned when the given Price scope conflicts with the Price scope of an existing Standalone Price. Every Standalone Price associated with the same SKU must have a distinct combination of currency, country, Customer Group, Channel, and validity periods (validFrom and validUntil).
The error is returned as a failed response to the Create StandalonePrice request.
Example to create an instance using the builder pattern
DuplicateStandalonePriceScopeError duplicateStandalonePriceScopeError = DuplicateStandalonePriceScopeError.builder()
.message("{message}")
.conflictingStandalonePrice(conflictingStandalonePriceBuilder -> conflictingStandalonePriceBuilder)
.sku("{sku}")
.currency("{currency}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for DuplicateStandalonePriceScopeError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for DuplicateStandalonePriceScopeErrorbuilder(DuplicateStandalonePriceScopeError template) create builder for DuplicateStandalonePriceScopeError instancecopyDeep()deepCopy(DuplicateStandalonePriceScopeError template) factory method to create a deep copy of DuplicateStandalonePriceScopeError@Valid ChannelResourceIdentifierChannel for which the Standalone Price is valid.@NotNull StringgetCode()Error identifier.@NotNull @Valid StandalonePriceReferenceReference to the conflicting Standalone Price.Country code of the geographic location.@NotNull StringCurrency code of the country.CustomerGroup for which the Standalone Price is valid.@NotNull String"Duplicate standalone price scope for SKU: $sku.@NotNull StringgetSku()SKU of the ProductVariant to which the conflicting Standalone Price is associated.Date and time (UTC) from which the Standalone Price is valid.Date and time (UTC) until which the Standalone Price is valid.of()factory methodof(DuplicateStandalonePriceScopeError template) factory method to create a shallow copy DuplicateStandalonePriceScopeErrorvoidsetChannel(ChannelResourceIdentifier channel) Channel for which the Standalone Price is valid.voidsetConflictingStandalonePrice(StandalonePriceReference conflictingStandalonePrice) Reference to the conflicting Standalone Price.voidsetCountry(String country) Country code of the geographic location.voidsetCurrency(String currency) Currency code of the country.voidsetCustomerGroup(CustomerGroupResourceIdentifier customerGroup) CustomerGroup for which the Standalone Price is valid.voidsetMessage(String message) "Duplicate standalone price scope for SKU: $sku.voidSKU of the ProductVariant to which the conflicting Standalone Price is associated.voidsetValidFrom(ZonedDateTime validFrom) Date and time (UTC) from which the Standalone Price is valid.voidsetValidUntil(ZonedDateTime validUntil) Date and time (UTC) until which the Standalone Price is valid.static com.fasterxml.jackson.core.type.TypeReference<DuplicateStandalonePriceScopeError>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_STANDALONE_PRICE_SCOPE
discriminator value for DuplicateStandalonePriceScopeError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"Duplicate standalone price scope for SKU: $sku. The combination of SKU, currency, country, customerGroup, channel, validFrom and validUntil must be unique for each standalone price."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
getConflictingStandalonePrice
Reference to the conflicting Standalone Price.
- Returns:
- conflictingStandalonePrice
-
getSku
SKU of the ProductVariant to which the conflicting Standalone Price is associated.
- Returns:
- sku
-
getCurrency
Currency code of the country.
- Returns:
- currency
-
getCountry
String getCountry()Country code of the geographic location.
- Returns:
- country
-
getCustomerGroup
CustomerGroup for which the Standalone Price is valid.
- Returns:
- customerGroup
-
getChannel
Channel for which the Standalone Price is valid.
- Returns:
- channel
-
getValidFrom
ZonedDateTime getValidFrom()Date and time (UTC) from which the Standalone Price is valid.
- Returns:
- validFrom
-
getValidUntil
ZonedDateTime getValidUntil()Date and time (UTC) until which the Standalone Price is valid.
- Returns:
- validUntil
-
setMessage
"Duplicate standalone price scope for SKU: $sku. The combination of SKU, currency, country, customerGroup, channel, validFrom and validUntil must be unique for each standalone price."- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
setConflictingStandalonePrice
Reference to the conflicting Standalone Price.
- Parameters:
conflictingStandalonePrice- value to be set
-
setSku
SKU of the ProductVariant to which the conflicting Standalone Price is associated.
- Parameters:
sku- 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
CustomerGroup for which the Standalone Price is valid.
- Parameters:
customerGroup- value to be set
-
setChannel
Channel for which the Standalone Price is valid.
- Parameters:
channel- value to be set
-
setValidFrom
Date and time (UTC) from which the Standalone Price is valid.
- Parameters:
validFrom- value to be set
-
setValidUntil
Date and time (UTC) until which the Standalone Price is valid.
- Parameters:
validUntil- value to be set
-
of
factory method- Returns:
- instance of DuplicateStandalonePriceScopeError
-
of
factory method to create a shallow copy DuplicateStandalonePriceScopeError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
DuplicateStandalonePriceScopeError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
@Nullable static DuplicateStandalonePriceScopeError deepCopy(@Nullable DuplicateStandalonePriceScopeError template) factory method to create a deep copy of DuplicateStandalonePriceScopeError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DuplicateStandalonePriceScopeError- Returns:
- builder
-
builder
static DuplicateStandalonePriceScopeErrorBuilder builder(DuplicateStandalonePriceScopeError template) create builder for DuplicateStandalonePriceScopeError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withDuplicateStandalonePriceScopeError
default <T> T withDuplicateStandalonePriceScopeError(Function<DuplicateStandalonePriceScopeError, 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<DuplicateStandalonePriceScopeError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-