atrium-ruby 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/all_endpoints.rb +28 -30
- data/examples/multi_factor_authentication.rb +1 -1
- data/lib/atrium/member.rb +4 -1
- data/lib/atrium/transaction.rb +1 -0
- data/lib/atrium/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d506418fe82513fabee6d6d9d2274331ad68bd0
|
4
|
+
data.tar.gz: 92ef6af4996a12e0ac87b9ee3f6372750e56be19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70ebbf60fdf8cdf7de7b1d18c32ab811627f7699e1c8efc6b03aedcd849da3fbed95da02e4bd70bda02e9ebc5cacd21a42eee2ee68d2191b26a4096ec70c7266
|
7
|
+
data.tar.gz: 8331ff2b1c0e440ef827847f0bc49d6347b34f9e7a59ff92229e306d894a556d3dae0688b18b4c24fb1b75862f976ab0d172d810c65d07b3605abd780fb84d16
|
data/examples/all_endpoints.rb
CHANGED
@@ -7,23 +7,23 @@ require "atrium"
|
|
7
7
|
end
|
8
8
|
|
9
9
|
puts "\n************************** Create User **************************"
|
10
|
-
user = ::Atrium::User.create :identifier =>
|
11
|
-
puts user.
|
10
|
+
user = ::Atrium::User.create :identifier => nil, :is_disabled => "", :metadata => "{\"first_name\": \"Steven\"}"
|
11
|
+
puts user.attributes
|
12
12
|
user_guid = user.guid
|
13
13
|
|
14
14
|
puts "\n************************** Read User **************************"
|
15
15
|
user = ::Atrium::User.read :guid => user_guid
|
16
|
-
puts user.
|
16
|
+
puts user.attributes
|
17
17
|
|
18
18
|
puts "\n************************** Update User **************************"
|
19
19
|
user = ::Atrium::User.read :guid => user_guid
|
20
20
|
user = user.update :metadata => "{\"first_name\": \"Steven\", \"last_name\": \"Universe\"}"
|
21
|
-
puts user.
|
21
|
+
puts user.attributes
|
22
22
|
|
23
23
|
puts "\n************************** List Users **************************"
|
24
24
|
users = ::Atrium::User.list
|
25
25
|
users.each do |a_user|
|
26
|
-
puts a_user.
|
26
|
+
puts a_user.attributes
|
27
27
|
end
|
28
28
|
|
29
29
|
puts "\n************************** List Institutions **************************"
|
@@ -31,17 +31,17 @@ name = "bank"
|
|
31
31
|
params = { :name => name }
|
32
32
|
institutions = ::Atrium::Institution.list :query_params => params
|
33
33
|
institutions.each do |institution|
|
34
|
-
puts institution.
|
34
|
+
puts institution.attributes
|
35
35
|
end
|
36
36
|
|
37
37
|
puts "\n************************** Read Institution **************************"
|
38
38
|
institution = ::Atrium::Institution.read :institution_code => "mxbank"
|
39
|
-
puts institution.
|
39
|
+
puts institution.attributes
|
40
40
|
|
41
41
|
puts "\n************************** Read Institution Credentials ************************** "
|
42
42
|
credentials = ::Atrium::Institution.credentials "mxbank"
|
43
43
|
credentials.each do |credential|
|
44
|
-
puts credential.
|
44
|
+
puts credential.attributes
|
45
45
|
end
|
46
46
|
|
47
47
|
puts "\n************************** Create Member **************************"
|
@@ -61,12 +61,12 @@ credential_array.push(credential_one)
|
|
61
61
|
credential_array.push(credential_two)
|
62
62
|
|
63
63
|
member = ::Atrium::Member.create :user_guid => user_guid, :institution_code => "mxbank", :credentials => credential_array
|
64
|
-
puts member.
|
64
|
+
puts member.attributes
|
65
65
|
member_guid = member.guid
|
66
66
|
|
67
67
|
puts "\n************************** Read Member **************************"
|
68
68
|
member = ::Atrium::Member.read :user_guid => user_guid, :member_guid => member_guid
|
69
|
-
puts member.
|
69
|
+
puts member.attributes
|
70
70
|
|
71
71
|
puts "\n************************** Update Member **************************"
|
72
72
|
member = ::Atrium::Member.read :user_guid => user_guid, :member_guid => member_guid
|
@@ -84,30 +84,30 @@ updated_credentials.push(username_credential)
|
|
84
84
|
updated_credentials.push(password_credential)
|
85
85
|
|
86
86
|
member = member.update(:metadata => "{\"credentials_last_refreshed_at\": \"2015-10-16\"}", :credentials => updated_credentials)
|
87
|
-
puts member.
|
87
|
+
puts member.attributes
|
88
88
|
|
89
89
|
puts "\n************************** List Members **************************"
|
90
90
|
members = ::Atrium::Member.list :user_guid => user_guid
|
91
91
|
members.each do |a_member|
|
92
|
-
puts a_member.
|
92
|
+
puts a_member.attributes
|
93
93
|
end
|
94
94
|
|
95
95
|
puts "\n************************** Aggregate Member **************************"
|
96
96
|
member = ::Atrium::Member.read :user_guid => user_guid, :member_guid => member_guid
|
97
97
|
member = member.aggregate
|
98
|
-
puts member.
|
98
|
+
puts member.attributes
|
99
99
|
|
100
100
|
puts "\n************************** Read Member Status **************************"
|
101
101
|
sleep(5)
|
102
102
|
member = ::Atrium::Member.read :user_guid => user_guid, :member_guid => member_guid
|
103
103
|
member = member.aggregation_status
|
104
|
-
puts member.
|
104
|
+
puts member.attributes
|
105
105
|
|
106
106
|
puts "\n************************** List Member MFA Challenges **************************"
|
107
107
|
member = ::Atrium::Member.read :user_guid => user_guid, :member_guid => member_guid
|
108
|
-
challenges = member.
|
108
|
+
challenges = member.mfa_challenges
|
109
109
|
challenges.each do |challenge|
|
110
|
-
puts challenge.
|
110
|
+
puts challenge.attributes
|
111
111
|
end
|
112
112
|
challenge_guid = challenges[0].guid
|
113
113
|
|
@@ -122,13 +122,13 @@ challenge_responses = []
|
|
122
122
|
challenge_responses.push(credential_one)
|
123
123
|
|
124
124
|
member = member.resume challenge_responses
|
125
|
-
puts member.
|
125
|
+
puts member.attributes
|
126
126
|
|
127
127
|
puts "\n************************** List Member Credentials **************************"
|
128
128
|
member = ::Atrium::Member.read :user_guid => user_guid, :member_guid => member_guid
|
129
129
|
credentials = member.credentials
|
130
130
|
credentials.each do |credential|
|
131
|
-
puts credential.
|
131
|
+
puts credential.attributes
|
132
132
|
end
|
133
133
|
|
134
134
|
puts "\n************************** List Member Accounts **************************"
|
@@ -136,7 +136,7 @@ sleep(5)
|
|
136
136
|
member = ::Atrium::Member.read :user_guid => user_guid, :member_guid => member_guid
|
137
137
|
accounts = member.accounts
|
138
138
|
accounts.each do |account|
|
139
|
-
puts account.
|
139
|
+
puts account.attributes
|
140
140
|
end
|
141
141
|
account_guid = accounts[0].guid
|
142
142
|
|
@@ -144,19 +144,19 @@ puts "\n************************** List Member Transactions ********************
|
|
144
144
|
member = ::Atrium::Member.read :user_guid => user_guid, :member_guid => member_guid
|
145
145
|
transactions = member.transactions
|
146
146
|
transactions.each do |transaction|
|
147
|
-
puts transaction.
|
147
|
+
puts transaction.attributes
|
148
148
|
end
|
149
149
|
|
150
150
|
puts "\n************************** Read Account **************************"
|
151
151
|
account = ::Atrium::Account.read :user_guid => user_guid, :account_guid => account_guid
|
152
|
-
puts account.
|
152
|
+
puts account.attributes
|
153
153
|
|
154
154
|
puts "\n************************** List Accounts for User **************************"
|
155
155
|
user_guid = user_guid
|
156
156
|
params = { :user_guid => user_guid }
|
157
157
|
accounts = ::Atrium::Account.list params
|
158
158
|
accounts.each do |an_account|
|
159
|
-
puts an_account.
|
159
|
+
puts an_account.attributes
|
160
160
|
end
|
161
161
|
|
162
162
|
puts "\n************************** List Account Transactions **************************"
|
@@ -168,13 +168,13 @@ params = { :user_guid => user_guid, :guid => guid }
|
|
168
168
|
|
169
169
|
transactions = account.transactions params
|
170
170
|
transactions.each do |transaction|
|
171
|
-
puts transaction.
|
171
|
+
puts transaction.attributes
|
172
172
|
end
|
173
173
|
transaction_guid = transactions[0].guid
|
174
174
|
|
175
175
|
puts "\n************************** Read a Transaction **************************"
|
176
176
|
transaction = ::Atrium::Transaction.read :user_guid => user_guid, :transaction_guid => transaction_guid
|
177
|
-
puts transaction.
|
177
|
+
puts transaction.attributes
|
178
178
|
|
179
179
|
puts "\n************************** List Transactions **************************"
|
180
180
|
user_guid = user_guid
|
@@ -183,19 +183,17 @@ params = { :user_guid => user_guid, :account_guid => account_guid }
|
|
183
183
|
|
184
184
|
transactions = ::Atrium::Transaction.list params
|
185
185
|
transactions.each do |a_transaction|
|
186
|
-
puts a_transaction.
|
186
|
+
puts a_transaction.attributes
|
187
187
|
end
|
188
188
|
|
189
189
|
puts "\n************************** Connect Widget **************************"
|
190
190
|
widget = ::Atrium::Connect.create :user_guid => user_guid
|
191
|
-
puts widget.
|
191
|
+
puts widget.attributes
|
192
192
|
|
193
193
|
puts "\n************************** Delete Member **************************"
|
194
194
|
member = ::Atrium::Member.read :user_guid => user_guid, :member_guid => member_guid
|
195
|
-
|
196
|
-
puts response.attributes
|
195
|
+
puts member.delete
|
197
196
|
|
198
197
|
puts "\n************************** Delete User **************************"
|
199
198
|
user = ::Atrium::User.read :guid => user_guid
|
200
|
-
|
201
|
-
puts response.attributes
|
199
|
+
puts user.delete
|
@@ -32,7 +32,7 @@ aggregation_response = member.aggregation_status
|
|
32
32
|
puts "Member aggregation status: " + aggregation_response.status
|
33
33
|
|
34
34
|
puts "\n* MFA Challenge *"
|
35
|
-
challenges = member.
|
35
|
+
challenges = member.mfa_challenges
|
36
36
|
challenges.each do |challenge|
|
37
37
|
puts challenge.label
|
38
38
|
end
|
data/lib/atrium/member.rb
CHANGED
@@ -4,7 +4,10 @@ module Atrium
|
|
4
4
|
include ::ActiveAttr::Model
|
5
5
|
|
6
6
|
attribute :aggregated_at
|
7
|
+
attribute :challenges
|
7
8
|
attribute :guid
|
9
|
+
attribute :has_processed_accounts
|
10
|
+
attribute :has_processed_transactions
|
8
11
|
attribute :identifier
|
9
12
|
attribute :institution_code
|
10
13
|
attribute :metadata
|
@@ -84,7 +87,7 @@ module Atrium
|
|
84
87
|
self
|
85
88
|
end
|
86
89
|
|
87
|
-
def
|
90
|
+
def mfa_challenges
|
88
91
|
endpoint = "/users/#{user_guid}/members/#{guid}/challenges"
|
89
92
|
challenge_response = ::Atrium.client.make_request(:get, endpoint)
|
90
93
|
|
data/lib/atrium/transaction.rb
CHANGED
data/lib/atrium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atrium-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Carstens, Dan Jones, Zach Toolson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_attr
|