atrium-ruby 1.2.3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5fdc584bc3e01b7ef5b0f329c5d79466a3376ab7
4
- data.tar.gz: c2085c7c434a0ba0e2d339ddcdf5ab71324394d8
2
+ SHA256:
3
+ metadata.gz: '09cfeddb1e8ef61d59192937280cb22f25bd46cf572d27f385fddd5eff82a4b9'
4
+ data.tar.gz: 999cb0b047e4188e8f92fc0c551aac375ba30bdca3082172dadc650e83e6499a
5
5
  SHA512:
6
- metadata.gz: 503809e0fea41f524afd5e0c49d80f8fcb749c1dc7047c6d5b0dd96e08afd3cda865b7238573a4b38bddb23d25f31a47731a27c5460cb6608ecd35608b2b500c
7
- data.tar.gz: f408f6eb09c4c6ae9032059ba5d75bd720a41fe2e26c6839d85413cffb71e2339e18dcd4dac406d9f8a8ba3e35c0ca3901a37e488b884f1e6ee9036d982ead90
6
+ metadata.gz: 2b11d5a9e85cf8855d9101d35621161498fdf5cdb6df24e97bae0e06e80c17d765ad1060f4b2fb833160a4ac4fb93539b83e765baa8155051b5c6b95fdf531b0
7
+ data.tar.gz: 20e3e06cb8bfccfd111877c1797db44ff51c583f06d330fa7bd01f4f2f54790091e579cbdab6c2660eaafc20ce5078d6d9bee32a98f456ca547746588592afbb
@@ -5,6 +5,8 @@ require "atrium/pageable"
5
5
  require "atrium/paginate"
6
6
 
7
7
  require "atrium/account"
8
+ require "atrium/account_number"
9
+ require "atrium/account_owner"
8
10
  require "atrium/client"
9
11
  require "atrium/connect"
10
12
  require "atrium/credential"
@@ -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
@@ -20,7 +20,7 @@ module Atrium
20
20
  # CLASS METHODS
21
21
  #
22
22
  def self.create(user_guid:, options: {})
23
- options.each do |key, _value|
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
 
@@ -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
  #
@@ -1,3 +1,3 @@
1
1
  module Atrium
2
- VERSION = "1.2.3".freeze
2
+ VERSION = "1.3.0".freeze
3
3
  end
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.2.3
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-08 00:00:00.000000000 Z
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.13
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