stripe-ruby-mock 2.3.1 → 2.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env +2 -0
- data/.travis.yml +8 -4
- data/README.md +12 -5
- data/lib/stripe_mock/api/account_balance.rb +14 -0
- data/lib/stripe_mock/api/client.rb +4 -4
- data/lib/stripe_mock/api/conversion_rate.rb +14 -0
- data/lib/stripe_mock/api/errors.rb +25 -13
- data/lib/stripe_mock/api/instance.rb +16 -6
- data/lib/stripe_mock/api/webhooks.rb +8 -1
- data/lib/stripe_mock/client.rb +18 -2
- data/lib/stripe_mock/data/list.rb +14 -2
- data/lib/stripe_mock/data.rb +398 -58
- data/lib/stripe_mock/instance.rb +105 -9
- data/lib/stripe_mock/request_handlers/accounts.rb +41 -2
- data/lib/stripe_mock/request_handlers/balance.rb +17 -0
- data/lib/stripe_mock/request_handlers/balance_transactions.rb +18 -2
- data/lib/stripe_mock/request_handlers/charges.rb +44 -33
- data/lib/stripe_mock/request_handlers/country_spec.rb +22 -0
- data/lib/stripe_mock/request_handlers/coupons.rb +5 -4
- data/lib/stripe_mock/request_handlers/customers.rb +29 -11
- data/lib/stripe_mock/request_handlers/ephemeral_key.rb +13 -0
- data/lib/stripe_mock/request_handlers/external_accounts.rb +55 -0
- data/lib/stripe_mock/request_handlers/helpers/bank_account_helpers.rb +1 -1
- data/lib/stripe_mock/request_handlers/helpers/card_helpers.rb +9 -7
- data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +10 -6
- data/lib/stripe_mock/request_handlers/helpers/external_account_helpers.rb +49 -0
- data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +59 -16
- data/lib/stripe_mock/request_handlers/helpers/token_helpers.rb +3 -2
- data/lib/stripe_mock/request_handlers/invoices.rb +93 -14
- data/lib/stripe_mock/request_handlers/orders.rb +5 -5
- data/lib/stripe_mock/request_handlers/payouts.rb +32 -0
- data/lib/stripe_mock/request_handlers/plans.rb +1 -0
- data/lib/stripe_mock/request_handlers/products.rb +43 -0
- data/lib/stripe_mock/request_handlers/recipients.rb +12 -0
- data/lib/stripe_mock/request_handlers/refunds.rb +91 -0
- data/lib/stripe_mock/request_handlers/subscription_items.rb +36 -0
- data/lib/stripe_mock/request_handlers/subscriptions.rb +101 -39
- data/lib/stripe_mock/request_handlers/tax_rates.rb +36 -0
- data/lib/stripe_mock/request_handlers/tokens.rb +9 -3
- data/lib/stripe_mock/request_handlers/transfers.rb +11 -5
- data/lib/stripe_mock/request_handlers/validators/param_validators.rb +15 -1
- data/lib/stripe_mock/server.rb +14 -1
- data/lib/stripe_mock/test_strategies/base.rb +10 -5
- data/lib/stripe_mock/test_strategies/live.rb +5 -0
- data/lib/stripe_mock/test_strategies/mock.rb +8 -0
- data/lib/stripe_mock/util.rb +8 -2
- data/lib/stripe_mock/version.rb +1 -1
- data/lib/stripe_mock/webhook_fixtures/account.external_account.created.json +27 -0
- data/lib/stripe_mock/webhook_fixtures/account.external_account.deleted.json +27 -0
- data/lib/stripe_mock/webhook_fixtures/account.external_account.updated.json +27 -0
- data/lib/stripe_mock/webhook_fixtures/account.updated.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.funds_reinstated.json +88 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.funds_withdrawn.json +88 -0
- data/lib/stripe_mock/webhook_fixtures/charge.updated.json +58 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +40 -10
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +39 -10
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.trial_will_end.json +39 -10
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +40 -11
- data/lib/stripe_mock/webhook_fixtures/invoice.created.json +3 -2
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +92 -85
- data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +3 -2
- data/lib/stripe_mock/webhook_fixtures/plan.created.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/plan.updated.json +1 -1
- data/lib/stripe_mock.rb +15 -0
- data/spec/api/instance_spec.rb +30 -0
- data/spec/instance_spec.rb +54 -4
- data/spec/integration_examples/prepare_error_examples.rb +6 -6
- data/spec/list_spec.rb +27 -10
- data/spec/readme_spec.rb +2 -0
- data/spec/server_spec.rb +7 -3
- data/spec/shared_stripe_examples/account_examples.rb +46 -0
- data/spec/shared_stripe_examples/balance_examples.rb +11 -0
- data/spec/shared_stripe_examples/balance_transaction_examples.rb +28 -0
- data/spec/shared_stripe_examples/bank_examples.rb +28 -1
- data/spec/shared_stripe_examples/card_examples.rb +23 -5
- data/spec/shared_stripe_examples/card_token_examples.rb +1 -0
- data/spec/shared_stripe_examples/charge_examples.rb +131 -26
- data/spec/shared_stripe_examples/country_specs_examples.rb +18 -0
- data/spec/shared_stripe_examples/coupon_examples.rb +8 -2
- data/spec/shared_stripe_examples/customer_examples.rb +90 -0
- data/spec/shared_stripe_examples/dispute_examples.rb +19 -8
- data/spec/shared_stripe_examples/ephemeral_key_examples.rb +17 -0
- data/spec/shared_stripe_examples/error_mock_examples.rb +15 -5
- data/spec/shared_stripe_examples/external_account_examples.rb +170 -0
- data/spec/shared_stripe_examples/extra_features_examples.rb +2 -0
- data/spec/shared_stripe_examples/invoice_examples.rb +314 -51
- data/spec/shared_stripe_examples/payout_examples.rb +68 -0
- data/spec/shared_stripe_examples/plan_examples.rb +47 -4
- data/spec/shared_stripe_examples/product_example.rb +65 -0
- data/spec/shared_stripe_examples/recipient_examples.rb +13 -7
- data/spec/shared_stripe_examples/refund_examples.rb +453 -84
- data/spec/shared_stripe_examples/subscription_examples.rb +477 -32
- data/spec/shared_stripe_examples/subscription_items_examples.rb +75 -0
- data/spec/shared_stripe_examples/tax_rate_examples.rb +42 -0
- data/spec/shared_stripe_examples/transfer_examples.rb +72 -23
- data/spec/shared_stripe_examples/webhook_event_examples.rb +74 -5
- data/spec/spec_helper.rb +7 -6
- data/spec/stripe_mock_spec.rb +16 -3
- data/spec/support/stripe_examples.rb +8 -1
- data/spec/util_spec.rb +35 -1
- data/stripe-ruby-mock.gemspec +1 -1
- metadata +44 -8
- data/ChangeLog.rdoc +0 -4
@@ -0,0 +1,88 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.funds_reinstated",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2017-12-14",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "dp_00000000000000",
|
13
|
+
"object": "dispute",
|
14
|
+
"amount": 25000,
|
15
|
+
"balance_transaction": "txn_00000000000000",
|
16
|
+
"balance_transactions": [
|
17
|
+
{
|
18
|
+
"id": "txn_1Bl3mMGWCopOTFn18p8iALq8",
|
19
|
+
"object": "balance_transaction",
|
20
|
+
"amount": -25000,
|
21
|
+
"available_on": 1516233600,
|
22
|
+
"created": 1516145022,
|
23
|
+
"currency": "usd",
|
24
|
+
"description": "Chargeback withdrawal for ch_1Bl3mKGWCopOTFn1LKoN557r",
|
25
|
+
"exchange_rate": null,
|
26
|
+
"fee": 1500,
|
27
|
+
"fee_details": [
|
28
|
+
{
|
29
|
+
"amount": 1500,
|
30
|
+
"application": null,
|
31
|
+
"currency": "usd",
|
32
|
+
"description": "Dispute fee",
|
33
|
+
"type": "stripe_fee"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"net": -26500,
|
37
|
+
"source": "dp_1Bl3mMGWCopOTFn1jpVaJDrU",
|
38
|
+
"status": "pending",
|
39
|
+
"type": "adjustment"
|
40
|
+
}
|
41
|
+
],
|
42
|
+
"charge": "ch_00000000000000",
|
43
|
+
"created": 1516145022,
|
44
|
+
"currency": "usd",
|
45
|
+
"evidence": {
|
46
|
+
"access_activity_log": null,
|
47
|
+
"billing_address": null,
|
48
|
+
"cancellation_policy": null,
|
49
|
+
"cancellation_policy_disclosure": null,
|
50
|
+
"cancellation_rebuttal": null,
|
51
|
+
"customer_communication": null,
|
52
|
+
"customer_email_address": "amitree.apu@gmail.com",
|
53
|
+
"customer_name": "amitree.apu@gmail.com",
|
54
|
+
"customer_purchase_ip": "157.131.133.10",
|
55
|
+
"customer_signature": null,
|
56
|
+
"duplicate_charge_documentation": null,
|
57
|
+
"duplicate_charge_explanation": null,
|
58
|
+
"duplicate_charge_id": null,
|
59
|
+
"product_description": null,
|
60
|
+
"receipt": null,
|
61
|
+
"refund_policy": null,
|
62
|
+
"refund_policy_disclosure": null,
|
63
|
+
"refund_refusal_explanation": null,
|
64
|
+
"service_date": null,
|
65
|
+
"service_documentation": null,
|
66
|
+
"shipping_address": null,
|
67
|
+
"shipping_carrier": null,
|
68
|
+
"shipping_date": null,
|
69
|
+
"shipping_documentation": null,
|
70
|
+
"shipping_tracking_number": null,
|
71
|
+
"uncategorized_file": null,
|
72
|
+
"uncategorized_text": null
|
73
|
+
},
|
74
|
+
"evidence_details": {
|
75
|
+
"due_by": 1517529599,
|
76
|
+
"has_evidence": false,
|
77
|
+
"past_due": false,
|
78
|
+
"submission_count": 0
|
79
|
+
},
|
80
|
+
"is_charge_refundable": false,
|
81
|
+
"livemode": false,
|
82
|
+
"metadata": {
|
83
|
+
},
|
84
|
+
"reason": "fraudulent",
|
85
|
+
"status": "needs_response"
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.funds_withdrawn",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2017-12-14",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "dp_00000000000000",
|
13
|
+
"object": "dispute",
|
14
|
+
"amount": 25000,
|
15
|
+
"balance_transaction": "txn_00000000000000",
|
16
|
+
"balance_transactions": [
|
17
|
+
{
|
18
|
+
"id": "txn_1Bl3mMGWCopOTFn18p8iALq8",
|
19
|
+
"object": "balance_transaction",
|
20
|
+
"amount": -25000,
|
21
|
+
"available_on": 1516233600,
|
22
|
+
"created": 1516145022,
|
23
|
+
"currency": "usd",
|
24
|
+
"description": "Chargeback withdrawal for ch_1Bl3mKGWCopOTFn1LKoN557r",
|
25
|
+
"exchange_rate": null,
|
26
|
+
"fee": 1500,
|
27
|
+
"fee_details": [
|
28
|
+
{
|
29
|
+
"amount": 1500,
|
30
|
+
"application": null,
|
31
|
+
"currency": "usd",
|
32
|
+
"description": "Dispute fee",
|
33
|
+
"type": "stripe_fee"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"net": -26500,
|
37
|
+
"source": "dp_1Bl3mMGWCopOTFn1jpVaJDrU",
|
38
|
+
"status": "pending",
|
39
|
+
"type": "adjustment"
|
40
|
+
}
|
41
|
+
],
|
42
|
+
"charge": "ch_00000000000000",
|
43
|
+
"created": 1516145022,
|
44
|
+
"currency": "usd",
|
45
|
+
"evidence": {
|
46
|
+
"access_activity_log": null,
|
47
|
+
"billing_address": null,
|
48
|
+
"cancellation_policy": null,
|
49
|
+
"cancellation_policy_disclosure": null,
|
50
|
+
"cancellation_rebuttal": null,
|
51
|
+
"customer_communication": null,
|
52
|
+
"customer_email_address": "amitree.apu@gmail.com",
|
53
|
+
"customer_name": "amitree.apu@gmail.com",
|
54
|
+
"customer_purchase_ip": "157.131.133.10",
|
55
|
+
"customer_signature": null,
|
56
|
+
"duplicate_charge_documentation": null,
|
57
|
+
"duplicate_charge_explanation": null,
|
58
|
+
"duplicate_charge_id": null,
|
59
|
+
"product_description": null,
|
60
|
+
"receipt": null,
|
61
|
+
"refund_policy": null,
|
62
|
+
"refund_policy_disclosure": null,
|
63
|
+
"refund_refusal_explanation": null,
|
64
|
+
"service_date": null,
|
65
|
+
"service_documentation": null,
|
66
|
+
"shipping_address": null,
|
67
|
+
"shipping_carrier": null,
|
68
|
+
"shipping_date": null,
|
69
|
+
"shipping_documentation": null,
|
70
|
+
"shipping_tracking_number": null,
|
71
|
+
"uncategorized_file": null,
|
72
|
+
"uncategorized_text": null
|
73
|
+
},
|
74
|
+
"evidence_details": {
|
75
|
+
"due_by": 1517529599,
|
76
|
+
"has_evidence": false,
|
77
|
+
"past_due": false,
|
78
|
+
"submission_count": 0
|
79
|
+
},
|
80
|
+
"is_charge_refundable": false,
|
81
|
+
"livemode": false,
|
82
|
+
"metadata": {
|
83
|
+
},
|
84
|
+
"reason": "fraudulent",
|
85
|
+
"status": "needs_response"
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.updated",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "ch_00000000000000",
|
10
|
+
"object": "charge",
|
11
|
+
"created": 1380933505,
|
12
|
+
"livemode": false,
|
13
|
+
"paid": true,
|
14
|
+
"amount": 1000,
|
15
|
+
"currency": "usd",
|
16
|
+
"refunded": false,
|
17
|
+
"source": {
|
18
|
+
"id": "cc_00000000000000",
|
19
|
+
"object": "card",
|
20
|
+
"last4": "4242",
|
21
|
+
"type": "Visa",
|
22
|
+
"brand": "Visa",
|
23
|
+
"exp_month": 12,
|
24
|
+
"exp_year": 2013,
|
25
|
+
"fingerprint": "wXWJT135mEK107G8",
|
26
|
+
"customer": "cus_00000000000000",
|
27
|
+
"country": "US",
|
28
|
+
"name": "Actual Nothing",
|
29
|
+
"address_line1": null,
|
30
|
+
"address_line2": null,
|
31
|
+
"address_city": null,
|
32
|
+
"address_state": null,
|
33
|
+
"address_zip": null,
|
34
|
+
"address_country": null,
|
35
|
+
"cvc_check": null,
|
36
|
+
"address_line1_check": null,
|
37
|
+
"address_zip_check": null
|
38
|
+
},
|
39
|
+
"captured": true,
|
40
|
+
"refunds": {
|
41
|
+
|
42
|
+
},
|
43
|
+
"balance_transaction": "txn_00000000000000",
|
44
|
+
"failure_message": null,
|
45
|
+
"failure_code": null,
|
46
|
+
"amount_refunded": 0,
|
47
|
+
"customer": "cus_00000000000000",
|
48
|
+
"invoice": "in_00000000000000",
|
49
|
+
"description": "Sample description" ,
|
50
|
+
"dispute": null,
|
51
|
+
"metadata": {
|
52
|
+
}
|
53
|
+
},
|
54
|
+
"previous_attributes": {
|
55
|
+
"description": null
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
@@ -7,16 +7,46 @@
|
|
7
7
|
"data": {
|
8
8
|
"object": {
|
9
9
|
"id": "su_00000000000000",
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
"items": {
|
11
|
+
"object": "list",
|
12
|
+
"data": [
|
13
|
+
{
|
14
|
+
"id": "si_00000000000000",
|
15
|
+
"object": "subscription_item",
|
16
|
+
"created": 1497881783,
|
17
|
+
"plan": {
|
18
|
+
"interval": "month",
|
19
|
+
"product": "pr_00000000000000",
|
20
|
+
"amount": 100,
|
21
|
+
"currency": "usd",
|
22
|
+
"id": "fkx0AFo_00000000000000",
|
23
|
+
"object": "plan",
|
24
|
+
"livemode": false,
|
25
|
+
"interval_count": 1,
|
26
|
+
"trial_period_days": null,
|
27
|
+
"metadata": {}
|
28
|
+
},
|
29
|
+
"quantity": 1
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"id": "si_00000000000001",
|
33
|
+
"object": "subscription_item",
|
34
|
+
"created": 1497881788,
|
35
|
+
"plan": {
|
36
|
+
"interval": "month",
|
37
|
+
"product": "pr_00000000000001",
|
38
|
+
"amount": 200,
|
39
|
+
"currency": "eur",
|
40
|
+
"id": "fkx0AFo_00000000000001",
|
41
|
+
"object": "plan",
|
42
|
+
"livemode": false,
|
43
|
+
"interval_count": 1,
|
44
|
+
"trial_period_days": null,
|
45
|
+
"metadata": {}
|
46
|
+
},
|
47
|
+
"quantity": 5
|
48
|
+
}
|
49
|
+
]
|
20
50
|
},
|
21
51
|
"object": "subscription",
|
22
52
|
"start": 1381080557,
|
@@ -7,16 +7,45 @@
|
|
7
7
|
"data": {
|
8
8
|
"object": {
|
9
9
|
"id": "su_00000000000000",
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
"items": {
|
11
|
+
"object": "list",
|
12
|
+
"data": [{
|
13
|
+
"id": "si_00000000000000",
|
14
|
+
"object": "subscription_item",
|
15
|
+
"created": 1497881783,
|
16
|
+
"plan": {
|
17
|
+
"interval": "month",
|
18
|
+
"product": "pr_00000000000000",
|
19
|
+
"amount": 100,
|
20
|
+
"currency": "usd",
|
21
|
+
"id": "fkx0AFo_00000000000000",
|
22
|
+
"object": "plan",
|
23
|
+
"livemode": false,
|
24
|
+
"interval_count": 1,
|
25
|
+
"trial_period_days": null,
|
26
|
+
"metadata": {}
|
27
|
+
},
|
28
|
+
"quantity": 1
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"id": "si_00000000000001",
|
32
|
+
"object": "subscription_item",
|
33
|
+
"created": 1497881788,
|
34
|
+
"plan": {
|
35
|
+
"interval": "month",
|
36
|
+
"product": "pr_00000000000001",
|
37
|
+
"amount": 200,
|
38
|
+
"currency": "eur",
|
39
|
+
"id": "fkx0AFo_00000000000001",
|
40
|
+
"object": "plan",
|
41
|
+
"livemode": false,
|
42
|
+
"interval_count": 1,
|
43
|
+
"trial_period_days": null,
|
44
|
+
"metadata": {}
|
45
|
+
},
|
46
|
+
"quantity": 5
|
47
|
+
}
|
48
|
+
]
|
20
49
|
},
|
21
50
|
"object": "subscription",
|
22
51
|
"start": 1381080564,
|
@@ -7,16 +7,45 @@
|
|
7
7
|
"data": {
|
8
8
|
"object": {
|
9
9
|
"id": "su_00000000000000",
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
"items": {
|
11
|
+
"object": "list",
|
12
|
+
"data": [{
|
13
|
+
"id": "si_00000000000000",
|
14
|
+
"object": "subscription_item",
|
15
|
+
"created": 1497881783,
|
16
|
+
"plan": {
|
17
|
+
"interval": "month",
|
18
|
+
"product": "pr_00000000000000",
|
19
|
+
"amount": 100,
|
20
|
+
"currency": "usd",
|
21
|
+
"id": "fkx0AFo_00000000000000",
|
22
|
+
"object": "plan",
|
23
|
+
"livemode": false,
|
24
|
+
"interval_count": 1,
|
25
|
+
"trial_period_days": null,
|
26
|
+
"metadata": {}
|
27
|
+
},
|
28
|
+
"quantity": 1
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"id": "si_00000000000001",
|
32
|
+
"object": "subscription_item",
|
33
|
+
"created": 1497881788,
|
34
|
+
"plan": {
|
35
|
+
"interval": "month",
|
36
|
+
"product": "pr_00000000000001",
|
37
|
+
"amount": 200,
|
38
|
+
"currency": "eur",
|
39
|
+
"id": "fkx0AFo_00000000000001",
|
40
|
+
"object": "plan",
|
41
|
+
"livemode": false,
|
42
|
+
"interval_count": 1,
|
43
|
+
"trial_period_days": null,
|
44
|
+
"metadata": {}
|
45
|
+
},
|
46
|
+
"quantity": 5
|
47
|
+
}
|
48
|
+
]
|
20
49
|
},
|
21
50
|
"object": "subscription",
|
22
51
|
"start": 1381080623,
|
@@ -7,16 +7,45 @@
|
|
7
7
|
"data": {
|
8
8
|
"object": {
|
9
9
|
"id": "su_00000000000000",
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
"items": {
|
11
|
+
"object": "list",
|
12
|
+
"data": [{
|
13
|
+
"id": "si_00000000000000",
|
14
|
+
"object": "subscription_item",
|
15
|
+
"created": 1497881783,
|
16
|
+
"plan": {
|
17
|
+
"interval": "month",
|
18
|
+
"product": "pr_00000000000000",
|
19
|
+
"amount": 100,
|
20
|
+
"currency": "usd",
|
21
|
+
"id": "fkx0AFo_00000000000000",
|
22
|
+
"object": "plan",
|
23
|
+
"livemode": false,
|
24
|
+
"interval_count": 1,
|
25
|
+
"trial_period_days": null,
|
26
|
+
"metadata": {}
|
27
|
+
},
|
28
|
+
"quantity": 1
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"id": "si_00000000000001",
|
32
|
+
"object": "subscription_item",
|
33
|
+
"created": 1497881788,
|
34
|
+
"plan": {
|
35
|
+
"interval": "month",
|
36
|
+
"product": "pr_00000000000001",
|
37
|
+
"amount": 200,
|
38
|
+
"currency": "eur",
|
39
|
+
"id": "fkx0AFo_00000000000001",
|
40
|
+
"object": "plan",
|
41
|
+
"livemode": false,
|
42
|
+
"interval_count": 1,
|
43
|
+
"trial_period_days": null,
|
44
|
+
"metadata": {}
|
45
|
+
},
|
46
|
+
"quantity": 5
|
47
|
+
}
|
48
|
+
]
|
20
49
|
},
|
21
50
|
"object": "subscription",
|
22
51
|
"start": 1381080561,
|
@@ -35,7 +64,7 @@
|
|
35
64
|
"previous_attributes": {
|
36
65
|
"plan": {
|
37
66
|
"interval": "month",
|
38
|
-
"
|
67
|
+
"product": "pr_00000000000002",
|
39
68
|
"amount": 100,
|
40
69
|
"currency": "usd",
|
41
70
|
"id": "OLD_PLAN_ID",
|
@@ -3,10 +3,11 @@
|
|
3
3
|
"livemode": false,
|
4
4
|
"id": "evt_00000000000000",
|
5
5
|
"type": "invoice.created",
|
6
|
+
"status": "paid",
|
6
7
|
"object": "event",
|
7
8
|
"data": {
|
8
9
|
"object": {
|
9
|
-
"
|
10
|
+
"created": 1380674206,
|
10
11
|
"id": "in_00000000000000",
|
11
12
|
"period_start": 1378082075,
|
12
13
|
"period_end": 1380674075,
|
@@ -30,7 +31,6 @@
|
|
30
31
|
"quantity": 1,
|
31
32
|
"plan": {
|
32
33
|
"interval": "month",
|
33
|
-
"name": "Member's Club",
|
34
34
|
"amount": 100,
|
35
35
|
"currency": "usd",
|
36
36
|
"id": "fkx0AFo",
|
@@ -38,6 +38,7 @@
|
|
38
38
|
"livemode": false,
|
39
39
|
"interval_count": 1,
|
40
40
|
"trial_period_days": null,
|
41
|
+
"product": "pr_00000000000000",
|
41
42
|
"metadata": {}
|
42
43
|
},
|
43
44
|
"description": null,
|