mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
adds integration tests for reservation
This commit is contained in:
parent
f334f76ef8
commit
f12646aaf9
@ -65,6 +65,8 @@ class User < ActiveRecord::Base
|
||||
validates :username, presence: true, uniqueness: true, length: { maximum: 30 }
|
||||
|
||||
scope :active, -> { where(is_active: true) }
|
||||
scope :without_subscription, -> { includes(:subscriptions).where(subscriptions: { user_id: nil }) }
|
||||
scope :with_subscription, -> { joins(:subscriptions) }
|
||||
|
||||
def to_builder
|
||||
Jbuilder.new do |json|
|
||||
|
29
test/fixtures/credits.yml
vendored
29
test/fixtures/credits.yml
vendored
@ -4,7 +4,7 @@ credit_1:
|
||||
creditable_id: 2
|
||||
creditable_type: Training
|
||||
plan_id: 1
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:19:28.414019000 Z
|
||||
updated_at: 2016-04-04 15:19:28.414019000 Z
|
||||
|
||||
@ -13,7 +13,7 @@ credit_2:
|
||||
creditable_id: 3
|
||||
creditable_type: Training
|
||||
plan_id: 1
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:19:28.449511000 Z
|
||||
updated_at: 2016-04-04 15:19:28.449511000 Z
|
||||
|
||||
@ -22,7 +22,7 @@ credit_3:
|
||||
creditable_id: 1
|
||||
creditable_type: Training
|
||||
plan_id: 1
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:19:28.495141000 Z
|
||||
updated_at: 2016-04-04 15:19:28.495141000 Z
|
||||
|
||||
@ -31,7 +31,7 @@ credit_5:
|
||||
creditable_id: 2
|
||||
creditable_type: Training
|
||||
plan_id: 2
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:19:39.416054000 Z
|
||||
updated_at: 2016-04-04 15:19:39.416054000 Z
|
||||
|
||||
@ -40,7 +40,7 @@ credit_7:
|
||||
creditable_id: 4
|
||||
creditable_type: Training
|
||||
plan_id: 2
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:19:39.486949000 Z
|
||||
updated_at: 2016-04-04 15:19:39.486949000 Z
|
||||
|
||||
@ -49,7 +49,7 @@ credit_8:
|
||||
creditable_id: 1
|
||||
creditable_type: Training
|
||||
plan_id: 2
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:19:39.521993000 Z
|
||||
updated_at: 2016-04-04 15:19:39.521993000 Z
|
||||
|
||||
@ -58,7 +58,7 @@ credit_9:
|
||||
creditable_id: 3
|
||||
creditable_type: Training
|
||||
plan_id: 2
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:19:39.553519000 Z
|
||||
updated_at: 2016-04-04 15:19:39.553519000 Z
|
||||
|
||||
@ -67,7 +67,7 @@ credit_10:
|
||||
creditable_id: 2
|
||||
creditable_type: Training
|
||||
plan_id: 3
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:21:35.437032000 Z
|
||||
updated_at: 2016-04-04 15:21:35.437032000 Z
|
||||
|
||||
@ -76,7 +76,7 @@ credit_11:
|
||||
creditable_id: 1
|
||||
creditable_type: Training
|
||||
plan_id: 3
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:21:35.470423000 Z
|
||||
updated_at: 2016-04-04 15:21:35.470423000 Z
|
||||
|
||||
@ -85,7 +85,7 @@ credit_12:
|
||||
creditable_id: 3
|
||||
creditable_type: Training
|
||||
plan_id: 3
|
||||
hours:
|
||||
hours:
|
||||
created_at: 2016-04-04 15:21:35.547043000 Z
|
||||
updated_at: 2016-04-04 15:21:35.547043000 Z
|
||||
|
||||
@ -97,3 +97,12 @@ credit_13:
|
||||
hours: 1
|
||||
created_at: 2016-04-04 15:21:57.547939000 Z
|
||||
updated_at: 2016-04-04 15:21:57.547939000 Z
|
||||
|
||||
credit_14:
|
||||
id: 14
|
||||
creditable_id: 6
|
||||
creditable_type: Machine
|
||||
plan_id: 3
|
||||
hours: 1
|
||||
created_at: 2016-04-04 15:21:57.547939000 Z
|
||||
updated_at: 2016-04-04 15:21:57.547939000 Z
|
||||
|
@ -1,20 +1,24 @@
|
||||
module Reservations
|
||||
class CreateTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
@user = User.with_role(:member).first
|
||||
login_as(@user, scope: :user)
|
||||
@user_without_subscription = User.with_role(:member).without_subscription.first
|
||||
@user_with_subscription = User.with_role(:member).with_subscription.second
|
||||
end
|
||||
|
||||
test "user without plan reserves a machine with success" do
|
||||
test "user without subscription reserves a machine with success" do
|
||||
login_as(@user_without_subscription, scope: :user)
|
||||
|
||||
machine = Machine.find(6)
|
||||
availability = machine.availabilities.first
|
||||
|
||||
reservations_count = Reservation.count
|
||||
invoice_count = Invoice.count
|
||||
invoice_items_count = InvoiceItem.count
|
||||
users_credit_count = UsersCredit.count
|
||||
|
||||
VCR.use_cassette("reservations_create_without_plan_success") do
|
||||
VCR.use_cassette("reservations_create_for_machine_without_subscription_success") do
|
||||
post reservations_path, { reservation: {
|
||||
user_id: @user.id,
|
||||
user_id: @user_without_subscription.id,
|
||||
reservable_id: machine.id,
|
||||
reservable_type: machine.class.name,
|
||||
card_token: stripe_card_token,
|
||||
@ -30,19 +34,176 @@ module Reservations
|
||||
# general assertions
|
||||
assert_equal 201, response.status
|
||||
assert_equal reservations_count + 1, Reservation.count
|
||||
assert_equal invoice_count + 1, Invoice.count
|
||||
assert_equal invoice_items_count + 1, InvoiceItem.count
|
||||
assert_equal users_credit_count, UsersCredit.count
|
||||
|
||||
# reservation assertions
|
||||
reservation = Reservation.last
|
||||
|
||||
assert reservation.invoice
|
||||
refute reservation.stp_invoice_id.blank?
|
||||
assert_equal 1, reservation.invoice.invoice_items.count
|
||||
|
||||
# invoice assertions
|
||||
invoice = reservation.invoice
|
||||
|
||||
refute invoice.stp_invoice_id.blank?
|
||||
refute invoice.total.blank?
|
||||
|
||||
# invoice_items assertions
|
||||
invoice_item = InvoiceItem.last
|
||||
|
||||
assert invoice_item.stp_invoice_item_id
|
||||
assert_equal invoice_item.amount, machine.prices.find_by(group_id: @user_without_subscription.group_id).amount
|
||||
end
|
||||
|
||||
test "user without subscription reserves a machine with error" do
|
||||
login_as(@user_without_subscription, scope: :user)
|
||||
|
||||
machine = Machine.find(6)
|
||||
availability = machine.availabilities.first
|
||||
|
||||
reservations_count = Reservation.count
|
||||
invoice_count = Invoice.count
|
||||
invoice_items_count = InvoiceItem.count
|
||||
|
||||
VCR.use_cassette("reservations_create_for_machine_without_subscription_error") do
|
||||
post reservations_path, { reservation: {
|
||||
user_id: @user_without_subscription.id,
|
||||
reservable_id: machine.id,
|
||||
reservable_type: machine.class.name,
|
||||
card_token: stripe_card_token(error: :card_declined),
|
||||
slots_attributes: [
|
||||
{ start_at: availability.start_at.to_s(:iso8601),
|
||||
end_at: (availability.start_at + 1.hour).to_s(:iso8601),
|
||||
availability_id: availability.id
|
||||
}
|
||||
]
|
||||
}}.to_json, default_headers
|
||||
end
|
||||
|
||||
# general assertions
|
||||
assert_equal 422, response.status
|
||||
assert_equal reservations_count, Reservation.count
|
||||
assert_equal invoice_count, Invoice.count
|
||||
assert_equal invoice_items_count, InvoiceItem.count
|
||||
end
|
||||
|
||||
test "user without subscription reserves a training with success" do
|
||||
login_as(@user_without_subscription, scope: :user)
|
||||
|
||||
training = Training.first
|
||||
availability = training.availabilities.first
|
||||
|
||||
reservations_count = Reservation.count
|
||||
invoice_count = Invoice.count
|
||||
invoice_items_count = InvoiceItem.count
|
||||
|
||||
VCR.use_cassette("reservations_create_for_training_without_subscription_success") do
|
||||
post reservations_path, { reservation: {
|
||||
user_id: @user_without_subscription.id,
|
||||
reservable_id: training.id,
|
||||
reservable_type: training.class.name,
|
||||
card_token: stripe_card_token,
|
||||
slots_attributes: [
|
||||
{ start_at: availability.start_at.to_s(:iso8601),
|
||||
end_at: (availability.start_at + 1.hour).to_s(:iso8601),
|
||||
availability_id: availability.id
|
||||
}
|
||||
]
|
||||
}}.to_json, default_headers
|
||||
end
|
||||
|
||||
# general assertions
|
||||
assert_equal 201, response.status
|
||||
assert_equal reservations_count + 1, Reservation.count
|
||||
assert_equal invoice_count + 1, Invoice.count
|
||||
assert_equal invoice_items_count + 1, InvoiceItem.count
|
||||
|
||||
# reservation assertions
|
||||
reservation = Reservation.last
|
||||
|
||||
assert reservation.invoice
|
||||
refute reservation.stp_invoice_id.blank?
|
||||
assert_equal 1, reservation.invoice.invoice_items.count
|
||||
|
||||
# invoice assertions
|
||||
invoice = reservation.invoice
|
||||
|
||||
refute invoice.stp_invoice_id.blank?
|
||||
refute invoice.total.blank?
|
||||
# invoice_items
|
||||
invoice_item = InvoiceItem.last
|
||||
|
||||
assert invoice_item.stp_invoice_item_id
|
||||
assert_equal invoice_item.amount, machine.prices.find_by(group_id: @user.group_id).amount
|
||||
assert_equal invoice_item.amount, training.amount_by_group(@user_without_subscription.group_id).amount
|
||||
end
|
||||
|
||||
test "user with subscription reserves a machine with success" do
|
||||
login_as(@user_with_subscription, scope: :user)
|
||||
|
||||
plan = @user_with_subscription.subscribed_plan
|
||||
machine = Machine.find(6)
|
||||
availability = machine.availabilities.first
|
||||
|
||||
reservations_count = Reservation.count
|
||||
invoice_count = Invoice.count
|
||||
invoice_items_count = InvoiceItem.count
|
||||
users_credit_count = UsersCredit.count
|
||||
|
||||
VCR.use_cassette("reservations_create_for_machine_with_subscription_success") do
|
||||
post reservations_path, { reservation: {
|
||||
user_id: @user_with_subscription.id,
|
||||
reservable_id: machine.id,
|
||||
reservable_type: machine.class.name,
|
||||
card_token: stripe_card_token,
|
||||
slots_attributes: [
|
||||
{ start_at: availability.start_at.to_s(:iso8601),
|
||||
end_at: (availability.start_at + 1.hour).to_s(:iso8601),
|
||||
availability_id: availability.id
|
||||
},
|
||||
{ start_at: (availability.start_at + 1.hour).to_s(:iso8601),
|
||||
end_at: (availability.start_at + 2.hours).to_s(:iso8601),
|
||||
availability_id: availability.id
|
||||
}
|
||||
]
|
||||
}}.to_json, default_headers
|
||||
end
|
||||
|
||||
# general assertions
|
||||
assert_equal 201, response.status
|
||||
assert_equal reservations_count + 1, Reservation.count
|
||||
assert_equal invoice_count + 1, Invoice.count
|
||||
assert_equal invoice_items_count + 2, InvoiceItem.count
|
||||
assert_equal users_credit_count + 1, UsersCredit.count
|
||||
|
||||
# reservation assertions
|
||||
reservation = Reservation.last
|
||||
|
||||
assert reservation.invoice
|
||||
refute reservation.stp_invoice_id.blank?
|
||||
assert_equal 2, reservation.invoice.invoice_items.count
|
||||
|
||||
# invoice assertions
|
||||
invoice = reservation.invoice
|
||||
|
||||
refute invoice.stp_invoice_id.blank?
|
||||
refute invoice.total.blank?
|
||||
|
||||
# invoice_items assertions
|
||||
invoice_items = InvoiceItem.last(2)
|
||||
machine_price = machine.prices.find_by(group_id: @user_with_subscription.group_id, plan_id: plan.id).amount
|
||||
|
||||
assert invoice_items.any? { |invoice| invoice.amount == 0 }
|
||||
assert invoice_items.any? { |invoice| invoice.amount == machine_price }
|
||||
assert invoice_items.all? { |invoice| invoice.stp_invoice_item_id }
|
||||
|
||||
# users_credits assertions
|
||||
users_credit = UsersCredit.last
|
||||
|
||||
assert_equal @user_with_subscription, users_credit.user
|
||||
assert_equal [reservation.slots.count, plan.machine_credits.find_by(creditable_id: machine.id).hours].min, users_credit.hours_used
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -31,7 +31,7 @@ http_interactions:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 09:46:39 GMT
|
||||
- Wed, 06 Apr 2016 15:22:24 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
@ -49,7 +49,7 @@ http_interactions:
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DeYuCEulJlrPp
|
||||
- req_8DjynFP8DZtkjQ
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
@ -58,10 +58,10 @@ http_interactions:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "tok_17xDFD2sOmf47Nz9JD1vbrAJ",
|
||||
"id": "tok_17xIU82sOmf47Nz9lhdbMB7A",
|
||||
"object": "token",
|
||||
"card": {
|
||||
"id": "card_17xDFD2sOmf47Nz9LbJShTlw",
|
||||
"id": "card_17xIU82sOmf47Nz94aVn3WmU",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
@ -85,19 +85,19 @@ http_interactions:
|
||||
"tokenization_method": null
|
||||
},
|
||||
"client_ip": "86.76.5.109",
|
||||
"created": 1459935999,
|
||||
"created": 1459956144,
|
||||
"livemode": false,
|
||||
"type": "card",
|
||||
"used": false
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 09:46:39 GMT
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 15:22:24 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoiceitems
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: customer=cus_8CzAgnSeFbDuG2&amount=3200¤cy=eur&description=FORM1%2B+imprimante+3D+lundi+11+avril+2016+14h00+-+15%3A00
|
||||
string: customer=cus_8CzKe50I0J1gaI&amount=0¤cy=usd&description=FORM1%2B+imprimante+3D+April+11%2C+2016+14%3A00+-+03%3A00+PM
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
@ -114,7 +114,7 @@ http_interactions:
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '123'
|
||||
- '122'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
@ -123,11 +123,11 @@ http_interactions:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 09:46:41 GMT
|
||||
- Wed, 06 Apr 2016 15:22:25 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '471'
|
||||
- '466'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
@ -141,7 +141,7 @@ http_interactions:
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DeYBFB42AoW5m
|
||||
- req_8DjyDxNWUBoDuT
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
@ -150,31 +150,111 @@ http_interactions:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "ii_17xDFF2sOmf47Nz90VoIJ17e",
|
||||
"id": "ii_17xIU92sOmf47Nz9JiLpXlHs",
|
||||
"object": "invoiceitem",
|
||||
"amount": 3200,
|
||||
"currency": "eur",
|
||||
"customer": "cus_8CzAgnSeFbDuG2",
|
||||
"date": 1459936001,
|
||||
"description": "FORM1+ imprimante 3D lundi 11 avril 2016 14h00 - 15:00",
|
||||
"amount": 0,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8CzKe50I0J1gaI",
|
||||
"date": 1459956145,
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM",
|
||||
"discountable": true,
|
||||
"invoice": null,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459936001,
|
||||
"end": 1459936001
|
||||
"start": 1459956145,
|
||||
"end": 1459956145
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 09:46:41 GMT
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 15:22:25 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoiceitems
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: customer=cus_8CzKe50I0J1gaI&amount=1000¤cy=usd&description=FORM1%2B+imprimante+3D+April+11%2C+2016+15%3A00+-+04%3A00+PM
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '125'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 15:22:25 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '469'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8Djyoqd7RfPgqy
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "ii_17xIU92sOmf47Nz98bi7Z01X",
|
||||
"object": "invoiceitem",
|
||||
"amount": 1000,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8CzKe50I0J1gaI",
|
||||
"date": 1459956145,
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 15:00 - 04:00 PM",
|
||||
"discountable": true,
|
||||
"invoice": null,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459956145,
|
||||
"end": 1459956145
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 15:22:26 GMT
|
||||
- request:
|
||||
method: get
|
||||
uri: https://api.stripe.com/v1/customers/cus_8CzAgnSeFbDuG2
|
||||
uri: https://api.stripe.com/v1/customers/cus_8CzKe50I0J1gaI
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
@ -201,7 +281,7 @@ http_interactions:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 09:46:42 GMT
|
||||
- Wed, 06 Apr 2016 15:22:26 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
@ -219,7 +299,7 @@ http_interactions:
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DeYGJn0xDlBIk
|
||||
- req_8DjyndnI54v1Uz
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
@ -228,16 +308,16 @@ http_interactions:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "cus_8CzAgnSeFbDuG2",
|
||||
"id": "cus_8CzKe50I0J1gaI",
|
||||
"object": "customer",
|
||||
"account_balance": 0,
|
||||
"created": 1459782030,
|
||||
"currency": "eur",
|
||||
"created": 1459782643,
|
||||
"currency": "usd",
|
||||
"default_source": null,
|
||||
"delinquent": false,
|
||||
"description": "Jean Dupont",
|
||||
"description": "Kevin Dumas",
|
||||
"discount": null,
|
||||
"email": "jean.dupont@gmail.com",
|
||||
"email": "kevin.dumas@orange.fr",
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"shipping": null,
|
||||
@ -246,24 +326,24 @@ http_interactions:
|
||||
"data": [],
|
||||
"has_more": false,
|
||||
"total_count": 0,
|
||||
"url": "/v1/customers/cus_8CzAgnSeFbDuG2/sources"
|
||||
"url": "/v1/customers/cus_8CzKe50I0J1gaI/sources"
|
||||
},
|
||||
"subscriptions": {
|
||||
"object": "list",
|
||||
"data": [],
|
||||
"has_more": false,
|
||||
"total_count": 0,
|
||||
"url": "/v1/customers/cus_8CzAgnSeFbDuG2/subscriptions"
|
||||
"url": "/v1/customers/cus_8CzKe50I0J1gaI/subscriptions"
|
||||
}
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 09:46:42 GMT
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 15:22:26 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/customers/cus_8CzAgnSeFbDuG2/sources
|
||||
uri: https://api.stripe.com/v1/customers/cus_8CzKe50I0J1gaI/sources
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: card=tok_17xDFD2sOmf47Nz9JD1vbrAJ
|
||||
string: card=tok_17xIU82sOmf47Nz9lhdbMB7A
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
@ -289,7 +369,7 @@ http_interactions:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 09:46:42 GMT
|
||||
- Wed, 06 Apr 2016 15:22:27 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
@ -307,7 +387,7 @@ http_interactions:
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DeYMzh7lG57bt
|
||||
- req_8DjyrgeP2PYiHp
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
@ -316,7 +396,7 @@ http_interactions:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "card_17xDFD2sOmf47Nz9LbJShTlw",
|
||||
"id": "card_17xIU82sOmf47Nz94aVn3WmU",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
@ -328,7 +408,7 @@ http_interactions:
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8CzAgnSeFbDuG2",
|
||||
"customer": "cus_8CzKe50I0J1gaI",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
@ -340,14 +420,14 @@ http_interactions:
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 09:46:42 GMT
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 15:22:27 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoices
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: customer=cus_8CzAgnSeFbDuG2
|
||||
string: customer=cus_8CzKe50I0J1gaI
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
@ -373,11 +453,11 @@ http_interactions:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 09:46:43 GMT
|
||||
- Wed, 06 Apr 2016 15:22:28 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '1428'
|
||||
- '1953'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
@ -391,7 +471,7 @@ http_interactions:
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DeYs6PUiVx1DN
|
||||
- req_8DjyPqF2AowT93
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
@ -400,17 +480,17 @@ http_interactions:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "in_17xDFH2sOmf47Nz9DpUY5b3U",
|
||||
"id": "in_17xIUC2sOmf47Nz9RmCbPPpz",
|
||||
"object": "invoice",
|
||||
"amount_due": 3200,
|
||||
"amount_due": 1000,
|
||||
"application_fee": null,
|
||||
"attempt_count": 0,
|
||||
"attempted": false,
|
||||
"charge": null,
|
||||
"closed": false,
|
||||
"currency": "eur",
|
||||
"customer": "cus_8CzAgnSeFbDuG2",
|
||||
"date": 1459936003,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8CzKe50I0J1gaI",
|
||||
"date": 1459956148,
|
||||
"description": null,
|
||||
"discount": null,
|
||||
"ending_balance": null,
|
||||
@ -419,17 +499,36 @@ http_interactions:
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "ii_17xDFF2sOmf47Nz90VoIJ17e",
|
||||
"id": "ii_17xIU92sOmf47Nz98bi7Z01X",
|
||||
"object": "line_item",
|
||||
"amount": 3200,
|
||||
"currency": "eur",
|
||||
"description": "FORM1+ imprimante 3D lundi 11 avril 2016 14h00 - 15:00",
|
||||
"amount": 1000,
|
||||
"currency": "usd",
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 15:00 - 04:00 PM",
|
||||
"discountable": true,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459936001,
|
||||
"end": 1459936001
|
||||
"start": 1459956145,
|
||||
"end": 1459956145
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null,
|
||||
"type": "invoiceitem"
|
||||
},
|
||||
{
|
||||
"id": "ii_17xIU92sOmf47Nz9JiLpXlHs",
|
||||
"object": "line_item",
|
||||
"amount": 0,
|
||||
"currency": "usd",
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM",
|
||||
"discountable": true,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459956145,
|
||||
"end": 1459956145
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
@ -439,30 +538,30 @@ http_interactions:
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 1,
|
||||
"url": "/v1/invoices/in_17xDFH2sOmf47Nz9DpUY5b3U/lines"
|
||||
"total_count": 2,
|
||||
"url": "/v1/invoices/in_17xIUC2sOmf47Nz9RmCbPPpz/lines"
|
||||
},
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"next_payment_attempt": 1459939603,
|
||||
"next_payment_attempt": 1459959748,
|
||||
"paid": false,
|
||||
"period_end": 1459936003,
|
||||
"period_start": 1459936003,
|
||||
"period_end": 1459956148,
|
||||
"period_start": 1459956148,
|
||||
"receipt_number": null,
|
||||
"starting_balance": 0,
|
||||
"statement_descriptor": null,
|
||||
"subscription": null,
|
||||
"subtotal": 3200,
|
||||
"subtotal": 1000,
|
||||
"tax": null,
|
||||
"tax_percent": null,
|
||||
"total": 3200,
|
||||
"total": 1000,
|
||||
"webhooks_delivered_at": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 09:46:43 GMT
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 15:22:28 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoices/in_17xDFH2sOmf47Nz9DpUY5b3U/pay
|
||||
uri: https://api.stripe.com/v1/invoices/in_17xIUC2sOmf47Nz9RmCbPPpz/pay
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: ''
|
||||
@ -491,11 +590,11 @@ http_interactions:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 09:46:44 GMT
|
||||
- Wed, 06 Apr 2016 15:22:29 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '1447'
|
||||
- '1972'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
@ -509,7 +608,7 @@ http_interactions:
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DeYRzymQv71IY
|
||||
- req_8DjynUtcAbsRqG
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
@ -518,17 +617,17 @@ http_interactions:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "in_17xDFH2sOmf47Nz9DpUY5b3U",
|
||||
"id": "in_17xIUC2sOmf47Nz9RmCbPPpz",
|
||||
"object": "invoice",
|
||||
"amount_due": 3200,
|
||||
"amount_due": 1000,
|
||||
"application_fee": null,
|
||||
"attempt_count": 1,
|
||||
"attempted": true,
|
||||
"charge": "ch_17xDFI2sOmf47Nz9KHMAQUmF",
|
||||
"charge": "ch_17xIUD2sOmf47Nz9ScdFhmGL",
|
||||
"closed": true,
|
||||
"currency": "eur",
|
||||
"customer": "cus_8CzAgnSeFbDuG2",
|
||||
"date": 1459936003,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8CzKe50I0J1gaI",
|
||||
"date": 1459956148,
|
||||
"description": null,
|
||||
"discount": null,
|
||||
"ending_balance": 0,
|
||||
@ -537,17 +636,36 @@ http_interactions:
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "ii_17xDFF2sOmf47Nz90VoIJ17e",
|
||||
"id": "ii_17xIU92sOmf47Nz98bi7Z01X",
|
||||
"object": "line_item",
|
||||
"amount": 3200,
|
||||
"currency": "eur",
|
||||
"description": "FORM1+ imprimante 3D lundi 11 avril 2016 14h00 - 15:00",
|
||||
"amount": 1000,
|
||||
"currency": "usd",
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 15:00 - 04:00 PM",
|
||||
"discountable": true,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459936001,
|
||||
"end": 1459936001
|
||||
"start": 1459956145,
|
||||
"end": 1459956145
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null,
|
||||
"type": "invoiceitem"
|
||||
},
|
||||
{
|
||||
"id": "ii_17xIU92sOmf47Nz9JiLpXlHs",
|
||||
"object": "line_item",
|
||||
"amount": 0,
|
||||
"currency": "usd",
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM",
|
||||
"discountable": true,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459956145,
|
||||
"end": 1459956145
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
@ -557,30 +675,30 @@ http_interactions:
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 1,
|
||||
"url": "/v1/invoices/in_17xDFH2sOmf47Nz9DpUY5b3U/lines"
|
||||
"total_count": 2,
|
||||
"url": "/v1/invoices/in_17xIUC2sOmf47Nz9RmCbPPpz/lines"
|
||||
},
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"next_payment_attempt": null,
|
||||
"paid": true,
|
||||
"period_end": 1459936003,
|
||||
"period_start": 1459936003,
|
||||
"period_end": 1459956148,
|
||||
"period_start": 1459956148,
|
||||
"receipt_number": null,
|
||||
"starting_balance": 0,
|
||||
"statement_descriptor": null,
|
||||
"subscription": null,
|
||||
"subtotal": 3200,
|
||||
"subtotal": 1000,
|
||||
"tax": null,
|
||||
"tax_percent": null,
|
||||
"total": 3200,
|
||||
"webhooks_delivered_at": 1459936003
|
||||
"total": 1000,
|
||||
"webhooks_delivered_at": 1459956148
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 09:46:44 GMT
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 15:22:29 GMT
|
||||
- request:
|
||||
method: delete
|
||||
uri: https://api.stripe.com/v1/customers/cus_8CzAgnSeFbDuG2/sources/card_17xDFD2sOmf47Nz9LbJShTlw
|
||||
uri: https://api.stripe.com/v1/customers/cus_8CzKe50I0J1gaI/sources/card_17xIU82sOmf47Nz94aVn3WmU
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
@ -592,7 +710,7 @@ http_interactions:
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_mGokO9TGtrVxMOy
|
||||
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
|
||||
Content-Type:
|
||||
- application/x-www-form-urlencoded
|
||||
X-Stripe-Client-User-Agent:
|
||||
@ -607,7 +725,7 @@ http_interactions:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 09:46:45 GMT
|
||||
- Wed, 06 Apr 2016 15:22:30 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
@ -625,7 +743,7 @@ http_interactions:
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DeYSokbVz2FOu
|
||||
- req_8DjyJ9JQVHnxT0
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
@ -635,8 +753,8 @@ http_interactions:
|
||||
string: |
|
||||
{
|
||||
"deleted": true,
|
||||
"id": "card_17xDFD2sOmf47Nz9LbJShTlw"
|
||||
"id": "card_17xIU82sOmf47Nz94aVn3WmU"
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 09:46:45 GMT
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 15:22:30 GMT
|
||||
recorded_with: VCR 3.0.1
|
@ -0,0 +1,480 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: card[number]=4000000000000002&card[exp_month]=4&card[exp_year]=2017&card[cvc]=314
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '81'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:31:05 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '778'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8Dj8hOci59D4xC
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "tok_17xHgT2sOmf47Nz962TaLtD7",
|
||||
"object": "token",
|
||||
"card": {
|
||||
"id": "card_17xHgT2sOmf47Nz98eSsgCfX",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"cvc_check": "unchecked",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "xsVM9Mfv9kfwhRSL",
|
||||
"funding": "credit",
|
||||
"last4": "0002",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
},
|
||||
"client_ip": "86.76.5.109",
|
||||
"created": 1459953065,
|
||||
"livemode": false,
|
||||
"type": "card",
|
||||
"used": false
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:31:05 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoiceitems
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: customer=cus_8Di1wjdVktv5kt&amount=3200¤cy=usd&description=FORM1%2B+imprimante+3D+April+11%2C+2016+14%3A00+-+03%3A00+PM
|
||||
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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '125'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:31:06 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '469'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8Dj87wp0RJ3Z71
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "ii_17xHgU2sOmf47Nz9Pp3l4ZAA",
|
||||
"object": "invoiceitem",
|
||||
"amount": 3200,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"date": 1459953066,
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM",
|
||||
"discountable": true,
|
||||
"invoice": null,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459953066,
|
||||
"end": 1459953066
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:31:06 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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:31:07 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '3462'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8Dj8aOsnrVp2zU
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "cus_8Di1wjdVktv5kt",
|
||||
"object": "customer",
|
||||
"account_balance": 0,
|
||||
"created": 1459948888,
|
||||
"currency": "usd",
|
||||
"default_source": "card_17xGjJ2sOmf47Nz9UrQOP8Cl",
|
||||
"delinquent": false,
|
||||
"description": "Jean Dupond",
|
||||
"discount": null,
|
||||
"email": "jean.dupond@gmail.com",
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"shipping": null,
|
||||
"sources": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 1,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/sources"
|
||||
},
|
||||
"subscriptions": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"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": 2,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions"
|
||||
}
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:31:07 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/sources
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: card=tok_17xHgT2sOmf47Nz962TaLtD7
|
||||
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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '33'
|
||||
response:
|
||||
status:
|
||||
code: 402
|
||||
message: Payment Required
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:31:09 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '134'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8Dj8Q0yiZoox2F
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"error": {
|
||||
"message": "Your card was declined.",
|
||||
"type": "card_error",
|
||||
"param": "",
|
||||
"code": "card_declined"
|
||||
}
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:31:09 GMT
|
||||
- request:
|
||||
method: delete
|
||||
uri: https://api.stripe.com/v1/invoiceitems/ii_17xHgU2sOmf47Nz9Pp3l4ZAA
|
||||
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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:31:09 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '61'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8Dj86hW0UVRjBL
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"deleted": true,
|
||||
"id": "ii_17xHgU2sOmf47Nz9Pp3l4ZAA"
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:31:09 GMT
|
||||
recorded_with: VCR 3.0.1
|
@ -0,0 +1,941 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: card[number]=4242424242424242&card[exp_month]=4&card[exp_year]=2017&card[cvc]=314
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '81'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:58 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '778'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigzZOUKbFLP8
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "tok_17xHFG2sOmf47Nz9pZ4CafpU",
|
||||
"object": "token",
|
||||
"card": {
|
||||
"id": "card_17xHFG2sOmf47Nz95yErDQbL",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"cvc_check": "unchecked",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
},
|
||||
"client_ip": "86.76.5.109",
|
||||
"created": 1459951378,
|
||||
"livemode": false,
|
||||
"type": "card",
|
||||
"used": false
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:58 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoiceitems
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: customer=cus_8Di1wjdVktv5kt&amount=3200¤cy=usd&description=FORM1%2B+imprimante+3D+April+11%2C+2016+14%3A00+-+03%3A00+PM
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '125'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:58 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '469'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigTaKJ04PVMc
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "ii_17xHFG2sOmf47Nz9hhIaJZtF",
|
||||
"object": "invoiceitem",
|
||||
"amount": 3200,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"date": 1459951378,
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM",
|
||||
"discountable": true,
|
||||
"invoice": null,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459951378,
|
||||
"end": 1459951378
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:58 GMT
|
||||
- request:
|
||||
method: 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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:59 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '3462'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8Digc2V3aKSGrn
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "cus_8Di1wjdVktv5kt",
|
||||
"object": "customer",
|
||||
"account_balance": 0,
|
||||
"created": 1459948888,
|
||||
"currency": "usd",
|
||||
"default_source": "card_17xGjJ2sOmf47Nz9UrQOP8Cl",
|
||||
"delinquent": false,
|
||||
"description": "Jean Dupond",
|
||||
"discount": null,
|
||||
"email": "jean.dupond@gmail.com",
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"shipping": null,
|
||||
"sources": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 1,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/sources"
|
||||
},
|
||||
"subscriptions": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"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": 2,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions"
|
||||
}
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:59 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/sources
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: card=tok_17xHFG2sOmf47Nz9pZ4CafpU
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '33'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:03:00 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '577'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigAxuQClwx3A
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "card_17xHFG2sOmf47Nz95yErDQbL",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:03:00 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: default_source=card_17xHFG2sOmf47Nz95yErDQbL
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '44'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:03:01 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '4190'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8Dig1Js3cBEeqQ
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "cus_8Di1wjdVktv5kt",
|
||||
"object": "customer",
|
||||
"account_balance": 0,
|
||||
"created": 1459948888,
|
||||
"currency": "usd",
|
||||
"default_source": "card_17xHFG2sOmf47Nz95yErDQbL",
|
||||
"delinquent": false,
|
||||
"description": "Jean Dupond",
|
||||
"discount": null,
|
||||
"email": "jean.dupond@gmail.com",
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"shipping": null,
|
||||
"sources": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17xHFG2sOmf47Nz95yErDQbL",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
},
|
||||
{
|
||||
"id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 2,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/sources"
|
||||
},
|
||||
"subscriptions": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_8Di9gqPLwt5IIC",
|
||||
"object": "subscription",
|
||||
"application_fee_percent": null,
|
||||
"cancel_at_period_end": true,
|
||||
"canceled_at": 1459949404,
|
||||
"current_period_end": 1462541399,
|
||||
"current_period_start": 1459949399,
|
||||
"customer": "cus_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": 2,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions"
|
||||
}
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:03:01 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoices
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: customer=cus_8Di1wjdVktv5kt
|
||||
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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '27'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:03:02 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '1426'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigRXqOIStdA0
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "in_17xHFK2sOmf47Nz9jegPFlNt",
|
||||
"object": "invoice",
|
||||
"amount_due": 3200,
|
||||
"application_fee": null,
|
||||
"attempt_count": 0,
|
||||
"attempted": false,
|
||||
"charge": null,
|
||||
"closed": false,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"date": 1459951382,
|
||||
"description": null,
|
||||
"discount": null,
|
||||
"ending_balance": null,
|
||||
"forgiven": false,
|
||||
"lines": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "ii_17xHFG2sOmf47Nz9hhIaJZtF",
|
||||
"object": "line_item",
|
||||
"amount": 3200,
|
||||
"currency": "usd",
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM",
|
||||
"discountable": true,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459951378,
|
||||
"end": 1459951378
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null,
|
||||
"type": "invoiceitem"
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 1,
|
||||
"url": "/v1/invoices/in_17xHFK2sOmf47Nz9jegPFlNt/lines"
|
||||
},
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"next_payment_attempt": 1459954982,
|
||||
"paid": false,
|
||||
"period_end": 1459951382,
|
||||
"period_start": 1459948968,
|
||||
"receipt_number": null,
|
||||
"starting_balance": 0,
|
||||
"statement_descriptor": null,
|
||||
"subscription": null,
|
||||
"subtotal": 3200,
|
||||
"tax": null,
|
||||
"tax_percent": null,
|
||||
"total": 3200,
|
||||
"webhooks_delivered_at": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:03:02 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoices/in_17xHFK2sOmf47Nz9jegPFlNt/pay
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: ''
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '0'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:03:03 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '1445'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigckzVuj8MLI
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "in_17xHFK2sOmf47Nz9jegPFlNt",
|
||||
"object": "invoice",
|
||||
"amount_due": 3200,
|
||||
"application_fee": null,
|
||||
"attempt_count": 1,
|
||||
"attempted": true,
|
||||
"charge": "ch_17xHFL2sOmf47Nz9FCQ0BJKc",
|
||||
"closed": true,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"date": 1459951382,
|
||||
"description": null,
|
||||
"discount": null,
|
||||
"ending_balance": 0,
|
||||
"forgiven": false,
|
||||
"lines": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "ii_17xHFG2sOmf47Nz9hhIaJZtF",
|
||||
"object": "line_item",
|
||||
"amount": 3200,
|
||||
"currency": "usd",
|
||||
"description": "FORM1+ imprimante 3D April 11, 2016 14:00 - 03:00 PM",
|
||||
"discountable": true,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459951378,
|
||||
"end": 1459951378
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null,
|
||||
"type": "invoiceitem"
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 1,
|
||||
"url": "/v1/invoices/in_17xHFK2sOmf47Nz9jegPFlNt/lines"
|
||||
},
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"next_payment_attempt": null,
|
||||
"paid": true,
|
||||
"period_end": 1459951382,
|
||||
"period_start": 1459948968,
|
||||
"receipt_number": null,
|
||||
"starting_balance": 0,
|
||||
"statement_descriptor": null,
|
||||
"subscription": null,
|
||||
"subtotal": 3200,
|
||||
"tax": null,
|
||||
"tax_percent": null,
|
||||
"total": 3200,
|
||||
"webhooks_delivered_at": 1459951382
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:03:03 GMT
|
||||
- request:
|
||||
method: delete
|
||||
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/sources/card_17xHFG2sOmf47Nz95yErDQbL
|
||||
body:
|
||||
encoding: US-ASCII
|
||||
string: ''
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:03:04 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '63'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8Dig3VHawFrxab
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"deleted": true,
|
||||
"id": "card_17xHFG2sOmf47Nz95yErDQbL"
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:03:04 GMT
|
||||
recorded_with: VCR 3.0.1
|
@ -0,0 +1,941 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/tokens
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: card[number]=4242424242424242&card[exp_month]=4&card[exp_year]=2017&card[cvc]=314
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '81'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:49 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '778'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigcYeFhS0WA0
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "tok_17xHF72sOmf47Nz9gTjKt9Pb",
|
||||
"object": "token",
|
||||
"card": {
|
||||
"id": "card_17xHF72sOmf47Nz9pOYRMYdO",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"cvc_check": "unchecked",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
},
|
||||
"client_ip": "86.76.5.109",
|
||||
"created": 1459951369,
|
||||
"livemode": false,
|
||||
"type": "card",
|
||||
"used": false
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:49 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoiceitems
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: customer=cus_8Di1wjdVktv5kt&amount=5100¤cy=usd&description=Formation+Imprimante+3D+April+12%2C+2016+08%3A00+-+09%3A00+AM
|
||||
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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '126'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:50 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '472'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigyU1U3fnul5
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "ii_17xHF82sOmf47Nz9QT6BnkAZ",
|
||||
"object": "invoiceitem",
|
||||
"amount": 5100,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"date": 1459951370,
|
||||
"description": "Formation Imprimante 3D April 12, 2016 08:00 - 09:00 AM",
|
||||
"discountable": true,
|
||||
"invoice": null,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459951370,
|
||||
"end": 1459951370
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:50 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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:51 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '3462'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigzPm4VAhhnA
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "cus_8Di1wjdVktv5kt",
|
||||
"object": "customer",
|
||||
"account_balance": 0,
|
||||
"created": 1459948888,
|
||||
"currency": "usd",
|
||||
"default_source": "card_17xGjJ2sOmf47Nz9UrQOP8Cl",
|
||||
"delinquent": false,
|
||||
"description": "Jean Dupond",
|
||||
"discount": null,
|
||||
"email": "jean.dupond@gmail.com",
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"shipping": null,
|
||||
"sources": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 1,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/sources"
|
||||
},
|
||||
"subscriptions": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"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": 2,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions"
|
||||
}
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:51 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/sources
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: card=tok_17xHF72sOmf47Nz9gTjKt9Pb
|
||||
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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '33'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:52 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '577'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigYDBbu9Qzcj
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "card_17xHF72sOmf47Nz9pOYRMYdO",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:52 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: default_source=card_17xHF72sOmf47Nz9pOYRMYdO
|
||||
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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '44'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:53 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '4190'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigPEpOnL3MYw
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "cus_8Di1wjdVktv5kt",
|
||||
"object": "customer",
|
||||
"account_balance": 0,
|
||||
"created": 1459948888,
|
||||
"currency": "usd",
|
||||
"default_source": "card_17xHF72sOmf47Nz9pOYRMYdO",
|
||||
"delinquent": false,
|
||||
"description": "Jean Dupond",
|
||||
"discount": null,
|
||||
"email": "jean.dupond@gmail.com",
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"shipping": null,
|
||||
"sources": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17xHF72sOmf47Nz9pOYRMYdO",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
},
|
||||
{
|
||||
"id": "card_17xGjJ2sOmf47Nz9UrQOP8Cl",
|
||||
"object": "card",
|
||||
"address_city": null,
|
||||
"address_country": null,
|
||||
"address_line1": null,
|
||||
"address_line1_check": null,
|
||||
"address_line2": null,
|
||||
"address_state": null,
|
||||
"address_zip": null,
|
||||
"address_zip_check": null,
|
||||
"brand": "Visa",
|
||||
"country": "US",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"cvc_check": "pass",
|
||||
"dynamic_last4": null,
|
||||
"exp_month": 4,
|
||||
"exp_year": 2017,
|
||||
"fingerprint": "o52jybR7bnmNn6AT",
|
||||
"funding": "credit",
|
||||
"last4": "4242",
|
||||
"metadata": {},
|
||||
"name": null,
|
||||
"tokenization_method": null
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 2,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/sources"
|
||||
},
|
||||
"subscriptions": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_8Di9gqPLwt5IIC",
|
||||
"object": "subscription",
|
||||
"application_fee_percent": null,
|
||||
"cancel_at_period_end": true,
|
||||
"canceled_at": 1459949404,
|
||||
"current_period_end": 1462541399,
|
||||
"current_period_start": 1459949399,
|
||||
"customer": "cus_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": 2,
|
||||
"url": "/v1/customers/cus_8Di1wjdVktv5kt/subscriptions"
|
||||
}
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:53 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoices
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: customer=cus_8Di1wjdVktv5kt
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '27'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:54 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '1429'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DiggAW17hqwsf
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "in_17xHFC2sOmf47Nz9ZZeO0yST",
|
||||
"object": "invoice",
|
||||
"amount_due": 5100,
|
||||
"application_fee": null,
|
||||
"attempt_count": 0,
|
||||
"attempted": false,
|
||||
"charge": null,
|
||||
"closed": false,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"date": 1459951374,
|
||||
"description": null,
|
||||
"discount": null,
|
||||
"ending_balance": null,
|
||||
"forgiven": false,
|
||||
"lines": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "ii_17xHF82sOmf47Nz9QT6BnkAZ",
|
||||
"object": "line_item",
|
||||
"amount": 5100,
|
||||
"currency": "usd",
|
||||
"description": "Formation Imprimante 3D April 12, 2016 08:00 - 09:00 AM",
|
||||
"discountable": true,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459951370,
|
||||
"end": 1459951370
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null,
|
||||
"type": "invoiceitem"
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 1,
|
||||
"url": "/v1/invoices/in_17xHFC2sOmf47Nz9ZZeO0yST/lines"
|
||||
},
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"next_payment_attempt": 1459954974,
|
||||
"paid": false,
|
||||
"period_end": 1459951374,
|
||||
"period_start": 1459948968,
|
||||
"receipt_number": null,
|
||||
"starting_balance": 0,
|
||||
"statement_descriptor": null,
|
||||
"subscription": null,
|
||||
"subtotal": 5100,
|
||||
"tax": null,
|
||||
"tax_percent": null,
|
||||
"total": 5100,
|
||||
"webhooks_delivered_at": null
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:54 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://api.stripe.com/v1/invoices/in_17xHFC2sOmf47Nz9ZZeO0yST/pay
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: ''
|
||||
headers:
|
||||
Accept:
|
||||
- "*/*; q=0.5, application/xml"
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
User-Agent:
|
||||
- Stripe/v1 RubyBindings/1.30.2
|
||||
Authorization:
|
||||
- Bearer sk_test_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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
Content-Length:
|
||||
- '0'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:55 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '1448'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigSwPCrF5F8H
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"id": "in_17xHFC2sOmf47Nz9ZZeO0yST",
|
||||
"object": "invoice",
|
||||
"amount_due": 5100,
|
||||
"application_fee": null,
|
||||
"attempt_count": 1,
|
||||
"attempted": true,
|
||||
"charge": "ch_17xHFD2sOmf47Nz97SA1n7nn",
|
||||
"closed": true,
|
||||
"currency": "usd",
|
||||
"customer": "cus_8Di1wjdVktv5kt",
|
||||
"date": 1459951374,
|
||||
"description": null,
|
||||
"discount": null,
|
||||
"ending_balance": 0,
|
||||
"forgiven": false,
|
||||
"lines": {
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "ii_17xHF82sOmf47Nz9QT6BnkAZ",
|
||||
"object": "line_item",
|
||||
"amount": 5100,
|
||||
"currency": "usd",
|
||||
"description": "Formation Imprimante 3D April 12, 2016 08:00 - 09:00 AM",
|
||||
"discountable": true,
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"period": {
|
||||
"start": 1459951370,
|
||||
"end": 1459951370
|
||||
},
|
||||
"plan": null,
|
||||
"proration": false,
|
||||
"quantity": null,
|
||||
"subscription": null,
|
||||
"type": "invoiceitem"
|
||||
}
|
||||
],
|
||||
"has_more": false,
|
||||
"total_count": 1,
|
||||
"url": "/v1/invoices/in_17xHFC2sOmf47Nz9ZZeO0yST/lines"
|
||||
},
|
||||
"livemode": false,
|
||||
"metadata": {},
|
||||
"next_payment_attempt": null,
|
||||
"paid": true,
|
||||
"period_end": 1459951374,
|
||||
"period_start": 1459948968,
|
||||
"receipt_number": null,
|
||||
"starting_balance": 0,
|
||||
"statement_descriptor": null,
|
||||
"subscription": null,
|
||||
"subtotal": 5100,
|
||||
"tax": null,
|
||||
"tax_percent": null,
|
||||
"total": 5100,
|
||||
"webhooks_delivered_at": 1459951374
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:55 GMT
|
||||
- request:
|
||||
method: delete
|
||||
uri: https://api.stripe.com/v1/customers/cus_8Di1wjdVktv5kt/sources/card_17xHF72sOmf47Nz9pOYRMYdO
|
||||
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-darwin14","engine":"ruby","publisher":"stripe","uname":"Darwin
|
||||
MBP-sleede-Nicolas.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53
|
||||
PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64","hostname":"MBP-sleede-Nicolas.local"}'
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Wed, 06 Apr 2016 14:02:56 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
- '63'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Access-Control-Allow-Credentials:
|
||||
- 'true'
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, HEAD, OPTIONS, DELETE
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Max-Age:
|
||||
- '300'
|
||||
Cache-Control:
|
||||
- no-cache, no-store
|
||||
Request-Id:
|
||||
- req_8DigPHaDWfrkLV
|
||||
Stripe-Version:
|
||||
- '2015-10-16'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31556926; includeSubDomains
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |
|
||||
{
|
||||
"deleted": true,
|
||||
"id": "card_17xHF72sOmf47Nz9pOYRMYdO"
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Wed, 06 Apr 2016 14:02:56 GMT
|
||||
recorded_with: VCR 3.0.1
|
Loading…
Reference in New Issue
Block a user