Payjp.Plans (payjp v0.1.6)
Basic List, Create, Delete API for Plans
- create a plan
- get a plan
- update a plan
- delete a single plan
- delete all plan
- list plans
- get all plans
Link to this section Summary
Functions
List all plans. ##Example
List all plans w/ given key. ##Example
Changes Plan information. See Payjp docs as to what you can change.
Creates a Plan. Note that currency
and interval
are required parameters, and are defaulted to "JPY" and "month"
Creates a Plan using a given key. Note that currency
and interval
are required parameters, and are defaulted to "JPY" and "month"
Deletes a Plan with the specified ID.
Deletes a Plan with the specified ID using the given key.
Deletes all Plans
Deletes all Plans w/given key
Retrieves a given Plan with the specified ID. Returns 404 if not found.
Retrieves a given Plan with the specified ID. Returns 404 if not found. Using a given payjp key to apply against the account associated.
Returns a list of Plans.
Returns a list of Plans using the given key.
Returns a single Plan using the given Plan ID.
Link to this section Functions
all(accum \\ [], opts \\ [limit: 100])
List all plans. ##Example
{:ok, plans} = Payjp.Plans.all
all(key, accum, opts)
List all plans w/ given key. ##Example
{:ok, plans} = Payjp.Plans.all key
change(id, params)
Changes Plan information. See Payjp docs as to what you can change.
Example
{:ok, plan} = Payjp.Plans.change("test-plan",[name: "Other Plan"])
change(id, params, key)
create(params)
Creates a Plan. Note that currency
and interval
are required parameters, and are defaulted to "JPY" and "month"
Example
{:ok, plan} = Payjp.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 "JPY" and "month"
Example
{:ok, plan} = Payjp.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} = Payjp.Plans.delete "test-plan"
delete(id, key)
Deletes a Plan with the specified ID using the given key.
Example
{:ok, res} = Payjp.Plans.delete "test-plan", key
delete_all()
Deletes all Plans
Example
Payjp.Plans.delete_all
delete_all(key)
Deletes all Plans w/given key
Example
Payjp.Plans.delete_all key
get(id)
Retrieves a given Plan with the specified ID. Returns 404 if not found.
Example
{:ok, cust} = Payjp.Plans.get "plan_id"
get(id, key)
Retrieves a given Plan with the specified ID. Returns 404 if not found. Using a given payjp key to apply against the account associated.
Example
{:ok, cust} = Payjp.Plans.get "plan_id", key
list(limit \\ 10)
Returns a list of Plans.
Example
{:ok, plans} = Payjp.Plans.list
{:ok, plans} = Payjp.Plans.list(20)
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.