change_health 5.16.0 → 5.18.0

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: 3febf96a95dc9999a8f0ef16fb8061d25578e20116f3c9a914e1fa7726a86219
4
- data.tar.gz: 2b2cbdf4fbfde5418f0f8aa59c596d670546d9d4af8b7f5a569f12ed6c7833ee
3
+ metadata.gz: ad94a64e05364d0f24774fe9721a4a2ffadb08448a07348c7835e0dcd0354806
4
+ data.tar.gz: 050236cd7408f842f717717af0cbcaafba23cf84860bcb5cfac85f4ea2d07ff1
5
5
  SHA512:
6
- metadata.gz: ee01c27b970f6d2ea3b40d1093c6ec14586ad2ac90e6ba5cc35bfa6e511c28b92813760533ab729a3ac6b7ff9970c4c1e031b2127f081a8e864f46fc97c131ae
7
- data.tar.gz: ea285493ba500e1d25a6ed7673cd3f128b18a972c34af498b8273c7281afce4b5f04a2dbe6e0eced50f6c953cd1c825a90082d6508581af2aa143afdbe3a27c7
6
+ metadata.gz: d9048cdfb5921250757a618b7b9e1f44c608e7fb86344830a25ef2a83ed2fd848760e2b8bd13adb482eb264d84d3405c83fd4a25b032fdd11eb046dbb80fa652
7
+ data.tar.gz: 844d6a4f4a32f29db366d7975072400f95a3f18dd833c2239ca7b7e4802ec0334bf4e0d19d48f50c7231b6f8148095d71c4ad14cd02a328431cfc2a85d2f54da
data/CHANGELOG.md CHANGED
@@ -5,6 +5,36 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ # [5.18.0] - 2024-08-19
9
+
10
+ ### Added
11
+
12
+ * Additional error handling for different format of error response
13
+
14
+ ```
15
+ "errors": {
16
+ "inputDto": [
17
+ "The inputDto field is required."
18
+ ],
19
+ "$.claimInformation.serviceLines[0].professionalService.serviceUnitCount": [
20
+ "The JSON value could not be converted to System.String. Path: $.claimInformation.serviceLines[0].professionalService.serviceUnitCount | LineNumber: 0 | BytePositionInLine: 763."
21
+ ]
22
+ }
23
+ ```
24
+
25
+ # [5.17.0] - 2024-07-23
26
+
27
+ ### Added
28
+
29
+ * Additional error handling for different format of error response
30
+
31
+ ```
32
+ {
33
+ "error": "invalid_request",
34
+ "error_description": "Invalid request"
35
+ }
36
+ ```
37
+
8
38
  # [5.16.0] - 2024-06-24
9
39
 
10
40
  ### Added
@@ -718,6 +748,8 @@ Added the ability to hit professional claim submission API. For more details, se
718
748
  * Authentication
719
749
  * Configuration
720
750
 
751
+ [5.18.0]: https://github.com/WeInfuse/change_health/compare/v5.17.0...v5.18.0
752
+ [5.17.0]: https://github.com/WeInfuse/change_health/compare/v5.16.0...v5.17.0
721
753
  [5.16.0]: https://github.com/WeInfuse/change_health/compare/v5.15.0...v5.16.0
722
754
  [5.15.0]: https://github.com/WeInfuse/change_health/compare/v5.14.0...v5.15.0
723
755
  [5.14.0]: https://github.com/WeInfuse/change_health/compare/v5.13.3...v5.14.0
@@ -22,7 +22,7 @@ module ChangeHealth
22
22
  end
23
23
 
24
24
  def message
25
- field_message || code_message
25
+ field_message || code_message || @data.to_s
26
26
  end
27
27
 
28
28
  def field_message
@@ -48,7 +48,7 @@ module ChangeHealth
48
48
  end
49
49
 
50
50
  define_method(method_name.to_s) do
51
- @data[method_name]
51
+ @data[method_name] if @data.is_a?(Hash)
52
52
  end
53
53
  end
54
54
 
@@ -16,7 +16,9 @@ module ChangeHealth
16
16
  end
17
17
 
18
18
  def errors?
19
- errors.is_a?(Array) && false == errors.empty?
19
+ field_error = errors.is_a?(Array) && false == errors.empty?
20
+
21
+ field_error || server_error.is_a?(ChangeHealthException)
20
22
  end
21
23
 
22
24
  def errors
@@ -25,6 +27,10 @@ module ChangeHealth
25
27
  errors.flatten.map { |error| ChangeHealth::Response::Error.new(error) }
26
28
  end
27
29
 
30
+ def server_error
31
+ ChangeHealthException.from_response(@response, msg: 'Request') if @raw.dig('error')
32
+ end
33
+
28
34
  def recommend_retry?
29
35
  return false unless errors?
30
36
 
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '5.16.0'.freeze
2
+ VERSION = '5.18.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: change_health
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.16.0
4
+ version: 5.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Crockett
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-25 00:00:00.000000000 Z
11
+ date: 2024-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -128,7 +128,7 @@ dependencies:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0.9'
131
- description:
131
+ description:
132
132
  email:
133
133
  - mike.crockett@weinfuse.com
134
134
  executables: []
@@ -206,7 +206,7 @@ licenses:
206
206
  - MIT
207
207
  metadata:
208
208
  allowed_push_host: https://rubygems.org
209
- post_install_message:
209
+ post_install_message:
210
210
  rdoc_options: []
211
211
  require_paths:
212
212
  - lib
@@ -221,8 +221,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubygems_version: 3.5.11
225
- signing_key:
224
+ rubygems_version: 3.1.6
225
+ signing_key:
226
226
  specification_version: 4
227
227
  summary: Ruby wrapper for the ChangeHealth API
228
228
  test_files: []