redox 1.3.0 → 1.3.1

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: 0666bbb5152f4d34f3966dad512c2b1c6bb62cd661235516ad2a123eca63e653
4
- data.tar.gz: ec535077633c70fa241a3ee5a8af81812791e53e36f72dfcfcb87900b96a9fe5
3
+ metadata.gz: 740cc0762bcf54c65c0767f1e6254aa304a193b493babdd5993859866911a7c2
4
+ data.tar.gz: df1e7871ffde6efcd565255ea17ad05a5940fa951879e30db4e152c9c78679ae
5
5
  SHA512:
6
- metadata.gz: 844d30e49f7d57e5ca0dd7acc91d3bbc0aac672213e7016de5f5f52cac6e77e1123f1cb94613c5521d90c2f0a7445e0174af223c1e5b93c092386f6be5d2f9d6
7
- data.tar.gz: 1d09377d50c8729f7e3698bd2de877b3b4c081a8ec21a3b9997e0da6dbc9c5bab7f58fb6cb1da273e062443b41168bdb7178c872c8beeda77e24f8239cd7636f
6
+ metadata.gz: f49cff5f2b525ff29499104f008ca393d1676d8a0963fad72154f8a8bfd0cd807fafc9017606d7d3d45c4ed81e8598d06843096b731699f972ed3143e147ad37
7
+ data.tar.gz: 3dd1d039480dc5573df999aa9f74f44e6a63acef237dc8257e4bdc22f073033d75b7be6b1d9617e26dcbac22e8f6d199f5d995e019bd73e3c866cde98c9acd62
@@ -4,6 +4,11 @@ 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.3.1] - 2020-10-02
8
+ ### Added
9
+ - Transaction#as\_json
10
+ - Visit#as\_json
11
+
7
12
  ## [1.3.0] - 2020-09-17
8
13
  ### Added
9
14
  - Transaction model
@@ -108,6 +113,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
108
113
  ### Added
109
114
  - Initial Release
110
115
 
116
+ [1.3.1]: https://github.com/WeInfuse/redox/compare/v1.3.0...v1.3.1
111
117
  [1.3.0]: https://github.com/WeInfuse/redox/compare/v1.2.0...v1.3.0
112
118
  [1.2.0]: https://github.com/WeInfuse/redox/compare/v1.1.1...v1.2.0
113
119
  [1.1.1]: https://github.com/WeInfuse/redox/compare/v1.1.0...v1.1.1
@@ -48,14 +48,18 @@ module Redox
48
48
  self
49
49
  end
50
50
 
51
- def to_json(args = nil)
52
- d = self.dup
51
+ def to_h
52
+ result = super.to_h
53
53
 
54
- [:EndDateTime, :DateTimeOfService].each do |k|
55
- d[k] = Redox::Models.format_datetime(d[k])
54
+ %w[EndDateTime DateTimeOfService].each do |k|
55
+ result[k] = Redox::Models.format_datetime(result[k])
56
56
  end
57
57
 
58
- d.to_h.to_json
58
+ result
59
+ end
60
+
61
+ def as_json(args)
62
+ self.to_h
59
63
  end
60
64
  end
61
65
  end
@@ -31,10 +31,22 @@ module Redox
31
31
  self[:Insurances] = self[:Insurances].map {|ins| ins.is_a?(Redox::Models::Insurance) ? ins : Insurance.new(ins) }
32
32
  end
33
33
 
34
- def to_json(args = nil)
35
- d = self.dup
36
- d[:VisitDateTime] = Redox::Models.format_datetime(d[:VisitDateTime])
37
- d.to_h.to_json
34
+ def to_h
35
+ result = super.to_h
36
+
37
+ %w[VisitDateTime].each do |k|
38
+ result[key][k] = Redox::Models.format_datetime(result[key][k])
39
+ end
40
+
41
+ result
42
+ end
43
+
44
+ def to_json(args = {})
45
+ self.to_h.to_json
46
+ end
47
+
48
+ def as_json(args = {})
49
+ self.to_h.dig('Visit')
38
50
  end
39
51
  end
40
52
  end
@@ -1,3 +1,3 @@
1
1
  module Redox
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Clark
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2020-09-17 00:00:00.000000000 Z
13
+ date: 2020-10-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty