source

package
v78.8.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package source provides the /sources APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detach

func Detach(id string, params *stripe.SourceDetachParams) (*stripe.Source, error)

Delete a specified source for a given customer.

func Get

func Get(id string, params *stripe.SourceParams) (*stripe.Source, error)

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

func New

func New(params *stripe.SourceParams) (*stripe.Source, error)

Creates a new source object.

func Update

func Update(id string, params *stripe.SourceParams) (*stripe.Source, error)

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](https://stripe.com/docs/sources) for more detail.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /sources APIs.

func (Client) Detach

func (c Client) Detach(id string, params *stripe.SourceDetachParams) (*stripe.Source, error)

Delete a specified source for a given customer.

func (Client) Get

func (c Client) Get(id string, params *stripe.SourceParams) (*stripe.Source, error)

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

func (Client) New

func (c Client) New(params *stripe.SourceParams) (*stripe.Source, error)

Creates a new source object.

func (Client) Update

func (c Client) Update(id string, params *stripe.SourceParams) (*stripe.Source, error)

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](https://stripe.com/docs/sources) for more detail.

Jump to

Keyboard shortcuts

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