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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c495dddbe9aaa82bc1c801dfd0a1c52c40913369cb20a47e1cd3dc997b300d26
4
- data.tar.gz: 49a481b3a5c3c1057f8c03ec0fd5fd1b3c1b7a06605abf2d4994a695b1733b64
3
+ metadata.gz: 97e68524e95b920db99af549d1bc1d92a998eab0542cc14bbc6f05665ab3f7d6
4
+ data.tar.gz: e251c7982023ddab6732ee3b55590c027af3016aa91e3508affd1ae1f2a06a53
5
5
  SHA512:
6
- metadata.gz: 9e26fb7e10161b345708ebcdd4516622cb6bd1971586801022678ba1ebc3837287b68d1d932dc23c91ab5c98e28f554d59f5af2ccf8b99d295103842dd408642
7
- data.tar.gz: cd28df51ed0cd1e41be1ef057a746ac4e918632e299551a20c3b2615d5828ce380adce0e87dfdf4eeee07b3b35146d5d29ba95cb0ef12712af2f0e2715f29626
6
+ metadata.gz: 10e9039b45293ec28ce409e430c502d93ea943bbbd9395e8201c17d9c94dc6be0eafdb477168eda0b68a1df2bd11e56b7cbd8ceb55e0dbc66f0b3903a9d6b864
7
+ data.tar.gz: 0d26f45dba3d796355d09e55e988c88e006c2827b3d1e09bfc91689450144de192c62b89b649740374fe113860b03fc2f5b96b4f31c488d343a72296487830a2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- afterbanks-api-ruby (0.4.1)
4
+ afterbanks-api-ruby (0.4.2)
5
5
  rest-client (~> 2.0.2)
6
6
 
7
7
  GEM
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
@@ -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)
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Afterbanks
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
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.1
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-06-14 00:00:00.000000000 Z
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client