12 June 2023
Pricing and DiscountsGraphQL
We introduced new update actions on the Standalone Prices API that allow you to modify the start and end dates of a Standalone Price. This feature simplifies the process of maintaining accurate pricing information for your customers. Prior to this enhancement, changing the validity dates required the deletion and recreation of Standalone Prices, a process that was time-consuming and error-prone.
Alongside the new update actions, we also introduced corresponding Subscription Messages to enhance visibility and tracking.
Changes:
- [API] Added Set Valid From, Set Valid Until, and Set Valid From and Until update actions to the Standalone Prices API.
- [API] Added StandalonePriceValidFromSet, StandalonePriceValidUntilSet, and StandalonePriceValidFromAndUntilSet Messages.
- [GraphQL API] Added the following types to the GraphQL schema:
SetStandalonePriceValidFrom
,SetStandalonePriceValidFromAndUntil
,SetStandalonePriceValidUntil
,StandalonePriceValidFromAndUntilSet
,StandalonePriceValidFromSet
,StandalonePriceValidUntilSet
.
The following changes were introduced in terms of GraphQL SDL:
extend input StandalonePriceUpdateAction {
setValidFrom: SetStandalonePriceValidFrom
setValidFromAndUntil: SetStandalonePriceValidFromAndUntil
setValidUntil: SetStandalonePriceValidUntil
}
input SetStandalonePriceValidFrom {
validFrom: DateTime
}
input SetStandalonePriceValidFromAndUntil {
validFrom: DateTime
validUntil: DateTime
}
input SetStandalonePriceValidUntil {
validUntil: DateTime
}
type StandalonePriceValidFromAndUntilSet implements MessagePayload {
validFrom: DateTime
validUntil: DateTime
previousValidFrom: DateTime
previousValidUntil: DateTime
type: String!
}
type StandalonePriceValidFromSet implements MessagePayload {
validFrom: DateTime
previousValidFrom: DateTime
type: String!
}
type StandalonePriceValidUntilSet implements MessagePayload {
validUntil: DateTime
previousValidUntil: DateTime
type: String!
}