1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

prevent subscription creation/modification if card_token is invalid

This commit is contained in:
Sylvain 2016-04-11 18:37:06 +02:00
parent 31ee151809
commit f9628b4989
8 changed files with 1209 additions and 1392 deletions

View File

@ -14,16 +14,18 @@ class API::SubscriptionsController < API::ApiController
else else
if current_user.is_admin? if current_user.is_admin?
@subscription = Subscription.find_or_initialize_by(user_id: subscription_params[:user_id]) @subscription = Subscription.find_or_initialize_by(user_id: subscription_params[:user_id])
# @subscription.expired_at = nil
@subscription.update_column(:expired_at, nil) unless @subscription.new_record? # very important @subscription.update_column(:expired_at, nil) unless @subscription.new_record? # very important
@subscription.attributes = subscription_params @subscription.attributes = subscription_params
is_subscribe = @subscription.save_with_local_payment(!User.find(subscription_params[:user_id]).invoicing_disabled?) is_subscribe = @subscription.save_with_local_payment(!User.find(subscription_params[:user_id]).invoicing_disabled?)
else else
@subscription = Subscription.find_or_initialize_by(user_id: current_user.id) @subscription = Subscription.find_or_initialize_by(user_id: current_user.id)
# @subscription.expired_at = nil if valid_card_token?(subscription_params[:card_token])
@subscription.update_column(:expired_at, nil) unless @subscription.new_record? # very important @subscription.update_column(:expired_at, nil) unless @subscription.new_record? # very important
@subscription.attributes = subscription_params.merge(user_id: current_user.id) @subscription.attributes = subscription_params.merge(user_id: current_user.id)
is_subscribe = @subscription.save_with_payment is_subscribe = @subscription.save_with_payment
else
is_subscribe = false
end
end end
if is_subscribe if is_subscribe
render :show, status: :created, location: @subscription render :show, status: :created, location: @subscription
@ -61,4 +63,14 @@ class API::SubscriptionsController < API::ApiController
def subscription_update_params def subscription_update_params
params.require(:subscription).permit(:expired_at) params.require(:subscription).permit(:expired_at)
end end
# TODO refactor subscriptions logic and move this in model/validator
def valid_card_token?(token)
begin
Stripe::Token.retrieve(token)
rescue Stripe::InvalidRequestError => e
@subscription.errors[:card_token] << e.message
false
end
end
end end

View File

@ -139,8 +139,8 @@ module PDF
vat_rate = Setting.find_by({name: 'invoice_VAT-rate'}).value.to_f vat_rate = Setting.find_by({name: 'invoice_VAT-rate'}).value.to_f
vat = total / (vat_rate / 100 + 1) vat = total / (vat_rate / 100 + 1)
data += [ [I18n.t('invoices.including_VAT_RATE', RATE: vat_rate), number_to_currency(vat)] ] data += [ [I18n.t('invoices.including_VAT_RATE', RATE: vat_rate), number_to_currency(total-vat)] ]
data += [ [I18n.t('invoices.including_total_excluding_taxes'), number_to_currency(total-vat)] ] data += [ [I18n.t('invoices.including_total_excluding_taxes'), number_to_currency(vat)] ]
data += [ [I18n.t('invoices.including_amount_payed_on_ordering'), number_to_currency(total)] ] data += [ [I18n.t('invoices.including_amount_payed_on_ordering'), number_to_currency(total)] ]
# checking the round number # checking the round number

View File

@ -0,0 +1,15 @@
class StripeCardTokenValidator
def validate(record)
if options[:token]
begin
res = Stripe::Token.retrieve(options[:token])
if res[:id] != options[:token]
record.errors[:card_token] << "A problem occurred while retrieving the card with the specified token: #{res.id}"
end
rescue Stripe::InvalidRequestError => e
record.errors[:card_token] << e
end
end
end
end

View File

@ -76,7 +76,7 @@ class Subscriptions::RenewAsUserTest < ActionDispatch::IntegrationTest
assert_match /No such token/, response.body assert_match /No such token/, response.body
# Check that the user's subscription has not changed # Check that the user's subscription has not changed
#FIXME assert_equal previous_expiration, @user.subscription.expired_at.to_i, "user's subscription has changed" assert_equal previous_expiration, @user.subscription.expired_at.to_i, "user's subscription has changed"
end end
end end

View File

