stripity_stripe v1.6.0 Stripe.Customers
Main API for working with Customers at Stripe. Through this API you can: -change subscriptions -create invoices -create customers -delete single customer -delete all customer -count customers
Supports Connect workflow by allowing to pass in any API key explicitely (vs using the one from env/config).
Summary
Functions
List all customers
List all customers. Using a given stripe key to apply against the account associated
Count total number of customers
Count total number of customers. Using a given stripe key to apply against the account associated
Creates a Customer with the given parameters - all of which are optional
Creates a Customer with the given parameters - all of which are optional. Using a given stripe key to apply against the account associated
Deletes a Customer with the specified ID
Deletes a Customer with the specified ID Using a given stripe key to apply against the account associated
Deletes all Customers
Deletes all Customers Using a given stripe key to apply against the account associated
Retrieves a given Customer with the specified ID. Returns 404 if not found.
Example
Retrieves a given Customer with the specified ID. Returns 404 if not found. Using a given stripe key to apply against the account associated.
Example
Returns a list of Customers with a default limit of 10 which you can override with list/1
Returns a list of Customers with a default limit of 10 which you can override with list/1
Using a given stripe key to apply against the account associated
Updates a Customer with the given parameters - all of which are optional
Updates a Customer with the given parameters - all of which are optional. Using a given stripe key to apply against the account associated
Functions
List all customers.
##Example
{:ok, customers} = Stripe.Customers.all
List all customers. Using a given stripe key to apply against the account associated.
##Example
{:ok, customers} = Stripe.Customers.all key, accum, starting_after
Count total number of customers. Using a given stripe key to apply against the account associated.
Example
{:ok, count} = Stripe.Customers.count key
Creates a Customer with the given parameters - all of which are optional.
Example
new_customer = [
email: "test@test.com",
description: "An Test Account",
metadata:[
app_order_id: "ABC123"
app_state_x: "xyz"
],
card: [
number: "4111111111111111",
exp_month: 01,
exp_year: 2018,
cvc: 123,
name: "Joe Test User"
]
]
{:ok, res} = Stripe.Customers.create new_customer
Creates a Customer with the given parameters - all of which are optional. Using a given stripe key to apply against the account associated.
Example
{:ok, res} = Stripe.Customers.create new_customer, key
Deletes a Customer with the specified ID
Example
{:ok, resp} = Stripe.Customers.delete "customer_id"
Deletes a Customer with the specified ID Using a given stripe key to apply against the account associated.
Example
{:ok, resp} = Stripe.Customers.delete "customer_id", key
Deletes all Customers Using a given stripe key to apply against the account associated.
Example
Stripe.Customers.delete_all key
Retrieves a given Customer with the specified ID. Returns 404 if not found.
Example
{:ok, cust} = Stripe.Customers.get "customer_id"
Retrieves a given Customer with the specified ID. Returns 404 if not found. Using a given stripe key to apply against the account associated.
Example
{:ok, cust} = Stripe.Customers.get "customer_id", key
Returns a list of Customers with a default limit of 10 which you can override with list/1
Example
{:ok, customers} = Stripe.Customers.list(starting_after, 20)
Returns a list of Customers with a default limit of 10 which you can override with list/1
Using a given stripe key to apply against the account associated.
Example
{:ok, customers} = Stripe.Customers.list(key,starting_after,20)
Updates a Customer with the given parameters - all of which are optional.
Example
new_fields = [
email: "new_email@test.com",
description: "New description",
]
{:ok, res} = Stripe.Customers.update(customer_id, new_fields)