Class: Plans

Inherits:
OpenPayResource show all
Defined in:
lib/openpay/plans.rb

Instance Attribute Summary

Attributes inherited from OpenPayResource

#api_hook

Instance Method Summary collapse

Methods inherited from OpenPayResource

#delete, #delete_all, #each, #env, #errors?, #get, #get_with_custom_url, #hash2json, #initialize, #json2hash, #list, #post, #put

Constructor Details

This class inherits a constructor from OpenPayResource

Instance Method Details

#all_subscriptions(plan_id) ⇒ Object



13
14
15
# File 'lib/openpay/plans.rb', line 13

def all_subscriptions(plan_id)
  get("#{plan_id}/subscriptions")
end

#each_subscription(plan_id) ⇒ Object



9
10
11
# File 'lib/openpay/plans.rb', line 9

def each_subscription(plan_id)
  get("#{plan_id}/subscriptions")
end

#update(plan, plan_id) ⇒ Object



5
6
7
# File 'lib/openpay/plans.rb', line 5

def update(plan,plan_id)
  put(plan, "#{plan_id}")
end