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
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.
Example
{:ok, plan} = Stripe.Plans.change("test-plan",[name: "Other Plan"])
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"]
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
Deletes a Plan with the specified ID.
Example
{:ok, res} = Stripe.Plans.delete "test-plan"
Deletes a Plan with the specified ID using the given key.
Example
{:ok, res} = Stripe.Plans.delete "test-plan", key