All Release Notes

Added support for high precision money on fixed price Cart Discounts

31 July 2023
Enhancement
Pricing and DiscountsGraphQL

With this enhancement, fixed price Cart Discounts now support money values in high precision to support your business needs. Previously, you could use money values in cent precision only for fixed price Cart Discounts.

Changes:

  • [API] Changed the type of money field on CartDiscountValueFixed from CentPrecisionMoney to TypedMoney.
  • [API] Changed the type of money field on CartDiscountValueFixedDraft from Money to TypedMoneyDraft.
  • [GraphQL API] Added the following types to the GraphQL schema: CartDiscountValueBaseMoneyInput.
  • [GraphQL API] Changed the FixedPriceDiscountValue type:
    • FixedPriceDiscountValue.money field type changed from [Money!]! to [BaseMoney!]!
  • [GraphQL API] Changed the FixedPriceDiscountValueInput type:
    • FixedPriceDiscountValueInput.money input field type changed from [MoneyInput!]! to [CartDiscountValueBaseMoneyInput!]!

The following changes were introduced in terms of GraphQL SDL:

input CartDiscountValueBaseMoneyInput {
centPrecision: MoneyInput
highPrecision: HighPrecisionMoneyInput
"CurrencyCode and centAmount are deprecated. Please use `Money`(centPrecision) or `HighPrecisionMoney`(highPrecision)."
currencyCode: Currency
"CurrencyCode and centAmount are deprecated. Please use `Money`(centPrecision) or `HighPrecisionMoney`(highPrecision)."
centAmount: Long
}
type FixedPriceDiscountValue implements CartDiscountValue {
money: [BaseMoney!]!
type: String!
}
input FixedPriceDiscountValueInput {
money: [CartDiscountValueBaseMoneyInput!]!
}