Class: Finicity::Resources::Account
- Inherits:
-
Base
- Object
- Base
- Finicity::Resources::Account
show all
- Defined in:
- lib/finicity/resources/account.rb
Instance Attribute Summary
Attributes inherited from Base
#customer_id
Instance Method Summary
collapse
Methods inherited from Base
#initialize, request
Instance Method Details
#activate(institution_id, accounts) ⇒ Object
25
26
27
28
29
|
# File 'lib/finicity/resources/account.rb', line 25
def activate(institution_id, accounts)
endpoint = "/aggregation/v2/customers/#{customer_id}/institutions/#{institution_id}/accounts"
request(:put, endpoint, body: { accounts: accounts })
end
|
#add_all(institution_id, credentials) ⇒ Object
4
5
6
7
8
9
|
# File 'lib/finicity/resources/account.rb', line 4
def add_all(institution_id, credentials)
endpoint = "/aggregation/v1/customers/#{customer_id}/institutions/#{institution_id}/accounts/addall"
body = { credentials: credentials }
request(:post, endpoint, body: body)
end
|
#add_all_mfa(institution_id, mfa_session, questions) ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/finicity/resources/account.rb', line 11
def add_all_mfa(institution_id, mfa_session, questions)
endpoint = "/aggregation/v1/customers/#{customer_id}/institutions/#{institution_id}/accounts/addall/mfa"
body = { mfa_challenges: { questions: questions } }
= { "MFA-Session" => mfa_session }
request(:post, endpoint, body: body, headers: )
end
|
#credentials(account_id) ⇒ Object
58
59
60
61
62
|
# File 'lib/finicity/resources/account.rb', line 58
def credentials(account_id)
endpoint = "/aggregation/v1/customers/#{customer_id}/accounts/#{account_id}/loginForm"
request(:get, endpoint)
end
|
#delete(account_id) ⇒ Object
52
53
54
55
56
|
# File 'lib/finicity/resources/account.rb', line 52
def delete(account_id)
endpoint = "/aggregation/v1/customers/#{customer_id}/accounts/#{account_id}"
request(:delete, endpoint)
end
|
#get(account_id) ⇒ Object
46
47
48
49
50
|
# File 'lib/finicity/resources/account.rb', line 46
def get(account_id)
endpoint = "/aggregation/v1/customers/#{customer_id}/accounts/#{account_id}"
request(:get, endpoint)
end
|
#list ⇒ Object
19
20
21
22
23
|
# File 'lib/finicity/resources/account.rb', line 19
def list
endpoint = "/aggregation/v1/customers/#{customer_id}/accounts"
request(:get, endpoint)
end
|
#owner_verification(account_id) ⇒ Object
71
72
73
74
75
|
# File 'lib/finicity/resources/account.rb', line 71
def owner_verification(account_id)
endpoint = "/decisioning/v1/customers/#{customer_id}/accounts/#{account_id}/owner"
request(:get, endpoint)
end
|
#owner_verification_mfa(account_id, mfa_session, questions) ⇒ Object
77
78
79
80
81
82
83
84
|
# File 'lib/finicity/resources/account.rb', line 77
def owner_verification_mfa(account_id, mfa_session, questions)
endpoint = "/decisioning/v1/customers/#{customer_id}/accounts/#{account_id}/owner/mfa"
body = { questions: questions }
= { "MFA-Session" => mfa_session }
request(:post, endpoint, body: body, headers: )
end
|
#refresh(institution_login_id) ⇒ Object
31
32
33
34
35
|
# File 'lib/finicity/resources/account.rb', line 31
def refresh(institution_login_id)
endpoint = "/aggregation/v1/customers/#{customer_id}/institutionLogins/#{institution_login_id}/accounts"
request(:post, endpoint)
end
|
#refresh_mfa(institution_login_id, mfa_session, questions) ⇒ Object
37
38
39
40
41
42
43
44
|
# File 'lib/finicity/resources/account.rb', line 37
def refresh_mfa(institution_login_id, mfa_session, questions)
endpoint = "/aggregation/v1/customers/#{customer_id}/institutionLogins/#{institution_login_id}/accounts/mfa"
body = { questions: questions }
= { "MFA-Session" => mfa_session }
request(:post, endpoint, body: body, headers: )
end
|
#update_credentials(institution_login_id, credentials) ⇒ Object
64
65
66
67
68
69
|
# File 'lib/finicity/resources/account.rb', line 64
def update_credentials(institution_login_id, credentials)
endpoint = "/aggregation/v1/customers/#{customer_id}/institutionLogins/#{institution_login_id}"
body = { login_form: credentials }
request(:put, endpoint, body: body)
end
|