sub

package
v0.0.0-...-d8ed325 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

package sub provides the /subscriptions APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel(id string, params *SubParams) error

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

func Create

func Create(params *SubParams) (*Sub, error)

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

func Get

func Get(id string, params *SubParams) (*Sub, error)

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

func List

func List(params *SubListParams) *SubIter

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

func Update

func Update(id string, params *SubParams) (*Sub, 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   Backend
	Tok string
}

Client is used to invoke /subscriptions APIs.

func (Client) Cancel

func (c Client) Cancel(id string, params *SubParams) error

func (Client) Create

func (c Client) Create(params *SubParams) (*Sub, error)

func (Client) Get

func (c Client) Get(id string, params *SubParams) (*Sub, error)

func (Client) List

func (c Client) List(params *SubListParams) *SubIter

func (Client) Update

func (c Client) Update(id string, params *SubParams) (*Sub, error)

Jump to

Keyboard shortcuts

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