dhl_api 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/lib/dhl_api/objects/base_object.rb +5 -3
- data/lib/dhl_api/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: b126cc02ae47ac827f742a8a8f614e436a23e1189d9ccc51d635c9746b1fd9d4
|
4
|
+
data.tar.gz: 1ab4c06499dfef7822cfc96212671f0959db8128201dea6d18e95af7d846edd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e58f6dd2dbd912db675de70b8a841477f512f66659e1fd6bb0cab181132fd3befc60da989327a0a56801aa70b6f75fcbb7f90cf6de8914fd5896f5af1b228d6
|
7
|
+
data.tar.gz: b6e3afbdb7f851622420db9d982b1ef30b887805ce404720e9304a46d87b033f2bd10743d644bd0dcc1ac573654901f82656867e40f3a784e9b3c4e266c9ff0b
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dhl_api (0.1.
|
4
|
+
dhl_api (0.1.3)
|
5
5
|
activesupport (>= 4.0.2)
|
6
6
|
http (~> 5.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (7.0.2
|
11
|
+
activesupport (7.0.7.2)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (>= 1.6, < 2)
|
14
14
|
minitest (>= 5.1)
|
15
15
|
tzinfo (~> 2.0)
|
16
|
-
addressable (2.8.
|
16
|
+
addressable (2.8.5)
|
17
17
|
public_suffix (>= 2.0.2, < 6.0)
|
18
18
|
ast (2.4.2)
|
19
19
|
byebug (11.1.3)
|
20
20
|
coderay (1.1.3)
|
21
|
-
concurrent-ruby (1.
|
21
|
+
concurrent-ruby (1.2.2)
|
22
22
|
diff-lcs (1.5.0)
|
23
23
|
domain_name (0.5.20190701)
|
24
24
|
unf (>= 0.0.5, < 1.0.0)
|
@@ -51,7 +51,7 @@ GEM
|
|
51
51
|
http-cookie (1.0.5)
|
52
52
|
domain_name (~> 0.5)
|
53
53
|
http-form_data (2.3.0)
|
54
|
-
i18n (1.
|
54
|
+
i18n (1.14.1)
|
55
55
|
concurrent-ruby (~> 1.0)
|
56
56
|
json (2.6.3)
|
57
57
|
language_server-protocol (3.17.0.3)
|
@@ -64,7 +64,7 @@ GEM
|
|
64
64
|
rake (~> 13.0)
|
65
65
|
lumberjack (1.2.8)
|
66
66
|
method_source (1.0.0)
|
67
|
-
minitest (5.
|
67
|
+
minitest (5.19.0)
|
68
68
|
nenv (0.3.0)
|
69
69
|
notiffany (0.1.3)
|
70
70
|
nenv (~> 0.1)
|
@@ -79,7 +79,7 @@ GEM
|
|
79
79
|
pry-byebug (3.10.1)
|
80
80
|
byebug (~> 11.0)
|
81
81
|
pry (>= 0.13, < 0.15)
|
82
|
-
public_suffix (5.0.
|
82
|
+
public_suffix (5.0.3)
|
83
83
|
racc (1.7.1)
|
84
84
|
rainbow (3.1.1)
|
85
85
|
rake (13.0.6)
|
@@ -130,7 +130,7 @@ GEM
|
|
130
130
|
lint_roller (~> 1.0)
|
131
131
|
rubocop-performance (~> 1.18.0)
|
132
132
|
thor (1.2.2)
|
133
|
-
tzinfo (2.0.
|
133
|
+
tzinfo (2.0.6)
|
134
134
|
concurrent-ruby (~> 1.0)
|
135
135
|
unf (0.1.4)
|
136
136
|
unf_ext
|
@@ -4,7 +4,9 @@ module DHLAPI
|
|
4
4
|
|
5
5
|
def initialize(attributes = {})
|
6
6
|
@attributes = attributes
|
7
|
-
|
7
|
+
ostruct = to_ostruct(attributes)
|
8
|
+
ostruct = ostruct.empty? ? nil : ostruct
|
9
|
+
super ostruct
|
8
10
|
end
|
9
11
|
|
10
12
|
private
|
@@ -13,9 +15,9 @@ module DHLAPI
|
|
13
15
|
if obj.is_a?(Hash)
|
14
16
|
OpenStruct.new(obj.map { |key, val| [key.to_s.underscore, to_ostruct(val)] }.to_h)
|
15
17
|
elsif obj.is_a?(Array)
|
16
|
-
return if obj.empty?
|
17
|
-
|
18
18
|
obj.map { |o| to_ostruct(o) }
|
19
|
+
else # Assumed to be a primitive value
|
20
|
+
obj
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|
data/lib/dhl_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dhl_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Chong
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|