finapps 0.0.21.pre → 0.0.22.pre

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
2
  SHA1:
3
- metadata.gz: 32d816cce7604d4e07f885c75a6d3a5ba832beda
4
- data.tar.gz: 81fe8b21e1214163f56afa94916c6b1abcd9186c
3
+ metadata.gz: 4ff9e3ab24fa9788a93f55a47496a052699534bb
4
+ data.tar.gz: 58dc7b5677e7589929843ae935fd566561e903fd
5
5
  SHA512:
6
- metadata.gz: 4502e2e84869ea0edc51182f482d3c7e393f4abfae44c912069ef23adb12017fc9482acbba41c04ad35e4c27e8b4be110af442a5d91b44201938960cd169b40e
7
- data.tar.gz: 651b6eda5fcd15ca2c8cb9f892aa6b588ad0481220d89de48c32d9e49b5bb7868b632c5e854df2710e53e44c6d4d3bdc4297ddf6ba5540552f275e8075113445
6
+ metadata.gz: 3a5853bcb617c45cf96642b3034abe1ef2314967e90c43d5905eaee7aea66ef59766a2946ab1d6746b0032dfe06740e61ed6c2cebf31c439a70f51d9037066eb
7
+ data.tar.gz: 80402c72e6a9dc69ec04c17242fce7bf634ff1d0913f8f68903ec941e3f27e77ff07459ca3921f9f18802f08945fee106e664443a8d55e04009a91821f6cf2c3
@@ -28,6 +28,25 @@ module FinApps
28
28
  return institutions, error_messages
29
29
  end
30
30
 
31
+ # @param [Integer] site_id
32
+ def form(site_id)
33
+ logger.debug "##{__method__.to_s} => Started"
34
+
35
+ raise MissingArgumentsError.new 'Missing argument: site_id.' if site_id.blank?
36
+ logger.debug "##{__method__.to_s} => site_id: #{site_id}"
37
+
38
+ end_point = Defaults::END_POINTS[:institutions_form]
39
+ logger.debug "##{__method__.to_s} => end_point: #{end_point}"
40
+
41
+ path = end_point.sub ':site_id', ERB::Util.url_encode(site_id)
42
+ logger.debug "##{__method__.to_s} => path: #{path}"
43
+
44
+ form, error_messages = @client.get(path) { |r| String.new(r.body) }
45
+
46
+ logger.debug "##{__method__.to_s} => Completed"
47
+ return form, error_messages
48
+ end
49
+
31
50
  end
32
51
 
33
52
  class Institution < FinApps::REST::Resource
@@ -9,7 +9,13 @@ module FinApps
9
9
  # @return [FinApps::REST::User, Array<String>]
10
10
  def create(params = {})
11
11
  logger.debug "##{__method__.to_s} => Started"
12
- user, error_messages = @client.post(END_POINTS[:users_create], params) { |r| User.new(r.body) }
12
+
13
+ raise MissingArgumentsError.new 'Missing argument: params.' if params.blank?
14
+
15
+ end_point = Defaults::END_POINTS[:users_create]
16
+ logger.debug "##{__method__.to_s} => end_point: #{end_point}"
17
+
18
+ user, error_messages = @client.post(end_point, params) { |r| User.new(r.body) }
13
19
  logger.debug "##{__method__.to_s} => Completed"
14
20
 
15
21
  return user, error_messages
@@ -19,7 +25,13 @@ module FinApps
19
25
  # @return [FinApps::REST::User, Array<String>]
20
26
  def login(params = {})
21
27
  logger.debug "##{__method__.to_s} => Started"
22
- user, error_messages = @client.post(END_POINTS[:users_login], params) { |r| User.new(r.body) }
28
+
29
+ raise MissingArgumentsError.new 'Missing argument: params.' if params.blank?
30
+
31
+ end_point = Defaults::END_POINTS[:users_login]
32
+ logger.debug "##{__method__.to_s} => end_point: #{end_point}"
33
+
34
+ user, error_messages = @client.post(end_point, params) { |r| User.new(r.body) }
23
35
  logger.debug "##{__method__.to_s} => Completed"
24
36
 
25
37
  return user, error_messages
@@ -29,8 +41,17 @@ module FinApps
29
41
  # @return [Array<String>]
30
42
  def delete(public_id)
31
43
  logger.debug "##{__method__.to_s} => Started"
44
+
32
45
  raise MissingArgumentsError.new 'Missing argument: public_id.' if public_id.blank?
33
- _, error_messages = @client.delete(END_POINTS[:users_delete].sub! ':public_id', public_id.to_s)
46
+ logger.debug "##{__method__.to_s} => public_id: #{public_id}"
47
+
48
+ end_point = Defaults::END_POINTS[:users_delete]
49
+ logger.debug "##{__method__.to_s} => end_point: #{end_point}"
50
+
51
+ path = end_point.sub ':public_id', ERB::Util.url_encode(public_id)
52
+ logger.debug "##{__method__.to_s} => path: #{path}"
53
+
54
+ _, error_messages = @client.delete(path)
34
55
  logger.debug "##{__method__.to_s} => Completed"
35
56
 
36
57
  error_messages
@@ -1,3 +1,3 @@
1
1
  module FinApps
2
- VERSION = '0.0.21.pre'
2
+ VERSION = '0.0.22.pre'
3
3
  end
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.0.21.pre
4
+ version: 0.0.22.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-18 00:00:00.000000000 Z
11
+ date: 2014-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor