stripe-ruby-mock 3.1.0.rc3 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rspec_tests.yml +38 -0
  3. data/.rspec +2 -1
  4. data/CHANGELOG.md +36 -0
  5. data/Gemfile +0 -5
  6. data/README.md +6 -4
  7. data/lib/stripe_mock/api/client.rb +1 -1
  8. data/lib/stripe_mock/api/webhooks.rb +65 -26
  9. data/lib/stripe_mock/data.rb +80 -11
  10. data/lib/stripe_mock/instance.rb +7 -3
  11. data/lib/stripe_mock/request_handlers/accounts.rb +17 -6
  12. data/lib/stripe_mock/request_handlers/charges.rb +25 -1
  13. data/lib/stripe_mock/request_handlers/checkout_session.rb +158 -1
  14. data/lib/stripe_mock/request_handlers/customers.rb +12 -1
  15. data/lib/stripe_mock/request_handlers/events.rb +30 -3
  16. data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +1 -0
  17. data/lib/stripe_mock/request_handlers/helpers/search_helpers.rb +67 -0
  18. data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +28 -9
  19. data/lib/stripe_mock/request_handlers/invoices.rb +16 -2
  20. data/lib/stripe_mock/request_handlers/payment_intents.rb +23 -3
  21. data/lib/stripe_mock/request_handlers/payment_methods.rb +5 -1
  22. data/lib/stripe_mock/request_handlers/prices.rb +31 -4
  23. data/lib/stripe_mock/request_handlers/products.rb +14 -5
  24. data/lib/stripe_mock/request_handlers/promotion_codes.rb +43 -0
  25. data/lib/stripe_mock/request_handlers/refunds.rb +13 -2
  26. data/lib/stripe_mock/request_handlers/setup_intents.rb +16 -9
  27. data/lib/stripe_mock/request_handlers/subscriptions.rb +103 -5
  28. data/lib/stripe_mock/request_handlers/transfers.rb +12 -1
  29. data/lib/stripe_mock/request_handlers/validators/param_validators.rb +5 -4
  30. data/lib/stripe_mock/test_strategies/base.rb +51 -24
  31. data/lib/stripe_mock/version.rb +1 -1
  32. data/lib/stripe_mock/webhook_fixtures/account.updated.json +1 -1
  33. data/lib/stripe_mock/webhook_fixtures/balance.available.json +26 -20
  34. data/lib/stripe_mock/webhook_fixtures/charge.captured.json +143 -0
  35. data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +63 -16
  36. data/lib/stripe_mock/webhook_fixtures/charge.failed.json +49 -120
  37. data/lib/stripe_mock/webhook_fixtures/charge.refund.updated.json +35 -0
  38. data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +145 -50
  39. data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +114 -43
  40. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.json +79 -0
  41. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.payment_mode.json +53 -0
  42. data/lib/stripe_mock/webhook_fixtures/checkout.session.completed.setup_mode.json +45 -0
  43. data/lib/stripe_mock/webhook_fixtures/customer.created.json +37 -46
  44. data/lib/stripe_mock/webhook_fixtures/customer.deleted.json +36 -32
  45. data/lib/stripe_mock/webhook_fixtures/customer.source.created.json +31 -22
  46. data/lib/stripe_mock/webhook_fixtures/customer.source.updated.json +36 -25
  47. data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +135 -47
  48. data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +134 -45
  49. data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +135 -56
  50. data/lib/stripe_mock/webhook_fixtures/customer.updated.json +38 -47
  51. data/lib/stripe_mock/webhook_fixtures/invoice.created.json +176 -49
  52. data/lib/stripe_mock/webhook_fixtures/invoice.finalized.json +171 -0
  53. data/lib/stripe_mock/webhook_fixtures/invoice.paid.json +171 -0
  54. data/lib/stripe_mock/webhook_fixtures/invoice.payment_action_required.json +171 -0
  55. data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +149 -83
  56. data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +149 -90
  57. data/lib/stripe_mock/webhook_fixtures/invoice.upcoming.json +70 -0
  58. data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +178 -50
  59. data/lib/stripe_mock/webhook_fixtures/invoiceitem.created.json +87 -13
  60. data/lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json +88 -14
  61. data/lib/stripe_mock/webhook_fixtures/mandate.updated.json +34 -0
  62. data/lib/stripe_mock/webhook_fixtures/payment_intent.amount_capturable_updated.json +170 -0
  63. data/lib/stripe_mock/webhook_fixtures/payment_intent.canceled.json +73 -0
  64. data/lib/stripe_mock/webhook_fixtures/payment_intent.created.json +86 -0
  65. data/lib/stripe_mock/webhook_fixtures/payment_intent.payment_failed.json +118 -79
  66. data/lib/stripe_mock/webhook_fixtures/payment_intent.processing.json +162 -0
  67. data/lib/stripe_mock/webhook_fixtures/payment_intent.requires_action.json +191 -0
  68. data/lib/stripe_mock/webhook_fixtures/payment_intent.succeeded.json +85 -53
  69. data/lib/stripe_mock/webhook_fixtures/payment_link.created.json +47 -0
  70. data/lib/stripe_mock/webhook_fixtures/payment_link.updated.json +50 -0
  71. data/lib/stripe_mock/webhook_fixtures/payment_method.attached.json +63 -0
  72. data/lib/stripe_mock/webhook_fixtures/payment_method.detached.json +62 -0
  73. data/lib/stripe_mock/webhook_fixtures/payout.created.json +40 -0
  74. data/lib/stripe_mock/webhook_fixtures/payout.paid.json +40 -0
  75. data/lib/stripe_mock/webhook_fixtures/payout.updated.json +46 -0
  76. data/lib/stripe_mock/webhook_fixtures/plan.created.json +30 -13
  77. data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +30 -13
  78. data/lib/stripe_mock/webhook_fixtures/plan.updated.json +34 -14
  79. data/lib/stripe_mock/webhook_fixtures/price.created.json +42 -0
  80. data/lib/stripe_mock/webhook_fixtures/price.deleted.json +42 -0
  81. data/lib/stripe_mock/webhook_fixtures/price.updated.json +48 -0
  82. data/lib/stripe_mock/webhook_fixtures/product.created.json +19 -13
  83. data/lib/stripe_mock/webhook_fixtures/product.deleted.json +20 -14
  84. data/lib/stripe_mock/webhook_fixtures/product.updated.json +24 -15
  85. data/lib/stripe_mock/webhook_fixtures/quote.accepted.json +92 -0
  86. data/lib/stripe_mock/webhook_fixtures/quote.canceled.json +92 -0
  87. data/lib/stripe_mock/webhook_fixtures/quote.created.json +92 -0
  88. data/lib/stripe_mock/webhook_fixtures/quote.finalized.json +92 -0
  89. data/lib/stripe_mock/webhook_fixtures/setup_intent.canceled.json +46 -0
  90. data/lib/stripe_mock/webhook_fixtures/setup_intent.created.json +51 -0
  91. data/lib/stripe_mock/webhook_fixtures/setup_intent.setup_failed.json +100 -0
  92. data/lib/stripe_mock/webhook_fixtures/setup_intent.succeeded.json +46 -0
  93. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.canceled.json +119 -0
  94. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.created.json +114 -0
  95. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.released.json +111 -0
  96. data/lib/stripe_mock/webhook_fixtures/subscription_schedule.updated.json +125 -0
  97. data/lib/stripe_mock/webhook_fixtures/tax_rate.created.json +32 -0
  98. data/lib/stripe_mock/webhook_fixtures/tax_rate.updated.json +37 -0
  99. data/lib/stripe_mock.rb +4 -1
  100. data/spec/instance_spec.rb +3 -1
  101. data/spec/integration_examples/completing_checkout_sessions_example.rb +37 -0
  102. data/spec/readme_spec.rb +1 -1
  103. data/spec/shared_stripe_examples/account_examples.rb +9 -1
  104. data/spec/shared_stripe_examples/bank_token_examples.rb +5 -7
  105. data/spec/shared_stripe_examples/charge_examples.rb +97 -0
  106. data/spec/shared_stripe_examples/checkout_session_examples.rb +99 -0
  107. data/spec/shared_stripe_examples/customer_examples.rb +56 -0
  108. data/spec/shared_stripe_examples/invoice_examples.rb +107 -1
  109. data/spec/shared_stripe_examples/payment_intent_examples.rb +136 -0
  110. data/spec/shared_stripe_examples/payment_method_examples.rb +32 -27
  111. data/spec/shared_stripe_examples/price_examples.rb +111 -2
  112. data/spec/shared_stripe_examples/product_examples.rb +68 -0
  113. data/spec/shared_stripe_examples/promotion_code_examples.rb +68 -0
  114. data/spec/shared_stripe_examples/refund_examples.rb +13 -0
  115. data/spec/shared_stripe_examples/setup_intent_examples.rb +17 -0
  116. data/spec/shared_stripe_examples/subscription_examples.rb +276 -6
  117. data/spec/shared_stripe_examples/transfer_examples.rb +10 -1
  118. data/spec/shared_stripe_examples/webhook_event_examples.rb +51 -5
  119. data/spec/spec_helper.rb +1 -1
  120. data/spec/support/stripe_examples.rb +3 -1
  121. data/stripe-ruby-mock.gemspec +3 -4
  122. metadata +59 -29
  123. data/.travis.yml +0 -25
  124. data/lib/stripe_mock/request_handlers/checkout.rb +0 -15
  125. data/spec/shared_stripe_examples/checkout_examples.rb +0 -47
