dhl_express 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51cc9df7fdda53be9dbdd840a346cb328a27de2f
4
- data.tar.gz: 33f3c84bece5a0cc01d3126fd625d08666486bfe
3
+ metadata.gz: 612adcfffbd1ac598c6e98b11b54cfd6769b5edd
4
+ data.tar.gz: c2b602c512d09cdbd8df14aaef8852792f571d59
5
5
  SHA512:
6
- metadata.gz: 97aa304388d0cc9843b71c6dee0972140beb300c9904f57300a28be58a66cf540e0ec00f6b5e7f0d85b0f6c3a3b98d7c4683e6ad80795c3f7762d483a40a328e
7
- data.tar.gz: 3d3c4ca97aba5ef0d9c4b44eee94612cb52e8fa3d00b1ee84f8d95a618d5c5f6bc2796780f7c3901533d0b06884c03bdde7468264a5a693891cc173a4d56be97
6
+ metadata.gz: 80cf348896e146a41b2371cfd8cff35b89f9951be40d419d2e0d7d349b4da75f89c9c8e09478a418c8725bc7a6fe89d99457e7d25d0e15f1a6a3e6bb7aaa8131
7
+ data.tar.gz: d2954bb76d4db722e81d744e688504e33b6b954d38ff931129d15730728feed94d00b9e81cb77fe33bfe3009805aa95f97c68f78f697c71cb1f15bb9f92813f0
@@ -13,7 +13,7 @@ module DhlExpress
13
13
  raise ArgumentError unless tracking_number
14
14
 
15
15
  @tracking_number = tracking_number
16
- tracking_url = "https://www.mydhl.dhl.com/shipmentTracking?AWB=#{@tracking_number}"
16
+ tracking_url = "http://www.dhl-usa.com/shipmentTracking?AWB=#{@tracking_number}&countryCode=us&languageCode=en"
17
17
 
18
18
  @tracking_json = JSON.parse(Typhoeus.get(tracking_url).body)
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module DhlExpress
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://www.mydhl.dhl.com/shipmentTracking?AWB=1234567
5
+ uri: http://www.dhl-usa.com/shipmentTracking?AWB=1234567&countryCode=us&languageCode=en
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -14,26 +14,20 @@ http_interactions:
14
14
  code: 200
15
15
  message: OK
16
16
  headers:
17
- X-Frame-Options:
18
- - SAMEORIGIN
19
- Cache-Control:
20
- - s-maxage=172800
21
- - max-age=172800
22
17
  Content-Type:
23
18
  - application/json;charset=UTF-8
24
- Expires:
25
- - Mon, 10 Nov 2014 06:20:33 GMT
26
- MyHeader:
27
- - D=37339
28
19
  Content-Length:
29
20
  - '165'
21
+ Expires:
22
+ - Fri, 14 Nov 2014 00:42:28 GMT
23
+ Cache-Control:
24
+ - max-age=0, no-cache, no-store
25
+ Pragma:
26
+ - no-cache
30
27
  Date:
31
- - Sat, 08 Nov 2014 06:20:33 GMT
28
+ - Fri, 14 Nov 2014 00:42:28 GMT
32
29
  Connection:
33
30
  - keep-alive
34
- Set-Cookie:
35
- - TS017581b3=012d4839b318947c44326df3f5ecad656d3a45b00b5a5ef3b3f7bc08c8b390e91389419794;
36
- Path=/; Secure; HTTPOnly
37
31
  body:
38
32
  encoding: UTF-8
39
33
  string: |-
@@ -47,6 +41,6 @@ http_interactions:
47
41
  }
48
42
  http_version: '1.1'
49
43
  adapter_metadata:
50
- effective_url: https://www.mydhl.dhl.com/shipmentTracking?AWB=1234567
51
- recorded_at: Sat, 08 Nov 2014 06:20:33 GMT
44
+ effective_url: http://www.dhl-usa.com/shipmentTracking?AWB=1234567&countryCode=us&languageCode=en
45
+ recorded_at: Fri, 14 Nov 2014 00:42:28 GMT
52
46
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://www.mydhl.dhl.com/shipmentTracking?AWB=6476119576
5
+ uri: http://www.dhl-usa.com/shipmentTracking?AWB=6476119576&countryCode=us&languageCode=en
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -14,27 +14,23 @@ http_interactions:
14
14
  code: 200
15
15
  message: OK
16
16
  headers:
17
- Cache-Control:
18
- - s-maxage=172800
19
- Expires:
20
- - Mon, 10 Nov 2014 05:37:23 GMT
21
- MyHeader:
22
- - D=454085
23
- X-Frame-Options:
24
- - SAMEORIGIN
25
- Content-Length:
26
- - '1404'
27
17
  Content-Type:
28
18
  - application/json;charset=UTF-8
19
+ Content-Length:
20
+ - '5499'
21
+ Expires:
22
+ - Fri, 14 Nov 2014 00:42:29 GMT
23
+ Cache-Control:
24
+ - max-age=0, no-cache, no-store
25
+ Pragma:
26
+ - no-cache
29
27
  Date:
