Interface GraphQLOverlappingStandalonePriceValidityError
- All Superinterfaces:
GraphQLErrorObject
Returned when a given Price validity period conflicts with an existing one. Every Standalone Price associated with the same SKU and with the same combination of currency, country, Customer Group, and Channel, must have non-overlapping 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
GraphQLOverlappingStandalonePriceValidityError graphQLOverlappingStandalonePriceValidityError = GraphQLOverlappingStandalonePriceValidityError.builder()
.conflictingStandalonePrice(conflictingStandalonePriceBuilder -> conflictingStandalonePriceBuilder)
.sku("{sku}")
.currency("{currency}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for GraphQLOverlappingStandalonePriceValidityError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for GraphQLOverlappingStandalonePriceValidityErrorcreate builder for GraphQLOverlappingStandalonePriceValidityError instancefactory method to create a deep copy of GraphQLOverlappingStandalonePriceValidityError@Valid ChannelResourceIdentifier
Channel for which the Standalone Price is valid.@NotNull String
getCode()
One of the error codes that is listed on the Errors page.@NotNull @Valid StandalonePriceReference
Reference to the conflicting Standalone Price.Date and time (UTC) from which the conflicting Standalone Price is valid.Date and time (UTC) until which the conflicting Standalone Price is valid.Country code of the geographic location.@NotNull String
Currency code of the country.CustomerGroup for which the Standalone Price is valid.@NotNull String
getSku()
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 methodfactory method to create a shallow copy GraphQLOverlappingStandalonePriceValidityErrorvoid
setChannel
(ChannelResourceIdentifier channel) Channel for which the Standalone Price is valid.void
setConflictingStandalonePrice
(StandalonePriceReference conflictingStandalonePrice) Reference to the conflicting Standalone Price.void
setConflictingValidFrom
(ZonedDateTime conflictingValidFrom) Date and time (UTC) from which the conflicting Standalone Price is valid.void
setConflictingValidUntil
(ZonedDateTime conflictingValidUntil) Date and time (UTC) until which the conflicting Standalone Price is valid.void
setCountry
(String country) Country code of the geographic location.void
setCurrency
(String currency) Currency code of the country.void
setCustomerGroup
(CustomerGroupResourceIdentifier customerGroup) CustomerGroup for which the Standalone Price is valid.void
SKU of the ProductVariant to which the conflicting Standalone Price is associated.void
setValidFrom
(ZonedDateTime validFrom) Date and time (UTC) from which the Standalone Price is valid.void
setValidUntil
(ZonedDateTime validUntil) Date and time (UTC) until which the Standalone Price is valid.static com.fasterxml.jackson.core.type.TypeReference<GraphQLOverlappingStandalonePriceValidityError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withGraphQLOverlappingStandalonePriceValidityError
(Function<GraphQLOverlappingStandalonePriceValidityError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
OVERLAPPING_STANDALONE_PRICE_VALIDITY
discriminator value for GraphQLOverlappingStandalonePriceValidityError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:GraphQLErrorObject
One of the error codes that is listed on the Errors page.
- Specified by:
getCode
in interfaceGraphQLErrorObject
- Returns:
- code
-
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
-
getConflictingValidFrom
ZonedDateTime getConflictingValidFrom()Date and time (UTC) from which the conflicting Standalone Price is valid.
- Returns:
- conflictingValidFrom
-
getConflictingValidUntil
ZonedDateTime getConflictingValidUntil()Date and time (UTC) until which the conflicting Standalone Price is valid.
- Returns:
- conflictingValidUntil
-
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
-
setConflictingValidFrom
Date and time (UTC) from which the conflicting Standalone Price is valid.
- Parameters:
conflictingValidFrom
- value to be set
-
setConflictingValidUntil
Date and time (UTC) until which the conflicting Standalone Price is valid.
- Parameters:
conflictingValidUntil
- value to be set
-
of
factory method- Returns:
- instance of GraphQLOverlappingStandalonePriceValidityError
-
of
static GraphQLOverlappingStandalonePriceValidityError of(GraphQLOverlappingStandalonePriceValidityError template) factory method to create a shallow copy GraphQLOverlappingStandalonePriceValidityError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static GraphQLOverlappingStandalonePriceValidityError deepCopy(@Nullable GraphQLOverlappingStandalonePriceValidityError template) factory method to create a deep copy of GraphQLOverlappingStandalonePriceValidityError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLOverlappingStandalonePriceValidityError- Returns:
- builder
-
builder
static GraphQLOverlappingStandalonePriceValidityErrorBuilder builder(GraphQLOverlappingStandalonePriceValidityError template) create builder for GraphQLOverlappingStandalonePriceValidityError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLOverlappingStandalonePriceValidityError
default <T> T withGraphQLOverlappingStandalonePriceValidityError(Function<GraphQLOverlappingStandalonePriceValidityError, 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<GraphQLOverlappingStandalonePriceValidityError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-