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
This commit is contained in:
Fabien O'Carroll 2021-10-15 11:46:58 +02:00
parent dbf549b664
commit 05619a193c

View File

@ -23,6 +23,7 @@
* @prop {null|number} duration_in_months
*
* @prop {'active'|'archived'} status
* @prop {number} redemptionCount
*
* @prop {string} stripe_coupon_id
*
@ -52,6 +53,7 @@ class OfferMapper {
currency: offer.type.value === 'fixed' ? offer.currency.value : null,
status: offer.status.value,
stripe_coupon_id: offer.stripeCouponId,
redemptionCount: offer.redemptionCount,
tier: {
id: offer.tier.id,
name: offer.tier.name