ozon-logistics 0.0.5 → 0.0.6

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
  SHA256:
3
- metadata.gz: 2168d1b02d6acacda56cffa233c5812ee1920b658eaa549a850ac26e491c9553
4
- data.tar.gz: 9d72536c7ab2b4d7513a7945265a067797ad79a922a69846117698a0f34eea0d
3
+ metadata.gz: 435947ecbb9b47558a5610a41123d5b075a2120d6b68bf869ab3b53117685def
4
+ data.tar.gz: fc432a84ae37d456622f62e9e7095834ad07a1fb7719a9ea16b62365cf99d076
5
5
  SHA512:
6
- metadata.gz: 230ec71e16c34f7e8ff6a3c5b7f62375d6f464bf3539fa7692964a8d2b99a3b157f163987491b9bf557b74841446f7a3cd0d7778851e107c1144f6b4d32900cc
7
- data.tar.gz: 2d39f2408ba2c5c4c1f309f4c279c5cb271fb34adfbc213ec5d6a8bf04302737b0cbdea7ebed29e668343236c8503c6ceaa309eac6fa746bfc3f30656e1d4d90
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[:status] == 401 && first_time
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[:status] == 401 && first_time
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[:status] == 401 && first_time
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[:status] == 401 && first_time
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[:status] == 401 && first_time
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ozon-logistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov