atrium-ruby 1.2.3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/atrium.rb +2 -0
- data/lib/atrium/account.rb +13 -0
- data/lib/atrium/account_number.rb +13 -0
- data/lib/atrium/account_owner.rb +19 -0
- data/lib/atrium/connect.rb +1 -1
- data/lib/atrium/member.rb +44 -0
- data/lib/atrium/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '09cfeddb1e8ef61d59192937280cb22f25bd46cf572d27f385fddd5eff82a4b9'
|
4
|
+
data.tar.gz: 999cb0b047e4188e8f92fc0c551aac375ba30bdca3082172dadc650e83e6499a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b11d5a9e85cf8855d9101d35621161498fdf5cdb6df24e97bae0e06e80c17d765ad1060f4b2fb833160a4ac4fb93539b83e765baa8155051b5c6b95fdf531b0
|
7
|
+
data.tar.gz: 20e3e06cb8bfccfd111877c1797db44ff51c583f06d330fa7bd01f4f2f54790091e579cbdab6c2660eaafc20ce5078d6d9bee32a98f456ca547746588592afbb
|
data/lib/atrium.rb
CHANGED
data/lib/atrium/account.rb
CHANGED
@@ -56,6 +56,19 @@ module Atrium
|
|
56
56
|
::Atrium::Account.new(account_params)
|
57
57
|
end
|
58
58
|
|
59
|
+
def account_numbers
|
60
|
+
endpoint = "/users/#{user_guid}/accounts/#{guid}/account_numbers"
|
61
|
+
account_numbers_response = ::Atrium.client.make_request(:get, endpoint)
|
62
|
+
|
63
|
+
return nil if account_numbers_response.nil?
|
64
|
+
|
65
|
+
account_numbers_params = account_numbers_response["account_numbers"]
|
66
|
+
|
67
|
+
account_numbers_params.map do |account_number|
|
68
|
+
::Atrium::AccountNumber.new(account_number)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
59
72
|
def transactions(options = {})
|
60
73
|
options = _transaction_pagination_options(options)
|
61
74
|
self.class.paginate(options)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Atrium
|
2
|
+
class AccountNumber
|
3
|
+
include ::ActiveAttr::Model
|
4
|
+
include ::ActiveAttr::Attributes
|
5
|
+
|
6
|
+
attribute :guid
|
7
|
+
attribute :user_guid
|
8
|
+
attribute :member_guid
|
9
|
+
attribute :account_guid
|
10
|
+
attribute :account_number
|
11
|
+
attribute :routing_number
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Atrium
|
2
|
+
class AccountOwner
|
3
|
+
include ::ActiveAttr::Model
|
4
|
+
include ::ActiveAttr::Attributes
|
5
|
+
|
6
|
+
attribute :guid
|
7
|
+
attribute :user_guid
|
8
|
+
attribute :member_guid
|
9
|
+
attribute :account_guid
|
10
|
+
attribute :owner_name
|
11
|
+
attribute :address
|
12
|
+
attribute :city
|
13
|
+
attribute :state
|
14
|
+
attribute :postal_code
|
15
|
+
attribute :country
|
16
|
+
attribute :email
|
17
|
+
attribute :phone
|
18
|
+
end
|
19
|
+
end
|
data/lib/atrium/connect.rb
CHANGED
@@ -20,7 +20,7 @@ module Atrium
|
|
20
20
|
# CLASS METHODS
|
21
21
|
#
|
22
22
|
def self.create(user_guid:, options: {})
|
23
|
-
options.
|
23
|
+
options.each_key do |key|
|
24
24
|
fail ArgumentError, "An invalid option was provided: #{key}" unless PERMITTED_CONNECT_CREATE_OPTIONS.include?(key.to_s)
|
25
25
|
end
|
26
26
|
|
data/lib/atrium/member.rb
CHANGED
@@ -171,6 +171,50 @@ module Atrium
|
|
171
171
|
options.merge(:endpoint => endpoint, :resource => "members")
|
172
172
|
end
|
173
173
|
|
174
|
+
def verify
|
175
|
+
endpoint = "/users/#{user_guid}/members/#{guid}/verify"
|
176
|
+
member_response = ::Atrium.client.make_request(:post, endpoint)
|
177
|
+
|
178
|
+
member_params = member_response["member"]
|
179
|
+
assign_attributes(member_params)
|
180
|
+
self
|
181
|
+
end
|
182
|
+
|
183
|
+
def account_numbers
|
184
|
+
endpoint = "/users/#{user_guid}/members/#{guid}/account_numbers"
|
185
|
+
account_numbers_response = ::Atrium.client.make_request(:get, endpoint)
|
186
|
+
|
187
|
+
return nil if account_numbers_response.nil?
|
188
|
+
|
189
|
+
account_numbers_params = account_numbers_response["account_numbers"]
|
190
|
+
|
191
|
+
account_numbers_params.map do |account_number|
|
192
|
+
::Atrium::AccountNumber.new(account_number)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
def identify
|
197
|
+
endpoint = "/users/#{user_guid}/members/#{guid}/identify"
|
198
|
+
member_response = ::Atrium.client.make_request(:post, endpoint)
|
199
|
+
|
200
|
+
member_params = member_response["member"]
|
201
|
+
assign_attributes(member_params)
|
202
|
+
self
|
203
|
+
end
|
204
|
+
|
205
|
+
def account_owners
|
206
|
+
endpoint = "/users/#{user_guid}/members/#{guid}/account_owners"
|
207
|
+
account_owners_response = ::Atrium.client.make_request(:get, endpoint)
|
208
|
+
|
209
|
+
return nil if account_owners_response.nil?
|
210
|
+
|
211
|
+
account_owners_params = account_owners_response["account_owners"]
|
212
|
+
|
213
|
+
account_owners_params.map do |account_owner|
|
214
|
+
::Atrium::AccountOwner.new(account_owner)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
174
218
|
##
|
175
219
|
# PRIVATE CLASS METHODS
|
176
220
|
#
|
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.3.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: 2018-03
|
11
|
+
date: 2018-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_attr
|
@@ -175,6 +175,8 @@ files:
|
|
175
175
|
- examples/user_and_member_creation.rb
|
176
176
|
- lib/atrium.rb
|
177
177
|
- lib/atrium/account.rb
|
178
|
+
- lib/atrium/account_number.rb
|
179
|
+
- lib/atrium/account_owner.rb
|
178
180
|
- lib/atrium/challenge.rb
|
179
181
|
- lib/atrium/client.rb
|
180
182
|
- lib/atrium/connect.rb
|
@@ -208,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
210
|
version: '0'
|
209
211
|
requirements: []
|
210
212
|
rubyforge_project:
|
211
|
-
rubygems_version: 2.6
|
213
|
+
rubygems_version: 2.7.6
|
212
214
|
signing_key:
|
213
215
|
specification_version: 4
|
214
216
|
summary: Ruby wrapper for the Atrium API by MX
|