30
- - Sat, 08 Nov 2014 06:20:33 GMT
28
+ - Fri, 14 Nov 2014 00:42:29 GMT
31
29
  Connection:
32
30
  - keep-alive
33
31
  Set-Cookie:
34
- - TS016f3c0b=01914b743d55f0dfe481a6f14f9bc17ce30eb4edd08abab906ac918865663d03d83d32b156;
32
+ - TS016f3c0b=01914b743de0fe040073f129bd32830fe238f20a70839e8ed4b37f00dacb23f11191247d17;
35
33
  Path=/
36
- - TS017581b3=012d4839b38099af17f13f251b42089167c25acb0b0d839e5ed0d86c977ba6852bec27780bf8dd29a4441c4ee72715fae48a420d94;
37
- Path=/; Secure; HTTPOnly
38
34
  body:
39
35
  encoding: UTF-8
40
36
  string: |-
@@ -44,6 +40,10 @@ http_interactions:
44
40
  "label" : "Waybill",
45
41
  "type" : "airwaybill",
46
42
  "duplicate" : false,
43
+ "delivery" : {
44
+ "code" : "101",
45
+ "status" : "delivered"
46
+ },
47
47
  "origin" : {
48
48
  "value" : "TOKYO - HIGASHIKURUME - JAPAN",
49
49
  "label" : "Origin Service Area",
@@ -54,24 +54,145 @@ http_interactions:
54
54
  "label" : "Destination Service Area",
55
55
  "url" : "http://www.dhl-usa.com/en/country_profile.html"
56
56
  },
57
- "description" : "Shipment information received : Friday, November 07, 2014 at 15:34",
57
+ "description" : "Delivered - Signed for by : Tuesday, November 11, 2014 at 10:46 AM",
58
58
  "hasDuplicateShipment" : false,
59
59
  "signature" : {
60
60
  "link" : {
61
- "url" : "https://proview.dhl.com/GC3/proview/adhocnotify?id=mAtE%2F0oL0r0wvmjggydn8Zh%2FkrRB7XethXdun71Ou1A%3D&appuid=ONWLDos95lgDjSxbiEfEsg%3D%3D&locale=en_G0&token=R3Fk9Yr1tYl7WI25yMeMGrA0V4qA124LF2O22zX5298%3D",
62
- "label" : "Sign up for shipment notifications"
61
+ "url" : "https://webpod.dhl.com/webPOD/DHLePODRequest?hwb=6VOW9nUCQLG7t9JTv9GxfA%3D%3D&pudate=dF1NuwwGCJkiiUL1Uem1WA%3D%3D&appuid=Cen%2BQLKtH%2BZt07%2FzXi%2BsVQ%3D%3D&language=en&country=US",
62
+ "label" : "Get Signature Proof of Delivery"
63
63
  },
64
- "type" : "proview",
65
- "description" : "Friday, November 07, 2014 at 15:34",
66
- "signatory" : "Shipment information received ",
64
+ "type" : "epod",
65
+ "description" : "Tuesday, November 11, 2014 at 10:46 AM",
66
+ "signatory" : "Delivered - Signed for by ",
67
67
  "help" : "help"
68
68
  },