@ -19,8 +19,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
Content-Length: Content-Length:
- '81' - '81'
response: response:
@ -31,11 +31,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Thu, 07 Apr 2016 09:34:23 GMT - Mon, 11 Apr 2016 15:43:39 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '780' - '779'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -49,7 +49,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8E1aDuJqtjQOj4 - req_8FcRQTmptYozzo
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -58,10 +58,10 @@ http_interactions:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{ {
"id": "tok_17xZWt2sOmf47Nz906Kkg4Q3", "id": "tok_17z7CR2sOmf47Nz9uppKBmeh",
"object": "token", "object": "token",
"card": { "card": {
"id": "card_17xZWt2sOmf47Nz9eVUCi53A", "id": "card_17z7CR2sOmf47Nz9ruv5qwpH",
"object": "card", "object": "card",
"address_city": null, "address_city": null,
"address_country": null, "address_country": null,
@ -84,17 +84,17 @@ http_interactions:
"name": null, "name": null,
"tokenization_method": null "tokenization_method": null
}, },
"client_ip": "90.52.157.226", "client_ip": "90.42.87.235",
"created": 1460021663, "created": 1460389419,
"livemode": false, "livemode": false,
"type": "card", "type": "card",
"used": false "used": false
} }
http_version: http_version:
recorded_at: Thu, 07 Apr 2016 09:34:23 GMT recorded_at: Mon, 11 Apr 2016 15:43:39 GMT
- request: - request:
method: get method: get
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt uri: https://api.stripe.com/v1/tokens/tok_17z7CR2sOmf47Nz9uppKBmeh
body: body:
encoding: US-ASCII encoding: US-ASCII
string: '' string: ''
@ -111,8 +111,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -121,11 +121,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Thu, 07 Apr 2016 09:34:24 GMT - Mon, 11 Apr 2016 15:43:40 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '4487' - '779'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -139,7 +139,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8E1aHv4p7a59Gy - req_8FcRRKMMyEf0bI
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -148,24 +148,10 @@ http_interactions:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{ {
"id": "cus_8Di1wjdVktv5kt", "id": "tok_17z7CR2sOmf47Nz9uppKBmeh",
"object": "customer", "object": "token",
"account_balance": 0, "card": {
"created": 1459948888, "id": "card_17z7CR2sOmf47Nz9ruv5qwpH",
"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", "object": "card",
"address_city": null, "address_city": null,
"address_country": null, "address_country": null,
@ -177,8 +163,7 @@ http_interactions:
"address_zip_check": null, "address_zip_check": null,
"brand": "Visa", "brand": "Visa",
"country": "US", "country": "US",
"customer": "cus_8Di1wjdVktv5kt", "cvc_check": "unchecked",
"cvc_check": "pass",
"dynamic_last4": null, "dynamic_last4": null,
"exp_month": 4, "exp_month": 4,
"exp_year": 2017, "exp_year": 2017,
@ -188,642 +173,13 @@ http_interactions:
"metadata": {}, "metadata": {},
"name": null, "name": null,
"tokenization_method": null "tokenization_method": null
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/customers/cus_8Di1wjdVktv5kt/sources"
}, },
"subscriptions": { "client_ip": "90.42.87.235",
"object": "list", "created": 1460389419,
"data": [
{
"id": "sub_8DkqBcR1bQvr5G",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": true,
"canceled_at": 1459959386,
"current_period_end": 1462551382,
"current_period_start": 1459959382,
"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, "livemode": false,
"metadata": {}, "type": "card",
"name": "Mensuel - standard, association - month", "used": false
"statement_descriptor": null,
"trial_period_days": null
},
"quantity": 1,
"start": 1459959382,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
},
{
"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
}
],
"has_more": false,
"total_count": 3,
"url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions"
}
} }
http_version: http_version:
recorded_at: Thu, 07 Apr 2016 09:34:24 GMT recorded_at: Mon, 11 Apr 2016 15:43:40 GMT
- request:
method: post
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/subscriptions
body:
encoding: UTF-8
string: plan=mensuel-tarif-reduit-student-month-20160404171827&card=tok_17xZWt2sOmf47Nz906Kkg4Q3
headers:
Accept:
- "*/*; q=0.5, application/xml"
Accept-Encoding:
- gzip, deflate
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}'
Content-Length:
- '88'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Thu, 07 Apr 2016 09:34:25 GMT
Content-Type:
- application/json
Content-Length:
- '880'
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_8E1ac4ihRJHesp
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: ASCII-8BIT
string: !binary |-
ewogICJpZCI6ICJzdWJfOEUxYWZrVEJuMmRjMUQiLAogICJvYmplY3QiOiAi
c3Vic2NyaXB0aW9uIiwKICAiYXBwbGljYXRpb25fZmVlX3BlcmNlbnQiOiBu
dWxsLAogICJjYW5jZWxfYXRfcGVyaW9kX2VuZCI6IGZhbHNlLAogICJjYW5j
ZWxlZF9hdCI6IG51bGwsCiAgImN1cnJlbnRfcGVyaW9kX2VuZCI6IDE0NjI2
MTM2NjUsCiAgImN1cnJlbnRfcGVyaW9kX3N0YXJ0IjogMTQ2MDAyMTY2NSwK
ICAiY3VzdG9tZXIiOiAiY3VzXzhEaTF3amRWa3R2NWt0IiwKICAiZGlzY291
bnQiOiBudWxsLAogICJlbmRlZF9hdCI6IG51bGwsCiAgIm1ldGFkYXRhIjog
e30sCiAgInBsYW4iOiB7CiAgICAiaWQiOiAibWVuc3VlbC10YXJpZi1yZWR1
aXQtc3R1ZGVudC1tb250aC0yMDE2MDQwNDE3MTgyNyIsCiAgICAib2JqZWN0
IjogInBsYW4iLAogICAgImFtb3VudCI6IDIwMDAsCiAgICAiY3JlYXRlZCI6
IDE0NTk3ODMxMDgsCiAgICAiY3VycmVuY3kiOiAidXNkIiwKICAgICJpbnRl
cnZhbCI6ICJtb250aCIsCiAgICAiaW50ZXJ2YWxfY291bnQiOiAxLAogICAg
ImxpdmVtb2RlIjogZmFsc2UsCiAgICAibWV0YWRhdGEiOiB7fSwKICAgICJu
YW1lIjogIk1lbnN1ZWwgdGFyaWYgcsOpZHVpdCAtIMOpdHVkaWFudCwgLSBk
ZSAyNSBhbnMsIGVuc2VpZ25hbnQsIGRlbWFuZGV1ciBkJ2VtcGxvaSAtIG1v
bnRoIiwKICAgICJzdGF0ZW1lbnRfZGVzY3JpcHRvciI6IG51bGwsCiAgICAi
dHJpYWxfcGVyaW9kX2RheXMiOiBudWxsCiAgfSwKICAicXVhbnRpdHkiOiAx
LAogICJzdGFydCI6IDE0NjAwMjE2NjUsCiAgInN0YXR1cyI6ICJhY3RpdmUi
LAogICJ0YXhfcGVyY2VudCI6IG51bGwsCiAgInRyaWFsX2VuZCI6IG51bGws
CiAgInRyaWFsX3N0YXJ0IjogbnVsbAp9Cg==
http_version:
recorded_at: Thu, 07 Apr 2016 09:34:26 GMT
- request:
method: get
uri: https://api.stripe.com/v1/invoices?customer=cus_8Di1wjdVktv5kt&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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Thu, 07 Apr 2016 09:34:27 GMT
Content-Type:
- application/json
Content-Length:
- '2266'
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_8E1aqh5kH5Jx71
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: ASCII-8BIT
string: !binary |-
ewogICJvYmplY3QiOiAibGlzdCIsCiAgImRhdGEiOiBbCiAgICB7CiAgICAg
ICJpZCI6ICJpbl8xN3haV3Yyc09tZjQ3Tno5UVZ5UG8zWHYiLAogICAgICAi
b2JqZWN0IjogImludm9pY2UiLAogICAgICAiYW1vdW50X2R1ZSI6IDIwMDAs
CiAgICAgICJhcHBsaWNhdGlvbl9mZWUiOiBudWxsLAogICAgICAiYXR0ZW1w
dF9jb3VudCI6IDEsCiAgICAgICJhdHRlbXB0ZWQiOiB0cnVlLAogICAgICAi
Y2hhcmdlIjogImNoXzE3eFpXdjJzT21mNDdOejlFOWtIUTV5OCIsCiAgICAg
ICJjbG9zZWQiOiB0cnVlLAogICAgICAiY3VycmVuY3kiOiAidXNkIiwKICAg
ICAgImN1c3RvbWVyIjogImN1c184RGkxd2pkVmt0djVrdCIsCiAgICAgICJk
YXRlIjogMTQ2MDAyMTY2NSwKICAgICAgImRlc2NyaXB0aW9uIjogbnVsbCwK
ICAgICAgImRpc2NvdW50IjogbnVsbCwKICAgICAgImVuZGluZ19iYWxhbmNl
IjogMCwKICAgICAgImZvcmdpdmVuIjogZmFsc2UsCiAgICAgICJsaW5lcyI6
IHsKICAgICAgICAib2JqZWN0IjogImxpc3QiLAogICAgICAgICJkYXRhIjog
WwogICAgICAgICAgewogICAgICAgICAgICAiaWQiOiAic3ViXzhFMWFma1RC
bjJkYzFEIiwKICAgICAgICAgICAgIm9iamVjdCI6ICJsaW5lX2l0ZW0iLAog
ICAgICAgICAgICAiYW1vdW50IjogMjAwMCwKICAgICAgICAgICAgImN1cnJl
bmN5IjogInVzZCIsCiAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6IG51bGws
CiAgICAgICAgICAgICJkaXNjb3VudGFibGUiOiB0cnVlLAogICAgICAgICAg
ICAibGl2ZW1vZGUiOiBmYWxzZSwKICAgICAgICAgICAgIm1ldGFkYXRhIjog
e30sCiAgICAgICAgICAgICJwZXJpb2QiOiB7CiAgICAgICAgICAgICAgInN0
YXJ0IjogMTQ2MDAyMTY2NSwKICAgICAgICAgICAgICAiZW5kIjogMTQ2MjYx
MzY2NQogICAgICAgICAgICB9LAogICAgICAgICAgICAicGxhbiI6IHsKICAg
ICAgICAgICAgICAiaWQiOiAibWVuc3VlbC10YXJpZi1yZWR1aXQtc3R1ZGVu
dC1tb250aC0yMDE2MDQwNDE3MTgyNyIsCiAgICAgICAgICAgICAgIm9iamVj
dCI6ICJwbGFuIiwKICAgICAgICAgICAgICAiYW1vdW50IjogMjAwMCwKICAg
ICAgICAgICAgICAiY3JlYXRlZCI6IDE0NTk3ODMxMDgsCiAgICAgICAgICAg
ICAgImN1cnJlbmN5IjogInVzZCIsCiAgICAgICAgICAgICAgImludGVydmFs
IjogIm1vbnRoIiwKICAgICAgICAgICAgICAiaW50ZXJ2YWxfY291bnQiOiAx
LAogICAgICAgICAgICAgICJsaXZlbW9kZSI6IGZhbHNlLAogICAgICAgICAg
ICAgICJtZXRhZGF0YSI6IHt9LAogICAgICAgICAgICAgICJuYW1lIjogIk1l
bnN1ZWwgdGFyaWYgcsOpZHVpdCAtIMOpdHVkaWFudCwgLSBkZSAyNSBhbnMs
IGVuc2VpZ25hbnQsIGRlbWFuZGV1ciBkJ2VtcGxvaSAtIG1vbnRoIiwKICAg
ICAgICAgICAgICAic3RhdGVtZW50X2Rlc2NyaXB0b3IiOiBudWxsLAogICAg
ICAgICAgICAgICJ0cmlhbF9wZXJpb2RfZGF5cyI6IG51bGwKICAgICAgICAg
ICAgfSwKICAgICAgICAgICAgInByb3JhdGlvbiI6IGZhbHNlLAogICAgICAg
ICAgICAicXVhbnRpdHkiOiAxLAogICAgICAgICAgICAic3Vic2NyaXB0aW9u
IjogbnVsbCwKICAgICAgICAgICAgInR5cGUiOiAic3Vic2NyaXB0aW9uIgog
ICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImhhc19tb3JlIjogZmFs
c2UsCiAgICAgICAgInRvdGFsX2NvdW50IjogMSwKICAgICAgICAidXJsIjog
Ii92MS9pbnZvaWNlcy9pbl8xN3haV3Yyc09tZjQ3Tno5UVZ5UG8zWHYvbGlu
ZXMiCiAgICAgIH0sCiAgICAgICJsaXZlbW9kZSI6IGZhbHNlLAogICAgICAi
bWV0YWRhdGEiOiB7fSwKICAgICAgIm5leHRfcGF5bWVudF9hdHRlbXB0Ijog
bnVsbCwKICAgICAgInBhaWQiOiB0cnVlLAogICAgICAicGVyaW9kX2VuZCI6
IDE0NjAwMjE2NjUsCiAgICAgICJwZXJpb2Rfc3RhcnQiOiAxNDU5OTQ4OTY4
LAogICAgICAicmVjZWlwdF9udW1iZXIiOiBudWxsLAogICAgICAic3RhcnRp
bmdfYmFsYW5jZSI6IDAsCiAgICAgICJzdGF0ZW1lbnRfZGVzY3JpcHRvciI6
IG51bGwsCiAgICAgICJzdWJzY3JpcHRpb24iOiAic3ViXzhFMWFma1RCbjJk
YzFEIiwKICAgICAgInN1YnRvdGFsIjogMjAwMCwKICAgICAgInRheCI6IG51
bGwsCiAgICAgICJ0YXhfcGVyY2VudCI6IG51bGwsCiAgICAgICJ0b3RhbCI6
IDIwMDAsCiAgICAgICJ3ZWJob29rc19kZWxpdmVyZWRfYXQiOiAxNDYwMDIx
NjY1CiAgICB9CiAgXSwKICAiaGFzX21vcmUiOiB0cnVlLAogICJ1cmwiOiAi
L3YxL2ludm9pY2VzIgp9Cg==
http_version:
recorded_at: Thu, 07 Apr 2016 09:34:27 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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Thu, 07 Apr 2016 09:34:28 GMT
Content-Type:
- application/json
Content-Length:
- '5566'
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_8E1a2ZYS5iN1tJ
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: ASCII-8BIT
string: !binary |-
ewogICJpZCI6ICJjdXNfOERpMXdqZFZrdHY1a3QiLAogICJvYmplY3QiOiAi
Y3VzdG9tZXIiLAogICJhY2NvdW50X2JhbGFuY2UiOiAwLAogICJjcmVhdGVk
IjogMTQ1OTk0ODg4OCwKICAiY3VycmVuY3kiOiAidXNkIiwKICAiZGVmYXVs
dF9zb3VyY2UiOiAiY2FyZF8xN3haV3Qyc09tZjQ3Tno5ZVZVQ2k1M0EiLAog
ICJkZWxpbnF1ZW50IjogZmFsc2UsCiAgImRlc2NyaXB0aW9uIjogIkplYW4g
RHVwb25kIiwKICAiZGlzY291bnQiOiBudWxsLAogICJlbWFpbCI6ICJqZWFu
LmR1cG9uZEBnbWFpbC5jb20iLAogICJsaXZlbW9kZSI6IGZhbHNlLAogICJt
ZXRhZGF0YSI6IHt9LAogICJzaGlwcGluZyI6IG51bGwsCiAgInNvdXJjZXMi
OiB7CiAgICAib2JqZWN0IjogImxpc3QiLAogICAgImRhdGEiOiBbCiAgICAg
IHsKICAgICAgICAiaWQiOiAiY2FyZF8xN3haV3Qyc09tZjQ3Tno5ZVZVQ2k1
M0EiLAogICAgICAgICJvYmplY3QiOiAiY2FyZCIsCiAgICAgICAgImFkZHJl
c3NfY2l0eSI6IG51bGwsCiAgICAgICAgImFkZHJlc3NfY291bnRyeSI6IG51
bGwsCiAgICAgICAgImFkZHJlc3NfbGluZTEiOiBudWxsLAogICAgICAgICJh
ZGRyZXNzX2xpbmUxX2NoZWNrIjogbnVsbCwKICAgICAgICAiYWRkcmVzc19s
aW5lMiI6IG51bGwsCiAgICAgICAgImFkZHJlc3Nfc3RhdGUiOiBudWxsLAog
ICAgICAgICJhZGRyZXNzX3ppcCI6IG51bGwsCiAgICAgICAgImFkZHJlc3Nf
emlwX2NoZWNrIjogbnVsbCwKICAgICAgICAiYnJhbmQiOiAiVmlzYSIsCiAg
ICAgICAgImNvdW50cnkiOiAiVVMiLAogICAgICAgICJjdXN0b21lciI6ICJj
dXNfOERpMXdqZFZrdHY1a3QiLAogICAgICAgICJjdmNfY2hlY2siOiAicGFz
cyIsCiAgICAgICAgImR5bmFtaWNfbGFzdDQiOiBudWxsLAogICAgICAgICJl
eHBfbW9udGgiOiA0LAogICAgICAgICJleHBfeWVhciI6IDIwMTcsCiAgICAg
ICAgImZpbmdlcnByaW50IjogIm81Mmp5YlI3Ym5tTm42QVQiLAogICAgICAg
ICJmdW5kaW5nIjogImNyZWRpdCIsCiAgICAgICAgImxhc3Q0IjogIjQyNDIi
LAogICAgICAgICJtZXRhZGF0YSI6IHt9LAogICAgICAgICJuYW1lIjogbnVs
bCwKICAgICAgICAidG9rZW5pemF0aW9uX21ldGhvZCI6IG51bGwKICAgICAg
fQogICAgXSwKICAgICJoYXNfbW9yZSI6IGZhbHNlLAogICAgInRvdGFsX2Nv
dW50IjogMSwKICAgICJ1cmwiOiAiL3YxL2N1c3RvbWVycy9jdXNfOERpMXdq
ZFZrdHY1a3Qvc291cmNlcyIKICB9LAogICJzdWJzY3JpcHRpb25zIjogewog
ICAgIm9iamVjdCI6ICJsaXN0IiwKICAgICJkYXRhIjogWwogICAgICB7CiAg
ICAgICAgImlkIjogInN1Yl84RTFhZmtUQm4yZGMxRCIsCiAgICAgICAgIm9i
amVjdCI6ICJzdWJzY3JpcHRpb24iLAogICAgICAgICJhcHBsaWNhdGlvbl9m
ZWVfcGVyY2VudCI6IG51bGwsCiAgICAgICAgImNhbmNlbF9hdF9wZXJpb2Rf
ZW5kIjogZmFsc2UsCiAgICAgICAgImNhbmNlbGVkX2F0IjogbnVsbCwKICAg
ICAgICAiY3VycmVudF9wZXJpb2RfZW5kIjogMTQ2MjYxMzY2NSwKICAgICAg
ICAiY3VycmVudF9wZXJpb2Rfc3RhcnQiOiAxNDYwMDIxNjY1LAogICAgICAg
ICJjdXN0b21lciI6ICJjdXNfOERpMXdqZFZrdHY1a3QiLAogICAgICAgICJk
aXNjb3VudCI6IG51bGwsCiAgICAgICAgImVuZGVkX2F0IjogbnVsbCwKICAg
ICAgICAibWV0YWRhdGEiOiB7fSwKICAgICAgICAicGxhbiI6IHsKICAgICAg
ICAgICJpZCI6ICJtZW5zdWVsLXRhcmlmLXJlZHVpdC1zdHVkZW50LW1vbnRo
LTIwMTYwNDA0MTcxODI3IiwKICAgICAgICAgICJvYmplY3QiOiAicGxhbiIs
CiAgICAgICAgICAiYW1vdW50IjogMjAwMCwKICAgICAgICAgICJjcmVhdGVk
IjogMTQ1OTc4MzEwOCwKICAgICAgICAgICJjdXJyZW5jeSI6ICJ1c2QiLAog
ICAgICAgICAgImludGVydmFsIjogIm1vbnRoIiwKICAgICAgICAgICJpbnRl
cnZhbF9jb3VudCI6IDEsCiAgICAgICAgICAibGl2ZW1vZGUiOiBmYWxzZSwK
ICAgICAgICAgICJtZXRhZGF0YSI6IHt9LAogICAgICAgICAgIm5hbWUiOiAi
TWVuc3VlbCB0YXJpZiByw6lkdWl0IC0gw6l0dWRpYW50LCAtIGRlIDI1IGFu
cywgZW5zZWlnbmFudCwgZGVtYW5kZXVyIGQnZW1wbG9pIC0gbW9udGgiLAog
ICAgICAgICAgInN0YXRlbWVudF9kZXNjcmlwdG9yIjogbnVsbCwKICAgICAg
ICAgICJ0cmlhbF9wZXJpb2RfZGF5cyI6IG51bGwKICAgICAgICB9LAogICAg
ICAgICJxdWFudGl0eSI6IDEsCiAgICAgICAgInN0YXJ0IjogMTQ2MDAyMTY2
NSwKICAgICAgICAic3RhdHVzIjogImFjdGl2ZSIsCiAgICAgICAgInRheF9w
ZXJjZW50IjogbnVsbCwKICAgICAgICAidHJpYWxfZW5kIjogbnVsbCwKICAg
ICAgICAidHJpYWxfc3RhcnQiOiBudWxsCiAgICAgIH0sCiAgICAgIHsKICAg
ICAgICAiaWQiOiAic3ViXzhEa3FCY1IxYlF2cjVHIiwKICAgICAgICAib2Jq
ZWN0IjogInN1YnNjcmlwdGlvbiIsCiAgICAgICAgImFwcGxpY2F0aW9uX2Zl
ZV9wZXJjZW50IjogbnVsbCwKICAgICAgICAiY2FuY2VsX2F0X3BlcmlvZF9l
bmQiOiB0cnVlLAogICAgICAgICJjYW5jZWxlZF9hdCI6IDE0NTk5NTkzODYs
CiAgICAgICAgImN1cnJlbnRfcGVyaW9kX2VuZCI6IDE0NjI1NTEzODIsCiAg
ICAgICAgImN1cnJlbnRfcGVyaW9kX3N0YXJ0IjogMTQ1OTk1OTM4MiwKICAg
ICAgICAiY3VzdG9tZXIiOiAiY3VzXzhEaTF3amRWa3R2NWt0IiwKICAgICAg
ICAiZGlzY291bnQiOiBudWxsLAogICAgICAgICJlbmRlZF9hdCI6IG51bGws
CiAgICAgICAgIm1ldGFkYXRhIjoge30sCiAgICAgICAgInBsYW4iOiB7CiAg
ICAgICAgICAiaWQiOiAibWVuc3VlbC1zdGFuZGFyZC1tb250aC0yMDE2MDQw
NDE3MTUxOSIsCiAgICAgICAgICAib2JqZWN0IjogInBsYW4iLAogICAgICAg
ICAgImFtb3VudCI6IDMwMDAsCiAgICAgICAgICAiY3JlYXRlZCI6IDE0NTk3
ODI5MjEsCiAgICAgICAgICAiY3VycmVuY3kiOiAidXNkIiwKICAgICAgICAg
ICJpbnRlcnZhbCI6ICJtb250aCIsCiAgICAgICAgICAiaW50ZXJ2YWxfY291
bnQiOiAxLAogICAgICAgICAgImxpdmVtb2RlIjogZmFsc2UsCiAgICAgICAg
ICAibWV0YWRhdGEiOiB7fSwKICAgICAgICAgICJuYW1lIjogIk1lbnN1ZWwg
LSBzdGFuZGFyZCwgYXNzb2NpYXRpb24gLSBtb250aCIsCiAgICAgICAgICAi
c3RhdGVtZW50X2Rlc2NyaXB0b3IiOiBudWxsLAogICAgICAgICAgInRyaWFs
X3BlcmlvZF9kYXlzIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgInF1YW50
aXR5IjogMSwKICAgICAgICAic3RhcnQiOiAxNDU5OTU5MzgyLAogICAgICAg
ICJzdGF0dXMiOiAiYWN0aXZlIiwKICAgICAgICAidGF4X3BlcmNlbnQiOiBu
dWxsLAogICAgICAgICJ0cmlhbF9lbmQiOiBudWxsLAogICAgICAgICJ0cmlh
bF9zdGFydCI6IG51bGwKICAgICAgfSwKICAgICAgewogICAgICAgICJpZCI6
ICJzdWJfOERpOWdxUEx3dDVJSUMiLAogICAgICAgICJvYmplY3QiOiAic3Vi
c2NyaXB0aW9uIiwKICAgICAgICAiYXBwbGljYXRpb25fZmVlX3BlcmNlbnQi
OiBudWxsLAogICAgICAgICJjYW5jZWxfYXRfcGVyaW9kX2VuZCI6IHRydWUs
CiAgICAgICAgImNhbmNlbGVkX2F0IjogMTQ1OTk0OTQwNCwKICAgICAgICAi
Y3VycmVudF9wZXJpb2RfZW5kIjogMTQ2MjU0MTM5OSwKICAgICAgICAiY3Vy
cmVudF9wZXJpb2Rfc3RhcnQiOiAxNDU5OTQ5Mzk5LAogICAgICAgICJjdXN0
b21lciI6ICJjdXNfOERpMXdqZFZrdHY1a3QiLAogICAgICAgICJkaXNjb3Vu
dCI6IG51bGwsCiAgICAgICAgImVuZGVkX2F0IjogbnVsbCwKICAgICAgICAi
bWV0YWRhdGEiOiB7fSwKICAgICAgICAicGxhbiI6IHsKICAgICAgICAgICJp
ZCI6ICJtZW5zdWVsLXN0YW5kYXJkLW1vbnRoLTIwMTYwNDA0MTcxNTE5IiwK
ICAgICAgICAgICJvYmplY3QiOiAicGxhbiIsCiAgICAgICAgICAiYW1vdW50
IjogMzAwMCwKICAgICAgICAgICJjcmVhdGVkIjogMTQ1OTc4MjkyMSwKICAg
ICAgICAgICJjdXJyZW5jeSI6ICJ1c2QiLAogICAgICAgICAgImludGVydmFs
IjogIm1vbnRoIiwKICAgICAgICAgICJpbnRlcnZhbF9jb3VudCI6IDEsCiAg
ICAgICAgICAibGl2ZW1vZGUiOiBmYWxzZSwKICAgICAgICAgICJtZXRhZGF0
YSI6IHt9LAogICAgICAgICAgIm5hbWUiOiAiTWVuc3VlbCAtIHN0YW5kYXJk
LCBhc3NvY2lhdGlvbiAtIG1vbnRoIiwKICAgICAgICAgICJzdGF0ZW1lbnRf
ZGVzY3JpcHRvciI6IG51bGwsCiAgICAgICAgICAidHJpYWxfcGVyaW9kX2Rh
eXMiOiBudWxsCiAgICAgICAgfSwKICAgICAgICAicXVhbnRpdHkiOiAxLAog
ICAgICAgICJzdGFydCI6IDE0NTk5NDkzOTksCiAgICAgICAgInN0YXR1cyI6
ICJhY3RpdmUiLAogICAgICAgICJ0YXhfcGVyY2VudCI6IG51bGwsCiAgICAg
ICAgInRyaWFsX2VuZCI6IG51bGwsCiAgICAgICAgInRyaWFsX3N0YXJ0Ijog
bnVsbAogICAgICB9LAogICAgICB7CiAgICAgICAgImlkIjogInN1Yl84RGky
VmFkUnZyN0E5OSIsCiAgICAgICAgIm9iamVjdCI6ICJzdWJzY3JpcHRpb24i
LAogICAgICAgICJhcHBsaWNhdGlvbl9mZWVfcGVyY2VudCI6IG51bGwsCiAg
ICAgICAgImNhbmNlbF9hdF9wZXJpb2RfZW5kIjogdHJ1ZSwKICAgICAgICAi
Y2FuY2VsZWRfYXQiOiAxNDU5OTQ4OTcyLAogICAgICAgICJjdXJyZW50X3Bl
cmlvZF9lbmQiOiAxNDYyNTQwOTY4LAogICAgICAgICJjdXJyZW50X3Blcmlv
ZF9zdGFydCI6IDE0NTk5NDg5NjgsCiAgICAgICAgImN1c3RvbWVyIjogImN1
c184RGkxd2pkVmt0djVrdCIsCiAgICAgICAgImRpc2NvdW50IjogbnVsbCwK
ICAgICAgICAiZW5kZWRfYXQiOiBudWxsLAogICAgICAgICJtZXRhZGF0YSI6
IHt9LAogICAgICAgICJwbGFuIjogewogICAgICAgICAgImlkIjogIm1lbnN1
ZWwtc3RhbmRhcmQtbW9udGgtMjAxNjA0MDQxNzE1MTkiLAogICAgICAgICAg
Im9iamVjdCI6ICJwbGFuIiwKICAgICAgICAgICJhbW91bnQiOiAzMDAwLAog
ICAgICAgICAgImNyZWF0ZWQiOiAxNDU5NzgyOTIxLAogICAgICAgICAgImN1
cnJlbmN5IjogInVzZCIsCiAgICAgICAgICAiaW50ZXJ2YWwiOiAibW9udGgi
LAogICAgICAgICAgImludGVydmFsX2NvdW50IjogMSwKICAgICAgICAgICJs
aXZlbW9kZSI6IGZhbHNlLAogICAgICAgICAgIm1ldGFkYXRhIjoge30sCiAg
ICAgICAgICAibmFtZSI6ICJNZW5zdWVsIC0gc3RhbmRhcmQsIGFzc29jaWF0
aW9uIC0gbW9udGgiLAogICAgICAgICAgInN0YXRlbWVudF9kZXNjcmlwdG9y
IjogbnVsbCwKICAgICAgICAgICJ0cmlhbF9wZXJpb2RfZGF5cyI6IG51bGwK
ICAgICAgICB9LAogICAgICAgICJxdWFudGl0eSI6IDEsCiAgICAgICAgInN0
YXJ0IjogMTQ1OTk0ODk2OCwKICAgICAgICAic3RhdHVzIjogImFjdGl2ZSIs
CiAgICAgICAgInRheF9wZXJjZW50IjogbnVsbCwKICAgICAgICAidHJpYWxf
ZW5kIjogbnVsbCwKICAgICAgICAidHJpYWxfc3RhcnQiOiBudWxsCiAgICAg
IH0KICAgIF0sCiAgICAiaGFzX21vcmUiOiBmYWxzZSwKICAgICJ0b3RhbF9j
b3VudCI6IDQsCiAgICAidXJsIjogIi92MS9jdXN0b21lcnMvY3VzXzhEaTF3
amRWa3R2NWt0L3N1YnNjcmlwdGlvbnMiCiAgfQp9Cg==
http_version:
recorded_at: Thu, 07 Apr 2016 09:34:28 GMT
- request:
method: get
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/subscriptions/sub_8E1afkTBn2dc1D
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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Thu, 07 Apr 2016 09:34:29 GMT
Content-Type:
- application/json
Content-Length:
- '880'
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_8E1a72YcNQrLBo
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: ASCII-8BIT
string: !binary |-
ewogICJpZCI6ICJzdWJfOEUxYWZrVEJuMmRjMUQiLAogICJvYmplY3QiOiAi
c3Vic2NyaXB0aW9uIiwKICAiYXBwbGljYXRpb25fZmVlX3BlcmNlbnQiOiBu
dWxsLAogICJjYW5jZWxfYXRfcGVyaW9kX2VuZCI6IGZhbHNlLAogICJjYW5j
ZWxlZF9hdCI6IG51bGwsCiAgImN1cnJlbnRfcGVyaW9kX2VuZCI6IDE0NjI2
MTM2NjUsCiAgImN1cnJlbnRfcGVyaW9kX3N0YXJ0IjogMTQ2MDAyMTY2NSwK
ICAiY3VzdG9tZXIiOiAiY3VzXzhEaTF3amRWa3R2NWt0IiwKICAiZGlzY291
bnQiOiBudWxsLAogICJlbmRlZF9hdCI6IG51bGwsCiAgIm1ldGFkYXRhIjog
e30sCiAgInBsYW4iOiB7CiAgICAiaWQiOiAibWVuc3VlbC10YXJpZi1yZWR1
aXQtc3R1ZGVudC1tb250aC0yMDE2MDQwNDE3MTgyNyIsCiAgICAib2JqZWN0
IjogInBsYW4iLAogICAgImFtb3VudCI6IDIwMDAsCiAgICAiY3JlYXRlZCI6
IDE0NTk3ODMxMDgsCiAgICAiY3VycmVuY3kiOiAidXNkIiwKICAgICJpbnRl
cnZhbCI6ICJtb250aCIsCiAgICAiaW50ZXJ2YWxfY291bnQiOiAxLAogICAg
ImxpdmVtb2RlIjogZmFsc2UsCiAgICAibWV0YWRhdGEiOiB7fSwKICAgICJu
YW1lIjogIk1lbnN1ZWwgdGFyaWYgcsOpZHVpdCAtIMOpdHVkaWFudCwgLSBk
ZSAyNSBhbnMsIGVuc2VpZ25hbnQsIGRlbWFuZGV1ciBkJ2VtcGxvaSAtIG1v
bnRoIiwKICAgICJzdGF0ZW1lbnRfZGVzY3JpcHRvciI6IG51bGwsCiAgICAi
dHJpYWxfcGVyaW9kX2RheXMiOiBudWxsCiAgfSwKICAicXVhbnRpdHkiOiAx
LAogICJzdGFydCI6IDE0NjAwMjE2NjUsCiAgInN0YXR1cyI6ICJhY3RpdmUi
LAogICJ0YXhfcGVyY2VudCI6IG51bGwsCiAgInRyaWFsX2VuZCI6IG51bGws
CiAgInRyaWFsX3N0YXJ0IjogbnVsbAp9Cg==
http_version:
recorded_at: Thu, 07 Apr 2016 09:34:29 GMT
- request:
method: delete
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/subscriptions/sub_8E1afkTBn2dc1D?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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Thu, 07 Apr 2016 09:34:30 GMT
Content-Type:
- application/json
Content-Length:
- '885'
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_8E1aMVW98tCB7l
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: ASCII-8BIT
string: !binary |-
ewogICJpZCI6ICJzdWJfOEUxYWZrVEJuMmRjMUQiLAogICJvYmplY3QiOiAi
c3Vic2NyaXB0aW9uIiwKICAiYXBwbGljYXRpb25fZmVlX3BlcmNlbnQiOiBu
dWxsLAogICJjYW5jZWxfYXRfcGVyaW9kX2VuZCI6IHRydWUsCiAgImNhbmNl
bGVkX2F0IjogMTQ2MDAyMTY3MCwKICAiY3VycmVudF9wZXJpb2RfZW5kIjog
MTQ2MjYxMzY2NSwKICAiY3VycmVudF9wZXJpb2Rfc3RhcnQiOiAxNDYwMDIx
NjY1LAogICJjdXN0b21lciI6ICJjdXNfOERpMXdqZFZrdHY1a3QiLAogICJk
aXNjb3VudCI6IG51bGwsCiAgImVuZGVkX2F0IjogbnVsbCwKICAibWV0YWRh
dGEiOiB7fSwKICAicGxhbiI6IHsKICAgICJpZCI6ICJtZW5zdWVsLXRhcmlm
LXJlZHVpdC1zdHVkZW50LW1vbnRoLTIwMTYwNDA0MTcxODI3IiwKICAgICJv
YmplY3QiOiAicGxhbiIsCiAgICAiYW1vdW50IjogMjAwMCwKICAgICJjcmVh
dGVkIjogMTQ1OTc4MzEwOCwKICAgICJjdXJyZW5jeSI6ICJ1c2QiLAogICAg
ImludGVydmFsIjogIm1vbnRoIiwKICAgICJpbnRlcnZhbF9jb3VudCI6IDEs
CiAgICAibGl2ZW1vZGUiOiBmYWxzZSwKICAgICJtZXRhZGF0YSI6IHt9LAog
ICAgIm5hbWUiOiAiTWVuc3VlbCB0YXJpZiByw6lkdWl0IC0gw6l0dWRpYW50
LCAtIGRlIDI1IGFucywgZW5zZWlnbmFudCwgZGVtYW5kZXVyIGQnZW1wbG9p
IC0gbW9udGgiLAogICAgInN0YXRlbWVudF9kZXNjcmlwdG9yIjogbnVsbCwK
ICAgICJ0cmlhbF9wZXJpb2RfZGF5cyI6IG51bGwKICB9LAogICJxdWFudGl0
eSI6IDEsCiAgInN0YXJ0IjogMTQ2MDAyMTY2NSwKICAic3RhdHVzIjogImFj
dGl2ZSIsCiAgInRheF9wZXJjZW50IjogbnVsbCwKICAidHJpYWxfZW5kIjog
bnVsbCwKICAidHJpYWxfc3RhcnQiOiBudWxsCn0K
http_version:
recorded_at: Thu, 07 Apr 2016 09:34:30 GMT
recorded_with: VCR 3.0.1 recorded_with: VCR 3.0.1

