charge

package
v32.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: MIT Imports: 2 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 charge not yet captured. For more details see https://stripe.com/docs/api#charge_capture.

func CloseDispute

func CloseDispute(id string) (*stripe.Dispute, error)

Close dismisses a charge's dispute in the customer's favor. For more details see https://stripe.com/docs/api#close_dispute.

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 MarkFraudulent

func MarkFraudulent(id string) (*stripe.Charge, error)

MarkFraudulent reports the charge as fraudulent.

func MarkSafe

func MarkSafe(id string) (*stripe.Charge, error)

MarkSafe reports the charge as not-fraudulent.

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.

func UpdateDispute

func UpdateDispute(id string, params *stripe.DisputeParams) (*stripe.Dispute, error)

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

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) CloseDispute

func (c Client) CloseDispute(id string) (*stripe.Dispute, 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) MarkFraudulent

func (c Client) MarkFraudulent(id string) (*stripe.Charge, error)

func (Client) MarkSafe

func (c Client) MarkSafe(id string) (*stripe.Charge, error)

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)

func (Client) UpdateDispute

func (c Client) UpdateDispute(id string, params *stripe.DisputeParams) (*stripe.Dispute, error)

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for lists of Charges. The embedded Iter carries methods with it; see its documentation for details.

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) Charge

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

Charge returns the most recent Charge visited by a call to Next.

Jump to

Keyboard shortcuts

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