Class: Moip2::BankAccountsApi
- Inherits:
-
Object
- Object
- Moip2::BankAccountsApi
- Defined in:
- lib/moip2/bank_accounts_api.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #create(account_id, bank_account) ⇒ Object
- #delete(bank_account_id) ⇒ Object
- #find_all(account_id) ⇒ Object
-
#initialize(client) ⇒ BankAccountsApi
constructor
A new instance of BankAccountsApi.
- #show(bank_account_id) ⇒ Object
- #update(bank_account_id, bank_account) ⇒ Object
Constructor Details
#initialize(client) ⇒ BankAccountsApi
Returns a new instance of BankAccountsApi.
5 6 7 |
# File 'lib/moip2/bank_accounts_api.rb', line 5 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/moip2/bank_accounts_api.rb', line 3 def client @client end |
Instance Method Details
#create(account_id, bank_account) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/moip2/bank_accounts_api.rb', line 9 def create(account_id, bank_account) Resource::BankAccount.new client, client.post( base_account_path(account_id), bank_account, ) end |
#delete(bank_account_id) ⇒ Object
22 23 24 25 26 |
# File 'lib/moip2/bank_accounts_api.rb', line 22 def delete(bank_account_id) Resource::BankAccount.new client, client.delete( base_bank_account_path(bank_account_id), ) end |
#find_all(account_id) ⇒ Object
35 36 37 38 39 |
# File 'lib/moip2/bank_accounts_api.rb', line 35 def find_all(account_id) Resource::BankAccount.new client, client.get( base_account_path(account_id), ) end |
#show(bank_account_id) ⇒ Object
16 17 18 19 20 |
# File 'lib/moip2/bank_accounts_api.rb', line 16 def show(bank_account_id) Resource::BankAccount.new client, client.get( base_bank_account_path(bank_account_id), ) end |
#update(bank_account_id, bank_account) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/moip2/bank_accounts_api.rb', line 28 def update(bank_account_id, bank_account) Resource::BankAccount.new client, client.put( base_bank_account_path(bank_account_id), bank_account, ) end |