---
http_interactions:
- request:
    method: post
    uri: https://api.chartmogul.com/v1/data_sources
    body:
      encoding: UTF-8
      string: '{"name":"Subscription Test Data Source"}'
    headers:
      User-Agent:
      - Faraday v0.9.2
      Content-Type:
      - application/json
      Authorization:
      - Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
  response:
    status:
      code: 201
      message:
    headers:
      server:
      - nginx/1.9.10
      date:
      - Thu, 23 Jun 2016 20:46:05 GMT
      content-type:
      - application/json; charset=utf-8
      transfer-encoding:
      - chunked
      connection:
      - close
      x-frame-options:
      - SAMEORIGIN
      x-xss-protection:
      - 1; mode=block
      x-content-type-options:
      - nosniff
      etag:
      - W/"d9f558c2b556b28cdcc9c323d3ac66dd"
      cache-control:
      - max-age=0, private, must-revalidate
      x-request-id:
      - 4333819d-8abb-4310-b475-1c6b4adb5c9f
      x-runtime:
      - '0.507565'
      strict-transport-security:
      - max-age=15768000
    body:
      encoding: UTF-8
      string: '{"uuid":"ds_55ab11fb-53e6-4468-aa95-bd582f14cac6","name":"Subscription
        Test Data Source","created_at":"2016-06-23T20:46:05.645Z","status":"never_imported"}'
    http_version:
  recorded_at: Thu, 23 Jun 2016 20:46:05 GMT
- request:
    method: post
    uri: https://api.chartmogul.com/v1/customers
    body:
      encoding: UTF-8
      string: '{"data_source_uuid":"ds_55ab11fb-53e6-4468-aa95-bd582f14cac6","external_id":"test_cus_ext_id","name":"Test
        Customer"}'
    headers:
      User-Agent:
      - Faraday v0.9.2
      Content-Type:
      - application/json
      Authorization:
      - Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
  response:
    status:
      code: 201
      message:
    headers:
      server:
      - nginx/1.9.10
      date:
      - Thu, 23 Jun 2016 20:46:06 GMT
      content-type:
      - application/json; charset=utf-8
      transfer-encoding:
      - chunked
      connection:
      - close
      x-frame-options:
      - SAMEORIGIN
      x-xss-protection:
      - 1; mode=block
      x-content-type-options:
      - nosniff
      etag:
      - W/"056f26f774245e913872879340e8dd36"
      cache-control:
      - max-age=0, private, must-revalidate
      x-request-id:
      - b3bc5b32-a587-49e8-8588-a54b9fa048a2
      x-runtime:
      - '0.295099'
      strict-transport-security:
      - max-age=15768000
    body:
      encoding: UTF-8
      string: '{"uuid":"cus_510b1395-4fe8-4d35-ae23-0e61f9a51e33","external_id":"test_cus_ext_id","name":"Test
        Customer","company":"","email":"","city":"","state":"","country":"","zip":"","data_source_uuid":"ds_55ab11fb-53e6-4468-aa95-bd582f14cac6"}'
    http_version:
  recorded_at: Thu, 23 Jun 2016 20:46:06 GMT
- request:
    method: post
    uri: https://api.chartmogul.com/v1/plans
    body:
      encoding: UTF-8
      string: '{"data_source_uuid":"ds_55ab11fb-53e6-4468-aa95-bd582f14cac6","name":"Test
        Plan","interval_count":7,"interval_unit":"day"}'
    headers:
      User-Agent:
      - Faraday v0.9.2
      Content-Type:
      - application/json
      Authorization:
      - Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
  response:
    status:
      code: 201
      message:
    headers:
      server:
      - nginx/1.9.10
      date:
      - Thu, 23 Jun 2016 20:46:06 GMT
      content-type:
      - application/json; charset=utf-8
      transfer-encoding:
      - chunked
      connection:
      - close
      x-frame-options:
      - SAMEORIGIN
      x-xss-protection:
      - 1; mode=block
      x-content-type-options:
      - nosniff
      etag:
      - W/"cc9005f2d9ac2dcb5fb9076128a32d21"
      cache-control:
      - max-age=0, private, must-revalidate
      x-request-id:
      - 250b3ffc-64f6-482a-a395-1f46b7cf3736
      x-runtime:
      - '0.025146'
      strict-transport-security:
      - max-age=15768000
    body:
      encoding: UTF-8
      string: '{"uuid":"pl_06ea83a9-f8c8-4ddd-a980-9ceffd27f107","external_id":null,"name":"Test
        Plan","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_55ab11fb-53e6-4468-aa95-bd582f14cac6"}'
    http_version:
  recorded_at: Thu, 23 Jun 2016 20:46:06 GMT
