1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/models/member-subscription.js
Rish 45abd231c4 Updated member model to use new subscriptions structure
no issue

Members API was updated to have new subscription structure, this updates model and its transformation to match it.
2019-10-03 23:10:42 +05:30

15 lines
549 B
JavaScript

import EmberObject from '@ember/object';
export default EmberObject.extend({
customer: 'customer_id',
subscription: 'subscription_id',
plan: 'plan_id',
status: 'subscription status',
name: 'plan nickname e.g. "Monthly"',
interval: 'how often plan charges e.g "month", "year"',
amount: 'amount in smallest denomination e.g. cents, so value for 5 dollars would be 500',
currency: 'e.g. usd',
last4: 'last four digits of card OR null',
validUntil: 'epoch timestamp of when current interval ends IN SECONDS'
});