Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Usage

initSubscription({})//returns a default subscription object if no parameters are suppliedisSubscriptionBillable(subscription)//returns a bool if its time to bill the subscriptiongetSubscriptionCost(subscription)//returns a int how much the subscription should paychangeSubscriptionPlan(subscription,currentPlan,newPlan)//Changes one plan for anotherupdatePeriod(subscription,paid)// returns a updated subscription objectinitPlan({})//returns a default plan object if no parameters are supplied

Plan model

amount// The amount in öre to be charged on the interval specified.created// Time at which the object was created. Measured in seconds since the Unix epoch.currency// Three-letter ISO currency code, in lowercaseinterval// One of day, week, month or year. The frequency with which a subscription should be billed.intervalCount// The number of intervals (specified in the interval property) between each subscription billing. For example, interval=month and interval_count=3 bills every 3 months.livemodemetadataname// Display name of the plan.statement_descriptor// Extra information about a charge for the customer’s credit card statement.trial_period_days// Number of trial period days granted when subscribing a customer to this plan. Null if the plan has no trial period.

Subscription model

expirationDatestatusplans

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages