etracking 2.5.6 → 2.5.7
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/lib/etracking/client.rb +1 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 884fcde37863a4c6dc732cafe3cc48361a9a037955a67f38aa5ec32adf219c5a
|
4
|
+
data.tar.gz: ef92466e6a162f2a8a7b3b28bdab38ee372ec1aa0f6c8fc667317158be8373f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 856de2b9c82b11191722e18a0f450ed0d582f93e072271f1d1c6e21f2c01cb3566a2058163a797f9f5dcad7e1bcedb72ec4a6848bcb5555f617b4acef65826c9
|
7
|
+
data.tar.gz: c9b38ae0b6418fc633c5468b41ee26aa3e673c33ba9f08a8be40f753eea4924e0c51852412ac68fe9b0bc70f6d638e566f0062f35e13cf69c5accc64400c2084
|
data/lib/etracking/client.rb
CHANGED
@@ -43,6 +43,7 @@ module Etracking
|
|
43
43
|
request = Net::HTTP::Post.new(url)
|
44
44
|
request["etracking-api-key"] = api_key
|
45
45
|
request["etracking-key-secret"] = key_secret
|
46
|
+
request["accept-language"] = language || 'th'
|
46
47
|
request["content-type"] = ["application/json", "text/plain"]
|
47
48
|
request.body = payload.to_json
|
48
49
|
response = https.request(request)
|
@@ -83,8 +84,6 @@ module Etracking
|
|
83
84
|
end
|
84
85
|
|
85
86
|
def thailand_post(tracking_number)
|
86
|
-
thailand_post_api_key
|
87
|
-
|
88
87
|
api('/thailand_post', payload_tracking_number(tracking_number))
|
89
88
|
end
|
90
89
|
|
@@ -110,9 +109,5 @@ module Etracking
|
|
110
109
|
def key_secret_required
|
111
110
|
raise ArgumentError, '`key_secret` is not configured' unless key_secret
|
112
111
|
end
|
113
|
-
|
114
|
-
def thailand_post_api_key_required
|
115
|
-
raise ArgumentError, '`thailand_post_api_key` is not configured' unless thailand_post_api_key
|
116
|
-
end
|
117
112
|
end
|
118
113
|
end
|