subscriptions

package
v0.0.0-...-9581e64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FreePlan      Plan = "free"
	BetaPlan           = "beta"
	DeveloperPlan      = "developer_monthly"
	TeamPlan           = "team_monthly"
)

Variables

Functions

func Cancel

func Cancel(team *schema.Team) error

Cancel a customer's subscription in stripe

func Create

func Create(team *schema.Team, email string, tokenSource string, trialEnd int64) error

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 Get

func Get(team *schema.Team) error

Fetches subscription, payment source, and invoice info and populates the team struct

func HandleEvent

func HandleEvent(team *schema.Team, event *stripe.Event) error

func Update

func Update(team *schema.Team, tokenSource string) error

Update a customer's subscription in stripe

Types

type Plan

type Plan string

An opsee subscription plan

func (Plan) Validate

func (p Plan) Validate() error

Validates that the plan is supported.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL