Documentation ¶
Index ¶
- Constants
- Variables
- func Cancel(team *schema.Team) error
- func Create(team *schema.Team, email string, tokenSource string, trialEnd int64) error
- func Get(team *schema.Team) error
- func HandleEvent(team *schema.Team, event *stripe.Event) error
- func Update(team *schema.Team, tokenSource string) error
- type Plan
Constants ¶
View Source
const ( FreePlan Plan = "free" BetaPlan = "beta" DeveloperPlan = "developer_monthly" TeamPlan = "team_monthly" )
Variables ¶
View Source
var ( Plans = []Plan{ FreePlan, BetaPlan, DeveloperPlan, TeamPlan, } )
Functions ¶
func Create ¶
Create a new customer and subscription in stripe. The `user` parameter must be a user with billing permissions. `tokenSource` is an optional string token that represents a payment source. If supplied, it will be applied to the stripe customer as the payment source for the subscription.
func HandleEvent ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.