Class: Alegra::BankAccounts

Inherits:
Record
  • Object
show all
Defined in:
lib/alegra/bank_accounts.rb

Instance Attribute Summary

Attributes inherited from Record

#client

Instance Method Summary collapse

Methods inherited from Record

#initialize

Constructor Details

This class inherits a constructor from Alegra::Record

Instance Method Details

#create(params, options = { format: :formated }) ⇒ Object



11
12
13
14
# File 'lib/alegra/bank_accounts.rb', line 11

def create(params, options = { format: :formated })
  params = params.deep_camel_case_lower_keys
  client.post('bank-accounts', params, options)
end

#find(id, options = { format: :formated }) ⇒ Object



7
8
9
# File 'lib/alegra/bank_accounts.rb', line 7

def find(id, options = { format: :formated })
  client.get("bank-accounts/#{id}", {}, options)
end

#list(options = { format: :formated }) ⇒ Object



3
4
5
# File 'lib/alegra/bank_accounts.rb', line 3

def list(options = { format: :formated })
  client.get('bank-accounts', {}, options)
end

#transfer(id, params, options = { format: :formated }) ⇒ Object



16
17
18
19
# File 'lib/alegra/bank_accounts.rb', line 16

def transfer(id, params, options = { format: :formated })
  params = params.deep_camel_case_lower_keys
  client.post("bank-accounts/#{id}/transfer", params, options)
end