subitem

package
v18.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sub provides the /subscriptions APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(id string, params *stripe.SubItemParams) (*stripe.SubItem, error)

Cancel removes a subscription. For more details see https://stripe.com/docs/api#cancel_subscription.

func Get

func Get(id string, params *stripe.SubItemParams) (*stripe.SubItem, error)

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

func New

func New(params *stripe.SubItemParams) (*stripe.SubItem, error)

New POSTS a new subscription for a customer. For more details see https://stripe.com/docs/api#create_subscription_item.

func Update

func Update(id string, params *stripe.SubItemParams) (*stripe.SubItem, error)

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

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /subscriptions APIs.

func (Client) Del

func (c Client) Del(id string, params *stripe.SubItemParams) (*stripe.SubItem, error)

func (Client) Get

func (c Client) Get(id string, params *stripe.SubItemParams) (*stripe.SubItem, error)

func (Client) List

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

func (Client) New

func (c Client) New(params *stripe.SubItemParams) (*stripe.SubItem, error)

func (Client) Update

func (c Client) Update(id string, params *stripe.SubItemParams) (*stripe.SubItem, error)

type Iter

type Iter struct {
	*stripe.Iter
}

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

func List

func List(params *stripe.SubListParams) *Iter

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

func (*Iter) SubItem

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

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

Jump to

Keyboard shortcuts

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