subitem

package
v22.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 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.SubItemListParams) *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.SubItemListParams) *Iter

List returns a list of subscription items. For more details see https://stripe.com/docs/api#list_subscription_items.

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