dhl_api 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -2
- data/README.md +3 -5
- data/lib/dhl_api/clients/retoure_client.rb +2 -1
- 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: 926c694d2d3c2c5f278c62e10f8aa014b86480f8d2f3207f7fe42ab8891febd0
|
4
|
+
data.tar.gz: 838f29f55a1693c6d007537b65c970a1e59e5c4ce45d54775eb818f658668b1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc318898989145a21275132969bf2e891d86e9cba18117f58ba2db428152d1b249099595828b4a9c9b9ddffab65a057d3290ce22c5ac9e664a36e1084898c559
|
7
|
+
data.tar.gz: 6dd5d180bb173446a7bde4e21188c2d50ae0ee8e697141bf22ef4e56fa4fd191f0048e762f8b51299d23aa39d0dccd246eb7fcc34d51046f8a9daf9308a584f1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
|
-
## [
|
1
|
+
## [0.1.2] - 2023-06-27
|
2
2
|
|
3
|
-
|
3
|
+
- Transform payload keys to lowerCamel before send.
|
4
|
+
|
5
|
+
## [0.1.1] - 2023-06-26
|
6
|
+
|
7
|
+
- Rename DHL constant to DHLAPI
|
8
|
+
- Rename dhl to dhl_api
|
9
|
+
|
10
|
+
## [0.1.0] - 2023-06-26
|
4
11
|
|
5
12
|
- Initial release
|
13
|
+
- Add Retoure label creation
|
14
|
+
- Add Unified Tracking
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# DHL API
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This is a Ruby API wrapper for DHL. Right now, we only cover Retoure & Tracking. Feel free to extend the gem t cover more DHL services.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -72,7 +70,7 @@ tracking = track_client.track(tracking_number: '420025369374810912402173942693')
|
|
72
70
|
|
73
71
|
# You can access the raw response by calling by calling the #response:
|
74
72
|
retoure_client.response
|
75
|
-
|
73
|
+
track_client.response
|
76
74
|
# It is a HTTP::Response object. See https://github.com/httprb/http/wiki/Response-Handling for more info.
|
77
75
|
|
78
76
|
# You can access the raw attributes before the keys is parsed to snake_case by calling the #attributes:
|
@@ -17,7 +17,8 @@ module DHLAPI
|
|
17
17
|
attr_accessor :label_type
|
18
18
|
|
19
19
|
def create_label(attributes = {})
|
20
|
-
|
20
|
+
payload = attributes.deep_transform_keys { |key| key.to_s.camelize(:lower) }
|
21
|
+
self.response = connection.post(url, json: payload, params: { labelType: label_type })
|
21
22
|
RetoureLabel.new handle_response.parse
|
22
23
|
end
|
23
24
|
|
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.2
|
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-06-
|
11
|
+
date: 2023-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|