Ghost/ghost
Simon Backx f74b00fea6 Stored offer_id in subscriptions (#389)
refs https://github.com/TryGhost/Team/issues/1519

- Added offer repository dependency to member repository (offerAPI didn't work because it creates a new transaction that resulted in a deadlock during tests)
- Store the offer id from the Stripe subscription metadata in the subscription (only if the discount is still active)
- Also added the offer id to the metadata for a Stripe coupon, this will make adding and removing coupons a bit more foolproof
- Prefer the usage of the offer metadata from a coupon if it is present
- When no discount is applied to a subscription, it always sets the offer id to null, even when the metadata still contains the offer
- The offer_id remains stored when a subscription is canceled/expired
2022-04-19 09:15:33 +02:00
..
domain-events Published new versions 2022-03-11 22:45:26 +01:00
express-dynamic-redirects Published new versions 2022-04-04 21:08:04 +05:30
magic-link Published new versions 2022-03-11 22:45:26 +01:00
member-analytics-service Published new versions 2022-03-11 22:45:26 +01:00
member-events Published new versions 2022-03-11 22:45:26 +01:00
members-analytics-ingress Published new versions 2022-03-11 22:45:26 +01:00
members-api Stored offer_id in subscriptions (#389) 2022-04-19 09:15:33 +02:00
members-csv Published new versions 2022-04-04 21:08:04 +05:30
members-events-service Published new versions 2022-04-04 21:08:04 +05:30
members-importer Published new versions 2022-04-13 17:37:51 +01:00
members-ssr Published new versions 2022-03-11 22:45:26 +01:00
offers Published new versions 2022-03-11 22:45:26 +01:00
payments Stored offer_id in subscriptions (#389) 2022-04-19 09:15:33 +02:00
stripe Published new versions 2022-04-13 15:04:51 +05:30
verification-trigger Published new versions 2022-04-13 17:37:51 +01:00