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,55 +1,126 @@
1
1
  {
2
- "created": 1326853478,
3
- "livemode": false,
4
- "id": "evt_00000000000000",
5
- "type": "charge.succeeded",
2
+ "id": "evt_000000000000000000000000",
6
3
  "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320032,
7
6
  "data": {
8
7
  "object": {
9
- "id": "ch_00000000000000",
8
+ "id": "ch_000000000000000000000000",
10
9
  "object": "charge",
11
- "created": 1380933505,
10
+ "amount": 2000,
11
+ "amount_captured": 2000,
12
+ "amount_refunded": 0,
13
+ "application": null,
14
+ "application_fee": null,
15
+ "application_fee_amount": null,
16
+ "balance_transaction": "txn_000000000000000000000000",
17
+ "billing_details": {
18
+ "address": {
19
+ "city": null,
20
+ "country": null,
21
+ "line1": null,
22
+ "line2": null,
23
+ "postal_code": null,
24
+ "state": null
25
+ },
26
+ "email": null,
27
+ "name": null,
28
+ "phone": null
29
+ },
30
+ "calculated_statement_descriptor": "EXAMPLECOMPANY",
31
+ "captured": true,
32
+ "created": 1648320032,
33
+ "currency": "usd",
34
+ "customer": null,
35
+ "description": "(created by Stripe CLI)",
36
+ "destination": null,
37
+ "dispute": null,
38
+ "disputed": false,
39
+ "failure_code": null,
40
+ "failure_message": null,
41
+ "fraud_details": {
42
+ },
43
+ "invoice": null,
12
44
  "livemode": false,
45
+ "metadata": {
46
+ },
47
+ "on_behalf_of": null,
48
+ "order": null,
49
+ "outcome": {
50
+ "network_status": "approved_by_network",
51
+ "reason": null,
52
+ "risk_level": "normal",
53
+ "risk_score": 2,
54
+ "seller_message": "Payment complete.",
55
+ "type": "authorized"
56
+ },
13
57
  "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
58
+ "payment_intent": "pi_000000000000000000000000",
59
+ "payment_method": "pm_000000000000000000000000",
60
+ "payment_method_details": {
61
+ "card": {
62
+ "brand": "visa",
63
+ "checks": {
64
+ "address_line1_check": null,
65
+ "address_postal_code_check": null,
66
+ "cvc_check": null
67
+ },
68
+ "country": "US",
69
+ "exp_month": 3,
70
+ "exp_year": 2023,
71
+ "fingerprint": "ZoVSX2dK5igWt2SB",
72
+ "funding": "credit",
73
+ "installments": null,
74
+ "last4": "4242",
75
+ "mandate": null,
76
+ "network": "visa",
77
+ "three_d_secure": null,
78
+ "wallet": null
79
+ },
80
+ "type": "card"
38
81
  },
39
- "captured": true,
82
+ "receipt_email": null,
83
+ "receipt_number": null,
84
+ "receipt_url": "https://pay.stripe.com/receipts/acct_0000000000000000/ch_000000000000000000000000/rcpt_0000000000000000000000000000000",
85
+ "refunded": false,
40
86
  "refunds": {
87
+ "object": "list",
88
+ "data": [
41
89
 
90
+ ],
91
+ "has_more": false,
92
+ "total_count": 0,
93
+ "url": "/v1/charges/ch_000000000000000000000000/refunds"
42
94
  },
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": null,
50
- "dispute": null,
51
- "metadata": {
52
- }
95
+ "review": null,
96
+ "shipping": {
97
+ "address": {
98
+ "city": "San Francisco",
99
+ "country": "US",
100
+ "line1": "510 Townsend St",
101
+ "line2": null,
102
+ "postal_code": "94103",
103
+ "state": "CA"
104
+ },
105
+ "carrier": null,
106
+ "name": "Jenny Rosen",
107
+ "phone": null,
108
+ "tracking_number": null
109
+ },
110
+ "source": null,
111
+ "source_transfer": null,
112
+ "statement_descriptor": null,
113
+ "statement_descriptor_suffix": null,
114
+ "status": "succeeded",
115
+ "transfer_data": null,
116
+ "transfer_group": null
53
117
  }
54
- }
55
- }
118
+ },
119
+ "livemode": false,
120
+ "pending_webhooks": 2,
121
+ "request": {
122
+ "id": "req_00000000000000",
123
+ "idempotency_key": "7143a956-2f40-407a-b312-43038ae76c86"
124
+ },
125
+ "type": "charge.succeeded"
126
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648319959,
6
+ "data": {
7
+ "object": {
8
+ "id": "cs_test_0000000000000000000000000000000000000000000000000000000000",
9
+ "object": "checkout.session",
10
+ "after_expiration": null,
11
+ "allow_promotion_codes": null,
12
+ "amount_subtotal": 3000,
13
+ "amount_total": 3000,
14
+ "automatic_tax": {
15
+ "enabled": false,
16
+ "status": null
17
+ },
18
+ "billing_address_collection": null,
19
+ "cancel_url": "https://httpbin.org/post",
20
+ "client_reference_id": null,
21
+ "consent": null,
22
+ "consent_collection": null,
23
+ "currency": "usd",
24
+ "customer": "cus_00000000000000",
25
+ "customer_creation": "always",
26
+ "customer_details": {
27
+ "email": "stripe@example.com",
28
+ "phone": null,
29
+ "tax_exempt": "none",
30
+ "tax_ids": [
31
+
32
+ ]
33
+ },
34
+ "customer_email": null,
35
+ "expires_at": 1648406355,
36
+ "livemode": false,
37
+ "locale": null,
38
+ "metadata": {
39
+ },
40
+ "mode": "payment",
41
+ "payment_intent": "pi_000000000000000000000000",
42
+ "payment_link": null,
43
+ "payment_method_options": {
44
+ },
45
+ "payment_method_types": [
46
+ "card"
47
+ ],
48
+ "payment_status": "paid",
49
+ "phone_number_collection": {
50
+ "enabled": false
51
+ },
52
+ "recovered_from": null,
53
+ "setup_intent": null,
54
+ "shipping": null,
55
+ "shipping_address_collection": null,
56
+ "shipping_options": [
57
+
58
+ ],
59
+ "shipping_rate": null,
60
+ "status": "complete",
61
+ "submit_type": null,
62
+ "subscription": null,
63
+ "success_url": "https://httpbin.org/post",
64
+ "total_details": {
65
+ "amount_discount": 0,
66
+ "amount_shipping": 0,
67
+ "amount_tax": 0
68
+ },
69
+ "url": null
70
+ }
71
+ },
72
+ "livemode": false,
73
+ "pending_webhooks": 2,
74
+ "request": {
75
+ "id": null,
76
+ "idempotency_key": null
77
+ },
78
+ "type": "checkout.session.completed"
79
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "checkout.session.completed",
6
+ "object": "event",
7
+ "data": {
8
+ "object": {
9
+ "id": "cs_00000000000000",
10
+ "object": "checkout.session",
11
+ "allow_promotion_codes": null,
12
+ "amount_subtotal": 25000,
13
+ "amount_total": 25000,
14
+ "automatic_tax": {
15
+ "enabled": false,
16
+ "status": null
17
+ },
18
+ "billing_address_collection": null,
19
+ "cancel_url": "https://example.com/cancel",
20
+ "client_reference_id": null,
21
+ "currency": "usd",
22
+ "customer": "cus_00000000000000",
23
+ "customer_details": {
24
+ "email": "example@example.com",
25
+ "tax_exempt": "none",
26
+ "tax_ids": []
27
+ },
28
+ "customer_email": null,
29
+ "livemode": false,
30
+ "locale": null,
31
+ "metadata": {},
32
+ "mode": "payment",
33
+ "payment_intent": "pi_00000000000000",
34
+ "payment_method_options": {},
35
+ "payment_method_types": [
36
+ "card"
37
+ ],
38
+ "payment_status": "paid",
39
+ "setup_intent": null,
40
+ "shipping": null,
41
+ "shipping_address_collection": null,
42
+ "submit_type": null,
43
+ "subscription": null,
44
+ "success_url": "https://example.com/success",
45
+ "total_details": {
46
+ "amount_discount": 0,
47
+ "amount_shipping": 0,
48
+ "amount_tax": 0
49
+ },
50
+ "url": null
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "checkout.session.completed",
6
+ "object": "event",
7
+ "data": {
8
+ "object": {
9
+ "id": "cs_00000000000000",
10
+ "object": "checkout.session",
11
+ "allow_promotion_codes": null,
12
+ "amount_subtotal": null,
13
+ "amount_total": null,
14
+ "automatic_tax": {
15
+ "enabled": false,
16
+ "status": null
17
+ },
18
+ "billing_address_collection": null,
19
+ "cancel_url": "https://example.com/cancel",
20
+ "client_reference_id": null,
21
+ "currency": null,
22
+ "customer": null,
23
+ "customer_details": null,
24
+ "customer_email": null,
25
+ "livemode": false,
26
+ "locale": null,
27
+ "metadata": {},
28
+ "mode": "setup",
29
+ "payment_intent": null,
30
+ "payment_method_options": {},
31
+ "payment_method_types": [
32
+ "card"
33
+ ],
34
+ "payment_status": "no_payment_required",
35
+ "setup_intent": "seti_00000000000000",
36
+ "shipping": null,
37
+ "shipping_address_collection": null,
38
+ "submit_type": null,
39
+ "subscription": null,
40
+ "success_url": "https://example.com/success",
41
+ "total_details": null,
42
+ "url": null
43
+ }
44
+ }
45
+ }
@@ -1,55 +1,46 @@
1
1
  {
2
- "created": 1326853478,
3
- "livemode": false,
4
- "id": "evt_00000000000000",
5
- "type": "customer.created",
2
+ "id": "evt_000000000000000000000000",
6
3
  "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320107,
7
6
  "data": {
8
7
  "object": {
9
- "object": "customer",
10
- "created": 1375148334,
11
8
  "id": "cus_00000000000000",
9
+ "object": "customer",
10
+ "address": null,
11
+ "balance": 0,
12
+ "created": 1648320107,
13
+ "currency": null,
14
+ "default_source": "card_000000000000000000000000",
15
+ "delinquent": false,
16
+ "description": "(created by Stripe CLI)",
17
+ "discount": null,
18
+ "email": null,
19
+ "invoice_prefix": "985BA9CB",
20
+ "invoice_settings": {
21
+ "custom_fields": null,
22
+ "default_payment_method": null,
23
+ "footer": null
24
+ },
12
25
  "livemode": false,
13
- "description": null,
14
- "email": "bond@mailinator.com",
15
- "delinquent": true,
16
26
  "metadata": {
17
27
  },
18
- "preferred_locales": [],
19
- "subscription": null,
20
- "discount": null,
21
- "account_balance": 0,
22
- "sources": {
23
- "object": "list",
24
- "count": 1,
25
- "url": "/v1/customers/cus_2I2AhGQOPmEFeu/cards",
26
- "data": [
27
- {
28
- "id": "cc_2I2akIhmladin5",
29
- "object": "card",
30
- "last4": "0341",
31
- "type": "Visa",
32
- "brand": "Visa",
33
- "funding": "credit",
34
- "exp_month": 12,
35
- "exp_year": 2013,
36
- "fingerprint": "fWvZEzdbEIFF8QrK",
37
- "customer": "cus_2I2AhGQOPmEFeu",
38
- "country": "US",
39
- "name": "Johnny Goodman",
40
- "address_line1": null,
41
- "address_line2": null,
42
- "address_city": null,
43
- "address_state": null,
44
- "address_zip": null,
45
- "address_country": null,
46
- "cvc_check": "pass",
47
- "address_line1_check": null,
48
- "address_zip_check": null
49
- }
50
- ]
51
- },
52
- "default_card": "cc_2I2akIhmladin5"
28
+ "name": null,
29
+ "next_invoice_sequence": 1,
30
+ "phone": null,
31
+ "preferred_locales": [
32
+
33
+ ],
34
+ "shipping": null,
35
+ "tax_exempt": "none",
36
+ "test_clock": null
53
37
  }
54
- }
55
- }
38
+ },
39
+ "livemode": false,
40
+ "pending_webhooks": 2,
41
+ "request": {
42
+ "id": "req_00000000000000",
43
+ "idempotency_key": "381c7773-97ac-4c18-8fbe-e8bff5e6bbad"
44
+ },
45
+ "type": "customer.created"
46
+ }
@@ -1,42 +1,46 @@
1
1
  {
2
- "created": 1326853478,
2
+ "id": "evt_000000000000000000000000",
3
+ "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648319961,
3
6
  "data": {
4
7
  "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,
8
+ "id": "cus_00000000000000",
9
+ "object": "customer",
10
+ "address": null,
11
+ "balance": 0,
12
+ "created": 1648319961,
13
+ "currency": null,
14
+ "default_source": null,
28
15
  "delinquent": false,
29
- "description": null,
16
+ "description": "(created by Stripe CLI)",
30
17
  "discount": null,
31
- "email": "ajoe@mailinator.com",
32
- "id": "cus_00000000000000",
18
+ "email": null,
19
+ "invoice_prefix": "D343B0B7",
20
+ "invoice_settings": {
21
+ "custom_fields": null,
22
+ "default_payment_method": null,
23
+ "footer": null
24
+ },
33
25
  "livemode": false,
34
- "object": "customer",
35
- "subscription": null
26
+ "metadata": {
27
+ },
28
+ "name": null,
29
+ "next_invoice_sequence": 1,
30
+ "phone": null,
31
+ "preferred_locales": [
32
+
33
+ ],
34
+ "shipping": null,
35
+ "tax_exempt": "none",
36
+ "test_clock": null
36
37
  }
37
38
  },
