Module: Flinks::API::Account
- Included in:
- Client
- Defined in:
- lib/flinks/api/account.rb
Constant Summary collapse
- AccountSummaryRequestSchema =
Dry::Validation.Schema do required(:request_id).filled(:str?) optional(:direct_refresh).filled(:bool?) optional(:with_balance).filled(:bool?) optional(:with_transactions).filled(:bool?) optional(:with_account_identity).filled(:bool?) optional(:most_recent).filled(:bool?) optional(:most_recent_cached).filled(:bool?) end
- AccountDetailRequestSchema =
Dry::Validation.Schema do required(:request_id).filled(:str?) optional(:with_account_identity).filled(:bool?) optional(:with_kyc).filled(:bool?) optional(:with_transactions).filled(:bool?) optional(:with_balance).filled(:bool?) optional(:get_mfa_questions_answers).filled(:bool?) optional(:date_from).filled(:date?) optional(:date_to) { date? | date_time? } optional(:accounts_filter).each(:str?) optional(:refresh_delta).each do schema do required(:account_id).filled(:str?) required(:transaction_id).filled(:str?) end end optional(:days_of_transactions).included_in?(['Days90', 'Days360']) optional(:most_recent).filled(:bool?) optional(:most_recent_cached).filled(:bool?) end
Instance Method Summary collapse
- #accounts_detail(request_id:, options: {}) ⇒ Hash
- #accounts_detail_async(request_id:) ⇒ Hash
- #accounts_summary(request_id:, options: {}) ⇒ Hash
- #accounts_summary_async(request_id:) ⇒ Hash
Instance Method Details
#accounts_detail(request_id:, options: {}) ⇒ Hash
56 57 58 59 60 61 |
# File 'lib/flinks/api/account.rb', line 56 def accounts_detail(request_id:, options: {}) payload = .merge(request_id: request_id) validate_request!(AccountDetailRequestSchema, payload) post("#{customer_id}/BankingServices/GetAccountsDetail", body: payload) end |
#accounts_detail_async(request_id:) ⇒ Hash
73 74 75 |
# File 'lib/flinks/api/account.rb', line 73 def accounts_detail_async(request_id:) get("#{customer_id}/BankingServices/GetAccountsDetailAsync/#{request_id}") end |
#accounts_summary(request_id:, options: {}) ⇒ Hash
45 46 47 48 49 50 |
# File 'lib/flinks/api/account.rb', line 45 def accounts_summary(request_id:, options: {}) payload = .merge(request_id: request_id) validate_request!(AccountSummaryRequestSchema, payload) post("#{customer_id}/BankingServices/GetAccountsSummary", body: payload) end |
#accounts_summary_async(request_id:) ⇒ Hash
66 67 68 |
# File 'lib/flinks/api/account.rb', line 66 def accounts_summary_async(request_id:) get("#{customer_id}/BankingServices/GetAccountsSummaryAsync/#{request_id}") end |