finapps 0.1.13.pre → 0.1.14.pre
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 +4 -4
- data/lib/finapps.rb +1 -0
- data/lib/finapps/rest/accounts.rb +27 -2
- data/lib/finapps/rest/client.rb +2 -1
- data/lib/finapps/rest/defaults.rb +5 -4
- data/lib/finapps/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: 1bd47146bd929d4ee4185c4060a3b5e7c2b2bb9d
|
4
|
+
data.tar.gz: 1bd42fde07fad5b18c1bd2f834ad5a4b609ca3e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8689f8b9c5605fee90c49334e98be3493155ee60a27c04aae474c18efe0372531c01221b74ffd12d767d95644338aa217cacd574a0a07baeec3dc88cf89af11c
|
7
|
+
data.tar.gz: eab1f99bd647d493e040db6f5d5ad6f2731873ac05a4f292e31e06b3f7e75fb7018fdcdb8555e974a27ab5810d9a869d68eed4de9c889389d21656792f948353
|
data/lib/finapps.rb
CHANGED
@@ -2,12 +2,37 @@ module FinApps
|
|
2
2
|
module REST
|
3
3
|
|
4
4
|
class Accounts < FinApps::REST::Resources
|
5
|
+
include FinApps::REST::Defaults
|
6
|
+
|
7
|
+
def list
|
8
|
+
logger.debug "##{__method__.to_s} => Started"
|
9
|
+
|
10
|
+
path = Defaults::END_POINTS[:accounts_list]
|
11
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
12
|
+
|
13
|
+
accounts, error_messages = @client.send(path, :get) do |r|
|
14
|
+
r.body.each { |i| Account.new(i) }
|
15
|
+
end
|
16
|
+
|
17
|
+
logger.debug "##{__method__.to_s} => Completed"
|
18
|
+
return accounts, error_messages
|
19
|
+
end
|
5
20
|
|
6
21
|
end
|
7
22
|
|
8
23
|
class Account < FinApps::REST::Resource
|
9
|
-
attr_accessor :
|
24
|
+
attr_accessor :_id, :institution_name, :account_id, :account_type, :account_name, :account_holder, :account_display_name,
|
25
|
+
:details
|
26
|
+
|
27
|
+
def initialize(hash)
|
28
|
+
super
|
29
|
+
@details = AccountDetails.new hash[:details]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class AccountDetails < FinApps::REST::Resource
|
34
|
+
attr_accessor :available_balance, :current_balance, :routing_number
|
10
35
|
end
|
11
36
|
|
12
37
|
end
|
13
|
-
end
|
38
|
+
end
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -5,7 +5,7 @@ module FinApps
|
|
5
5
|
include FinApps::Logging
|
6
6
|
include FinApps::REST::Connection
|
7
7
|
|
8
|
-
attr_reader :users, :institutions, :user_institutions
|
8
|
+
attr_reader :users, :institutions, :user_institutions, :accounts
|
9
9
|
|
10
10
|
# @param [String] company_identifier
|
11
11
|
# @param [String] company_token
|
@@ -168,6 +168,7 @@ module FinApps
|
|
168
168
|
@users ||= FinApps::REST::Users.new self
|
169
169
|
@institutions ||= FinApps::REST::Institutions.new self
|
170
170
|
@user_institutions ||= FinApps::REST::UserInstitutions.new self
|
171
|
+
@accounts ||= FinApps::REST::Accounts.new self
|
171
172
|
end
|
172
173
|
|
173
174
|
end
|
@@ -7,7 +7,7 @@ module FinApps
|
|
7
7
|
HEADERS = {
|
8
8
|
:accept => 'application/json',
|
9
9
|
:user_agent => "finapps-ruby/#{FinApps::VERSION} (#{RUBY_ENGINE}/#{RUBY_PLATFORM} #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL})"
|
10
|
-
}
|
10
|
+
}.freeze
|
11
11
|
|
12
12
|
# noinspection SpellCheckingInspection
|
13
13
|
DEFAULTS = {
|
@@ -19,7 +19,7 @@ module FinApps
|
|
19
19
|
:proxy_pass => nil,
|
20
20
|
:retry_limit => 1,
|
21
21
|
:log_level => Logger::INFO
|
22
|
-
}
|
22
|
+
}.freeze
|
23
23
|
|
24
24
|
|
25
25
|
END_POINTS = {
|
@@ -28,8 +28,9 @@ module FinApps
|
|
28
28
|
:users_delete => 'users/:public_id/delete',
|
29
29
|
:institutions_search => 'institutions/:search_term/search',
|
30
30
|
:institutions_form => 'institutions/:site_id/form',
|
31
|
-
:user_institutions_add => 'institutions/:site_id/add'
|
32
|
-
|
31
|
+
:user_institutions_add => 'institutions/:site_id/add',
|
32
|
+
:accounts_list => 'accounts/list'
|
33
|
+
}.freeze
|
33
34
|
|
34
35
|
end
|
35
36
|
end
|
data/lib/finapps/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finapps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|