disco_app 0.13.6.pre.puma.pre.3 → 0.14.0

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.
Files changed (69) hide show
  1. checksums.yaml +5 -5
  2. data/app/assets/images/disco_app/logo.png +0 -0
  3. data/app/clients/disco_app/rollbar_client.rb +53 -0
  4. data/app/clients/disco_app/rollbar_client_error.rb +2 -0
  5. data/app/controllers/disco_app/concerns/app_proxy_controller.rb +1 -1
  6. data/app/controllers/disco_app/concerns/authenticated_controller.rb +10 -1
  7. data/app/controllers/disco_app/concerns/user_authenticated_controller.rb +2 -2
  8. data/app/controllers/disco_app/user_sessions_controller.rb +1 -1
  9. data/app/controllers/disco_app/webhooks_controller.rb +1 -1
  10. data/app/controllers/sessions_controller.rb +1 -1
  11. data/app/jobs/application_job.rb +2 -0
  12. data/app/jobs/disco_app/concerns/synchronise_webhooks_job.rb +26 -9
  13. data/app/jobs/disco_app/shop_job.rb +1 -1
  14. data/app/models/application_record.rb +3 -0
  15. data/app/models/disco_app/app_settings.rb +1 -1
  16. data/app/models/disco_app/application_charge.rb +8 -2
  17. data/app/models/disco_app/concerns/can_be_liquified.rb +5 -4
  18. data/app/models/disco_app/concerns/plan.rb +12 -3
  19. data/app/models/disco_app/concerns/plan_code.rb +4 -1
  20. data/app/models/disco_app/concerns/shop.rb +9 -1
  21. data/app/models/disco_app/concerns/subscription.rb +11 -4
  22. data/app/models/disco_app/concerns/synchronises.rb +1 -1
  23. data/app/models/disco_app/plan.rb +1 -1
  24. data/app/models/disco_app/plan_code.rb +1 -1
  25. data/app/models/disco_app/recurring_application_charge.rb +9 -2
  26. data/app/models/disco_app/shop.rb +1 -1
  27. data/app/models/disco_app/source.rb +1 -1
  28. data/app/models/disco_app/subscription.rb +1 -1
  29. data/app/models/disco_app/user.rb +1 -1
  30. data/app/services/disco_app/partner_app_service.rb +151 -0
  31. data/db/migrate/20150525000000_create_shops_if_not_existent.rb +1 -1
  32. data/db/migrate/20170315062548_create_disco_app_sources.rb +1 -1
  33. data/db/migrate/20170315062629_add_sources_to_shop_subscriptions.rb +1 -1
  34. data/db/migrate/20170327214540_create_disco_app_users.rb +1 -1
  35. data/db/migrate/20170606160751_fix_disco_app_users_index.rb +1 -1
  36. data/lib/disco_app/version.rb +1 -1
  37. data/lib/generators/disco_app/disco_app_generator.rb +17 -18
  38. data/lib/generators/disco_app/templates/initializers/shopify_session_repository.rb +2 -1
  39. data/lib/generators/disco_app/templates/root/README.md +26 -0
  40. data/lib/tasks/partner_app.rake +26 -0
  41. data/lib/tasks/rollbar.rake +24 -0
  42. data/test/controllers/disco_app/charges_controller_test.rb +11 -11
  43. data/test/controllers/disco_app/subscriptions_controller_test.rb +4 -4
  44. data/test/controllers/disco_app/webhooks_controller_test.rb +5 -5
  45. data/test/controllers/home_controller_test.rb +1 -1
  46. data/test/controllers/proxy_controller_test.rb +3 -3
  47. data/test/dummy/app/controllers/disco_app/admin/shops_controller.rb +1 -1
  48. data/test/dummy/app/controllers/proxy_controller.rb +1 -1
  49. data/test/dummy/app/jobs/application_job.rb +2 -0
  50. data/test/dummy/app/models/application_record.rb +3 -0
  51. data/test/dummy/app/models/cart.rb +1 -1
  52. data/test/dummy/app/models/disco_app/shop.rb +1 -1
  53. data/test/dummy/app/models/js_configuration.rb +1 -1
  54. data/test/dummy/app/models/product.rb +1 -1
  55. data/test/dummy/app/models/widget_configuration.rb +1 -1
  56. data/test/dummy/config/application.rb +0 -3
  57. data/test/dummy/config/environments/test.rb +2 -2
  58. data/test/dummy/config/initializers/shopify_session_repository.rb +1 -1
  59. data/test/dummy/db/migrate/20160307182229_create_products.rb +2 -2
  60. data/test/dummy/db/migrate/20160530160739_create_asset_models.rb +2 -2
  61. data/test/dummy/db/migrate/20161105054746_create_carts.rb +3 -2
  62. data/test/dummy/db/schema.rb +89 -96
  63. data/test/fixtures/disco_app/shops.yml +6 -2
  64. data/test/fixtures/liquid/model.liquid +8 -8
  65. data/test/integration/synchronises_test.rb +15 -9
  66. data/test/jobs/disco_app/synchronise_webhooks_job_test.rb +16 -4
  67. data/test/test_helper.rb +13 -0
  68. data/test/vcr/webhook_failure.yml +640 -0
  69. metadata +81 -38