69
+ "extraShipmentDetails" : {
70
+ "from" : [ "Higashikurume , Japan" ],
71
+ "to" : [ "DAMON ROBERTS", "Greensboro , NC 27407", "United States of America" ],
72
+ "noteOnWeight" : {
73
+ "value" : "The weights displayed on this website are the weights provided when the shipment was created. Actual chargeable weights may be different and will be provided on the invoice",
74
+ "label" : "Note on Weight"
75
+ },
76
+ "information" : [ {
77
+ "value" : "2.9 lbs",
78
+ "label" : "Total Weight"
79
+ }, {
80
+ "value" : "BOOK",
81
+ "label" : "Description"
82
+ }, {
83
+ "value" : "EXPRESS WORLDWIDE nondoc",
84
+ "label" : "Service"
85
+ }, {
86
+ "value" : "11/10/2014",
87
+ "label" : "Ship Date"
88
+ }, {
89
+ "value" : "Package",
90
+ "label" : "Ship Type"
91
+ }, {
92
+ "value" : "1",
93
+ "label" : "Pieces"
94
+ } ]
95
+ },
96
+ "pieces" : {
97
+ "value" : 1,
98
+ "label" : "Pieces",
99
+ "showSummary" : true,
100
+ "pIds" : [ "JD014600001324883884" ]
101
+ },
69
102
  "checkpoints" : [ {
103
+ "counter" : 12,
104
+ "description" : "Delivered - Signed for by ",
105
+ "time" : "10:46 AM",
106
+ "date" : "Tuesday, November 11, 2014 ",
107
+ "location" : "GREENSBORO ",
108
+ "totalPieces" : 1,
109
+ "pIds" : [ "JD014600001324883884" ]
110
+ }, {
111
+ "counter" : 11,
112
+ "description" : "With delivery courier",
113
+ "time" : "8:28 AM",
114
+ "date" : "Tuesday, November 11, 2014 ",
115
+ "location" : "GREENSBORO, NC - USA",
116
+ "totalPieces" : 1,
117
+ "pIds" : [ "JD014600001324883884" ]
118
+ }, {
119
+ "counter" : 10,
120
+ "description" : "Arrived at Delivery Facility in GREENSBORO - USA",
121
+ "time" : "7:44 AM",
122
+ "date" : "Tuesday, November 11, 2014 ",
123
+ "location" : "GREENSBORO, NC - USA",
124
+ "totalPieces" : 1,
125
+ "pIds" : [ "JD014600001324883884" ]
126
+ }, {
127
+ "counter" : 9,
128
+ "description" : "Departed Facility in CINCINNATI HUB - USA",
129
+ "time" : "5:49 AM",
130
+ "date" : "Tuesday, November 11, 2014 ",
131
+ "location" : "CINCINNATI HUB, OH - USA",
132
+ "totalPieces" : 1,
133
+ "pIds" : [ "JD014600001324883884" ]
134
+ }, {
135
+ "counter" : 8,
136
+ "description" : "Processed at CINCINNATI HUB - USA",
137
+ "time" : "4:09 AM",
138
+ "date" : "Tuesday, November 11, 2014 ",
139
+ "location" : "CINCINNATI HUB, OH - USA",
140
+ "totalPieces" : 1,
141
+ "pIds" : [ "JD014600001324883884" ]
142
+ }, {
143
+ "counter" : 7,
144
+ "description" : "Clearance processing complete at CINCINNATI HUB - USA",
145
+ "time" : "3:36 AM",
146
+ "date" : "Tuesday, November 11, 2014 ",
147
+ "location" : "CINCINNATI HUB, OH - USA",
148
+ "totalPieces" : 1,
149
+ "pIds" : [ "JD014600001324883884" ]
150
+ }, {
151
+ "counter" : 6,
152
+ "description" : "Arrived at Sort Facility CINCINNATI HUB - USA",
153
+ "time" : "3:07 AM",
154
+ "date" : "Tuesday, November 11, 2014 ",
155
+ "location" : "CINCINNATI HUB, OH - USA",
156
+ "totalPieces" : 1,
157
+ "pIds" : [ "JD014600001324883884" ]
158
+ }, {
159
+ "counter" : 5,
160
+ "description" : "Customs status updated",
161
+ "time" : "12:54 PM",
162
+ "date" : "Monday, November 10, 2014 ",
163
+ "location" : "CINCINNATI HUB, OH - USA"
164
+ }, {
165
+ "counter" : 4,
166
+ "description" : "Departed Facility in TOKYO - JAPAN",
167
+ "time" : "9:28 PM",
168
+ "date" : "Monday, November 10, 2014 ",
169
+ "location" : "TOKYO - JAPAN",
170
+ "totalPieces" : 1,
171
+ "pIds" : [ "JD014600001324883884" ]
172
+ }, {
173
+ "counter" : 3,
174
+ "description" : "Processed at TOKYO - JAPAN",
175
+ "time" : "8:16 PM",
176
+ "date" : "Monday, November 10, 2014 ",
177
+ "location" : "TOKYO - JAPAN",
178
+ "totalPieces" : 1,
179
+ "pIds" : [ "JD014600001324883884" ]
180
+ }, {
181
+ "counter" : 2,
182
+ "description" : "Arrived at Sort Facility TOKYO - JAPAN",
183
+ "time" : "6:54 PM",
184
+ "date" : "Monday, November 10, 2014 ",
185
+ "location" : "TOKYO - JAPAN",
186
+ "totalPieces" : 1,
187
+ "pIds" : [ "JD014600001324883884" ]
188
+ }, {
70
189
  "counter" : 1,
71
- "description" : "Shipment information received",
72
- "time" : "15:34",
73
- "date" : "Friday, November 07, 2014 ",
74
- "location" : "TOKYO - JAPAN"
190
+ "description" : "Shipment picked up",
191
+ "time" : "1:53 PM",
192
+ "date" : "Monday, November 10, 2014 ",
193
+ "location" : "TOKYO - JAPAN",
194
+ "totalPieces" : 1,
195
+ "pIds" : [ "JD014600001324883884" ]
75
196
  } ],
76
197
  "checkpointLocationLabel" : "Location",
77
198
  "checkpointTimeLabel" : "Time"
@@ -79,6 +200,6 @@ http_interactions:
79
200
  }
80
201
  http_version: '1.1'
81
202
  adapter_metadata:
82
- effective_url: https://www.mydhl.dhl.com/shipmentTracking?AWB=6476119576
83
- recorded_at: Sat, 08 Nov 2014 06:20:33 GMT
203
+ effective_url: http://www.dhl-usa.com/shipmentTracking?AWB=6476119576&countryCode=us&languageCode=en
204
+ recorded_at: Fri, 14 Nov 2014 00:42:29 GMT
84
205
  recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhl_express
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Szturo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-10 00:00:00.000000000 Z
11
+ date: 2014-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri