From 220676b4dcfa08ad2c0806db0f656a7876aace26 Mon Sep 17 00:00:00 2001 From: Peng DU Date: Mon, 11 Jul 2016 15:32:42 +0200 Subject: [PATCH] test user reservation/subscription with wallet --- .../reservations/create_as_admin_test.rb | 103 ++ test/integration/reservations/create_test.rb | 70 ++ .../subscriptions/create_as_user_test.rb | 60 +- ...ate_for_machine_and_pay_wallet_success.yml | 1063 +++++++++++++++++ ...for_machine_without_subscription_error.yml | 169 +-- ...ptions_user_create_success_with_wallet.yml | 821 +++++++++++++ 6 files changed, 2167 insertions(+), 119 deletions(-) create mode 100644 test/vcr_cassettes/reservations_create_for_machine_and_pay_wallet_success.yml create mode 100644 test/vcr_cassettes/subscriptions_user_create_success_with_wallet.yml diff --git a/test/integration/reservations/create_as_admin_test.rb b/test/integration/reservations/create_as_admin_test.rb index 4b569735b..046d166bb 100644 --- a/test/integration/reservations/create_as_admin_test.rb +++ b/test/integration/reservations/create_as_admin_test.rb @@ -220,5 +220,108 @@ module Reservations # notification assert_not_empty Notification.where(attached_object: reservation) end + + test "user without subscription reserves a machine and pay by wallet with success" do + @vlonchamp = User.find_by(username: 'vlonchamp') + machine = Machine.find(6) + availability = machine.availabilities.first + + reservations_count = Reservation.count + invoice_count = Invoice.count + invoice_items_count = InvoiceItem.count + users_credit_count = UsersCredit.count + + post reservations_path, { reservation: { + user_id: @vlonchamp.id, + reservable_id: machine.id, + reservable_type: machine.class.name, + slots_attributes: [ + { start_at: availability.start_at.to_s(:iso8601), + end_at: (availability.start_at + 1.hour).to_s(:iso8601), + availability_id: availability.id + } + ] + }}.to_json, default_headers + + # general assertions + assert_equal 201, response.status + assert_equal reservations_count + 1, Reservation.count + assert_equal invoice_count + 1, Invoice.count + assert_equal invoice_items_count + 1, InvoiceItem.count + assert_equal users_credit_count, UsersCredit.count + + # reservation assertions + reservation = Reservation.last + + assert reservation.invoice + assert reservation.stp_invoice_id.blank? + assert_equal 1, reservation.invoice.invoice_items.count + + # invoice assertions + invoice = reservation.invoice + + assert invoice.stp_invoice_id.blank? + refute invoice.total.blank? + + # invoice_items assertions + invoice_item = InvoiceItem.last + + refute invoice_item.stp_invoice_item_id + assert_equal invoice_item.amount, machine.prices.find_by(group_id: @vlonchamp.group_id, plan_id: nil).amount + + # invoice assertions + invoice = Invoice.find_by(invoiced: reservation) + assert_invoice_pdf invoice + + # notification + assert_not_empty Notification.where(attached_object: reservation) + + # wallet + assert_equal @vlonchamp.wallet.amount, 0 + assert_equal @vlonchamp.wallet.wallet_transactions.count, 2 + transaction = @vlonchamp.wallet.wallet_transactions.last + assert_equal transaction.transaction_type, 'debit' + assert_equal transaction.amount, 10 + end + + test "user without subscription and with invoicing disabled reserves a machine and pay wallet with success" do + @vlonchamp = User.find_by(username: 'vlonchamp') + @vlonchamp.update!(invoicing_disabled: true) + machine = Machine.find(6) + availability = machine.availabilities.first + + reservations_count = Reservation.count + invoice_count = Invoice.count + invoice_items_count = InvoiceItem.count + users_credit_count = UsersCredit.count + + post reservations_path, { reservation: { + user_id: @vlonchamp.id, + reservable_id: machine.id, + reservable_type: machine.class.name, + slots_attributes: [ + { start_at: availability.start_at.to_s(:iso8601), + end_at: (availability.start_at + 1.hour).to_s(:iso8601), + availability_id: availability.id + } + ] + }}.to_json, default_headers + + # general assertions + assert_equal 201, response.status + assert_equal reservations_count + 1, Reservation.count + assert_equal invoice_count, Invoice.count + assert_equal invoice_items_count, InvoiceItem.count + assert_equal users_credit_count, UsersCredit.count + + # reservation assertions + reservation = Reservation.last + + refute reservation.invoice + assert reservation.stp_invoice_id.blank? + + # notification + assert_not_empty Notification.where(attached_object: reservation) + end end end diff --git a/test/integration/reservations/create_test.rb b/test/integration/reservations/create_test.rb index 296162816..6648a7cd6 100644 --- a/test/integration/reservations/create_test.rb +++ b/test/integration/reservations/create_test.rb @@ -292,5 +292,75 @@ module Reservations # check that user subscription were extended assert_equal reservation.slots.first.start_at + plan.duration, @user_with_subscription.subscription.expired_at end + + test "user reserves a machine and pay by wallet with success" do + @vlonchamp = User.find_by(username: 'vlonchamp') + login_as(@vlonchamp, scope: :user) + + machine = Machine.find(6) + availability = machine.availabilities.first + + reservations_count = Reservation.count + invoice_count = Invoice.count + invoice_items_count = InvoiceItem.count + users_credit_count = UsersCredit.count + wallet_transactions_count = WalletTransaction.count + + VCR.use_cassette("reservations_create_for_machine_and_pay_wallet_success") do + post reservations_path, { reservation: { + user_id: @vlonchamp.id, + reservable_id: machine.id, + reservable_type: machine.class.name, + card_token: stripe_card_token, + slots_attributes: [ + { start_at: availability.start_at.to_s(:iso8601), + end_at: (availability.start_at + 1.hour).to_s(:iso8601), + availability_id: availability.id + } + ] + }}.to_json, default_headers + end + + # general assertions + assert_equal 201, response.status + assert_equal reservations_count + 1, Reservation.count + assert_equal invoice_count + 1, Invoice.count + assert_equal invoice_items_count + 1, InvoiceItem.count + assert_equal users_credit_count, UsersCredit.count + assert_equal wallet_transactions_count + 1, WalletTransaction.count + + # reservation assertions + reservation = Reservation.last + + assert reservation.invoice + refute reservation.stp_invoice_id.blank? + assert_equal 1, reservation.invoice.invoice_items.count + + # invoice assertions + invoice = reservation.invoice + + refute invoice.stp_invoice_id.blank? + refute invoice.total.blank? + + # invoice_items assertions + invoice_item = InvoiceItem.last + + assert invoice_item.stp_invoice_item_id + assert_equal invoice_item.amount, machine.prices.find_by(group_id: @vlonchamp.group_id, plan_id: nil).amount + + # invoice assertions + invoice = Invoice.find_by(invoiced: reservation) + assert_invoice_pdf invoice + + # notification + assert_not_empty Notification.where(attached_object: reservation) + + # wallet + assert_equal @vlonchamp.wallet.amount, 0 + assert_equal @vlonchamp.wallet.wallet_transactions.count, 2 + transaction = @vlonchamp.wallet.wallet_transactions.last + assert_equal transaction.transaction_type, 'debit' + assert_equal transaction.amount, 10 + end end end diff --git a/test/integration/subscriptions/create_as_user_test.rb b/test/integration/subscriptions/create_as_user_test.rb index fd1882bca..0397dd85a 100644 --- a/test/integration/subscriptions/create_as_user_test.rb +++ b/test/integration/subscriptions/create_as_user_test.rb @@ -83,4 +83,62 @@ class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest assert_nil @user.subscription, "user's subscription was found" end -end \ No newline at end of file + + test 'user successfully takes a subscription with wallet' do + @vlonchamp = User.find_by(username: 'vlonchamp') + login_as(@vlonchamp, scope: :user) + plan = Plan.find_by(group_id: @vlonchamp.group.id, type: 'Plan', base_name: 'Mensuel tarif rĂ©duit') + + VCR.use_cassette("subscriptions_user_create_success_with_wallet") do + post '/api/subscriptions', + { + subscription: { + plan_id: plan.id, + user_id: @vlonchamp.id, + card_token: stripe_card_token + } + }.to_json, default_headers + end + + # Check response format & status + assert_equal 201, response.status, response.body + assert_equal Mime::JSON, response.content_type + + # Check the correct plan was subscribed + subscription = json_response(response.body) + assert_equal plan.id, subscription[:plan_id], 'subscribed plan does not match' + + # Check that the user has the correct subscription + assert_not_nil @vlonchamp.subscription, "user's subscription was not found" + assert_not_nil @vlonchamp.subscription.plan, "user's subscribed plan was not found" + assert_equal plan.id, @vlonchamp.subscription.plan_id, "user's plan does not match" + + # Check that the training credits were set correctly + assert_empty @vlonchamp.training_credits, 'training credits were not reset' + assert_equal @vlonchamp.subscription.plan.training_credit_nb, plan.training_credit_nb, 'trainings credits were not allocated' + + # Check that the user benefit from prices of his plan + printer = Machine.find_by_slug('imprimante-3d') + assert_equal 10, (printer.prices.find_by(group_id: @vlonchamp.group_id, plan_id: @vlonchamp.subscription.plan_id).amount / 100), 'machine hourly price does not match' + + # Check notifications were sent for every admins + notifications = Notification.where(notification_type_id: NotificationType.find_by_name('notify_admin_subscribed_plan'), attached_object_type: 'Subscription', attached_object_id: subscription[:id]) + assert_not_empty notifications, 'no notifications were created' + notified_users_ids = notifications.map {|n| n.receiver_id } + User.admins.each do |adm| + assert_includes notified_users_ids, adm.id, "Admin #{adm.id} was not notified" + end + + # Check generated invoice + invoice = Invoice.find_by(invoiced_type: 'Subscription', invoiced_id: subscription[:id]) + assert_invoice_pdf invoice + assert_equal plan.amount, invoice.total, 'Invoice total price does not match the bought subscription' + + # wallet + assert_equal @vlonchamp.wallet.amount, 0 + assert_equal @vlonchamp.wallet.wallet_transactions.count, 2 + transaction = @vlonchamp.wallet.wallet_transactions.last + assert_equal transaction.transaction_type, 'debit' + assert_equal transaction.amount, 10 + end +end diff --git a/test/vcr_cassettes/reservations_create_for_machine_and_pay_wallet_success.yml b/test/vcr_cassettes/reservations_create_for_machine_and_pay_wallet_success.yml new file mode 100644 index 000000000..ea837fd19 --- /dev/null +++ b/test/vcr_cassettes/reservations_create_for_machine_and_pay_wallet_success.yml @@ -0,0 +1,1063 @@ +--- +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 + MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + Content-Length: + - '81' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 06 Apr 2016 14:02:58 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_8DigzZOUKbFLP8 + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "tok_17xHFG2sOmf47Nz9pZ4CafpU", + "object": "token", + "card": { + "id": "card_17xHFG2sOmf47Nz95yErDQbL", + "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": 1459951378, + "livemode": false, + "type": "card", + "used": false + } + http_version: + recorded_at: Wed, 06 Apr 2016 14:02:58 GMT +- request: + method: post + uri: https://api.stripe.com/v1/invoiceitems + body: + encoding: UTF-8 + string: customer=cus_8CzNtM08NVlSGN&amount=3200¤cy=usd&description=FORM1%2B+imprimante+3D+April+11%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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin + MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + Content-Length: + - '125' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 06 Apr 2016 14:02:58 GMT + Content-Type: + - application/json + Content-Length: + - '469' + 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_8DigTaKJ04PVMc + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "ii_17xHFG2sOmf47Nz9hhIaJZtF", + "object": "invoiceitem", + "amount": 3200, + "currency": "usd", + "customer": "cus_8CzNtM08NVlSGN", + "date": 1459951378, + "description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM", + "discountable": true, + "invoice": null, + "livemode": false, + "metadata": {}, + "period": { + "start": 1459951378, + "end": 1459951378 + }, + "plan": null, + "proration": false, + "quantity": null, + "subscription": null + } + http_version: + recorded_at: Wed, 06 Apr 2016 14:02:58 GMT +- request: + method: post + uri: https://api.stripe.com/v1/invoiceitems + body: + encoding: UTF-8 + string: customer=cus_8CzNtM08NVlSGN&amount=-1000¤cy=usd&description=Wallet+-1000 + 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 + MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + Content-Length: + - '125' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 06 Apr 2016 14:02:58 GMT + Content-Type: + - application/json + Content-Length: + - '469' + 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_8DigTaKJ04PVMc + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "ii_17xHFG2sOmf47N59hh8aJSt6", + "object": "invoiceitem", + "amount": -1000, + "currency": "usd", + "customer": "cus_8CzNtM08NVlSGN", + "date": 1459951378, + "description": "Wallet -1000", + "discountable": true, + "invoice": null, + "livemode": false, + "metadata": {}, + "period": { + "start": 1459951378, + "end": 1459951378 + }, + "plan": null, + "proration": false, + "quantity": null, + "subscription": null + } + http_version: + recorded_at: Wed, 06 Apr 2016 14:02:58 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_8CzNtM08NVlSGN + 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 + MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 06 Apr 2016 14:02:59 GMT + Content-Type: + - application/json + Content-Length: + - '3462' + 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_8Digc2V3aKSGrn + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "cus_8CzNtM08NVlSGN", + "object": "customer", + "account_balance": 0, + "created": 1459948888, + "currency": "usd", + "default_source": "card_17xGjJ2sOmf47Nz9UrQOP8Cl", + "delinquent": false, + "description": "Jean Dupond", + "discount": null, + "email": "jean.dupond@gmail.com", + "livemode": false, + "metadata": {}, + "shipping": null, + "sources": { + "object": "list", + "data": [ + { + "id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl", + "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_8CzNtM08NVlSGN", + "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_8CzNtM08NVlSGN/sources" + }, + "subscriptions": { + "object": "list", + "data": [ + { + "id": "sub_8Di9gqPLwt5IIC", + "object": "subscription", + "application_fee_percent": null, + "cancel_at_period_end": true, + "canceled_at": 1459949404, + "current_period_end": 1462541399, + "current_period_start": 1459949399, + "customer": "cus_8CzNtM08NVlSGN", + "discount": null, + "ended_at": null, + "metadata": {}, + "plan": { + "id": "mensuel-standard-month-20160404171519", + "object": "plan", + "amount": 3000, + "created": 1459782921, + "currency": "usd", + "interval": "month", + "interval_count": 1, + "livemode": false, + "metadata": {}, + "name": "Mensuel - standard, association - month", + "statement_descriptor": null, + "trial_period_days": null + }, + "quantity": 1, + "start": 1459949399, + "status": "active", + "tax_percent": null, + "trial_end": null, + "trial_start": null + }, + { + "id": "sub_8Di2VadRvr7A99", + "object": "subscription", + "application_fee_percent": null, + "cancel_at_period_end": true, + "canceled_at": 1459948972, + "current_period_end": 1462540968, + "current_period_start": 1459948968, + "customer": "cus_8CzNtM08NVlSGN", + "discount": null, + "ended_at": null, + "metadata": {}, + "plan": { + "id": "mensuel-standard-month-20160404171519", + "object": "plan", + "amount": 3000, + "created": 1459782921, + "currency": "usd", + "interval": "month", + "interval_count": 1, + "livemode": false, + "metadata": {}, + "name": "Mensuel - standard, association - month", + "statement_descriptor": null, + "trial_period_days": null + }, + "quantity": 1, + "start": 1459948968, + "status": "active", + "tax_percent": null, + "trial_end": null, + "trial_start": null + } + ], + "has_more": false, + "total_count": 2, + "url": "/v1/customers/cus_8CzNtM08NVlSGN/subscriptions" + } + } + http_version: + recorded_at: Wed, 06 Apr 2016 14:02:59 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_8CzNtM08NVlSGN/sources + body: + encoding: UTF-8 + string: card=tok_17xHFG2sOmf47Nz9pZ4CafpU + 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 + MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + Content-Length: + - '33' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 06 Apr 2016 14:03:00 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_8DigAxuQClwx3A + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "card_17xHFG2sOmf47Nz95yErDQbL", + "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_8CzNtM08NVlSGN", + "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: Wed, 06 Apr 2016 14:03:00 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_8CzNtM08NVlSGN + body: + encoding: UTF-8 + string: default_source=card_17xHFG2sOmf47Nz95yErDQbL + 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 + MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + Content-Length: + - '44' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 06 Apr 2016 14:03:01 GMT + Content-Type: + - application/json + Content-Length: + - '4190' + 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_8Dig1Js3cBEeqQ + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "cus_8CzNtM08NVlSGN", + "object": "customer", + "account_balance": 0, + "created": 1459948888, + "currency": "usd", + "default_source": "card_17xHFG2sOmf47Nz95yErDQbL", + "delinquent": false, + "description": "Jean Dupond", + "discount": null, + "email": "jean.dupond@gmail.com", + "livemode": false, + "metadata": {}, + "shipping": null, + "sources": { + "object": "list", + "data": [ + { + "id": "card_17xHFG2sOmf47Nz95yErDQbL", + "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_8CzNtM08NVlSGN", + "cvc_check": "pass", + "dynamic_last4": null, + "exp_month": 4, + "exp_year": 2017, + "fingerprint": "o52jybR7bnmNn6AT", + "funding": "credit", + "last4": "4242", + "metadata": {}, + "name": null, + "tokenization_method": null + }, + { + "id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl", + "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_8CzNtM08NVlSGN", + "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": 2, + "url": "/v1/customers/cus_8CzNtM08NVlSGN/sources" + }, + "subscriptions": { + "object": "list", + "data": [ + { + "id": "sub_8Di9gqPLwt5IIC", + "object": "subscription", + "application_fee_percent": null, + "cancel_at_period_end": true, + "canceled_at": 1459949404, + "current_period_end": 1462541399, + "current_period_start": 1459949399, + "customer": "cus_8CzNtM08NVlSGN", + "discount": null, + "ended_at": null, + "metadata": {}, + "plan": { + "id": "mensuel-standard-month-20160404171519", + "object": "plan", + "amount": 3000, + "created": 1459782921, + "currency": "usd", + "interval": "month", + "interval_count": 1, + "livemode": false, + "metadata": {}, + "name": "Mensuel - standard, association - month", + "statement_descriptor": null, + "trial_period_days": null + }, + "quantity": 1, + "start": 1459949399, + "status": "active", + "tax_percent": null, + "trial_end": null, + "trial_start": null + }, + { + "id": "sub_8Di2VadRvr7A99", + "object": "subscription", + "application_fee_percent": null, + "cancel_at_period_end": true, + "canceled_at": 1459948972, + "current_period_end": 1462540968, + "current_period_start": 1459948968, + "customer": "cus_8CzNtM08NVlSGN", + "discount": null, + "ended_at": null, + "metadata": {}, + "plan": { + "id": "mensuel-standard-month-20160404171519", + "object": "plan", + "amount": 3000, + "created": 1459782921, + "currency": "usd", + "interval": "month", + "interval_count": 1, + "livemode": false, + "metadata": {}, + "name": "Mensuel - standard, association - month", + "statement_descriptor": null, + "trial_period_days": null + }, + "quantity": 1, + "start": 1459948968, + "status": "active", + "tax_percent": null, + "trial_end": null, + "trial_start": null + } + ], + "has_more": false, + "total_count": 2, + "url": "/v1/customers/cus_8CzNtM08NVlSGN/subscriptions" + } + } + http_version: + recorded_at: Wed, 06 Apr 2016 14:03:01 GMT +- request: + method: post + uri: https://api.stripe.com/v1/invoices + body: + encoding: UTF-8 + string: customer=cus_8CzNtM08NVlSGN + 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 + MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + Content-Length: + - '27' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 06 Apr 2016 14:03:02 GMT + Content-Type: + - application/json + Content-Length: + - '1426' + 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_8DigRXqOIStdA0 + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "in_17xHFK2sOmf47Nz9jegPFlNt", + "object": "invoice", + "amount_due": 2200, + "application_fee": null, + "attempt_count": 0, + "attempted": false, + "charge": null, + "closed": false, + "currency": "usd", + "customer": "cus_8CzNtM08NVlSGN", + "date": 1459951382, + "description": null, + "discount": null, + "ending_balance": null, + "forgiven": false, + "lines": { + "object": "list", + "data": [ + { + "id": "ii_17xHFG2sOmf47Nz9hhIaJZtF", + "object": "line_item", + "amount": 3200, + "currency": "usd", + "description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM", + "discountable": true, + "livemode": false, + "metadata": {}, + "period": { + "start": 1459951378, + "end": 1459951378 + }, + "plan": null, + "proration": false, + "quantity": null, + "subscription": null, + "type": "invoiceitem" + }, + { + "id": "ii_17xHFG2sOmf47N59hh8aJSt6", + "object": "invoiceitem", + "amount": -1000, + "currency": "usd", + "customer": "cus_8CzNtM08NVlSGN", + "date": 1459951378, + "description": "Wallet -1000", + "discountable": true, + "invoice": null, + "livemode": false, + "metadata": {}, + "period": { + "start": 1459951378, + "end": 1459951378 + }, + "plan": null, + "proration": false, + "quantity": null, + "subscription": null + } + ], + "has_more": false, + "total_count": 1, + "url": "/v1/invoices/in_17xHFK2sOmf47Nz9jegPFlNt/lines" + }, + "livemode": false, + "metadata": {}, + "next_payment_attempt": 1459954982, + "paid": false, + "period_end": 1459951382, + "period_start": 1459948968, + "receipt_number": null, + "starting_balance": 0, + "statement_descriptor": null, + "subscription": null, + "subtotal": 2200, + "tax": null, + "tax_percent": null, + "total": 2200, + "webhooks_delivered_at": null + } + http_version: + recorded_at: Wed, 06 Apr 2016 14:03:02 GMT +- request: + method: post + uri: https://api.stripe.com/v1/invoices/in_17xHFK2sOmf47Nz9jegPFlNt/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 + MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + Content-Length: + - '0' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 06 Apr 2016 14:03:03 GMT + Content-Type: + - application/json + Content-Length: + - '1445' + 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_8DigckzVuj8MLI + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "in_17xHFK2sOmf47Nz9jegPFlNt", + "object": "invoice", + "amount_due": 2200, + "application_fee": null, + "attempt_count": 1, + "attempted": true, + "charge": "ch_17xHFL2sOmf47Nz9FCQ0BJKc", + "closed": true, + "currency": "usd", + "customer": "cus_8CzNtM08NVlSGN", + "date": 1459951382, + "description": null, + "discount": null, + "ending_balance": 0, + "forgiven": false, + "lines": { + "object": "list", + "data": [ + { + "id": "ii_17xHFG2sOmf47Nz9hhIaJZtF", + "object": "line_item", + "amount": 3200, + "currency": "usd", + "description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM", + "discountable": true, + "livemode": false, + "metadata": {}, + "period": { + "start": 1459951378, + "end": 1459951378 + }, + "plan": null, + "proration": false, + "quantity": null, + "subscription": null, + "type": "invoiceitem" + }, + { + "id": "ii_17xHFG2sOmf47N59hh8aJSt6", + "object": "invoiceitem", + "amount": -1000, + "currency": "usd", + "customer": "cus_8CzNtM08NVlSGN", + "date": 1459951378, + "description": "Wallet -1000", + "discountable": true, + "invoice": null, + "livemode": false, + "metadata": {}, + "period": { + "start": 1459951378, + "end": 1459951378 + }, + "plan": null, + "proration": false, + "quantity": null, + "subscription": null + } + ], + "has_more": false, + "total_count": 1, + "url": "/v1/invoices/in_17xHFK2sOmf47Nz9jegPFlNt/lines" + }, + "livemode": false, + "metadata": {}, + "next_payment_attempt": null, + "paid": true, + "period_end": 1459951382, + "period_start": 1459948968, + "receipt_number": null, + "starting_balance": 0, + "statement_descriptor": null, + "subscription": null, + "subtotal": 2200, + "tax": null, + "tax_percent": null, + "total": 2200, + "webhooks_delivered_at": 1459951382 + } + http_version: + recorded_at: Wed, 06 Apr 2016 14:03:03 GMT +- request: + method: delete + uri: https://api.stripe.com/v1/customers/cus_8CzNtM08NVlSGN/sources/card_17xHFG2sOmf47Nz95yErDQbL + 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 + MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 06 Apr 2016 14:03:04 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_8Dig3VHawFrxab + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "deleted": true, + "id": "card_17xHFG2sOmf47Nz95yErDQbL" + } + http_version: + recorded_at: Wed, 06 Apr 2016 14:03:04 GMT +recorded_with: VCR 3.0.1 diff --git a/test/vcr_cassettes/reservations_create_for_machine_without_subscription_error.yml b/test/vcr_cassettes/reservations_create_for_machine_without_subscription_error.yml index 51b5dc8b1..65d6aa1af 100644 --- a/test/vcr_cassettes/reservations_create_for_machine_without_subscription_error.yml +++ b/test/vcr_cassettes/reservations_create_for_machine_without_subscription_error.yml @@ -18,9 +18,9 @@ http_interactions: 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 - MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + - '{"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: @@ -31,11 +31,11 @@ http_interactions: Server: - nginx Date: - - Wed, 06 Apr 2016 14:31:05 GMT + - Mon, 11 Jul 2016 13:26:13 GMT Content-Type: - application/json Content-Length: - - '778' + - '780' Connection: - keep-alive Access-Control-Allow-Credentials: @@ -49,7 +49,7 @@ http_interactions: Cache-Control: - no-cache, no-store Request-Id: - - req_8Dj8hOci59D4xC + - req_8nflaXEiTf6O0X Stripe-Version: - '2015-10-16' Strict-Transport-Security: @@ -58,10 +58,10 @@ http_interactions: encoding: UTF-8 string: | { - "id": "tok_17xHgT2sOmf47Nz962TaLtD7", + "id": "tok_18W4QL2sOmf47Nz9GM695H9O", "object": "token", "card": { - "id": "card_17xHgT2sOmf47Nz98eSsgCfX", + "id": "card_18W4QL2sOmf47Nz9NuqbiJMr", "object": "card", "address_city": null, "address_country": null, @@ -84,20 +84,20 @@ http_interactions: "name": null, "tokenization_method": null }, - "client_ip": "86.76.5.109", - "created": 1459953065, + "client_ip": "82.122.118.54", + "created": 1468243573, "livemode": false, "type": "card", "used": false } http_version: - recorded_at: Wed, 06 Apr 2016 14:31:05 GMT + 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¤cy=usd&description=FORM1%2B+imprimante+3D+April+11%2C+2016+14%3A00+-+03%3A00+PM + string: customer=cus_8Di1wjdVktv5kt&amount=3200¤cy=usd&description=FORM1%2B+imprimante+3D+July+10%2C+2016+14%3A00+-+03%3A00+PM headers: Accept: - "*/*; q=0.5, application/xml" @@ -110,11 +110,11 @@ http_interactions: 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 - MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + - '{"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: - - '125' + - '124' response: status: code: 200 @@ -123,11 +123,11 @@ http_interactions: Server: - nginx Date: - - Wed, 06 Apr 2016 14:31:06 GMT + - Mon, 11 Jul 2016 13:26:14 GMT Content-Type: - application/json Content-Length: - - '469' + - '468' Connection: - keep-alive Access-Control-Allow-Credentials: @@ -141,7 +141,7 @@ http_interactions: Cache-Control: - no-cache, no-store Request-Id: - - req_8Dj87wp0RJ3Z71 + - req_8nflWbFKH0Wr7j Stripe-Version: - '2015-10-16' Strict-Transport-Security: @@ -150,20 +150,20 @@ http_interactions: encoding: UTF-8 string: | { - "id": "ii_17xHgU2sOmf47Nz9Pp3l4ZAA", + "id": "ii_18W4QM2sOmf47Nz9g7EdrbZV", "object": "invoiceitem", "amount": 3200, "currency": "usd", "customer": "cus_8Di1wjdVktv5kt", - "date": 1459953066, - "description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM", + "date": 1468243574, + "description": "FORM1+ imprimante 3D July 10, 2016 14:00 - 03:00 PM", "discountable": true, "invoice": null, "livemode": false, "metadata": {}, "period": { - "start": 1459953066, - "end": 1459953066 + "start": 1468243574, + "end": 1468243574 }, "plan": null, "proration": false, @@ -171,7 +171,7 @@ http_interactions: "subscription": null } http_version: - recorded_at: Wed, 06 Apr 2016 14:31:06 GMT + recorded_at: Mon, 11 Jul 2016 13:26:14 GMT - request: method: get uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt @@ -190,9 +190,9 @@ http_interactions: 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 - MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + - '{"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 @@ -201,11 +201,11 @@ http_interactions: Server: - nginx Date: - - Wed, 06 Apr 2016 14:31:07 GMT + - Mon, 11 Jul 2016 13:26:15 GMT Content-Type: - application/json Content-Length: - - '3462' + - '1408' Connection: - keep-alive Access-Control-Allow-Credentials: @@ -219,7 +219,7 @@ http_interactions: Cache-Control: - no-cache, no-store Request-Id: - - req_8Dj8aOsnrVp2zU + - req_8nflczxuJx3Fit Stripe-Version: - '2015-10-16' Strict-Transport-Security: @@ -233,7 +233,7 @@ http_interactions: "account_balance": 0, "created": 1459948888, "currency": "usd", - "default_source": "card_17xGjJ2sOmf47Nz9UrQOP8Cl", + "default_source": "card_17z7CT2sOmf47Nz9wtWkhGor", "delinquent": false, "description": "Jean Dupond", "discount": null, @@ -245,7 +245,7 @@ http_interactions: "object": "list", "data": [ { - "id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl", + "id": "card_17z7CT2sOmf47Nz9wtWkhGor", "object": "card", "address_city": null, "address_country": null, @@ -276,87 +276,20 @@ http_interactions: }, "subscriptions": { "object": "list", - "data": [ - { - "id": "sub_8Di9gqPLwt5IIC", - "object": "subscription", - "application_fee_percent": null, - "cancel_at_period_end": true, - "canceled_at": 1459949404, - "current_period_end": 1462541399, - "current_period_start": 1459949399, - "customer": "cus_8Di1wjdVktv5kt", - "discount": null, - "ended_at": null, - "metadata": {}, - "plan": { - "id": "mensuel-standard-month-20160404171519", - "object": "plan", - "amount": 3000, - "created": 1459782921, - "currency": "usd", - "interval": "month", - "interval_count": 1, - "livemode": false, - "metadata": {}, - "name": "Mensuel - standard, association - month", - "statement_descriptor": null, - "trial_period_days": null - }, - "quantity": 1, - "start": 1459949399, - "status": "active", - "tax_percent": null, - "trial_end": null, - "trial_start": null - }, - { - "id": "sub_8Di2VadRvr7A99", - "object": "subscription", - "application_fee_percent": null, - "cancel_at_period_end": true, - "canceled_at": 1459948972, - "current_period_end": 1462540968, - "current_period_start": 1459948968, - "customer": "cus_8Di1wjdVktv5kt", - "discount": null, - "ended_at": null, - "metadata": {}, - "plan": { - "id": "mensuel-standard-month-20160404171519", - "object": "plan", - "amount": 3000, - "created": 1459782921, - "currency": "usd", - "interval": "month", - "interval_count": 1, - "livemode": false, - "metadata": {}, - "name": "Mensuel - standard, association - month", - "statement_descriptor": null, - "trial_period_days": null - }, - "quantity": 1, - "start": 1459948968, - "status": "active", - "tax_percent": null, - "trial_end": null, - "trial_start": null - } - ], + "data": [], "has_more": false, - "total_count": 2, + "total_count": 0, "url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions" } } http_version: - recorded_at: Wed, 06 Apr 2016 14:31:07 GMT + 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_17xHgT2sOmf47Nz962TaLtD7 + string: card=tok_18W4QL2sOmf47Nz9GM695H9O headers: Accept: - "*/*; q=0.5, application/xml" @@ -369,9 +302,9 @@ http_interactions: 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 - MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + - '{"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: @@ -382,7 +315,7 @@ http_interactions: Server: - nginx Date: - - Wed, 06 Apr 2016 14:31:09 GMT + - Mon, 11 Jul 2016 13:26:16 GMT Content-Type: - application/json Content-Length: @@ -400,7 +333,7 @@ http_interactions: Cache-Control: - no-cache, no-store Request-Id: - - req_8Dj8Q0yiZoox2F + - req_8nflIAexuhWlA2 Stripe-Version: - '2015-10-16' body: @@ -415,10 +348,10 @@ http_interactions: } } http_version: - recorded_at: Wed, 06 Apr 2016 14:31:09 GMT + recorded_at: Mon, 11 Jul 2016 13:26:16 GMT - request: method: delete - uri: https://api.stripe.com/v1/invoiceitems/ii_17xHgU2sOmf47Nz9Pp3l4ZAA + uri: https://api.stripe.com/v1/invoiceitems/ii_18W4QM2sOmf47Nz9g7EdrbZV body: encoding: US-ASCII string: '' @@ -434,9 +367,9 @@ http_interactions: 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 - MBP-sleede-Nicolas.local 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":"MBP-sleede-Nicolas.local"}' + - '{"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 @@ -445,7 +378,7 @@ http_interactions: Server: - nginx Date: - - Wed, 06 Apr 2016 14:31:09 GMT + - Mon, 11 Jul 2016 13:26:17 GMT Content-Type: - application/json Content-Length: @@ -463,7 +396,7 @@ http_interactions: Cache-Control: - no-cache, no-store Request-Id: - - req_8Dj86hW0UVRjBL + - req_8nflVBopesOpHn Stripe-Version: - '2015-10-16' Strict-Transport-Security: @@ -473,8 +406,8 @@ http_interactions: string: | { "deleted": true, - "id": "ii_17xHgU2sOmf47Nz9Pp3l4ZAA" + "id": "ii_18W4QM2sOmf47Nz9g7EdrbZV" } http_version: - recorded_at: Wed, 06 Apr 2016 14:31:09 GMT + recorded_at: Mon, 11 Jul 2016 13:26:17 GMT recorded_with: VCR 3.0.1 diff --git a/test/vcr_cassettes/subscriptions_user_create_success_with_wallet.yml b/test/vcr_cassettes/subscriptions_user_create_success_with_wallet.yml new file mode 100644 index 000000000..8407e0a69 --- /dev/null +++ b/test/vcr_cassettes/subscriptions_user_create_success_with_wallet.yml @@ -0,0 +1,821 @@ +--- +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-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:15:52 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_8nfbr26ZMi1nMx + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "tok_18W4GK2sOmf47Nz9I7fm3Y18", + "object": "token", + "card": { + "id": "card_18W4GK2sOmf47Nz9K6dfSmZl", + "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": "82.122.118.54", + "created": 1468242952, + "livemode": false, + "type": "card", + "used": false + } + http_version: + recorded_at: Mon, 11 Jul 2016 13:15:52 GMT +- request: + method: get + uri: https://api.stripe.com/v1/tokens/tok_18W4GK2sOmf47Nz9I7fm3Y18 + 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:15:53 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_8nfbbQfs4YR066 + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "tok_18W4GK2sOmf47Nz9I7fm3Y18", + "object": "token", + "card": { + "id": "card_18W4GK2sOmf47Nz9K6dfSmZl", + "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": "82.122.118.54", + "created": 1468242952, + "livemode": false, + "type": "card", + "used": false + } + http_version: + recorded_at: Mon, 11 Jul 2016 13:15:53 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_8CzNtM08NVlSGN + 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:15:54 GMT + Content-Type: + - application/json + Content-Length: + - '655' + 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_8nfb0Ez5UgkL6i + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "cus_8CzNtM08NVlSGN", + "object": "customer", + "account_balance": 0, + "created": 1459782849, + "currency": null, + "default_source": null, + "delinquent": false, + "description": "Vanessa Lonchamp", + "discount": null, + "email": "vanessa.lonchamp@sfr.fr", + "livemode": false, + "metadata": {}, + "shipping": null, + "sources": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/customers/cus_8CzNtM08NVlSGN/sources" + }, + "subscriptions": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/customers/cus_8CzNtM08NVlSGN/subscriptions" + } + } + http_version: + recorded_at: Mon, 11 Jul 2016 13:15:54 GMT +- request: + method: post + uri: https://api.stripe.com/v1/invoiceitems + body: + encoding: UTF-8 + string: customer=cus_8CzNtM08NVlSGN&amount=-1000¤cy=usd&description=wallet+-10.0 + 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: + - '78' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 11 Jul 2016 13:15:55 GMT + Content-Type: + - application/json + Content-Length: + - '431' + 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_8nfbS1DU8keH5x + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "ii_18W4GN2sOmf47Nz9K1dTfTyA", + "object": "invoiceitem", + "amount": -1000, + "currency": "usd", + "customer": "cus_8CzNtM08NVlSGN", + "date": 1468242955, + "description": "wallet -10.0", + "discountable": false, + "invoice": null, + "livemode": false, + "metadata": {}, + "period": { + "start": 1468242955, + "end": 1468242955 + }, + "plan": null, + "proration": false, + "quantity": null, + "subscription": null + } + http_version: + recorded_at: Mon, 11 Jul 2016 13:15:55 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_8CzNtM08NVlSGN/subscriptions + body: + encoding: UTF-8 + string: plan=mensuel-tarif-reduit-student-month-20160404171827&source=tok_18W4GK2sOmf47Nz9I7fm3Y18 + 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: + - '90' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 11 Jul 2016 13:15:57 GMT + Content-Type: + - application/json + Content-Length: + - '926' + 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_8nfbYSDVSvjiep + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: ASCII-8BIT + string: !binary |- + ewogICJpZCI6ICJzdWJfOG5mYlRHR0lRUlF6eDEiLAogICJvYmplY3QiOiAi + c3Vic2NyaXB0aW9uIiwKICAiYXBwbGljYXRpb25fZmVlX3BlcmNlbnQiOiBu + dWxsLAogICJjYW5jZWxfYXRfcGVyaW9kX2VuZCI6IGZhbHNlLAogICJjYW5j + ZWxlZF9hdCI6IG51bGwsCiAgImNyZWF0ZWQiOiAxNDY4MjQyOTU2LAogICJj + dXJyZW50X3BlcmlvZF9lbmQiOiAxNDcwOTIxMzU2LAogICJjdXJyZW50X3Bl + cmlvZF9zdGFydCI6IDE0NjgyNDI5NTYsCiAgImN1c3RvbWVyIjogImN1c184 + Q3pOdE0wOE5WbFNHTiIsCiAgImRpc2NvdW50IjogbnVsbCwKICAiZW5kZWRf + YXQiOiBudWxsLAogICJsaXZlbW9kZSI6IGZhbHNlLAogICJtZXRhZGF0YSI6 + IHt9LAogICJwbGFuIjogewogICAgImlkIjogIm1lbnN1ZWwtdGFyaWYtcmVk + dWl0LXN0dWRlbnQtbW9udGgtMjAxNjA0MDQxNzE4MjciLAogICAgIm9iamVj + dCI6ICJwbGFuIiwKICAgICJhbW91bnQiOiAyMDAwLAogICAgImNyZWF0ZWQi + OiAxNDU5NzgzMTA4LAogICAgImN1cnJlbmN5IjogInVzZCIsCiAgICAiaW50 + ZXJ2YWwiOiAibW9udGgiLAogICAgImludGVydmFsX2NvdW50IjogMSwKICAg + ICJsaXZlbW9kZSI6IGZhbHNlLAogICAgIm1ldGFkYXRhIjoge30sCiAgICAi + bmFtZSI6ICJNZW5zdWVsIHRhcmlmIHLDqWR1aXQgLSDDqXR1ZGlhbnQsIC0g + ZGUgMjUgYW5zLCBlbnNlaWduYW50LCBkZW1hbmRldXIgZCdlbXBsb2kgLSBt + b250aCIsCiAgICAic3RhdGVtZW50X2Rlc2NyaXB0b3IiOiBudWxsLAogICAg + InRyaWFsX3BlcmlvZF9kYXlzIjogbnVsbAogIH0sCiAgInF1YW50aXR5Ijog + MSwKICAic3RhcnQiOiAxNDY4MjQyOTU2LAogICJzdGF0dXMiOiAiYWN0aXZl + IiwKICAidGF4X3BlcmNlbnQiOiBudWxsLAogICJ0cmlhbF9lbmQiOiBudWxs + LAogICJ0cmlhbF9zdGFydCI6IG51bGwKfQo= + http_version: + recorded_at: Mon, 11 Jul 2016 13:15:57 GMT +- request: + method: get + uri: https://api.stripe.com/v1/invoices?customer=cus_8CzNtM08NVlSGN&limit=1 + 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:15:58 GMT + Content-Type: + - application/json + Content-Length: + - '2835' + 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_8nfbi8eORMWkgD + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: ASCII-8BIT + string: !binary |- + ewogICJvYmplY3QiOiAibGlzdCIsCiAgImRhdGEiOiBbCiAgICB7CiAgICAg + ICJpZCI6ICJpbl8xOFc0R08yc09tZjQ3Tno5b291RFEzaGUiLAogICAgICAi + b2JqZWN0IjogImludm9pY2UiLAogICAgICAiYW1vdW50X2R1ZSI6IDEwMDAs + CiAgICAgICJhcHBsaWNhdGlvbl9mZWUiOiBudWxsLAogICAgICAiYXR0ZW1w + dF9jb3VudCI6IDEsCiAgICAgICJhdHRlbXB0ZWQiOiB0cnVlLAogICAgICAi + Y2hhcmdlIjogImNoXzE4VzRHTzJzT21mNDdOejlnb1k2T3lEbCIsCiAgICAg + ICJjbG9zZWQiOiB0cnVlLAogICAgICAiY3VycmVuY3kiOiAidXNkIiwKICAg + ICAgImN1c3RvbWVyIjogImN1c184Q3pOdE0wOE5WbFNHTiIsCiAgICAgICJk + YXRlIjogMTQ2ODI0Mjk1NiwKICAgICAgImRlc2NyaXB0aW9uIjogbnVsbCwK + ICAgICAgImRpc2NvdW50IjogbnVsbCwKICAgICAgImVuZGluZ19iYWxhbmNl + IjogMCwKICAgICAgImZvcmdpdmVuIjogZmFsc2UsCiAgICAgICJsaW5lcyI6 + IHsKICAgICAgICAib2JqZWN0IjogImxpc3QiLAogICAgICAgICJkYXRhIjog + WwogICAgICAgICAgewogICAgICAgICAgICAiaWQiOiAiaWlfMThXNEdOMnNP + bWY0N056OUsxZFRmVHlBIiwKICAgICAgICAgICAgIm9iamVjdCI6ICJsaW5l + X2l0ZW0iLAogICAgICAgICAgICAiYW1vdW50IjogLTEwMDAsCiAgICAgICAg + ICAgICJjdXJyZW5jeSI6ICJ1c2QiLAogICAgICAgICAgICAiZGVzY3JpcHRp + b24iOiAid2FsbGV0IC0xMC4wIiwKICAgICAgICAgICAgImRpc2NvdW50YWJs + ZSI6IGZhbHNlLAogICAgICAgICAgICAibGl2ZW1vZGUiOiBmYWxzZSwKICAg + ICAgICAgICAgIm1ldGFkYXRhIjoge30sCiAgICAgICAgICAgICJwZXJpb2Qi + OiB7CiAgICAgICAgICAgICAgInN0YXJ0IjogMTQ2ODI0Mjk1NSwKICAgICAg + ICAgICAgICAiZW5kIjogMTQ2ODI0Mjk1NQogICAgICAgICAgICB9LAogICAg + ICAgICAgICAicGxhbiI6IG51bGwsCiAgICAgICAgICAgICJwcm9yYXRpb24i + OiBmYWxzZSwKICAgICAgICAgICAgInF1YW50aXR5IjogbnVsbCwKICAgICAg + ICAgICAgInN1YnNjcmlwdGlvbiI6IG51bGwsCiAgICAgICAgICAgICJ0eXBl + IjogImludm9pY2VpdGVtIgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAg + ICAgICAgICAgImlkIjogInN1Yl84bmZiVEdHSVFSUXp4MSIsCiAgICAgICAg + ICAgICJvYmplY3QiOiAibGluZV9pdGVtIiwKICAgICAgICAgICAgImFtb3Vu + dCI6IDIwMDAsCiAgICAgICAgICAgICJjdXJyZW5jeSI6ICJ1c2QiLAogICAg + ICAgICAgICAiZGVzY3JpcHRpb24iOiBudWxsLAogICAgICAgICAgICAiZGlz + Y291bnRhYmxlIjogdHJ1ZSwKICAgICAgICAgICAgImxpdmVtb2RlIjogZmFs + c2UsCiAgICAgICAgICAgICJtZXRhZGF0YSI6IHt9LAogICAgICAgICAgICAi + cGVyaW9kIjogewogICAgICAgICAgICAgICJzdGFydCI6IDE0NjgyNDI5NTYs + CiAgICAgICAgICAgICAgImVuZCI6IDE0NzA5MjEzNTYKICAgICAgICAgICAg + fSwKICAgICAgICAgICAgInBsYW4iOiB7CiAgICAgICAgICAgICAgImlkIjog + Im1lbnN1ZWwtdGFyaWYtcmVkdWl0LXN0dWRlbnQtbW9udGgtMjAxNjA0MDQx + NzE4MjciLAogICAgICAgICAgICAgICJvYmplY3QiOiAicGxhbiIsCiAgICAg + ICAgICAgICAgImFtb3VudCI6IDIwMDAsCiAgICAgICAgICAgICAgImNyZWF0 + ZWQiOiAxNDU5NzgzMTA4LAogICAgICAgICAgICAgICJjdXJyZW5jeSI6ICJ1 + c2QiLAogICAgICAgICAgICAgICJpbnRlcnZhbCI6ICJtb250aCIsCiAgICAg + ICAgICAgICAgImludGVydmFsX2NvdW50IjogMSwKICAgICAgICAgICAgICAi + bGl2ZW1vZGUiOiBmYWxzZSwKICAgICAgICAgICAgICAibWV0YWRhdGEiOiB7 + fSwKICAgICAgICAgICAgICAibmFtZSI6ICJNZW5zdWVsIHRhcmlmIHLDqWR1 + aXQgLSDDqXR1ZGlhbnQsIC0gZGUgMjUgYW5zLCBlbnNlaWduYW50LCBkZW1h + bmRldXIgZCdlbXBsb2kgLSBtb250aCIsCiAgICAgICAgICAgICAgInN0YXRl + bWVudF9kZXNjcmlwdG9yIjogbnVsbCwKICAgICAgICAgICAgICAidHJpYWxf + cGVyaW9kX2RheXMiOiBudWxsCiAgICAgICAgICAgIH0sCiAgICAgICAgICAg + ICJwcm9yYXRpb24iOiBmYWxzZSwKICAgICAgICAgICAgInF1YW50aXR5Ijog + MSwKICAgICAgICAgICAgInN1YnNjcmlwdGlvbiI6IG51bGwsCiAgICAgICAg + ICAgICJ0eXBlIjogInN1YnNjcmlwdGlvbiIKICAgICAgICAgIH0KICAgICAg + ICBdLAogICAgICAgICJoYXNfbW9yZSI6IGZhbHNlLAogICAgICAgICJ0b3Rh + bF9jb3VudCI6IDIsCiAgICAgICAgInVybCI6ICIvdjEvaW52b2ljZXMvaW5f + MThXNEdPMnNPbWY0N056OW9vdURRM2hlL2xpbmVzIgogICAgICB9LAogICAg + ICAibGl2ZW1vZGUiOiBmYWxzZSwKICAgICAgIm1ldGFkYXRhIjoge30sCiAg + ICAgICJuZXh0X3BheW1lbnRfYXR0ZW1wdCI6IG51bGwsCiAgICAgICJwYWlk + IjogdHJ1ZSwKICAgICAgInBlcmlvZF9lbmQiOiAxNDY4MjQyOTU2LAogICAg + ICAicGVyaW9kX3N0YXJ0IjogMTQ2ODI0Mjk1NiwKICAgICAgInJlY2VpcHRf + bnVtYmVyIjogbnVsbCwKICAgICAgInN0YXJ0aW5nX2JhbGFuY2UiOiAwLAog + ICAgICAic3RhdGVtZW50X2Rlc2NyaXB0b3IiOiBudWxsLAogICAgICAic3Vi + c2NyaXB0aW9uIjogInN1Yl84bmZiVEdHSVFSUXp4MSIsCiAgICAgICJzdWJ0 + b3RhbCI6IDEwMDAsCiAgICAgICJ0YXgiOiBudWxsLAogICAgICAidGF4X3Bl + cmNlbnQiOiBudWxsLAogICAgICAidG90YWwiOiAxMDAwLAogICAgICAid2Vi + aG9va3NfZGVsaXZlcmVkX2F0IjogMTQ2ODI0Mjk1NgogICAgfQogIF0sCiAg + Imhhc19tb3JlIjogZmFsc2UsCiAgInVybCI6ICIvdjEvaW52b2ljZXMiCn0K + http_version: + recorded_at: Mon, 11 Jul 2016 13:15:58 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_8CzNtM08NVlSGN + 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:15:59 GMT + Content-Type: + - application/json + Content-Length: + - '2556' + 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_8nfbxXXi48kJ9H + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: ASCII-8BIT + string: !binary |- + ewogICJpZCI6ICJjdXNfOEN6TnRNMDhOVmxTR04iLAogICJvYmplY3QiOiAi + Y3VzdG9tZXIiLAogICJhY2NvdW50X2JhbGFuY2UiOiAwLAogICJjcmVhdGVk + IjogMTQ1OTc4Mjg0OSwKICAiY3VycmVuY3kiOiAidXNkIiwKICAiZGVmYXVs + dF9zb3VyY2UiOiAiY2FyZF8xOFc0R0syc09tZjQ3Tno5SzZkZlNtWmwiLAog + ICJkZWxpbnF1ZW50IjogZmFsc2UsCiAgImRlc2NyaXB0aW9uIjogIlZhbmVz + c2EgTG9uY2hhbXAiLAogICJkaXNjb3VudCI6IG51bGwsCiAgImVtYWlsIjog + InZhbmVzc2EubG9uY2hhbXBAc2ZyLmZyIiwKICAibGl2ZW1vZGUiOiBmYWxz + ZSwKICAibWV0YWRhdGEiOiB7fSwKICAic2hpcHBpbmciOiBudWxsLAogICJz + b3VyY2VzIjogewogICAgIm9iamVjdCI6ICJsaXN0IiwKICAgICJkYXRhIjog + WwogICAgICB7CiAgICAgICAgImlkIjogImNhcmRfMThXNEdLMnNPbWY0N056 + OUs2ZGZTbVpsIiwKICAgICAgICAib2JqZWN0IjogImNhcmQiLAogICAgICAg + ICJhZGRyZXNzX2NpdHkiOiBudWxsLAogICAgICAgICJhZGRyZXNzX2NvdW50 + cnkiOiBudWxsLAogICAgICAgICJhZGRyZXNzX2xpbmUxIjogbnVsbCwKICAg + ICAgICAiYWRkcmVzc19saW5lMV9jaGVjayI6IG51bGwsCiAgICAgICAgImFk + ZHJlc3NfbGluZTIiOiBudWxsLAogICAgICAgICJhZGRyZXNzX3N0YXRlIjog + bnVsbCwKICAgICAgICAiYWRkcmVzc196aXAiOiBudWxsLAogICAgICAgICJh + ZGRyZXNzX3ppcF9jaGVjayI6IG51bGwsCiAgICAgICAgImJyYW5kIjogIlZp + c2EiLAogICAgICAgICJjb3VudHJ5IjogIlVTIiwKICAgICAgICAiY3VzdG9t + ZXIiOiAiY3VzXzhDek50TTA4TlZsU0dOIiwKICAgICAgICAiY3ZjX2NoZWNr + IjogInBhc3MiLAogICAgICAgICJkeW5hbWljX2xhc3Q0IjogbnVsbCwKICAg + ICAgICAiZXhwX21vbnRoIjogNCwKICAgICAgICAiZXhwX3llYXIiOiAyMDE3 + LAogICAgICAgICJmaW5nZXJwcmludCI6ICJvNTJqeWJSN2JubU5uNkFUIiwK + ICAgICAgICAiZnVuZGluZyI6ICJjcmVkaXQiLAogICAgICAgICJsYXN0NCI6 + ICI0MjQyIiwKICAgICAgICAibWV0YWRhdGEiOiB7fSwKICAgICAgICAibmFt + ZSI6IG51bGwsCiAgICAgICAgInRva2VuaXphdGlvbl9tZXRob2QiOiBudWxs + CiAgICAgIH0KICAgIF0sCiAgICAiaGFzX21vcmUiOiBmYWxzZSwKICAgICJ0 + b3RhbF9jb3VudCI6IDEsCiAgICAidXJsIjogIi92MS9jdXN0b21lcnMvY3Vz + XzhDek50TTA4TlZsU0dOL3NvdXJjZXMiCiAgfSwKICAic3Vic2NyaXB0aW9u + cyI6IHsKICAgICJvYmplY3QiOiAibGlzdCIsCiAgICAiZGF0YSI6IFsKICAg + ICAgewogICAgICAgICJpZCI6ICJzdWJfOG5mYlRHR0lRUlF6eDEiLAogICAg + ICAgICJvYmplY3QiOiAic3Vic2NyaXB0aW9uIiwKICAgICAgICAiYXBwbGlj + YXRpb25fZmVlX3BlcmNlbnQiOiBudWxsLAogICAgICAgICJjYW5jZWxfYXRf + cGVyaW9kX2VuZCI6IGZhbHNlLAogICAgICAgICJjYW5jZWxlZF9hdCI6IG51 + bGwsCiAgICAgICAgImNyZWF0ZWQiOiAxNDY4MjQyOTU2LAogICAgICAgICJj + dXJyZW50X3BlcmlvZF9lbmQiOiAxNDcwOTIxMzU2LAogICAgICAgICJjdXJy + ZW50X3BlcmlvZF9zdGFydCI6IDE0NjgyNDI5NTYsCiAgICAgICAgImN1c3Rv + bWVyIjogImN1c184Q3pOdE0wOE5WbFNHTiIsCiAgICAgICAgImRpc2NvdW50 + IjogbnVsbCwKICAgICAgICAiZW5kZWRfYXQiOiBudWxsLAogICAgICAgICJs + aXZlbW9kZSI6IGZhbHNlLAogICAgICAgICJtZXRhZGF0YSI6IHt9LAogICAg + ICAgICJwbGFuIjogewogICAgICAgICAgImlkIjogIm1lbnN1ZWwtdGFyaWYt + cmVkdWl0LXN0dWRlbnQtbW9udGgtMjAxNjA0MDQxNzE4MjciLAogICAgICAg + ICAgIm9iamVjdCI6ICJwbGFuIiwKICAgICAgICAgICJhbW91bnQiOiAyMDAw + LAogICAgICAgICAgImNyZWF0ZWQiOiAxNDU5NzgzMTA4LAogICAgICAgICAg + ImN1cnJlbmN5IjogInVzZCIsCiAgICAgICAgICAiaW50ZXJ2YWwiOiAibW9u + dGgiLAogICAgICAgICAgImludGVydmFsX2NvdW50IjogMSwKICAgICAgICAg + ICJsaXZlbW9kZSI6IGZhbHNlLAogICAgICAgICAgIm1ldGFkYXRhIjoge30s + CiAgICAgICAgICAibmFtZSI6ICJNZW5zdWVsIHRhcmlmIHLDqWR1aXQgLSDD + qXR1ZGlhbnQsIC0gZGUgMjUgYW5zLCBlbnNlaWduYW50LCBkZW1hbmRldXIg + ZCdlbXBsb2kgLSBtb250aCIsCiAgICAgICAgICAic3RhdGVtZW50X2Rlc2Ny + aXB0b3IiOiBudWxsLAogICAgICAgICAgInRyaWFsX3BlcmlvZF9kYXlzIjog + bnVsbAogICAgICAgIH0sCiAgICAgICAgInF1YW50aXR5IjogMSwKICAgICAg + ICAic3RhcnQiOiAxNDY4MjQyOTU2LAogICAgICAgICJzdGF0dXMiOiAiYWN0 + aXZlIiwKICAgICAgICAidGF4X3BlcmNlbnQiOiBudWxsLAogICAgICAgICJ0 + cmlhbF9lbmQiOiBudWxsLAogICAgICAgICJ0cmlhbF9zdGFydCI6IG51bGwK + ICAgICAgfQogICAgXSwKICAgICJoYXNfbW9yZSI6IGZhbHNlLAogICAgInRv + dGFsX2NvdW50IjogMSwKICAgICJ1cmwiOiAiL3YxL2N1c3RvbWVycy9jdXNf + OEN6TnRNMDhOVmxTR04vc3Vic2NyaXB0aW9ucyIKICB9Cn0K + http_version: + recorded_at: Mon, 11 Jul 2016 13:15:58 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_8CzNtM08NVlSGN/subscriptions/sub_8nfbTGGIQRQzx1 + 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:15:59 GMT + Content-Type: + - application/json + Content-Length: + - '926' + 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_8nfbwT9nBtTlrw + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: ASCII-8BIT + string: !binary |- + ewogICJpZCI6ICJzdWJfOG5mYlRHR0lRUlF6eDEiLAogICJvYmplY3QiOiAi + c3Vic2NyaXB0aW9uIiwKICAiYXBwbGljYXRpb25fZmVlX3BlcmNlbnQiOiBu + dWxsLAogICJjYW5jZWxfYXRfcGVyaW9kX2VuZCI6IGZhbHNlLAogICJjYW5j + ZWxlZF9hdCI6IG51bGwsCiAgImNyZWF0ZWQiOiAxNDY4MjQyOTU2LAogICJj + dXJyZW50X3BlcmlvZF9lbmQiOiAxNDcwOTIxMzU2LAogICJjdXJyZW50X3Bl + cmlvZF9zdGFydCI6IDE0NjgyNDI5NTYsCiAgImN1c3RvbWVyIjogImN1c184 + Q3pOdE0wOE5WbFNHTiIsCiAgImRpc2NvdW50IjogbnVsbCwKICAiZW5kZWRf + YXQiOiBudWxsLAogICJsaXZlbW9kZSI6IGZhbHNlLAogICJtZXRhZGF0YSI6 + IHt9LAogICJwbGFuIjogewogICAgImlkIjogIm1lbnN1ZWwtdGFyaWYtcmVk + dWl0LXN0dWRlbnQtbW9udGgtMjAxNjA0MDQxNzE4MjciLAogICAgIm9iamVj + dCI6ICJwbGFuIiwKICAgICJhbW91bnQiOiAyMDAwLAogICAgImNyZWF0ZWQi + OiAxNDU5NzgzMTA4LAogICAgImN1cnJlbmN5IjogInVzZCIsCiAgICAiaW50 + ZXJ2YWwiOiAibW9udGgiLAogICAgImludGVydmFsX2NvdW50IjogMSwKICAg + ICJsaXZlbW9kZSI6IGZhbHNlLAogICAgIm1ldGFkYXRhIjoge30sCiAgICAi + bmFtZSI6ICJNZW5zdWVsIHRhcmlmIHLDqWR1aXQgLSDDqXR1ZGlhbnQsIC0g + ZGUgMjUgYW5zLCBlbnNlaWduYW50LCBkZW1hbmRldXIgZCdlbXBsb2kgLSBt + b250aCIsCiAgICAic3RhdGVtZW50X2Rlc2NyaXB0b3IiOiBudWxsLAogICAg + InRyaWFsX3BlcmlvZF9kYXlzIjogbnVsbAogIH0sCiAgInF1YW50aXR5Ijog + MSwKICAic3RhcnQiOiAxNDY4MjQyOTU2LAogICJzdGF0dXMiOiAiYWN0aXZl + IiwKICAidGF4X3BlcmNlbnQiOiBudWxsLAogICJ0cmlhbF9lbmQiOiBudWxs + LAogICJ0cmlhbF9zdGFydCI6IG51bGwKfQo= + http_version: + recorded_at: Mon, 11 Jul 2016 13:15:59 GMT +- request: + method: delete + uri: https://api.stripe.com/v1/customers/cus_8CzNtM08NVlSGN/subscriptions/sub_8nfbTGGIQRQzx1?at_period_end=true + 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:16:00 GMT + Content-Type: + - application/json + Content-Length: + - '931' + 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_8nfbwqRs1dLP5C + Stripe-Version: + - '2015-10-16' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: ASCII-8BIT + string: !binary |- + ewogICJpZCI6ICJzdWJfOG5mYlRHR0lRUlF6eDEiLAogICJvYmplY3QiOiAi + c3Vic2NyaXB0aW9uIiwKICAiYXBwbGljYXRpb25fZmVlX3BlcmNlbnQiOiBu + dWxsLAogICJjYW5jZWxfYXRfcGVyaW9kX2VuZCI6IHRydWUsCiAgImNhbmNl + bGVkX2F0IjogMTQ2ODI0Mjk2MCwKICAiY3JlYXRlZCI6IDE0NjgyNDI5NTYs + CiAgImN1cnJlbnRfcGVyaW9kX2VuZCI6IDE0NzA5MjEzNTYsCiAgImN1cnJl + bnRfcGVyaW9kX3N0YXJ0IjogMTQ2ODI0Mjk1NiwKICAiY3VzdG9tZXIiOiAi + Y3VzXzhDek50TTA4TlZsU0dOIiwKICAiZGlzY291bnQiOiBudWxsLAogICJl + bmRlZF9hdCI6IG51bGwsCiAgImxpdmVtb2RlIjogZmFsc2UsCiAgIm1ldGFk + YXRhIjoge30sCiAgInBsYW4iOiB7CiAgICAiaWQiOiAibWVuc3VlbC10YXJp + Zi1yZWR1aXQtc3R1ZGVudC1tb250aC0yMDE2MDQwNDE3MTgyNyIsCiAgICAi + b2JqZWN0IjogInBsYW4iLAogICAgImFtb3VudCI6IDIwMDAsCiAgICAiY3Jl + YXRlZCI6IDE0NTk3ODMxMDgsCiAgICAiY3VycmVuY3kiOiAidXNkIiwKICAg + ICJpbnRlcnZhbCI6ICJtb250aCIsCiAgICAiaW50ZXJ2YWxfY291bnQiOiAx + LAogICAgImxpdmVtb2RlIjogZmFsc2UsCiAgICAibWV0YWRhdGEiOiB7fSwK + ICAgICJuYW1lIjogIk1lbnN1ZWwgdGFyaWYgcsOpZHVpdCAtIMOpdHVkaWFu + dCwgLSBkZSAyNSBhbnMsIGVuc2VpZ25hbnQsIGRlbWFuZGV1ciBkJ2VtcGxv + aSAtIG1vbnRoIiwKICAgICJzdGF0ZW1lbnRfZGVzY3JpcHRvciI6IG51bGws + CiAgICAidHJpYWxfcGVyaW9kX2RheXMiOiBudWxsCiAgfSwKICAicXVhbnRp + dHkiOiAxLAogICJzdGFydCI6IDE0NjgyNDI5NTYsCiAgInN0YXR1cyI6ICJh + Y3RpdmUiLAogICJ0YXhfcGVyY2VudCI6IG51bGwsCiAgInRyaWFsX2VuZCI6 + IG51bGwsCiAgInRyaWFsX3N0YXJ0IjogbnVsbAp9Cg== + http_version: + recorded_at: Mon, 11 Jul 2016 13:16:00 GMT +recorded_with: VCR 3.0.1