plan

package
v22.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package plan provides the /plans APIs

Index

Constants

View Source
const (
	Day   stripe.PlanInterval = "day"
	Week  stripe.PlanInterval = "week"
	Month stripe.PlanInterval = "month"
	Year  stripe.PlanInterval = "year"
)

Variables

This section is empty.

Functions

func Del

func Del(id string) (*stripe.Plan, error)

Del removes a plan. For more details see https://stripe.com/docs/api#delete_plan.

func Get

func Get(id string, params *stripe.PlanParams) (*stripe.Plan, error)

Get returns the details of a plan. For more details see https://stripe.com/docs/api#retrieve_plan.

func New

func New(params *stripe.PlanParams) (*stripe.Plan, error)

New POSTs a new plan. For more details see https://stripe.com/docs/api#create_plan.

func Update

func Update(id string, params *stripe.PlanParams) (*stripe.Plan, error)

Update updates a plan's properties. For more details see https://stripe.com/docs/api#update_plan.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /plans APIs.

func (Client) Del

func (c Client) Del(id string) (*stripe.Plan, error)

func (Client) Get

func (c Client) Get(id string, params *stripe.PlanParams) (*stripe.Plan, error)

func (Client) List

func (c Client) List(params *stripe.PlanListParams) *Iter

func (Client) New

func (c Client) New(params *stripe.PlanParams) (*stripe.Plan, error)

func (Client) Update

func (c Client) Update(id string, params *stripe.PlanParams) (*stripe.Plan, error)

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for lists of Plans. The embedded Iter carries methods with it; see its documentation for details.

func List

func List(params *stripe.PlanListParams) *Iter

List returns a list of plans. For more details see https://stripe.com/docs/api#list_plans.

func (*Iter) Plan

func (i *Iter) Plan() *stripe.Plan

Plan returns the most recent Plan visited by a call to Next.

Jump to

Keyboard shortcuts

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