epopia-stripe-ruby-mock 2.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env +2 -0
- data/.gitignore +8 -0
- data/.rspec +1 -0
- data/.travis.yml +28 -0
- data/Gemfile +12 -0
- data/LICENSE.txt +22 -0
- data/README.md +413 -0
- data/Rakefile +14 -0
- data/bin/stripe-mock-server +19 -0
- data/lib/stripe_mock.rb +95 -0
- data/lib/stripe_mock/api/account_balance.rb +14 -0
- data/lib/stripe_mock/api/bank_tokens.rb +13 -0
- data/lib/stripe_mock/api/card_tokens.rb +13 -0
- data/lib/stripe_mock/api/client.rb +41 -0
- data/lib/stripe_mock/api/conversion_rate.rb +14 -0
- data/lib/stripe_mock/api/debug.rb +11 -0
- data/lib/stripe_mock/api/errors.rb +65 -0
- data/lib/stripe_mock/api/global_id_prefix.rb +22 -0
- data/lib/stripe_mock/api/instance.rb +38 -0
- data/lib/stripe_mock/api/live.rb +15 -0
- data/lib/stripe_mock/api/server.rb +39 -0
- data/lib/stripe_mock/api/test_helpers.rb +24 -0
- data/lib/stripe_mock/api/webhooks.rb +88 -0
- data/lib/stripe_mock/client.rb +127 -0
- data/lib/stripe_mock/data.rb +1193 -0
- data/lib/stripe_mock/data/list.rb +73 -0
- data/lib/stripe_mock/error_queue.rb +27 -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 +237 -0
- data/lib/stripe_mock/request_handlers/accounts.rb +86 -0
- data/lib/stripe_mock/request_handlers/balance.rb +17 -0
- data/lib/stripe_mock/request_handlers/balance_transactions.rb +37 -0
- data/lib/stripe_mock/request_handlers/cards.rb +35 -0
- data/lib/stripe_mock/request_handlers/charges.rb +177 -0
- data/lib/stripe_mock/request_handlers/country_spec.rb +22 -0
- data/lib/stripe_mock/request_handlers/coupons.rb +35 -0
- data/lib/stripe_mock/request_handlers/customers.rb +137 -0
- data/lib/stripe_mock/request_handlers/disputes.rb +35 -0
- data/lib/stripe_mock/request_handlers/ephemeral_key.rb +13 -0
- data/lib/stripe_mock/request_handlers/events.rb +21 -0
- data/lib/stripe_mock/request_handlers/external_accounts.rb +55 -0
- data/lib/stripe_mock/request_handlers/helpers/bank_account_helpers.rb +14 -0
- data/lib/stripe_mock/request_handlers/helpers/card_helpers.rb +127 -0
- data/lib/stripe_mock/request_handlers/helpers/charge_helpers.rb +16 -0
- data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +17 -0
- data/lib/stripe_mock/request_handlers/helpers/external_account_helpers.rb +49 -0
- data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +119 -0
- data/lib/stripe_mock/request_handlers/helpers/token_helpers.rb +44 -0
- data/lib/stripe_mock/request_handlers/invoice_items.rb +45 -0
- data/lib/stripe_mock/request_handlers/invoices.rb +177 -0
- data/lib/stripe_mock/request_handlers/orders.rb +80 -0
- data/lib/stripe_mock/request_handlers/payment_intents.rb +203 -0
- data/lib/stripe_mock/request_handlers/payment_methods.rb +112 -0
- data/lib/stripe_mock/request_handlers/payouts.rb +32 -0
- data/lib/stripe_mock/request_handlers/plans.rb +42 -0
- data/lib/stripe_mock/request_handlers/products.rb +43 -0
- data/lib/stripe_mock/request_handlers/recipients.rb +60 -0
- data/lib/stripe_mock/request_handlers/refunds.rb +91 -0
- data/lib/stripe_mock/request_handlers/sources.rb +55 -0
- data/lib/stripe_mock/request_handlers/subscription_items.rb +36 -0
- data/lib/stripe_mock/request_handlers/subscriptions.rb +296 -0
- data/lib/stripe_mock/request_handlers/tax_rates.rb +36 -0
- data/lib/stripe_mock/request_handlers/tokens.rb +75 -0
- data/lib/stripe_mock/request_handlers/transfers.rb +65 -0
- data/lib/stripe_mock/request_handlers/validators/param_validators.rb +32 -0
- data/lib/stripe_mock/server.rb +93 -0
- data/lib/stripe_mock/test_strategies/base.rb +81 -0
- data/lib/stripe_mock/test_strategies/live.rb +40 -0
- data/lib/stripe_mock/test_strategies/mock.rb +27 -0
- data/lib/stripe_mock/util.rb +44 -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.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 +26 -0
- data/lib/stripe_mock/webhook_fixtures/balance.available.json +25 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.closed.json +22 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +22 -0
- 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.dispute.updated.json +25 -0
- data/lib/stripe_mock/webhook_fixtures/charge.failed.json +56 -0
- data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +69 -0
- data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +55 -0
- data/lib/stripe_mock/webhook_fixtures/charge.updated.json +58 -0
- data/lib/stripe_mock/webhook_fixtures/coupon.created.json +23 -0
- data/lib/stripe_mock/webhook_fixtures/coupon.deleted.json +23 -0
- data/lib/stripe_mock/webhook_fixtures/customer.created.json +54 -0
- data/lib/stripe_mock/webhook_fixtures/customer.deleted.json +42 -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.source.created.json +32 -0
- data/lib/stripe_mock/webhook_fixtures/customer.source.deleted.json +32 -0
- data/lib/stripe_mock/webhook_fixtures/customer.source.updated.json +36 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +66 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +65 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.trial_will_end.json +65 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +78 -0
- data/lib/stripe_mock/webhook_fixtures/customer.updated.json +57 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.created.json +71 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +105 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +112 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +74 -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 +89 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.failed.json +89 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.paid.json +89 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.updated.json +92 -0
- data/lib/trollop.rb +782 -0
- data/spec/_dummy/webhooks/dummy.event.json +6 -0
- data/spec/api/instance_spec.rb +30 -0
- data/spec/fixtures/create_refund.yml +126 -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 +100 -0
- data/spec/integration_examples/charge_token_examples.rb +51 -0
- data/spec/integration_examples/customer_card_examples.rb +42 -0
- data/spec/integration_examples/prepare_error_examples.rb +38 -0
- data/spec/list_spec.rb +140 -0
- data/spec/readme_spec.rb +75 -0
- data/spec/server_spec.rb +139 -0
- data/spec/shared_stripe_examples/account_examples.rb +96 -0
- data/spec/shared_stripe_examples/balance_examples.rb +11 -0
- data/spec/shared_stripe_examples/balance_transaction_examples.rb +63 -0
- data/spec/shared_stripe_examples/bank_examples.rb +229 -0
- data/spec/shared_stripe_examples/bank_token_examples.rb +59 -0
- data/spec/shared_stripe_examples/card_examples.rb +307 -0
- data/spec/shared_stripe_examples/card_token_examples.rb +185 -0
- data/spec/shared_stripe_examples/charge_examples.rb +510 -0
- data/spec/shared_stripe_examples/country_specs_examples.rb +18 -0
- data/spec/shared_stripe_examples/coupon_examples.rb +85 -0
- data/spec/shared_stripe_examples/customer_examples.rb +453 -0
- data/spec/shared_stripe_examples/dispute_examples.rb +98 -0
- data/spec/shared_stripe_examples/ephemeral_key_examples.rb +17 -0
- data/spec/shared_stripe_examples/error_mock_examples.rb +162 -0
- data/spec/shared_stripe_examples/external_account_examples.rb +170 -0
- data/spec/shared_stripe_examples/extra_features_examples.rb +36 -0
- data/spec/shared_stripe_examples/invoice_examples.rb +524 -0
- data/spec/shared_stripe_examples/invoice_item_examples.rb +69 -0
- data/spec/shared_stripe_examples/payment_intent_examples.rb +131 -0
- data/spec/shared_stripe_examples/payment_method_examples.rb +175 -0
- data/spec/shared_stripe_examples/payout_examples.rb +68 -0
- data/spec/shared_stripe_examples/plan_examples.rb +194 -0
- data/spec/shared_stripe_examples/product_example.rb +65 -0
- data/spec/shared_stripe_examples/recipient_examples.rb +118 -0
- data/spec/shared_stripe_examples/refund_examples.rb +472 -0
- data/spec/shared_stripe_examples/subscription_examples.rb +1148 -0
- 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 +130 -0
- data/spec/shared_stripe_examples/validation_examples.rb +19 -0
- data/spec/shared_stripe_examples/webhook_event_examples.rb +261 -0
- data/spec/spec_helper.rb +58 -0
- data/spec/stripe_mock_spec.rb +123 -0
- data/spec/support/stripe_examples.rb +42 -0
- data/spec/util_spec.rb +121 -0
- data/stripe-ruby-mock.gemspec +27 -0
- metadata +344 -0
@@ -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
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "coupon.created",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "25OFF_00000000000000",
|
10
|
+
"percent_off": 25,
|
11
|
+
"amount_off": null,
|
12
|
+
"currency": "usd",
|
13
|
+
"object": "coupon",
|
14
|
+
"livemode": false,
|
15
|
+
"duration": "repeating",
|
16
|
+
"redeem_by": null,
|
17
|
+
"max_redemptions": null,
|
18
|
+
"times_redeemed": 0,
|
19
|
+
"duration_in_months": 3,
|
20
|
+
"valid": true
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "coupon.deleted",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "25OFF_00000000000000",
|
10
|
+
"percent_off": 25,
|
11
|
+
"amount_off": null,
|
12
|
+
"currency": "usd",
|
13
|
+
"object": "coupon",
|
14
|
+
"livemode": false,
|
15
|
+
"duration": "repeating",
|
16
|
+
"redeem_by": null,
|
17
|
+
"max_redemptions": null,
|
18
|
+
"times_redeemed": 0,
|
19
|
+
"duration_in_months": 3,
|
20
|
+
"valid": false
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "customer.created",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"object": "customer",
|
10
|
+
"created": 1375148334,
|
11
|
+
"id": "cus_00000000000000",
|
12
|
+
"livemode": false,
|
13
|
+
"description": null,
|
14
|
+
"email": "bond@mailinator.com",
|
15
|
+
"delinquent": true,
|
16
|
+
"metadata": {
|
17
|
+
},
|
18
|
+
"subscription": null,
|
19
|
+
"discount": null,
|
20
|
+
"account_balance": 0,
|
21
|
+
"sources": {
|
22
|
+
"object": "list",
|
23
|
+
"count": 1,
|
24
|
+
"url": "/v1/customers/cus_2I2AhGQOPmEFeu/cards",
|
25
|
+
"data": [
|
26
|
+
{
|
27
|
+
"id": "cc_2I2akIhmladin5",
|
28
|
+
"object": "card",
|
29
|
+
"last4": "0341",
|
30
|
+
"type": "Visa",
|
31
|
+
"brand": "Visa",
|
32
|
+
"funding": "credit",
|
33
|
+
"exp_month": 12,
|
34
|
+
"exp_year": 2013,
|
35
|
+
"fingerprint": "fWvZEzdbEIFF8QrK",
|
36
|
+
"customer": "cus_2I2AhGQOPmEFeu",
|
37
|
+
"country": "US",
|
38
|
+
"name": "Johnny Goodman",
|
39
|
+
"address_line1": null,
|
40
|
+
"address_line2": null,
|
41
|
+
"address_city": null,
|
42
|
+
"address_state": null,
|
43
|
+
"address_zip": null,
|
44
|
+
"address_country": null,
|
45
|
+
"cvc_check": "pass",
|
46
|
+
"address_line1_check": null,
|
47
|
+
"address_zip_check": null
|
48
|
+
}
|
49
|
+
]
|
50
|
+
},
|
51
|
+
"default_card": "cc_2I2akIhmladin5"
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,42 @@
|
|
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
|
+
"brand": "Visa",
|
25
|
+
"funding": "credit"
|
26
|
+
},
|
27
|
+
"created": 1359947599,
|
28
|
+
"delinquent": false,
|
29
|
+
"description": null,
|
30
|
+
"discount": null,
|
31
|
+
"email": "ajoe@mailinator.com",
|
32
|
+
"id": "cus_00000000000000",
|
33
|
+
"livemode": false,
|
34
|
+
"object": "customer",
|
35
|
+
"subscription": null
|
36
|
+
}
|
37
|
+
},
|
38
|
+
"id": "evt_00000000000000",
|
39
|
+
"livemode": false,
|
40
|
+
"object": "event",
|
41
|
+
"type": "customer.deleted"
|
42
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "customer.discount.created",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"coupon": {
|
10
|
+
"id": "25OFF_00000000000000",
|
11
|
+
"percent_off": 25,
|
12
|
+
"amount_off": null,
|
13
|
+
"currency": "usd",
|
14
|
+
"object": "coupon",
|
15
|
+
"livemode": false,
|
16
|
+
"duration": "repeating",
|
17
|
+
"redeem_by": null,
|
18
|
+
"max_redemptions": null,
|
19
|
+
"times_redeemed": 0,
|
20
|
+
"duration_in_months": 3
|
21
|
+
},
|
22
|
+
"start": 1381080505,
|
23
|
+
"object": "discount",
|
24
|
+
"customer": "cus_00000000000000",
|
25
|
+
"end": 1389029305
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "customer.discount.deleted",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"coupon": {
|
10
|
+
"id": "25OFF_00000000000000",
|
11
|
+
"percent_off": 25,
|
12
|
+
"amount_off": null,
|
13
|
+
"currency": "usd",
|
14
|
+
"object": "coupon",
|
15
|
+
"livemode": false,
|
16
|
+
"duration": "repeating",
|
17
|
+
"redeem_by": null,
|
18
|
+
"max_redemptions": null,
|
19
|
+
"times_redeemed": 0,
|
20
|
+
"duration_in_months": 3
|
21
|
+
},
|
22
|
+
"start": 1381080512,
|
23
|
+
"object": "discount",
|
24
|
+
"customer": "cus_00000000000000",
|
25
|
+
"end": 1389029312
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "customer.discount.updated",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"coupon": {
|
10
|
+
"id": "25OFF_00000000000000",
|
11
|
+
"percent_off": 25,
|
12
|
+
"amount_off": null,
|
13
|
+
"currency": "usd",
|
14
|
+
"object": "coupon",
|
15
|
+
"livemode": false,
|
16
|
+
"duration": "repeating",
|
17
|
+
"redeem_by": null,
|
18
|
+
"max_redemptions": null,
|
19
|
+
"times_redeemed": 0,
|
20
|
+
"duration_in_months": 3
|
21
|
+
},
|
22
|
+
"start": 1381080509,
|
23
|
+
"object": "discount",
|
24
|
+
"customer": "cus_00000000000000",
|
25
|
+
"end": 1389029309
|
26
|
+
},
|
27
|
+
"previous_attributes": {
|
28
|
+
"coupon": {
|
29
|
+
"id": "OLD_COUPON_ID",
|
30
|
+
"percent_off": 25,
|
31
|
+
"amount_off": null,
|
32
|
+
"currency": "usd",
|
33
|
+
"object": "coupon",
|
34
|
+
"livemode": false,
|
35
|
+
"duration": "repeating",
|
36
|
+
"redeem_by": null,
|
37
|
+
"max_redemptions": null,
|
38
|
+
"times_redeemed": 0,
|
39
|
+
"duration_in_months": 3
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "customer.source.created",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "card_VALID",
|
10
|
+
"object": "card",
|
11
|
+
"last4": "4242",
|
12
|
+
"type": "Visa",
|
13
|
+
"brand": "Visa",
|
14
|
+
"funding": "credit",
|
15
|
+
"exp_month": 3,
|
16
|
+
"exp_year": 2020,
|
17
|
+
"fingerprint": "wXWJT135mEK107G8",
|
18
|
+
"customer": "cus_VALID",
|
19
|
+
"country": "US",
|
20
|
+
"name": "Testy Tester",
|
21
|
+
"address_line1": null,
|
22
|
+
"address_line2": null,
|
23
|
+
"address_city": null,
|
24
|
+
"address_state": null,
|
25
|
+
"address_zip": null,
|
26
|
+
"address_country": null,
|
27
|
+
"cvc_check": "pass",
|
28
|
+
"address_line1_check": null,
|
29
|
+
"address_zip_check": null
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "customer.source.deleted",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "card_VALID",
|
10
|
+
"object": "card",
|
11
|
+
"last4": "4242",
|
12
|
+
"type": "Visa",
|
13
|
+
"brand": "Visa",
|
14
|
+
"funding": "credit",
|
15
|
+
"exp_month": 3,
|
16
|
+
"exp_year": 2020,
|
17
|
+
"fingerprint": "wXWJT135mEK107G8",
|
18
|
+
"customer": "cus_VALID",
|
19
|
+
"country": "US",
|
20
|
+
"name": "Testy Tester",
|
21
|
+
"address_line1": null,
|
22
|
+
"address_line2": null,
|
23
|
+
"address_city": null,
|
24
|
+
"address_state": null,
|
25
|
+
"address_zip": null,
|
26
|
+
"address_country": null,
|
27
|
+
"cvc_check": "pass",
|
28
|
+
"address_line1_check": null,
|
29
|
+
"address_zip_check": null
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "customer.source.updated",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "card_VALID",
|
10
|
+
"object": "card",
|
11
|
+
"last4": "4242",
|
12
|
+
"type": "Visa",
|
13
|
+
"brand": "Visa",
|
14
|
+
"funding": "credit",
|
15
|
+
"exp_month": 3,
|
16
|
+
"exp_year": 2020,
|
17
|
+
"fingerprint": "wXWJT135mEK107G8",
|
18
|
+
"customer": "cus_VALID",
|
19
|
+
"country": "US",
|
20
|
+
"name": "Testy Tester",
|
21
|
+
"address_line1": null,
|
22
|
+
"address_line2": null,
|
23
|
+
"address_city": null,
|
24
|
+
"address_state": null,
|
25
|
+
"address_zip": null,
|
26
|
+
"address_country": null,
|
27
|
+
"cvc_check": "pass",
|
28
|
+
"address_line1_check": null,
|
29
|
+
"address_zip_check": null
|
30
|
+
},
|
31
|
+
"previous_attributes":
|
32
|
+
{
|
33
|
+
"name": "Testy Tester Jr."
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "customer.subscription.created",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "su_00000000000000",
|
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
|
+
]
|
50
|
+
},
|
51
|
+
"object": "subscription",
|
52
|
+
"start": 1381080557,
|
53
|
+
"status": "active",
|
54
|
+
"customer": "cus_00000000000000",
|
55
|
+
"cancel_at_period_end": false,
|
56
|
+
"current_period_start": 1381080557,
|
57
|
+
"current_period_end": 1383758957,
|
58
|
+
"ended_at": null,
|
59
|
+
"trial_start": null,
|
60
|
+
"trial_end": null,
|
61
|
+
"canceled_at": null,
|
62
|
+
"quantity": 1,
|
63
|
+
"application_fee_percent": null
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|