my_john_deere_api 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +813 -0
  3. data/Rakefile +9 -0
  4. data/lib/my_john_deere_api.rb +17 -0
  5. data/lib/my_john_deere_api/authorize.rb +69 -0
  6. data/lib/my_john_deere_api/client.rb +151 -0
  7. data/lib/my_john_deere_api/consumer.rb +90 -0
  8. data/lib/my_john_deere_api/errors.rb +7 -0
  9. data/lib/my_john_deere_api/errors/invalid_record_error.rb +29 -0
  10. data/lib/my_john_deere_api/errors/missing_contribution_definition_id_error.rb +12 -0
  11. data/lib/my_john_deere_api/errors/not_yet_implemented_error.rb +12 -0
  12. data/lib/my_john_deere_api/errors/type_mismatch_error.rb +12 -0
  13. data/lib/my_john_deere_api/errors/unsupported_environment_error.rb +18 -0
  14. data/lib/my_john_deere_api/helpers.rb +6 -0
  15. data/lib/my_john_deere_api/helpers/case_conversion.rb +37 -0
  16. data/lib/my_john_deere_api/helpers/environment_helper.rb +25 -0
  17. data/lib/my_john_deere_api/helpers/uri_helpers.rb +19 -0
  18. data/lib/my_john_deere_api/helpers/validate_contribution_definition.rb +18 -0
  19. data/lib/my_john_deere_api/model.rb +10 -0
  20. data/lib/my_john_deere_api/model/asset.rb +69 -0
  21. data/lib/my_john_deere_api/model/asset_location.rb +19 -0
  22. data/lib/my_john_deere_api/model/base.rb +97 -0
  23. data/lib/my_john_deere_api/model/contribution_definition.rb +15 -0
  24. data/lib/my_john_deere_api/model/contribution_product.rb +33 -0
  25. data/lib/my_john_deere_api/model/field.rb +40 -0
  26. data/lib/my_john_deere_api/model/flag.rb +36 -0
  27. data/lib/my_john_deere_api/model/organization.rb +43 -0
  28. data/lib/my_john_deere_api/net_http_retry.rb +2 -0
  29. data/lib/my_john_deere_api/net_http_retry/decorator.rb +53 -0
  30. data/lib/my_john_deere_api/net_http_retry/max_retries_exceeded_error.rb +20 -0
  31. data/lib/my_john_deere_api/request.rb +6 -0
  32. data/lib/my_john_deere_api/request/collection.rb +10 -0
  33. data/lib/my_john_deere_api/request/collection/asset_locations.rb +27 -0
  34. data/lib/my_john_deere_api/request/collection/assets.rb +34 -0
  35. data/lib/my_john_deere_api/request/collection/base.rb +91 -0
  36. data/lib/my_john_deere_api/request/collection/contribution_definitions.rb +26 -0
  37. data/lib/my_john_deere_api/request/collection/contribution_products.rb +26 -0
  38. data/lib/my_john_deere_api/request/collection/fields.rb +26 -0
  39. data/lib/my_john_deere_api/request/collection/flags.rb +33 -0
  40. data/lib/my_john_deere_api/request/collection/organizations.rb +26 -0
  41. data/lib/my_john_deere_api/request/create.rb +5 -0
  42. data/lib/my_john_deere_api/request/create/asset.rb +57 -0
  43. data/lib/my_john_deere_api/request/create/asset_location.rb +110 -0
  44. data/lib/my_john_deere_api/request/create/base.rb +67 -0
  45. data/lib/my_john_deere_api/request/individual.rb +8 -0
  46. data/lib/my_john_deere_api/request/individual/asset.rb +19 -0
  47. data/lib/my_john_deere_api/request/individual/base.rb +52 -0
  48. data/lib/my_john_deere_api/request/individual/contribution_definition.rb +19 -0
  49. data/lib/my_john_deere_api/request/individual/contribution_product.rb +19 -0
  50. data/lib/my_john_deere_api/request/individual/field.rb +19 -0
  51. data/lib/my_john_deere_api/request/individual/organization.rb +19 -0
  52. data/lib/my_john_deere_api/request/update.rb +4 -0
  53. data/lib/my_john_deere_api/request/update/asset.rb +40 -0
  54. data/lib/my_john_deere_api/request/update/base.rb +67 -0
  55. data/lib/my_john_deere_api/validators.rb +5 -0
  56. data/lib/my_john_deere_api/validators/asset.rb +35 -0
  57. data/lib/my_john_deere_api/validators/asset_location.rb +34 -0
  58. data/lib/my_john_deere_api/validators/base.rb +67 -0
  59. data/lib/my_john_deere_api/version.rb +3 -0
  60. data/test/lib/my_john_deere_api/authorize_test.rb +81 -0
  61. data/test/lib/my_john_deere_api/client_test.rb +225 -0
  62. data/test/lib/my_john_deere_api/consumer_test.rb +58 -0
  63. data/test/lib/my_john_deere_api/errors/invalid_record_error_test.rb +26 -0
  64. data/test/lib/my_john_deere_api/errors/max_retries_exceeded_error_test.rb +13 -0
  65. data/test/lib/my_john_deere_api/errors/missing_contribution_definition_id_error_test.rb +14 -0
  66. data/test/lib/my_john_deere_api/errors/not_yet_implemented_error_test.rb +13 -0
  67. data/test/lib/my_john_deere_api/errors/type_mismatch_error_test.rb +13 -0
  68. data/test/lib/my_john_deere_api/errors/unsupported_environment_error_test.rb +18 -0
  69. data/test/lib/my_john_deere_api/errors_test.rb +25 -0
  70. data/test/lib/my_john_deere_api/helpers/case_conversion_test.rb +100 -0
  71. data/test/lib/my_john_deere_api/helpers/environment_helper_test.rb +67 -0
  72. data/test/lib/my_john_deere_api/helpers/uri_helpers_test.rb +58 -0
  73. data/test/lib/my_john_deere_api/helpers/validate_contribution_definition_test.rb +74 -0
  74. data/test/lib/my_john_deere_api/helpers_test.rb +21 -0
  75. data/test/lib/my_john_deere_api/model/asset_location_test.rb +38 -0
  76. data/test/lib/my_john_deere_api/model/asset_test.rb +133 -0
  77. data/test/lib/my_john_deere_api/model/base_test.rb +76 -0
  78. data/test/lib/my_john_deere_api/model/contribution_definition_test.rb +52 -0
  79. data/test/lib/my_john_deere_api/model/contribution_product_test.rb +82 -0
  80. data/test/lib/my_john_deere_api/model/field_test.rb +65 -0
  81. data/test/lib/my_john_deere_api/model/flag_test.rb +48 -0
  82. data/test/lib/my_john_deere_api/model/organization_test.rb +84 -0
  83. data/test/lib/my_john_deere_api/model_test.rb +37 -0
  84. data/test/lib/my_john_deere_api/net_http_retry/decorator_test.rb +163 -0
  85. data/test/lib/my_john_deere_api/request/collection/asset_locations_test.rb +102 -0
  86. data/test/lib/my_john_deere_api/request/collection/assets_test.rb +99 -0
  87. data/test/lib/my_john_deere_api/request/collection/base_test.rb +27 -0
  88. data/test/lib/my_john_deere_api/request/collection/contribution_definitions_test.rb +88 -0
  89. data/test/lib/my_john_deere_api/request/collection/contribution_products_test.rb +88 -0
  90. data/test/lib/my_john_deere_api/request/collection/fields_test.rb +86 -0
  91. data/test/lib/my_john_deere_api/request/collection/flags_test.rb +92 -0
  92. data/test/lib/my_john_deere_api/request/collection/organizations_test.rb +87 -0
  93. data/test/lib/my_john_deere_api/request/collection_test.rb +37 -0
  94. data/test/lib/my_john_deere_api/request/create/asset_location_test.rb +163 -0
  95. data/test/lib/my_john_deere_api/request/create/asset_test.rb +182 -0
  96. data/test/lib/my_john_deere_api/request/create/base_test.rb +29 -0
  97. data/test/lib/my_john_deere_api/request/create_test.rb +17 -0
  98. data/test/lib/my_john_deere_api/request/individual/asset_test.rb +33 -0
  99. data/test/lib/my_john_deere_api/request/individual/base_test.rb +18 -0
  100. data/test/lib/my_john_deere_api/request/individual/contribution_definition_test.rb +33 -0
  101. data/test/lib/my_john_deere_api/request/individual/contribution_product_test.rb +33 -0
  102. data/test/lib/my_john_deere_api/request/individual/field_test.rb +37 -0
  103. data/test/lib/my_john_deere_api/request/individual/organization_test.rb +33 -0
  104. data/test/lib/my_john_deere_api/request/individual_test.rb +29 -0
  105. data/test/lib/my_john_deere_api/request/update/asset_test.rb +99 -0
  106. data/test/lib/my_john_deere_api/request/update/base_test.rb +60 -0
  107. data/test/lib/my_john_deere_api/request/update_test.rb +13 -0
  108. data/test/lib/my_john_deere_api/request_test.rb +21 -0
  109. data/test/lib/my_john_deere_api/validators/asset_location_test.rb +61 -0
  110. data/test/lib/my_john_deere_api/validators/asset_test.rb +93 -0
  111. data/test/lib/my_john_deere_api/validators/base_test.rb +92 -0
  112. data/test/lib/my_john_deere_api/validators_test.rb +17 -0
  113. data/test/lib/my_john_deere_api/version_test.rb +9 -0
  114. data/test/my_john_deere_api_test.rb +37 -0
  115. data/test/support/helper.rb +97 -0
  116. data/test/support/vcr/accessor/delete_failed.yml +327 -0
  117. data/test/support/vcr/accessor/delete_max_failed.yml +615 -0
  118. data/test/support/vcr/accessor/delete_retry.yml +191 -0
  119. data/test/support/vcr/accessor/delete_retry_too_soon.yml +191 -0
  120. data/test/support/vcr/accessor/get_failed.yml +390 -0
  121. data/test/support/vcr/accessor/get_max_failed.yml +734 -0
  122. data/test/support/vcr/accessor/get_retry.yml +226 -0
  123. data/test/support/vcr/accessor/get_retry_too_soon.yml +226 -0
  124. data/test/support/vcr/accessor/post_failed.yml +417 -0
  125. data/test/support/vcr/accessor/post_max_failed.yml +785 -0
  126. data/test/support/vcr/accessor/post_retry.yml +241 -0
  127. data/test/support/vcr/accessor/post_retry_too_soon.yml +241 -0
  128. data/test/support/vcr/accessor/put_failed.yml +372 -0
  129. data/test/support/vcr/accessor/put_max_failed.yml +700 -0
  130. data/test/support/vcr/accessor/put_retry.yml +216 -0
  131. data/test/support/vcr/accessor/put_retry_too_soon.yml +216 -0
  132. data/test/support/vcr/catalog.yml +89 -0
  133. data/test/support/vcr/delete_asset.yml +82 -0
  134. data/test/support/vcr/get_access_token.yml +41 -0
  135. data/test/support/vcr/get_asset.yml +144 -0
  136. data/test/support/vcr/get_asset_locations.yml +196 -0
  137. data/test/support/vcr/get_assets.yml +152 -0
  138. data/test/support/vcr/get_contribution_definition.yml +90 -0
  139. data/test/support/vcr/get_contribution_definitions.yml +91 -0
  140. data/test/support/vcr/get_contribution_product.yml +91 -0
  141. data/test/support/vcr/get_contribution_products.yml +91 -0
  142. data/test/support/vcr/get_field.yml +144 -0
  143. data/test/support/vcr/get_fields.yml +146 -0
  144. data/test/support/vcr/get_flags.yml +47 -0
  145. data/test/support/vcr/get_organization.yml +90 -0
  146. data/test/support/vcr/get_organizations.yml +149 -0
  147. data/test/support/vcr/get_request_token.yml +83 -0
  148. data/test/support/vcr/post_asset_locations.yml +244 -0
  149. data/test/support/vcr/post_assets.yml +192 -0
  150. data/test/support/vcr/put_asset.yml +87 -0
  151. data/test/support/vcr/warning.txt +28 -0
  152. data/test/support/vcr_setup.rb +488 -0
  153. metadata +277 -0
