Module: Shushu::AcctOwn
Instance Method Summary collapse
Instance Method Details
#acct_own_url(payment_method_id, entity_id) ⇒ Object
21 22 23 |
# File 'lib/models/acct_own.rb', line 21 def acct_own_url(payment_method_id, entity_id) [Shushu.url, "/payment_methods/#{payment_method_id}/account_ownerships/#{entity_id}"].join end |
#act(args) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/models/acct_own.rb', line 5 def act(args) pmid , eid = args.delete(:payment_method_id), args.delete(:entity_id) args[:state] = "active" Shushu.handle_req do RestClient.put(acct_own_url(pmid, eid), args, Shushu.headers) end end |
#deact(args) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/models/acct_own.rb', line 13 def deact(args) pmid, eid = args.delete(:payment_method_id), args.delete(:entity_id) args[:state] = "inactive" Shushu.handle_req do RestClient.put(acct_own_url(pmid, eid), args, Shushu.headers) end end |