@@ -1,20 +1,37 @@
1
1
  {
2
- "created": 1326853478,
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
- "interval": "month",
10
- "product": "pr_00000000000000",
11
- "amount": 100,
12
- "currency": "usd",
13
- "id": "fkx0AFo_00000000000000",
8
+ "id": "plan_00000000000000",
14
9
  "object": "plan",
15
- "livemode": false,
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
- "trial_period_days": null
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
- "created": 1326853478,
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
- "interval": "month",
10
- "product": "pr_00000000000000",
11
- "amount": 100,
12
- "currency": "usd",
13
- "id": "fkx0AFo_00000000000000",
8
+ "id": "price_000000000000000000000000",
14
9
  "object": "plan",
15
- "livemode": false,
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
- "trial_period_days": null
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
- "name": "Old name"
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
- "created": 1326853478,
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
- "caption": null,
15
- "created": 1558795883,
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": "Test Product",
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": 1558795883,
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
- "created": 1326853478,
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": true,
10
+ "active": false,
12
11
  "attributes": [
12
+
13
13
  ],
14
- "caption": null,
15
- "created": 1558795883,
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": "Test Product",
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": 1558795883,
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
- "created": 1326853478,
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
- "caption": null,
15
- "created": 1558795883,
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": "Test Product",
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": 1558795883,
30
+ "updated": 1648320064,
31
31
  "url": null
32
32
  },
33
33
  "previous_attributes": {
34
- "name": "Product Test",
35
- "updated": 1558873981
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
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320077,
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": 1648320076,
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": 1650912076,
52
+ "footer": null,
53
+ "from_quote": null,
54
+ "header": null,
55
+ "invoice": null,
56
+ "invoice_settings": {
57
+ "days_until_due": null
58
+ },
59
+ "livemode": false,
60
+ "metadata": {
61
+ },
62
+ "number": null,
63
+ "on_behalf_of": null,
64
+ "status": "canceled",
65
+ "status_transitions": {
66
+ "accepted_at": null,
67
+ "canceled_at": 1648320077,
68
+ "finalized_at": null
69
+ },
70
+ "subscription": null,
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": "81d553e8-c88c-4a3e-9572-24da02fd83c0"
90
+ },
91
+ "type": "quote.canceled"
92
+ }