- request:
    method: post
    uri: https://api.chartmogul.com/v1/import/customers/cus_510b1395-4fe8-4d35-ae23-0e61f9a51e33/invoices
    body:
      encoding: UTF-8
      string: '{"invoices":[{"date":"2016-01-01 12:00:00 +0000","currency":"USD","line_items":[{"type":"subscription","subscription_external_id":"test_cus_sub_ext_id","plan_uuid":"pl_06ea83a9-f8c8-4ddd-a980-9ceffd27f107","service_period_start":"2016-01-01
        12:00:00 +0000","service_period_end":"2016-02-01 12:00:00 +0000","amount_in_cents":1000}],"external_id":"test_tr_inv_ext_id"}],"customer_uuid":"cus_510b1395-4fe8-4d35-ae23-0e61f9a51e33"}'
    headers:
      User-Agent:
      - Faraday v0.9.2
      Content-Type:
      - application/json
      Authorization:
      - Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
  response:
    status:
      code: 201
      message:
    headers:
      server:
      - nginx/1.9.10
      date:
      - Thu, 23 Jun 2016 20:46:07 GMT
      content-type:
      - application/json; charset=utf-8
      transfer-encoding:
      - chunked
      connection:
      - close
      x-frame-options:
      - SAMEORIGIN
      x-xss-protection:
      - 1; mode=block
      x-content-type-options:
      - nosniff
      etag:
      - W/"25c93d56164e8f1515058dc7f3a0d468"
      cache-control:
      - max-age=0, private, must-revalidate
      x-request-id:
      - 72edbe3a-c00c-4d83-80ca-8e091784fa88
      x-runtime:
      - '0.095619'
      strict-transport-security:
      - max-age=15768000
    body:
      encoding: UTF-8
      string: '{"invoices":[{"uuid":"inv_90054098-c269-46e1-b69a-338a8216499a","external_id":"test_tr_inv_ext_id","date":"2016-01-01T12:00:00.000Z","due_date":null,"currency":"USD","line_items":[{"uuid":"li_d25c8f7f-a10a-445f-9793-b7c68bd699cd","external_id":null,"type":"subscription","subscription_uuid":"sub_9b3ccf25-4613-4af6-84b3-12026cfa4b7c","plan_uuid":"pl_06ea83a9-f8c8-4ddd-a980-9ceffd27f107","prorated":false,"service_period_start":"2016-01-01T12:00:00.000Z","service_period_end":"2016-02-01T12:00:00.000Z","amount_in_cents":1000,"quantity":1,"discount_code":"","discount_amount_in_cents":0,"tax_amount_in_cents":0}],"transactions":[]}]}'
    http_version:
  recorded_at: Thu, 23 Jun 2016 20:46:07 GMT
