Commit Graph

6 Commits

Author SHA1 Message Date
Fabien O'Carroll
947fa74b9e Removed stripe_coupon_id handling from Offers
refs https://github.com/TryGhost/Team/issues/1166

This will be handled by a payments module instead. In order to
disconnect Stripe we must delete all Stripe related data, which means an
Offer doesn't inherently have a stripe coupon id. Instead we can use a
payments service which will get/create the coupon for us when we need
it.
2021-10-21 15:40:55 +02:00
Fabien O'Carroll
dec46383b7 Updated API to use snake_case for redemption_count
no-issue
2021-10-18 17:29:30 +02:00
Fabien O'Carroll
05619a193c Included redemptions in OfferDTO
refs https://github.com/TryGhost/Team/issues/1132

The DTO is the object which we expose externally so this adds the
Redemptions property for consumption by our external API's
2021-10-18 17:26:34 +02:00
Fabien O'Carroll
53d24e501d Fixed Stripe Checkout using Offers
refs https://github.com/TryGhost/Members/commit/5172e40646

When we updated to use the OffersAPI instead of OfferRepository this was
missed, and we were passing blank coupon to Stripe Checkout. This should
eventually be replaced with a call like `getCoupon(offerId)` from a
payments service.
2021-10-14 12:02:39 +02:00
Fabien O'Carroll
facbfcfa8e Added support for Offer status to API
refs https://github.com/TryGhost/Team/issues/1131

- Includes `status` on OfferDTO so client can use it
- Allows editing `status` of Offers
- Allows setting initial `status` when creating Offers
2021-10-12 17:11:54 +02:00
Fabien O'Carroll
9bcd25fe5e Moved application concerns to an application dir
no-issue

Shuffling files to give a better idea of what the files concern, as well
as to add some structure.
2021-10-08 12:27:17 +02:00