Class: DoorLoop::Accounts

Inherits:
Object
  • Object
show all
Defined in:
lib/doorloop/accounts.rb

Instance Method Summary collapse

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(options = {})
  @client.get('accounts', options)
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