finicity-ruby 1.2.0 → 1.2.1

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: f8e7defd8ab645bb1fb17f2c88a32d2105748304
4
- data.tar.gz: 6a87267ad74ed3915030f3b1a0a2720a35864122
2
+ SHA256:
3
+ metadata.gz: 77892654c0597abe33c208c0162c984c7bba2ae81e5c7efb09dba84f40404ea7
4
+ data.tar.gz: 4ada64c7010fbb2a719db1a04cd537511ec3e5d5ed6fb1f12c11c86c93aa51a7
5
5
  SHA512:
6
- metadata.gz: c29f17a42baf6458dd92439cf2746c05a58911479dffde8117c96899669e90f8ef6b31f5505ad0c7677f475b7b270d5b5efa731c4f1cc3172ebd87381ae1cf87
7
- data.tar.gz: c449d1973282cccf708e281e2ddae1c93a33c902d3815c83ab1018201ee9a01928fcede9a7822711c3588c288163a228b83cf052812758732461dc0ec033f2cf
6
+ metadata.gz: 573e72a7a64f166f42cb8d9b56358a629f4c9d3cecf2910694a65705978be619f9ee0554f64471a4448469ccd9701fba06c662a9c8e58e813337d44eb71c508a
7
+ data.tar.gz: 74f2fc977fd3177951dcf5abdba141992be3c8eb7f883c5eec70b17827b9e7de4b0d4aa08aca033dcc64b79ecac44d6d08e5da5b6055abec7e9f040ab24da829
@@ -38,4 +38,8 @@ module Finicity
38
38
  # Description: Missing Parameter
39
39
  # Required Action: A required field was left blank, Submit the request again, with valid text
40
40
  MISSING_PARAMS_CODES = [10_005].freeze
41
+
42
+ # Description: Account details not found
43
+ # Required Action: Nothing. This is an informational message.
44
+ ACCOUNT_DETAILS_NOT_FOUND = [38_008].freeze
41
45
  end
@@ -5,7 +5,7 @@ module Finicity
5
5
  class Base
6
6
  include HTTParty
7
7
 
8
- base_uri "https://api.finicity.com/aggregation"
8
+ base_uri "https://api.finicity.com/"
9
9
  headers "Content-Type" => "application/json"
10
10
  headers "Accept" => "application/json"
11
11
  headers "Finicity-App-Key" => Finicity.configs.app_key
@@ -69,7 +69,7 @@ module Finicity
69
69
 
70
70
  def other_content_type?(response)
71
71
  content_type = response.headers["Content-Type"]&.downcase
72
- content_type.present? && content_type != "application/json"
72
+ content_type.present? && !content_type.include?("application/json")
73
73
  end
74
74
 
75
75
  def default_headers
@@ -21,7 +21,7 @@ module Finicity
21
21
  protected
22
22
 
23
23
  def fetch_new_one
