charge

package
v72.118.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: MIT Imports: 3 Imported by: 12

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 is the method for the `POST /v1/charges/{charge}/capture` API.

func Get

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

Get returns the details of 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's properties.

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)

Capture is the method for the `POST /v1/charges/{charge}/capture` API.

func (Client) Get

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

Get returns the details of a charge.

func (Client) List

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

List returns a list of charges.

func (Client) New

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

New creates a new charge.

func (Client) Search added in v72.97.0

func (c Client) Search(params *stripe.ChargeSearchParams) *SearchIter

Search returns a search result containing charges.

func (Client) Update

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

Update updates a charge's properties.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for charges.

func List

func List(params *stripe.ChargeListParams) *Iter

List returns a list of charges.

func (*Iter) Charge

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

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

func (*Iter) ChargeList

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

ChargeList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.

type SearchIter added in v72.97.0

type SearchIter struct {
	*stripe.SearchIter
}

SearchIter is an iterator for charges.

func Search(params *stripe.ChargeSearchParams) *SearchIter

Search returns a search result containing charges.

func (*SearchIter) Charge added in v72.97.0

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

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

func (*SearchIter) ChargeSearchResult added in v72.97.0

func (i *SearchIter) ChargeSearchResult() *stripe.ChargeSearchResult

ChargeSearchResult returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.

Jump to

Keyboard shortcuts

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