---
http_interactions:
- request:
    method: post
    uri: https://api.stripe.com/v1/tokens
    body:
      encoding: UTF-8
      string: card[number]=4242424242424242&card[exp_month]=4&card[exp_year]=2017&card[cvc]=314
    headers:
      Accept:
      - "*/*; q=0.5, application/xml"
      Accept-Encoding:
      - gzip, deflate
      User-Agent:
      - Stripe/v1 RubyBindings/1.30.2
      Authorization:
      - Bearer sk_test_testfaketestfaketestfake
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-User-Agent:
      - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
        integration 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
        PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"integration"}'
      Content-Length:
      - '81'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Thu, 07 Apr 2016 15:02:21 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '778'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET, POST, HEAD, OPTIONS, DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Request-Id:
      - req_8E6s5qX3Z71ouH
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "id": "tok_17xeeH2sOmf47Nz9fhi24LcM",
          "object": "token",
          "card": {
            "id": "card_17xeeH2sOmf47Nz9qkD2jaiS",
            "object": "card",
            "address_city": null,
            "address_country": null,
            "address_line1": null,
            "address_line1_check": null,
            "address_line2": null,
            "address_state": null,
            "address_zip": null,
            "address_zip_check": null,
            "brand": "Visa",
            "country": "US",
            "cvc_check": "unchecked",
            "dynamic_last4": null,
            "exp_month": 4,
            "exp_year": 2017,
            "fingerprint": "o52jybR7bnmNn6AT",
            "funding": "credit",
            "last4": "4242",
            "metadata": {},
            "name": null,
            "tokenization_method": null
          },
          "client_ip": "86.76.5.109",
          "created": 1460041341,
          "livemode": false,
          "type": "card",
          "used": false
        }
    http_version:
  recorded_at: Thu, 07 Apr 2016 15:02:21 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/invoiceitems
    body:
      encoding: UTF-8
      string: customer=cus_8Di1wjdVktv5kt&amount=5100&currency=usd&description=Formation+Imprimante+3D+April+12%2C+2016+08%3A00+-+12%3A00+PM
    headers:
      Accept:
      - "*/*; q=0.5, application/xml"
      Accept-Encoding:
      - gzip, deflate
      User-Agent:
      - Stripe/v1 RubyBindings/1.30.2
      Authorization:
      - Bearer sk_test_testfaketestfaketestfake
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-User-Agent:
      - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
        integration 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
        PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"integration"}'
      Content-Length:
      - '126'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Thu, 07 Apr 2016 15:02:22 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '472'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET, POST, HEAD, OPTIONS, DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Request-Id:
      - req_8E6sbtrP1o0eL7
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "id": "ii_17xeeI2sOmf47Nz9qEhwu9J6",
          "object": "invoiceitem",
          "amount": 5100,
          "currency": "usd",
          "customer": "cus_8Di1wjdVktv5kt",
          "date": 1460041342,
          "description": "Formation Imprimante 3D April 12, 2016 08:00 - 12:00 PM",
          "discountable": true,
          "invoice": null,
          "livemode": false,
          "metadata": {},
          "period": {
            "start": 1460041342,
            "end": 1460041342
          },
          "plan": null,
          "proration": false,
          "quantity": null,
          "subscription": null
        }
    http_version:
  recorded_at: Thu, 07 Apr 2016 15:02:22 GMT
- request:
    method: get
    uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt
    body:
      encoding: US-ASCII
      string: ''
    headers:
      Accept:
      - "*/*; q=0.5, application/xml"
      Accept-Encoding:
      - gzip, deflate
      User-Agent:
      - Stripe/v1 RubyBindings/1.30.2
      Authorization:
      - Bearer sk_test_testfaketestfaketestfake
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-User-Agent:
      - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
        integration 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
        PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"integration"}'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Thu, 07 Apr 2016 15:02:23 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '5571'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET, POST, HEAD, OPTIONS, DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Request-Id:
      - req_8E6sNFUC3vntgP
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: ASCII-8BIT
      string: !binary |-
