Adds the Discount source property and removes the Discount coupon propertyBreaking changes
What’s new
This change adds a new source property to the Discount object and removes the auto-expanded coupon
property. The new source
property is a hash that contains the following attributes:
type
: The type of object used to calculate and apply the discount.coupon
: The Coupon redeemed to create the discount.
Why is this a breaking change?
This is a breaking change because:
- The Discount object’s schema is changing, which requires you to handle responses containing Discounts differently.
- The Coupon object is not automatically expanded on Discount objects, including within event notifications.
Impact
The coupon
property no longer auto-expands on the Discount object. To retrieve details about a discount’s coupon, either retrieve it separately or expand it through the source
property.
This change has no impact on how coupons are redeemed into discounts today, but enables expanded discounting functionality in the future.
Changes
Upgrade
Related changes
- Removes iterations parameter for subscription schedules
- Promotion Codes now reference Coupons using a polymorphic field for promotions
- Makes flexible billing mode the default for new subscriptions
- Updates computation of subscription schedule phase end date to consider billing cycle anchor changes
- Adds customer portal configuration trial behavior
- Adds the ability to itemize proration discount amounts