my_john_deere_api 2.3.3 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +236 -3
- data/lib/my_john_deere_api.rb +1 -0
- data/lib/my_john_deere_api/client.rb +13 -3
- data/lib/my_john_deere_api/net_http_retry.rb +2 -0
- data/lib/my_john_deere_api/net_http_retry/decorator.rb +53 -0
- data/lib/my_john_deere_api/net_http_retry/max_retries_exceeded_error.rb +20 -0
- data/lib/my_john_deere_api/version.rb +1 -1
- data/test/lib/my_john_deere_api/client_test.rb +20 -3
- data/test/lib/my_john_deere_api/errors/max_retries_exceeded_error_test.rb +13 -0
- data/test/lib/my_john_deere_api/net_http_retry/decorator_test.rb +163 -0
- data/test/support/helper.rb +1 -0
- data/test/support/vcr/accessor/delete_failed.yml +327 -0
- data/test/support/vcr/accessor/delete_max_failed.yml +615 -0
- data/test/support/vcr/accessor/delete_retry.yml +191 -0
- data/test/support/vcr/accessor/delete_retry_too_soon.yml +191 -0
- data/test/support/vcr/accessor/get_failed.yml +390 -0
- data/test/support/vcr/accessor/get_max_failed.yml +734 -0
- data/test/support/vcr/accessor/get_retry.yml +226 -0
- data/test/support/vcr/accessor/get_retry_too_soon.yml +226 -0
- data/test/support/vcr/accessor/post_failed.yml +417 -0
- data/test/support/vcr/accessor/post_max_failed.yml +785 -0
- data/test/support/vcr/accessor/post_retry.yml +241 -0
- data/test/support/vcr/accessor/post_retry_too_soon.yml +241 -0
- data/test/support/vcr/accessor/put_failed.yml +372 -0
- data/test/support/vcr/accessor/put_max_failed.yml +700 -0
- data/test/support/vcr/accessor/put_retry.yml +216 -0
- data/test/support/vcr/accessor/put_retry_too_soon.yml +216 -0
- metadata +24 -3
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'support/helper'
|
2
|
+
|
3
|
+
describe 'JD::NetHttpRetry::MaxRetriesExceededError' do
|
4
|
+
it 'inherits from StandardError' do
|
5
|
+
error = JD::NetHttpRetry::MaxRetriesExceededError.new(:get, '503')
|
6
|
+
assert_kind_of StandardError, error
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'accepts a request description, and includes in message' do
|
10
|
+
message = JD::NetHttpRetry::MaxRetriesExceededError.new(:get, '503 Service Unavailable').message
|
11
|
+
assert_equal message, "Max retries exceeded for GET request: 503 Service Unavailable"
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,163 @@
|
|
1
|
+
require 'support/helper'
|
2
|
+
|
3
|
+
describe 'JD::NetHttpRetry::Decorator' do
|
4
|
+
REQUESTS = {
|
5
|
+
get: '/',
|
6
|
+
post: '/organizations/000000/assets',
|
7
|
+
put: '/assets/00000000-0000-0000-0000-000000000000',
|
8
|
+
delete: '/assets/00000000-0000-0000-0000-000000000000'
|
9
|
+
}
|
10
|
+
|
11
|
+
REQUEST_METHODS = REQUESTS.keys
|
12
|
+
|
13
|
+
let(:klass) { JD::NetHttpRetry::Decorator }
|
14
|
+
let(:object) { klass.new(mock, options) }
|
15
|
+
|
16
|
+
let(:options) do
|
17
|
+
{
|
18
|
+
request_methods: request_methods,
|
19
|
+
retry_delay_exponent: retry_delay_exponent,
|
20
|
+
max_retries: max_retries,
|
21
|
+
response_codes: response_codes
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
let(:request_methods) { nil }
|
26
|
+
let(:retry_delay_exponent) { nil }
|
27
|
+
let(:max_retries) { nil }
|
28
|
+
let(:response_codes) { nil }
|
29
|
+
|
30
|
+
let(:retry_values) { [13, 17, 19, 23] }
|
31
|
+
let(:exponential_retries) { (0..klass::DEFAULTS[:max_retries]-1).map{|i| 2 ** i} }
|
32
|
+
|
33
|
+
it 'wraps a "net-http"-responsive object' do
|
34
|
+
assert_kind_of OAuth::AccessToken, accessor.object
|
35
|
+
end
|
36
|
+
|
37
|
+
describe '#initialize' do
|
38
|
+
describe 'when request methods are specified' do
|
39
|
+
let(:request_methods) { [:banana, :fana, :fofana] }
|
40
|
+
|
41
|
+
it 'uses the supplied values' do
|
42
|
+
assert_equal request_methods, object.request_methods
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe 'when request methods are not specified' do
|
47
|
+
it 'uses the default values' do
|
48
|
+
assert_equal klass::DEFAULTS[:request_methods], object.request_methods
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe 'when retry_delay_exponent is specified' do
|
53
|
+
let(:retry_delay_exponent) { 42 }
|
54
|
+
|
55
|
+
it 'uses the supplied value' do
|
56
|
+
assert_equal retry_delay_exponent, object.retry_delay_exponent
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe 'when retry_delay_exponent is not specified' do
|
61
|
+
it 'uses the default value' do
|
62
|
+
assert_equal klass::DEFAULTS[:retry_delay_exponent], object.retry_delay_exponent
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe 'when max_retries is specified' do
|
67
|
+
let(:max_retries) { 42 }
|
68
|
+
|
69
|
+
it 'uses the supplied value' do
|
70
|
+
assert_equal max_retries, object.max_retries
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
describe 'when max_retries is not specified' do
|
75
|
+
it 'uses the default value' do
|
76
|
+
assert_equal klass::DEFAULTS[:max_retries], object.max_retries
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe 'when response_codes are specified' do
|
81
|
+
let(:response_codes) { ['200', '201'] }
|
82
|
+
|
83
|
+
it 'uses the supplied values' do
|
84
|
+
assert_equal response_codes, object.response_codes
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe 'when response_codes are specified as integers' do
|
89
|
+
let(:response_codes) { [200, 201] }
|
90
|
+
|
91
|
+
it 'uses the stringified versions of the supplied values' do
|
92
|
+
assert_equal response_codes.map(&:to_s), object.response_codes
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
describe 'when response_codes are not specified' do
|
97
|
+
it 'uses the default values' do
|
98
|
+
assert_equal klass::DEFAULTS[:response_codes], object.response_codes
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
describe "honors Retry-After headers" do
|
104
|
+
REQUEST_METHODS.each do |request_method|
|
105
|
+
it "in #{request_method.to_s.upcase} requests" do
|
106
|
+
retry_values.each do |retry_seconds|
|
107
|
+
accessor.expects(:sleep).with(retry_seconds)
|
108
|
+
end
|
109
|
+
|
110
|
+
VCR.use_cassette("accessor/#{request_method}_retry") do
|
111
|
+
accessor.send(request_method, REQUESTS[request_method])
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
describe 'employs exponential wait times for automatic retries' do
|
118
|
+
REQUEST_METHODS.each do |request_method|
|
119
|
+
it "in #{request_method.to_s.upcase} requests" do
|
120
|
+
exponential_retries[0,8].each do |retry_seconds|
|
121
|
+
accessor.expects(:sleep).with(retry_seconds)
|
122
|
+
end
|
123
|
+
|
124
|
+
VCR.use_cassette("accessor/#{request_method}_failed") do
|
125
|
+
accessor.send(request_method, REQUESTS[request_method])
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
describe 'when Retry-After is shorter than exponential wait time' do
|
132
|
+
REQUEST_METHODS.each do |request_method|
|
133
|
+
it "chooses longer exponential time in #{request_method.to_s.upcase} requests" do
|
134
|
+
exponential_retries[0,4].each do |retry_seconds|
|
135
|
+
accessor.expects(:sleep).with(retry_seconds)
|
136
|
+
end
|
137
|
+
|
138
|
+
VCR.use_cassette("accessor/#{request_method}_retry_too_soon") do
|
139
|
+
accessor.send(request_method, REQUESTS[request_method])
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
describe 'when max retries have been reached' do
|
146
|
+
REQUEST_METHODS.each do |request_method|
|
147
|
+
it "returns an error for #{request_method.to_s.upcase} requests" do
|
148
|
+
exponential_retries.each do |retry_seconds|
|
149
|
+
accessor.expects(:sleep).with(retry_seconds)
|
150
|
+
end
|
151
|
+
|
152
|
+
exception = assert_raises(JD::NetHttpRetry::MaxRetriesExceededError) do
|
153
|
+
VCR.use_cassette("accessor/#{request_method}_max_failed") do
|
154
|
+
accessor.send(request_method, REQUESTS[request_method])
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
expected_error = "Max retries exceeded for #{request_method.to_s.upcase} request: 429 Too Many Requests"
|
159
|
+
assert_equal expected_error, exception.message
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
data/test/support/helper.rb
CHANGED
@@ -0,0 +1,327 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/vnd.deere.axiom.v3+json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
User-Agent:
|
15
|
+
- OAuth gem v0.5.4
|
16
|
+
Authorization:
|
17
|
+
- OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
18
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
19
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
20
|
+
oauth_version="1.0"
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 429
|
24
|
+
message: Too Many Requests
|
25
|
+
headers:
|
26
|
+
Date:
|
27
|
+
- Mon, 10 Feb 2020 17:29:36 GMT
|
28
|
+
X-Deere-Handling-Server:
|
29
|
+
- ip-10-214-45-99
|
30
|
+
X-Frame-Options:
|
31
|
+
- SAMEORIGIN
|
32
|
+
X-Deere-Elapsed-Ms:
|
33
|
+
- '96'
|
34
|
+
body:
|
35
|
+
encoding: UTF-8
|
36
|
+
string: ''
|
37
|
+
http_version:
|
38
|
+
recorded_at: Mon, 10 Feb 2020 17:29:36 GMT
|
39
|
+
- request:
|
40
|
+
method: delete
|
41
|
+
uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ''
|
45
|
+
headers:
|
46
|
+
Accept:
|
47
|
+
- application/vnd.deere.axiom.v3+json
|
48
|
+
Accept-Encoding:
|
49
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
50
|
+
User-Agent:
|
51
|
+
- OAuth gem v0.5.4
|
52
|
+
Authorization:
|
53
|
+
- OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
54
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
55
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
56
|
+
oauth_version="1.0"
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 429
|
60
|
+
message: Too Many Requests
|
61
|
+
headers:
|
62
|
+
Date:
|
63
|
+
- Mon, 10 Feb 2020 17:29:36 GMT
|
64
|
+
X-Deere-Handling-Server:
|
65
|
+
- ip-10-214-45-99
|
66
|
+
X-Frame-Options:
|
67
|
+
- SAMEORIGIN
|
68
|
+
X-Deere-Elapsed-Ms:
|
69
|
+
- '96'
|
70
|
+
body:
|
71
|
+
encoding: UTF-8
|
72
|
+
string: ''
|
73
|
+
http_version:
|
74
|
+
recorded_at: Mon, 10 Feb 2020 17:29:36 GMT
|
75
|
+
- request:
|
76
|
+
method: delete
|
77
|
+
uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
78
|
+
body:
|
79
|
+
encoding: US-ASCII
|
80
|
+
string: ''
|
81
|
+
headers:
|
82
|
+
Accept:
|
83
|
+
- application/vnd.deere.axiom.v3+json
|
84
|
+
Accept-Encoding:
|
85
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
86
|
+
User-Agent:
|
87
|
+
- OAuth gem v0.5.4
|
88
|
+
Authorization:
|
89
|
+
- OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
90
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
91
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
92
|
+
oauth_version="1.0"
|
93
|
+
response:
|
94
|
+
status:
|
95
|
+
code: 503
|
96
|
+
message: Service Unavailable
|
97
|
+
headers:
|
98
|
+
Date:
|
99
|
+
- Mon, 10 Feb 2020 17:29:36 GMT
|
100
|
+
X-Deere-Handling-Server:
|
101
|
+
- ip-10-214-45-99
|
102
|
+
X-Frame-Options:
|
103
|
+
- SAMEORIGIN
|
104
|
+
X-Deere-Elapsed-Ms:
|
105
|
+
- '96'
|
106
|
+
body:
|
107
|
+
encoding: UTF-8
|
108
|
+
string: ''
|
109
|
+
http_version:
|
110
|
+
recorded_at: Mon, 10 Feb 2020 17:29:36 GMT
|
111
|
+
- request:
|
112
|
+
method: delete
|
113
|
+
uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
114
|
+
body:
|
115
|
+
encoding: US-ASCII
|
116
|
+
string: ''
|
117
|
+
headers:
|
118
|
+
Accept:
|
119
|
+
- application/vnd.deere.axiom.v3+json
|
120
|
+
Accept-Encoding:
|
121
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
122
|
+
User-Agent:
|
123
|
+
- OAuth gem v0.5.4
|
124
|
+
Authorization:
|
125
|
+
- OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
126
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
127
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
128
|
+
oauth_version="1.0"
|
129
|
+
response:
|
130
|
+
status:
|
131
|
+
code: 503
|
132
|
+
message: Service Unavailable
|
133
|
+
headers:
|
134
|
+
Date:
|
135
|
+
- Mon, 10 Feb 2020 17:29:36 GMT
|
136
|
+
X-Deere-Handling-Server:
|
137
|
+
- ip-10-214-45-99
|
138
|
+
X-Frame-Options:
|
139
|
+
- SAMEORIGIN
|
140
|
+
X-Deere-Elapsed-Ms:
|
141
|
+
- '96'
|
142
|
+
body:
|
143
|
+
encoding: UTF-8
|
144
|
+
string: ''
|
145
|
+
http_version:
|
146
|
+
recorded_at: Mon, 10 Feb 2020 17:29:36 GMT
|
147
|
+
- request:
|
148
|
+
method: delete
|
149
|
+
uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
150
|
+
body:
|
151
|
+
encoding: US-ASCII
|
152
|
+
string: ''
|
153
|
+
headers:
|
154
|
+
Accept:
|
155
|
+
- application/vnd.deere.axiom.v3+json
|
156
|
+
Accept-Encoding:
|
157
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
158
|
+
User-Agent:
|
159
|
+
- OAuth gem v0.5.4
|
160
|
+
Authorization:
|
161
|
+
- OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
162
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
163
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
164
|
+
oauth_version="1.0"
|
165
|
+
response:
|
166
|
+
status:
|
167
|
+
code: 429
|
168
|
+
message: Too Many Requests
|
169
|
+
headers:
|
170
|
+
Date:
|
171
|
+
- Mon, 10 Feb 2020 17:29:36 GMT
|
172
|
+
X-Deere-Handling-Server:
|
173
|
+
- ip-10-214-45-99
|
174
|
+
X-Frame-Options:
|
175
|
+
- SAMEORIGIN
|
176
|
+
X-Deere-Elapsed-Ms:
|
177
|
+
- '96'
|
178
|
+
body:
|
179
|
+
encoding: UTF-8
|
180
|
+
string: ''
|
181
|
+
http_version:
|
182
|
+
recorded_at: Mon, 10 Feb 2020 17:29:36 GMT
|
183
|
+
- request:
|
184
|
+
method: delete
|
185
|
+
uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
186
|
+
body:
|
187
|
+
encoding: US-ASCII
|
188
|
+
string: ''
|
189
|
+
headers:
|
190
|
+
Accept:
|
191
|
+
- application/vnd.deere.axiom.v3+json
|
192
|
+
Accept-Encoding:
|
193
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
194
|
+
User-Agent:
|
195
|
+
- OAuth gem v0.5.4
|
196
|
+
Authorization:
|
197
|
+
- OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
198
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
199
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
200
|
+
oauth_version="1.0"
|
201
|
+
response:
|
202
|
+
status:
|
203
|
+
code: 429
|
204
|
+
message: Too Many Requests
|
205
|
+
headers:
|
206
|
+
Date:
|
207
|
+
- Mon, 10 Feb 2020 17:29:36 GMT
|
208
|
+
X-Deere-Handling-Server:
|
209
|
+
- ip-10-214-45-99
|
210
|
+
X-Frame-Options:
|
211
|
+
- SAMEORIGIN
|
212
|
+
X-Deere-Elapsed-Ms:
|
213
|
+
- '96'
|
214
|
+
body:
|
215
|
+
encoding: UTF-8
|
216
|
+
string: ''
|
217
|
+
http_version:
|
218
|
+
recorded_at: Mon, 10 Feb 2020 17:29:36 GMT
|
219
|
+
- request:
|
220
|
+
method: delete
|
221
|
+
uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
222
|
+
body:
|
223
|
+
encoding: US-ASCII
|
224
|
+
string: ''
|
225
|
+
headers:
|
226
|
+
Accept:
|
227
|
+
- application/vnd.deere.axiom.v3+json
|
228
|
+
Accept-Encoding:
|
229
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
230
|
+
User-Agent:
|
231
|
+
- OAuth gem v0.5.4
|
232
|
+
Authorization:
|
233
|
+
- OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
234
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
235
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
236
|
+
oauth_version="1.0"
|
237
|
+
response:
|
238
|
+
status:
|
239
|
+
code: 503
|
240
|
+
message: Service Unavailable
|
241
|
+
headers:
|
242
|
+
Date:
|
243
|
+
- Mon, 10 Feb 2020 17:29:36 GMT
|
244
|
+
X-Deere-Handling-Server:
|
245
|
+
- ip-10-214-45-99
|
246
|
+
X-Frame-Options:
|
247
|
+
- SAMEORIGIN
|
248
|
+
X-Deere-Elapsed-Ms:
|
249
|
+
- '96'
|
250
|
+
body:
|
251
|
+
encoding: UTF-8
|
252
|
+
string: ''
|
253
|
+
http_version:
|
254
|
+
recorded_at: Mon, 10 Feb 2020 17:29:36 GMT
|
255
|
+
- request:
|
256
|
+
method: delete
|
257
|
+
uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
258
|
+
body:
|
259
|
+
encoding: US-ASCII
|
260
|
+
string: ''
|
261
|
+
headers:
|
262
|
+
Accept:
|
263
|
+
- application/vnd.deere.axiom.v3+json
|
264
|
+
Accept-Encoding:
|
265
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
266
|
+
User-Agent:
|
267
|
+
- OAuth gem v0.5.4
|
268
|
+
Authorization:
|
269
|
+
- OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
270
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
271
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
272
|
+
oauth_version="1.0"
|
273
|
+
response:
|
274
|
+
status:
|
275
|
+
code: 503
|
276
|
+
message: Service Unavailable
|
277
|
+
headers:
|
278
|
+
Date:
|
279
|
+
- Mon, 10 Feb 2020 17:29:36 GMT
|
280
|
+
X-Deere-Handling-Server:
|
281
|
+
- ip-10-214-45-99
|
282
|
+
X-Frame-Options:
|
283
|
+
- SAMEORIGIN
|
284
|
+
X-Deere-Elapsed-Ms:
|
285
|
+
- '96'
|
286
|
+
body:
|
287
|
+
encoding: UTF-8
|
288
|
+
string: ''
|
289
|
+
http_version:
|
290
|
+
recorded_at: Mon, 10 Feb 2020 17:29:36 GMT
|
291
|
+
- request:
|
292
|
+
method: delete
|
293
|
+
uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
|
294
|
+
body:
|
295
|
+
encoding: US-ASCII
|
296
|
+
string: ''
|
297
|
+
headers:
|
298
|
+
Accept:
|
299
|
+
- application/vnd.deere.axiom.v3+json
|
300
|
+
Accept-Encoding:
|
301
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
302
|
+
User-Agent:
|
303
|
+
- OAuth gem v0.5.4
|
304
|
+
Authorization:
|
305
|
+
- OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
|
306
|
+
oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
|
307
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
|
308
|
+
oauth_version="1.0"
|
309
|
+
response:
|
310
|
+
status:
|
311
|
+
code: 204
|
312
|
+
message: No Content
|
313
|
+
headers:
|
314
|
+
Date:
|
315
|
+
- Mon, 10 Feb 2020 17:29:36 GMT
|
316
|
+
X-Deere-Handling-Server:
|
317
|
+
- ip-10-214-45-99
|
318
|
+
X-Frame-Options:
|
319
|
+
- SAMEORIGIN
|
320
|
+
X-Deere-Elapsed-Ms:
|
321
|
+
- '96'
|
322
|
+
body:
|
323
|
+
encoding: UTF-8
|
324
|
+
string: ''
|
325
|
+
http_version:
|
326
|
+
recorded_at: Mon, 10 Feb 2020 17:29:36 GMT
|
327
|
+
recorded_with: VCR 5.0.0
|