@@ -0,0 +1,640 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://widgets.myshopify.com/admin/webhooks.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - ShopifyAPI/4.9.0 ActiveResource/5.0.0 Ruby/2.4.1
14
+ X-Shopify-Access-Token:
15
+ - 9e4b82b20f617258b9c87a9186c355da
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx
25
+ Date:
26
+ - Sun, 07 Jan 2018 22:02:25 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ X-Sorting-Hat-Podid:
34
+ - '28'
35
+ X-Sorting-Hat-Podid-Cached:
36
+ - '0'
37
+ X-Sorting-Hat-Shopid:
38
+ - '23632129'
39
+ X-Sorting-Hat-Section:
40
+ - pod
41
+ X-Sorting-Hat-Shopid-Cached:
42
+ - '0'
43
+ Vary:
44
+ - Accept-Encoding
45
+ Referrer-Policy:
46
+ - origin-when-cross-origin
47
+ X-Frame-Options:
48
+ - DENY
49
+ X-Shopid:
50
+ - '23632129'
51
+ X-Shardid:
52
+ - '28'
53
+ X-Stats-Userid:
54
+ - '0'
55
+ X-Stats-Apiclientid:
56
+ - '1933946'
57
+ X-Stats-Apipermissionid:
58
+ - '9409036317'
59
+ Http-X-Shopify-Shop-Api-Call-Limit:
60
+ - 1/40
61
+ X-Shopify-Shop-Api-Call-Limit:
62
+ - 1/40
63
+ Strict-Transport-Security:
64
+ - max-age=7889238
65
+ Content-Security-Policy:
66
+ - 'default-src ''self'' data: blob: ''unsafe-inline'' ''unsafe-eval'' https://*
67
+ shopify-pos://*; block-all-mixed-content; child-src ''self'' https://* shopify-pos://*;
68
+ connect-src ''self'' wss://* https://*; script-src https://cdn.shopify.com
69
+ https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net
70
+ https://dme0ih8comzn4.cloudfront.net https://api.stripe.com https://mpsnare.iesnare.com
71
+ https://appcenter.intuit.com https://www.paypal.com https://maps.googleapis.com
72
+ https://stats.g.doubleclick.net https://www.google-analytics.com https://visitors.shopify.com
73
+ https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com
74
+ ''self'' ''unsafe-inline'' ''unsafe-eval''; upgrade-insecure-requests; report-uri
75
+ /csp-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=35ad9b8c-5606-4980-8cbb-992608f364e0'
76
+ X-Content-Type-Options:
77
+ - nosniff
78
+ - nosniff
79
+ X-Download-Options:
80
+ - noopen
81
+ X-Permitted-Cross-Domain-Policies:
82
+ - none
83
+ X-Xss-Protection:
84
+ - 1; mode=block; report=/xss-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=35ad9b8c-5606-4980-8cbb-992608f364e0
85
+ P3p:
86
+ - CP="NOI DSP COR NID ADMa OPTa OUR NOR"
87
+ X-Dc:
88
+ - chi2,ash
89
+ X-Request-Id:
90
+ - 35ad9b8c-5606-4980-8cbb-992608f364e0
91
+ body:
92
+ encoding: ASCII-8BIT
93
+ string: '{"webhooks":[]}'
94
+ http_version:
95
+ recorded_at: Sun, 07 Jan 2018 22:02:25 GMT
96
+ - request:
97
+ method: post
98
+ uri: https://widgets.myshopify.com/admin/webhooks.json
99
+ body:
100
+ encoding: UTF-8
101
+ string: '{"webhook":{"topic":"app/uninstalled","address":"https://test.example.com/webhooks","format":"json"}}'
102
+ headers:
103
+ Content-Type:
104
+ - application/json
105
+ User-Agent:
106
+ - ShopifyAPI/4.9.0 ActiveResource/5.0.0 Ruby/2.4.1
107
+ X-Shopify-Access-Token:
108
+ - 9e4b82b20f617258b9c87a9186c355da
109
+ Accept-Encoding:
110
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
111
+ Accept:
112
+ - "*/*"
113
+ response:
114
+ status:
115
+ code: 422
116
+ message: Unprocessable Entity
117
+ headers:
118
+ Server:
119
+ - nginx
120
+ Date:
121
+ - Sun, 07 Jan 2018 22:02:26 GMT
122
+ Content-Type:
123
+ - application/json; charset=utf-8
124
+ Transfer-Encoding:
125
+ - chunked
126
+ Connection:
127
+ - keep-alive
128
+ X-Sorting-Hat-Podid:
129
+ - '28'
130
+ X-Sorting-Hat-Podid-Cached:
131
+ - '1'
132
+ X-Sorting-Hat-Shopid:
133
+ - '23632129'
134
+ X-Sorting-Hat-Section:
135
+ - pod
136
+ X-Sorting-Hat-Shopid-Cached:
137
+ - '1'
138
+ Referrer-Policy:
139
+ - origin-when-cross-origin
140
+ X-Frame-Options:
141
+ - DENY
142
+ X-Shopid:
143
+ - '23632129'
144
+ X-Shardid:
145
+ - '28'
146
+ X-Stats-Userid:
147
+ - '0'
148
+ X-Stats-Apiclientid:
149
+ - '1933946'
150
+ X-Stats-Apipermissionid:
151
+ - '9409036317'
152
+ Http-X-Shopify-Shop-Api-Call-Limit:
153
+ - 1/40
154
+ X-Shopify-Shop-Api-Call-Limit:
155
+ - 1/40
156
+ Strict-Transport-Security:
157
+ - max-age=7889238
158
+ Content-Security-Policy:
159
+ - 'default-src ''self'' data: blob: ''unsafe-inline'' ''unsafe-eval'' https://*
160
+ shopify-pos://*; block-all-mixed-content; child-src ''self'' https://* shopify-pos://*;
161
+ connect-src ''self'' wss://* https://*; script-src https://cdn.shopify.com
162
+ https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net
163
+ https://dme0ih8comzn4.cloudfront.net https://api.stripe.com https://mpsnare.iesnare.com
164
+ https://appcenter.intuit.com https://www.paypal.com https://maps.googleapis.com
165
+ https://stats.g.doubleclick.net https://www.google-analytics.com https://visitors.shopify.com
166
+ https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com
167
+ ''self'' ''unsafe-inline'' ''unsafe-eval''; upgrade-insecure-requests; report-uri
168
+ /csp-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=a7b430fa-2d1b-457d-9aa4-85638efd87ef'
169
+ X-Content-Type-Options:
170
+ - nosniff
171
+ X-Download-Options:
172
+ - noopen
173
+ X-Permitted-Cross-Domain-Policies:
174
+ - none
175
+ X-Xss-Protection:
176
+ - 1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=a7b430fa-2d1b-457d-9aa4-85638efd87ef
177
+ X-Dc:
178
+ - chi2,ash
179
+ X-Request-Id:
180
+ - a7b430fa-2d1b-457d-9aa4-85638efd87ef
181
+ body:
182
+ encoding: UTF-8
183
+ string: '{}'
184
+ http_version:
185
+ recorded_at: Sun, 07 Jan 2018 22:02:26 GMT
186
+ - request:
187
+ method: post
188
+ uri: https://widgets.myshopify.com/admin/webhooks.json
189
+ body:
190
+ encoding: UTF-8
191
+ string: '{"webhook":{"topic":"shop/update","address":"https://test.example.com/webhooks","format":"json"}}'
192
+ headers:
193
+ Content-Type:
194
+ - application/json
195
+ User-Agent:
196
+ - ShopifyAPI/4.9.0 ActiveResource/5.0.0 Ruby/2.4.1
197
+ X-Shopify-Access-Token:
198
+ - 9e4b82b20f617258b9c87a9186c355da
199
+ Accept-Encoding:
200
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
201
+ Accept:
202
+ - "*/*"
203
+ response:
204
+ status:
205
+ code: 422
206
+ message: Unprocessable Entity
207
+ headers:
208
+ Server:
209
+ - nginx
210
+ Date:
211
+ - Sun, 07 Jan 2018 22:02:27 GMT
212
+ Content-Type:
213
+ - application/json; charset=utf-8
214
+ Transfer-Encoding:
215
+ - chunked
216
+ Connection:
217
+ - keep-alive
218
+ X-Sorting-Hat-Podid:
219
+ - '28'
220
+ X-Sorting-Hat-Podid-Cached:
221
+ - '1'
222
+ X-Sorting-Hat-Shopid:
223
+ - '23632129'
224
+ X-Sorting-Hat-Section:
225
+ - pod
226
+ X-Sorting-Hat-Shopid-Cached:
227
+ - '1'
228
+ Referrer-Policy:
229
+ - origin-when-cross-origin
230
+ X-Frame-Options:
231
+ - DENY
232
+ X-Shopid:
233
+ - '23632129'
234
+ X-Shardid:
235
+ - '28'
236
+ X-Stats-Userid:
237
+ - '0'
238
+ X-Stats-Apiclientid:
239
+ - '1933946'
240
+ X-Stats-Apipermissionid:
241
+ - '9409036317'
242
+ Http-X-Shopify-Shop-Api-Call-Limit:
243
+ - 1/40
244
+ X-Shopify-Shop-Api-Call-Limit:
245
+ - 1/40
246
+ Strict-Transport-Security:
247
+ - max-age=7889238
248
+ Content-Security-Policy:
249
+ - 'default-src ''self'' data: blob: ''unsafe-inline'' ''unsafe-eval'' https://*
250
+ shopify-pos://*; block-all-mixed-content; child-src ''self'' https://* shopify-pos://*;
251
+ connect-src ''self'' wss://* https://*; script-src https://cdn.shopify.com
252
+ https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net
253
+ https://dme0ih8comzn4.cloudfront.net https://api.stripe.com https://mpsnare.iesnare.com
254
+ https://appcenter.intuit.com https://www.paypal.com https://maps.googleapis.com
255
+ https://stats.g.doubleclick.net https://www.google-analytics.com https://visitors.shopify.com
256
+ https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com
257
+ ''self'' ''unsafe-inline'' ''unsafe-eval''; upgrade-insecure-requests; report-uri
258
+ /csp-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=9d5fb3e7-f766-4fab-a939-393013241d8a'
259
+ X-Content-Type-Options:
260
+ - nosniff
261
+ X-Download-Options:
262
+ - noopen
263
+ X-Permitted-Cross-Domain-Policies:
264
+ - none
265
+ X-Xss-Protection:
266
+ - 1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=9d5fb3e7-f766-4fab-a939-393013241d8a
267
+ X-Dc:
268
+ - chi2,ash
269
+ X-Request-Id:
270
+ - 9d5fb3e7-f766-4fab-a939-393013241d8a
271
+ body:
272
+ encoding: UTF-8
273
+ string: '{}'
274
+ http_version:
275
+ recorded_at: Sun, 07 Jan 2018 22:02:28 GMT
276
+ - request:
277
+ method: post
278
+ uri: https://widgets.myshopify.com/admin/webhooks.json
279
+ body:
280
+ encoding: UTF-8
281
+ string: '{"webhook":{"topic":"orders/create","address":"https://test.example.com/webhooks","format":"json"}}'
282
+ headers:
283
+ Content-Type:
284
+ - application/json
285
+ User-Agent:
286
+ - ShopifyAPI/4.9.0 ActiveResource/5.0.0 Ruby/2.4.1
287
+ X-Shopify-Access-Token:
288
+ - 9e4b82b20f617258b9c87a9186c355da
289
+ Accept-Encoding:
290
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
291
+ Accept:
292
+ - "*/*"
293
+ response:
294
+ status:
295
+ code: 422
296
+ message: Unprocessable Entity
297
+ headers:
298
+ Server:
299
+ - nginx
300
+ Date:
301
+ - Sun, 07 Jan 2018 22:02:29 GMT
302
+ Content-Type:
303
+ - application/json; charset=utf-8
304
+ Transfer-Encoding:
305
+ - chunked
306
+ Connection:
307
+ - keep-alive
308
+ X-Sorting-Hat-Podid:
309
+ - '28'
310
+ X-Sorting-Hat-Podid-Cached:
311
+ - '0'
312
+ X-Sorting-Hat-Shopid:
313
+ - '23632129'
314
+ X-Sorting-Hat-Section:
315
+ - pod
316
+ X-Sorting-Hat-Shopid-Cached:
317
+ - '0'
318
+ Referrer-Policy:
319
+ - origin-when-cross-origin
320
+ X-Frame-Options:
321
+ - DENY
322
+ X-Shopid:
323
+ - '23632129'
324
+ X-Shardid:
325
+ - '28'
326
+ X-Stats-Userid:
327
+ - '0'
328
+ X-Stats-Apiclientid:
329
+ - '1933946'
330
+ X-Stats-Apipermissionid:
331
+ - '9409036317'
332
+ Http-X-Shopify-Shop-Api-Call-Limit:
333
+ - 1/40
334
+ X-Shopify-Shop-Api-Call-Limit:
335
+ - 1/40
336
+ Strict-Transport-Security:
337
+ - max-age=7889238
338
+ Content-Security-Policy:
339
+ - 'default-src ''self'' data: blob: ''unsafe-inline'' ''unsafe-eval'' https://*
340
+ shopify-pos://*; block-all-mixed-content; child-src ''self'' https://* shopify-pos://*;
341
+ connect-src ''self'' wss://* https://*; script-src https://cdn.shopify.com
342
+ https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net
343
+ https://dme0ih8comzn4.cloudfront.net https://api.stripe.com https://mpsnare.iesnare.com
344
+ https://appcenter.intuit.com https://www.paypal.com https://maps.googleapis.com
345
+ https://stats.g.doubleclick.net https://www.google-analytics.com https://visitors.shopify.com
346
+ https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com
347
+ ''self'' ''unsafe-inline'' ''unsafe-eval''; upgrade-insecure-requests; report-uri
348
+ /csp-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=e797d63c-1dc8-43bd-9c9f-9a3e791d8db7'
349
+ X-Content-Type-Options:
350
+ - nosniff
351
+ X-Download-Options:
352
+ - noopen
353
+ X-Permitted-Cross-Domain-Policies:
354
+ - none
355
+ X-Xss-Protection:
356
+ - 1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=e797d63c-1dc8-43bd-9c9f-9a3e791d8db7
357
+ X-Dc:
358
+ - chi2,ash
359
+ X-Request-Id:
360
+ - e797d63c-1dc8-43bd-9c9f-9a3e791d8db7
361
+ body:
362
+ encoding: UTF-8
363
+ string: '{"errors":{"topic":["Invalid topic specified.
364
+ Topics allowed: app\/uninstalled, shop\/update"]}}'
365
+ http_version:
366
+ recorded_at: Sun, 07 Jan 2018 22:02:29 GMT
367
+ - request:
368
+ method: post
369
+ uri: https://widgets.myshopify.com/admin/webhooks.json
370
+ body:
371
+ encoding: UTF-8
372
+ string: '{"webhook":{"topic":"orders/paid","address":"https://test.example.com/webhooks","format":"json"}}'
373
+ headers:
374
+ Content-Type:
375
+ - application/json
376
+ User-Agent:
377
+ - ShopifyAPI/4.9.0 ActiveResource/5.0.0 Ruby/2.4.1
378
+ X-Shopify-Access-Token:
379
+ - 9e4b82b20f617258b9c87a9186c355da
380
+ Accept-Encoding:
381
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
382
+ Accept:
383
+ - "*/*"
384
+ response:
385
+ status:
386
+ code: 422
387
+ message: Unprocessable Entity
388
+ headers:
389
+ Server:
390
+ - nginx
391
+ Date:
392
+ - Sun, 07 Jan 2018 22:02:30 GMT
393
+ Content-Type:
394
+ - application/json; charset=utf-8
395
+ Transfer-Encoding:
396
+ - chunked
397
+ Connection:
398
+ - keep-alive
399
+ X-Sorting-Hat-Podid:
400
+ - '28'
401
+ X-Sorting-Hat-Podid-Cached:
402
+ - '1'
403
+ X-Sorting-Hat-Shopid:
404
+ - '23632129'
405
+ X-Sorting-Hat-Section:
406
+ - pod
407
+ X-Sorting-Hat-Shopid-Cached:
408
+ - '1'
409
+ Referrer-Policy:
410
+ - origin-when-cross-origin
411
+ X-Frame-Options:
412
+ - DENY
413
+ X-Shopid:
414
+ - '23632129'
415
+ X-Shardid:
416
+ - '28'
417
+ X-Stats-Userid:
418
+ - '0'
419
+ X-Stats-Apiclientid:
420
+ - '1933946'
421
+ X-Stats-Apipermissionid:
422
+ - '9409036317'
423
+ Http-X-Shopify-Shop-Api-Call-Limit:
424
+ - 1/40
425
+ X-Shopify-Shop-Api-Call-Limit:
426
+ - 1/40
427
+ Strict-Transport-Security:
428
+ - max-age=7889238
429
+ Content-Security-Policy:
430
+ - 'default-src ''self'' data: blob: ''unsafe-inline'' ''unsafe-eval'' https://*
431
+ shopify-pos://*; block-all-mixed-content; child-src ''self'' https://* shopify-pos://*;
432
+ connect-src ''self'' wss://* https://*; script-src https://cdn.shopify.com
433
+ https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net
434
+ https://dme0ih8comzn4.cloudfront.net https://api.stripe.com https://mpsnare.iesnare.com
435
+ https://appcenter.intuit.com https://www.paypal.com https://maps.googleapis.com
436
+ https://stats.g.doubleclick.net https://www.google-analytics.com https://visitors.shopify.com
437
+ https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com
438
+ ''self'' ''unsafe-inline'' ''unsafe-eval''; upgrade-insecure-requests; report-uri
439
+ /csp-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=5b35e1db-45bf-4f7b-ae48-353c164b13e1'
440
+ X-Content-Type-Options:
441
+ - nosniff
442
+ X-Download-Options:
443
+ - noopen
444
+ X-Permitted-Cross-Domain-Policies:
445
+ - none
446
+ X-Xss-Protection:
447
+ - 1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=5b35e1db-45bf-4f7b-ae48-353c164b13e1
448
+ X-Dc:
449
+ - chi2,ash
450
+ X-Request-Id:
451
+ - 5b35e1db-45bf-4f7b-ae48-353c164b13e1
452
+ body:
453
+ encoding: UTF-8
454
+ string: '{"errors":{"topic":["Invalid topic specified.
455
+ Topics allowed: app\/uninstalled, shop\/update"]}}'
456
+ http_version:
457
+ recorded_at: Sun, 07 Jan 2018 22:02:30 GMT
458
+ - request:
459
+ method: post
460
+ uri: https://widgets.myshopify.com/admin/webhooks.json
461
+ body:
462
+ encoding: UTF-8
463
+ string: '{"webhook":{"topic":"carts/create","address":"https://test.example.com/webhooks","format":"json"}}'
464
+ headers:
465
+ Content-Type:
466
+ - application/json
467
+ User-Agent:
468
+ - ShopifyAPI/4.9.0 ActiveResource/5.0.0 Ruby/2.4.1
469
+ X-Shopify-Access-Token:
470
+ - 9e4b82b20f617258b9c87a9186c355da
471
+ Accept-Encoding:
472
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
473
+ Accept:
474
+ - "*/*"
475
+ response:
476
+ status:
477
+ code: 422
478
+ message: Unprocessable Entity
479
+ headers:
480
+ Server:
481
+ - nginx
482
+ Date:
483
+ - Sun, 07 Jan 2018 22:02:31 GMT
484
+ Content-Type:
485
+ - application/json; charset=utf-8
486
+ Transfer-Encoding:
487
+ - chunked
488
+ Connection:
489
+ - keep-alive
490
+ X-Sorting-Hat-Podid:
491
+ - '28'
492
+ X-Sorting-Hat-Podid-Cached:
493
+ - '0'
494
+ X-Sorting-Hat-Shopid:
495
+ - '23632129'
496
+ X-Sorting-Hat-Section:
497
+ - pod
498
+ X-Sorting-Hat-Shopid-Cached:
499
+ - '0'
500
+ Referrer-Policy:
501
+ - origin-when-cross-origin
502
+ X-Frame-Options:
503
+ - DENY
504
+ X-Shopid:
505
+ - '23632129'
506
+ X-Shardid:
507
+ - '28'
508
+ X-Stats-Userid:
509
+ - '0'
510
+ X-Stats-Apiclientid:
511
+ - '1933946'
512
+ X-Stats-Apipermissionid:
513
+ - '9409036317'
514
+ Http-X-Shopify-Shop-Api-Call-Limit:
515
+ - 1/40
516
+ X-Shopify-Shop-Api-Call-Limit:
517
+ - 1/40
518
+ Strict-Transport-Security:
519
+ - max-age=7889238
520
+ Content-Security-Policy:
521
+ - 'default-src ''self'' data: blob: ''unsafe-inline'' ''unsafe-eval'' https://*
522
+ shopify-pos://*; block-all-mixed-content; child-src ''self'' https://* shopify-pos://*;
523
+ connect-src ''self'' wss://* https://*; script-src https://cdn.shopify.com
524
+ https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net
525
+ https://dme0ih8comzn4.cloudfront.net https://api.stripe.com https://mpsnare.iesnare.com
526
+ https://appcenter.intuit.com https://www.paypal.com https://maps.googleapis.com
527
+ https://stats.g.doubleclick.net https://www.google-analytics.com https://visitors.shopify.com
528
+ https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com
529
+ ''self'' ''unsafe-inline'' ''unsafe-eval''; upgrade-insecure-requests; report-uri
530
+ /csp-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=0aeeb8f9-107e-444a-b03f-c98d7946924d'
531
+ X-Content-Type-Options:
532
+ - nosniff
533
+ X-Download-Options:
534
+ - noopen
535
+ X-Permitted-Cross-Domain-Policies:
536
+ - none
537
+ X-Xss-Protection:
538
+ - 1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=0aeeb8f9-107e-444a-b03f-c98d7946924d
539
+ X-Dc:
540
+ - chi2,ash
541
+ X-Request-Id:
542
+ - 0aeeb8f9-107e-444a-b03f-c98d7946924d
543
+ body:
544
+ encoding: UTF-8
545
+ string: '{"errors":{"topic":["Invalid topic specified.
546
+ Topics allowed: app\/uninstalled, shop\/update"]}}'
547
+ http_version:
548
+ recorded_at: Sun, 07 Jan 2018 22:02:31 GMT
549
+ - request:
550
+ method: post
551
+ uri: https://widgets.myshopify.com/admin/webhooks.json
552
+ body:
553
+ encoding: UTF-8
554
+ string: '{"webhook":{"topic":"carts/update","address":"https://test.example.com/webhooks","format":"json"}}'
555
+ headers:
556
+ Content-Type:
557
+ - application/json
558
+ User-Agent:
559
+ - ShopifyAPI/4.9.0 ActiveResource/5.0.0 Ruby/2.4.1
560
+ X-Shopify-Access-Token:
561
+ - 9e4b82b20f617258b9c87a9186c355da
562
+ Accept-Encoding:
563
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
564
+ Accept:
565
+ - "*/*"
566
+ response:
567
+ status:
568
+ code: 422
569
+ message: Unprocessable Entity
570
+ headers:
571
+ Server:
572
+ - nginx
573
+ Date:
574
+ - Sun, 07 Jan 2018 22:02:32 GMT
575
+ Content-Type:
576
+ - application/json; charset=utf-8
577
+ Transfer-Encoding:
578
+ - chunked
579
+ Connection:
580
+ - keep-alive
581
+ X-Sorting-Hat-Podid:
582
+ - '28'
583
+ X-Sorting-Hat-Podid-Cached:
584
+ - '0'
585
+ X-Sorting-Hat-Shopid:
586
+ - '23632129'
587
+ X-Sorting-Hat-Section:
588
+ - pod
589
+ X-Sorting-Hat-Shopid-Cached:
590
+ - '0'
591
+ Referrer-Policy:
592
+ - origin-when-cross-origin
593
+ X-Frame-Options:
594
+ - DENY
595
+ X-Shopid:
596
+ - '23632129'
597
+ X-Shardid:
598
+ - '28'
599
+ X-Stats-Userid:
600
+ - '0'
601
+ X-Stats-Apiclientid:
602
+ - '1933946'
603
+ X-Stats-Apipermissionid:
604
+ - '9409036317'
605
+ Http-X-Shopify-Shop-Api-Call-Limit:
606
+ - 1/40
607
+ X-Shopify-Shop-Api-Call-Limit:
608
+ - 1/40
609
+ Strict-Transport-Security:
610
+ - max-age=7889238
611
+ Content-Security-Policy:
612
+ - 'default-src ''self'' data: blob: ''unsafe-inline'' ''unsafe-eval'' https://*
613
+ shopify-pos://*; block-all-mixed-content; child-src ''self'' https://* shopify-pos://*;
614
+ connect-src ''self'' wss://* https://*; script-src https://cdn.shopify.com
615
+ https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net
616
+ https://dme0ih8comzn4.cloudfront.net https://api.stripe.com https://mpsnare.iesnare.com
617
+ https://appcenter.intuit.com https://www.paypal.com https://maps.googleapis.com
618
+ https://stats.g.doubleclick.net https://www.google-analytics.com https://visitors.shopify.com
619
+ https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com
620
+ ''self'' ''unsafe-inline'' ''unsafe-eval''; upgrade-insecure-requests; report-uri
621
+ /csp-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=3615dc37-4f2f-4c4f-b815-2f2e4e60165b'
622
+ X-Content-Type-Options:
623
+ - nosniff
624
+ X-Download-Options:
625
+ - noopen
626
+ X-Permitted-Cross-Domain-Policies:
627
+ - none
628
+ X-Xss-Protection:
629
+ - 1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fwebhooks&source%5Bsection%5D=admin_api&source%5Buuid%5D=3615dc37-4f2f-4c4f-b815-2f2e4e60165b
630
+ X-Dc:
631
+ - chi2,ash
632
+ X-Request-Id:
633
+ - 3615dc37-4f2f-4c4f-b815-2f2e4e60165b
634
+ body:
635
+ encoding: UTF-8
636
+ string: '{"errors":{"topic":["Invalid topic specified.
637
+ Topics allowed: app\/uninstalled, shop\/update"]}}'
638
+ http_version:
639
+ recorded_at: Sun, 07 Jan 2018 22:02:32 GMT
640
+ recorded_with: VCR 3.0.3