38
- "id": "evt_00000000000000",
39
39
  "livemode": false,
40
- "object": "event",
40
+ "pending_webhooks": 2,
41
+ "request": {
42
+ "id": "req_00000000000000",
43
+ "idempotency_key": null
44
+ },
41
45
  "type": "customer.deleted"
42
- }
46
+ }
@@ -1,32 +1,41 @@
1
1
  {
2
- "created": 1326853478,
3
- "livemode": false,
4
- "id": "evt_00000000000000",
5
- "type": "customer.source.created",
2
+ "id": "evt_000000000000000000000000",
6
3
  "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648320107,
7
6
  "data": {
8
7
  "object": {
9
- "id": "card_VALID",
8
+ "id": "card_000000000000000000000000",
10
9
  "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",
10
+ "address_city": null,
11
+ "address_country": null,
21
12
  "address_line1": null,
13
+ "address_line1_check": null,
22
14
  "address_line2": null,
23
- "address_city": null,
24
15
  "address_state": null,
25
16
  "address_zip": null,
26
- "address_country": null,
27
- "cvc_check": "pass",
28
- "address_line1_check": null,
29
- "address_zip_check": null
17
+ "address_zip_check": null,
18
+ "brand": "Visa",
19
+ "country": "US",
20
+ "customer": "cus_00000000000000",
21
+ "cvc_check": null,
22
+ "dynamic_last4": null,
23
+ "exp_month": 3,
24
+ "exp_year": 2023,
25
+ "fingerprint": "ZoVSX2dK5igWt2SB",
26
+ "funding": "credit",
27
+ "last4": "4242",
28
+ "metadata": {
29
+ },
30
+ "name": null,
31
+ "tokenization_method": null
30
32
  }
31
- }
32
- }
33
+ },
34
+ "livemode": false,
35
+ "pending_webhooks": 2,
36
+ "request": {
37
+ "id": "req_00000000000000",
38
+ "idempotency_key": "381c7773-97ac-4c18-8fbe-e8bff5e6bbad"
39
+ },
40
+ "type": "customer.source.created"
41
+ }
@@ -1,36 +1,47 @@
1
1
  {
2
- "created": 1326853478,
3
- "livemode": false,
4
- "id": "evt_00000000000000",
5
- "type": "customer.source.updated",
2
+ "id": "evt_000000000000000000000000",
6
3
  "object": "event",
4
+ "api_version": "2020-08-27",
5
+ "created": 1648319966,
7
6
  "data": {
8
7
  "object": {
9
- "id": "card_VALID",
8
+ "id": "card_000000000000000000000000",
10
9
  "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",
10
+ "address_city": null,
11
+ "address_country": null,
21
12
  "address_line1": null,
13
+ "address_line1_check": null,
22
14
  "address_line2": null,
23
- "address_city": null,
24
15
  "address_state": null,
25
16
  "address_zip": null,
26
- "address_country": null,
27
- "cvc_check": "pass",
28
- "address_line1_check": null,
29
- "address_zip_check": null
17
+ "address_zip_check": null,
18
+ "brand": "Visa",
19
+ "country": "US",
20
+ "customer": "cus_00000000000000",
21
+ "cvc_check": null,
22
+ "dynamic_last4": null,
23
+ "exp_month": 3,
24
+ "exp_year": 2023,
25
+ "fingerprint": "ZoVSX2dK5igWt2SB",
26
+ "funding": "credit",
27
+ "last4": "4242",
28
+ "metadata": {
29
+ "foo": "bar"
30
+ },
31
+ "name": null,
32
+ "tokenization_method": null
30
33
  },
31
- "previous_attributes":
32
- {
33
- "name": "Testy Tester Jr."
34
+ "previous_attributes": {
35
+ "metadata": {
36
+ "foo": null
37
+ }
34
38
  }
35
- }
36
- }
39
+ },
40
+ "livemode": false,
41
+ "pending_webhooks": 2,
42
+ "request": {
43
+ "id": "req_00000000000000",
44
+ "idempotency_key": "0b5b3636-5097-40ba-8839-7013d6090ab7"
45
+ },
46
+ "type": "customer.source.updated"
47
+ }