mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 00:52:36 +03:00
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:
parent
dbf549b664
commit
05619a193c
@ -23,6 +23,7 @@
|
|||||||
* @prop {null|number} duration_in_months
|
* @prop {null|number} duration_in_months
|
||||||
*
|
*
|
||||||
* @prop {'active'|'archived'} status
|
* @prop {'active'|'archived'} status
|
||||||
|
* @prop {number} redemptionCount
|
||||||
*
|
*
|
||||||
* @prop {string} stripe_coupon_id
|
* @prop {string} stripe_coupon_id
|
||||||
*
|
*
|
||||||
@ -52,6 +53,7 @@ class OfferMapper {
|
|||||||
currency: offer.type.value === 'fixed' ? offer.currency.value : null,
|
currency: offer.type.value === 'fixed' ? offer.currency.value : null,
|
||||||
status: offer.status.value,
|
status: offer.status.value,
|
||||||
stripe_coupon_id: offer.stripeCouponId,
|
stripe_coupon_id: offer.stripeCouponId,
|
||||||
|
redemptionCount: offer.redemptionCount,
|
||||||
tier: {
|
tier: {
|
||||||
id: offer.tier.id,
|
id: offer.tier.id,
|
||||||
name: offer.tier.name
|
name: offer.tier.name
|
||||||
|
Loading…
Reference in New Issue
Block a user