Extends
- Backbone.Model
Members
defaults :Object
Default attributes for Subscription models
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
id |
string | The unique identifier of this Subscription, from Bookkeeper |
object |
string | The name of this type of Bookkeeper object, which will always be "subscription" |
canceledAt |
number | The timestamp of the date that this Subscription was canceled |
collectionMethod |
string | The method of payment collection for this Subscription, which is a string from a controlled vocabulary from Bookkeeper |
created |
number | The timestamp of the date that this Subscription was created |
customerId |
number | The identifier of the Customer that is associated with this Subscription |
metadata |
Object | Arbitrary metadata about this Subscription. These values should be parsed and set on this model (TODO) |
productId |
number | The identifier of a Product in this Subscription |
quantity |
number | The number of Subscriptions |
startDate |
number | The timestamp of the date that this Subscription was started |
status |
string | The status of this Subscription, which is taken from a controlled vocabulary set on this model (statusOptions) |
statusOptions |
Array.<string> | The controlled vocabulary from which the `status` value can be from |
trialEnd |
number | The timestamp of the date that this free trial Subscription ends |
trialStart |
number | The timestamp of the date that this free trial Subscription starts |
type :string
The name of this type of model
Type:
- string
Methods
isTrialing() → {boolean}
Returns true if this Subscription is in a free trial period.
Returns:
- Type
- boolean