payjp v0.1.1 Payjp.Plans
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
https://pay.jp/docs/api/#plan-プラン
Summary
Functions
List all plans. ##Example
{:ok, plans} = Payjp.Plans.all
List all plans w/ given key. ##Example
{:ok, plans} = Payjp.Plans.all key
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
Example
Payjp.Plans.delete_all
Deletes all Plans w/given key
Example
Payjp.Plans.delete_all key
Retrieves a given Plan with the specified ID. Returns 404 if not found.
Example
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
Returns a list of Plans
Returns a list of Plans using the given key
Returns a single Plan using the given Plan ID
Functions
Changes Plan information. See Payjp docs as to what you can change.
Example
{:ok, plan} = Payjp.Plans.change("test-plan",[name: "Other Plan"])
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"]
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
Deletes a Plan with the specified ID using the given key.
Example
{:ok, res} = Payjp.Plans.delete "test-plan", key
Retrieves a given Plan with the specified ID. Returns 404 if not found.
Example
{:ok, cust} = Payjp.Plans.get "plan_id"
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