Class: Mpayer::Payable
Instance Attribute Summary
Attributes inherited from Base
#base_url, #mpayer_token, #user_no
Instance Method Summary collapse
-
#all ⇒ Object
GET /payables/all.json.
-
#create_payable(json_body) ⇒ Object
POST /payables.
-
#delete(id) ⇒ Object
DELETE /payables/id.
-
#get_by_ids(ids) ⇒ Object
GET /payables/all.json?payable_ids=#idsids.join(‘,’).
-
#payable_items(account_id) ⇒ Object
GET /accounts/:account_id/payable_items.json?per_page=100.
Methods inherited from Base
#auth, #get, #initialize, #parse_api_response, #post, #put
Constructor Details
This class inherits a constructor from Mpayer::Base
Instance Method Details
#all ⇒ Object
GET /payables/all.json
5 6 7 |
# File 'lib/mpayer/payable.rb', line 5 def all get('/payables/all.json') end |
#create_payable(json_body) ⇒ Object
POST /payables
11 12 13 |
# File 'lib/mpayer/payable.rb', line 11 def create_payable(json_body) post('/payables', json_body) end |
#delete(id) ⇒ Object
DELETE /payables/id
17 18 19 |
# File 'lib/mpayer/payable.rb', line 17 def delete(id) delete("/payables/#{id}") end |
#get_by_ids(ids) ⇒ Object
GET /payables/all.json?payable_ids=#Mpayer::Payable.idsids.join(‘,’)
23 24 25 |
# File 'lib/mpayer/payable.rb', line 23 def get_by_ids(ids) get("/payables/all.json?payable_ids=#{ids.join(',')}") end |
#payable_items(account_id) ⇒ Object
GET /accounts/:account_id/payable_items.json?per_page=100
29 30 31 |
# File 'lib/mpayer/payable.rb', line 29 def payable_items(account_id) get("/accounts/#{account_id}/payable_items.json?", 100) end |