Module: Vindi::Rest::Plan
- Included in:
- Vindi::Rest
- Defined in:
- lib/vindi/rest/plan.rb
Overview
Methods for the Plans API
Instance Method Summary collapse
-
#create_plan(options = {}) ⇒ Hash
Create a plan for a merchant vindi.
-
#list_plans(options = {}) ⇒ Array<Hash>
List plans for the authenticate user.
-
#plan(plan_id, options = {}) ⇒ Hash
Get a single plan from a merchant.
-
#update_plan(plan_id, options = {}) ⇒ Object
Edit a plan.
Instance Method Details
#create_plan(options = {}) ⇒ Hash
Create a plan for a merchant vindi
35 36 37 |
# File 'lib/vindi/rest/plan.rb', line 35 def create_plan( = {}) post('plans', )[:plan] end |
#list_plans(options = {}) ⇒ Array<Hash>
List plans for the authenticate user
13 14 15 |
# File 'lib/vindi/rest/plan.rb', line 13 def list_plans( = {}) get('plans', )[:plans] end |
#plan(plan_id, options = {}) ⇒ Hash
Get a single plan from a merchant
24 25 26 |
# File 'lib/vindi/rest/plan.rb', line 24 def plan(plan_id, = {}) get("plans/#{plan_id}", )[:plan] end |
#update_plan(plan_id, options = {}) ⇒ Object
Edit a plan
46 47 48 |
# File 'lib/vindi/rest/plan.rb', line 46 def update_plan(plan_id, = {}) put("plans/#{plan_id}", )[:plan] end |