ozon-logistics 0.0.6 → 0.0.7
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: ffaf042b4939f2ec4c6b15ea459dd3481271a454cbba2fe57ab3ff5a68f61a6a
|
4
|
+
data.tar.gz: 2a8d7916ad20083eb73e88dbb8aef71913fab5c39c922900720fc40e60100588
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c6f855ef682ff805793cdc6238f872deb4b02d921efd7455de1eeec71fb352261011f3425120f9199bbe27c2a2fe205f1eeb0432d87bf5f08ffcd045d1f8652
|
7
|
+
data.tar.gz: e3420d7f8b3b5d6ce80a08eabd6a63ad175649d19bc2c73443fd844988ade4f0a4a9db49c9205040701247d926d4cb0b5f8b99209b638cf72f29b33be2f1b8a6
|
@@ -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.dig(:status) == 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.dig(:status)== 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.dig(:status) == 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.dig(:status) == 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.dig(:status) == 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
|