[encoded data, 8487 characters]
        OERpMXdqZFZrdHY1a3Qvc3Vic2NyaXB0aW9ucyIKICB9Cn0K
    http_version:
  recorded_at: Thu, 07 Apr 2016 15:02:23 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/sources
    body:
      encoding: UTF-8
      string: card=tok_17xeeH2sOmf47Nz9fhi24LcM
    headers:
      Accept:
      - "*/*; q=0.5, application/xml"
      Accept-Encoding:
      - gzip, deflate
      User-Agent:
      - Stripe/v1 RubyBindings/1.30.2
      Authorization:
      - Bearer sk_test_testfaketestfaketestfake
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-User-Agent:
      - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
        integration 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
        PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"integration"}'
      Content-Length:
      - '33'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Thu, 07 Apr 2016 15:02:24 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '577'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET, POST, HEAD, OPTIONS, DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Request-Id:
      - req_8E6s96LPZP4cCo
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "id": "card_17xeeH2sOmf47Nz9qkD2jaiS",
          "object": "card",
          "address_city": null,
          "address_country": null,
          "address_line1": null,
          "address_line1_check": null,
          "address_line2": null,
          "address_state": null,
          "address_zip": null,
          "address_zip_check": null,
          "brand": "Visa",
          "country": "US",
          "customer": "cus_8Di1wjdVktv5kt",
          "cvc_check": "pass",
          "dynamic_last4": null,
          "exp_month": 4,
          "exp_year": 2017,
          "fingerprint": "o52jybR7bnmNn6AT",
          "funding": "credit",
          "last4": "4242",
          "metadata": {},
          "name": null,
          "tokenization_method": null
        }
    http_version:
  recorded_at: Thu, 07 Apr 2016 15:02:24 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt
    body:
      encoding: UTF-8
      string: default_source=card_17xeeH2sOmf47Nz9qkD2jaiS
    headers:
      Accept:
      - "*/*; q=0.5, application/xml"
      Accept-Encoding:
      - gzip, deflate
      User-Agent:
      - Stripe/v1 RubyBindings/1.30.2
      Authorization:
      - Bearer sk_test_testfaketestfaketestfake
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-User-Agent:
      - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
        integration 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
        PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"integration"}'
      Content-Length:
      - '44'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Thu, 07 Apr 2016 15:02:25 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '6299'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET, POST, HEAD, OPTIONS, DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Request-Id:
      - req_8E6shlISPAIWMP
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: ASCII-8BIT
      string: !binary |-
[encoded data, 9660 characters]
    http_version:
  recorded_at: Thu, 07 Apr 2016 15:02:25 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/invoices
    body:
      encoding: UTF-8
      string: customer=cus_8Di1wjdVktv5kt
    headers:
      Accept:
      - "*/*; q=0.5, application/xml"
      Accept-Encoding:
      - gzip, deflate
      User-Agent:
      - Stripe/v1 RubyBindings/1.30.2
      Authorization:
      - Bearer sk_test_testfaketestfaketestfake
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-User-Agent:
      - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
        integration 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
        PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"integration"}'
      Content-Length:
      - '27'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Thu, 07 Apr 2016 15:02:26 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '1429'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET, POST, HEAD, OPTIONS, DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Request-Id:
      - req_8E6spkK6V9UkUW
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "id": "in_17xeeM2sOmf47Nz9kzn0pC8f",
          "object": "invoice",
          "amount_due": 5100,
          "application_fee": null,
          "attempt_count": 0,
          "attempted": false,
          "charge": null,
          "closed": false,
          "currency": "usd",
          "customer": "cus_8Di1wjdVktv5kt",
          "date": 1460041346,
          "description": null,
          "discount": null,
          "ending_balance": null,
          "forgiven": false,
          "lines": {
            "object": "list",
            "data": [
              {
                "id": "ii_17xeeI2sOmf47Nz9qEhwu9J6",
                "object": "line_item",
                "amount": 5100,
                "currency": "usd",
                "description": "Formation Imprimante 3D April 12, 2016 08:00 - 12:00 PM",
                "discountable": true,
                "livemode": false,
                "metadata": {},
                "period": {
                  "start": 1460041342,
                  "end": 1460041342
                },
                "plan": null,
                "proration": false,
                "quantity": null,
                "subscription": null,
                "type": "invoiceitem"
              }
            ],
            "has_more": false,
            "total_count": 1,
            "url": "/v1/invoices/in_17xeeM2sOmf47Nz9kzn0pC8f/lines"
          },
          "livemode": false,
          "metadata": {},
          "next_payment_attempt": 1460044946,
          "paid": false,
          "period_end": 1460041346,
          "period_start": 1459948968,
          "receipt_number": null,
          "starting_balance": 0,
          "statement_descriptor": null,
          "subscription": null,
          "subtotal": 5100,
          "tax": null,
          "tax_percent": null,
          "total": 5100,
          "webhooks_delivered_at": null
        }
    http_version:
  recorded_at: Thu, 07 Apr 2016 15:02:26 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/invoices/in_17xeeM2sOmf47Nz9kzn0pC8f/pay
    body:
      encoding: ASCII-8BIT
      string: ''
    headers:
      Accept:
      - "*/*; q=0.5, application/xml"
      Accept-Encoding:
      - gzip, deflate
      User-Agent:
      - Stripe/v1 RubyBindings/1.30.2
      Authorization:
      - Bearer sk_test_testfaketestfaketestfake
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-User-Agent:
      - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
        integration 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
        PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"integration"}'
      Content-Length:
      - '0'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Thu, 07 Apr 2016 15:02:28 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '1448'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET, POST, HEAD, OPTIONS, DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Request-Id:
      - req_8E6srau28jSd0F
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "id": "in_17xeeM2sOmf47Nz9kzn0pC8f",
          "object": "invoice",
          "amount_due": 5100,
          "application_fee": null,
          "attempt_count": 1,
          "attempted": true,
          "charge": "ch_17xeeN2sOmf47Nz9bPRkhlte",
          "closed": true,
          "currency": "usd",
          "customer": "cus_8Di1wjdVktv5kt",
          "date": 1460041346,
          "description": null,
          "discount": null,
          "ending_balance": 0,
          "forgiven": false,
          "lines": {
            "object": "list",
            "data": [
              {
                "id": "ii_17xeeI2sOmf47Nz9qEhwu9J6",
                "object": "line_item",
                "amount": 5100,
                "currency": "usd",
                "description": "Formation Imprimante 3D April 12, 2016 08:00 - 12:00 PM",
                "discountable": true,
                "livemode": false,
                "metadata": {},
                "period": {
                  "start": 1460041342,
                  "end": 1460041342
                },
                "plan": null,
                "proration": false,
                "quantity": null,
                "subscription": null,
                "type": "invoiceitem"
              }
            ],
            "has_more": false,
            "total_count": 1,
            "url": "/v1/invoices/in_17xeeM2sOmf47Nz9kzn0pC8f/lines"
          },
          "livemode": false,
          "metadata": {},
          "next_payment_attempt": null,
          "paid": true,
          "period_end": 1460041346,
          "period_start": 1459948968,
          "receipt_number": null,
          "starting_balance": 0,
          "statement_descriptor": null,
          "subscription": null,
          "subtotal": 5100,
          "tax": null,
          "tax_percent": null,
          "total": 5100,
          "webhooks_delivered_at": 1460041346
        }
    http_version:
  recorded_at: Thu, 07 Apr 2016 15:02:27 GMT
- request:
    method: delete
    uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/sources/card_17xeeH2sOmf47Nz9qkD2jaiS
    body:
      encoding: US-ASCII
      string: ''
    headers:
      Accept:
      - "*/*; q=0.5, application/xml"
      Accept-Encoding:
      - gzip, deflate
      User-Agent:
      - Stripe/v1 RubyBindings/1.30.2
      Authorization:
      - Bearer sk_test_testfaketestfaketestfake
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-User-Agent:
      - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
        integration 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
        PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"integration"}'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Thu, 07 Apr 2016 15:02:29 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '63'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET, POST, HEAD, OPTIONS, DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Request-Id:
      - req_8E6saiNl2MPHRO
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "deleted": true,
          "id": "card_17xeeH2sOmf47Nz9qkD2jaiS"
        }
    http_version:
  recorded_at: Thu, 07 Apr 2016 15:02:28 GMT
recorded_with: VCR 3.0.1
