ibanity 1.0.1 → 1.1
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/README.md +0 -2
- data/lib/ibanity/api/ponto_connect/financial_institution.rb +1 -1
- data/lib/ibanity/client.rb +1 -2
- data/lib/ibanity/error.rb +4 -7
- data/lib/ibanity/version.rb +1 -1
- metadata +3 -6
- data/.travis.yml +0 -10
- data/CHANGELOG.md +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4c8a4922493c2c96b3fc29688986ea3bee83f57487e3bd1d76bce47cfacd29b
|
4
|
+
data.tar.gz: 334a138123b6b2b3b99fa2137e1f14ba573a6cdf45302106b6606ffbd1e63cd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 927a526c9c065a5a7a2a8e7b3a4f00cc21ee82b0a634dafb58d4ec7368d900037e8098d40ff7f4175b93412389baee9180681be9c46392ba45a6a8716d5d63ce
|
7
|
+
data.tar.gz: d87b8b3f5865b3999dbf4d57b7aa297f4f6d272ab2fe8bf176edb137823e17a9c9605b0f8cc566a06dce850f54a73bee6d0cd0876859d25cea5bf30d88ba3157
|
data/README.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
[](https://travis-ci.org/ibanity/ibanity-ruby)
|
2
|
-
|
3
1
|
# Ibanity Ruby Library
|
4
2
|
|
5
3
|
The Ibanity Ruby Library provides convenient wrappers around the Ibanity API. The object attributes are dynamically defined based on the API response, supporting minor API changes seamlessly.
|
@@ -6,7 +6,7 @@ module Ibanity
|
|
6
6
|
list_by_uri(uri: uri, query_params: query_params, customer_access_token: access_token)
|
7
7
|
end
|
8
8
|
|
9
|
-
def self.find(access_token
|
9
|
+
def self.find(access_token:, id:)
|
10
10
|
uri = Ibanity.ponto_connect_api_schema["financialInstitutions"].sub("{financialInstitutionId}", id)
|
11
11
|
find_by_uri(uri: uri, customer_access_token: access_token)
|
12
12
|
end
|
data/lib/ibanity/client.rb
CHANGED
@@ -70,9 +70,8 @@ module Ibanity
|
|
70
70
|
}
|
71
71
|
raw_response = RestClient::Request.execute(query) do |response, request, result, &block|
|
72
72
|
if response.code >= 400
|
73
|
-
ibanity_request_id = response.headers[:ibanity_request_id]
|
74
73
|
body = JSON.parse(response.body)
|
75
|
-
raise Ibanity::Error.new(body["errors"] || body
|
74
|
+
raise Ibanity::Error.new(body["errors"] || body), "Ibanity request failed."
|
76
75
|
else
|
77
76
|
response.return!(&block)
|
78
77
|
end
|
data/lib/ibanity/error.rb
CHANGED
@@ -2,14 +2,13 @@ module Ibanity
|
|
2
2
|
class Error < StandardError
|
3
3
|
attr_reader :errors
|
4
4
|
|
5
|
-
def initialize(errors
|
5
|
+
def initialize(errors)
|
6
6
|
@errors = errors
|
7
|
-
@ibanity_request_id = ibanity_request_id
|
8
7
|
end
|
9
8
|
|
10
9
|
def to_s
|
11
10
|
if @errors.is_a?(Array) && @errors.size > 0
|
12
|
-
|
11
|
+
@errors.map do |error|
|
13
12
|
if error["meta"] && error["meta"]["attribute"]
|
14
13
|
"* #{error["code"]}: '#{error["meta"]["attribute"]}' #{error["detail"]}"
|
15
14
|
elsif error["meta"] && error["meta"]["resource"]
|
@@ -17,11 +16,9 @@ module Ibanity
|
|
17
16
|
else
|
18
17
|
"* #{error["code"]}: #{error["detail"]}"
|
19
18
|
end
|
20
|
-
end
|
21
|
-
formatted_errors << "* ibanity_request_id: #{@ibanity_request_id}"
|
22
|
-
formatted_errors.join("\n")
|
19
|
+
end.join("\n")
|
23
20
|
elsif @errors.is_a?(Hash)
|
24
|
-
"* #{@errors["error"]}: #{@errors["error_description"]}
|
21
|
+
"* #{@errors["error"]}: #{@errors["error_description"]}"
|
25
22
|
else
|
26
23
|
super
|
27
24
|
end
|
data/lib/ibanity/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibanity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ibanity
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -61,8 +61,6 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
63
|
- ".gitkeep"
|
64
|
-
- ".travis.yml"
|
65
|
-
- CHANGELOG.md
|
66
64
|
- Gemfile
|
67
65
|
- LICENSE.txt
|
68
66
|
- README.md
|
@@ -127,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
125
|
- !ruby/object:Gem::Version
|
128
126
|
version: '0'
|
129
127
|
requirements: []
|
130
|
-
|
131
|
-
rubygems_version: 2.7.7
|
128
|
+
rubygems_version: 3.0.3
|
132
129
|
signing_key:
|
133
130
|
specification_version: 4
|
134
131
|
summary: Ibanity Ruby Client
|
data/.travis.yml
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
script: bundle exec rspec
|
3
|
-
deploy:
|
4
|
-
provider: rubygems
|
5
|
-
api_key:
|
6
|
-
secure: pfXgGXH/AZEG3HMiaJPmJ7fck6Z3Hj0y7TU5TwvLAtKuBy6hlLT67ne/VfeBZQKa9d7eerr9PFP1hvLjZppScZMMOTtjBTvwpchkcUDwCxHx5GzS/jRnBF+uYHIza2p4Wq8yIPug7UrZ0qyq5VOG45R/nC/fPm2Ht2T7heqF5VgRaDGrN7Fq3zXn7duiYhTy02nDXorZ/kEAjnwdwDtXWyVFq8wr4inTExYrDP9/M57qx5TrkgWmcQ7JrvO2KfLDMJqAxI8lNoaPl5dAi7q1XWqqSVay7h9OAnP4UfvnvAc106lG6nHfTQig1krTfxRAvtHlPQjSlFkL+0qfBPBz1C/ex221O3NsNBYmI/mJ45lcNhqJbnkV2VEAEgUoe4ZFfKUUczLfnVxIPjoQmHMwLwfEO4g8/Hz/I3L7bvebgfzGGMDpmN6ERZRJmhutE6K5cL80ghoLs6ExJLoqHi1qvdBSkM2IyE4Yo+lob/hKU1IBL1w13T2h3EHapBh3kKn+jBzu/y5nXTEteBHbMP8j2zxFiihVBJEKPXhg/iU8WHLI6HZgWJkOc9ZH3hS7CN3VELK7fVZp9jaPAKaKihdvxQ0z3gCPFL+E6rYKsBPYqXE6qDsSQswhqTN15W0eVQqK8fDXkZmW0lSGvi2IJvL0CjIaahfB2GaapTtqOwar7sc=
|
7
|
-
on:
|
8
|
-
tags: true
|
9
|
-
gem: ibanity
|
10
|
-
skip_cleanup: true
|