stripe-ruby-mock 3.0.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/rspec_tests.yml +38 -0
- data/.rspec +2 -1
- data/CHANGELOG.md +62 -15
- data/Gemfile +1 -0
- data/README.md +5 -3
- data/lib/stripe_mock/api/client.rb +1 -1
- data/lib/stripe_mock/api/instance.rb +1 -1
- data/lib/stripe_mock/api/webhooks.rb +66 -25
- data/lib/stripe_mock/client.rb +2 -1
- data/lib/stripe_mock/data/list.rb +31 -6
- data/lib/stripe_mock/data.rb +201 -30
- data/lib/stripe_mock/instance.rb +12 -3
- data/lib/stripe_mock/request_handlers/account_links.rb +15 -0
- data/lib/stripe_mock/request_handlers/accounts.rb +17 -6
- data/lib/stripe_mock/request_handlers/charges.rb +11 -4
- data/lib/stripe_mock/request_handlers/checkout_session.rb +179 -0
- data/lib/stripe_mock/request_handlers/customers.rb +22 -13
- data/lib/stripe_mock/request_handlers/ephemeral_key.rb +1 -1
- data/lib/stripe_mock/request_handlers/events.rb +30 -3
- data/lib/stripe_mock/request_handlers/express_login_links.rb +15 -0
- data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +1 -0
- data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +36 -12
- data/lib/stripe_mock/request_handlers/invoices.rb +10 -4
- data/lib/stripe_mock/request_handlers/payment_intents.rb +13 -2
- data/lib/stripe_mock/request_handlers/payment_methods.rb +11 -4
- data/lib/stripe_mock/request_handlers/prices.rb +62 -0
- data/lib/stripe_mock/request_handlers/promotion_codes.rb +43 -0
- data/lib/stripe_mock/request_handlers/refunds.rb +13 -2
- data/lib/stripe_mock/request_handlers/setup_intents.rb +16 -9
- data/lib/stripe_mock/request_handlers/sources.rb +12 -6
- data/lib/stripe_mock/request_handlers/subscriptions.rb +120 -21
- data/lib/stripe_mock/request_handlers/tokens.rb +6 -4
- data/lib/stripe_mock/request_handlers/transfers.rb +12 -1
- data/lib/stripe_mock/request_handlers/validators/param_validators.rb +33 -4
- data/lib/stripe_mock/server.rb +2 -2
- data/lib/stripe_mock/test_strategies/base.rb +62 -10
- data/lib/stripe_mock/version.rb +1 -1
- data/lib/stripe_mock/webhook_fixtures/account.updated.json +1 -1
- data/lib/stripe_mock/webhook_fixtures/balance.available.json +27 -15
- data/lib/stripe_mock/webhook_fixtures/charge.captured.json +143 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +63 -16
- data/lib/stripe_mock/webhook_fixtures/charge.failed.json +49 -120
- data/lib/stripe_mock/webhook_fixtures/charge.refund.updated.json +35 -0
- data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +145 -50
- data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +114 -43
- data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.json +79 -0
- data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.payment_mode.json +53 -0
- data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.setup_mode.json +45 -0
- data/lib/stripe_mock/webhook_fixtures/customer.created.json +37 -46
- data/lib/stripe_mock/webhook_fixtures/customer.deleted.json +36 -32
- data/lib/stripe_mock/webhook_fixtures/customer.source.created.json +31 -22
- data/lib/stripe_mock/webhook_fixtures/customer.source.updated.json +36 -25
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +135 -47
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +134 -45
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +135 -56
- data/lib/stripe_mock/webhook_fixtures/customer.updated.json +38 -47
- data/lib/stripe_mock/webhook_fixtures/invoice.created.json +176 -49
- data/lib/stripe_mock/webhook_fixtures/invoice.finalized.json +171 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.paid.json +171 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_action_required.json +171 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +149 -83
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +149 -90
- data/lib/stripe_mock/webhook_fixtures/invoice.upcoming.json +70 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +178 -50
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.created.json +87 -13
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json +88 -14
- data/lib/stripe_mock/webhook_fixtures/mandate.updated.json +34 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.amount_capturable_updated.json +170 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.canceled.json +73 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.created.json +86 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.payment_failed.json +225 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.processing.json +162 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.requires_action.json +191 -0
- data/lib/stripe_mock/webhook_fixtures/payment_intent.succeeded.json +196 -0
- data/lib/stripe_mock/webhook_fixtures/payment_link.created.json +47 -0
- data/lib/stripe_mock/webhook_fixtures/payment_link.updated.json +50 -0
- data/lib/stripe_mock/webhook_fixtures/payment_method.attached.json +63 -0
- data/lib/stripe_mock/webhook_fixtures/payment_method.detached.json +62 -0
- data/lib/stripe_mock/webhook_fixtures/payout.created.json +40 -0
- data/lib/stripe_mock/webhook_fixtures/payout.paid.json +40 -0
- data/lib/stripe_mock/webhook_fixtures/payout.updated.json +46 -0
- data/lib/stripe_mock/webhook_fixtures/plan.created.json +30 -13
- data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +30 -13
- data/lib/stripe_mock/webhook_fixtures/plan.updated.json +34 -14
- data/lib/stripe_mock/webhook_fixtures/price.created.json +42 -0
- data/lib/stripe_mock/webhook_fixtures/price.deleted.json +42 -0
- data/lib/stripe_mock/webhook_fixtures/price.updated.json +48 -0
- data/lib/stripe_mock/webhook_fixtures/product.created.json +19 -13
- data/lib/stripe_mock/webhook_fixtures/product.deleted.json +20 -14
- data/lib/stripe_mock/webhook_fixtures/product.updated.json +24 -15
- data/lib/stripe_mock/webhook_fixtures/quote.accepted.json +92 -0
- data/lib/stripe_mock/webhook_fixtures/quote.canceled.json +92 -0
- data/lib/stripe_mock/webhook_fixtures/quote.created.json +92 -0
- data/lib/stripe_mock/webhook_fixtures/quote.finalized.json +92 -0
- data/lib/stripe_mock/webhook_fixtures/setup_intent.canceled.json +46 -0
- data/lib/stripe_mock/webhook_fixtures/setup_intent.created.json +51 -0
- data/lib/stripe_mock/webhook_fixtures/setup_intent.setup_failed.json +100 -0
- data/lib/stripe_mock/webhook_fixtures/setup_intent.succeeded.json +46 -0
- data/lib/stripe_mock/webhook_fixtures/subscription_schedule.canceled.json +119 -0
- data/lib/stripe_mock/webhook_fixtures/subscription_schedule.created.json +114 -0
- data/lib/stripe_mock/webhook_fixtures/subscription_schedule.released.json +111 -0
- data/lib/stripe_mock/webhook_fixtures/subscription_schedule.updated.json +125 -0
- data/lib/stripe_mock/webhook_fixtures/tax_rate.created.json +32 -0
- data/lib/stripe_mock/webhook_fixtures/tax_rate.updated.json +37 -0
- data/lib/stripe_mock.rb +7 -1
- data/spec/instance_spec.rb +7 -7
- data/spec/integration_examples/completing_checkout_sessions_example.rb +37 -0
- data/spec/list_spec.rb +23 -0
- data/spec/readme_spec.rb +1 -1
- data/spec/server_spec.rb +4 -2
- data/spec/shared_stripe_examples/account_examples.rb +9 -1
- data/spec/shared_stripe_examples/account_link_examples.rb +16 -0
- data/spec/shared_stripe_examples/balance_examples.rb +6 -0
- data/spec/shared_stripe_examples/card_token_examples.rb +17 -21
- data/spec/shared_stripe_examples/checkout_session_examples.rb +99 -0
- data/spec/shared_stripe_examples/customer_examples.rb +11 -13
- data/spec/shared_stripe_examples/express_login_link_examples.rb +12 -0
- data/spec/shared_stripe_examples/invoice_examples.rb +29 -8
- data/spec/shared_stripe_examples/payment_intent_examples.rb +74 -0
- data/spec/shared_stripe_examples/payment_method_examples.rb +336 -67
- data/spec/shared_stripe_examples/price_examples.rb +223 -0
- data/spec/shared_stripe_examples/product_examples.rb +1 -9
- data/spec/shared_stripe_examples/promotion_code_examples.rb +68 -0
- data/spec/shared_stripe_examples/refund_examples.rb +13 -0
- data/spec/shared_stripe_examples/setup_intent_examples.rb +17 -0
- data/spec/shared_stripe_examples/subscription_examples.rb +327 -9
- data/spec/shared_stripe_examples/transfer_examples.rb +10 -1
- data/spec/shared_stripe_examples/webhook_event_examples.rb +51 -5
- data/spec/spec_helper.rb +4 -0
- data/spec/stripe_mock_spec.rb +2 -2
- data/spec/support/stripe_examples.rb +8 -2
- data/stripe-ruby-mock.gemspec +7 -2
- metadata +72 -15
- data/.travis.yml +0 -28
- data/lib/stripe_mock/request_handlers/checkout.rb +0 -15
- data/spec/shared_stripe_examples/checkout_examples.rb +0 -19
@@ -0,0 +1,40 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_000000000000000000000000",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320045,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "po_000000000000000000000000",
|
9
|
+
"object": "payout",
|
10
|
+
"amount": 1100,
|
11
|
+
"arrival_date": 1648425600,
|
12
|
+
"automatic": false,
|
13
|
+
"balance_transaction": "txn_000000000000000000000000",
|
14
|
+
"created": 1648320044,
|
15
|
+
"currency": "usd",
|
16
|
+
"description": "(created by Stripe CLI)",
|
17
|
+
"destination": "ba_000000000000000000000000",
|
18
|
+
"failure_balance_transaction": null,
|
19
|
+
"failure_code": null,
|
20
|
+
"failure_message": null,
|
21
|
+
"livemode": false,
|
22
|
+
"metadata": {
|
23
|
+
},
|
24
|
+
"method": "standard",
|
25
|
+
"original_payout": null,
|
26
|
+
"reversed_by": null,
|
27
|
+
"source_type": "card",
|
28
|
+
"statement_descriptor": null,
|
29
|
+
"status": "paid",
|
30
|
+
"type": "bank_account"
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"livemode": false,
|
34
|
+
"pending_webhooks": 2,
|
35
|
+
"request": {
|
36
|
+
"id": "req_00000000000000",
|
37
|
+
"idempotency_key": "ae68e2e7-0edb-4181-a35f-f36dcc9148c9"
|
38
|
+
},
|
39
|
+
"type": "payout.paid"
|
40
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_000000000000000000000000",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320046,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "po_000000000000000000000000",
|
9
|
+
"object": "payout",
|
10
|
+
"amount": 1100,
|
11
|
+
"arrival_date": 1648425600,
|
12
|
+
"automatic": false,
|
13
|
+
"balance_transaction": "txn_000000000000000000000000",
|
14
|
+
"created": 1648320044,
|
15
|
+
"currency": "usd",
|
16
|
+
"description": "(created by Stripe CLI)",
|
17
|
+
"destination": "ba_000000000000000000000000",
|
18
|
+
"failure_balance_transaction": null,
|
19
|
+
"failure_code": null,
|
20
|
+
"failure_message": null,
|
21
|
+
"livemode": false,
|
22
|
+
"metadata": {
|
23
|
+
"foo": "bar"
|
24
|
+
},
|
25
|
+
"method": "standard",
|
26
|
+
"original_payout": null,
|
27
|
+
"reversed_by": null,
|
28
|
+
"source_type": "card",
|
29
|
+
"statement_descriptor": null,
|
30
|
+
"status": "paid",
|
31
|
+
"type": "bank_account"
|
32
|
+
},
|
33
|
+
"previous_attributes": {
|
34
|
+
"metadata": {
|
35
|
+
"foo": null
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"livemode": false,
|
40
|
+
"pending_webhooks": 2,
|
41
|
+
"request": {
|
42
|
+
"id": "req_00000000000000",
|
43
|
+
"idempotency_key": "0d30bd53-9777-49de-8893-882fd2914757"
|
44
|
+
},
|
45
|
+
"type": "payout.updated"
|
46
|
+
}
|
@@ -1,20 +1,37 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"livemode": false,
|
4
|
-
"id": "evt_00000000000000",
|
5
|
-
"type": "plan.created",
|
2
|
+
"id": "evt_000000000000000000000000",
|
6
3
|
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320109,
|
7
6
|
"data": {
|
8
7
|
"object": {
|
9
|
-
"
|
10
|
-
"product": "pr_00000000000000",
|
11
|
-
"amount": 100,
|
12
|
-
"currency": "usd",
|
13
|
-
"id": "fkx0AFo_00000000000000",
|
8
|
+
"id": "price_000000000000000000000000",
|
14
9
|
"object": "plan",
|
15
|
-
"
|
10
|
+
"active": true,
|
11
|
+
"aggregate_usage": null,
|
12
|
+
"amount": 1500,
|
13
|
+
"amount_decimal": "1500",
|
14
|
+
"billing_scheme": "per_unit",
|
15
|
+
"created": 1648320109,
|
16
|
+
"currency": "usd",
|
17
|
+
"interval": "month",
|
16
18
|
"interval_count": 1,
|
17
|
-
"
|
19
|
+
"livemode": false,
|
20
|
+
"metadata": {
|
21
|
+
},
|
22
|
+
"nickname": null,
|
23
|
+
"product": "prod_00000000000000",
|
24
|
+
"tiers_mode": null,
|
25
|
+
"transform_usage": null,
|
26
|
+
"trial_period_days": null,
|
27
|
+
"usage_type": "licensed"
|
18
28
|
}
|
19
|
-
}
|
20
|
-
|
29
|
+
},
|
30
|
+
"livemode": false,
|
31
|
+
"pending_webhooks": 2,
|
32
|
+
"request": {
|
33
|
+
"id": "req_00000000000000",
|
34
|
+
"idempotency_key": "64c22132-7234-47d6-a803-4e34ac0e883b"
|
35
|
+
},
|
36
|
+
"type": "plan.created"
|
37
|
+
}
|
@@ -1,20 +1,37 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"livemode": false,
|
4
|
-
"id": "evt_00000000000000",
|
5
|
-
"type": "plan.deleted",
|
2
|
+
"id": "evt_000000000000000000000000",
|
6
3
|
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320048,
|
7
6
|
"data": {
|
8
7
|
"object": {
|
9
|
-
"
|
10
|
-
"product": "pr_00000000000000",
|
11
|
-
"amount": 100,
|
12
|
-
"currency": "usd",
|
13
|
-
"id": "fkx0AFo_00000000000000",
|
8
|
+
"id": "plan_00000000000000",
|
14
9
|
"object": "plan",
|
15
|
-
"
|
10
|
+
"active": false,
|
11
|
+
"aggregate_usage": null,
|
12
|
+
"amount": 2000,
|
13
|
+
"amount_decimal": "2000",
|
14
|
+
"billing_scheme": "per_unit",
|
15
|
+
"created": 1648320047,
|
16
|
+
"currency": "usd",
|
17
|
+
"interval": "month",
|
16
18
|
"interval_count": 1,
|
17
|
-
"
|
19
|
+
"livemode": false,
|
20
|
+
"metadata": {
|
21
|
+
},
|
22
|
+
"nickname": null,
|
23
|
+
"product": "prod_00000000000000",
|
24
|
+
"tiers_mode": null,
|
25
|
+
"transform_usage": null,
|
26
|
+
"trial_period_days": null,
|
27
|
+
"usage_type": "licensed"
|
18
28
|
}
|
19
|
-
}
|
20
|
-
|
29
|
+
},
|
30
|
+
"livemode": false,
|
31
|
+
"pending_webhooks": 2,
|
32
|
+
"request": {
|
33
|
+
"id": "req_00000000000000",
|
34
|
+
"idempotency_key": null
|
35
|
+
},
|
36
|
+
"type": "plan.deleted"
|
37
|
+
}
|
@@ -1,23 +1,43 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"livemode": false,
|
4
|
-
"id": "evt_00000000000000",
|
5
|
-
"type": "plan.updated",
|
2
|
+
"id": "evt_000000000000000000000000",
|
6
3
|
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320056,
|
7
6
|
"data": {
|
8
7
|
"object": {
|
9
|
-
"
|
10
|
-
"product": "pr_00000000000000",
|
11
|
-
"amount": 100,
|
12
|
-
"currency": "usd",
|
13
|
-
"id": "fkx0AFo_00000000000000",
|
8
|
+
"id": "price_000000000000000000000000",
|
14
9
|
"object": "plan",
|
15
|
-
"
|
10
|
+
"active": true,
|
11
|
+
"aggregate_usage": null,
|
12
|
+
"amount": 1500,
|
13
|
+
"amount_decimal": "1500",
|
14
|
+
"billing_scheme": "per_unit",
|
15
|
+
"created": 1648320055,
|
16
|
+
"currency": "usd",
|
17
|
+
"interval": "month",
|
16
18
|
"interval_count": 1,
|
17
|
-
"
|
19
|
+
"livemode": false,
|
20
|
+
"metadata": {
|
21
|
+
"foo": "bar"
|
22
|
+
},
|
23
|
+
"nickname": null,
|
24
|
+
"product": "prod_00000000000000",
|
25
|
+
"tiers_mode": null,
|
26
|
+
"transform_usage": null,
|
27
|
+
"trial_period_days": null,
|
28
|
+
"usage_type": "licensed"
|
18
29
|
},
|
19
30
|
"previous_attributes": {
|
20
|
-
"
|
31
|
+
"metadata": {
|
32
|
+
"foo": null
|
33
|
+
}
|
21
34
|
}
|
22
|
-
}
|
23
|
-
|
35
|
+
},
|
36
|
+
"livemode": false,
|
37
|
+
"pending_webhooks": 2,
|
38
|
+
"request": {
|
39
|
+
"id": "req_00000000000000",
|
40
|
+
"idempotency_key": "113cda68-08d8-4118-aff7-ac98c4dc745b"
|
41
|
+
},
|
42
|
+
"type": "plan.updated"
|
43
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_000000000000000000000000",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320109,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "price_000000000000000000000000",
|
9
|
+
"object": "price",
|
10
|
+
"active": true,
|
11
|
+
"billing_scheme": "per_unit",
|
12
|
+
"created": 1648320109,
|
13
|
+
"currency": "usd",
|
14
|
+
"livemode": false,
|
15
|
+
"lookup_key": null,
|
16
|
+
"metadata": {
|
17
|
+
},
|
18
|
+
"nickname": null,
|
19
|
+
"product": "prod_00000000000000",
|
20
|
+
"recurring": {
|
21
|
+
"aggregate_usage": null,
|
22
|
+
"interval": "month",
|
23
|
+
"interval_count": 1,
|
24
|
+
"trial_period_days": null,
|
25
|
+
"usage_type": "licensed"
|
26
|
+
},
|
27
|
+
"tax_behavior": "unspecified",
|
28
|
+
"tiers_mode": null,
|
29
|
+
"transform_quantity": null,
|
30
|
+
"type": "recurring",
|
31
|
+
"unit_amount": 1500,
|
32
|
+
"unit_amount_decimal": "1500"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
"livemode": false,
|
36
|
+
"pending_webhooks": 2,
|
37
|
+
"request": {
|
38
|
+
"id": "req_00000000000000",
|
39
|
+
"idempotency_key": "64c22132-7234-47d6-a803-4e34ac0e883b"
|
40
|
+
},
|
41
|
+
"type": "price.created"
|
42
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_000000000000000000000000",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320048,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "plan_00000000000000",
|
9
|
+
"object": "price",
|
10
|
+
"active": false,
|
11
|
+
"billing_scheme": "per_unit",
|
12
|
+
"created": 1648320047,
|
13
|
+
"currency": "usd",
|
14
|
+
"livemode": false,
|
15
|
+
"lookup_key": null,
|
16
|
+
"metadata": {
|
17
|
+
},
|
18
|
+
"nickname": null,
|
19
|
+
"product": "prod_00000000000000",
|
20
|
+
"recurring": {
|
21
|
+
"aggregate_usage": null,
|
22
|
+
"interval": "month",
|
23
|
+
"interval_count": 1,
|
24
|
+
"trial_period_days": null,
|
25
|
+
"usage_type": "licensed"
|
26
|
+
},
|
27
|
+
"tax_behavior": "unspecified",
|
28
|
+
"tiers_mode": null,
|
29
|
+
"transform_quantity": null,
|
30
|
+
"type": "recurring",
|
31
|
+
"unit_amount": 2000,
|
32
|
+
"unit_amount_decimal": "2000"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
"livemode": false,
|
36
|
+
"pending_webhooks": 2,
|
37
|
+
"request": {
|
38
|
+
"id": "req_00000000000000",
|
39
|
+
"idempotency_key": null
|
40
|
+
},
|
41
|
+
"type": "price.deleted"
|
42
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_000000000000000000000000",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320056,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "price_000000000000000000000000",
|
9
|
+
"object": "price",
|
10
|
+
"active": true,
|
11
|
+
"billing_scheme": "per_unit",
|
12
|
+
"created": 1648320055,
|
13
|
+
"currency": "usd",
|
14
|
+
"livemode": false,
|
15
|
+
"lookup_key": null,
|
16
|
+
"metadata": {
|
17
|
+
"foo": "bar"
|
18
|
+
},
|
19
|
+
"nickname": null,
|
20
|
+
"product": "prod_00000000000000",
|
21
|
+
"recurring": {
|
22
|
+
"aggregate_usage": null,
|
23
|
+
"interval": "month",
|
24
|
+
"interval_count": 1,
|
25
|
+
"trial_period_days": null,
|
26
|
+
"usage_type": "licensed"
|
27
|
+
},
|
28
|
+
"tax_behavior": "unspecified",
|
29
|
+
"tiers_mode": null,
|
30
|
+
"transform_quantity": null,
|
31
|
+
"type": "recurring",
|
32
|
+
"unit_amount": 1500,
|
33
|
+
"unit_amount_decimal": "1500"
|
34
|
+
},
|
35
|
+
"previous_attributes": {
|
36
|
+
"metadata": {
|
37
|
+
"foo": null
|
38
|
+
}
|
39
|
+
}
|
40
|
+
},
|
41
|
+
"livemode": false,
|
42
|
+
"pending_webhooks": 2,
|
43
|
+
"request": {
|
44
|
+
"id": "req_00000000000000",
|
45
|
+
"idempotency_key": "113cda68-08d8-4118-aff7-ac98c4dc745b"
|
46
|
+
},
|
47
|
+
"type": "price.updated"
|
48
|
+
}
|
@@ -1,34 +1,40 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"livemode": false,
|
4
|
-
"id": "evt_00000000000000",
|
5
|
-
"type": "product.created",
|
2
|
+
"id": "evt_000000000000000000000000",
|
6
3
|
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320108,
|
7
6
|
"data": {
|
8
7
|
"object": {
|
9
8
|
"id": "prod_00000000000000",
|
10
9
|
"object": "product",
|
11
10
|
"active": true,
|
12
11
|
"attributes": [
|
12
|
+
|
13
13
|
],
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"deactivate_on": [
|
17
|
-
],
|
18
|
-
"description": null,
|
14
|
+
"created": 1648320108,
|
15
|
+
"description": "(created by Stripe CLI)",
|
19
16
|
"images": [
|
17
|
+
|
20
18
|
],
|
21
19
|
"livemode": false,
|
22
20
|
"metadata": {
|
23
21
|
},
|
24
|
-
"name": "
|
22
|
+
"name": "myproduct",
|
25
23
|
"package_dimensions": null,
|
26
24
|
"shippable": null,
|
27
25
|
"statement_descriptor": null,
|
26
|
+
"tax_code": null,
|
28
27
|
"type": "service",
|
29
28
|
"unit_label": null,
|
30
|
-
"updated":
|
29
|
+
"updated": 1648320108,
|
31
30
|
"url": null
|
32
31
|
}
|
33
|
-
}
|
34
|
-
|
32
|
+
},
|
33
|
+
"livemode": false,
|
34
|
+
"pending_webhooks": 2,
|
35
|
+
"request": {
|
36
|
+
"id": "req_00000000000000",
|
37
|
+
"idempotency_key": "7f0e85cc-cf96-42be-a33a-07339f9fbe50"
|
38
|
+
},
|
39
|
+
"type": "product.created"
|
40
|
+
}
|
@@ -1,34 +1,40 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"livemode": false,
|
4
|
-
"id": "evt_00000000000000",
|
5
|
-
"type": "product.deleted",
|
2
|
+
"id": "evt_000000000000000000000000",
|
6
3
|
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320062,
|
7
6
|
"data": {
|
8
7
|
"object": {
|
9
8
|
"id": "prod_00000000000000",
|
10
9
|
"object": "product",
|
11
|
-
"active":
|
10
|
+
"active": false,
|
12
11
|
"attributes": [
|
12
|
+
|
13
13
|
],
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"deactivate_on": [
|
17
|
-
],
|
18
|
-
"description": null,
|
14
|
+
"created": 1648320060,
|
15
|
+
"description": "(created by Stripe CLI)t",
|
19
16
|
"images": [
|
17
|
+
|
20
18
|
],
|
21
19
|
"livemode": false,
|
22
20
|
"metadata": {
|
23
21
|
},
|
24
|
-
"name": "
|
22
|
+
"name": "myproduct",
|
25
23
|
"package_dimensions": null,
|
26
24
|
"shippable": null,
|
27
25
|
"statement_descriptor": null,
|
26
|
+
"tax_code": null,
|
28
27
|
"type": "service",
|
29
28
|
"unit_label": null,
|
30
|
-
"updated":
|
29
|
+
"updated": 1648320062,
|
31
30
|
"url": null
|
32
31
|
}
|
33
|
-
}
|
34
|
-
|
32
|
+
},
|
33
|
+
"livemode": false,
|
34
|
+
"pending_webhooks": 2,
|
35
|
+
"request": {
|
36
|
+
"id": "req_00000000000000",
|
37
|
+
"idempotency_key": null
|
38
|
+
},
|
39
|
+
"type": "product.deleted"
|
40
|
+
}
|
@@ -1,38 +1,47 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"livemode": false,
|
4
|
-
"id": "evt_00000000000000",
|
5
|
-
"type": "product.updated",
|
2
|
+
"id": "evt_000000000000000000000000",
|
6
3
|
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320064,
|
7
6
|
"data": {
|
8
7
|
"object": {
|
9
8
|
"id": "prod_00000000000000",
|
10
9
|
"object": "product",
|
11
10
|
"active": true,
|
12
11
|
"attributes": [
|
12
|
+
|
13
13
|
],
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"deactivate_on": [
|
17
|
-
],
|
18
|
-
"description": null,
|
14
|
+
"created": 1648320063,
|
15
|
+
"description": "(created by Stripe CLI)",
|
19
16
|
"images": [
|
17
|
+
|
20
18
|
],
|
21
19
|
"livemode": false,
|
22
20
|
"metadata": {
|
21
|
+
"foo": "bar"
|
23
22
|
},
|
24
|
-
"name": "
|
23
|
+
"name": "myproduct",
|
25
24
|
"package_dimensions": null,
|
26
25
|
"shippable": null,
|
27
26
|
"statement_descriptor": null,
|
27
|
+
"tax_code": null,
|
28
28
|
"type": "service",
|
29
29
|
"unit_label": null,
|
30
|
-
"updated":
|
30
|
+
"updated": 1648320064,
|
31
31
|
"url": null
|
32
32
|
},
|
33
33
|
"previous_attributes": {
|
34
|
-
"
|
35
|
-
|
34
|
+
"metadata": {
|
35
|
+
"foo": null
|
36
|
+
},
|
37
|
+
"updated": 1648320063
|
36
38
|
}
|
37
|
-
}
|
38
|
-
|
39
|
+
},
|
40
|
+
"livemode": false,
|
41
|
+
"pending_webhooks": 1,
|
42
|
+
"request": {
|
43
|
+
"id": "req_00000000000000",
|
44
|
+
"idempotency_key": "bf930f8a-e972-4b61-9ee0-492f139aefa3"
|
45
|
+
},
|
46
|
+
"type": "product.updated"
|
47
|
+
}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_000000000000000000000000",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2020-08-27",
|
5
|
+
"created": 1648320071,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "qt_000000000000000000000000",
|
9
|
+
"object": "quote",
|
10
|
+
"amount_subtotal": 15000,
|
11
|
+
"amount_total": 15000,
|
12
|
+
"application_fee_amount": null,
|
13
|
+
"application_fee_percent": null,
|
14
|
+
"automatic_tax": {
|
15
|
+
"enabled": false,
|
16
|
+
"status": null
|
17
|
+
},
|
18
|
+
"collection_method": "charge_automatically",
|
19
|
+
"computed": {
|
20
|
+
"recurring": {
|
21
|
+
"amount_subtotal": 15000,
|
22
|
+
"amount_total": 15000,
|
23
|
+
"interval": "month",
|
24
|
+
"interval_count": 1,
|
25
|
+
"total_details": {
|
26
|
+
"amount_discount": 0,
|
27
|
+
"amount_shipping": 0,
|
28
|
+
"amount_tax": 0
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"upfront": {
|
32
|
+
"amount_subtotal": 15000,
|
33
|
+
"amount_total": 15000,
|
34
|
+
"total_details": {
|
35
|
+
"amount_discount": 0,
|
36
|
+
"amount_shipping": 0,
|
37
|
+
"amount_tax": 0
|
38
|
+
}
|
39
|
+
}
|
40
|
+
},
|
41
|
+
"created": 1648320070,
|
42
|
+
"currency": "usd",
|
43
|
+
"customer": "cus_00000000000000",
|
44
|
+
"default_tax_rates": [
|
45
|
+
|
46
|
+
],
|
47
|
+
"description": "(created by Stripe CLI)",
|
48
|
+
"discounts": [
|
49
|
+
|
50
|
+
],
|
51
|
+
"expires_at": 1650912070,
|
52
|
+
"footer": null,
|
53
|
+
"from_quote": null,
|
54
|
+
"header": null,
|
55
|
+
"invoice": "in_000000000000000000000000",
|
56
|
+
"invoice_settings": {
|
57
|
+
"days_until_due": null
|
58
|
+
},
|
59
|
+
"livemode": false,
|
60
|
+
"metadata": {
|
61
|
+
},
|
62
|
+
"number": "QT-F5FD0419-0001-1",
|
63
|
+
"on_behalf_of": null,
|
64
|
+
"status": "accepted",
|
65
|
+
"status_transitions": {
|
66
|
+
"accepted_at": 1648320071,
|
67
|
+
"canceled_at": null,
|
68
|
+
"finalized_at": 1648320070
|
69
|
+
},
|
70
|
+
"subscription": "sub_000000000000000000000000",
|
71
|
+
"subscription_data": {
|
72
|
+
"effective_date": null,
|
73
|
+
"trial_period_days": null
|
74
|
+
},
|
75
|
+
"subscription_schedule": null,
|
76
|
+
"test_clock": null,
|
77
|
+
"total_details": {
|
78
|
+
"amount_discount": 0,
|
79
|
+
"amount_shipping": 0,
|
80
|
+
"amount_tax": 0
|
81
|
+
},
|
82
|
+
"transfer_data": null
|
83
|
+
}
|
84
|
+
},
|
85
|
+
"livemode": false,
|
86
|
+
"pending_webhooks": 2,
|
87
|
+
"request": {
|
88
|
+
"id": "req_00000000000000",
|
89
|
+
"idempotency_key": "456e23c0-aebf-4ec5-b23a-a1097b504557"
|
90
|
+
},
|
91
|
+
"type": "quote.accepted"
|
92
|
+
}
|