customer

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: 28

Documentation

Overview

Package customer provides the /customers APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFundingInstructions added in v72.102.0

func CreateFundingInstructions(id string, params *stripe.CustomerCreateFundingInstructionsParams) (*stripe.Customer, error)

CreateFundingInstructions is the method for the `POST /v1/customers/{customer}/funding_instructions` API.

func Del

func Del(id string, params *stripe.CustomerParams) (*stripe.Customer, error)

Del removes a customer.

func Get

func Get(id string, params *stripe.CustomerParams) (*stripe.Customer, error)

Get returns the details of a customer.

func New

func New(params *stripe.CustomerParams) (*stripe.Customer, error)

New creates a new customer.

func RetrievePaymentMethod added in v72.108.0

func RetrievePaymentMethod(id string, params *stripe.CustomerRetrievePaymentMethodParams) (*stripe.Customer, error)

RetrievePaymentMethod is the method for the `GET /v1/customers/{customer}/payment_methods/{payment_method}` API.

func Update

func Update(id string, params *stripe.CustomerParams) (*stripe.Customer, error)

Update updates a customer's properties.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /customers APIs.

func (Client) CreateFundingInstructions added in v72.102.0

func (c Client) CreateFundingInstructions(id string, params *stripe.CustomerCreateFundingInstructionsParams) (*stripe.Customer, error)

CreateFundingInstructions is the method for the `POST /v1/customers/{customer}/funding_instructions` API.

func (Client) Del

func (c Client) Del(id string, params *stripe.CustomerParams) (*stripe.Customer, error)

Del removes a customer.

func (Client) Get

func (c Client) Get(id string, params *stripe.CustomerParams) (*stripe.Customer, error)

Get returns the details of a customer.

func (Client) List

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

List returns a list of customers.

func (Client) ListPaymentMethods added in v72.69.0

func (c Client) ListPaymentMethods(listParams *stripe.CustomerListPaymentMethodsParams) *PaymentMethodIter

ListPaymentMethods is the method for the `GET /v1/customers/{customer}/payment_methods` API.

func (Client) New

func (c Client) New(params *stripe.CustomerParams) (*stripe.Customer, error)

New creates a new customer.

func (Client) RetrievePaymentMethod added in v72.108.0

func (c Client) RetrievePaymentMethod(id string, params *stripe.CustomerRetrievePaymentMethodParams) (*stripe.Customer, error)

RetrievePaymentMethod is the method for the `GET /v1/customers/{customer}/payment_methods/{payment_method}` API.

func (Client) Search added in v72.97.0

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

Search returns a search result containing customers.

func (Client) Update

func (c Client) Update(id string, params *stripe.CustomerParams) (*stripe.Customer, error)

Update updates a customer's properties.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for customers.

func List

func List(params *stripe.CustomerListParams) *Iter

List returns a list of customers.

func (*Iter) Customer

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

Customer returns the customer which the iterator is currently pointing to.

func (*Iter) CustomerList

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

CustomerList 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 PaymentMethodIter added in v72.69.0

type PaymentMethodIter struct {
	*stripe.Iter
}

PaymentMethodIter is an iterator for payment methods.

func ListPaymentMethods added in v72.69.0

func ListPaymentMethods(params *stripe.CustomerListPaymentMethodsParams) *PaymentMethodIter

ListPaymentMethods is the method for the `GET /v1/customers/{customer}/payment_methods` API.

func (*PaymentMethodIter) PaymentMethod added in v72.69.0

func (i *PaymentMethodIter) PaymentMethod() *stripe.PaymentMethod

PaymentMethod returns the payment method which the iterator is currently pointing to.

func (*PaymentMethodIter) PaymentMethodList added in v72.69.0

func (i *PaymentMethodIter) PaymentMethodList() *stripe.PaymentMethodList

PaymentMethodList 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 customers.

func Search(params *stripe.CustomerSearchParams) *SearchIter

Search returns a search result containing customers.

func (*SearchIter) Customer added in v72.97.0

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

Customer returns the customer which the iterator is currently pointing to.

func (*SearchIter) CustomerSearchResult added in v72.97.0

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

CustomerSearchResult 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