---
http_interactions:
- request:
    method: post
    uri: https://api.chartmogul.com/v1/data_sources
    body:
      encoding: UTF-8
      string: '{"name":"Subscription Events Test ds_index"}'
    headers:
      User-Agent:
      - chartmogul-ruby/3.0.0
      Content-Type:
      - application/json
      Authorization:
      - Basic hidden
  response:
    status:
      code: 201
      message: Created
    headers:
      access-control-allow-credentials:
      - 'true'
      content-type:
      - application/json
      date:
      - Fri, 27 May 2022 21:54:20 GMT
      status:
      - 201 Created
      content-length:
      - '171'
      connection:
      - keep-alive
    body:
      encoding: UTF-8
      string: '{"uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99","name":"Subscription
        Events Test ds_index","system":"Import API","created_at":"2022-05-27T21:54:20.374Z","status":"idle"}'
    http_version:
  recorded_at: Fri, 27 May 2022 21:54:20 GMT
- request:
    method: post
    uri: https://api.chartmogul.com/v1/customers
    body:
      encoding: UTF-8
      string: '{"external_id":"test_cus_ext_id","name":"Test Customer","data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99"}'
    headers:
      User-Agent:
      - chartmogul-ruby/3.0.0
      Content-Type:
      - application/json
      Authorization:
      - Basic hidden
  response:
    status:
      code: 201
      message: Created
    headers:
      access-control-allow-credentials:
      - 'true'
      content-type:
      - application/json
      date:
      - Fri, 27 May 2022 21:54:20 GMT
      status:
      - 201 Created
      content-length:
      - '772'
      connection:
      - keep-alive
    body:
      encoding: UTF-8
      string: '{"id":131944286,"uuid":"cus_9042b26a-de07-11ec-881b-ef2c738ae27a","external_id":"test_cus_ext_id","name":"Test
        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
        API","currency":"USD","currency-sign":"$"}'
    http_version:
  recorded_at: Fri, 27 May 2022 21:54:20 GMT
- request:
    method: post
    uri: https://api.chartmogul.com/v1/plans
    body:
      encoding: UTF-8
      string: '{"name":"Test Plan1","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99"}'
    headers:
      User-Agent:
      - chartmogul-ruby/3.0.0
      Content-Type:
      - application/json
      Authorization:
      - Basic hidden
  response:
    status:
      code: 201
      message: Created
    headers:
      access-control-allow-credentials:
      - 'true'
      cache-control:
      - max-age=0, private, must-revalidate
      content-type:
      - application/json; charset=utf-8
      date:
      - Fri, 27 May 2022 21:54:21 GMT
      etag:
      - W/"6fde56cac48be2d2879439236e61d4c7"
      referrer-policy:
      - strict-origin-when-cross-origin
      status:
      - 201 Created
      x-content-type-options:
      - nosniff
      x-download-options:
      - noopen
      x-frame-options:
      - DENY
      x-permitted-cross-domain-policies:
      - none
      x-request-id:
      - 5555551bcf3ef259ad027d1ad2dfadea
      x-runtime:
      - '0.036157'
      x-xss-protection:
      - 1; mode=block
      content-length:
      - '225'
      connection:
      - keep-alive
    body:
      encoding: UTF-8
      string: '{"external_id":"7cfed9b0-c035-013a-2b33-2ae6b33040d8","name":"Test
        Plan1","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99","uuid":"pl_7cfed9b0-c035-013a-2b33-2ae6b33040d8"}'
    http_version:
  recorded_at: Fri, 27 May 2022 21:54:21 GMT
