---
http_interactions:
- request:
    method: post
    uri: https://api.stripe.com/v1/tokens
    body:
      encoding: UTF-8
      string: card[number]=4000000000000002&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-darwin15","engine":"ruby","publisher":"stripe","uname":"Darwin
        mbp-sleede-peng.home 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05
        PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64","hostname":"mbp-sleede-peng.home"}'
      Content-Length:
      - '81'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Mon, 11 Jul 2016 13:26:13 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '780'
      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_8nflaXEiTf6O0X
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "id": "tok_18W4QL2sOmf47Nz9GM695H9O",
          "object": "token",
          "card": {
            "id": "card_18W4QL2sOmf47Nz9NuqbiJMr",
            "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": "xsVM9Mfv9kfwhRSL",
            "funding": "credit",
            "last4": "0002",
            "metadata": {},
            "name": null,
            "tokenization_method": null
          },
          "client_ip": "82.122.118.54",
          "created": 1468243573,
          "livemode": false,
          "type": "card",
          "used": false
        }
    http_version: 
  recorded_at: Mon, 11 Jul 2016 13:26:13 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/invoiceitems
    body:
      encoding: UTF-8
      string: customer=cus_8Di1wjdVktv5kt&amount=3200&currency=usd&description=FORM1%2B+imprimante+3D+July+10%2C+2016+14%3A00+-+03%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-darwin15","engine":"ruby","publisher":"stripe","uname":"Darwin
        mbp-sleede-peng.home 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05
        PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64","hostname":"mbp-sleede-peng.home"}'
      Content-Length:
      - '124'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Mon, 11 Jul 2016 13:26:14 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '468'
      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_8nflWbFKH0Wr7j
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "id": "ii_18W4QM2sOmf47Nz9g7EdrbZV",
          "object": "invoiceitem",
          "amount": 3200,
          "currency": "usd",
          "customer": "cus_8Di1wjdVktv5kt",
          "date": 1468243574,
          "description": "FORM1+ imprimante 3D July 10, 2016 14:00 - 03:00 PM",
          "discountable": true,
          "invoice": null,
          "livemode": false,
          "metadata": {},
          "period": {
            "start": 1468243574,
            "end": 1468243574
          },
          "plan": null,
          "proration": false,
          "quantity": null,
          "subscription": null
        }
    http_version: 
  recorded_at: Mon, 11 Jul 2016 13:26:14 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-darwin15","engine":"ruby","publisher":"stripe","uname":"Darwin
        mbp-sleede-peng.home 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05
        PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64","hostname":"mbp-sleede-peng.home"}'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Mon, 11 Jul 2016 13:26:15 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '1408'
      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_8nflczxuJx3Fit
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "id": "cus_8Di1wjdVktv5kt",
          "object": "customer",
          "account_balance": 0,
          "created": 1459948888,
          "currency": "usd",
          "default_source": "card_17z7CT2sOmf47Nz9wtWkhGor",
          "delinquent": false,
          "description": "Jean Dupond",
          "discount": null,
          "email": "jean.dupond@gmail.com",
          "livemode": false,
          "metadata": {},
          "shipping": null,
          "sources": {
            "object": "list",
            "data": [
              {
                "id": "card_17z7CT2sOmf47Nz9wtWkhGor",
                "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
              }
            ],
            "has_more": false,
            "total_count": 1,
            "url": "/v1/customers/cus_8Di1wjdVktv5kt/sources"
          },
          "subscriptions": {
            "object": "list",
            "data": [],
            "has_more": false,
            "total_count": 0,
            "url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions"
          }
        }
    http_version: 
  recorded_at: Mon, 11 Jul 2016 13:26:15 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/sources
    body:
      encoding: UTF-8
      string: card=tok_18W4QL2sOmf47Nz9GM695H9O
    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-darwin15","engine":"ruby","publisher":"stripe","uname":"Darwin
        mbp-sleede-peng.home 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05
        PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64","hostname":"mbp-sleede-peng.home"}'
      Content-Length:
      - '33'
  response:
    status:
      code: 402
      message: Payment Required
    headers:
      Server:
      - nginx
      Date:
      - Mon, 11 Jul 2016 13:26:16 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '134'
      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_8nflIAexuhWlA2
      Stripe-Version:
      - '2015-10-16'
    body:
      encoding: UTF-8
      string: |
        {
          "error": {
            "message": "Your card was declined.",
            "type": "card_error",
            "param": "",
            "code": "card_declined"
          }
        }
    http_version: 
  recorded_at: Mon, 11 Jul 2016 13:26:16 GMT
- request:
    method: delete
    uri: https://api.stripe.com/v1/invoiceitems/ii_18W4QM2sOmf47Nz9g7EdrbZV
    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-darwin15","engine":"ruby","publisher":"stripe","uname":"Darwin
        mbp-sleede-peng.home 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05
        PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64","hostname":"mbp-sleede-peng.home"}'
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Mon, 11 Jul 2016 13:26:17 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '61'
      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_8nflVBopesOpHn
      Stripe-Version:
      - '2015-10-16'
      Strict-Transport-Security:
      - max-age=31556926; includeSubDomains
    body:
      encoding: UTF-8
      string: |
        {
          "deleted": true,
          "id": "ii_18W4QM2sOmf47Nz9g7EdrbZV"
        }
    http_version: 
  recorded_at: Mon, 11 Jul 2016 13:26:17 GMT
recorded_with: VCR 3.0.1
