redox 1.8.0 → 1.8.3

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: 52129e89bbf755b7383fba9e868d3bd6abb6aa2077f65ebec55a3fe3ecb8ffea
4
- data.tar.gz: e99434f6db3552bf09486a82dfb7f86b51c4fa2bd45cab74f22a8ff71e5db484
3
+ metadata.gz: 613d04cb8ea6250a17085c297425e58d3ffd5a8b3c5e9206bb14cb5e5759e2e0
4
+ data.tar.gz: c89b3fb089fdcefc50dc02a56e734a689f2ee2daa20eb5d463ca6c084c1b5e4c
5
5
  SHA512:
6
- metadata.gz: 6788da488aa1bd063ffc90d18133c8a1ae7c9ea72d7b74b73785abeef270276965fe74c6df3b5a448d829e2d228ac3329f9531e5e2a43edc713eea564c513dfd
7
- data.tar.gz: 8ec2dcb63378b23ccf8cbdfa62626f3872fba874753d5f0e38559b05c35947230aa70519f412d83fcb90c641be62d3e75bf79ac80acaab30471f21375b01ac52
6
+ metadata.gz: 8beb8a1efd15abe04aacca76d3a9dd072a8821338ed35cf1f3c33d6807e04b9b9e9f6df71654fc8db5fb94fc9b32926bc06f0cac1b4810d512a707734f505c3f
7
+ data.tar.gz: 74f7fcdd219eb747bcb560cf371d7bba1208add6ade3a716861322a4dcb930deedbf563567b6c72ae1cf2355960cc50aca4bd7000e9ffb84689574fbcf46a46d
data/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.8.3] - 2022-8-12
8
+ ### Added
9
+ - Improved RedoxException error handling
10
+
11
+ ## [1.8.2] - 2022-2-23
12
+ ### Added
13
+ - DirectAddressFrom and DirectAddressTo to Media Model
14
+
15
+ ## [1.8.1] - 2022-1-25
16
+ ### Added
17
+ - Components, OrderedBy, Indications, and AdministeringProvider to Medication Model
18
+
7
19
  ## [1.8.0] - 2021-12-13
8
20
  ### Added
9
21
  - Medications Model
@@ -183,6 +195,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
183
195
  ### Added
184
196
  - Initial Release
185
197
 
198
+ [1.8.3]: https://github.com/WeInfuse/redox/compare/v1.8.2...v1.8.3
199
+ [1.8.2]: https://github.com/WeInfuse/redox/compare/v1.8.1...v1.8.2
200
+ [1.8.1]: https://github.com/WeInfuse/redox/compare/v1.8.0...v1.8.1
186
201
  [1.8.0]: https://github.com/WeInfuse/redox/compare/v1.7.4...v1.8.0
187
202
  [1.7.4]: https://github.com/WeInfuse/redox/compare/v1.7.3...v1.7.4
188
203
  [1.7.3]: https://github.com/WeInfuse/redox/compare/v1.7.2...v1.7.3
@@ -10,6 +10,8 @@ module Redox
10
10
  property :DocumentID, from: :document_id, required: false
11
11
  property :Availability, from: :availability, required: false
12
12
  property :Provider, from: :provider, required: false
13
+ property :DirectAddressFrom, from: :direct_address_from, required: false
14
+ property :DirectAddressTo, from: :direct_address_to, required: false
13
15
 
14
16
  alias_method :file_type, :FileType
15
17
  alias_method :file_name, :FileName
@@ -18,6 +20,8 @@ module Redox
18
20
  alias_method :document_id, :DocumentID
19
21
  alias_method :availability, :Availability
20
22
  alias_method :provider, :Provider
23
+ alias_method :direct_address_from, :DirectAddressFrom
24
+ alias_method :direct_address_to, :DirectAddressTo
21
25
 
22
26
  def availability=(value)
23
27
  case value
@@ -7,6 +7,10 @@ module Redox
7
7
  property :Rate, required: false, from: :rate, default: {}
8
8
  property :Route, required: false, from: :route, default: {}
9
9
  property :Product, required: false, from: :product, default: {}
10
+ property :Components, required: false, from: :components, default: []
11
+ property :OrderedBy, required: false, from: :ordered_by, default: {}
12
+ property :Indications, required: false, from: :indications, default: []
13
+ property :AdministeringProvider, required: false, from: :administering_provider, default: {}
10
14
 
11
15
  alias_method :order, :Order
12
16
  alias_method :lot_number, :LotNumber
@@ -14,6 +18,10 @@ module Redox
14
18
  alias_method :rate, :Rate
15
19
  alias_method :route, :Route
16
20
  alias_method :product, :Product
21
+ alias_method :components, :Components
22
+ alias_method :ordered_by, :OrderedBy
23
+ alias_method :indications, :Indications
24
+ alias_method :administering_provider, :AdministeringProvider
17
25
  end
18
26
  end
19
27
  end
@@ -2,15 +2,16 @@ module Redox
2
2
  class RedoxException < Exception
3
3
  def self.from_response(response, msg: nil)
4
4
  exception_msg = "Failed #{msg}:"
5
- exception_msg << " HTTP code: #{response.code} MSG: "
5
+ exception_msg << " HTTP code: #{response&.code} MSG: "
6
6
 
7
7
  begin
8
- error_response = JSON.parse(response.body)
8
+ error_response = response.parsed_response
9
+ error_list = error_response&.[]('Meta')&.[]('Errors')
9
10
 
10
- if (error_response.is_a?(Hash) && error_response.include?("Meta") && error_response["Meta"].include?("Errors"))
11
- exception_msg << error_response["Meta"]["Errors"]
11
+ if error_list
12
+ exception_msg << error_list.map {|el| el['Text'] || el.to_s }.join('|')
12
13
  else
13
- exception_msg << error_response
14
+ exception_msg << error_response.to_s
14
15
  end
15
16
  rescue JSON::ParserError
16
17
  exception_msg << response.body
data/lib/redox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Redox
2
- VERSION = '1.8.0'.freeze
2
+ VERSION = '1.8.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Clark
8
8
  - Mike Crockett
9
9
  - Mike Carr
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-12-13 00:00:00.000000000 Z
13
+ date: 2022-08-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -130,7 +130,7 @@ dependencies:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0.9'
133
- description:
133
+ description:
134
134
  email:
135
135
  - alexander.clark@weinfuse.com
136
136
  - mike.crockett@weinfuse.com
@@ -187,7 +187,7 @@ licenses:
187
187
  - MIT
188
188
  metadata:
189
189
  allowed_push_host: https://rubygems.org
190
- post_install_message:
190
+ post_install_message:
191
191
  rdoc_options: []
192
192
  require_paths:
193
193
  - lib
@@ -202,8 +202,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
202
  - !ruby/object:Gem::Version
203
203
  version: '0'
204
204
  requirements: []
205
- rubygems_version: 3.1.4
206
- signing_key:
205
+ rubygems_version: 3.1.6
206
+ signing_key:
207
207
  specification_version: 4
208
208
  summary: Ruby wrapper for the Redox Engine API
209
209
  test_files: []