mustwin-stripe-ruby-mock 1.8.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +5 -0
- data/.rspec +1 -0
- data/.travis.yml +5 -0
- data/ChangeLog.rdoc +4 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +264 -0
- data/Rakefile +28 -0
- data/bin/stripe-mock-server +19 -0
- data/lib/stripe_mock.rb +46 -0
- data/lib/stripe_mock/api/card_tokens.rb +22 -0
- data/lib/stripe_mock/api/client.rb +37 -0
- data/lib/stripe_mock/api/debug.rb +11 -0
- data/lib/stripe_mock/api/errors.rb +41 -0
- data/lib/stripe_mock/api/instance.rb +27 -0
- data/lib/stripe_mock/api/server.rb +24 -0
- data/lib/stripe_mock/api/strict.rb +11 -0
- data/lib/stripe_mock/api/webhooks.rb +64 -0
- data/lib/stripe_mock/client.rb +84 -0
- data/lib/stripe_mock/data.rb +317 -0
- data/lib/stripe_mock/error_queue.rb +23 -0
- data/lib/stripe_mock/errors/closed_client_connection_error.rb +9 -0
- data/lib/stripe_mock/errors/server_timeout_error.rb +12 -0
- data/lib/stripe_mock/errors/stripe_mock_error.rb +15 -0
- data/lib/stripe_mock/errors/uninitialized_instance_error.rb +9 -0
- data/lib/stripe_mock/errors/unstarted_state_error.rb +9 -0
- data/lib/stripe_mock/errors/unsupported_request_error.rb +4 -0
- data/lib/stripe_mock/instance.rb +108 -0
- data/lib/stripe_mock/request_handlers/charges.rb +33 -0
- data/lib/stripe_mock/request_handlers/customers.rb +107 -0
- data/lib/stripe_mock/request_handlers/invoice_items.rb +15 -0
- data/lib/stripe_mock/request_handlers/plans.rb +43 -0
- data/lib/stripe_mock/server.rb +58 -0
- data/lib/stripe_mock/util.rb +22 -0
- data/lib/stripe_mock/version.rb +4 -0
- data/lib/stripe_mock/webhook_fixtures/account.application.deauthorized.json +12 -0
- data/lib/stripe_mock/webhook_fixtures/account.updated.json +24 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.closed.json +21 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +21 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.updated.json +24 -0
- data/lib/stripe_mock/webhook_fixtures/charge.failed.json +57 -0
- data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +57 -0
- data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +57 -0
- data/lib/stripe_mock/webhook_fixtures/coupon.created.json +22 -0
- data/lib/stripe_mock/webhook_fixtures/coupon.deleted.json +22 -0
- data/lib/stripe_mock/webhook_fixtures/customer.created.json +40 -0
- data/lib/stripe_mock/webhook_fixtures/customer.deleted.json +40 -0
- data/lib/stripe_mock/webhook_fixtures/customer.discount.created.json +28 -0
- data/lib/stripe_mock/webhook_fixtures/customer.discount.deleted.json +28 -0
- data/lib/stripe_mock/webhook_fixtures/customer.discount.updated.json +43 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +34 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +34 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.trial_will_end.json +34 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +47 -0
- data/lib/stripe_mock/webhook_fixtures/customer.updated.json +43 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.created.json +64 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +64 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +64 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +67 -0
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.created.json +21 -0
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.deleted.json +21 -0
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json +24 -0
- data/lib/stripe_mock/webhook_fixtures/plan.created.json +20 -0
- data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +20 -0
- data/lib/stripe_mock/webhook_fixtures/plan.updated.json +23 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.created.json +23 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.failed.json +23 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.paid.json +23 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.updated.json +26 -0
- data/lib/trollop.rb +782 -0
- data/spec/_dummy/webhooks/dummy.event.json +6 -0
- data/spec/fixtures/stripe_webhooks/account.updated.json +7 -0
- data/spec/fixtures/stripe_webhooks/custom.account.updated.json +5 -0
- data/spec/instance_spec.rb +49 -0
- data/spec/readme_spec.rb +72 -0
- data/spec/server_spec.rb +131 -0
- data/spec/shared_stripe_examples/card_token_examples.rb +28 -0
- data/spec/shared_stripe_examples/charge_examples.rb +123 -0
- data/spec/shared_stripe_examples/customer_examples.rb +218 -0
- data/spec/shared_stripe_examples/error_mock_examples.rb +152 -0
- data/spec/shared_stripe_examples/invoice_item_examples.rb +17 -0
- data/spec/shared_stripe_examples/plan_examples.rb +123 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/stripe_mock_spec.rb +40 -0
- data/spec/support/stripe_examples.rb +18 -0
- data/spec/util_spec.rb +45 -0
- data/spec/webhook_spec.rb +77 -0
- data/stripe-ruby-mock.gemspec +27 -0
- metadata +253 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"coupon": {
|
6
|
+
"amount_off": null,
|
7
|
+
"currency": "usd",
|
8
|
+
"duration": "repeating",
|
9
|
+
"duration_in_months": 3,
|
10
|
+
"id": "25OFF_00000000000000",
|
11
|
+
"livemode": false,
|
12
|
+
"max_redemptions": null,
|
13
|
+
"object": "coupon",
|
14
|
+
"percent_off": 25,
|
15
|
+
"redeem_by": null,
|
16
|
+
"times_redeemed": 0
|
17
|
+
},
|
18
|
+
"customer": "cus_00000000000000",
|
19
|
+
"end": 1379450108,
|
20
|
+
"object": "discount",
|
21
|
+
"start": 1371501308
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"id": "evt_00000000000000",
|
25
|
+
"livemode": false,
|
26
|
+
"object": "event",
|
27
|
+
"type": "customer.discount.created"
|
28
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"coupon": {
|
6
|
+
"amount_off": null,
|
7
|
+
"currency": "usd",
|
8
|
+
"duration": "repeating",
|
9
|
+
"duration_in_months": 3,
|
10
|
+
"id": "25OFF_00000000000000",
|
11
|
+
"livemode": false,
|
12
|
+
"max_redemptions": null,
|
13
|
+
"object": "coupon",
|
14
|
+
"percent_off": 25,
|
15
|
+
"redeem_by": null,
|
16
|
+
"times_redeemed": 0
|
17
|
+
},
|
18
|
+
"customer": "cus_00000000000000",
|
19
|
+
"end": 1379450113,
|
20
|
+
"object": "discount",
|
21
|
+
"start": 1371501313
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"id": "evt_00000000000000",
|
25
|
+
"livemode": false,
|
26
|
+
"object": "event",
|
27
|
+
"type": "customer.discount.deleted"
|
28
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"coupon": {
|
6
|
+
"amount_off": null,
|
7
|
+
"currency": "usd",
|
8
|
+
"duration": "repeating",
|
9
|
+
"duration_in_months": 3,
|
10
|
+
"id": "25OFF_00000000000000",
|
11
|
+
"livemode": false,
|
12
|
+
"max_redemptions": null,
|
13
|
+
"object": "coupon",
|
14
|
+
"percent_off": 25,
|
15
|
+
"redeem_by": null,
|
16
|
+
"times_redeemed": 0
|
17
|
+
},
|
18
|
+
"customer": "cus_00000000000000",
|
19
|
+
"end": 1379450110,
|
20
|
+
"object": "discount",
|
21
|
+
"start": 1371501310
|
22
|
+
},
|
23
|
+
"previous_attributes": {
|
24
|
+
"coupon": {
|
25
|
+
"amount_off": null,
|
26
|
+
"currency": "usd",
|
27
|
+
"duration": "repeating",
|
28
|
+
"duration_in_months": 3,
|
29
|
+
"id": "OLD_COUPON_ID",
|
30
|
+
"livemode": false,
|
31
|
+
"max_redemptions": null,
|
32
|
+
"object": "coupon",
|
33
|
+
"percent_off": 25,
|
34
|
+
"redeem_by": null,
|
35
|
+
"times_redeemed": 0
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"id": "evt_00000000000000",
|
40
|
+
"livemode": false,
|
41
|
+
"object": "event",
|
42
|
+
"type": "customer.discount.updated"
|
43
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"cancel_at_period_end": false,
|
6
|
+
"canceled_at": null,
|
7
|
+
"current_period_end": 1371760577,
|
8
|
+
"current_period_start": 1371501377,
|
9
|
+
"customer": "cus_00000000000000",
|
10
|
+
"ended_at": null,
|
11
|
+
"object": "subscription",
|
12
|
+
"plan": {
|
13
|
+
"amount": 1000,
|
14
|
+
"currency": "usd",
|
15
|
+
"id": "1_00000000000000",
|
16
|
+
"interval": "month",
|
17
|
+
"interval_count": 1,
|
18
|
+
"livemode": false,
|
19
|
+
"name": "Cool Plan",
|
20
|
+
"object": "plan",
|
21
|
+
"trial_period_days": 3
|
22
|
+
},
|
23
|
+
"quantity": 1,
|
24
|
+
"start": 1371501377,
|
25
|
+
"status": "trialing",
|
26
|
+
"trial_end": 1371760577,
|
27
|
+
"trial_start": 1371501377
|
28
|
+
}
|
29
|
+
},
|
30
|
+
"id": "evt_00000000000000",
|
31
|
+
"livemode": false,
|
32
|
+
"object": "event",
|
33
|
+
"type": "customer.subscription.created"
|
34
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"cancel_at_period_end": false,
|
6
|
+
"canceled_at": null,
|
7
|
+
"current_period_end": 1371760585,
|
8
|
+
"current_period_start": 1371501385,
|
9
|
+
"customer": "cus_00000000000000",
|
10
|
+
"ended_at": 1371420375,
|
11
|
+
"object": "subscription",
|
12
|
+
"plan": {
|
13
|
+
"amount": 1000,
|
14
|
+
"currency": "usd",
|
15
|
+
"id": "1_00000000000000",
|
16
|
+
"interval": "month",
|
17
|
+
"interval_count": 1,
|
18
|
+
"livemode": false,
|
19
|
+
"name": "Cool Plan",
|
20
|
+
"object": "plan",
|
21
|
+
"trial_period_days": 3
|
22
|
+
},
|
23
|
+
"quantity": 1,
|
24
|
+
"start": 1371501385,
|
25
|
+
"status": "canceled",
|
26
|
+
"trial_end": 1371760585,
|
27
|
+
"trial_start": 1371501385
|
28
|
+
}
|
29
|
+
},
|
30
|
+
"id": "evt_00000000000000",
|
31
|
+
"livemode": false,
|
32
|
+
"object": "event",
|
33
|
+
"type": "customer.subscription.deleted"
|
34
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"cancel_at_period_end": false,
|
6
|
+
"canceled_at": null,
|
7
|
+
"current_period_end": 1371760588,
|
8
|
+
"current_period_start": 1371501388,
|
9
|
+
"customer": "cus_00000000000000",
|
10
|
+
"ended_at": null,
|
11
|
+
"object": "subscription",
|
12
|
+
"plan": {
|
13
|
+
"amount": 1000,
|
14
|
+
"currency": "usd",
|
15
|
+
"id": "1_00000000000000",
|
16
|
+
"interval": "month",
|
17
|
+
"interval_count": 1,
|
18
|
+
"livemode": false,
|
19
|
+
"name": "Cool Plan",
|
20
|
+
"object": "plan",
|
21
|
+
"trial_period_days": 3
|
22
|
+
},
|
23
|
+
"quantity": 1,
|
24
|
+
"start": 1371501388,
|
25
|
+
"status": "trialing",
|
26
|
+
"trial_end": 1371679569,
|
27
|
+
"trial_start": 1371420369
|
28
|
+
}
|
29
|
+
},
|
30
|
+
"id": "evt_00000000000000",
|
31
|
+
"livemode": false,
|
32
|
+
"object": "event",
|
33
|
+
"type": "customer.subscription.trial_will_end"
|
34
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"cancel_at_period_end": false,
|
6
|
+
"canceled_at": null,
|
7
|
+
"current_period_end": 1371760581,
|
8
|
+
"current_period_start": 1371501381,
|
9
|
+
"customer": "cus_00000000000000",
|
10
|
+
"ended_at": null,
|
11
|
+
"object": "subscription",
|
12
|
+
"plan": {
|
13
|
+
"amount": 1000,
|
14
|
+
"currency": "usd",
|
15
|
+
"id": "1_00000000000000",
|
16
|
+
"interval": "month",
|
17
|
+
"interval_count": 1,
|
18
|
+
"livemode": false,
|
19
|
+
"name": "Cool Plan",
|
20
|
+
"object": "plan",
|
21
|
+
"trial_period_days": 3
|
22
|
+
},
|
23
|
+
"quantity": 1,
|
24
|
+
"start": 1371501381,
|
25
|
+
"status": "trialing",
|
26
|
+
"trial_end": 1371760581,
|
27
|
+
"trial_start": 1371501381
|
28
|
+
},
|
29
|
+
"previous_attributes": {
|
30
|
+
"plan": {
|
31
|
+
"amount": 1000,
|
32
|
+
"currency": "usd",
|
33
|
+
"id": "OLD_PLAN_ID",
|
34
|
+
"interval": "month",
|
35
|
+
"interval_count": 1,
|
36
|
+
"livemode": false,
|
37
|
+
"name": "Old plan",
|
38
|
+
"object": "plan",
|
39
|
+
"trial_period_days": 3
|
40
|
+
}
|
41
|
+
}
|
42
|
+
},
|
43
|
+
"id": "evt_00000000000000",
|
44
|
+
"livemode": false,
|
45
|
+
"object": "event",
|
46
|
+
"type": "customer.subscription.updated"
|
47
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"account_balance": 0,
|
6
|
+
"active_card": {
|
7
|
+
"address_city": null,
|
8
|
+
"address_country": null,
|
9
|
+
"address_line1": null,
|
10
|
+
"address_line1_check": null,
|
11
|
+
"address_line2": null,
|
12
|
+
"address_state": null,
|
13
|
+
"address_zip": null,
|
14
|
+
"address_zip_check": null,
|
15
|
+
"country": "US",
|
16
|
+
"cvc_check": "pass",
|
17
|
+
"exp_month": 12,
|
18
|
+
"exp_year": 2013,
|
19
|
+
"fingerprint": "wXWJT135mEK107G8",
|
20
|
+
"last4": "4242",
|
21
|
+
"name": "1231",
|
22
|
+
"object": "card",
|
23
|
+
"type": "Visa"
|
24
|
+
},
|
25
|
+
"created": 1359947599,
|
26
|
+
"delinquent": false,
|
27
|
+
"description": null,
|
28
|
+
"discount": null,
|
29
|
+
"email": "ajoe@mailinator.com",
|
30
|
+
"id": "cus_00000000000000",
|
31
|
+
"livemode": false,
|
32
|
+
"object": "customer",
|
33
|
+
"subscription": null
|
34
|
+
},
|
35
|
+
"previous_attributes": {
|
36
|
+
"description": "Old description"
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"id": "evt_00000000000000",
|
40
|
+
"livemode": false,
|
41
|
+
"object": "event",
|
42
|
+
"type": "customer.updated"
|
43
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"amount_due": 0,
|
6
|
+
"attempt_count": 0,
|
7
|
+
"attempted": false,
|
8
|
+
"charge": null,
|
9
|
+
"closed": false,
|
10
|
+
"currency": "usd",
|
11
|
+
"customer": "cus_00000000000000",
|
12
|
+
"date": 1371501468,
|
13
|
+
"discount": null,
|
14
|
+
"ending_balance": null,
|
15
|
+
"id": "in_00000000000000",
|
16
|
+
"lines": {
|
17
|
+
"count": 1,
|
18
|
+
"data": [
|
19
|
+
{
|
20
|
+
"amount": 0,
|
21
|
+
"currency": "usd",
|
22
|
+
"description": null,
|
23
|
+
"id": "su_22Dpg5ktMdA0i6",
|
24
|
+
"livemode": true,
|
25
|
+
"object": "line_item",
|
26
|
+
"period": {
|
27
|
+
"end": 1371760668,
|
28
|
+
"start": 1371501468
|
29
|
+
},
|
30
|
+
"plan": {
|
31
|
+
"amount": 1000,
|
32
|
+
"currency": "usd",
|
33
|
+
"id": "1",
|
34
|
+
"interval": "month",
|
35
|
+
"interval_count": 1,
|
36
|
+
"livemode": false,
|
37
|
+
"name": "Cool Plan",
|
38
|
+
"object": "plan",
|
39
|
+
"trial_period_days": 3
|
40
|
+
},
|
41
|
+
"proration": false,
|
42
|
+
"quantity": 1,
|
43
|
+
"type": "subscription"
|
44
|
+
}
|
45
|
+
],
|
46
|
+
"object": "list",
|
47
|
+
"url": "/v1/invoices/in_22DpL6reHupqSS/lines"
|
48
|
+
},
|
49
|
+
"livemode": false,
|
50
|
+
"next_payment_attempt": 1371505068,
|
51
|
+
"object": "invoice",
|
52
|
+
"paid": true,
|
53
|
+
"period_end": 1371501468,
|
54
|
+
"period_start": 1371501468,
|
55
|
+
"starting_balance": 0,
|
56
|
+
"subtotal": 0,
|
57
|
+
"total": 0
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"id": "evt_00000000000000",
|
61
|
+
"livemode": false,
|
62
|
+
"object": "event",
|
63
|
+
"type": "invoice.created"
|
64
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"amount_due": 0,
|
6
|
+
"attempt_count": 0,
|
7
|
+
"attempted": true,
|
8
|
+
"charge": null,
|
9
|
+
"closed": false,
|
10
|
+
"currency": "usd",
|
11
|
+
"customer": "cus_00000000000000",
|
12
|
+
"date": 1371501515,
|
13
|
+
"discount": null,
|
14
|
+
"ending_balance": null,
|
15
|
+
"id": "in_00000000000000",
|
16
|
+
"lines": {
|
17
|
+
"count": 1,
|
18
|
+
"data": [
|
19
|
+
{
|
20
|
+
"amount": 0,
|
21
|
+
"currency": "usd",
|
22
|
+
"description": null,
|
23
|
+
"id": "su_22DqVThf1vOC0I",
|
24
|
+
"livemode": true,
|
25
|
+
"object": "line_item",
|
26
|
+
"period": {
|
27
|
+
"end": 1371760715,
|
28
|
+
"start": 1371501515
|
29
|
+
},
|
30
|
+
"plan": {
|
31
|
+
"amount": 1000,
|
32
|
+
"currency": "usd",
|
33
|
+
"id": "1",
|
34
|
+
"interval": "month",
|
35
|
+
"interval_count": 1,
|
36
|
+
"livemode": false,
|
37
|
+
"name": "Cool Plan",
|
38
|
+
"object": "plan",
|
39
|
+
"trial_period_days": 3
|
40
|
+
},
|
41
|
+
"proration": false,
|
42
|
+
"quantity": 1,
|
43
|
+
"type": "subscription"
|
44
|
+
}
|
45
|
+
],
|
46
|
+
"object": "list",
|
47
|
+
"url": "/v1/invoices/in_22DqULONy3rpya/lines"
|
48
|
+
},
|
49
|
+
"livemode": false,
|
50
|
+
"next_payment_attempt": 1371505115,
|
51
|
+
"object": "invoice",
|
52
|
+
"paid": false,
|
53
|
+
"period_end": 1371501515,
|
54
|
+
"period_start": 1371501515,
|
55
|
+
"starting_balance": 0,
|
56
|
+
"subtotal": 0,
|
57
|
+
"total": 0
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"id": "evt_00000000000000",
|
61
|
+
"livemode": false,
|
62
|
+
"object": "event",
|
63
|
+
"type": "invoice.payment_failed"
|
64
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"data": {
|
4
|
+
"object": {
|
5
|
+
"amount_due": 0,
|
6
|
+
"attempt_count": 0,
|
7
|
+
"attempted": true,
|
8
|
+
"charge": "_00000000000000",
|
9
|
+
"closed": true,
|
10
|
+
"currency": "usd",
|
11
|
+
"customer": "cus_00000000000000",
|
12
|
+
"date": 1371501511,
|
13
|
+
"discount": null,
|
14
|
+
"ending_balance": null,
|
15
|
+
"id": "in_00000000000000",
|
16
|
+
"lines": {
|
17
|
+
"count": 1,
|
18
|
+
"data": [
|
19
|
+
{
|
20
|
+
"amount": 0,
|
21
|
+
"currency": "usd",
|
22
|
+
"description": null,
|
23
|
+
"id": "su_22DqbnCBi7246V",
|
24
|
+
"livemode": true,
|
25
|
+
"object": "line_item",
|
26
|
+
"period": {
|
27
|
+
"end": 1371760711,
|
28
|
+
"start": 1371501511
|
29
|
+
},
|
30
|
+
"plan": {
|
31
|
+
"amount": 1000,
|
32
|
+
"currency": "usd",
|
33
|
+
"id": "1",
|
34
|
+
"interval": "month",
|
35
|
+
"interval_count": 1,
|
36
|
+
"livemode": false,
|
37
|
+
"name": "Cool Plan",
|
38
|
+
"object": "plan",
|
39
|
+
"trial_period_days": 3
|
40
|
+
},
|
41
|
+
"proration": false,
|
42
|
+
"quantity": 1,
|
43
|
+
"type": "subscription"
|
44
|
+
}
|
45
|
+
],
|
46
|
+
"object": "list",
|
47
|
+
"url": "/v1/invoices/in_22DqkNc6rNrhQo/lines"
|
48
|
+
},
|
49
|
+
"livemode": false,
|
50
|
+
"next_payment_attempt": 1371505111,
|
51
|
+
"object": "invoice",
|
52
|
+
"paid": true,
|
53
|
+
"period_end": 1371501511,
|
54
|
+
"period_start": 1371501511,
|
55
|
+
"starting_balance": 0,
|
56
|
+
"subtotal": 0,
|
57
|
+
"total": 0
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"id": "evt_00000000000000",
|
61
|
+
"livemode": false,
|
62
|
+
"object": "event",
|
63
|
+
"type": "invoice.payment_succeeded"
|
64
|
+
}
|