24
- endpoint = "/v2/partners/authentication"
24
+ endpoint = "/aggregation/v2/partners/authentication"
25
25
  body = {
26
26
  partner_id: Finicity.configs.partner_id,
27
27
  partner_secret: Finicity.configs.partner_secret
@@ -2,14 +2,14 @@ module Finicity
2
2
  module Resources
3
3
  class Account < Base
4
4
  def add_all(institution_id, credentials)
5
- endpoint = "/v1/customers/#{customer_id}/institutions/#{institution_id}/accounts/addall"
5
+ endpoint = "/aggregation/v1/customers/#{customer_id}/institutions/#{institution_id}/accounts/addall"
6
6
  body = { credentials: credentials }
7
7
 
8
8
  request(:post, endpoint, body: body)
9
9
  end
10
10
 
11
11
  def add_all_mfa(institution_id, mfa_session, questions)
12
- endpoint = "/v1/customers/#{customer_id}/institutions/#{institution_id}/accounts/addall/mfa"
12
+ endpoint = "/aggregation/v1/customers/#{customer_id}/institutions/#{institution_id}/accounts/addall/mfa"
13
13
  body = { mfa_challenges: { questions: questions } }
14
14
  headers = { "MFA-Session" => mfa_session }
15
15
 
@@ -17,25 +17,25 @@ module Finicity
17
17
  end
18
18
 
19
19
  def list
20
- endpoint = "/v1/customers/#{customer_id}/accounts"
20
+ endpoint = "/aggregation/v1/customers/#{customer_id}/accounts"
21
21
 
22
22
  request(:get, endpoint)
23
23
  end
24
24
 
25
25
  def activate(institution_id, accounts)
26
- endpoint = "/v2/customers/#{customer_id}/institutions/#{institution_id}/accounts"
26
+ endpoint = "/aggregation/v2/customers/#{customer_id}/institutions/#{institution_id}/accounts"
27
27
 
28
28
  request(:put, endpoint, body: { accounts: accounts })
29
29
  end
30
30
 
31
31
  def refresh(institution_login_id)
32
- endpoint = "/v1/customers/#{customer_id}/institutionLogins/#{institution_login_id}/accounts"
32
+ endpoint = "/aggregation/v1/customers/#{customer_id}/institutionLogins/#{institution_login_id}/accounts"
33
33
 
34
34
  request(:post, endpoint)
35
35
  end
36
36
 
37
37
  def refresh_mfa(institution_login_id, mfa_session, questions)
38
- endpoint = "/v1/customers/#{customer_id}/institutionLogins/#{institution_login_id}/accounts/mfa"
38
+ endpoint = "/aggregation/v1/customers/#{customer_id}/institutionLogins/#{institution_login_id}/accounts/mfa"
39
39
 
40
40
  body = { questions: questions }
41
41
  headers = { "MFA-Session" => mfa_session }
@@ -44,29 +44,44 @@ module Finicity
44
44
  end
45
45
 
46
46
  def get(account_id)
47
- endpoint = "/v1/customers/#{customer_id}/accounts/#{account_id}"
47
+ endpoint = "/aggregation/v1/customers/#{customer_id}/accounts/#{account_id}"
48
48
 
49
49
  request(:get, endpoint)
50
50
  end
51
51
 
52
52
  def delete(account_id)
53
- endpoint = "/v1/customers/#{customer_id}/accounts/#{account_id}"
53
+ endpoint = "/aggregation/v1/customers/#{customer_id}/accounts/#{account_id}"
54
54
 
55
55
  request(:delete, endpoint)
56
56
  end
57
57
 
58
58
  def credentials(account_id)
59
- endpoint = "/v1/customers/#{customer_id}/accounts/#{account_id}/loginForm"
59
+ endpoint = "/aggregation/v1/customers/#{customer_id}/accounts/#{account_id}/loginForm"
60
60
 
61
61
  request(:get, endpoint)
62
62
  end
63
63
 
64
64
  def update_credentials(institution_login_id, credentials)
65
- endpoint = "/v1/customers/#{customer_id}/institutionLogins/#{institution_login_id}"
65
+ endpoint = "/aggregation/v1/customers/#{customer_id}/institutionLogins/#{institution_login_id}"
66
66
  body = { login_form: credentials }
67
67
 
68
68
  request(:put, endpoint, body: body)
69
69
  end
70
+
71
+ def owner_verification(account_id)
72
+ endpoint = "/decisioning/v1/customers/#{customer_id}/accounts/#{account_id}/owner"
73
+
74
+ request(:get, endpoint)
75
+ end
76
+
77
+ def owner_verification_mfa(account_id, mfa_session, questions)
78
+ endpoint = "/decisioning/v1/customers/#{customer_id}/accounts/#{account_id}/owner/mfa"
79
+
80
+ body = { questions: questions }
81
+ headers = { "MFA-Session" => mfa_session }
82
+
83
+ request(:post, endpoint, body: body, headers: headers)
84
+ end
70
85
  end
71
86
  end
72
87
  end
@@ -2,21 +2,21 @@ module Finicity
2
2
  module Resources
3
3
  class Customer < Base
4
4
  def self.add(username)
5
- endpoint = "/v1/customers/#{Finicity.configs.app_type}"
5
+ endpoint = "/aggregation/v1/customers/#{Finicity.configs.app_type}"
6
6
  body = { username: username }
7
7
 
8
8
  request(:post, endpoint, body: body)
9
9
  end
10
10
 
11
11
  def self.list(query = {})
12
- endpoint = "/v1/customers"
12
+ endpoint = "/aggregation/v1/customers"
13
13
  query = { query: query } if query.present?
14
14
 
15
15
  request(:get, endpoint, query)
16
16
  end
17
17
 
18
18
  def delete
19
- endpoint = "/v1/customers/#{customer_id}"
19
+ endpoint = "/aggregation/v1/customers/#{customer_id}"
20
20
 
21
21
  request(:delete, endpoint)
22
22
  end
@@ -2,14 +2,14 @@ module Finicity
2
2
  module Resources
3
3
  class Institution < Base
4
4
  def self.list(query = {})
5
- endpoint = "/v1/institutions"
5
+ endpoint = "/aggregation/v1/institutions"
6
6
  query = { query: query } if query.present?
7
7
 
8
8
  request(:get, endpoint, query)
9
9
  end
10
10
 
11
11
  def self.get(institution_id)
12
- endpoint = "/v1/institutions/#{institution_id}/details"
12
+ endpoint = "/aggregation/v1/institutions/#{institution_id}/details"
13
13
 
14
14
  request(:get, endpoint)
15
15
  end
@@ -2,27 +2,27 @@ module Finicity
2
2
  module Resources
3
3
  class Transaction < Base
4
4
  def list(from:, to:, params: {})
5
- endpoint = "/v3/customers/#{customer_id}/transactions"
5
+ endpoint = "/aggregation/v3/customers/#{customer_id}/transactions"
6
6
  query = { from_date: from.to_time.to_i, to_date: to.to_time.to_i }.merge(params)
7
7
 
8
8
  request(:get, endpoint, query: query)
9
9
  end
10
10
 
11
11
  def list_for_account(account_id, from:, to:, params: {})
12
- endpoint = "/v3/customers/#{customer_id}/accounts/#{account_id}/transactions"
12
+ endpoint = "/aggregation/v3/customers/#{customer_id}/accounts/#{account_id}/transactions"
13
13
  query = { from_date: from.to_time.to_i, to_date: to.to_time.to_i }.merge(params)
14
14
 
15
15
  request(:get, endpoint, query: query)
16
16
  end
17
17
 
18
18
  def load_historic(account_id)
19
- endpoint = "/v1/customers/#{customer_id}/accounts/#{account_id}/transactions/historic"
19
+ endpoint = "/aggregation/v1/customers/#{customer_id}/accounts/#{account_id}/transactions/historic"
20
20
 
21
21
  request(:post, endpoint)
22
22
  end
23
23
 
24
24
  def load_historic_mfa(account_id, mfa_session, questions)
25
- endpoint = "/v1/customers/#{customer_id}/accounts/#{account_id}/transactions/historic/mfa"
25
+ endpoint = "/aggregation/v1/customers/#{customer_id}/accounts/#{account_id}/transactions/historic/mfa"
26
26
  headers = { "MFA-Session" => mfa_session }
27
27
  body = { questions: questions }
28
28
 
@@ -1,3 +1,3 @@
1
1
  module Finicity
2
- VERSION = "1.2.0".freeze
2
+ VERSION = "1.2.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finicity-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Azzurrio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-17 00:00:00.000000000 Z
11
+ date: 2019-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: 2.0.0
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.6.12
179
+ rubygems_version: 2.7.8
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: Ruby Client for Finicity Aggregation API