Documentation ¶
Overview ¶
Package customer provides the /customers APIs
Index ¶
- func CreateFundingInstructions(id string, params *stripe.CustomerCreateFundingInstructionsParams) (*stripe.FundingInstructions, error)
- func Del(id string, params *stripe.CustomerParams) (*stripe.Customer, error)
- func DeleteDiscount(id string, params *stripe.CustomerDeleteDiscountParams) (*stripe.Customer, error)
- func Get(id string, params *stripe.CustomerParams) (*stripe.Customer, error)
- func New(params *stripe.CustomerParams) (*stripe.Customer, error)
- func RetrievePaymentMethod(id string, params *stripe.CustomerRetrievePaymentMethodParams) (*stripe.PaymentMethod, error)
- func Update(id string, params *stripe.CustomerParams) (*stripe.Customer, error)
- type Client
- func (c Client) CreateFundingInstructions(id string, params *stripe.CustomerCreateFundingInstructionsParams) (*stripe.FundingInstructions, error)
- func (c Client) Del(id string, params *stripe.CustomerParams) (*stripe.Customer, error)
- func (c Client) DeleteDiscount(id string, params *stripe.CustomerDeleteDiscountParams) (*stripe.Customer, error)
- func (c Client) Get(id string, params *stripe.CustomerParams) (*stripe.Customer, error)
- func (c Client) List(listParams *stripe.CustomerListParams) *Iter
- func (c Client) ListPaymentMethods(listParams *stripe.CustomerListPaymentMethodsParams) *PaymentMethodIter
- func (c Client) New(params *stripe.CustomerParams) (*stripe.Customer, error)
- func (c Client) RetrievePaymentMethod(id string, params *stripe.CustomerRetrievePaymentMethodParams) (*stripe.PaymentMethod, error)
- func (c Client) Search(params *stripe.CustomerSearchParams) *SearchIter
- func (c Client) Update(id string, params *stripe.CustomerParams) (*stripe.Customer, error)
- type Iter
- type PaymentMethodIter
- type SearchIter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFundingInstructions ¶
func CreateFundingInstructions(id string, params *stripe.CustomerCreateFundingInstructionsParams) (*stripe.FundingInstructions, error)
Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new funding instructions will be created. If funding instructions have already been created for a given customer, the same funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
func Del ¶
Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
func DeleteDiscount ¶
func DeleteDiscount(id string, params *stripe.CustomerDeleteDiscountParams) (*stripe.Customer, error)
Removes the currently applied discount on a customer.
func New ¶
func New(params *stripe.CustomerParams) (*stripe.Customer, error)
Creates a new customer object.
func RetrievePaymentMethod ¶
func RetrievePaymentMethod(id string, params *stripe.CustomerRetrievePaymentMethodParams) (*stripe.PaymentMethod, error)
Retrieves a PaymentMethod object for a given Customer.
func Update ¶
Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.
This request accepts mostly the same arguments as the customer creation call.
Types ¶
type Client ¶
Client is used to invoke /customers APIs.
func (Client) CreateFundingInstructions ¶
func (c Client) CreateFundingInstructions(id string, params *stripe.CustomerCreateFundingInstructionsParams) (*stripe.FundingInstructions, error)
Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new funding instructions will be created. If funding instructions have already been created for a given customer, the same funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
func (Client) Del ¶
Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
func (Client) DeleteDiscount ¶
func (c Client) DeleteDiscount(id string, params *stripe.CustomerDeleteDiscountParams) (*stripe.Customer, error)
Removes the currently applied discount on a customer.
func (Client) List ¶
func (c Client) List(listParams *stripe.CustomerListParams) *Iter
Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
func (Client) ListPaymentMethods ¶
func (c Client) ListPaymentMethods(listParams *stripe.CustomerListPaymentMethodsParams) *PaymentMethodIter
Returns a list of PaymentMethods for a given Customer
func (Client) RetrievePaymentMethod ¶
func (c Client) RetrievePaymentMethod(id string, params *stripe.CustomerRetrievePaymentMethodParams) (*stripe.PaymentMethod, error)
Retrieves a PaymentMethod object for a given Customer.
func (Client) Search ¶
func (c Client) Search(params *stripe.CustomerSearchParams) *SearchIter
Search for customers you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.
func (Client) Update ¶
Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.
This request accepts mostly the same arguments as the customer creation call.
type Iter ¶
Iter is an iterator for customers.
func List ¶
func List(params *stripe.CustomerListParams) *Iter
Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
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 ¶
PaymentMethodIter is an iterator for payment methods.
func ListPaymentMethods ¶
func ListPaymentMethods(params *stripe.CustomerListPaymentMethodsParams) *PaymentMethodIter
Returns a list of PaymentMethods for a given Customer
func (*PaymentMethodIter) PaymentMethod ¶
func (i *PaymentMethodIter) PaymentMethod() *stripe.PaymentMethod
PaymentMethod returns the payment method which the iterator is currently pointing to.
func (*PaymentMethodIter) PaymentMethodList ¶
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 ¶
type SearchIter struct {
*stripe.SearchIter
}
SearchIter is an iterator for customers.
func Search ¶
func Search(params *stripe.CustomerSearchParams) *SearchIter
Search for customers you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.
func (*SearchIter) Customer ¶
func (i *SearchIter) Customer() *stripe.Customer
Customer returns the customer which the iterator is currently pointing to.
func (*SearchIter) CustomerSearchResult ¶
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.