@@ -0,0 +1,216 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
9
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
10
+ headers:
11
+ Accept:
12
+ - application/vnd.deere.axiom.v3+json
13
+ Content-Type:
14
+ - application/vnd.deere.axiom.v3+json
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ User-Agent:
18
+ - OAuth gem v0.5.4
19
+ Content-Length:
20
+ - '267'
21
+ Authorization:
22
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
23
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
24
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
25
+ oauth_version="1.0"
26
+ response:
27
+ status:
28
+ code: 429
29
+ message: Too Many Requests
30
+ headers:
31
+ Date:
32
+ - Mon, 10 Feb 2020 17:29:30 GMT
33
+ X-Deere-Handling-Server:
34
+ - ip-10-214-44-33
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ X-Deere-Elapsed-Ms:
38
+ - '185'
39
+ Retry-After:
40
+ - '13'
41
+ body:
42
+ encoding: UTF-8
43
+ string: ''
44
+ http_version:
45
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
46
+ - request:
47
+ method: put
48
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
52
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
53
+ headers:
54
+ Accept:
55
+ - application/vnd.deere.axiom.v3+json
56
+ Content-Type:
57
+ - application/vnd.deere.axiom.v3+json
58
+ Accept-Encoding:
59
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
60
+ User-Agent:
61
+ - OAuth gem v0.5.4
62
+ Content-Length:
63
+ - '267'
64
+ Authorization:
65
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
66
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
67
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
68
+ oauth_version="1.0"
69
+ response:
70
+ status:
71
+ code: 429
72
+ message: Too Many Requests
73
+ headers:
74
+ Date:
75
+ - Mon, 10 Feb 2020 17:29:30 GMT
76
+ X-Deere-Handling-Server:
77
+ - ip-10-214-44-33
78
+ X-Frame-Options:
79
+ - SAMEORIGIN
80
+ X-Deere-Elapsed-Ms:
81
+ - '185'
82
+ Retry-After:
83
+ - '17'
84
+ body:
85
+ encoding: UTF-8
86
+ string: ''
87
+ http_version:
88
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
89
+ - request:
90
+ method: put
91
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
95
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
96
+ headers:
97
+ Accept:
98
+ - application/vnd.deere.axiom.v3+json
99
+ Content-Type:
100
+ - application/vnd.deere.axiom.v3+json
101
+ Accept-Encoding:
102
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
103
+ User-Agent:
104
+ - OAuth gem v0.5.4
105
+ Content-Length:
106
+ - '267'
107
+ Authorization:
108
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
109
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
110
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
111
+ oauth_version="1.0"
112
+ response:
113
+ status:
114
+ code: 503
115
+ message: Service Unavailable
116
+ headers:
117
+ Date:
118
+ - Mon, 10 Feb 2020 17:29:30 GMT
119
+ X-Deere-Handling-Server:
120
+ - ip-10-214-44-33
121
+ X-Frame-Options:
122
+ - SAMEORIGIN
123
+ X-Deere-Elapsed-Ms:
124
+ - '185'
125
+ Retry-After:
126
+ - '19'
127
+ body:
128
+ encoding: UTF-8
129
+ string: ''
130
+ http_version:
131
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
132
+ - request:
133
+ method: put
134
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
135
+ body:
136
+ encoding: UTF-8
137
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
138
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
139
+ headers:
140
+ Accept:
141
+ - application/vnd.deere.axiom.v3+json
142
+ Content-Type:
143
+ - application/vnd.deere.axiom.v3+json
144
+ Accept-Encoding:
145
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
146
+ User-Agent:
147
+ - OAuth gem v0.5.4
148
+ Content-Length:
149
+ - '267'
150
+ Authorization:
151
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
152
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
153
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
154
+ oauth_version="1.0"
155
+ response:
156
+ status:
157
+ code: 503
158
+ message: Service Unavailable
159
+ headers:
160
+ Date:
161
+ - Mon, 10 Feb 2020 17:29:30 GMT
162
+ X-Deere-Handling-Server:
163
+ - ip-10-214-44-33
164
+ X-Frame-Options:
165
+ - SAMEORIGIN
166
+ X-Deere-Elapsed-Ms:
167
+ - '185'
168
+ Retry-After:
169
+ - '23'
170
+ body:
171
+ encoding: UTF-8
172
+ string: ''
173
+ http_version:
174
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
175
+ - request:
176
+ method: put
177
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
178
+ body:
179
+ encoding: UTF-8
180
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
181
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
182
+ headers:
183
+ Accept:
184
+ - application/vnd.deere.axiom.v3+json
185
+ Content-Type:
186
+ - application/vnd.deere.axiom.v3+json
187
+ Accept-Encoding:
188
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
189
+ User-Agent:
190
+ - OAuth gem v0.5.4
191
+ Content-Length:
192
+ - '267'
193
+ Authorization:
194
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
195
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
196
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
197
+ oauth_version="1.0"
198
+ response:
199
+ status:
200
+ code: 204
201
+ message: No Content
202
+ headers:
203
+ Date:
204
+ - Mon, 10 Feb 2020 17:29:30 GMT
205
+ X-Deere-Handling-Server:
206
+ - ip-10-214-44-33
207
+ X-Frame-Options:
208
+ - SAMEORIGIN
209
+ X-Deere-Elapsed-Ms:
210
+ - '185'
211
+ body:
212
+ encoding: UTF-8
213
+ string: ''
214
+ http_version:
215
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
216
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,216 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
9
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
10
+ headers:
11
+ Accept:
12
+ - application/vnd.deere.axiom.v3+json
13
+ Content-Type:
14
+ - application/vnd.deere.axiom.v3+json
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ User-Agent:
18
+ - OAuth gem v0.5.4
19
+ Content-Length:
20
+ - '267'
21
+ Authorization:
22
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
23
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
24
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
25
+ oauth_version="1.0"
26
+ response:
27
+ status:
28
+ code: 429
29
+ message: Too Many Requests
30
+ headers:
31
+ Date:
32
+ - Mon, 10 Feb 2020 17:29:30 GMT
33
+ X-Deere-Handling-Server:
34
+ - ip-10-214-44-33
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ X-Deere-Elapsed-Ms:
38
+ - '185'
39
+ Retry-After:
40
+ - '0'
41
+ body:
42
+ encoding: UTF-8
43
+ string: ''
44
+ http_version:
45
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
46
+ - request:
47
+ method: put
48
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
52
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
53
+ headers:
54
+ Accept:
55
+ - application/vnd.deere.axiom.v3+json
56
+ Content-Type:
57
+ - application/vnd.deere.axiom.v3+json
58
+ Accept-Encoding:
59
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
60
+ User-Agent:
61
+ - OAuth gem v0.5.4
62
+ Content-Length:
63
+ - '267'
64
+ Authorization:
65
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
66
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
67
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
68
+ oauth_version="1.0"
69
+ response:
70
+ status:
71
+ code: 429
72
+ message: Too Many Requests
73
+ headers:
74
+ Date:
75
+ - Mon, 10 Feb 2020 17:29:30 GMT
76
+ X-Deere-Handling-Server:
77
+ - ip-10-214-44-33
78
+ X-Frame-Options:
79
+ - SAMEORIGIN
80
+ X-Deere-Elapsed-Ms:
81
+ - '185'
82
+ Retry-After:
83
+ - '1'
84
+ body:
85
+ encoding: UTF-8
86
+ string: ''
87
+ http_version:
88
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
89
+ - request:
90
+ method: put
91
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
95
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
96
+ headers:
97
+ Accept:
98
+ - application/vnd.deere.axiom.v3+json
99
+ Content-Type:
100
+ - application/vnd.deere.axiom.v3+json
101
+ Accept-Encoding:
102
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
103
+ User-Agent:
104
+ - OAuth gem v0.5.4
105
+ Content-Length:
106
+ - '267'
107
+ Authorization:
108
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
109
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
110
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
111
+ oauth_version="1.0"
112
+ response:
113
+ status:
114
+ code: 503
115
+ message: Service Unavailable
116
+ headers:
117
+ Date:
118
+ - Mon, 10 Feb 2020 17:29:30 GMT
119
+ X-Deere-Handling-Server:
120
+ - ip-10-214-44-33
121
+ X-Frame-Options:
122
+ - SAMEORIGIN
123
+ X-Deere-Elapsed-Ms:
124
+ - '185'
125
+ Retry-After:
126
+ - '2'
127
+ body:
128
+ encoding: UTF-8
129
+ string: ''
130
+ http_version:
131
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
132
+ - request:
133
+ method: put
134
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
135
+ body:
136
+ encoding: UTF-8
137
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
138
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
139
+ headers:
140
+ Accept:
141
+ - application/vnd.deere.axiom.v3+json
142
+ Content-Type:
143
+ - application/vnd.deere.axiom.v3+json
144
+ Accept-Encoding:
145
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
146
+ User-Agent:
147
+ - OAuth gem v0.5.4
148
+ Content-Length:
149
+ - '267'
150
+ Authorization:
151
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
152
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
153
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
154
+ oauth_version="1.0"
155
+ response:
156
+ status:
157
+ code: 503
158
+ message: Service Unavailable
159
+ headers:
160
+ Date:
161
+ - Mon, 10 Feb 2020 17:29:30 GMT
162
+ X-Deere-Handling-Server:
163
+ - ip-10-214-44-33
164
+ X-Frame-Options:
165
+ - SAMEORIGIN
166
+ X-Deere-Elapsed-Ms:
167
+ - '185'
168
+ Retry-After:
169
+ - '3'
170
+ body:
171
+ encoding: UTF-8
172
+ string: ''
173
+ http_version:
174
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
175
+ - request:
176
+ method: put
177
+ uri: https://sandboxapi.deere.com/platform/assets/00000000-0000-0000-0000-000000000000
178
+ body:
179
+ encoding: UTF-8
180
+ string: '{"assetCategory":"DEVICE","assetType":"SENSOR","assetSubType":"ENVIRONMENTAL","title":"i
181
+ REALLY like turtles!","links":[{"@type":"Link","rel":"contributionDefinition","uri":"https://sandboxapi.deere.com/contributionDefinitions/00000000-0000-0000-0000-000000000000"}]}'
182
+ headers:
183
+ Accept:
184
+ - application/vnd.deere.axiom.v3+json
185
+ Content-Type:
186
+ - application/vnd.deere.axiom.v3+json
187
+ Accept-Encoding:
188
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
189
+ User-Agent:
190
+ - OAuth gem v0.5.4
191
+ Content-Length:
192
+ - '267'
193
+ Authorization:
194
+ - OAuth oauth_body_hash="JXqhMr0ayK5gfHyej3M1xuUfSbw%3D", oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
195
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
196
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_token="00000000-0000-0000-0000-000000000000",
197
+ oauth_version="1.0"
198
+ response:
199
+ status:
200
+ code: 204
201
+ message: No Content
202
+ headers:
203
+ Date:
204
+ - Mon, 10 Feb 2020 17:29:30 GMT
205
+ X-Deere-Handling-Server:
206
+ - ip-10-214-44-33
207
+ X-Frame-Options:
208
+ - SAMEORIGIN
209
+ X-Deere-Elapsed-Ms:
210
+ - '185'
211
+ body:
212
+ encoding: UTF-8
213
+ string: ''
214
+ http_version:
215
+ recorded_at: Mon, 10 Feb 2020 17:29:30 GMT
216
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://sandboxapi.deere.com/platform/
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_version="1.0"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Mon, 10 Feb 2020 17:28:57 GMT
27
+ Content-Type:
28
+ - application/vnd.deere.axiom.v3+json;charset=UTF-8
29
+ X-Deere-Handling-Server:
30
+ - ip-10-214-45-104
31
+ X-Frame-Options:
32
+ - SAMEORIGIN
33
+ X-Deere-Elapsed-Ms:
34
+ - '9'
35
+ Cache-Control:
36
+ - no-store
37
+ Content-Language:
38
+ - en-US
39
+ Transfer-Encoding:
40
+ - chunked
41
+ body:
42
+ encoding: ASCII-8BIT
43
+ string: '{"@type":"ApiCatalog","links":[{"@type":"Link","rel":"oauthRequestToken","uri":"https://sandboxapi.deere.com/platform/oauth/request_token"},{"@type":"Link","rel":"oauthAuthorizeRequestToken","uri":"https://my.deere.com/consentToUseOfData?oauth_token={token}"},{"@type":"Link","rel":"oauthAccessToken","uri":"https://sandboxapi.deere.com/platform/oauth/access_token"},{"@type":"Link","rel":"agencies","uri":"https://sandboxapi.deere.com/platform/agencies"}]}'
44
+ http_version:
45
+ recorded_at: Mon, 10 Feb 2020 17:28:57 GMT
46
+ - request:
47
+ method: get
48
+ uri: https://sandboxapi.deere.com/platform/
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ Accept:
54
+ - application/vnd.deere.axiom.v3+json
55
+ Accept-Encoding:
56
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
+ User-Agent:
58
+ - OAuth gem v0.5.4
59
+ Authorization:
60
+ - OAuth oauth_consumer_key="johndeere-0000000000000000000000000000000000000000",
61
+ oauth_nonce="000000000000000000000000000000000000000000", oauth_signature="0000000000000000000000000000",
62
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1581334172", oauth_version="1.0"
63
+ response:
64
+ status:
65
+ code: 200
66
+ message: OK
67
+ headers:
68
+ Date:
69
+ - Mon, 10 Feb 2020 17:28:57 GMT
70
+ Content-Type:
71
+ - application/vnd.deere.axiom.v3+json;charset=UTF-8
72
+ X-Deere-Handling-Server:
73
+ - ip-10-214-44-36
74
+ X-Frame-Options:
75
+ - SAMEORIGIN
76
+ X-Deere-Elapsed-Ms:
77
+ - '16'
78
+ Cache-Control:
79
+ - no-store
80
+ Content-Language:
81
+ - en-US
82
+ Transfer-Encoding:
83
+ - chunked
84
+ body:
85
+ encoding: ASCII-8BIT
86
+ string: '{"@type":"ApiCatalog","links":[{"@type":"Link","rel":"oauthRequestToken","uri":"https://sandboxapi.deere.com/platform/oauth/request_token"},{"@type":"Link","rel":"oauthAuthorizeRequestToken","uri":"https://my.deere.com/consentToUseOfData?oauth_token={token}"},{"@type":"Link","rel":"oauthAccessToken","uri":"https://sandboxapi.deere.com/platform/oauth/access_token"},{"@type":"Link","rel":"agencies","uri":"https://sandboxapi.deere.com/platform/agencies"}]}'
87
+ http_version:
88
+ recorded_at: Mon, 10 Feb 2020 17:28:57 GMT
89
+ recorded_with: VCR 5.0.0