- request:
    method: post
    uri: https://api.chartmogul.com/v1/subscription_events
    body:
      encoding: UTF-8
      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}}'
    headers:
      User-Agent:
      - chartmogul-ruby/3.0.0
      Content-Type:
      - application/json
      Authorization:
      - Basic hidden
  response:
    status:
      code: 201
      message: Created
    headers:
      access-control-allow-credentials:
      - 'true'
      cache-control:
      - max-age=0, private, must-revalidate
      content-type:
      - application/json; charset=utf-8
      date:
      - Fri, 27 May 2022 21:54:21 GMT
      etag:
      - W/"09e4c0810a4a8c2fbabd9173d353f99b"
      referrer-policy:
      - strict-origin-when-cross-origin
      status:
      - 201 Created
      x-content-type-options:
      - nosniff
      x-download-options:
      - noopen
      x-frame-options:
      - DENY
      x-permitted-cross-domain-policies:
      - none
      x-request-id:
      - f047e84bd02b0505c9cacafc71906664
      x-runtime:
      - '0.038987'
      x-xss-protection:
      - 1; mode=block
      transfer-encoding:
      - chunked
      connection:
      - keep-alive
    body:
      encoding: UTF-8
      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}'
    http_version:
  recorded_at: Fri, 27 May 2022 21:54:21 GMT
- request:
    method: get
    uri: https://api.chartmogul.com/v1/subscription_events?data_source_uuid=ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99
    body:
      encoding: US-ASCII
      string: ''
    headers:
      User-Agent:
      - chartmogul-ruby/3.0.0
      Content-Type:
      - application/json
      Authorization:
      - Basic hidden
  response:
    status:
      code: 200
      message: OK
    headers:
      access-control-allow-credentials:
      - 'true'
      cache-control:
      - max-age=0, private, must-revalidate
      content-type:
      - application/json; charset=utf-8
      date:
      - Fri, 27 May 2022 21:54:21 GMT
      etag:
      - W/"19aca00f96d5e5fe4b2f45dbc8e61ec7"
      referrer-policy:
      - strict-origin-when-cross-origin
      status:
      - 200 OK
      vary:
      - Accept-Encoding, Accept-Encoding
      x-content-type-options:
      - nosniff
      x-download-options:
      - noopen
      x-frame-options:
      - DENY
      x-permitted-cross-domain-policies:
      - none
      x-request-id:
      - 7561efee0df9bdf9fb734897e35dc90e
      x-runtime:
      - '0.016321'
      x-xss-protection:
      - 1; mode=block
      content-length:
      - '368'
      connection:
      - keep-alive
    body:
      encoding: ASCII-8BIT
      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}}'
    http_version:
  recorded_at: Fri, 27 May 2022 21:54:21 GMT
- request:
    method: delete
    uri: https://api.chartmogul.com/v1/subscription_events?subscription_event%5Bid%5D=138979501
    body:
      encoding: US-ASCII
      string: ''
    headers:
      User-Agent:
      - chartmogul-ruby/3.0.0
      Authorization:
      - Basic hidden
  response:
    status:
      code: 204
      message: No Content
    headers:
      access-control-allow-credentials:
      - 'true'
      cache-control:
      - no-cache
      date:
      - Fri, 27 May 2022 21:54:22 GMT
      referrer-policy:
      - strict-origin-when-cross-origin
      status:
      - 204 No Content
      x-content-type-options:
      - nosniff
      x-download-options:
      - noopen
      x-frame-options:
      - DENY
      x-permitted-cross-domain-policies:
      - none
      x-request-id:
      - 523d53210f2717f45159faa43ae6903a
      x-runtime:
      - '0.023047'
      x-xss-protection:
      - 1; mode=block
      connection:
      - keep-alive
    body:
      encoding: UTF-8
      string: ''
    http_version:
  recorded_at: Fri, 27 May 2022 21:54:22 GMT
- request:
    method: delete
    uri: https://api.chartmogul.com/v1/data_sources/ds_9002d3f2-de07-11ec-bf8d-ab00fe78ae99
    body:
      encoding: US-ASCII
      string: ''
    headers:
      User-Agent:
      - chartmogul-ruby/3.0.0
      Authorization:
      - Basic hidden
  response:
    status:
      code: 204
      message: No Content
    headers:
      access-control-allow-credentials:
      - 'true'
      date:
      - Fri, 27 May 2022 21:54:22 GMT
      status:
      - 204 No Content
      connection:
      - keep-alive
    body:
      encoding: UTF-8
      string: ''
    http_version:
  recorded_at: Fri, 27 May 2022 21:54:22 GMT
recorded_with: VCR 5.1.0