finapps 0.0.24.pre → 0.1.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/finapps.rb +4 -5
- data/lib/finapps/rest/client.rb +1 -0
- data/lib/finapps/rest/defaults.rb +1 -1
- data/lib/finapps/rest/user_institutions.rb +37 -0
- data/lib/finapps/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58dcf239755903d83b1cd5b250a6e37cfe637135
|
4
|
+
data.tar.gz: 8f9808d612b86472df9f4ad56aa6fe79800835be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b84d1e67d8f0e3a9ce0e0e2955333b3ae68073230c50acd7905d83c4b7abbd68112f3c31c6960502cdb6d875a82d508daa0e1dc861053cc0bc49feea52e99ca9
|
7
|
+
data.tar.gz: ac1d594cc3bf5d829e23557255fc4152ced23810cbba101541505b8a3d13459c363306a5f4d2d17fc83e199ba8a24bc38a2ffd03f5d39552486ce4cfa073b3e5
|
data/lib/finapps.rb
CHANGED
@@ -11,15 +11,14 @@ require 'finapps/rest/defaults'
|
|
11
11
|
require 'finapps/rest/errors'
|
12
12
|
require 'finapps/utils/logging'
|
13
13
|
require 'finapps/utils/utils'
|
14
|
+
require 'finapps/middleware/api_token'
|
15
|
+
require 'finapps/middleware/raise_http_exceptions'
|
16
|
+
require 'finapps/middleware/response_logger'
|
14
17
|
|
15
18
|
require 'finapps/rest/resource'
|
16
19
|
require 'finapps/rest/resources'
|
17
20
|
require 'finapps/rest/users'
|
18
21
|
require 'finapps/rest/institutions'
|
19
|
-
|
20
|
-
require 'finapps/middleware/api_token'
|
21
|
-
require 'finapps/middleware/raise_http_exceptions'
|
22
|
-
require 'finapps/middleware/response_logger'
|
23
|
-
|
22
|
+
require 'finapps/rest/user_institutions'
|
24
23
|
require 'finapps/rest/connection'
|
25
24
|
require 'finapps/rest/client'
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -28,7 +28,7 @@ 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
|
-
:
|
31
|
+
:user_institutions_add => 'institutions/:site_id/add'
|
32
32
|
}
|
33
33
|
|
34
34
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module FinApps
|
2
|
+
module REST
|
3
|
+
|
4
|
+
require 'erb'
|
5
|
+
|
6
|
+
class UserInstitutions < FinApps::REST::Resources
|
7
|
+
include FinApps::REST::Defaults
|
8
|
+
|
9
|
+
def add(site_id, parameters)
|
10
|
+
logger.debug "##{__method__.to_s} => Started"
|
11
|
+
|
12
|
+
raise MissingArgumentsError.new 'Missing argument: site_id.' if site_id.blank?
|
13
|
+
logger.debug "##{__method__.to_s} => site_id: #{site_id}"
|
14
|
+
|
15
|
+
raise MissingArgumentsError.new 'Missing argument: parameters.' if parameters.blank?
|
16
|
+
logger.debug "##{__method__.to_s} => parameters: #{parameters.inspect}"
|
17
|
+
|
18
|
+
end_point = Defaults::END_POINTS[:user_institutions_add]
|
19
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
20
|
+
|
21
|
+
path = end_point.sub ':site_id', ERB::Util.url_encode(site_id)
|
22
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
23
|
+
|
24
|
+
user_institution, error_messages = @client.post(path) { |r| UserInstitution.new(r.body) }
|
25
|
+
|
26
|
+
logger.debug "##{__method__.to_s} => Completed"
|
27
|
+
return user_institution, error_messages
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
class UserInstitution < FinApps::REST::Resource
|
33
|
+
attr_accessor :_id, :account_id, :user_public_id, :institution_name, :status, :status_message
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
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.
|
4
|
+
version: 0.1.1.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-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -205,6 +205,7 @@ files:
|
|
205
205
|
- lib/finapps/rest/institutions.rb
|
206
206
|
- lib/finapps/rest/resource.rb
|
207
207
|
- lib/finapps/rest/resources.rb
|
208
|
+
- lib/finapps/rest/user_institutions.rb
|
208
209
|
- lib/finapps/rest/users.rb
|
209
210
|
- lib/finapps/utils/logging.rb
|
210
211
|
- lib/finapps/utils/utils.rb
|
@@ -237,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
238
|
version: 1.3.1
|
238
239
|
requirements: []
|
239
240
|
rubyforge_project:
|
240
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.4.1
|
241
242
|
signing_key:
|
242
243
|
specification_version: 4
|
243
244
|
summary: FinApps REST API ruby client.
|