View File

@ -19,8 +19,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
Content-Length: Content-Length:
- '81' - '81'
response: response:
@ -31,11 +31,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Wed, 06 Apr 2016 13:29:57 GMT - Mon, 11 Apr 2016 15:43:41 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '780' - '779'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -49,7 +49,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8Di9AmOR7uXw9z - req_8FcRwZhpRvOW2K
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -58,10 +58,10 @@ http_interactions:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{ {
"id": "tok_17xGjJ2sOmf47Nz9PLqUZge2", "id": "tok_17z7CT2sOmf47Nz9bO1WBtba",
"object": "token", "object": "token",
"card": { "card": {
"id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl", "id": "card_17z7CT2sOmf47Nz9wtWkhGor",
"object": "card", "object": "card",
"address_city": null, "address_city": null,
"address_country": null, "address_country": null,
@ -84,14 +84,104 @@ http_interactions:
"name": null, "name": null,
"tokenization_method": null "tokenization_method": null
}, },
"client_ip": "90.52.157.226", "client_ip": "90.42.87.235",
"created": 1459949397, "created": 1460389421,
"livemode": false, "livemode": false,
"type": "card", "type": "card",
"used": false "used": false
} }
http_version: http_version:
recorded_at: Wed, 06 Apr 2016 13:29:57 GMT recorded_at: Mon, 11 Apr 2016 15:43:41 GMT
- request:
method: get
uri: https://api.stripe.com/v1/tokens/tok_17z7CT2sOmf47Nz9bO1WBtba
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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Mon, 11 Apr 2016 15:43:41 GMT
Content-Type:
- application/json
Content-Length:
- '779'
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_8FcRgivvsrn6Jy
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: UTF-8
string: |
{
"id": "tok_17z7CT2sOmf47Nz9bO1WBtba",
"object": "token",
"card": {
"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",
"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": "90.42.87.235",
"created": 1460389421,
"livemode": false,
"type": "card",
"used": false
}
http_version:
recorded_at: Mon, 11 Apr 2016 15:43:42 GMT
- request: - request:
method: get method: get
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt
@ -111,8 +201,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -121,11 +211,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Wed, 06 Apr 2016 13:29:58 GMT - Mon, 11 Apr 2016 15:43:42 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '2437' - '5571'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -139,111 +229,146 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8Di9uNBvnRw9C0 - req_8FcRWeqA3l7Zyc
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
- max-age=31556926; includeSubDomains - max-age=31556926; includeSubDomains
body: body:
encoding: UTF-8 encoding: ASCII-8BIT
string: | string: !binary |-
{ ewogICJpZCI6ICJjdXNfOERpMXdqZFZrdHY1a3QiLAogICJvYmplY3QiOiAi
"id": "cus_8Di1wjdVktv5kt", Y3VzdG9tZXIiLAogICJhY2NvdW50X2JhbGFuY2UiOiAwLAogICJjcmVhdGVk
"object": "customer", IjogMTQ1OTk0ODg4OCwKICAiY3VycmVuY3kiOiAidXNkIiwKICAiZGVmYXVs
"account_balance": 0, dF9zb3VyY2UiOiAiY2FyZF8xN3haV3Qyc09tZjQ3Tno5ZVZVQ2k1M0EiLAog
"created": 1459948888, ICJkZWxpbnF1ZW50IjogZmFsc2UsCiAgImRlc2NyaXB0aW9uIjogIkplYW4g
"currency": "usd", RHVwb25kIiwKICAiZGlzY291bnQiOiBudWxsLAogICJlbWFpbCI6ICJqZWFu
"default_source": "card_17xGcM2sOmf47Nz9CxYGRvdo", LmR1cG9uZEBnbWFpbC5jb20iLAogICJsaXZlbW9kZSI6IGZhbHNlLAogICJt
"delinquent": false, ZXRhZGF0YSI6IHt9LAogICJzaGlwcGluZyI6IG51bGwsCiAgInNvdXJjZXMi
"description": "Jean Dupond", OiB7CiAgICAib2JqZWN0IjogImxpc3QiLAogICAgImRhdGEiOiBbCiAgICAg
"discount": null, IHsKICAgICAgICAiaWQiOiAiY2FyZF8xN3haV3Qyc09tZjQ3Tno5ZVZVQ2k1
"email": "jean.dupond@gmail.com", M0EiLAogICAgICAgICJvYmplY3QiOiAiY2FyZCIsCiAgICAgICAgImFkZHJl
"livemode": false, c3NfY2l0eSI6IG51bGwsCiAgICAgICAgImFkZHJlc3NfY291bnRyeSI6IG51
"metadata": {}, bGwsCiAgICAgICAgImFkZHJlc3NfbGluZTEiOiBudWxsLAogICAgICAgICJh
"shipping": null, ZGRyZXNzX2xpbmUxX2NoZWNrIjogbnVsbCwKICAgICAgICAiYWRkcmVzc19s
"sources": { aW5lMiI6IG51bGwsCiAgICAgICAgImFkZHJlc3Nfc3RhdGUiOiBudWxsLAog
"object": "list", ICAgICAgICJhZGRyZXNzX3ppcCI6IG51bGwsCiAgICAgICAgImFkZHJlc3Nf
"data": [ emlwX2NoZWNrIjogbnVsbCwKICAgICAgICAiYnJhbmQiOiAiVmlzYSIsCiAg
{ ICAgICAgImNvdW50cnkiOiAiVVMiLAogICAgICAgICJjdXN0b21lciI6ICJj
"id": "card_17xGcM2sOmf47Nz9CxYGRvdo", dXNfOERpMXdqZFZrdHY1a3QiLAogICAgICAgICJjdmNfY2hlY2siOiAicGFz
"object": "card", cyIsCiAgICAgICAgImR5bmFtaWNfbGFzdDQiOiBudWxsLAogICAgICAgICJl
"address_city": null, eHBfbW9udGgiOiA0LAogICAgICAgICJleHBfeWVhciI6IDIwMTcsCiAgICAg
"address_country": null, ICAgImZpbmdlcnByaW50IjogIm81Mmp5YlI3Ym5tTm42QVQiLAogICAgICAg
"address_line1": null, ICJmdW5kaW5nIjogImNyZWRpdCIsCiAgICAgICAgImxhc3Q0IjogIjQyNDIi
"address_line1_check": null, LAogICAgICAgICJtZXRhZGF0YSI6IHt9LAogICAgICAgICJuYW1lIjogbnVs
"address_line2": null, bCwKICAgICAgICAidG9rZW5pemF0aW9uX21ldGhvZCI6IG51bGwKICAgICAg
"address_state": null, fQogICAgXSwKICAgICJoYXNfbW9yZSI6IGZhbHNlLAogICAgInRvdGFsX2Nv
"address_zip": null, dW50IjogMSwKICAgICJ1cmwiOiAiL3YxL2N1c3RvbWVycy9jdXNfOERpMXdq
"address_zip_check": null, ZFZrdHY1a3Qvc291cmNlcyIKICB9LAogICJzdWJzY3JpcHRpb25zIjogewog
"brand": "Visa", ICAgIm9iamVjdCI6ICJsaXN0IiwKICAgICJkYXRhIjogWwogICAgICB7CiAg
"country": "US", ICAgICAgImlkIjogInN1Yl84RTFhZmtUQm4yZGMxRCIsCiAgICAgICAgIm9i
"customer": "cus_8Di1wjdVktv5kt", amVjdCI6ICJzdWJzY3JpcHRpb24iLAogICAgICAgICJhcHBsaWNhdGlvbl9m
"cvc_check": "pass", ZWVfcGVyY2VudCI6IG51bGwsCiAgICAgICAgImNhbmNlbF9hdF9wZXJpb2Rf
"dynamic_last4": null, ZW5kIjogdHJ1ZSwKICAgICAgICAiY2FuY2VsZWRfYXQiOiAxNDYwMDIxNjcw
"exp_month": 4, LAogICAgICAgICJjdXJyZW50X3BlcmlvZF9lbmQiOiAxNDYyNjEzNjY1LAog
"exp_year": 2017, ICAgICAgICJjdXJyZW50X3BlcmlvZF9zdGFydCI6IDE0NjAwMjE2NjUsCiAg
"fingerprint": "o52jybR7bnmNn6AT", ICAgICAgImN1c3RvbWVyIjogImN1c184RGkxd2pkVmt0djVrdCIsCiAgICAg
"funding": "credit", ICAgImRpc2NvdW50IjogbnVsbCwKICAgICAgICAiZW5kZWRfYXQiOiBudWxs
"last4": "4242", LAogICAgICAgICJtZXRhZGF0YSI6IHt9LAogICAgICAgICJwbGFuIjogewog
"metadata": {}, ICAgICAgICAgImlkIjogIm1lbnN1ZWwtdGFyaWYtcmVkdWl0LXN0dWRlbnQt
"name": null, bW9udGgtMjAxNjA0MDQxNzE4MjciLAogICAgICAgICAgIm9iamVjdCI6ICJw
"tokenization_method": null bGFuIiwKICAgICAgICAgICJhbW91bnQiOiAyMDAwLAogICAgICAgICAgImNy
} ZWF0ZWQiOiAxNDU5NzgzMTA4LAogICAgICAgICAgImN1cnJlbmN5IjogInVz
], ZCIsCiAgICAgICAgICAiaW50ZXJ2YWwiOiAibW9udGgiLAogICAgICAgICAg
"has_more": false, ImludGVydmFsX2NvdW50IjogMSwKICAgICAgICAgICJsaXZlbW9kZSI6IGZh
"total_count": 1, bHNlLAogICAgICAgICAgIm1ldGFkYXRhIjoge30sCiAgICAgICAgICAibmFt
"url": "/v1/customers/cus_8Di1wjdVktv5kt/sources" ZSI6ICJNZW5zdWVsIHRhcmlmIHLDqWR1aXQgLSDDqXR1ZGlhbnQsIC0gZGUg
}, MjUgYW5zLCBlbnNlaWduYW50LCBkZW1hbmRldXIgZCdlbXBsb2kgLSBtb250
"subscriptions": { aCIsCiAgICAgICAgICAic3RhdGVtZW50X2Rlc2NyaXB0b3IiOiBudWxsLAog
"object": "list", ICAgICAgICAgInRyaWFsX3BlcmlvZF9kYXlzIjogbnVsbAogICAgICAgIH0s
"data": [ CiAgICAgICAgInF1YW50aXR5IjogMSwKICAgICAgICAic3RhcnQiOiAxNDYw
{ MDIxNjY1LAogICAgICAgICJzdGF0dXMiOiAiYWN0aXZlIiwKICAgICAgICAi
"id": "sub_8Di2VadRvr7A99", dGF4X3BlcmNlbnQiOiBudWxsLAogICAgICAgICJ0cmlhbF9lbmQiOiBudWxs
"object": "subscription", LAogICAgICAgICJ0cmlhbF9zdGFydCI6IG51bGwKICAgICAgfSwKICAgICAg
"application_fee_percent": null, ewogICAgICAgICJpZCI6ICJzdWJfOERrcUJjUjFiUXZyNUciLAogICAgICAg
"cancel_at_period_end": true, ICJvYmplY3QiOiAic3Vic2NyaXB0aW9uIiwKICAgICAgICAiYXBwbGljYXRp
"canceled_at": 1459948972, b25fZmVlX3BlcmNlbnQiOiBudWxsLAogICAgICAgICJjYW5jZWxfYXRfcGVy
"current_period_end": 1462540968, aW9kX2VuZCI6IHRydWUsCiAgICAgICAgImNhbmNlbGVkX2F0IjogMTQ1OTk1
"current_period_start": 1459948968, OTM4NiwKICAgICAgICAiY3VycmVudF9wZXJpb2RfZW5kIjogMTQ2MjU1MTM4
"customer": "cus_8Di1wjdVktv5kt", MiwKICAgICAgICAiY3VycmVudF9wZXJpb2Rfc3RhcnQiOiAxNDU5OTU5Mzgy
"discount": null, LAogICAgICAgICJjdXN0b21lciI6ICJjdXNfOERpMXdqZFZrdHY1a3QiLAog
"ended_at": null, ICAgICAgICJkaXNjb3VudCI6IG51bGwsCiAgICAgICAgImVuZGVkX2F0Ijog
"metadata": {}, bnVsbCwKICAgICAgICAibWV0YWRhdGEiOiB7fSwKICAgICAgICAicGxhbiI6
"plan": { IHsKICAgICAgICAgICJpZCI6ICJtZW5zdWVsLXN0YW5kYXJkLW1vbnRoLTIw
"id": "mensuel-standard-month-20160404171519", MTYwNDA0MTcxNTE5IiwKICAgICAgICAgICJvYmplY3QiOiAicGxhbiIsCiAg
"object": "plan", ICAgICAgICAiYW1vdW50IjogMzAwMCwKICAgICAgICAgICJjcmVhdGVkIjog
"amount": 3000, MTQ1OTc4MjkyMSwKICAgICAgICAgICJjdXJyZW5jeSI6ICJ1c2QiLAogICAg
"created": 1459782921, ICAgICAgImludGVydmFsIjogIm1vbnRoIiwKICAgICAgICAgICJpbnRlcnZh
"currency": "usd", bF9jb3VudCI6IDEsCiAgICAgICAgICAibGl2ZW1vZGUiOiBmYWxzZSwKICAg
"interval": "month", ICAgICAgICJtZXRhZGF0YSI6IHt9LAogICAgICAgICAgIm5hbWUiOiAiTWVu
"interval_count": 1, c3VlbCAtIHN0YW5kYXJkLCBhc3NvY2lhdGlvbiAtIG1vbnRoIiwKICAgICAg
"livemode": false, ICAgICJzdGF0ZW1lbnRfZGVzY3JpcHRvciI6IG51bGwsCiAgICAgICAgICAi
"metadata": {}, dHJpYWxfcGVyaW9kX2RheXMiOiBudWxsCiAgICAgICAgfSwKICAgICAgICAi
"name": "Mensuel - standard, association - month", cXVhbnRpdHkiOiAxLAogICAgICAgICJzdGFydCI6IDE0NTk5NTkzODIsCiAg
"statement_descriptor": null, ICAgICAgInN0YXR1cyI6ICJhY3RpdmUiLAogICAgICAgICJ0YXhfcGVyY2Vu
"trial_period_days": null dCI6IG51bGwsCiAgICAgICAgInRyaWFsX2VuZCI6IG51bGwsCiAgICAgICAg
}, InRyaWFsX3N0YXJ0IjogbnVsbAogICAgICB9LAogICAgICB7CiAgICAgICAg
"quantity": 1, ImlkIjogInN1Yl84RGk5Z3FQTHd0NUlJQyIsCiAgICAgICAgIm9iamVjdCI6
"start": 1459948968, ICJzdWJzY3JpcHRpb24iLAogICAgICAgICJhcHBsaWNhdGlvbl9mZWVfcGVy
"status": "active", Y2VudCI6IG51bGwsCiAgICAgICAgImNhbmNlbF9hdF9wZXJpb2RfZW5kIjog
"tax_percent": null, dHJ1ZSwKICAgICAgICAiY2FuY2VsZWRfYXQiOiAxNDU5OTQ5NDA0LAogICAg
"trial_end": null, ICAgICJjdXJyZW50X3BlcmlvZF9lbmQiOiAxNDYyNTQxMzk5LAogICAgICAg
"trial_start": null ICJjdXJyZW50X3BlcmlvZF9zdGFydCI6IDE0NTk5NDkzOTksCiAgICAgICAg
} ImN1c3RvbWVyIjogImN1c184RGkxd2pkVmt0djVrdCIsCiAgICAgICAgImRp
], c2NvdW50IjogbnVsbCwKICAgICAgICAiZW5kZWRfYXQiOiBudWxsLAogICAg
"has_more": false, ICAgICJtZXRhZGF0YSI6IHt9LAogICAgICAgICJwbGFuIjogewogICAgICAg
"total_count": 1, ICAgImlkIjogIm1lbnN1ZWwtc3RhbmRhcmQtbW9udGgtMjAxNjA0MDQxNzE1
"url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions" MTkiLAogICAgICAgICAgIm9iamVjdCI6ICJwbGFuIiwKICAgICAgICAgICJh
} bW91bnQiOiAzMDAwLAogICAgICAgICAgImNyZWF0ZWQiOiAxNDU5NzgyOTIx
} LAogICAgICAgICAgImN1cnJlbmN5IjogInVzZCIsCiAgICAgICAgICAiaW50
ZXJ2YWwiOiAibW9udGgiLAogICAgICAgICAgImludGVydmFsX2NvdW50Ijog
MSwKICAgICAgICAgICJsaXZlbW9kZSI6IGZhbHNlLAogICAgICAgICAgIm1l
dGFkYXRhIjoge30sCiAgICAgICAgICAibmFtZSI6ICJNZW5zdWVsIC0gc3Rh
bmRhcmQsIGFzc29jaWF0aW9uIC0gbW9udGgiLAogICAgICAgICAgInN0YXRl
bWVudF9kZXNjcmlwdG9yIjogbnVsbCwKICAgICAgICAgICJ0cmlhbF9wZXJp
b2RfZGF5cyI6IG51bGwKICAgICAgICB9LAogICAgICAgICJxdWFudGl0eSI6
IDEsCiAgICAgICAgInN0YXJ0IjogMTQ1OTk0OTM5OSwKICAgICAgICAic3Rh
dHVzIjogImFjdGl2ZSIsCiAgICAgICAgInRheF9wZXJjZW50IjogbnVsbCwK
ICAgICAgICAidHJpYWxfZW5kIjogbnVsbCwKICAgICAgICAidHJpYWxfc3Rh
cnQiOiBudWxsCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiaWQiOiAic3Vi
XzhEaTJWYWRSdnI3QTk5IiwKICAgICAgICAib2JqZWN0IjogInN1YnNjcmlw
dGlvbiIsCiAgICAgICAgImFwcGxpY2F0aW9uX2ZlZV9wZXJjZW50IjogbnVs
bCwKICAgICAgICAiY2FuY2VsX2F0X3BlcmlvZF9lbmQiOiB0cnVlLAogICAg
ICAgICJjYW5jZWxlZF9hdCI6IDE0NTk5NDg5NzIsCiAgICAgICAgImN1cnJl
bnRfcGVyaW9kX2VuZCI6IDE0NjI1NDA5NjgsCiAgICAgICAgImN1cnJlbnRf
cGVyaW9kX3N0YXJ0IjogMTQ1OTk0ODk2OCwKICAgICAgICAiY3VzdG9tZXIi
OiAiY3VzXzhEaTF3amRWa3R2NWt0IiwKICAgICAgICAiZGlzY291bnQiOiBu
dWxsLAogICAgICAgICJlbmRlZF9hdCI6IG51bGwsCiAgICAgICAgIm1ldGFk
YXRhIjoge30sCiAgICAgICAgInBsYW4iOiB7CiAgICAgICAgICAiaWQiOiAi
bWVuc3VlbC1zdGFuZGFyZC1tb250aC0yMDE2MDQwNDE3MTUxOSIsCiAgICAg
ICAgICAib2JqZWN0IjogInBsYW4iLAogICAgICAgICAgImFtb3VudCI6IDMw
MDAsCiAgICAgICAgICAiY3JlYXRlZCI6IDE0NTk3ODI5MjEsCiAgICAgICAg
ICAiY3VycmVuY3kiOiAidXNkIiwKICAgICAgICAgICJpbnRlcnZhbCI6ICJt
b250aCIsCiAgICAgICAgICAiaW50ZXJ2YWxfY291bnQiOiAxLAogICAgICAg
ICAgImxpdmVtb2RlIjogZmFsc2UsCiAgICAgICAgICAibWV0YWRhdGEiOiB7
fSwKICAgICAgICAgICJuYW1lIjogIk1lbnN1ZWwgLSBzdGFuZGFyZCwgYXNz
b2NpYXRpb24gLSBtb250aCIsCiAgICAgICAgICAic3RhdGVtZW50X2Rlc2Ny
aXB0b3IiOiBudWxsLAogICAgICAgICAgInRyaWFsX3BlcmlvZF9kYXlzIjog
bnVsbAogICAgICAgIH0sCiAgICAgICAgInF1YW50aXR5IjogMSwKICAgICAg
ICAic3RhcnQiOiAxNDU5OTQ4OTY4LAogICAgICAgICJzdGF0dXMiOiAiYWN0
aXZlIiwKICAgICAgICAidGF4X3BlcmNlbnQiOiBudWxsLAogICAgICAgICJ0
cmlhbF9lbmQiOiBudWxsLAogICAgICAgICJ0cmlhbF9zdGFydCI6IG51bGwK
ICAgICAgfQogICAgXSwKICAgICJoYXNfbW9yZSI6IGZhbHNlLAogICAgInRv
dGFsX2NvdW50IjogNCwKICAgICJ1cmwiOiAiL3YxL2N1c3RvbWVycy9jdXNf
OERpMXdqZFZrdHY1a3Qvc3Vic2NyaXB0aW9ucyIKICB9Cn0K
http_version: http_version:
recorded_at: Wed, 06 Apr 2016 13:29:58 GMT recorded_at: Mon, 11 Apr 2016 15:43:42 GMT
- request: - request:
method: post method: post
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/subscriptions uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/subscriptions
body: body:
encoding: UTF-8 encoding: UTF-8
string: plan=mensuel-standard-month-20160404171519&card=tok_17xGjJ2sOmf47Nz9PLqUZge2 string: plan=mensuel-standard-month-20160404171519&card=tok_17z7CT2sOmf47Nz9bO1WBtba
headers: headers:
Accept: Accept:
- "*/*; q=0.5, application/xml" - "*/*; q=0.5, application/xml"
@ -257,8 +382,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
Content-Length: Content-Length:
- '76' - '76'
response: response:
@ -269,7 +394,7 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Wed, 06 Apr 2016 13:29:59 GMT - Mon, 11 Apr 2016 15:43:44 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
@ -287,7 +412,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8Di9LpzecLQFba - req_8FcRItYpDN04OA
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -296,13 +421,13 @@ http_interactions:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{ {
"id": "sub_8Di9gqPLwt5IIC", "id": "sub_8FcRar5XrAGnL0",
"object": "subscription", "object": "subscription",
"application_fee_percent": null, "application_fee_percent": null,
"cancel_at_period_end": false, "cancel_at_period_end": false,
"canceled_at": null, "canceled_at": null,
"current_period_end": 1462541399, "current_period_end": 1462981423,
"current_period_start": 1459949399, "current_period_start": 1460389423,
"customer": "cus_8Di1wjdVktv5kt", "customer": "cus_8Di1wjdVktv5kt",
"discount": null, "discount": null,
"ended_at": null, "ended_at": null,
@ -322,14 +447,14 @@ http_interactions:
"trial_period_days": null "trial_period_days": null
}, },
"quantity": 1, "quantity": 1,
"start": 1459949399, "start": 1460389423,
"status": "active", "status": "active",
"tax_percent": null, "tax_percent": null,
"trial_end": null, "trial_end": null,
"trial_start": null "trial_start": null
} }
http_version: http_version:
recorded_at: Wed, 06 Apr 2016 13:29:59 GMT recorded_at: Mon, 11 Apr 2016 15:43:44 GMT
- request: - request:
method: get method: get
uri: https://api.stripe.com/v1/invoices?customer=cus_8Di1wjdVktv5kt&limit=1 uri: https://api.stripe.com/v1/invoices?customer=cus_8Di1wjdVktv5kt&limit=1
@ -349,8 +474,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -359,7 +484,7 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Wed, 06 Apr 2016 13:30:00 GMT - Mon, 11 Apr 2016 15:43:47 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
@ -377,7 +502,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8Di9FX8V833C25 - req_8FcRkV7kaP4d74
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -389,17 +514,17 @@ http_interactions:
"object": "list", "object": "list",
"data": [ "data": [
{ {
"id": "in_17xGjL2sOmf47Nz976QQJRnZ", "id": "in_17z7CV2sOmf47Nz9GowUoPMG",
"object": "invoice", "object": "invoice",
"amount_due": 3000, "amount_due": 3000,
"application_fee": null, "application_fee": null,
"attempt_count": 1, "attempt_count": 1,
"attempted": true, "attempted": true,
"charge": "ch_17xGjL2sOmf47Nz9H8wfSmBa", "charge": "ch_17z7CV2sOmf47Nz9v4oKnmLc",
"closed": true, "closed": true,
"currency": "usd", "currency": "usd",
"customer": "cus_8Di1wjdVktv5kt", "customer": "cus_8Di1wjdVktv5kt",
"date": 1459949399, "date": 1460389423,
"description": null, "description": null,
"discount": null, "discount": null,
"ending_balance": 0, "ending_balance": 0,
@ -408,7 +533,7 @@ http_interactions:
"object": "list", "object": "list",
"data": [ "data": [
{ {
"id": "sub_8Di9gqPLwt5IIC", "id": "sub_8FcRar5XrAGnL0",
"object": "line_item", "object": "line_item",
"amount": 3000, "amount": 3000,
"currency": "usd", "currency": "usd",
@ -417,8 +542,8 @@ http_interactions:
"livemode": false, "livemode": false,
"metadata": {}, "metadata": {},
"period": { "period": {
"start": 1459949399, "start": 1460389423,
"end": 1462541399 "end": 1462981423
}, },
"plan": { "plan": {
"id": "mensuel-standard-month-20160404171519", "id": "mensuel-standard-month-20160404171519",
@ -442,30 +567,30 @@ http_interactions:
], ],
"has_more": false, "has_more": false,
"total_count": 1, "total_count": 1,
"url": "/v1/invoices/in_17xGjL2sOmf47Nz976QQJRnZ/lines" "url": "/v1/invoices/in_17z7CV2sOmf47Nz9GowUoPMG/lines"
}, },
"livemode": false, "livemode": false,
"metadata": {}, "metadata": {},
"next_payment_attempt": null, "next_payment_attempt": null,
"paid": true, "paid": true,
"period_end": 1459949399, "period_end": 1460389423,
"period_start": 1459948968, "period_start": 1459948968,
"receipt_number": null, "receipt_number": null,
"starting_balance": 0, "starting_balance": 0,
"statement_descriptor": null, "statement_descriptor": null,
"subscription": "sub_8Di9gqPLwt5IIC", "subscription": "sub_8FcRar5XrAGnL0",
"subtotal": 3000, "subtotal": 3000,
"tax": null, "tax": null,
"tax_percent": null, "tax_percent": null,
"total": 3000, "total": 3000,
"webhooks_delivered_at": 1459949399 "webhooks_delivered_at": 1460389424
} }
], ],
"has_more": true, "has_more": true,
"url": "/v1/invoices" "url": "/v1/invoices"
} }
http_version: http_version:
recorded_at: Wed, 06 Apr 2016 13:30:00 GMT recorded_at: Mon, 11 Apr 2016 15:43:47 GMT
- request: - request:
method: get method: get
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt
@ -485,8 +610,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -495,11 +620,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Wed, 06 Apr 2016 13:30:02 GMT - Mon, 11 Apr 2016 15:43:48 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '3457' - '6591'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -513,141 +638,166 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8Di9aIVqbT9ubZ - req_8FcRzywC1ZKG1q
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
- max-age=31556926; includeSubDomains - max-age=31556926; includeSubDomains
body: body:
encoding: UTF-8 encoding: ASCII-8BIT
string: | string: !binary |-
{ ewogICJpZCI6ICJjdXNfOERpMXdqZFZrdHY1a3QiLAogICJvYmplY3QiOiAi
"id": "cus_8Di1wjdVktv5kt", Y3VzdG9tZXIiLAogICJhY2NvdW50X2JhbGFuY2UiOiAwLAogICJjcmVhdGVk
"object": "customer", IjogMTQ1OTk0ODg4OCwKICAiY3VycmVuY3kiOiAidXNkIiwKICAiZGVmYXVs
"account_balance": 0, dF9zb3VyY2UiOiAiY2FyZF8xN3o3Q1Qyc09tZjQ3Tno5d3RXa2hHb3IiLAog
"created": 1459948888, ICJkZWxpbnF1ZW50IjogZmFsc2UsCiAgImRlc2NyaXB0aW9uIjogIkplYW4g
"currency": "usd", RHVwb25kIiwKICAiZGlzY291bnQiOiBudWxsLAogICJlbWFpbCI6ICJqZWFu
"default_source": "card_17xGjJ2sOmf47Nz9UrQOP8Cl", LmR1cG9uZEBnbWFpbC5jb20iLAogICJsaXZlbW9kZSI6IGZhbHNlLAogICJt
"delinquent": false, ZXRhZGF0YSI6IHt9LAogICJzaGlwcGluZyI6IG51bGwsCiAgInNvdXJjZXMi
"description": "Jean Dupond", OiB7CiAgICAib2JqZWN0IjogImxpc3QiLAogICAgImRhdGEiOiBbCiAgICAg
"discount": null, IHsKICAgICAgICAiaWQiOiAiY2FyZF8xN3o3Q1Qyc09tZjQ3Tno5d3RXa2hH
"email": "jean.dupond@gmail.com", b3IiLAogICAgICAgICJvYmplY3QiOiAiY2FyZCIsCiAgICAgICAgImFkZHJl
"livemode": false, c3NfY2l0eSI6IG51bGwsCiAgICAgICAgImFkZHJlc3NfY291bnRyeSI6IG51
"metadata": {}, bGwsCiAgICAgICAgImFkZHJlc3NfbGluZTEiOiBudWxsLAogICAgICAgICJh
"shipping": null, ZGRyZXNzX2xpbmUxX2NoZWNrIjogbnVsbCwKICAgICAgICAiYWRkcmVzc19s
"sources": { aW5lMiI6IG51bGwsCiAgICAgICAgImFkZHJlc3Nfc3RhdGUiOiBudWxsLAog
"object": "list", ICAgICAgICJhZGRyZXNzX3ppcCI6IG51bGwsCiAgICAgICAgImFkZHJlc3Nf
"data": [ emlwX2NoZWNrIjogbnVsbCwKICAgICAgICAiYnJhbmQiOiAiVmlzYSIsCiAg
{ ICAgICAgImNvdW50cnkiOiAiVVMiLAogICAgICAgICJjdXN0b21lciI6ICJj
"id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl", dXNfOERpMXdqZFZrdHY1a3QiLAogICAgICAgICJjdmNfY2hlY2siOiAicGFz
"object": "card", cyIsCiAgICAgICAgImR5bmFtaWNfbGFzdDQiOiBudWxsLAogICAgICAgICJl
"address_city": null, eHBfbW9udGgiOiA0LAogICAgICAgICJleHBfeWVhciI6IDIwMTcsCiAgICAg
"address_country": null, ICAgImZpbmdlcnByaW50IjogIm81Mmp5YlI3Ym5tTm42QVQiLAogICAgICAg
"address_line1": null, ICJmdW5kaW5nIjogImNyZWRpdCIsCiAgICAgICAgImxhc3Q0IjogIjQyNDIi
"address_line1_check": null, LAogICAgICAgICJtZXRhZGF0YSI6IHt9LAogICAgICAgICJuYW1lIjogbnVs
"address_line2": null, bCwKICAgICAgICAidG9rZW5pemF0aW9uX21ldGhvZCI6IG51bGwKICAgICAg
"address_state": null, fQogICAgXSwKICAgICJoYXNfbW9yZSI6IGZhbHNlLAogICAgInRvdGFsX2Nv
"address_zip": null, dW50IjogMSwKICAgICJ1cmwiOiAiL3YxL2N1c3RvbWVycy9jdXNfOERpMXdq
"address_zip_check": null, ZFZrdHY1a3Qvc291cmNlcyIKICB9LAogICJzdWJzY3JpcHRpb25zIjogewog
"brand": "Visa", ICAgIm9iamVjdCI6ICJsaXN0IiwKICAgICJkYXRhIjogWwogICAgICB7CiAg
"country": "US", ICAgICAgImlkIjogInN1Yl84RmNSYXI1WHJBR25MMCIsCiAgICAgICAgIm9i
"customer": "cus_8Di1wjdVktv5kt", amVjdCI6ICJzdWJzY3JpcHRpb24iLAogICAgICAgICJhcHBsaWNhdGlvbl9m
"cvc_check": "pass", ZWVfcGVyY2VudCI6IG51bGwsCiAgICAgICAgImNhbmNlbF9hdF9wZXJpb2Rf
"dynamic_last4": null, ZW5kIjogZmFsc2UsCiAgICAgICAgImNhbmNlbGVkX2F0IjogbnVsbCwKICAg
"exp_month": 4, ICAgICAiY3VycmVudF9wZXJpb2RfZW5kIjogMTQ2Mjk4MTQyMywKICAgICAg
"exp_year": 2017, ICAiY3VycmVudF9wZXJpb2Rfc3RhcnQiOiAxNDYwMzg5NDIzLAogICAgICAg
"fingerprint": "o52jybR7bnmNn6AT", ICJjdXN0b21lciI6ICJjdXNfOERpMXdqZFZrdHY1a3QiLAogICAgICAgICJk
"funding": "credit", aXNjb3VudCI6IG51bGwsCiAgICAgICAgImVuZGVkX2F0IjogbnVsbCwKICAg
"last4": "4242", ICAgICAibWV0YWRhdGEiOiB7fSwKICAgICAgICAicGxhbiI6IHsKICAgICAg
"metadata": {}, ICAgICJpZCI6ICJtZW5zdWVsLXN0YW5kYXJkLW1vbnRoLTIwMTYwNDA0MTcx
"name": null, NTE5IiwKICAgICAgICAgICJvYmplY3QiOiAicGxhbiIsCiAgICAgICAgICAi
"tokenization_method": null YW1vdW50IjogMzAwMCwKICAgICAgICAgICJjcmVhdGVkIjogMTQ1OTc4Mjky
} MSwKICAgICAgICAgICJjdXJyZW5jeSI6ICJ1c2QiLAogICAgICAgICAgImlu
], dGVydmFsIjogIm1vbnRoIiwKICAgICAgICAgICJpbnRlcnZhbF9jb3VudCI6
"has_more": false, IDEsCiAgICAgICAgICAibGl2ZW1vZGUiOiBmYWxzZSwKICAgICAgICAgICJt
"total_count": 1, ZXRhZGF0YSI6IHt9LAogICAgICAgICAgIm5hbWUiOiAiTWVuc3VlbCAtIHN0
"url": "/v1/customers/cus_8Di1wjdVktv5kt/sources" YW5kYXJkLCBhc3NvY2lhdGlvbiAtIG1vbnRoIiwKICAgICAgICAgICJzdGF0
}, ZW1lbnRfZGVzY3JpcHRvciI6IG51bGwsCiAgICAgICAgICAidHJpYWxfcGVy
"subscriptions": { aW9kX2RheXMiOiBudWxsCiAgICAgICAgfSwKICAgICAgICAicXVhbnRpdHki
"object": "list", OiAxLAogICAgICAgICJzdGFydCI6IDE0NjAzODk0MjMsCiAgICAgICAgInN0
"data": [ YXR1cyI6ICJhY3RpdmUiLAogICAgICAgICJ0YXhfcGVyY2VudCI6IG51bGws
{ CiAgICAgICAgInRyaWFsX2VuZCI6IG51bGwsCiAgICAgICAgInRyaWFsX3N0
"id": "sub_8Di9gqPLwt5IIC", YXJ0IjogbnVsbAogICAgICB9LAogICAgICB7CiAgICAgICAgImlkIjogInN1
"object": "subscription", Yl84RTFhZmtUQm4yZGMxRCIsCiAgICAgICAgIm9iamVjdCI6ICJzdWJzY3Jp
"application_fee_percent": null, cHRpb24iLAogICAgICAgICJhcHBsaWNhdGlvbl9mZWVfcGVyY2VudCI6IG51
"cancel_at_period_end": false, bGwsCiAgICAgICAgImNhbmNlbF9hdF9wZXJpb2RfZW5kIjogdHJ1ZSwKICAg
"canceled_at": null, ICAgICAiY2FuY2VsZWRfYXQiOiAxNDYwMDIxNjcwLAogICAgICAgICJjdXJy
"current_period_end": 1462541399, ZW50X3BlcmlvZF9lbmQiOiAxNDYyNjEzNjY1LAogICAgICAgICJjdXJyZW50
"current_period_start": 1459949399, X3BlcmlvZF9zdGFydCI6IDE0NjAwMjE2NjUsCiAgICAgICAgImN1c3RvbWVy
"customer": "cus_8Di1wjdVktv5kt", IjogImN1c184RGkxd2pkVmt0djVrdCIsCiAgICAgICAgImRpc2NvdW50Ijog
"discount": null, bnVsbCwKICAgICAgICAiZW5kZWRfYXQiOiBudWxsLAogICAgICAgICJtZXRh
"ended_at": null, ZGF0YSI6IHt9LAogICAgICAgICJwbGFuIjogewogICAgICAgICAgImlkIjog
"metadata": {}, Im1lbnN1ZWwtdGFyaWYtcmVkdWl0LXN0dWRlbnQtbW9udGgtMjAxNjA0MDQx
"plan": { NzE4MjciLAogICAgICAgICAgIm9iamVjdCI6ICJwbGFuIiwKICAgICAgICAg
"id": "mensuel-standard-month-20160404171519", ICJhbW91bnQiOiAyMDAwLAogICAgICAgICAgImNyZWF0ZWQiOiAxNDU5Nzgz
"object": "plan", MTA4LAogICAgICAgICAgImN1cnJlbmN5IjogInVzZCIsCiAgICAgICAgICAi
"amount": 3000, aW50ZXJ2YWwiOiAibW9udGgiLAogICAgICAgICAgImludGVydmFsX2NvdW50
"created": 1459782921, IjogMSwKICAgICAgICAgICJsaXZlbW9kZSI6IGZhbHNlLAogICAgICAgICAg
"currency": "usd", Im1ldGFkYXRhIjoge30sCiAgICAgICAgICAibmFtZSI6ICJNZW5zdWVsIHRh
"interval": "month", cmlmIHLDqWR1aXQgLSDDqXR1ZGlhbnQsIC0gZGUgMjUgYW5zLCBlbnNlaWdu
"interval_count": 1, YW50LCBkZW1hbmRldXIgZCdlbXBsb2kgLSBtb250aCIsCiAgICAgICAgICAi
"livemode": false, c3RhdGVtZW50X2Rlc2NyaXB0b3IiOiBudWxsLAogICAgICAgICAgInRyaWFs
"metadata": {}, X3BlcmlvZF9kYXlzIjogbnVsbAogICAgICAgIH0sCiAgICAgICAgInF1YW50
"name": "Mensuel - standard, association - month", aXR5IjogMSwKICAgICAgICAic3RhcnQiOiAxNDYwMDIxNjY1LAogICAgICAg
"statement_descriptor": null, ICJzdGF0dXMiOiAiYWN0aXZlIiwKICAgICAgICAidGF4X3BlcmNlbnQiOiBu
"trial_period_days": null dWxsLAogICAgICAgICJ0cmlhbF9lbmQiOiBudWxsLAogICAgICAgICJ0cmlh
}, bF9zdGFydCI6IG51bGwKICAgICAgfSwKICAgICAgewogICAgICAgICJpZCI6
"quantity": 1, ICJzdWJfOERrcUJjUjFiUXZyNUciLAogICAgICAgICJvYmplY3QiOiAic3Vi
"start": 1459949399, c2NyaXB0aW9uIiwKICAgICAgICAiYXBwbGljYXRpb25fZmVlX3BlcmNlbnQi
"status": "active", OiBudWxsLAogICAgICAgICJjYW5jZWxfYXRfcGVyaW9kX2VuZCI6IHRydWUs
"tax_percent": null, CiAgICAgICAgImNhbmNlbGVkX2F0IjogMTQ1OTk1OTM4NiwKICAgICAgICAi
"trial_end": null, Y3VycmVudF9wZXJpb2RfZW5kIjogMTQ2MjU1MTM4MiwKICAgICAgICAiY3Vy
"trial_start": null cmVudF9wZXJpb2Rfc3RhcnQiOiAxNDU5OTU5MzgyLAogICAgICAgICJjdXN0
}, b21lciI6ICJjdXNfOERpMXdqZFZrdHY1a3QiLAogICAgICAgICJkaXNjb3Vu
{ dCI6IG51bGwsCiAgICAgICAgImVuZGVkX2F0IjogbnVsbCwKICAgICAgICAi
"id": "sub_8Di2VadRvr7A99", bWV0YWRhdGEiOiB7fSwKICAgICAgICAicGxhbiI6IHsKICAgICAgICAgICJp
"object": "subscription", ZCI6ICJtZW5zdWVsLXN0YW5kYXJkLW1vbnRoLTIwMTYwNDA0MTcxNTE5IiwK
"application_fee_percent": null, ICAgICAgICAgICJvYmplY3QiOiAicGxhbiIsCiAgICAgICAgICAiYW1vdW50
"cancel_at_period_end": true, IjogMzAwMCwKICAgICAgICAgICJjcmVhdGVkIjogMTQ1OTc4MjkyMSwKICAg
"canceled_at": 1459948972, ICAgICAgICJjdXJyZW5jeSI6ICJ1c2QiLAogICAgICAgICAgImludGVydmFs
"current_period_end": 1462540968, IjogIm1vbnRoIiwKICAgICAgICAgICJpbnRlcnZhbF9jb3VudCI6IDEsCiAg
"current_period_start": 1459948968, ICAgICAgICAibGl2ZW1vZGUiOiBmYWxzZSwKICAgICAgICAgICJtZXRhZGF0
"customer": "cus_8Di1wjdVktv5kt", YSI6IHt9LAogICAgICAgICAgIm5hbWUiOiAiTWVuc3VlbCAtIHN0YW5kYXJk
"discount": null, LCBhc3NvY2lhdGlvbiAtIG1vbnRoIiwKICAgICAgICAgICJzdGF0ZW1lbnRf
"ended_at": null, ZGVzY3JpcHRvciI6IG51bGwsCiAgICAgICAgICAidHJpYWxfcGVyaW9kX2Rh
"metadata": {}, eXMiOiBudWxsCiAgICAgICAgfSwKICAgICAgICAicXVhbnRpdHkiOiAxLAog
"plan": { ICAgICAgICJzdGFydCI6IDE0NTk5NTkzODIsCiAgICAgICAgInN0YXR1cyI6
"id": "mensuel-standard-month-20160404171519", ICJhY3RpdmUiLAogICAgICAgICJ0YXhfcGVyY2VudCI6IG51bGwsCiAgICAg
"object": "plan", ICAgInRyaWFsX2VuZCI6IG51bGwsCiAgICAgICAgInRyaWFsX3N0YXJ0Ijog
"amount": 3000, bnVsbAogICAgICB9LAogICAgICB7CiAgICAgICAgImlkIjogInN1Yl84RGk5
"created": 1459782921, Z3FQTHd0NUlJQyIsCiAgICAgICAgIm9iamVjdCI6ICJzdWJzY3JpcHRpb24i
"currency": "usd", LAogICAgICAgICJhcHBsaWNhdGlvbl9mZWVfcGVyY2VudCI6IG51bGwsCiAg
"interval": "month", ICAgICAgImNhbmNlbF9hdF9wZXJpb2RfZW5kIjogdHJ1ZSwKICAgICAgICAi
"interval_count": 1, Y2FuY2VsZWRfYXQiOiAxNDU5OTQ5NDA0LAogICAgICAgICJjdXJyZW50X3Bl
"livemode": false, cmlvZF9lbmQiOiAxNDYyNTQxMzk5LAogICAgICAgICJjdXJyZW50X3Blcmlv
"metadata": {}, ZF9zdGFydCI6IDE0NTk5NDkzOTksCiAgICAgICAgImN1c3RvbWVyIjogImN1
"name": "Mensuel - standard, association - month", c184RGkxd2pkVmt0djVrdCIsCiAgICAgICAgImRpc2NvdW50IjogbnVsbCwK
"statement_descriptor": null, ICAgICAgICAiZW5kZWRfYXQiOiBudWxsLAogICAgICAgICJtZXRhZGF0YSI6
"trial_period_days": null IHt9LAogICAgICAgICJwbGFuIjogewogICAgICAgICAgImlkIjogIm1lbnN1
}, ZWwtc3RhbmRhcmQtbW9udGgtMjAxNjA0MDQxNzE1MTkiLAogICAgICAgICAg
"quantity": 1, Im9iamVjdCI6ICJwbGFuIiwKICAgICAgICAgICJhbW91bnQiOiAzMDAwLAog
"start": 1459948968, ICAgICAgICAgImNyZWF0ZWQiOiAxNDU5NzgyOTIxLAogICAgICAgICAgImN1
"status": "active", cnJlbmN5IjogInVzZCIsCiAgICAgICAgICAiaW50ZXJ2YWwiOiAibW9udGgi
"tax_percent": null, LAogICAgICAgICAgImludGVydmFsX2NvdW50IjogMSwKICAgICAgICAgICJs
"trial_end": null, aXZlbW9kZSI6IGZhbHNlLAogICAgICAgICAgIm1ldGFkYXRhIjoge30sCiAg
"trial_start": null ICAgICAgICAibmFtZSI6ICJNZW5zdWVsIC0gc3RhbmRhcmQsIGFzc29jaWF0
} aW9uIC0gbW9udGgiLAogICAgICAgICAgInN0YXRlbWVudF9kZXNjcmlwdG9y
], IjogbnVsbCwKICAgICAgICAgICJ0cmlhbF9wZXJpb2RfZGF5cyI6IG51bGwK
"has_more": false, ICAgICAgICB9LAogICAgICAgICJxdWFudGl0eSI6IDEsCiAgICAgICAgInN0
"total_count": 2, YXJ0IjogMTQ1OTk0OTM5OSwKICAgICAgICAic3RhdHVzIjogImFjdGl2ZSIs
"url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions" CiAgICAgICAgInRheF9wZXJjZW50IjogbnVsbCwKICAgICAgICAidHJpYWxf
} ZW5kIjogbnVsbCwKICAgICAgICAidHJpYWxfc3RhcnQiOiBudWxsCiAgICAg
} IH0sCiAgICAgIHsKICAgICAgICAiaWQiOiAic3ViXzhEaTJWYWRSdnI3QTk5
IiwKICAgICAgICAib2JqZWN0IjogInN1YnNjcmlwdGlvbiIsCiAgICAgICAg
ImFwcGxpY2F0aW9uX2ZlZV9wZXJjZW50IjogbnVsbCwKICAgICAgICAiY2Fu
Y2VsX2F0X3BlcmlvZF9lbmQiOiB0cnVlLAogICAgICAgICJjYW5jZWxlZF9h
dCI6IDE0NTk5NDg5NzIsCiAgICAgICAgImN1cnJlbnRfcGVyaW9kX2VuZCI6
IDE0NjI1NDA5NjgsCiAgICAgICAgImN1cnJlbnRfcGVyaW9kX3N0YXJ0Ijog
MTQ1OTk0ODk2OCwKICAgICAgICAiY3VzdG9tZXIiOiAiY3VzXzhEaTF3amRW
a3R2NWt0IiwKICAgICAgICAiZGlzY291bnQiOiBudWxsLAogICAgICAgICJl
bmRlZF9hdCI6IG51bGwsCiAgICAgICAgIm1ldGFkYXRhIjoge30sCiAgICAg
ICAgInBsYW4iOiB7CiAgICAgICAgICAiaWQiOiAibWVuc3VlbC1zdGFuZGFy
ZC1tb250aC0yMDE2MDQwNDE3MTUxOSIsCiAgICAgICAgICAib2JqZWN0Ijog
InBsYW4iLAogICAgICAgICAgImFtb3VudCI6IDMwMDAsCiAgICAgICAgICAi
Y3JlYXRlZCI6IDE0NTk3ODI5MjEsCiAgICAgICAgICAiY3VycmVuY3kiOiAi
dXNkIiwKICAgICAgICAgICJpbnRlcnZhbCI6ICJtb250aCIsCiAgICAgICAg
ICAiaW50ZXJ2YWxfY291bnQiOiAxLAogICAgICAgICAgImxpdmVtb2RlIjog
ZmFsc2UsCiAgICAgICAgICAibWV0YWRhdGEiOiB7fSwKICAgICAgICAgICJu
YW1lIjogIk1lbnN1ZWwgLSBzdGFuZGFyZCwgYXNzb2NpYXRpb24gLSBtb250
aCIsCiAgICAgICAgICAic3RhdGVtZW50X2Rlc2NyaXB0b3IiOiBudWxsLAog
ICAgICAgICAgInRyaWFsX3BlcmlvZF9kYXlzIjogbnVsbAogICAgICAgIH0s
CiAgICAgICAgInF1YW50aXR5IjogMSwKICAgICAgICAic3RhcnQiOiAxNDU5
OTQ4OTY4LAogICAgICAgICJzdGF0dXMiOiAiYWN0aXZlIiwKICAgICAgICAi
dGF4X3BlcmNlbnQiOiBudWxsLAogICAgICAgICJ0cmlhbF9lbmQiOiBudWxs
LAogICAgICAgICJ0cmlhbF9zdGFydCI6IG51bGwKICAgICAgfQogICAgXSwK
ICAgICJoYXNfbW9yZSI6IGZhbHNlLAogICAgInRvdGFsX2NvdW50IjogNSwK
ICAgICJ1cmwiOiAiL3YxL2N1c3RvbWVycy9jdXNfOERpMXdqZFZrdHY1a3Qv
c3Vic2NyaXB0aW9ucyIKICB9Cn0K
http_version: http_version:
recorded_at: Wed, 06 Apr 2016 13:30:02 GMT recorded_at: Mon, 11 Apr 2016 15:43:48 GMT
- request: - request:
method: get method: get
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/subscriptions/sub_8Di9gqPLwt5IIC uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/subscriptions/sub_8FcRar5XrAGnL0
body: body:
encoding: US-ASCII encoding: US-ASCII
string: '' string: ''
@ -664,8 +814,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -674,7 +824,7 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Wed, 06 Apr 2016 13:30:03 GMT - Mon, 11 Apr 2016 15:43:48 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
@ -692,7 +842,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8Di9AyPG0FJYAw - req_8FcRg1EQDVfpku
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -701,13 +851,13 @@ http_interactions:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{ {
"id": "sub_8Di9gqPLwt5IIC", "id": "sub_8FcRar5XrAGnL0",
"object": "subscription", "object": "subscription",
"application_fee_percent": null, "application_fee_percent": null,
"cancel_at_period_end": false, "cancel_at_period_end": false,
"canceled_at": null, "canceled_at": null,
"current_period_end": 1462541399, "current_period_end": 1462981423,
"current_period_start": 1459949399, "current_period_start": 1460389423,
"customer": "cus_8Di1wjdVktv5kt", "customer": "cus_8Di1wjdVktv5kt",
"discount": null, "discount": null,
"ended_at": null, "ended_at": null,
@ -727,17 +877,17 @@ http_interactions:
"trial_period_days": null "trial_period_days": null
}, },
"quantity": 1, "quantity": 1,
"start": 1459949399, "start": 1460389423,
"status": "active", "status": "active",
"tax_percent": null, "tax_percent": null,
"trial_end": null, "trial_end": null,
"trial_start": null "trial_start": null
} }
http_version: http_version:
recorded_at: Wed, 06 Apr 2016 13:30:03 GMT recorded_at: Mon, 11 Apr 2016 15:43:49 GMT
- request: - request:
method: delete method: delete
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/subscriptions/sub_8Di9gqPLwt5IIC?at_period_end=true uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/subscriptions/sub_8FcRar5XrAGnL0?at_period_end=true
body: body:
encoding: US-ASCII encoding: US-ASCII
string: '' string: ''
@ -754,8 +904,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -764,7 +914,7 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Wed, 06 Apr 2016 13:30:04 GMT - Mon, 11 Apr 2016 15:43:49 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
@ -782,7 +932,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8Di9ujL9MyuuZS - req_8FcRvdzGhluZiD
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -791,13 +941,13 @@ http_interactions:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{ {
"id": "sub_8Di9gqPLwt5IIC", "id": "sub_8FcRar5XrAGnL0",
"object": "subscription", "object": "subscription",
"application_fee_percent": null, "application_fee_percent": null,
"cancel_at_period_end": true, "cancel_at_period_end": true,
"canceled_at": 1459949404, "canceled_at": 1460389429,
"current_period_end": 1462541399, "current_period_end": 1462981423,
"current_period_start": 1459949399, "current_period_start": 1460389423,
"customer": "cus_8Di1wjdVktv5kt", "customer": "cus_8Di1wjdVktv5kt",
"discount": null, "discount": null,
"ended_at": null, "ended_at": null,
@ -817,12 +967,12 @@ http_interactions:
"trial_period_days": null "trial_period_days": null
}, },
"quantity": 1, "quantity": 1,
"start": 1459949399, "start": 1460389423,
"status": "active", "status": "active",
"tax_percent": null, "tax_percent": null,
"trial_end": null, "trial_end": null,
"trial_start": null "trial_start": null
} }
http_version: http_version:
recorded_at: Wed, 06 Apr 2016 13:30:04 GMT recorded_at: Mon, 11 Apr 2016 15:43:50 GMT
recorded_with: VCR 3.0.1 recorded_with: VCR 3.0.1

