diff --git a/README.md b/README.md index 85f3a7e9..32f98ea9 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Works with API version 2015-10-16 Install the dependency: ```ex -{:stripity_stripe, "~> 1.2.0"} +{:stripity_stripe, "~> 1.3.0"} ``` Next, add to your applications: diff --git a/doc/404.html b/doc/404.html index b680d8f4..4923b618 100644 --- a/doc/404.html +++ b/doc/404.html @@ -4,7 +4,7 @@ - 404 – stripity_stripe v0.3.0 + 404 – stripity_stripe v1.3.0 @@ -28,7 +28,7 @@

stripity_stripe

diff --git a/doc/Stripe.Charges.html b/doc/Stripe.Charges.html index 90a5ee7c..e3c5c72f 100644 --- a/doc/Stripe.Charges.html +++ b/doc/Stripe.Charges.html @@ -4,7 +4,7 @@ - Stripe.Charges – stripity_stripe v0.3.0 + Stripe.Charges – stripity_stripe v1.3.0 @@ -28,7 +28,7 @@

stripity_stripe

@@ -67,7 +67,25 @@

-

Handles charges to the Stripe API.

+

Handles charges to the Stripe API. +(API ref: https://stripe.com/docs/api#charges)

+

Operations:

+
@@ -95,6 +113,15 @@

Captures a charge that is currently pending. Note: you can default a charge to be automatically captured by setting capture: true in the charge create params

+ +
+ + +

Captures a charge that is currently pending. Note: you can default a charge to be automatically captured by setting capture: true in the charge create params

+
+
@@ -105,6 +132,38 @@

Examples

+
+
+ + +

Updates a charge with changeable information (see the Stripe docs on what you can change) +Using a given stripe key to apply against the account associated.

+

Examples

+
+ +
+
+
+ count() +
+ +

Count number of charges.

+

Example

+
+ +
+
+ + +

Count number of charges. +Using a given stripe key to apply against the account associated.

+

Example

+
+
@@ -115,6 +174,17 @@

Examples

that can be a token or customer. See the Stripe docs for proper source specs

+
+
+ + +

Creates a charge for a customer or card. You must pass in the amount, and also a source for the charge + that can be a token or customer. See the Stripe docs for proper source specs. + Using a given stripe key to apply against the account associated

+
+
@@ -124,6 +194,16 @@

Examples

Retrieves a given charge

+
+
+ + +

Retrieves a given charge. +Using a given stripe key to apply against the account associated

+
+
@@ -133,6 +213,16 @@

Examples

Lists out charges from your account with a default limit of 10. You can override this by passing in a limit

+
+
+ + +

Lists out charges from your account with a default limit of 10. You can override this by passing in a limit. +Using a given stripe key to apply against the account associated

+
+
@@ -142,6 +232,16 @@

Examples

Refunds a charge completely. Use refund_partial if you just want to… you know… partially refund

+
+
+ + +

Refunds a charge completely. Use refund_partial if you just want to… you know… partially refund +Using a given stripe key to apply against the account associated

+
+
@@ -151,6 +251,17 @@

Examples

Refunds a charge partially; the amount is required

+
+
+ + +

Refunds a charge partially; the amount is required. +Using a given stripe key to apply against the account associated.

+

Example

+
+
@@ -189,6 +300,23 @@

Example

+
+
+ + + + capture(id, key) + +
+ +
+

Captures a charge that is currently pending. Note: you can default a charge to be automatically captured by setting capture: true in the charge create params.

+

Using a given stripe key to apply against the account associated.

+

Example

+
{:ok, charge} = Stripe.Charges.capture("charge_id", key)
+ +
+
+
+
+ + + + change(id, params, key) + +
+ +
+

Updates a charge with changeable information (see the Stripe docs on what you can change) +Using a given stripe key to apply against the account associated.

+

Examples

+
params = [description: "Changed charge"]
+{:ok, charge} = Stripe.Charges.change("charge_id", params, key)
+ +
+
+
+
+ + + + count() + +
+ +
+

Count number of charges.

+

Example

+
{:ok, cnt} = Stripe.Charges.count
+ +
+
+
+
+ + + + count(key) + +
+ +
+

Count number of charges. +Using a given stripe key to apply against the account associated.

+

Example

+
{:ok, cnt} = Stripe.Charges.count key
+ +
+
+
+
+ + + + create(amount, params, key) + +
+ +
+

Creates a charge for a customer or card. You must pass in the amount, and also a source for the charge + that can be a token or customer. See the Stripe docs for proper source specs. + Using a given stripe key to apply against the account associated.

+

## Examples

+

{:ok, result} = Stripe.Charges.create 1000,params, key

+ +
+
+
+
+ + + + get(id, key) + +
+ +
+

Retrieves a given charge. +Using a given stripe key to apply against the account associated.

+

Example

+
{:ok, charge} = Stripe.Charges.get("charge_id", key)
+ +
+
+
+
+ + + + list(key, limit) + +
+ +
+

Lists out charges from your account with a default limit of 10. You can override this by passing in a limit. +Using a given stripe key to apply against the account associated.

+

Examples

+
{:ok, charges} = Stripe.Charges.list(key, 100)
+ +
+
+
+
+ + + + refund(id, key) + +
+ +
+

Refunds a charge completely. Use refund_partial if you just want to… you know… partially refund +Using a given stripe key to apply against the account associated.

+

Example

+
{:ok, charge} = Stripe.Charges.refund("charge_id", key)
+ +
+
+
+
+ + + + refund_partial(id, amount, key) + +
+ +
+

Refunds a charge partially; the amount is required. +Using a given stripe key to apply against the account associated.

+

Example

+
{:ok, charge} = Stripe.Charges.refund_partial("charge_id",500, key)
+
diff --git a/doc/Stripe.Customers.html b/doc/Stripe.Customers.html index e223e7bc..88312a2e 100644 --- a/doc/Stripe.Customers.html +++ b/doc/Stripe.Customers.html @@ -4,7 +4,7 @@ - Stripe.Customers – stripity_stripe v0.3.0 + Stripe.Customers – stripity_stripe v1.3.0 @@ -28,7 +28,7 @@

stripity_stripe

@@ -67,7 +67,15 @@

-

Main API for working with Customers at Stripe. Through this API you can alter subscriptions, create invoices, create and delete customers, etc.

+

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

+

(API ref: https://stripe.com/docs/api/curl#customer_object

@@ -89,56 +97,58 @@

-

Cancels a subscription

+

List all customers

-

Changes a customer’s subscription (plan, description, etc - see Stripe API for acceptable options). -Customer ID and Subscription ID are required for this

+

List all customers. +Using a given stripe key to apply against the account associated

-

Creates a Customer with the given parameters - all of which are optional

+

Count total number of customers

-

Invoices a customer according to Stripe’s invoice rules. This is not the same as a charge

+

Count total number of customers. +Using a given stripe key to apply against the account associated

-

Starts a subscription for the specified customer. Note that if you pass in the customer and subscription information, both will be created at the same time

+

Creates a Customer with the given parameters - all of which are optional

-

Creates a subscription for the specified customer

+

Creates a Customer with the given parameters - all of which are optional. +Using a given stripe key to apply against the account associated

@@ -150,6 +160,35 @@

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

+
+
@@ -163,37 +202,50 @@

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 invoices for a given customer

+

Returns a list of Customers with a default limit of 10 which you can override with list/1

-

Returns a subscription; customer_id and subscription_id are required

+

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

-

Returns all subscriptions for a Customer

+

Updates a Customer with the given parameters - all of which are optional

-

Returns a list of Customers with a default limit of 10 which you can override with list/1

+

Updates a Customer with the given parameters - all of which are optional. +Using a given stripe key to apply against the account associated

@@ -218,36 +270,69 @@

Functions

-
+
- + - cancel_subscription(id, sub_id) + all(accum \\ [], starting_after \\ "")
-

Cancels a subscription

+

List all customers.

+

##Example

+
{:ok, customers} = Stripe.Customers.all
+ +
+
+
+
+ + + + all(key, accum, starting_after) + +
+ +
+

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() + +
+ +
+

Count total number of customers.

Example

-
Stripe.Customers.cancel_subscription "customer_id", "subscription_id"
+
{:ok, count} = Stripe.Customers.count
-
+
- + - change_subscription(id, sub_id, opts) + count(key)
-

Changes a customer’s subscription (plan, description, etc - see Stripe API for acceptable options). -Customer ID and Subscription ID are required for this.

+

Count total number of customers. +Using a given stripe key to apply against the account associated.

Example

-
Stripe.Customers.change_subscription "customer_id", "subscription_id", plan: "premium"
+
{:ok, count} = Stripe.Customers.count key
@@ -266,6 +351,10 @@

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,
@@ -278,86 +367,86 @@ 

Example

-
+
- + - create_invoice(id, params) + create(params, key)
-

Invoices a customer according to Stripe’s invoice rules. This is not the same as a charge.

+

Creates a Customer with the given parameters - all of which are optional. +Using a given stripe key to apply against the account associated.

Example

-
Stripe.Customers.create_invoice "customer_id", "subscription_id"
+
{:ok, res} = Stripe.Customers.create new_customer, key
-
+
- + - create_subscription(opts) + delete(id)
-

Starts a subscription for the specified customer. Note that if you pass in the customer and subscription information, both will be created at the same time.

+

Deletes a Customer with the specified ID

Example

-
new_sub = [
-    email: "jill@test.com",
-    description: "Poop on the Potty",
-    plan: "standard",
-    source: [
-      object: "card",
-      number: "4111111111111111",
-      exp_month: 01,
-      exp_year: 2018,
-      cvc: 123,
-      name: "Jill Subscriber"
-    ]
-  ]
-  {:ok, sub} = Stripe.Customers.create_subscription new_sub
-

You can also just pass along the customer id and the plan name:

-
new_sub = [
-    plan: "standard",
-    customer: "customer_id"
-  ]
-  {:ok, sub} = Stripe.Customers.create_subscription new_sub
+
{:ok, resp} =  Stripe.Customers.delete "customer_id"
-
+
- + - create_subscription(id, opts) + delete(id, key)
-

Creates a subscription for the specified customer.

+

Deletes a Customer with the specified ID +Using a given stripe key to apply against the account associated.

Example

-
Stripe.Customers.create_subscription "customer_id", "plan"
+
{:ok, resp} = Stripe.Customers.delete "customer_id", key
-
+
- + - delete(id) + delete_all()
-

Deletes a Customer with the specified ID

+

Deletes all Customers

Example

-
Stripe.Customers.delete "customer_id"
+
Stripe.Customers.delete_all
+ +
+
+
+
+ + + + delete_all(key) + +
+ +
+

Deletes all Customers +Using a given stripe key to apply against the account associated.

+

Example

+
Stripe.Customers.delete_all key
@@ -373,71 +462,94 @@

Example

Retrieves a given Customer with the specified ID. Returns 404 if not found.

Example

-
Stripe.Customers.get "customer_id"
+
{:ok, cust} = Stripe.Customers.get "customer_id"
+ +
+
+
+
+ + + + get(id, key) + +
+ +
+

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
-
+
- + - get_invoices(id, params \\ []) + list(starting_after, limit \\ 10)
-

Returns a list of invoices for a given customer

+

Returns a list of Customers with a default limit of 10 which you can override with list/1

Example

-
Stripe.Customers.get_invoices "customer_id"
+
{:ok, customers} = Stripe.Customers.list(starting_after, 20)
-
+
- + - get_subcription(id, sub_id) + list(key, starting_after, limit)
-

Returns a subscription; customer_id and subscription_id are required.

+

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

-
Stripe.Customers.get_subscription "customer_id", "subscription_id"
+
{:ok, customers} = Stripe.Customers.list(key,starting_after,20)
-
+
- + - get_subscriptions(id) + update(customer_id, params)
-

Returns all subscriptions for a Customer.

+

Updates a Customer with the given parameters - all of which are optional.

Example

-
Stripe.Customers.get_subscriptions "customer_id"
+
new_fields = [
+    email: "new_email@test.com",
+    description: "New description",
+  ]
+  {:ok, res} = Stripe.Customers.update(customer_id, new_fields)
-
+
- + - list(limit \\ 10) + update(customer_id, params, key)
-

Returns a list of Customers with a default limit of 10 which you can override with list/1

+

Updates a Customer with the given parameters - all of which are optional. +Using a given stripe key to apply against the account associated.

Example

-
{:ok, customers} = Stripe.Customers.list(20)
+
{:ok, res} = Stripe.Customers.update(customer_id, new_fields, key)
diff --git a/doc/Stripe.InvoiceItems.html b/doc/Stripe.InvoiceItems.html index 1b0c5ddc..f8dbe1e8 100644 --- a/doc/Stripe.InvoiceItems.html +++ b/doc/Stripe.InvoiceItems.html @@ -4,7 +4,7 @@ - Stripe.InvoiceItems – stripity_stripe v0.3.0 + Stripe.InvoiceItems – stripity_stripe v1.3.0 @@ -28,7 +28,7 @@

stripity_stripe

diff --git a/doc/Stripe.Plans.html b/doc/Stripe.Plans.html index 748dd95c..b6fe0438 100644 --- a/doc/Stripe.Plans.html +++ b/doc/Stripe.Plans.html @@ -4,7 +4,7 @@ - Stripe.Plans – stripity_stripe v0.3.0 + Stripe.Plans – stripity_stripe v1.3.0 @@ -28,7 +28,7 @@

stripity_stripe

@@ -88,6 +88,28 @@

Functions

+ + +

List all plans. +##Example

+
{:ok, plans} = Stripe.Plans.all
+
+ +
+
+ + +

List all plans w/ given key. +##Example

+
{:ok, plans} = Stripe.Plans.all key
+
+ +
+
@@ -95,6 +117,24 @@

Changes Plan information. See Stripe docs as to what you can change

+

+ +
+
+ count() +
+ +
+
+ +
@@ -104,6 +144,15 @@

Creates a Plan. Note that currency and interval are required parameters, and are defaulted to “USD” and “month”

+

+
+ + +

Creates a Plan using a given key. Note that currency and interval are required parameters, and are defaulted to “USD” and “month”

+
+
@@ -113,6 +162,37 @@

Deletes a Plan with the specified ID

+

+
+ + +

Deletes a Plan with the specified ID using the given key

+
+ +
+
+ + +

Deletes all Plans

+

Example

+
Stripe.Plans.delete_all
+
+ +
+
+ + +

Deletes all Plans w/given key

+

Example

+
Stripe.Plans.delete_all key
+
+
@@ -122,6 +202,15 @@

Returns a list of Plans

+

+
+ + +

Returns a list of Plans using the given key

+
+
@@ -144,7 +233,39 @@

Functions

-
+
+
+ + + + all(accum \\ [], startingAfter \\ "") + +
+ +
+

List all plans. +##Example

+
{:ok, plans} = Stripe.Plans.all
+ +
+
+
+
+ + + + all(key, accum, startingAfter) + +
+ +
+

List all plans w/ given key. +##Example

+
{:ok, plans} = Stripe.Plans.all key
+ +
+
+
+
+
+ + + + change(id, params, key) + +
+ +
+ +
+
+
+
+ + + + count() + +
+ +
+ +
+
+
+
+ + + + count(key) + +
+ +
+ +
+
+
+
+ + + + create(params, key) + +
+ +
+

Creates a Plan using a given key. Note that currency and interval are required parameters, and are defaulted to “USD” and “month”

+

Example

+
{:ok, plan} = Stripe.Plans.create [id: "test-plan", name: "Test Plan", amount: 1000, interval: "month"], key
+ +
+
+
+
+ + + + delete(id, key) + +
+ +
+

Deletes a Plan with the specified ID using the given key.

+

Example

+
{:ok, res} = Stripe.Plans.delete "test-plan", key
+ +
+
+
+
+ + + + delete_all() + +
+ +
+

Deletes all Plans

+

Example

+
Stripe.Plans.delete_all
+ +
+
+
+
+ + + + delete_all(key) + +
+ +
+

Deletes all Plans w/given key

+

Example

+
Stripe.Plans.delete_all key
+ +
+
+
+
+ + + + list(key, limit) + +
+ +
+

Returns a list of Plans using the given key.

+
diff --git a/doc/Stripe.Supervisor.html b/doc/Stripe.Supervisor.html index 91ad04ea..28d18251 100644 --- a/doc/Stripe.Supervisor.html +++ b/doc/Stripe.Supervisor.html @@ -4,7 +4,7 @@ - Stripe.Supervisor – stripity_stripe v0.3.0 + Stripe.Supervisor – stripity_stripe v1.3.0 @@ -28,7 +28,7 @@

stripity_stripe

@@ -84,7 +84,7 @@

Callback implementation for c::supervisor.init/1

@@ -123,7 +123,7 @@

- init(list1) + init(list)

diff --git a/doc/Stripe.URI.html b/doc/Stripe.URI.html index 9fdad4a0..07f885f8 100644 --- a/doc/Stripe.URI.html +++ b/doc/Stripe.URI.html @@ -4,7 +4,7 @@ - Stripe.URI – stripity_stripe v0.3.0 + Stripe.URI – stripity_stripe v1.3.0 @@ -28,7 +28,7 @@

stripity_stripe

diff --git a/doc/Stripe.Util.html b/doc/Stripe.Util.html index 5e95cb1e..3fb9a230 100644 --- a/doc/Stripe.Util.html +++ b/doc/Stripe.Util.html @@ -4,7 +4,7 @@ - Stripe.Util – stripity_stripe v0.3.0 + Stripe.Util – stripity_stripe v1.3.0 @@ -28,7 +28,7 @@

stripity_stripe

@@ -83,16 +83,58 @@

Functions

+ + +
+ + + + + + +
@@ -121,7 +163,33 @@

Functions

-
+
+
+ + + + count(endpoint) + +
+ +
+ +
+
+
+
+ + + + count(endpoint, key) + +
+ +
+ +
+
+
+
+
+ + + + handle_stripe_full_response(res) + +
+ +
+ +
+
+
+
+ + + + list(endpoint, starting_after \\ "", limit \\ 10) + +
+ +
+ +
+
+
+
+ + + + list(endpoint, key, starting_after, limit) + +
+ +
+ +
+
+
+
+ + + + list_raw(endpoint, limit \\ 10, starting_after \\ "") + +
+ +
+ +
+
+
+
+ + + + list_raw(endpoint, key, limit, starting_after) + +
+ +
+ +
+
@@ -101,6 +101,26 @@

Functions

+ + +

Grabs STRIPE_SECRET_KEY from system ENV +Returns binary

+
+ +
+
+ + +

Grabs STRIPE_PLATFORM_CLIENT_ID from system ENV +Returns binary

+
+ +
+
-

Grabs STRIPE_SECRET_KEY from system ENV -Returns binary

+ -

Boilerplate code to make requests. +

Boilerplate code to make requests with the key read from config or env.see config_or_env_key/0 Args:

    +
  • method - request method +
  • endpoint - string requested API endpoint
  • +
  • key - stripe key passed to the api +
  • body - request body +
  • +
  • headers - request headers +
  • +
  • options - request options +Returns dict +
  • +
+
+ +
+
+ + +

Boilerplate code to make requests with a given key. +Args:

+
    +
  • method - request method +
  • +
  • endpoint - string requested API endpoint +
  • +
  • key - stripe key passed to the api +
  • +
  • body - request body +
  • +
  • headers - request headers +
  • +
  • options - request options Returns dict
@@ -292,7 +347,7 @@

Set our request headers for every request

@@ -373,7 +428,37 @@

Functions

-
+
+
+ + + + config_or_env_key() + +
+ +
+

Grabs STRIPE_SECRET_KEY from system ENV +Returns binary

+ +
+
+
+
+ + + + config_or_env_platform_client_id() + +
+ +
+

Grabs STRIPE_PLATFORM_CLIENT_ID from system ENV +Returns binary

+ +
+
+
@@ -386,7 +471,7 @@

Specs

-
delete(binary, headers, [{atom, any}]) ::
+          
delete(binary, headers, Keyword.t) ::
   {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
   {:error, HTTPoison.Error.t}
@@ -414,7 +499,7 @@

Specs

Specs

-
delete!(binary, headers, [{atom, any}]) ::
+          
delete!(binary, headers, Keyword.t) ::
   HTTPoison.Response.t |
   HTTPoison.AsyncResponse.t
@@ -442,7 +527,7 @@

Specs

Specs

-
get(binary, headers, [{atom, any}]) ::
+          
get(binary, headers, Keyword.t) ::
   {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
   {:error, HTTPoison.Error.t}
@@ -470,7 +555,7 @@

Specs

Specs

-
get!(binary, headers, [{atom, any}]) ::
+          
get!(binary, headers, Keyword.t) ::
   HTTPoison.Response.t |
   HTTPoison.AsyncResponse.t
@@ -498,7 +583,7 @@

Specs

Specs

-
head(binary, headers, [{atom, any}]) ::
+          
head(binary, headers, Keyword.t) ::
   {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
   {:error, HTTPoison.Error.t}
@@ -526,7 +611,7 @@

Specs

Specs

-
head!(binary, headers, [{atom, any}]) ::
+          
head!(binary, headers, Keyword.t) ::
   HTTPoison.Response.t |
   HTTPoison.AsyncResponse.t
@@ -541,19 +626,30 @@

Specs

-
+
- + - key() + make_oauth_deauthorize_request(stripe_user_id)
-

Grabs STRIPE_SECRET_KEY from system ENV -Returns binary

- + +
+
+
+
+ + + + make_oauth_token_callback_request(body) + +
+ +
+
@@ -566,12 +662,50 @@

Specs

-

Boilerplate code to make requests. +

Boilerplate code to make requests with the key read from config or env.see config_or_env_key/0 Args:

    +
  • method - request method +
  • endpoint - string requested API endpoint
  • +
  • key - stripe key passed to the api +
  • body - request body +
  • +
  • headers - request headers +
  • +
  • options - request options +Returns dict +
  • +
+ +
+
+
+
+ + + + make_request_with_key(method, endpoint, key, body \\ [], headers \\ [], options \\ []) + +
+ +
+

Boilerplate code to make requests with a given key. +Args:

+
    +
  • method - request method +
  • +
  • endpoint - string requested API endpoint +
  • +
  • key - stripe key passed to the api +
  • +
  • body - request body +
  • +
  • headers - request headers +
  • +
  • options - request options Returns dict
@@ -591,7 +725,7 @@

Specs

Specs

-
options(binary, headers, [{atom, any}]) ::
+          
options(binary, headers, Keyword.t) ::
   {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
   {:error, HTTPoison.Error.t}
@@ -619,7 +753,7 @@

Specs

Specs

-
options!(binary, headers, [{atom, any}]) ::
+          
options!(binary, headers, Keyword.t) ::
   HTTPoison.Response.t |
   HTTPoison.AsyncResponse.t
@@ -647,7 +781,7 @@

Specs

Specs

-
patch(binary, binary, headers, [{atom, any}]) ::
+          
patch(binary, binary, headers, Keyword.t) ::
   {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
   {:error, HTTPoison.Error.t}
@@ -675,7 +809,7 @@

Specs

Specs

-
patch!(binary, binary, headers, [{atom, any}]) ::
+          
patch!(binary, binary, headers, Keyword.t) ::
   HTTPoison.Response.t |
   HTTPoison.AsyncResponse.t
@@ -703,7 +837,7 @@

Specs

Specs

-
post(binary, binary, headers, [{atom, any}]) ::
+          
post(binary, binary, headers, Keyword.t) ::
   {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
   {:error, HTTPoison.Error.t}
@@ -731,7 +865,7 @@

Specs

Specs

-
post!(binary, binary, headers, [{atom, any}]) ::
+          
post!(binary, binary, headers, Keyword.t) ::
   HTTPoison.Response.t |
   HTTPoison.AsyncResponse.t
@@ -799,7 +933,7 @@

Specs

Specs

-
put(binary, binary, headers, [{atom, any}]) ::
+          
put(binary, binary, headers, Keyword.t) ::
   {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
   {:error, HTTPoison.Error.t}
@@ -827,7 +961,7 @@

Specs

Specs

-
put!(binary, binary, headers, [{atom, any}]) ::
+          
put!(binary, binary, headers, Keyword.t) ::
   HTTPoison.Response.t |
   HTTPoison.AsyncResponse.t
@@ -842,12 +976,12 @@

Specs

-
+
- + - req_headers() + req_headers(key)
@@ -869,7 +1003,7 @@

Specs

Specs

-
request(atom, binary, binary, headers, [{atom, any}]) ::
+          
request(atom, binary, binary, headers, Keyword.t) ::
   {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
   {:error, HTTPoison.Error.t}
@@ -878,6 +1012,7 @@

Specs

Issues an HTTP request with the given method to the given url.

+

This function is usually used indirectly by get/3, post/4, put/4, etc

Args:

  • method - HTTP method as an atom (:get, :head, :post, :put, @@ -885,24 +1020,43 @@

    Specs

  • url - target url as a binary string or char list
  • -
  • body - request body as a binary string or char list +
  • body - request body. See more below +
  • +
  • headers - HTTP headers as an orddict (e.g., [{"Accept", "application/json"}]) +
  • +
  • options - Keyword list of options +
  • +
+

Body:

+
    +
  • binary, char list or an iolist
  • -
  • headers - HTTP headers as an orddict (e.g., `[{:Accept, -"application/json"}]`) +
  • {:form, [{K, V}, ...]} - send a form url encoded
  • -
  • options - orddict of options +
  • {:file, "/path/to/file"} - send a file

Options:

    -
  • :timeout - the timeout (in milliseconds) of the request +
  • :timeout - timeout to establish a connection, in milliseconds. Default is 8000 +
  • +
  • :recv_timeout - timeout used when receiving a connection. Default is 5000
  • :stream_to - a PID to stream the response to
  • :proxy - a proxy to be used for the request; it can by a regular url or a {Host, Proxy} tuple
  • +
  • :proxy_auth - proxy authentication {User, Password} tuple +
  • +
  • :ssl - SSL options supported by the ssl erlang module +
  • +
  • :follow_redirect - a boolean that causes redirects to be followed +
  • +
  • :max_redirect - an integer denoting the maximum number of redirects to follow +
+

Timeouts can be an integer or :infinity

This function returns {:ok, response} or {:ok, async_response} if the request is successful, {:error, reason} otherwise.

Examples

@@ -923,7 +1077,7 @@

Examples

Specs

-
request!(atom, binary, binary, headers, [{atom, any}]) :: HTTPoison.Response.t
+
request!(atom, binary, binary, headers, Keyword.t) :: HTTPoison.Response.t
diff --git a/doc/dist/sidebar_items.js b/doc/dist/sidebar_items.js index 072a8742..fda86681 100644 --- a/doc/dist/sidebar_items.js +++ b/doc/dist/sidebar_items.js @@ -1 +1 @@ -sidebarNodes={"exceptions":[],"extras":[{"id":"extra-api-reference","title":"API Reference","headers":[]}],"modules":[{"id":"Stripe","title":"Stripe","functions":[{"id":"delete/3","anchor":"delete/3"},{"id":"delete!/3","anchor":"delete!/3"},{"id":"get/3","anchor":"get/3"},{"id":"get!/3","anchor":"get!/3"},{"id":"head/3","anchor":"head/3"},{"id":"head!/3","anchor":"head!/3"},{"id":"key/0","anchor":"key/0"},{"id":"make_request/5","anchor":"make_request/5"},{"id":"options/3","anchor":"options/3"},{"id":"options!/3","anchor":"options!/3"},{"id":"patch/4","anchor":"patch/4"},{"id":"patch!/4","anchor":"patch!/4"},{"id":"post/4","anchor":"post/4"},{"id":"post!/4","anchor":"post!/4"},{"id":"process_response_body/1","anchor":"process_response_body/1"},{"id":"process_url/1","anchor":"process_url/1"},{"id":"put/4","anchor":"put/4"},{"id":"put!/4","anchor":"put!/4"},{"id":"req_headers/0","anchor":"req_headers/0"},{"id":"request/5","anchor":"request/5"},{"id":"request!/5","anchor":"request!/5"},{"id":"start/0","anchor":"start/0"},{"id":"start/2","anchor":"start/2"}],"types":[{"id":"headers/0","anchor":"t:headers/0"}]},{"id":"Stripe.Charges","title":"Stripe.Charges","functions":[{"id":"capture/1","anchor":"capture/1"},{"id":"change/2","anchor":"change/2"},{"id":"create/2","anchor":"create/2"},{"id":"get/1","anchor":"get/1"},{"id":"list/1","anchor":"list/1"},{"id":"refund/1","anchor":"refund/1"},{"id":"refund_partial/2","anchor":"refund_partial/2"}]},{"id":"Stripe.Customers","title":"Stripe.Customers","functions":[{"id":"cancel_subscription/2","anchor":"cancel_subscription/2"},{"id":"change_subscription/3","anchor":"change_subscription/3"},{"id":"create/1","anchor":"create/1"},{"id":"create_invoice/2","anchor":"create_invoice/2"},{"id":"create_subscription/1","anchor":"create_subscription/1"},{"id":"create_subscription/2","anchor":"create_subscription/2"},{"id":"delete/1","anchor":"delete/1"},{"id":"get/1","anchor":"get/1"},{"id":"get_invoices/2","anchor":"get_invoices/2"},{"id":"get_subcription/2","anchor":"get_subcription/2"},{"id":"get_subscriptions/1","anchor":"get_subscriptions/1"},{"id":"list/1","anchor":"list/1"}]},{"id":"Stripe.InvoiceItems","title":"Stripe.InvoiceItems","functions":[{"id":"create/1","anchor":"create/1"},{"id":"delete/1","anchor":"delete/1"},{"id":"list/0","anchor":"list/0"},{"id":"retrieve/1","anchor":"retrieve/1"},{"id":"update/1","anchor":"update/1"}]},{"id":"Stripe.Plans","title":"Stripe.Plans","functions":[{"id":"change/2","anchor":"change/2"},{"id":"create/1","anchor":"create/1"},{"id":"delete/1","anchor":"delete/1"},{"id":"list/1","anchor":"list/1"}]},{"id":"Stripe.Supervisor","title":"Stripe.Supervisor","functions":[{"id":"init/1","anchor":"init/1"},{"id":"start_link/0","anchor":"start_link/0"}]},{"id":"Stripe.URI","title":"Stripe.URI","functions":[{"id":"encode_query/1","anchor":"encode_query/1"}]},{"id":"Stripe.Util","title":"Stripe.Util","functions":[{"id":"datetime_from_timestamp/1","anchor":"datetime_from_timestamp/1"},{"id":"handle_stripe_response/1","anchor":"handle_stripe_response/1"},{"id":"string_map_to_atoms/1","anchor":"string_map_to_atoms/1"}]}],"protocols":[]} \ No newline at end of file +sidebarNodes={"exceptions":[],"extras":[{"id":"extra-api-reference","title":"API Reference","headers":[]}],"modules":[{"id":"Stripe","title":"Stripe","functions":[{"id":"config_or_env_key/0","anchor":"config_or_env_key/0"},{"id":"config_or_env_platform_client_id/0","anchor":"config_or_env_platform_client_id/0"},{"id":"delete/3","anchor":"delete/3"},{"id":"delete!/3","anchor":"delete!/3"},{"id":"get/3","anchor":"get/3"},{"id":"get!/3","anchor":"get!/3"},{"id":"head/3","anchor":"head/3"},{"id":"head!/3","anchor":"head!/3"},{"id":"make_oauth_deauthorize_request/1","anchor":"make_oauth_deauthorize_request/1"},{"id":"make_oauth_token_callback_request/1","anchor":"make_oauth_token_callback_request/1"},{"id":"make_request/5","anchor":"make_request/5"},{"id":"make_request_with_key/6","anchor":"make_request_with_key/6"},{"id":"options/3","anchor":"options/3"},{"id":"options!/3","anchor":"options!/3"},{"id":"patch/4","anchor":"patch/4"},{"id":"patch!/4","anchor":"patch!/4"},{"id":"post/4","anchor":"post/4"},{"id":"post!/4","anchor":"post!/4"},{"id":"process_response_body/1","anchor":"process_response_body/1"},{"id":"process_url/1","anchor":"process_url/1"},{"id":"put/4","anchor":"put/4"},{"id":"put!/4","anchor":"put!/4"},{"id":"req_headers/1","anchor":"req_headers/1"},{"id":"request/5","anchor":"request/5"},{"id":"request!/5","anchor":"request!/5"},{"id":"start/0","anchor":"start/0"},{"id":"start/2","anchor":"start/2"}],"types":[{"id":"headers/0","anchor":"t:headers/0"}]},{"id":"Stripe.Accounts","title":"Stripe.Accounts","functions":[{"id":"all/2","anchor":"all/2"},{"id":"all/3","anchor":"all/3"},{"id":"count/0","anchor":"count/0"},{"id":"count/1","anchor":"count/1"},{"id":"create/1","anchor":"create/1"},{"id":"create/2","anchor":"create/2"},{"id":"delete/1","anchor":"delete/1"},{"id":"delete/2","anchor":"delete/2"},{"id":"delete_all/0","anchor":"delete_all/0"},{"id":"delete_all/1","anchor":"delete_all/1"},{"id":"get/1","anchor":"get/1"},{"id":"get/2","anchor":"get/2"},{"id":"list/1","anchor":"list/1"},{"id":"list/2","anchor":"list/2"}]},{"id":"Stripe.Cards","title":"Stripe.Cards","functions":[{"id":"all/4","anchor":"all/4"},{"id":"all/5","anchor":"all/5"},{"id":"count/2","anchor":"count/2"},{"id":"count/3","anchor":"count/3"},{"id":"create/3","anchor":"create/3"},{"id":"create/4","anchor":"create/4"},{"id":"delete/3","anchor":"delete/3"},{"id":"delete/4","anchor":"delete/4"},{"id":"delete_all/2","anchor":"delete_all/2"},{"id":"delete_all/3","anchor":"delete_all/3"},{"id":"endpoint_for_entity/2","anchor":"endpoint_for_entity/2"},{"id":"get/3","anchor":"get/3"},{"id":"get/4","anchor":"get/4"},{"id":"list/4","anchor":"list/4"},{"id":"list/5","anchor":"list/5"},{"id":"update/5","anchor":"update/5"}]},{"id":"Stripe.Charges","title":"Stripe.Charges","functions":[{"id":"capture/1","anchor":"capture/1"},{"id":"capture/2","anchor":"capture/2"},{"id":"change/2","anchor":"change/2"},{"id":"change/3","anchor":"change/3"},{"id":"count/0","anchor":"count/0"},{"id":"count/1","anchor":"count/1"},{"id":"create/2","anchor":"create/2"},{"id":"create/3","anchor":"create/3"},{"id":"get/1","anchor":"get/1"},{"id":"get/2","anchor":"get/2"},{"id":"list/1","anchor":"list/1"},{"id":"list/2","anchor":"list/2"},{"id":"refund/1","anchor":"refund/1"},{"id":"refund/2","anchor":"refund/2"},{"id":"refund_partial/2","anchor":"refund_partial/2"},{"id":"refund_partial/3","anchor":"refund_partial/3"}]},{"id":"Stripe.Connect","title":"Stripe.Connect","functions":[{"id":"base_url/0","anchor":"base_url/0"},{"id":"generate_button_url/1","anchor":"generate_button_url/1"},{"id":"get_token/1","anchor":"get_token/1"},{"id":"oauth_deauthorize/1","anchor":"oauth_deauthorize/1"},{"id":"oauth_token_callback/1","anchor":"oauth_token_callback/1"}]},{"id":"Stripe.Customers","title":"Stripe.Customers","functions":[{"id":"all/2","anchor":"all/2"},{"id":"all/3","anchor":"all/3"},{"id":"count/0","anchor":"count/0"},{"id":"count/1","anchor":"count/1"},{"id":"create/1","anchor":"create/1"},{"id":"create/2","anchor":"create/2"},{"id":"delete/1","anchor":"delete/1"},{"id":"delete/2","anchor":"delete/2"},{"id":"delete_all/0","anchor":"delete_all/0"},{"id":"delete_all/1","anchor":"delete_all/1"},{"id":"get/1","anchor":"get/1"},{"id":"get/2","anchor":"get/2"},{"id":"list/2","anchor":"list/2"},{"id":"list/3","anchor":"list/3"},{"id":"update/2","anchor":"update/2"},{"id":"update/3","anchor":"update/3"}]},{"id":"Stripe.Events","title":"Stripe.Events","functions":[{"id":"count/0","anchor":"count/0"},{"id":"count/1","anchor":"count/1"},{"id":"get/1","anchor":"get/1"},{"id":"get/2","anchor":"get/2"},{"id":"list/2","anchor":"list/2"},{"id":"list/3","anchor":"list/3"}]},{"id":"Stripe.InvoiceItems","title":"Stripe.InvoiceItems","functions":[{"id":"create/1","anchor":"create/1"},{"id":"delete/1","anchor":"delete/1"},{"id":"list/0","anchor":"list/0"},{"id":"retrieve/1","anchor":"retrieve/1"},{"id":"update/1","anchor":"update/1"}]},{"id":"Stripe.Invoices","title":"Stripe.Invoices","functions":[{"id":"count/0","anchor":"count/0"},{"id":"count/1","anchor":"count/1"},{"id":"create/2","anchor":"create/2"},{"id":"create/3","anchor":"create/3"},{"id":"get/1","anchor":"get/1"},{"id":"get/2","anchor":"get/2"},{"id":"list/2","anchor":"list/2"},{"id":"list/3","anchor":"list/3"}]},{"id":"Stripe.Plans","title":"Stripe.Plans","functions":[{"id":"all/2","anchor":"all/2"},{"id":"all/3","anchor":"all/3"},{"id":"change/2","anchor":"change/2"},{"id":"change/3","anchor":"change/3"},{"id":"count/0","anchor":"count/0"},{"id":"count/1","anchor":"count/1"},{"id":"create/1","anchor":"create/1"},{"id":"create/2","anchor":"create/2"},{"id":"delete/1","anchor":"delete/1"},{"id":"delete/2","anchor":"delete/2"},{"id":"delete_all/0","anchor":"delete_all/0"},{"id":"delete_all/1","anchor":"delete_all/1"},{"id":"list/1","anchor":"list/1"},{"id":"list/2","anchor":"list/2"}]},{"id":"Stripe.Subscriptions","title":"Stripe.Subscriptions","functions":[{"id":"all/3","anchor":"all/3"},{"id":"all/4","anchor":"all/4"},{"id":"cancel/3","anchor":"cancel/3"},{"id":"cancel/4","anchor":"cancel/4"},{"id":"cancel_all/2","anchor":"cancel_all/2"},{"id":"cancel_all/3","anchor":"cancel_all/3"},{"id":"change/3","anchor":"change/3"},{"id":"change/4","anchor":"change/4"},{"id":"change_payment_source/3","anchor":"change_payment_source/3"},{"id":"count/1","anchor":"count/1"},{"id":"count/2","anchor":"count/2"},{"id":"create/2","anchor":"create/2"},{"id":"create/3","anchor":"create/3"},{"id":"get/2","anchor":"get/2"},{"id":"get/3","anchor":"get/3"}]},{"id":"Stripe.Supervisor","title":"Stripe.Supervisor","functions":[{"id":"init/1","anchor":"init/1"},{"id":"start_link/0","anchor":"start_link/0"}]},{"id":"Stripe.Tokens","title":"Stripe.Tokens","functions":[{"id":"create/1","anchor":"create/1"},{"id":"create/2","anchor":"create/2"},{"id":"get/1","anchor":"get/1"},{"id":"get/2","anchor":"get/2"}]},{"id":"Stripe.URI","title":"Stripe.URI","functions":[{"id":"encode_query/1","anchor":"encode_query/1"}]},{"id":"Stripe.Util","title":"Stripe.Util","functions":[{"id":"count/1","anchor":"count/1"},{"id":"count/2","anchor":"count/2"},{"id":"datetime_from_timestamp/1","anchor":"datetime_from_timestamp/1"},{"id":"handle_stripe_full_response/1","anchor":"handle_stripe_full_response/1"},{"id":"handle_stripe_response/1","anchor":"handle_stripe_response/1"},{"id":"list/3","anchor":"list/3"},{"id":"list/4","anchor":"list/4"},{"id":"list_raw/3","anchor":"list_raw/3"},{"id":"list_raw/4","anchor":"list_raw/4"},{"id":"string_map_to_atoms/1","anchor":"string_map_to_atoms/1"}]}],"protocols":[]} \ No newline at end of file diff --git a/doc/extra-api-reference.html b/doc/extra-api-reference.html index 0fed13bb..150d600b 100644 --- a/doc/extra-api-reference.html +++ b/doc/extra-api-reference.html @@ -4,7 +4,7 @@ - API Reference – stripity_stripe v0.3.0 + API Reference – stripity_stripe v1.3.0 @@ -28,7 +28,7 @@

stripity_stripe

@@ -78,18 +78,71 @@

Modules

A HTTP client for Stripe

+
+
+ + +

Main API for working with Customers at Stripe. Through this API you can: +-create accounts +-get single account +-delete single account +-delete all account +-count account

+
+ +
+
+ + +

Main API for working with Cards at Stripe. Through this API you can: +-create cards for a customer +-delete cards for a customer +-delete all cards for a customer +-list cards for a customer +-count cards for a customer

+
+
-

Handles charges to the Stripe API

+

Handles charges to the Stripe API. +(API ref: https://stripe.com/docs/api#charges)

+
+ +
+
+ + +

Helper module for Connect related features at Stripe. +Through this API you can:

+
    +
  • retrieve the oauth access token or the full response, using the code received from the oauth flow return +
  • +
-

Main API for working with Customers at Stripe. Through this API you can alter subscriptions, create invoices, create and delete customers, etc

+

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

+
+ +
+
+ + +

Main API for working with Events at Stripe. Through this API you can: +-list/search events (last 30 days guaranteed to be available) +-retrieve event from id +-count number of events stored currently on stripe

@@ -99,6 +152,17 @@

Modules

The API for tacking on charges to subscriptions. See Stripe docs for more details

+
+
+ + +

Main API for working with Invoices at Stripe. Through this API you can: +-create +-retrieve single +-list (paged, 100 max/page) +-count

+
+
@@ -106,10 +170,43 @@

Modules

Basic List, Create, Delete API for Plans

+
+
+ + +

Main API for working with Subscriptions at Stripe. Through this API you can:

+
    +
  • create +
  • +
  • change +
  • +
  • retrieve +
  • +
  • cancel +
  • +
  • cancel_all +
  • +
  • list all +
  • +
  • count all +
  • +
+
+
+
+ + +

API for working with Tokens at Stripe. Through this API you can: +-create +-retrieve +tokens for both credit card and bank account allowing you to use them instead of a credit card number in various operations

+
+
diff --git a/doc/index.html b/doc/index.html index 2be5ea4e..14aeae06 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,7 +2,7 @@ - stripity_stripe v0.3.0 – Documentation + stripity_stripe v1.3.0 – Documentation