Class: Myfinance::Resources::BankStatement

Inherits:
Base
  • Object
show all
Defined in:
lib/myfinance/resources/bank_statement.rb

Instance Attribute Summary

Attributes inherited from Base

#http

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Myfinance::Resources::Base

Instance Method Details

#import(entity_id, deposit_account_id, file) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/myfinance/resources/bank_statement.rb', line 4

def import(entity_id, , file)
  path = "/entities/#{entity_id}/deposit_accounts/#{}/bank_statements"
  params = { file: file }
  http.post(path, body: { bank_statement: params }, multipart: true) do |response|
    respond_with_object(response, "bank_statement")
  end
end

#status(entity_id, deposit_account_id, id) ⇒ Object



12
13
14
15
16
17
# File 'lib/myfinance/resources/bank_statement.rb', line 12

def status(entity_id, , id)
  path = "/entities/#{entity_id}/deposit_accounts/#{}/bank_statements/#{id}"
  http.get(path) do |response|
    respond_with_object(response, "bank_statement")
  end
end