View File

@ -1,5 +1,67 @@
--- ---
http_interactions: http_interactions:
- request:
method: get
uri: https://api.stripe.com/v1/tokens/invalid_card_token
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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response:
status:
code: 400
message: Bad Request
headers:
Server:
- nginx
Date:
- Mon, 11 Apr 2016 15:47:34 GMT
Content-Type:
- application/json
Content-Length:
- '131'
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_8FcVweUogPiUZf
Stripe-Version:
- '2015-10-16'
body:
encoding: UTF-8
string: |
{
"error": {
"type": "invalid_request_error",
"message": "No such token: invalid_card_token",
"param": "token"
}
}
http_version:
recorded_at: Mon, 11 Apr 2016 15:47:34 GMT
- request: - request:
method: get method: get
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX
@ -19,8 +81,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -29,11 +91,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Thu, 07 Apr 2016 14:18:06 GMT - Mon, 11 Apr 2016 15:47:35 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '3454' - '5504'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -47,7 +109,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8E69echXR3qGGa - req_8FcV6gxRsSzUbZ
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -61,7 +123,7 @@ http_interactions:
"account_balance": 0, "account_balance": 0,
"created": 1460026822, "created": 1460026822,
"currency": "usd", "currency": "usd",
"default_source": "card_17xdxN2sOmf47Nz9eyRuY12a", "default_source": "card_17z7Ce2sOmf47Nz91IP2CV16",
"delinquent": false, "delinquent": false,
"description": "Lucile Seguin", "description": "Lucile Seguin",
"discount": null, "discount": null,
@ -73,7 +135,7 @@ http_interactions:
"object": "list", "object": "list",
"data": [ "data": [
{ {
"id": "card_17xdxN2sOmf47Nz9eyRuY12a", "id": "card_17z7Ce2sOmf47Nz91IP2CV16",
"object": "card", "object": "card",
"address_city": null, "address_city": null,
"address_country": null, "address_country": null,
@ -105,6 +167,72 @@ http_interactions:
"subscriptions": { "subscriptions": {
"object": "list", "object": "list",
"data": [ "data": [
{
"id": "sub_8FcRgFLyTO4ZeY",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": true,
"canceled_at": 1460389442,
"current_period_end": 1462981435,
"current_period_start": 1460389435,
"customer": "cus_8E2ys9zDZgetWX",
"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": 1460389435,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
},
{
"id": "sub_8E6nlabIu0FNDK",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": true,
"canceled_at": 1460041071,
"current_period_end": 1462633067,
"current_period_start": 1460041067,
"customer": "cus_8E2ys9zDZgetWX",
"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": 1460041067,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
},
{ {
"id": "sub_8E694MZ1FBtXBg", "id": "sub_8E694MZ1FBtXBg",
"object": "subscription", "object": "subscription",
@ -173,12 +301,12 @@ http_interactions:
} }
], ],
"has_more": false, "has_more": false,
"total_count": 2, "total_count": 4,
"url": "/v1/customers/cus_8E2ys9zDZgetWX/subscriptions" "url": "/v1/customers/cus_8E2ys9zDZgetWX/subscriptions"
} }
} }
http_version: http_version:
recorded_at: Thu, 07 Apr 2016 14:18:06 GMT recorded_at: Mon, 11 Apr 2016 15:47:35 GMT
- request: - request:
method: post method: post
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX/subscriptions uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX/subscriptions
@ -198,8 +326,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
Content-Length: Content-Length:
- '66' - '66'
response: response:
@ -210,7 +338,7 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Thu, 07 Apr 2016 14:18:07 GMT - Mon, 11 Apr 2016 15:47:36 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
@ -228,7 +356,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8E69jMRCeshYc1 - req_8FcVzLJ4tiRJHF
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
body: body:
@ -242,5 +370,5 @@ http_interactions:
} }
} }
http_version: http_version:
recorded_at: Thu, 07 Apr 2016 14:18:07 GMT recorded_at: Mon, 11 Apr 2016 15:47:36 GMT
recorded_with: VCR 3.0.1 recorded_with: VCR 3.0.1