- request:
    method: get
    uri: https://api.chartmogul.com/v1/import/customers/cus_510b1395-4fe8-4d35-ae23-0e61f9a51e33/subscriptions
    body:
      encoding: US-ASCII
      string: ''
    headers:
      User-Agent:
      - Faraday v0.9.2
      Content-Type:
      - application/json
      Authorization:
      - Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
  response:
    status:
      code: 200
      message:
    headers:
      server:
      - nginx/1.9.10
      date:
      - Thu, 23 Jun 2016 20:46:07 GMT
      content-type:
      - application/json; charset=utf-8
      transfer-encoding:
      - chunked
      connection:
      - close
      x-frame-options:
      - SAMEORIGIN
      x-xss-protection:
      - 1; mode=block
      x-content-type-options:
      - nosniff
      etag:
      - W/"797037ae5a33dcae7de46e23dfdd4ec7"
      cache-control:
      - max-age=0, private, must-revalidate
      x-request-id:
      - efa1a67e-37e8-4ac3-bce7-8d11f33d0e8c
      x-runtime:
      - '0.026716'
      strict-transport-security:
      - max-age=15768000
    body:
      encoding: UTF-8
      string: '{"customer_uuid":"cus_510b1395-4fe8-4d35-ae23-0e61f9a51e33","subscriptions":[{"uuid":"sub_9b3ccf25-4613-4af6-84b3-12026cfa4b7c","external_id":"test_cus_sub_ext_id","cancellation_dates":[],"plan_uuid":"pl_06ea83a9-f8c8-4ddd-a980-9ceffd27f107","data_source_uuid":"ds_55ab11fb-53e6-4468-aa95-bd582f14cac6"}],"current_page":1,"total_pages":1}'
    http_version:
  recorded_at: Thu, 23 Jun 2016 20:46:07 GMT
- request:
    method: patch
    uri: https://api.chartmogul.com/v1/import/subscriptions/sub_9b3ccf25-4613-4af6-84b3-12026cfa4b7c
    body:
      encoding: UTF-8
      string: '{"cancelled_at":"2016-01-15 12:00:00 +0000"}'
    headers:
      User-Agent:
      - Faraday v0.9.2
      Content-Type:
      - application/json
      Authorization:
      - Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
  response:
    status:
      code: 202
      message:
    headers:
      server:
      - nginx/1.9.10
      date:
      - Thu, 23 Jun 2016 20:46:07 GMT
      content-type:
      - application/json; charset=utf-8
      transfer-encoding:
      - chunked
      connection:
      - close
      x-frame-options:
      - SAMEORIGIN
      x-xss-protection:
      - 1; mode=block
      x-content-type-options:
      - nosniff
      cache-control:
      - no-cache
      x-request-id:
      - 7bdf7b19-3d18-481a-9f12-e3f613b50f7b
      x-runtime:
      - '0.060122'
    body:
      encoding: UTF-8
      string: '{"uuid":"sub_9b3ccf25-4613-4af6-84b3-12026cfa4b7c","external_id":"test_cus_sub_ext_id","cancellation_dates":["2016-01-15T12:00:00.000Z"],"customer_uuid":"cus_510b1395-4fe8-4d35-ae23-0e61f9a51e33","plan_uuid":"pl_06ea83a9-f8c8-4ddd-a980-9ceffd27f107","data_source_uuid":"ds_55ab11fb-53e6-4468-aa95-bd582f14cac6"}'
    http_version:
  recorded_at: Thu, 23 Jun 2016 20:46:07 GMT
- request:
    method: delete
    uri: https://api.chartmogul.com/v1/data_sources/ds_55ab11fb-53e6-4468-aa95-bd582f14cac6
    body:
      encoding: US-ASCII
      string: ''
    headers:
      User-Agent:
      - Faraday v0.9.2
      Authorization:
      - Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
  response:
    status:
      code: 204
      message:
    headers:
      server:
      - nginx/1.9.10
      date:
      - Thu, 23 Jun 2016 20:46:07 GMT
      connection:
      - close
      x-frame-options:
      - SAMEORIGIN
      x-xss-protection:
      - 1; mode=block
      x-content-type-options:
      - nosniff
      cache-control:
      - no-cache
      x-request-id:
      - ebf1f856-a389-457f-aead-22769e35aa8e
      x-runtime:
      - '0.013399'
      strict-transport-security:
      - max-age=15768000
    body:
      encoding: UTF-8
      string: ''
    http_version:
  recorded_at: Thu, 23 Jun 2016 20:46:07 GMT
recorded_with: VCR 3.0.3