Interface GraphQLOverlappingPriceValidityError
- All Superinterfaces:
GraphQLErrorObject
Returned when a given Price validity period conflicts with an existing one. Every Price of a Product Variant 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 Product or Update Product request.
Example to create an instance using the builder pattern
GraphQLOverlappingPriceValidityError graphQLOverlappingPriceValidityError = GraphQLOverlappingPriceValidityError.builder()
.conflictingPrice("{conflictingPrice}")
.currency("{currency}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for GraphQLOverlappingPriceValidityError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for GraphQLOverlappingPriceValidityErrorbuilder(GraphQLOverlappingPriceValidityError template) create builder for GraphQLOverlappingPriceValidityError instancecopyDeep()deepCopy(GraphQLOverlappingPriceValidityError template) factory method to create a deep copy of GraphQLOverlappingPriceValidityError@Valid ChannelResourceIdentifierChannel for which the Price is valid.@NotNull StringgetCode()One of the error codes that is listed on the Errors page.@NotNull StringUnique identifier of the conflicting Embedded Price.Date and time (UTC) from which the conflicting Embedded Price is valid.Date and time (UTC) until which the conflicting Embedded Price is valid.Country code of the Price.@NotNull StringCurrency code of the Price.CustomerGroup for which the Price is valid.Date and time (UTC) from which the Embedded Price is valid.Date and time (UTC) until which the Embedded Price is valid.of()factory methodof(GraphQLOverlappingPriceValidityError template) factory method to create a shallow copy GraphQLOverlappingPriceValidityErrorvoidsetChannel(ChannelResourceIdentifier channel) Channel for which the Price is valid.voidsetConflictingPrice(String conflictingPrice) Unique identifier of the conflicting Embedded Price.voidsetConflictingValidFrom(ZonedDateTime conflictingValidFrom) Date and time (UTC) from which the conflicting Embedded Price is valid.voidsetConflictingValidUntil(ZonedDateTime conflictingValidUntil) Date and time (UTC) until which the conflicting Embedded Price is valid.voidsetCountry(String country) Country code of the Price.voidsetCurrency(String currency) Currency code of the Price.voidsetCustomerGroup(CustomerGroupResourceIdentifier customerGroup) CustomerGroup for which the Price is valid.voidsetValidFrom(ZonedDateTime validFrom) Date and time (UTC) from which the Embedded Price is valid.voidsetValidUntil(ZonedDateTime validUntil) Date and time (UTC) until which the Embedded Price is valid.static tools.jackson.core.type.TypeReference<GraphQLOverlappingPriceValidityError>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
OVERLAPPING_PRICE_VALIDITY
discriminator value for GraphQLOverlappingPriceValidityError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:GraphQLErrorObjectOne of the error codes that is listed on the Errors page.
- Specified by:
getCodein interfaceGraphQLErrorObject- Returns:
- code
-
getConflictingPrice
Unique identifier of the conflicting Embedded Price.
- Returns:
- conflictingPrice
-
getCurrency
Currency code of the Price.
- Returns:
- currency
-
getCountry
String getCountry()Country code of the Price.
- Returns:
- country
-
getCustomerGroup
CustomerGroup for which the Price is valid.
- Returns:
- customerGroup
-
getChannel
Channel for which the Price is valid.
- Returns:
- channel
-
getValidFrom
ZonedDateTime getValidFrom()Date and time (UTC) from which the Embedded Price is valid.
- Returns:
- validFrom
-
getValidUntil
ZonedDateTime getValidUntil()Date and time (UTC) until which the Embedded Price is valid.
- Returns:
- validUntil
-
getConflictingValidFrom
ZonedDateTime getConflictingValidFrom()Date and time (UTC) from which the conflicting Embedded Price is valid.
- Returns:
- conflictingValidFrom
-
getConflictingValidUntil
ZonedDateTime getConflictingValidUntil()Date and time (UTC) until which the conflicting Embedded Price is valid.
- Returns:
- conflictingValidUntil
-
setConflictingPrice
Unique identifier of the conflicting Embedded Price.
- Parameters:
conflictingPrice- value to be set
-
setCurrency
Currency code of the Price.
- Parameters:
currency- value to be set
-
setCountry
Country code of the Price.
- Parameters:
country- value to be set
-
setCustomerGroup
CustomerGroup for which the Price is valid.
- Parameters:
customerGroup- value to be set
-
setChannel
Channel for which the Price is valid.
- Parameters:
channel- value to be set
-
setValidFrom
Date and time (UTC) from which the Embedded Price is valid.
- Parameters:
validFrom- value to be set
-
setValidUntil
Date and time (UTC) until which the Embedded Price is valid.
- Parameters:
validUntil- value to be set
-
setConflictingValidFrom
Date and time (UTC) from which the conflicting Embedded Price is valid.
- Parameters:
conflictingValidFrom- value to be set
-
setConflictingValidUntil
Date and time (UTC) until which the conflicting Embedded Price is valid.
- Parameters:
conflictingValidUntil- value to be set
-
of
factory method- Returns:
- instance of GraphQLOverlappingPriceValidityError
-
of
factory method to create a shallow copy GraphQLOverlappingPriceValidityError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
GraphQLOverlappingPriceValidityError copyDeep()- Specified by:
copyDeepin interfaceGraphQLErrorObject
-
deepCopy
@Nullable static GraphQLOverlappingPriceValidityError deepCopy(@Nullable GraphQLOverlappingPriceValidityError template) factory method to create a deep copy of GraphQLOverlappingPriceValidityError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLOverlappingPriceValidityError- Returns:
- builder
-
builder
static GraphQLOverlappingPriceValidityErrorBuilder builder(GraphQLOverlappingPriceValidityError template) create builder for GraphQLOverlappingPriceValidityError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLOverlappingPriceValidityError
default <T> T withGraphQLOverlappingPriceValidityError(Function<GraphQLOverlappingPriceValidityError, T> helper) 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
-