Class: DoorLoop::Accounts
- Inherits:
-
Object
- Object
- DoorLoop::Accounts
- Defined in:
- lib/doorloop/accounts.rb
Instance Method Summary collapse
- #create(params) ⇒ Object
- #delete(id) ⇒ Object
- #find(id) ⇒ Object
-
#initialize(client) ⇒ Accounts
constructor
A new instance of Accounts.
- #list(options = {}) ⇒ Object
- #update(id, params) ⇒ Object
Constructor Details
#initialize(client) ⇒ Accounts
Returns a new instance of Accounts.
5 6 7 |
# File 'lib/doorloop/accounts.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#create(params) ⇒ Object
14 15 16 |
# File 'lib/doorloop/accounts.rb', line 14 def create(params) @client.post('accounts', params) end |
#delete(id) ⇒ Object
26 27 28 |
# File 'lib/doorloop/accounts.rb', line 26 def delete(id) @client.delete("accounts/#{id}") end |
#find(id) ⇒ Object
18 19 20 |
# File 'lib/doorloop/accounts.rb', line 18 def find(id) @client.get("accounts/#{id}") end |
#list(options = {}) ⇒ Object
10 11 12 |
# File 'lib/doorloop/accounts.rb', line 10 def list( = {}) @client.get('accounts', ) end |
#update(id, params) ⇒ Object
22 23 24 |
# File 'lib/doorloop/accounts.rb', line 22 def update(id, params) @client.put("accounts/#{id}", params) end |