Module: Flinks::API::Statement
- Included in:
- Client
- Defined in:
- lib/flinks/api/statement.rb
Constant Summary collapse
- StatementRequestSchema =
Dry::Validation.Schema do optional(:accounts_filter).each(:str?) optional(:number_of_statements).included_in?(['MostRecent', 'Months3', 'Months12']) optional(:most_recent).maybe(:bool?) optional(:most_recent_cached).maybe(:bool?) end
Instance Method Summary collapse
Instance Method Details
#statements(options: {}) ⇒ Hash
15 16 17 18 19 20 |
# File 'lib/flinks/api/statement.rb', line 15 def statements(options: {}) payload = StatementRequestSchema.call() raise ArgumentError, (payload) unless payload.success? post("#{customer_id}/BankingServices/GetStatements", body: payload.to_h) end |
#statements_async(request_id:) ⇒ Hash
25 26 27 |
# File 'lib/flinks/api/statement.rb', line 25 def statements_async(request_id:) get("#{customer_id}/BankingServices/GetStatementsAsync/#{request_id}") end |