Module: IContact::Api::Accounts

Included in:
IContact::Api
Defined in:
lib/icontact/api/accounts.rb

Instance Method Summary collapse

Instance Method Details

#get_account(id) ⇒ Object



5
6
7
8
9
# File 'lib/icontact/api/accounts.rb', line 5

def (id)
  ensure_valid_id(id)
  response = get(accounts_path + id)
  resource(response, 'account')
end

#get_accountsObject



11
12
13
14
# File 'lib/icontact/api/accounts.rb', line 11

def get_accounts
  response  = get(accounts_path)
  resource(response, 'accounts')
end

#update_account(id, data) ⇒ Object



16
17
18
19
20
# File 'lib/icontact/api/accounts.rb', line 16

def (id, data)
  ensure_valid_id(id)
  response = post(accounts_path + id, data)
  resource(response, 'account')
end