Documentation ¶
Index ¶
- func Cancel(customer string) error
- func CreateCustomer(customer *CustomerRequest) *stripe.Customer
- func Customer(customer string) *stripe.Customer
- func Downgrade(customer string, plan []string) error
- func Upgrade(customer string, plan []string) error
- type CustomerList
- type CustomerRequest
- type InvoiceItem
- type PlanItem
- type RawPlanItem
- type SessionItem
- type SubscriptionItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCustomer ¶ added in v0.2.1
func CreateCustomer(customer *CustomerRequest) *stripe.Customer
Types ¶
type CustomerList ¶ added in v0.2.2
type CustomerList struct {
Items []*stripe.Customer
}
func Customers ¶ added in v0.2.2
func Customers() *CustomerList
type CustomerRequest ¶ added in v0.2.1
type InvoiceItem ¶ added in v0.2.4
type RawPlanItem ¶
type RawPlanItem struct {
Plans []SubscriptionItem `json:"data"`
}
type SessionItem ¶
type SessionItem struct { Id string `json:"session_id"` CustomerId string `json:"customer_id"` Plan map[int]PlanItem `json:"plan"` Amount int64 `json:"amount"` }
func Session ¶
func Session(customer string, plan []string) *SessionItem
type SubscriptionItem ¶
type SubscriptionItem struct { Status string `json:"status"` CustomerStatus string `json:"customer_status"` DaysUntilDue int `json:"days_until_due"` CurrentPeriodEnd int `json:"current_period_end"` Plan PlanItem `json:"plan,omitempty"` Plans []PlanItem `json:"plans"` Items *RawPlanItem `json:"items,omitempty"` Cancelled bool `json:"cancel_at_period_end"` LatestInvoice *InvoiceItem `json:"latest_invoice"` }
func Subscription ¶
func Subscription(customer string) []*SubscriptionItem
Click to show internal directories.
Click to hide internal directories.