chartmogul-ruby 3.0.0 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +1 -1
  3. data/changelog.md +7 -0
  4. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  5. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  6. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  7. data/fixtures/vcr_cassettes/ChartMogul_Metrics_AllKeyMetric/should_have_entries.yml +1 -1
  8. data/fixtures/vcr_cassettes/ChartMogul_Metrics_AllKeyMetric/should_have_summary.yml +42 -0
  9. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  10. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  11. data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  12. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/should_have_entries.yml +1 -1
  13. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  14. data/fixtures/vcr_cassettes/ChartMogul_SubscriptionEvent/API_interactions/creates_a_new_subscription_event.yml +320 -0
  15. data/fixtures/vcr_cassettes/ChartMogul_SubscriptionEvent/API_interactions/deletes_the_subscription_event.yml +377 -0
  16. data/fixtures/vcr_cassettes/ChartMogul_SubscriptionEvent/API_interactions/lists_all_subscription_events.yml +320 -0
  17. data/fixtures/vcr_cassettes/ChartMogul_SubscriptionEvent/API_interactions/updates_the_subscription_event.yml +377 -0
  18. data/lib/chartmogul/api/actions/destroy_with_params.rb +29 -0
  19. data/lib/chartmogul/api_resource.rb +1 -1
  20. data/lib/chartmogul/concerns/summary_all.rb +21 -0
  21. data/lib/chartmogul/metrics/all_key_metrics.rb +9 -0
  22. data/lib/chartmogul/metrics/arpa.rb +1 -0
  23. data/lib/chartmogul/metrics/arr.rb +1 -0
  24. data/lib/chartmogul/metrics/asp.rb +1 -0
  25. data/lib/chartmogul/metrics/customer_churn_rate.rb +1 -0
  26. data/lib/chartmogul/metrics/customer_count.rb +1 -0
  27. data/lib/chartmogul/metrics/ltv.rb +1 -0
  28. data/lib/chartmogul/metrics/mrr.rb +1 -0
  29. data/lib/chartmogul/metrics/mrr_churn_rate.rb +1 -0
  30. data/lib/chartmogul/subscription_event.rb +62 -0
  31. data/lib/chartmogul/summary_all.rb +30 -0
  32. data/lib/chartmogul/version.rb +1 -1
  33. data/lib/chartmogul.rb +4 -0
  34. metadata +12 -3