View File

@ -19,8 +19,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
Content-Length: Content-Length:
- '81' - '81'
response: response:
@ -31,11 +31,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Thu, 07 Apr 2016 14:57:45 GMT - Mon, 11 Apr 2016 15:43:52 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '780' - '779'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -49,7 +49,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8E6ntokZYBap5o - req_8FcRua6xeSWJgP
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -58,10 +58,10 @@ http_interactions:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{ {
"id": "tok_17xeZp2sOmf47Nz9U7isup9R", "id": "tok_17z7Ce2sOmf47Nz9tArxQ9hI",
"object": "token", "object": "token",
"card": { "card": {
"id": "card_17xeZp2sOmf47Nz9Nw38pLma", "id": "card_17z7Ce2sOmf47Nz91IP2CV16",
"object": "card", "object": "card",
"address_city": null, "address_city": null,
"address_country": null, "address_country": null,
@ -84,17 +84,17 @@ http_interactions:
"name": null, "name": null,
"tokenization_method": null "tokenization_method": null
}, },
"client_ip": "90.52.157.226", "client_ip": "90.42.87.235",
"created": 1460041065, "created": 1460389432,
"livemode": false, "livemode": false,
"type": "card", "type": "card",
"used": false "used": false
} }
http_version: http_version:
recorded_at: Thu, 07 Apr 2016 14:57:45 GMT recorded_at: Mon, 11 Apr 2016 15:43:52 GMT
- request: - request:
method: get method: get
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX uri: https://api.stripe.com/v1/tokens/tok_17z7Ce2sOmf47Nz9tArxQ9hI
body: body:
encoding: US-ASCII encoding: US-ASCII
string: '' string: ''
@ -111,8 +111,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -121,11 +121,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Thu, 07 Apr 2016 14:57:46 GMT - Mon, 11 Apr 2016 15:43:53 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '3454' - '779'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -139,7 +139,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8E6nN7HdnY2Zr2 - req_8FcRynHazNvAUI
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -148,24 +148,10 @@ http_interactions:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{ {
"id": "cus_8E2ys9zDZgetWX", "id": "tok_17z7Ce2sOmf47Nz9tArxQ9hI",
"object": "customer", "object": "token",
"account_balance": 0, "card": {
"created": 1460026822, "id": "card_17z7Ce2sOmf47Nz91IP2CV16",
"currency": "usd",
"default_source": "card_17xdxN2sOmf47Nz9eyRuY12a",
"delinquent": false,
"description": "Lucile Seguin",
"discount": null,
"email": "lucile.seguin@live.fr",
"livemode": false,
"metadata": {},
"shipping": null,
"sources": {
"object": "list",
"data": [
{
"id": "card_17xdxN2sOmf47Nz9eyRuY12a",
"object": "card", "object": "card",
"address_city": null, "address_city": null,
"address_country": null, "address_country": null,
@ -177,8 +163,7 @@ http_interactions:
"address_zip_check": null, "address_zip_check": null,
"brand": "Visa", "brand": "Visa",
"country": "US", "country": "US",
"customer": "cus_8E2ys9zDZgetWX", "cvc_check": "unchecked",
"cvc_check": "pass",
"dynamic_last4": null, "dynamic_last4": null,
"exp_month": 4, "exp_month": 4,
"exp_year": 2017, "exp_year": 2017,
@ -188,317 +173,15 @@ http_interactions:
"metadata": {}, "metadata": {},
"name": null, "name": null,
"tokenization_method": null "tokenization_method": null
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/customers/cus_8E2ys9zDZgetWX/sources"
}, },
"subscriptions": { "client_ip": "90.42.87.235",
"object": "list", "created": 1460389432,
"data": [
{
"id": "sub_8E694MZ1FBtXBg",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": false,
"canceled_at": null,
"current_period_end": 1462630683,
"current_period_start": 1460038683,
"customer": "cus_8E2ys9zDZgetWX",
"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, "livemode": false,
"metadata": {}, "type": "card",
"name": "Mensuel - standard, association - month", "used": false
"statement_descriptor": null,
"trial_period_days": null
},
"quantity": 1,
"start": 1460038683,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
},
{
"id": "sub_8E67Z0lSjjVxBn",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": false,
"canceled_at": null,
"current_period_end": 1462630527,
"current_period_start": 1460038527,
"customer": "cus_8E2ys9zDZgetWX",
"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": 1460038527,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
}
],
"has_more": false,
"total_count": 2,
"url": "/v1/customers/cus_8E2ys9zDZgetWX/subscriptions"
}
} }
http_version: http_version:
recorded_at: Thu, 07 Apr 2016 14:57:46 GMT recorded_at: Mon, 11 Apr 2016 15:43:53 GMT
- request:
method: post
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX/subscriptions
body:
encoding: UTF-8
string: plan=mensuel-standard-month-20160404171519&card=tok_17xeZp2sOmf47Nz9U7isup9R
headers:
Accept:
- "*/*; q=0.5, application/xml"
Accept-Encoding:
- gzip, deflate
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}'
Content-Length:
- '76'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Thu, 07 Apr 2016 14:57:47 GMT
Content-Type:
- application/json
Content-Length:
- '821'
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_8E6nkvdYjkxZ3A
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: UTF-8
string: |
{
"id": "sub_8E6nlabIu0FNDK",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": false,
"canceled_at": null,
"current_period_end": 1462633067,
"current_period_start": 1460041067,
"customer": "cus_8E2ys9zDZgetWX",
"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": 1460041067,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
}
http_version:
recorded_at: Thu, 07 Apr 2016 14:57:47 GMT
- request:
method: get
uri: https://api.stripe.com/v1/invoices?customer=cus_8E2ys9zDZgetWX&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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Thu, 07 Apr 2016 14:57:48 GMT
Content-Type:
- application/json
Content-Length:
- '2207'
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_8E6nsHStsgJ8uR
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: UTF-8
string: |
{
"object": "list",
"data": [
{
"id": "in_17xeZr2sOmf47Nz9JTOtgIXv",
"object": "invoice",
"amount_due": 3000,
"application_fee": null,
"attempt_count": 1,
"attempted": true,
"charge": "ch_17xeZr2sOmf47Nz9KgHCuwK0",
"closed": true,
"currency": "usd",
"customer": "cus_8E2ys9zDZgetWX",
"date": 1460041067,
"description": null,
"discount": null,
"ending_balance": 0,
"forgiven": false,
"lines": {
"object": "list",
"data": [
{
"id": "sub_8E6nlabIu0FNDK",
"object": "line_item",
"amount": 3000,
"currency": "usd",
"description": null,
"discountable": true,
"livemode": false,
"metadata": {},
"period": {
"start": 1460041067,
"end": 1462633067
},
"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
},
"proration": false,
"quantity": 1,
"subscription": null,
"type": "subscription"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/invoices/in_17xeZr2sOmf47Nz9JTOtgIXv/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
"paid": true,
"period_end": 1460041067,
"period_start": 1460038527,
"receipt_number": null,
"starting_balance": 0,
"statement_descriptor": null,
"subscription": "sub_8E6nlabIu0FNDK",
"subtotal": 3000,
"tax": null,
"tax_percent": null,
"total": 3000,
"webhooks_delivered_at": 1460041067
}
],
"has_more": true,
"url": "/v1/invoices"
}
http_version:
recorded_at: Thu, 07 Apr 2016 14:57:48 GMT
- request: - request:
method: get method: get
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX
@ -518,8 +201,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -528,11 +211,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Thu, 07 Apr 2016 14:57:49 GMT - Mon, 11 Apr 2016 15:43:54 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '4474' - '4479'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -546,7 +229,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8E6nTDGRZ4k0vh - req_8FcRHlSiyZJDhh
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -608,8 +291,8 @@ http_interactions:
"id": "sub_8E6nlabIu0FNDK", "id": "sub_8E6nlabIu0FNDK",
"object": "subscription", "object": "subscription",
"application_fee_percent": null, "application_fee_percent": null,
"cancel_at_period_end": false, "cancel_at_period_end": true,
"canceled_at": null, "canceled_at": 1460041071,
"current_period_end": 1462633067, "current_period_end": 1462633067,
"current_period_start": 1460041067, "current_period_start": 1460041067,
"customer": "cus_8E2ys9zDZgetWX", "customer": "cus_8E2ys9zDZgetWX",
@ -710,13 +393,13 @@ http_interactions:
} }
} }
http_version: http_version:
recorded_at: Thu, 07 Apr 2016 14:57:49 GMT recorded_at: Mon, 11 Apr 2016 15:43:54 GMT
- request: - request:
method: get method: post
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX/subscriptions/sub_8E6nlabIu0FNDK uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX/subscriptions
body: body:
encoding: US-ASCII encoding: UTF-8
string: '' string: plan=mensuel-standard-month-20160404171519&card=tok_17z7Ce2sOmf47Nz9tArxQ9hI
headers: headers:
Accept: Accept:
- "*/*; q=0.5, application/xml" - "*/*; q=0.5, application/xml"
@ -730,8 +413,10 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
Content-Length:
- '76'
response: response:
status: status:
code: 200 code: 200
@ -740,7 +425,7 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Thu, 07 Apr 2016 14:57:50 GMT - Mon, 11 Apr 2016 15:43:55 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
@ -758,7 +443,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8E6nOZSSSXyv3E - req_8FcR3oaI9ppgXN
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -767,13 +452,13 @@ http_interactions:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{ {
"id": "sub_8E6nlabIu0FNDK", "id": "sub_8FcRgFLyTO4ZeY",
"object": "subscription", "object": "subscription",
"application_fee_percent": null, "application_fee_percent": null,
"cancel_at_period_end": false, "cancel_at_period_end": false,
"canceled_at": null, "canceled_at": null,
"current_period_end": 1462633067, "current_period_end": 1462981435,
"current_period_start": 1460041067, "current_period_start": 1460389435,
"customer": "cus_8E2ys9zDZgetWX", "customer": "cus_8E2ys9zDZgetWX",
"discount": null, "discount": null,
"ended_at": null, "ended_at": null,
@ -793,17 +478,17 @@ http_interactions:
"trial_period_days": null "trial_period_days": null
}, },
"quantity": 1, "quantity": 1,
"start": 1460041067, "start": 1460389435,
"status": "active", "status": "active",
"tax_percent": null, "tax_percent": null,
"trial_end": null, "trial_end": null,
"trial_start": null "trial_start": null
} }
http_version: http_version:
recorded_at: Thu, 07 Apr 2016 14:57:50 GMT recorded_at: Mon, 11 Apr 2016 15:43:55 GMT
- request: - request:
method: delete method: get
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX/subscriptions/sub_8E6nlabIu0FNDK?at_period_end=true uri: https://api.stripe.com/v1/invoices?customer=cus_8E2ys9zDZgetWX&limit=1
body: body:
encoding: US-ASCII encoding: US-ASCII
string: '' string: ''
@ -820,8 +505,8 @@ http_interactions:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: X-Stripe-Client-User-Agent:
- '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux - '{"bindings_version":"1.30.2","lang":"ruby","lang_version":"2.3.0 p0 (2015-12-25)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 3.13.0-83-generic (buildd@lgw01-55) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
) #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016","hostname":"sylvain-sleede-pc"}' PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response: response:
status: status:
code: 200 code: 200
@ -830,11 +515,11 @@ http_interactions:
Server: Server:
- nginx - nginx
Date: Date:
- Thu, 07 Apr 2016 14:57:51 GMT - Mon, 11 Apr 2016 15:44:00 GMT
Content-Type: Content-Type:
- application/json - application/json
Content-Length: Content-Length:
- '826' - '2207'
Connection: Connection:
- keep-alive - keep-alive
Access-Control-Allow-Credentials: Access-Control-Allow-Credentials:
@ -848,7 +533,7 @@ http_interactions:
Cache-Control: Cache-Control:
- no-cache, no-store - no-cache, no-store
Request-Id: Request-Id:
- req_8E6nip0fkOtET5 - req_8FcRYAHuZb5cyO
Stripe-Version: Stripe-Version:
- '2015-10-16' - '2015-10-16'
Strict-Transport-Security: Strict-Transport-Security:
@ -856,6 +541,225 @@ http_interactions:
body: body:
encoding: UTF-8 encoding: UTF-8
string: | string: |
{
"object": "list",
"data": [
{
"id": "in_17z7Ch2sOmf47Nz9q4hc7msO",
"object": "invoice",
"amount_due": 3000,
"application_fee": null,
"attempt_count": 1,
"attempted": true,
"charge": "ch_17z7Ch2sOmf47Nz9HcBWY6sb",
"closed": true,
"currency": "usd",
"customer": "cus_8E2ys9zDZgetWX",
"date": 1460389435,
"description": null,
"discount": null,
"ending_balance": 0,
"forgiven": false,
"lines": {
"object": "list",
"data": [
{
"id": "sub_8FcRgFLyTO4ZeY",
"object": "line_item",
"amount": 3000,
"currency": "usd",
"description": null,
"discountable": true,
"livemode": false,
"metadata": {},
"period": {
"start": 1460389435,
"end": 1462981435
},
"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
},
"proration": false,
"quantity": 1,
"subscription": null,
"type": "subscription"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/invoices/in_17z7Ch2sOmf47Nz9q4hc7msO/lines"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": null,
"paid": true,
"period_end": 1460389435,
"period_start": 1460038527,
"receipt_number": null,
"starting_balance": 0,
"statement_descriptor": null,
"subscription": "sub_8FcRgFLyTO4ZeY",
"subtotal": 3000,
"tax": null,
"tax_percent": null,
"total": 3000,
"webhooks_delivered_at": 1460389435
}
],
"has_more": true,
"url": "/v1/invoices"
}
http_version:
recorded_at: Mon, 11 Apr 2016 15:44:00 GMT
- request:
method: get
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX
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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Mon, 11 Apr 2016 15:44:00 GMT
Content-Type:
- application/json
Content-Length:
- '5499'
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_8FcRYEKmK6OB6n
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: UTF-8
string: |
{
"id": "cus_8E2ys9zDZgetWX",
"object": "customer",
"account_balance": 0,
"created": 1460026822,
"currency": "usd",
"default_source": "card_17z7Ce2sOmf47Nz91IP2CV16",
"delinquent": false,
"description": "Lucile Seguin",
"discount": null,
"email": "lucile.seguin@live.fr",
"livemode": false,
"metadata": {},
"shipping": null,
"sources": {
"object": "list",
"data": [
{
"id": "card_17z7Ce2sOmf47Nz91IP2CV16",
"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_8E2ys9zDZgetWX",
"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_8E2ys9zDZgetWX/sources"
},
"subscriptions": {
"object": "list",
"data": [
{
"id": "sub_8FcRgFLyTO4ZeY",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": false,
"canceled_at": null,
"current_period_end": 1462981435,
"current_period_start": 1460389435,
"customer": "cus_8E2ys9zDZgetWX",
"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": 1460389435,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
},
{ {
"id": "sub_8E6nlabIu0FNDK", "id": "sub_8E6nlabIu0FNDK",
"object": "subscription", "object": "subscription",
@ -888,7 +792,259 @@ http_interactions:
"tax_percent": null, "tax_percent": null,
"trial_end": null, "trial_end": null,
"trial_start": null "trial_start": null
},
{
"id": "sub_8E694MZ1FBtXBg",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": false,
"canceled_at": null,
"current_period_end": 1462630683,
"current_period_start": 1460038683,
"customer": "cus_8E2ys9zDZgetWX",
"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": 1460038683,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
},
{
"id": "sub_8E67Z0lSjjVxBn",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": false,
"canceled_at": null,
"current_period_end": 1462630527,
"current_period_start": 1460038527,
"customer": "cus_8E2ys9zDZgetWX",
"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": 1460038527,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
}
],
"has_more": false,
"total_count": 4,
"url": "/v1/customers/cus_8E2ys9zDZgetWX/subscriptions"
}
} }
http_version: http_version:
recorded_at: Thu, 07 Apr 2016 14:57:51 GMT recorded_at: Mon, 11 Apr 2016 15:44:01 GMT
- request:
method: get
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX/subscriptions/sub_8FcRgFLyTO4ZeY
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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Mon, 11 Apr 2016 15:44:01 GMT
Content-Type:
- application/json
Content-Length:
- '821'
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_8FcRuKDuUfa7Gd
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: UTF-8
string: |
{
"id": "sub_8FcRgFLyTO4ZeY",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": false,
"canceled_at": null,
"current_period_end": 1462981435,
"current_period_start": 1460389435,
"customer": "cus_8E2ys9zDZgetWX",
"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": 1460389435,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
}
http_version:
recorded_at: Mon, 11 Apr 2016 15:44:01 GMT
- request:
method: delete
uri: https://api.stripe.com/v1/customers/cus_8E2ys9zDZgetWX/subscriptions/sub_8FcRgFLyTO4ZeY?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_mGokO9TGtrVxMOyK4yZiktBE
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-linux","engine":"ruby","publisher":"stripe","uname":"Linux
version 4.4.5-1-ARCH (builduser@tobias) (gcc version 5.3.0 (GCC) ) #1 SMP
PREEMPT Thu Mar 10 07:38:19 CET 2016","hostname":"Sylvain-desktop"}'
response:
status:
code: 200
message: OK
headers:
Server:
- nginx
Date:
- Mon, 11 Apr 2016 15:44:02 GMT
Content-Type:
- application/json
Content-Length:
- '826'
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_8FcRLf7OAD4RGL
Stripe-Version:
- '2015-10-16'
Strict-Transport-Security:
- max-age=31556926; includeSubDomains
body:
encoding: UTF-8
string: |
{
"id": "sub_8FcRgFLyTO4ZeY",
"object": "subscription",
"application_fee_percent": null,
"cancel_at_period_end": true,
"canceled_at": 1460389442,
"current_period_end": 1462981435,
"current_period_start": 1460389435,
"customer": "cus_8E2ys9zDZgetWX",
"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": 1460389435,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
}
http_version:
recorded_at: Mon, 11 Apr 2016 15:44:02 GMT
recorded_with: VCR 3.0.1 recorded_with: VCR 3.0.1