All Release Notes

User defined key attribute on Cart Discount

27 May 2019
Enhancement
CartsGraphQLPricing and Discounts

Added the key attribute to CartDiscount. You can use the key attribute when creating or updating a CartDiscount.

  • [API] Added the key attribute to the CartDiscount and CartDiscountDraft representations.
  • [API] Added the Get CartDiscount by Key, Update CartDiscount by Key, and Delete CartDiscount by Key endpoints.
  • [GraphQL API] The GraphQL API now supports queries and mutations of CartDiscount by the key attribute.
  • [GraphQL API] Added the following types to the GraphQL schema: SetCartDiscountKey.
  • [GraphQL API] Changed the CartDiscountDraft type:
    • Input field key was added to CartDiscountDraft type
  • [GraphQL API] Changed the Query type:
    • Query.cartDiscount(id) description is changed
    • Argument key was added to Query.cartDiscount field
    • Query.cartDiscount(id) type changed from String! to String
  • [GraphQL API] Changed the CartDiscount type:
    • Added the key field to the CartDiscount type.
  • [GraphQL API] Changed the CartDiscountUpdateAction type:
    • Input field setKey was added to CartDiscountUpdateAction type
  • [GraphQL API] Changed the Mutation type:
    • Mutation.updateCartDiscount(id) type changed from String! to String
    • Mutation.deleteCartDiscount(id) description is changed
    • Argument key was added to Mutation.updateCartDiscount field
    • Mutation.deleteCartDiscount(id) type changed from String! to String
    • Argument key was added to Mutation.deleteCartDiscount field
    • Mutation.updateCartDiscount(id) description is changed

Introduced the following changes to the GraphQL schema (in SDL format):

extend type CartDiscount {
key: String
}
extend input CartDiscountDraft {
key: String
}
extend input CartDiscountUpdateAction {
setKey: SetCartDiscountKey
}
input SetCartDiscountKey {
key: String
}