@@ -0,0 +1,377 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.chartmogul.com/v1/data_sources
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"Subscription Events Test ds_destroy"}'
9
+ headers:
10
+ User-Agent:
11
+ - chartmogul-ruby/3.0.0
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic hidden
16
+ response:
17
+ status:
18
+ code: 201
19
+ message: Created
20
+ headers:
21
+ access-control-allow-credentials:
22
+ - 'true'
23
+ content-type:
24
+ - application/json
25
+ date:
26
+ - Fri, 27 May 2022 21:54:14 GMT
27
+ status:
28
+ - 201 Created
29
+ content-length:
30
+ - '173'
31
+ connection:
32
+ - keep-alive
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"uuid":"ds_8c554802-de07-11ec-94f4-e390518bbd37","name":"Subscription
36
+ Events Test ds_destroy","system":"Import API","created_at":"2022-05-27T21:54:14.203Z","status":"idle"}'
37
+ http_version:
38
+ recorded_at: Fri, 27 May 2022 21:54:14 GMT
39
+ - request:
40
+ method: post
41
+ uri: https://api.chartmogul.com/v1/customers
42
+ body:
43
+ encoding: UTF-8
44
+ string: '{"external_id":"test_cus_ext_id","name":"Test Customer","data_source_uuid":"ds_8c554802-de07-11ec-94f4-e390518bbd37"}'
45
+ headers:
46
+ User-Agent:
47
+ - chartmogul-ruby/3.0.0
48
+ Content-Type:
49
+ - application/json
50
+ Authorization:
51
+ - Basic hidden
52
+ response:
53
+ status:
54
+ code: 201
55
+ message: Created
56
+ headers:
57
+ access-control-allow-credentials:
58
+ - 'true'
59
+ content-type:
60
+ - application/json
61
+ date:
62
+ - Fri, 27 May 2022 21:54:14 GMT
63
+ status:
64
+ - 201 Created
65
+ content-length:
66
+ - '772'
67
+ connection:
68
+ - keep-alive
69
+ body:
70
+ encoding: UTF-8
71
+ string: '{"id":131944242,"uuid":"cus_8c92c01a-de07-11ec-bf89-8f7ace0c0ebe","external_id":"test_cus_ext_id","name":"Test
72
+ Customer","email":"","status":"Lead","customer-since":null,"attributes":{"custom":{},"clearbit":{},"stripe":{},"tags":[]},"data_source_uuid":"ds_8c554802-de07-11ec-94f4-e390518bbd37","data_source_uuids":["ds_8c554802-de07-11ec-94f4-e390518bbd37"],"external_ids":["test_cus_ext_id"],"company":"","country":null,"state":null,"city":"","zip":null,"lead_created_at":null,"free_trial_started_at":null,"address":{"country":null,"state":null,"city":"","address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#/customers/131944242-Test_Customer","billing-system-type":"Import
73
+ API","currency":"USD","currency-sign":"$"}'
74
+ http_version:
75
+ recorded_at: Fri, 27 May 2022 21:54:14 GMT
76
+ - request:
77
+ method: post
78
+ uri: https://api.chartmogul.com/v1/plans
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"name":"Test Plan1","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_8c554802-de07-11ec-94f4-e390518bbd37"}'
82
+ headers:
83
+ User-Agent:
84
+ - chartmogul-ruby/3.0.0
85
+ Content-Type:
86
+ - application/json
87
+ Authorization:
88
+ - Basic hidden
89
+ response:
90
+ status:
91
+ code: 201
92
+ message: Created
93
+ headers:
94
+ access-control-allow-credentials:
95
+ - 'true'
96
+ cache-control:
97
+ - max-age=0, private, must-revalidate
98
+ content-type:
99
+ - application/json; charset=utf-8
100
+ date:
101
+ - Fri, 27 May 2022 21:54:15 GMT
102
+ etag:
103
+ - W/"0b21f0d75302a76373931e37ba429605"
104
+ referrer-policy:
105
+ - strict-origin-when-cross-origin
106
+ status:
107
+ - 201 Created
108
+ x-content-type-options:
109
+ - nosniff
110
+ x-download-options:
111
+ - noopen
112
+ x-frame-options:
113
+ - DENY
114
+ x-permitted-cross-domain-policies:
115
+ - none
116
+ x-request-id:
117
+ - 59f66274d33c71993c6b7cd9f65f8860
118
+ x-runtime:
119
+ - '0.051109'
120
+ x-xss-protection:
121
+ - 1; mode=block
122
+ content-length:
123
+ - '225'
124
+ connection:
125
+ - keep-alive
126
+ body:
127
+ encoding: UTF-8
128
+ string: '{"external_id":"795139e0-c035-013a-9407-0a902fab83ca","name":"Test
129
+ Plan1","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_8c554802-de07-11ec-94f4-e390518bbd37","uuid":"pl_795139e0-c035-013a-9407-0a902fab83ca"}'
130
+ http_version:
131
+ recorded_at: Fri, 27 May 2022 21:54:14 GMT
132
+ - request:
133
+ method: post
134
+ uri: https://api.chartmogul.com/v1/subscription_events
135
+ body:
136
+ encoding: UTF-8
137
+ string: '{"subscription_event":{"id":null,"data_source_uuid":"ds_8c554802-de07-11ec-94f4-e390518bbd37","customer_external_id":"test_cus_ext_id","subscription_set_external_id":"","subscription_external_id":"test_cus_sub_ext_id1","plan_external_id":"","event_date":"2022-05-18T09:48:34Z","effective_date":"2021-12-30T00:01:00Z","event_type":"subscription_cancelled","external_id":"test_ev_id_delete_1","errors":null,"created_at":null,"updated_at":null,"quantity":"","currency":"","amount_in_cents":"","tax_amount_in_cents":null,"retracted_event_id":null}}'
138
+ headers:
139
+ User-Agent:
140
+ - chartmogul-ruby/3.0.0
141
+ Content-Type:
142
+ - application/json
143
+ Authorization:
144
+ - Basic hidden
145
+ response:
146
+ status:
147
+ code: 201
148
+ message: Created
149
+ headers:
150
+ access-control-allow-credentials:
151
+ - 'true'
152
+ cache-control:
153
+ - max-age=0, private, must-revalidate
154
+ content-type:
155
+ - application/json; charset=utf-8
156
+ date:
157
+ - Fri, 27 May 2022 21:54:15 GMT
158
+ etag:
159
+ - W/"48983256e3214afc451392183977f77c"
160
+ referrer-policy:
161
+ - strict-origin-when-cross-origin
162
+ status:
163
+ - 201 Created
164
+ x-content-type-options:
165
+ - nosniff
166
+ x-download-options:
167
+ - noopen
168
+ x-frame-options:
169
+ - DENY
170
+ x-permitted-cross-domain-policies:
171
+ - none
172
+ x-request-id:
173
+ - ca47cfb422d6e4a87151532b8aa7675a
174
+ x-runtime:
175
+ - '0.037850'
176
+ x-xss-protection:
177
+ - 1; mode=block
178
+ transfer-encoding:
179
+ - chunked
180
+ connection:
181
+ - keep-alive
182
+ body:
183
+ encoding: UTF-8
184
+ string: '{"id":138979493,"data_source_uuid":"ds_8c554802-de07-11ec-94f4-e390518bbd37","customer_external_id":"test_cus_ext_id","subscription_set_external_id":"","subscription_external_id":"test_cus_sub_ext_id1","plan_external_id":"","event_date":"2022-05-18T09:48:34Z","effective_date":"2021-12-30T00:01:00Z","event_type":"subscription_cancelled","external_id":"test_ev_id_delete_1","errors":{},"created_at":"2022-05-27T21:54:15Z","updated_at":"2022-05-27T21:54:15Z","quantity":"","currency":"","amount_in_cents":"","tax_amount_in_cents":null,"retracted_event_id":null}'
185
+ http_version:
186
+ recorded_at: Fri, 27 May 2022 21:54:15 GMT
187
+ - request:
188
+ method: get
189
+ uri: https://api.chartmogul.com/v1/subscription_events?data_source_uuid=ds_8c554802-de07-11ec-94f4-e390518bbd37
190
+ body:
191
+ encoding: US-ASCII
192
+ string: ''
193
+ headers:
194
+ User-Agent:
195
+ - chartmogul-ruby/3.0.0
196
+ Content-Type:
197
+ - application/json
198
+ Authorization:
199
+ - Basic hidden
200
+ response:
201
+ status:
202
+ code: 200
203
+ message: OK
204
+ headers:
205
+ access-control-allow-credentials:
206
+ - 'true'
207
+ cache-control:
208
+ - max-age=0, private, must-revalidate
209
+ content-type:
210
+ - application/json; charset=utf-8
211
+ date:
212
+ - Fri, 27 May 2022 21:54:15 GMT
213
+ etag:
214
+ - W/"791982e0cdffb65af28f52d42bd5f9e7"
215
+ referrer-policy:
216
+ - strict-origin-when-cross-origin
217
+ status:
218
+ - 200 OK
219
+ vary:
220
+ - Accept-Encoding, Accept-Encoding
221
+ x-content-type-options:
222
+ - nosniff
223
+ x-download-options:
224
+ - noopen
225
+ x-frame-options:
226
+ - DENY
227
+ x-permitted-cross-domain-policies:
228
+ - none
229
+ x-request-id:
230
+ - ebb9192eae76cafbf22ff48c7af22dbb
231
+ x-runtime:
232
+ - '0.019523'
233
+ x-xss-protection:
234
+ - 1; mode=block
235
+ content-length:
236
+ - '370'
237
+ connection:
238
+ - keep-alive
239
+ body:
240
+ encoding: ASCII-8BIT
241
+ string: '{"subscription_events":[{"id":138979493,"data_source_uuid":"ds_8c554802-de07-11ec-94f4-e390518bbd37","customer_external_id":"test_cus_ext_id","subscription_set_external_id":"","subscription_external_id":"test_cus_sub_ext_id1","plan_external_id":"","event_date":"2022-05-18T09:48:34Z","effective_date":"2021-12-30T00:01:00Z","event_type":"subscription_cancelled","external_id":"test_ev_id_delete_1","errors":{},"created_at":"2022-05-27T21:54:15Z","updated_at":"2022-05-27T21:54:15Z","quantity":"","currency":"","amount_in_cents":"","tax_amount_in_cents":null,"retracted_event_id":null}],"meta":{"next_key":null,"prev_key":null,"before_key":"2022-05-27T21:54:15.757Z","page":1,"total_pages":1}}'
242
+ http_version:
243
+ recorded_at: Fri, 27 May 2022 21:54:15 GMT
244
+ - request:
245
+ method: delete
246
+ uri: https://api.chartmogul.com/v1/subscription_events?subscription_event%5Bid%5D=138979493
247
+ body:
248
+ encoding: US-ASCII
249
+ string: ''
250
+ headers:
251
+ User-Agent:
252
+ - chartmogul-ruby/3.0.0
253
+ Authorization:
254
+ - Basic hidden
255
+ response:
256
+ status:
257
+ code: 204
258
+ message: No Content
259
+ headers:
260
+ access-control-allow-credentials:
261
+ - 'true'
262
+ cache-control:
263
+ - no-cache
264
+ date:
265
+ - Fri, 27 May 2022 21:54:16 GMT
266
+ referrer-policy:
267
+ - strict-origin-when-cross-origin
268
+ status:
269
+ - 204 No Content
270
+ x-content-type-options:
271
+ - nosniff
272
+ x-download-options:
273
+ - noopen
274
+ x-frame-options:
275
+ - DENY
276
+ x-permitted-cross-domain-policies:
277
+ - none
278
+ x-request-id:
279
+ - 3cbc09f8a06ab202da93ff02c5ee7329
280
+ x-runtime:
281
+ - '0.031820'
282
+ x-xss-protection:
283
+ - 1; mode=block
284
+ connection:
285
+ - keep-alive
286
+ body:
287
+ encoding: UTF-8
288
+ string: ''
289
+ http_version:
290
+ recorded_at: Fri, 27 May 2022 21:54:16 GMT
291
+ - request:
292
+ method: get
293
+ uri: https://api.chartmogul.com/v1/subscription_events?data_source_uuid=ds_8c554802-de07-11ec-94f4-e390518bbd37
294
+ body:
295
+ encoding: US-ASCII
296
+ string: ''
297
+ headers:
298
+ User-Agent:
299
+ - chartmogul-ruby/3.0.0
300
+ Content-Type:
301
+ - application/json
302
+ Authorization:
303
+ - Basic hidden
304
+ response:
305
+ status:
306
+ code: 200
307
+ message: OK
308
+ headers:
309
+ access-control-allow-credentials:
310
+ - 'true'
311
+ cache-control:
312
+ - max-age=0, private, must-revalidate
313
+ content-type:
314
+ - application/json; charset=utf-8
315
+ date:
316
+ - Fri, 27 May 2022 21:54:16 GMT
317
+ etag:
318
+ - W/"4ec30e9c0f35ab5620b71cf7987ad1e8"
319
+ referrer-policy:
320
+ - strict-origin-when-cross-origin
321
+ status:
322
+ - 200 OK
323
+ vary:
324
+ - Accept-Encoding, Accept-Encoding
325
+ x-content-type-options:
326
+ - nosniff
327
+ x-download-options:
328
+ - noopen
329
+ x-frame-options:
330
+ - DENY
331
+ x-permitted-cross-domain-policies:
332
+ - none
333
+ x-request-id:
334
+ - f4d118fc0613d489065d9d7cb6517dae
335
+ x-runtime:
336
+ - '0.013635'
337
+ x-xss-protection:
338
+ - 1; mode=block
339
+ content-length:
340
+ - '130'
341
+ connection:
342
+ - keep-alive
343
+ body:
344
+ encoding: ASCII-8BIT
345
+ string: '{"subscription_events":[],"meta":{"next_key":null,"prev_key":null,"before_key":"2022-05-27T21:54:16.462Z","page":0,"total_pages":0}}'
346
+ http_version:
347
+ recorded_at: Fri, 27 May 2022 21:54:16 GMT
348
+ - request:
349
+ method: delete
350
+ uri: https://api.chartmogul.com/v1/data_sources/ds_8c554802-de07-11ec-94f4-e390518bbd37
351
+ body:
352
+ encoding: US-ASCII
353
+ string: ''
354
+ headers:
355
+ User-Agent:
356
+ - chartmogul-ruby/3.0.0
357
+ Authorization:
358
+ - Basic hidden
359
+ response:
360
+ status:
361
+ code: 204
362
+ message: No Content
363
+ headers:
364
+ access-control-allow-credentials:
365
+ - 'true'
366
+ date:
367
+ - Fri, 27 May 2022 21:54:16 GMT
368
+ status:
369
+ - 204 No Content
370
+ connection:
371
+ - keep-alive
372
+ body:
373
+ encoding: UTF-8
374
+ string: ''
375
+ http_version:
376
+ recorded_at: Fri, 27 May 2022 21:54:16 GMT
377
+ recorded_with: VCR 5.1.0
@@ -0,0 +1,320 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.chartmogul.com/v1/data_sources
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"Subscription Events Test ds_index"}'
9
+ headers:
10
+ User-Agent:
11
+ - chartmogul-ruby/3.0.0
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic hidden
16
+ response:
17
+ status:
18
+ code: 201
19
+ message: Created
20
+ headers:
21
+ access-control-allow-credentials:
22
+ - 'true'
23
+ content-type:
24
+ - application/json
25
+ date:
26
+ - Fri, 27 May 2022 21:54:20 GMT
27
+ status:
28
+ - 201 Created
29
+ content-length:
30
+ - '171'
31
+ connection:
32
+ - keep-alive
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99","name":"Subscription
36
+ Events Test ds_index","system":"Import API","created_at":"2022-05-27T21:54:20.374Z","status":"idle"}'
37
+ http_version:
38
+ recorded_at: Fri, 27 May 2022 21:54:20 GMT
39
+ - request:
40
+ method: post
41
+ uri: https://api.chartmogul.com/v1/customers
42
+ body:
43
+ encoding: UTF-8
44
+ string: '{"external_id":"test_cus_ext_id","name":"Test Customer","data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99"}'
45
+ headers:
46
+ User-Agent:
47
+ - chartmogul-ruby/3.0.0
48
+ Content-Type:
49
+ - application/json
50
+ Authorization:
51
+ - Basic hidden
52
+ response:
53
+ status:
54
+ code: 201
55
+ message: Created
56
+ headers:
57
+ access-control-allow-credentials:
58
+ - 'true'
59
+ content-type:
60
+ - application/json
61
+ date:
62
+ - Fri, 27 May 2022 21:54:20 GMT
63
+ status:
64
+ - 201 Created
65
+ content-length:
66
+ - '772'
67
+ connection:
68
+ - keep-alive
69
+ body:
70
+ encoding: UTF-8
71
+ string: '{"id":131944286,"uuid":"cus_9042b26a-de07-11ec-881b-ef2c738ae27a","external_id":"test_cus_ext_id","name":"Test
72
+ Customer","email":"","status":"Lead","customer-since":null,"attributes":{"custom":{},"clearbit":{},"stripe":{},"tags":[]},"data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99","data_source_uuids":["ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99"],"external_ids":["test_cus_ext_id"],"company":"","country":null,"state":null,"city":"","zip":null,"lead_created_at":null,"free_trial_started_at":null,"address":{"country":null,"state":null,"city":"","address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#/customers/131944286-Test_Customer","billing-system-type":"Import
73
+ API","currency":"USD","currency-sign":"$"}'
74
+ http_version:
75
+ recorded_at: Fri, 27 May 2022 21:54:20 GMT
76
+ - request:
77
+ method: post
78
+ uri: https://api.chartmogul.com/v1/plans
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"name":"Test Plan1","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99"}'
82
+ headers:
83
+ User-Agent:
84
+ - chartmogul-ruby/3.0.0
85
+ Content-Type:
86
+ - application/json
87
+ Authorization:
88
+ - Basic hidden
89
+ response:
90
+ status:
91
+ code: 201
92
+ message: Created
93
+ headers:
94
+ access-control-allow-credentials:
95
+ - 'true'
96
+ cache-control:
97
+ - max-age=0, private, must-revalidate
98
+ content-type:
99
+ - application/json; charset=utf-8
100
+ date:
101
+ - Fri, 27 May 2022 21:54:21 GMT
102
+ etag:
103
+ - W/"6fde56cac48be2d2879439236e61d4c7"
104
+ referrer-policy:
105
+ - strict-origin-when-cross-origin
106
+ status:
107
+ - 201 Created
108
+ x-content-type-options:
109
+ - nosniff
110
+ x-download-options:
111
+ - noopen
112
+ x-frame-options:
113
+ - DENY
114
+ x-permitted-cross-domain-policies:
115
+ - none
116
+ x-request-id:
117
+ - 5555551bcf3ef259ad027d1ad2dfadea
118
+ x-runtime:
119
+ - '0.036157'
120
+ x-xss-protection:
121
+ - 1; mode=block
122
+ content-length:
123
+ - '225'
124
+ connection:
125
+ - keep-alive
126
+ body:
127
+ encoding: UTF-8
128
+ string: '{"external_id":"7cfed9b0-c035-013a-2b33-2ae6b33040d8","name":"Test
129
+ Plan1","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99","uuid":"pl_7cfed9b0-c035-013a-2b33-2ae6b33040d8"}'
130
+ http_version:
131
+ recorded_at: Fri, 27 May 2022 21:54:21 GMT
132
+ - request:
133
+ method: post
134
+ uri: https://api.chartmogul.com/v1/subscription_events
135
+ body:
136
+ encoding: UTF-8
137
+ string: '{"subscription_event":{"id":null,"data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99","customer_external_id":"test_cus_ext_id","subscription_set_external_id":"","subscription_external_id":"test_cus_sub_ext_id1","plan_external_id":"","event_date":"2022-05-18T09:48:34Z","effective_date":"2021-12-30T00:01:00Z","event_type":"subscription_cancelled","external_id":"test_ev_id_create_1","errors":null,"created_at":null,"updated_at":null,"quantity":"","currency":"","amount_in_cents":"","tax_amount_in_cents":null,"retracted_event_id":null}}'
138
+ headers:
139
+ User-Agent:
140
+ - chartmogul-ruby/3.0.0
141
+ Content-Type:
142
+ - application/json
143
+ Authorization:
144
+ - Basic hidden
145
+ response:
146
+ status:
147
+ code: 201
148
+ message: Created
149
+ headers:
150
+ access-control-allow-credentials:
151
+ - 'true'
152
+ cache-control:
153
+ - max-age=0, private, must-revalidate
154
+ content-type:
155
+ - application/json; charset=utf-8
156
+ date:
157
+ - Fri, 27 May 2022 21:54:21 GMT
158
+ etag:
159
+ - W/"09e4c0810a4a8c2fbabd9173d353f99b"
160
+ referrer-policy:
161
+ - strict-origin-when-cross-origin
162
+ status:
163
+ - 201 Created
164
+ x-content-type-options:
165
+ - nosniff
166
+ x-download-options:
167
+ - noopen
168
+ x-frame-options:
169
+ - DENY
170
+ x-permitted-cross-domain-policies:
171
+ - none
172
+ x-request-id:
173
+ - f047e84bd02b0505c9cacafc71906664
174
+ x-runtime:
175
+ - '0.038987'
176
+ x-xss-protection:
177
+ - 1; mode=block
178
+ transfer-encoding:
179
+ - chunked
180
+ connection:
181
+ - keep-alive
182
+ body:
183
+ encoding: UTF-8
184
+ string: '{"id":138979501,"data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99","customer_external_id":"test_cus_ext_id","subscription_set_external_id":"","subscription_external_id":"test_cus_sub_ext_id1","plan_external_id":"","event_date":"2022-05-18T09:48:34Z","effective_date":"2021-12-30T00:01:00Z","event_type":"subscription_cancelled","external_id":"test_ev_id_create_1","errors":{},"created_at":"2022-05-27T21:54:21Z","updated_at":"2022-05-27T21:54:21Z","quantity":"","currency":"","amount_in_cents":"","tax_amount_in_cents":null,"retracted_event_id":null}'
185
+ http_version:
186
+ recorded_at: Fri, 27 May 2022 21:54:21 GMT
187
+ - request:
188
+ method: get
189
+ uri: https://api.chartmogul.com/v1/subscription_events?data_source_uuid=ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99
190
+ body:
191
+ encoding: US-ASCII
192
+ string: ''
193
+ headers:
194
+ User-Agent:
195
+ - chartmogul-ruby/3.0.0
196
+ Content-Type:
197
+ - application/json
198
+ Authorization:
199
+ - Basic hidden
200
+ response:
201
+ status:
202
+ code: 200
203
+ message: OK
204
+ headers:
205
+ access-control-allow-credentials:
206
+ - 'true'
207
+ cache-control:
208
+ - max-age=0, private, must-revalidate
209
+ content-type:
210
+ - application/json; charset=utf-8
211
+ date:
212
+ - Fri, 27 May 2022 21:54:21 GMT
213
+ etag:
214
+ - W/"19aca00f96d5e5fe4b2f45dbc8e61ec7"
215
+ referrer-policy:
216
+ - strict-origin-when-cross-origin
217
+ status:
218
+ - 200 OK
219
+ vary:
220
+ - Accept-Encoding, Accept-Encoding
221
+ x-content-type-options:
222
+ - nosniff
223
+ x-download-options:
224
+ - noopen
225
+ x-frame-options:
226
+ - DENY
227
+ x-permitted-cross-domain-policies:
228
+ - none
229
+ x-request-id:
230
+ - 7561efee0df9bdf9fb734897e35dc90e
231
+ x-runtime:
232
+ - '0.016321'
233
+ x-xss-protection:
234
+ - 1; mode=block
235
+ content-length:
236
+ - '368'
237
+ connection:
238
+ - keep-alive
239
+ body:
240
+ encoding: ASCII-8BIT
241
+ string: '{"subscription_events":[{"id":138979501,"data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99","customer_external_id":"test_cus_ext_id","subscription_set_external_id":"","subscription_external_id":"test_cus_sub_ext_id1","plan_external_id":"","event_date":"2022-05-18T09:48:34Z","effective_date":"2021-12-30T00:01:00Z","event_type":"subscription_cancelled","external_id":"test_ev_id_create_1","errors":{},"created_at":"2022-05-27T21:54:21Z","updated_at":"2022-05-27T21:54:21Z","quantity":"","currency":"","amount_in_cents":"","tax_amount_in_cents":null,"retracted_event_id":null}],"meta":{"next_key":null,"prev_key":null,"before_key":"2022-05-27T21:54:21.938Z","page":1,"total_pages":1}}'
242
+ http_version:
243
+ recorded_at: Fri, 27 May 2022 21:54:21 GMT
244
+ - request:
245
+ method: delete
246
+ uri: https://api.chartmogul.com/v1/subscription_events?subscription_event%5Bid%5D=138979501
247
+ body:
248
+ encoding: US-ASCII
249
+ string: ''
250
+ headers:
251
+ User-Agent:
252
+ - chartmogul-ruby/3.0.0
253
+ Authorization:
254
+ - Basic hidden
255
+ response:
256
+ status:
257
+ code: 204
258
+ message: No Content
259
+ headers:
260
+ access-control-allow-credentials:
261
+ - 'true'
262
+ cache-control:
263
+ - no-cache
264
+ date:
265
+ - Fri, 27 May 2022 21:54:22 GMT
266
+ referrer-policy:
267
+ - strict-origin-when-cross-origin
268
+ status:
269
+ - 204 No Content
270
+ x-content-type-options:
271
+ - nosniff
272
+ x-download-options:
273
+ - noopen
274
+ x-frame-options:
275
+ - DENY
276
+ x-permitted-cross-domain-policies:
277
+ - none
278
+ x-request-id:
279
+ - 523d53210f2717f45159faa43ae6903a
280
+ x-runtime:
281
+ - '0.023047'
282
+ x-xss-protection:
283
+ - 1; mode=block
284
+ connection:
285
+ - keep-alive
286
+ body:
287
+ encoding: UTF-8
288
+ string: ''
289
+ http_version:
290
+ recorded_at: Fri, 27 May 2022 21:54:22 GMT
291
+ - request:
292
+ method: delete
293
+ uri: https://api.chartmogul.com/v1/data_sources/ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99
294
+ body:
295
+ encoding: US-ASCII
296
+ string: ''
297
+ headers:
298
+ User-Agent:
299
+ - chartmogul-ruby/3.0.0
300
+ Authorization:
301
+ - Basic hidden
302
+ response:
303
+ status:
304
+ code: 204
305
+ message: No Content
306
+ headers:
307
+ access-control-allow-credentials:
308
+ - 'true'
309
+ date:
310
+ - Fri, 27 May 2022 21:54:22 GMT
311
+ status:
312
+ - 204 No Content
313
+ connection:
314
+ - keep-alive
315
+ body:
316
+ encoding: UTF-8
317
+ string: ''
318
+ http_version:
319
+ recorded_at: Fri, 27 May 2022 21:54:22 GMT
320
+ recorded_with: VCR 5.1.0