ozon-logistics 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ozon-logistics/api_request.rb +5 -5
- 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: 435947ecbb9b47558a5610a41123d5b075a2120d6b68bf869ab3b53117685def
|
4
|
+
data.tar.gz: fc432a84ae37d456622f62e9e7095834ad07a1fb7719a9ea16b62365cf99d076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64f7a27b9ab6e5ecccbb9c3047b01d95ddaf2896a75898f19dc08b602cf46b92f22b54c2c33519eca364ea2b8ac298dc6aad1f6735a39dd82ed295ebb68f2ed7
|
7
|
+
data.tar.gz: 6935d1def31c667bc04d999e55c6811ed7fd3b00a5ca2c4cefddd4908455bd9cbf5c63d4bb7d6abf237d89952abc271a64a12b2e5af92a9e69b17bdffa0a0894
|
@@ -14,7 +14,7 @@ module OzonLogistics
|
|
14
14
|
end
|
15
15
|
parse_response(response)
|
16
16
|
rescue => e
|
17
|
-
if e.response
|
17
|
+
if e.response.try(:code) == 401 && first_time
|
18
18
|
OzonLogistics::Request.access_token = OzonLogistics.generate_access_token.try(:dig, "access_token")
|
19
19
|
self.post(params: params, headers: headers, body: body, first_time: false)
|
20
20
|
else
|
@@ -33,7 +33,7 @@ module OzonLogistics
|
|
33
33
|
end
|
34
34
|
parse_response(response)
|
35
35
|
rescue => e
|
36
|
-
if e.response
|
36
|
+
if e.response.try(:code) == 401 && first_time
|
37
37
|
OzonLogistics::Request.access_token = OzonLogistics.generate_access_token.try(:dig, "access_token")
|
38
38
|
self.patch(params: params, headers: headers, body: body, first_time: false)
|
39
39
|
else
|
@@ -51,7 +51,7 @@ module OzonLogistics
|
|
51
51
|
end
|
52
52
|
parse_response(response)
|
53
53
|
rescue => e
|
54
|
-
if e.response
|
54
|
+
if e.response.try(:code) == 401 && first_time
|
55
55
|
OzonLogistics::Request.access_token = OzonLogistics.generate_access_token.try(:dig, "access_token")
|
56
56
|
self.put(params: params, headers: headers, body: body, first_time: false)
|
57
57
|
else
|
@@ -69,7 +69,7 @@ module OzonLogistics
|
|
69
69
|
end
|
70
70
|
parse_response(response)
|
71
71
|
rescue => e
|
72
|
-
if e.response
|
72
|
+
if e.response.try(:code) == 401 && first_time
|
73
73
|
OzonLogistics::Request.access_token = OzonLogistics.generate_access_token.try(:dig, "access_token")
|
74
74
|
self.get(params: params, headers: headers, first_time: false)
|
75
75
|
else
|
@@ -87,7 +87,7 @@ module OzonLogistics
|
|
87
87
|
end
|
88
88
|
parse_response(response)
|
89
89
|
rescue => e
|
90
|
-
if e.response
|
90
|
+
if e.response.try(:code) == 401 && first_time
|
91
91
|
OzonLogistics::Request.access_token = OzonLogistics.generate_access_token.try(:dig, "access_token")
|
92
92
|
self.delete(params: params, headers: headers, first_time: false)
|
93
93
|
else
|