stripity_stripe v1.6.0 Stripe.Plans

Basic List, Create, Delete API for Plans

Summary

Functions

List all plans. ##Example

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

List all plans w/ given key. ##Example

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

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

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”

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

Returns a list of Plans

Returns a list of Plans using the given key

Returns a single Plan using the given Plan ID

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)

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

Example

  {:ok, plan} = Stripe.Plans.change("test-plan",[name: "Other Plan"])
change(id, params, key)
count()
count(key)
create(params)

Creates a Plan. 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"]
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)

Deletes a Plan with the specified ID.

Example

  {:ok, res} = Stripe.Plans.delete "test-plan"
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(limit \\ 10)

Returns a list of Plans.

list(key, limit)

Returns a list of Plans using the given key.

retrieve(id)
retrieve(id, key)

Returns a single Plan using the given Plan ID.