charge

package
v46.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: MIT Imports: 3 Imported by: 968

Documentation

Overview

Package charge provides API functions related to charges.

For more details, see: https://stripe.com/docs/api/go#charges.

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 charge that's not yet captured.

func Get

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

Get retrieves a charge.

func New

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

New creates a new charge.

func Update

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

Update updates a charge.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke APIs related to charges.

func (Client) Capture

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

Capture captures a charge that's not yet captured.

func (Client) Get

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

Get retrieves a charge.

func (Client) List

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

List returns an iterator that iterates all charges.

func (Client) New

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

New creates a new charge.

func (Client) Update

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

Update updates a charge.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for charges.

func List

func List(params *stripe.ChargeListParams) *Iter

List returns an iterator that iterates all charges.

func (*Iter) Charge

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

Charge returns the charge which the iterator is currently pointing to.

Jump to

Keyboard shortcuts

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