charge

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

package charge provides the /charges APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture(id string, params *stripe.CaptureParams) (*stripe.Charge, error)

Capture captures a previously created charge with NoCapture set to true. For more details see https://stripe.com/docs/api#charge_capture.

func Get

func Get(id string, params *stripe.ChargeParams) (*stripe.Charge, error)

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

func New

func New(params *stripe.ChargeParams) (*stripe.Charge, error)

New POSTs new charges. For more details see https://stripe.com/docs/api#create_charge.

func Update

func Update(id string, params *stripe.ChargeParams) (*stripe.Charge, error)

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

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /charges APIs.

func (Client) Capture

func (c Client) Capture(id string, params *stripe.CaptureParams) (*stripe.Charge, error)

func (Client) Get

func (c Client) Get(id string, params *stripe.ChargeParams) (*stripe.Charge, error)

func (Client) List

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

func (Client) New

func (c Client) New(params *stripe.ChargeParams) (*stripe.Charge, error)

func (Client) Update

func (c Client) Update(id string, params *stripe.ChargeParams) (*stripe.Charge, error)

type Iter

type Iter struct {
	Iter *stripe.Iter
}

Iter is a iterator for list responses.

func List

func List(params *stripe.ChargeListParams) *Iter

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

func (*Iter) Meta

func (i *Iter) Meta() *stripe.ListMeta

Meta returns the list metadata.

func (*Iter) Next

func (i *Iter) Next() (*stripe.Charge, error)

Next returns the next value in the list.

func (*Iter) Stop

func (i *Iter) Stop() bool

Stop returns true if there are no more iterations to be performed.

Jump to

Keyboard shortcuts

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