afterbanks-api-ruby 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/lib/afterbanks/base.rb +5 -0
- data/lib/afterbanks/error.rb +3 -2
- data/lib/afterbanks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97e68524e95b920db99af549d1bc1d92a998eab0542cc14bbc6f05665ab3f7d6
|
4
|
+
data.tar.gz: e251c7982023ddab6732ee3b55590c027af3016aa91e3508affd1ae1f2a06a53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10e9039b45293ec28ce409e430c502d93ea943bbbd9395e8201c17d9c94dc6be0eafdb477168eda0b68a1df2bd11e56b7cbd8ceb55e0dbc66f0b3903a9d6b864
|
7
|
+
data.tar.gz: 0d26f45dba3d796355d09e55e988c88e006c2827b3d1e09bfc91689450144de192c62b89b649740374fe113860b03fc2f5b96b4f31c488d343a72296487830a2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -33,6 +33,7 @@ You can set a `logger` as well.
|
|
33
33
|
Changelog
|
34
34
|
---------
|
35
35
|
|
36
|
+
* v.0.4.2 Include longCode attribute to the Afterbanks::Error class
|
36
37
|
* v.0.4.1 Increased timeout from 5min to 15min
|
37
38
|
* v.0.4.0 Add new, opt-in error for missing product, and several internal improvements
|
38
39
|
* v.0.3.4 Security: upgrade addressable from 2.7.0 to 2.8.0
|
data/lib/afterbanks/base.rb
CHANGED
@@ -85,11 +85,16 @@ module Afterbanks
|
|
85
85
|
return unless response_body.is_a?(Hash)
|
86
86
|
|
87
87
|
code = response_body['code']
|
88
|
+
long_code = response_body['longCode']
|
88
89
|
message = response_body['message']
|
89
90
|
additional_info = response_body['additional_info']
|
90
91
|
|
91
92
|
error_info = { message: message, debug_id: debug_id }
|
92
93
|
|
94
|
+
if !long_code.nil?
|
95
|
+
error_info[:long_code] = long_code
|
96
|
+
end
|
97
|
+
|
93
98
|
case code
|
94
99
|
when 1
|
95
100
|
raise GenericError.new(**error_info)
|
data/lib/afterbanks/error.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
module Afterbanks
|
2
2
|
class Error < ::StandardError
|
3
|
-
attr_reader :message, :debug_id, :additional_info
|
3
|
+
attr_reader :message, :debug_id, :long_code, :additional_info
|
4
4
|
|
5
|
-
def initialize(message:, debug_id:, additional_info: nil)
|
5
|
+
def initialize(message:, debug_id:, long_code: nil, additional_info: nil)
|
6
6
|
@message = message
|
7
7
|
@debug_id = debug_id
|
8
|
+
@long_code = long_code
|
8
9
|
@additional_info = additional_info
|
9
10
|
end
|
10
11
|
|
data/lib/afterbanks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: afterbanks-api-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert Bellonch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|