stripe_model_callbacks 0.1.0 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -1
  3. data/app/models/stripe_model_callbacks/application_record.rb +17 -0
  4. data/app/services/stripe_model_callbacks/account/external_account/updated_service.rb +1 -1
  5. data/app/services/stripe_model_callbacks/attributes_assigner_service.rb +1 -1
  6. data/app/services/stripe_model_callbacks/base_service.rb +35 -3
  7. data/app/services/stripe_model_callbacks/charge/dispute_updated_service.rb +1 -1
  8. data/app/services/stripe_model_callbacks/charge/updated_service.rb +1 -1
  9. data/app/services/stripe_model_callbacks/configure_service.rb +52 -24
  10. data/app/services/stripe_model_callbacks/coupon/sync_all.rb +9 -0
  11. data/app/services/stripe_model_callbacks/coupon/updated_service.rb +1 -1
  12. data/app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb +1 -1
  13. data/app/services/stripe_model_callbacks/customer/deleted_service.rb +1 -1
  14. data/app/services/stripe_model_callbacks/customer/discount_updated_service.rb +1 -1
  15. data/app/services/stripe_model_callbacks/customer/source_updated_service.rb +1 -1
  16. data/app/services/stripe_model_callbacks/customer/subscription/updated_service.rb +1 -1
  17. data/app/services/stripe_model_callbacks/customer/updated_service.rb +1 -1
  18. data/app/services/stripe_model_callbacks/event_mocker_service.rb +1 -1
  19. data/app/services/stripe_model_callbacks/invoice/updated_service.rb +1 -1
  20. data/app/services/stripe_model_callbacks/invoice_item/updated_service.rb +1 -1
  21. data/app/services/stripe_model_callbacks/notifier_service.rb +1 -1
  22. data/app/services/stripe_model_callbacks/order/updated_service.rb +1 -1
  23. data/app/services/stripe_model_callbacks/payout/updated_service.rb +1 -1
  24. data/app/services/stripe_model_callbacks/plan/sync_all.rb +9 -0
  25. data/app/services/stripe_model_callbacks/plan/updated_service.rb +1 -1
  26. data/app/services/stripe_model_callbacks/price/updated_service.rb +14 -0
  27. data/app/services/stripe_model_callbacks/product/updated_service.rb +1 -1
  28. data/app/services/stripe_model_callbacks/recipient/updated_service.rb +1 -1
  29. data/app/services/stripe_model_callbacks/refund/updated_service.rb +1 -1
  30. data/app/services/stripe_model_callbacks/review/updated_service.rb +1 -1
  31. data/app/services/stripe_model_callbacks/sku/updated_service.rb +1 -1
  32. data/app/services/stripe_model_callbacks/source/updated_service.rb +1 -1
  33. data/app/services/stripe_model_callbacks/subscription/state_checker_service.rb +2 -2
  34. data/app/services/stripe_model_callbacks/subscription_schedule/updated_service.rb +46 -0
  35. data/app/services/stripe_model_callbacks/sync_everything.rb +8 -0
  36. data/app/services/stripe_model_callbacks/sync_from_stripe.rb +29 -0
  37. data/app/services/stripe_model_callbacks/tax_rate/updated_service.rb +27 -0
  38. data/app/services/stripe_model_callbacks/transfer/updated_service.rb +1 -1
  39. data/db/migrate/20200317160513_add_auto_advance_and_billing_reason_to_stripe_invoices.rb +6 -0
  40. data/db/migrate/20200317160602_add_status_and_status_transitions_to_stripe_invoices.rb +10 -0
  41. data/db/migrate/20200317180115_add_product_type_to_products.rb +5 -0
  42. data/db/migrate/20200317181224_rename_stripe_invoices_application_fee_to_application_fee_amount.rb +6 -0
  43. data/db/migrate/20200320105158_make_stripe_invoices_forgive_optional.rb +5 -0
  44. data/db/migrate/20200320114859_make_stripe_invoice_closed_optional.rb +5 -0
  45. data/db/migrate/20200323143634_add_amount_paid_and_remaining_and_invoice_url_and_pdf.rb +11 -0
  46. data/db/migrate/20200331074940_add_unit_label_to_stripe_products.rb +5 -0
  47. data/db/migrate/20200331075241_add_metered_info_to_stripe_plans.rb +9 -0
  48. data/db/migrate/20200513131105_create_stripe_subscription_schedules.rb +31 -0
  49. data/db/migrate/20200513131120_create_stripe_subscription_schedule_phases.rb +21 -0
  50. data/db/migrate/20200513131640_create_stripe_subscription_schedule_phase_plans.rb +13 -0
  51. data/db/migrate/20200514132247_add_stripe_id_uniq_to_stripe_invoices.rb +8 -0
  52. data/db/migrate/20200520152604_change_stripe_subscription_schedule_phase_id_to_bigint.rb +27 -0
  53. data/db/migrate/20200529144649_add_latest_invoice_id_to_stripe_subscription.rb +5 -0
  54. data/db/migrate/20201223173035_rename_stripe_subscriptions_start_to_start_date.rb +5 -0
  55. data/db/migrate/20201223202117_create_stripe_tax_rates.rb +15 -0
  56. data/db/migrate/20201224120534_create_stripe_subscription_default_tax_rates.rb +9 -0
  57. data/db/migrate/20201224122058_create_stripe_prices.rb +26 -0
  58. data/db/migrate/20201224123838_add_stripe_price_to_stripe_subscription_items.rb +6 -0
  59. data/db/migrate/20211121155313_change_invoice_billing_to_nullable.rb +5 -0
  60. data/db/migrate/20211121155732_rename_invoices_billing_to_deprecated_billing.rb +5 -0
  61. data/lib/stripe_model_callbacks/configuration.rb +1 -1
  62. data/lib/stripe_model_callbacks/factories/stripe_bank_accounts.rb +5 -0
  63. data/lib/stripe_model_callbacks/factories/stripe_cards.rb +7 -0
  64. data/lib/stripe_model_callbacks/factories/stripe_charges.rb +11 -0
  65. data/lib/stripe_model_callbacks/factories/stripe_coupons.rb +21 -0
  66. data/lib/stripe_model_callbacks/factories/stripe_customers.rb +17 -0
  67. data/lib/stripe_model_callbacks/factories/stripe_discounts.rb +6 -0
  68. data/lib/stripe_model_callbacks/factories/stripe_disputes.rb +7 -0
  69. data/lib/stripe_model_callbacks/factories/stripe_invoice_items.rb +11 -0
  70. data/lib/stripe_model_callbacks/factories/stripe_invoices.rb +16 -0
  71. data/lib/stripe_model_callbacks/factories/stripe_order_items.rb +8 -0
  72. data/lib/stripe_model_callbacks/factories/stripe_orders.rb +9 -0
  73. data/lib/stripe_model_callbacks/factories/stripe_payouts.rb +5 -0
  74. data/lib/stripe_model_callbacks/factories/stripe_plans.rb +30 -0
  75. data/lib/stripe_model_callbacks/factories/stripe_prices.rb +3 -0
  76. data/lib/stripe_model_callbacks/factories/stripe_products.rb +18 -0
  77. data/lib/stripe_model_callbacks/factories/stripe_recipients.rb +5 -0
  78. data/lib/stripe_model_callbacks/factories/stripe_refunds.rb +9 -0
  79. data/lib/stripe_model_callbacks/factories/stripe_reviews.rb +6 -0
  80. data/lib/stripe_model_callbacks/factories/stripe_skus.rb +7 -0
  81. data/lib/stripe_model_callbacks/factories/stripe_sources.rb +8 -0
  82. data/lib/stripe_model_callbacks/factories/stripe_subscription_default_tax_rates.rb +6 -0
  83. data/lib/stripe_model_callbacks/factories/stripe_subscription_items.rb +19 -0
  84. data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule.rb.rb +5 -0
  85. data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phase_plan.rb +5 -0
  86. data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phases.rb +5 -0
  87. data/lib/stripe_model_callbacks/factories/stripe_subscriptions.rb +40 -0
  88. data/lib/stripe_model_callbacks/factories/stripe_tax_rates.rb +5 -0
  89. data/lib/stripe_model_callbacks/factories/stripe_transfers.rb +8 -0
  90. data/lib/stripe_model_callbacks/factory_bot_definitions.rb +1 -1
  91. data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.created.json +29 -0
  92. data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.deleted.json +29 -0
  93. data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.updated.json +31 -0
  94. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.closed.json +65 -0
  95. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.created.json +65 -0
  96. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_reinstated.json +65 -0
  97. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_withdrawn.json +65 -0
  98. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.updated.json +96 -0
  99. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refund.updated.json +28 -0
  100. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refunded.json +98 -0
  101. data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.created.json +29 -0
  102. data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.deleted.json +29 -0
  103. data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.updated.json +31 -0
  104. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.bank_account.deleted.json +29 -0
  105. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.created.json +36 -0
  106. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.deleted.json +47 -0
  107. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.created.json +36 -0
  108. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.deleted.json +36 -0
  109. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.updated.json +55 -0
  110. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.card.json +80 -0
  111. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.json +53 -0
  112. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.deleted.json +53 -0
  113. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.expiring.json +53 -0
  114. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.updated.json +56 -0
  115. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.2020-12-24.json +112 -0
  116. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.json +84 -0
  117. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.deleted.json +83 -0
  118. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.trial_will_end.json +88 -0
  119. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.updated.json +100 -0
  120. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.updated.json +50 -0
  121. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.created.json +135 -0
  122. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_failed.json +100 -0
  123. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_succeeded.json +207 -0
  124. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.sent.json +100 -0
  125. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.upcoming.json +100 -0
  126. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.updated.json +105 -0
  127. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.voided.json +152 -0
  128. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoiceitem/invoiceitem.created.json +34 -0
  129. data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.created.json +72 -0
  130. data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.updated.json +74 -0
  131. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.canceled.json +35 -0
  132. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.created.json +35 -0
  133. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.failed.json +35 -0
  134. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.paid.json +35 -0
  135. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.updated.json +37 -0
  136. data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.created.json +32 -0
  137. data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.deleted.json +27 -0
  138. data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.updated.json +30 -0
  139. data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.created.json +37 -0
  140. data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.deleted.json +37 -0
  141. data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.updated.json +40 -0
  142. data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.created.json +49 -0
  143. data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.deleted.json +48 -0
  144. data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.updated.json +50 -0
  145. data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.created.json +37 -0
  146. data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.deleted.json +37 -0
  147. data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.updated.json +39 -0
  148. data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.closed.json +21 -0
  149. data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.opened.json +21 -0
  150. data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.created.json +36 -0
  151. data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.deleted.json +36 -0
  152. data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.updated.json +38 -0
  153. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.canceled.json +53 -0
  154. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.chargeable.json +53 -0
  155. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.failed.json +53 -0
  156. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.mandate_notification.json +53 -0
  157. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.transaction_created.json +21 -0
  158. data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.canceled.json +81 -0
  159. data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.created.json +77 -0
  160. data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.updated.json +87 -0
  161. data/lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.created.json +26 -0
  162. data/lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.updated.json +29 -0
  163. data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.created.json +41 -0
  164. data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.reversed.json +40 -0
  165. data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.updated.json +44 -0
  166. data/lib/stripe_model_callbacks/models/stripe_bank_account.rb +1 -0
  167. data/lib/stripe_model_callbacks/models/stripe_card.rb +2 -1
  168. data/lib/stripe_model_callbacks/models/stripe_charge.rb +3 -0
  169. data/lib/stripe_model_callbacks/models/stripe_coupon.rb +1 -0
  170. data/lib/stripe_model_callbacks/models/stripe_customer.rb +4 -2
  171. data/lib/stripe_model_callbacks/models/stripe_discount.rb +10 -3
  172. data/lib/stripe_model_callbacks/models/stripe_dispute.rb +1 -0
  173. data/lib/stripe_model_callbacks/models/stripe_invoice.rb +62 -7
  174. data/lib/stripe_model_callbacks/models/stripe_invoice_item.rb +2 -0
  175. data/lib/stripe_model_callbacks/models/stripe_order.rb +1 -0
  176. data/lib/stripe_model_callbacks/models/stripe_order_item.rb +1 -0
  177. data/lib/stripe_model_callbacks/models/stripe_payout.rb +2 -1
  178. data/lib/stripe_model_callbacks/models/stripe_plan.rb +4 -1
  179. data/lib/stripe_model_callbacks/models/stripe_price.rb +27 -0
  180. data/lib/stripe_model_callbacks/models/stripe_product.rb +17 -7
  181. data/lib/stripe_model_callbacks/models/stripe_recipient.rb +1 -0
  182. data/lib/stripe_model_callbacks/models/stripe_refund.rb +1 -0
  183. data/lib/stripe_model_callbacks/models/stripe_review.rb +1 -0
  184. data/lib/stripe_model_callbacks/models/stripe_sku.rb +13 -6
  185. data/lib/stripe_model_callbacks/models/stripe_source.rb +4 -2
  186. data/lib/stripe_model_callbacks/models/stripe_subscription.rb +56 -6
  187. data/lib/stripe_model_callbacks/models/stripe_subscription_default_tax_rate.rb +4 -0
  188. data/lib/stripe_model_callbacks/models/stripe_subscription_item.rb +19 -1
  189. data/lib/stripe_model_callbacks/models/stripe_subscription_schedule.rb +94 -0
  190. data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase.rb +67 -0
  191. data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase_plan.rb +37 -0
  192. data/lib/stripe_model_callbacks/models/stripe_tax_rate.rb +22 -0
  193. data/lib/stripe_model_callbacks/models/stripe_transfer.rb +1 -0
  194. data/lib/stripe_model_callbacks/version.rb +1 -1
  195. data/lib/stripe_model_callbacks.rb +1 -0
  196. metadata +163 -11
@@ -0,0 +1,98 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "charge.refunded",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "ch_00000000000000",
13
+ "object": "charge",
14
+ "amount": 100,
15
+ "amount_refunded": 100,
16
+ "application": null,
17
+ "application_fee": null,
18
+ "balance_transaction": "txn_00000000000000",
19
+ "captured": false,
20
+ "created": 1517772969,
21
+ "currency": "usd",
22
+ "customer": null,
23
+ "description": "My First Test Charge (created for API docs)",
24
+ "destination": null,
25
+ "dispute": null,
26
+ "failure_code": null,
27
+ "failure_message": null,
28
+ "fraud_details": {
29
+ },
30
+ "invoice": null,
31
+ "livemode": false,
32
+ "metadata": {
33
+ },
34
+ "on_behalf_of": null,
35
+ "order": null,
36
+ "outcome": null,
37
+ "paid": true,
38
+ "receipt_email": null,
39
+ "receipt_number": null,
40
+ "refunded": true,
41
+ "refunds": {
42
+ "object": "list",
43
+ "data": [
44
+ {
45
+ "id": "re_CGQ7INZZQPOC8U",
46
+ "object": "refund",
47
+ "amount": 100,
48
+ "balance_transaction": "txn_CGQ7Sq2yeAIYK4",
49
+ "charge": "ch_1BrtHZAT5SYrvIfdqkyvLyvX",
50
+ "created": 1517772969,
51
+ "currency": "usd",
52
+ "metadata": {
53
+ },
54
+ "reason": null,
55
+ "receipt_number": "1527-1121",
56
+ "status": "succeeded"
57
+ }
58
+ ],
59
+ "has_more": false,
60
+ "total_count": 0,
61
+ "url": "/v1/charges/ch_1BrtHZAT5SYrvIfdqkyvLyvX/refunds"
62
+ },
63
+ "review": null,
64
+ "shipping": null,
65
+ "source": {
66
+ "id": "card_00000000000000",
67
+ "object": "card",
68
+ "address_city": null,
69
+ "address_country": null,
70
+ "address_line1": null,
71
+ "address_line1_check": null,
72
+ "address_line2": null,
73
+ "address_state": null,
74
+ "address_zip": null,
75
+ "address_zip_check": null,
76
+ "brand": "Visa",
77
+ "country": "US",
78
+ "customer": "cus_00000000000000",
79
+ "cvc_check": null,
80
+ "dynamic_last4": null,
81
+ "exp_month": 1,
82
+ "exp_year": 2040,
83
+ "fingerprint": "eBMS9YyeR6KZs4yl",
84
+ "funding": "credit",
85
+ "last4": "4242",
86
+ "metadata": {
87
+ },
88
+ "name": null,
89
+ "tokenization_method": null
90
+ },
91
+ "source_transfer": null,
92
+ "statement_descriptor": null,
93
+ "status": "succeeded",
94
+ "transfer_group": null,
95
+ "fee": 0
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "coupon.created",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "25OFF_00000000000000",
13
+ "object": "coupon",
14
+ "amount_off": null,
15
+ "created": 1517909275,
16
+ "currency": null,
17
+ "duration": "repeating",
18
+ "duration_in_months": 3,
19
+ "livemode": false,
20
+ "max_redemptions": null,
21
+ "metadata": {
22
+ },
23
+ "percent_off": 25,
24
+ "redeem_by": null,
25
+ "times_redeemed": 0,
26
+ "valid": true
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "coupon.deleted",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "25OFF_00000000000000",
13
+ "object": "coupon",
14
+ "amount_off": null,
15
+ "created": 1517909296,
16
+ "currency": null,
17
+ "duration": "repeating",
18
+ "duration_in_months": 3,
19
+ "livemode": false,
20
+ "max_redemptions": null,
21
+ "metadata": {
22
+ },
23
+ "percent_off": 25,
24
+ "redeem_by": null,
25
+ "times_redeemed": 0,
26
+ "valid": true
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "coupon.updated",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "25OFF_00000000000000",
13
+ "object": "coupon",
14
+ "amount_off": null,
15
+ "created": 1517909309,
16
+ "currency": null,
17
+ "duration": "repeating",
18
+ "duration_in_months": 3,
19
+ "livemode": false,
20
+ "max_redemptions": null,
21
+ "metadata": {
22
+ },
23
+ "percent_off": 25,
24
+ "redeem_by": null,
25
+ "times_redeemed": 0,
26
+ "valid": true
27
+ },
28
+ "previous_attributes": {
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.bank_account.deleted",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-02-05",
10
+ "data": {
11
+ "object": {
12
+ "id": "ba_00000000000000",
13
+ "object": "bank_account",
14
+ "account": "acct_00000000000000",
15
+ "account_holder_name": "Jane Austen",
16
+ "account_holder_type": "individual",
17
+ "bank_name": "STRIPE TEST BANK",
18
+ "country": "US",
19
+ "currency": "dkk",
20
+ "default_for_currency": false,
21
+ "fingerprint": "8hxBTDA6RPbX37IN",
22
+ "last4": "6789",
23
+ "metadata": {
24
+ },
25
+ "routing_number": "110000000",
26
+ "status": "new"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "id": "evt_customer_created",
3
+ "created": 1384544738,
4
+ "livemode": false,
5
+ "type": "customer.created",
6
+ "data": {
7
+ "object": {
8
+ "object": "customer",
9
+ "created": 1384544738,
10
+ "id": "cus_2wm5EgmRGEiyPO",
11
+ "livemode": false,
12
+ "description": "id:12345",
13
+ "email": "user@example.com",
14
+ "delinquent": false,
15
+ "metadata": {
16
+ },
17
+ "subscription": null,
18
+ "discount": null,
19
+ "account_balance": 0,
20
+ "cards": {
21
+ "object": "list",
22
+ "count": 0,
23
+ "url": "/v1/customers/cus_2wm5EgmRGEiyPO/cards",
24
+ "data": [
25
+
26
+ ]
27
+ },
28
+ "default_card": null,
29
+ "next_recurring_charge": null,
30
+ "active_card": null
31
+ }
32
+ },
33
+ "object": "event",
34
+ "pending_webhooks": 1,
35
+ "request": "iar_2wm5M67yu99gVP"
36
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.deleted",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "cus_00000000000000",
13
+ "object": "customer",
14
+ "account_balance": 0,
15
+ "created": 1517836556,
16
+ "currency": "usd",
17
+ "default_source": null,
18
+ "delinquent": false,
19
+ "description": null,
20
+ "discount": null,
21
+ "email": null,
22
+ "invoice_prefix": "9c50d1ca61",
23
+ "livemode": false,
24
+ "metadata": {
25
+ },
26
+ "shipping": null,
27
+ "sources": {
28
+ "object": "list",
29
+ "data": [
30
+
31
+ ],
32
+ "has_more": false,
33
+ "total_count": 0,
34
+ "url": "/v1/customers/cus_CGhDwIOqZxnCEr/sources"
35
+ },
36
+ "subscriptions": {
37
+ "object": "list",
38
+ "data": [
39
+
40
+ ],
41
+ "has_more": false,
42
+ "total_count": 0,
43
+ "url": "/v1/customers/cus_CGhDwIOqZxnCEr/subscriptions"
44
+ }
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.discount.created",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "object": "discount",
13
+ "coupon": {
14
+ "id": "25OFF_00000000000000",
15
+ "object": "coupon",
16
+ "amount_off": null,
17
+ "created": 1517920174,
18
+ "currency": null,
19
+ "duration": "repeating",
20
+ "duration_in_months": 3,
21
+ "livemode": false,
22
+ "max_redemptions": null,
23
+ "metadata": {
24
+ },
25
+ "percent_off": 25,
26
+ "redeem_by": null,
27
+ "times_redeemed": 0,
28
+ "valid": true
29
+ },
30
+ "customer": "cus_00000000000000",
31
+ "end": 1525609774,
32
+ "start": 1517920174,
33
+ "subscription": null
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.discount.deleted",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "object": "discount",
13
+ "coupon": {
14
+ "id": "25OFF_00000000000000",
15
+ "object": "coupon",
16
+ "amount_off": null,
17
+ "created": 1517920183,
18
+ "currency": null,
19
+ "duration": "repeating",
20
+ "duration_in_months": 3,
21
+ "livemode": false,
22
+ "max_redemptions": null,
23
+ "metadata": {
24
+ },
25
+ "percent_off": 25,
26
+ "redeem_by": null,
27
+ "times_redeemed": 0,
28
+ "valid": true
29
+ },
30
+ "customer": "cus_00000000000000",
31
+ "end": 1525609783,
32
+ "start": 1517920183,
33
+ "subscription": null
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.discount.updated",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "object": "discount",
13
+ "coupon": {
14
+ "id": "25OFF_00000000000000",
15
+ "object": "coupon",
16
+ "amount_off": null,
17
+ "created": 1517920191,
18
+ "currency": null,
19
+ "duration": "repeating",
20
+ "duration_in_months": 3,
21
+ "livemode": false,
22
+ "max_redemptions": null,
23
+ "metadata": {
24
+ },
25
+ "percent_off": 25,
26
+ "redeem_by": null,
27
+ "times_redeemed": 0,
28
+ "valid": true
29
+ },
30
+ "customer": "cus_00000000000000",
31
+ "end": 1525609791,
32
+ "start": 1517920191,
33
+ "subscription": null
34
+ },
35
+ "previous_attributes": {
36
+ "coupon": {
37
+ "id": "OLD_COUPON_ID",
38
+ "object": "coupon",
39
+ "amount_off": null,
40
+ "created": 1517920191,
41
+ "currency": null,
42
+ "duration": "repeating",
43
+ "duration_in_months": 3,
44
+ "livemode": false,
45
+ "max_redemptions": null,
46
+ "metadata": {
47
+ },
48
+ "percent_off": 25,
49
+ "redeem_by": null,
50
+ "times_redeemed": 0,
51
+ "valid": true
52
+ }
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "id": "evt_bgfsbgservsreg",
3
+ "object": "event",
4
+ "api_version": "2018-02-06",
5
+ "created": "1518896523",
6
+ "livemode": "true",
7
+ "pending_webhooks": "1",
8
+ "type": "customer.source.created",
9
+ "controller": "stripe_event/webhook",
10
+ "action": "event",
11
+ "request": {
12
+ "id": "req_asfdgasfgasfdaf",
13
+ "idempotency_key": ""
14
+ },
15
+ "webhook": {
16
+ "id": "evt_bgfsbgservsreg",
17
+ "object": "event",
18
+ "api_version": "2018-02-06",
19
+ "created": "1518896523",
20
+ "livemode": "true",
21
+ "pending_webhooks": "1",
22
+ "type": "customer.source.created",
23
+ "request": {
24
+ "id": "req_asfdgasfgasfdaf",
25
+ "idempotency_key": ""
26
+ },
27
+ "data": {
28
+ "object": {
29
+ "id": "card_000000000",
30
+ "object": "card",
31
+ "address_city": "",
32
+ "address_country": "",
33
+ "address_line1": "",
34
+ "address_line1_check": "",
35
+ "address_line2": "",
36
+ "address_state": "",
37
+ "address_zip": "",
38
+ "address_zip_check": "",
39
+ "brand": "Visa",
40
+ "country": "DK",
41
+ "customer": "cus_000000000",
42
+ "cvc_check": "pass",
43
+ "dynamic_last4": "",
44
+ "exp_month": "9",
45
+ "exp_year": "2029",
46
+ "fingerprint": "asdvawefgawvafg",
47
+ "funding": "debit",
48
+ "last4": "0062",
49
+ "name": "",
50
+ "tokenization_method": ""
51
+ }
52
+ }
53
+ },
54
+ "data": {
55
+ "object": {
56
+ "id": "card_000000000",
57
+ "object": "card",
58
+ "address_city": "",
59
+ "address_country": "",
60
+ "address_line1": "",
61
+ "address_line1_check": "",
62
+ "address_line2": "",
63
+ "address_state": "",
64
+ "address_zip": "",
65
+ "address_zip_check": "",
66
+ "brand": "Visa",
67
+ "country": "DK",
68
+ "customer": "cus_000000000",
69
+ "cvc_check": "pass",
70
+ "dynamic_last4": "",
71
+ "exp_month": "9",
72
+ "exp_year": "2029",
73
+ "fingerprint": "asdvawefgawvafg",
74
+ "funding": "debit",
75
+ "last4": "0062",
76
+ "name": "",
77
+ "tokenization_method": ""
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.source.created",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "src_00000000000000",
13
+ "object": "source",
14
+ "amount": null,
15
+ "client_secret": "src_client_secret_CH3Wh1MaKwNdQjhQetdDOgpr",
16
+ "created": 1517919532,
17
+ "currency": "usd",
18
+ "flow": "receiver",
19
+ "livemode": false,
20
+ "metadata": {
21
+ },
22
+ "owner": {
23
+ "address": null,
24
+ "email": "jenny.rosen@example.com",
25
+ "name": null,
26
+ "phone": null,
27
+ "verified_address": null,
28
+ "verified_email": null,
29
+ "verified_name": null,
30
+ "verified_phone": null
31
+ },
32
+ "receiver": {
33
+ "address": "121042882-38381234567890123",
34
+ "amount_charged": 0,
35
+ "amount_received": 0,
36
+ "amount_returned": 0,
37
+ "refund_attributes_method": "email",
38
+ "refund_attributes_status": "missing"
39
+ },
40
+ "statement_descriptor": null,
41
+ "status": "pending",
42
+ "type": "ach_credit_transfer",
43
+ "usage": "reusable",
44
+ "ach_credit_transfer": {
45
+ "account_number": "test_52796e3294dc",
46
+ "routing_number": "110000000",
47
+ "fingerprint": "ecpwEzmBOSMOqQTL",
48
+ "bank_name": "TEST BANK",
49
+ "swift_code": "TSTEZ122"
50
+ }
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.source.deleted",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "src_00000000000000",
13
+ "object": "source",
14
+ "amount": null,
15
+ "client_secret": "src_client_secret_CH3fKkVUyIODCrflIRRSxhnm",
16
+ "created": 1517920047,
17
+ "currency": "usd",
18
+ "flow": "receiver",
19
+ "livemode": false,
20
+ "metadata": {
21
+ },
22
+ "owner": {
23
+ "address": null,
24
+ "email": "jenny.rosen@example.com",
25
+ "name": null,
26
+ "phone": null,
27
+ "verified_address": null,
28
+ "verified_email": null,
29
+ "verified_name": null,
30
+ "verified_phone": null
31
+ },
32
+ "receiver": {
33
+ "address": "121042882-38381234567890123",
34
+ "amount_charged": 0,
35
+ "amount_received": 0,
36
+ "amount_returned": 0,
37
+ "refund_attributes_method": "email",
38
+ "refund_attributes_status": "missing"
39
+ },
40
+ "statement_descriptor": null,
41
+ "status": "pending",
42
+ "type": "ach_credit_transfer",
43
+ "usage": "reusable",
44
+ "ach_credit_transfer": {
45
+ "account_number": "test_52796e3294dc",
46
+ "routing_number": "110000000",
47
+ "fingerprint": "ecpwEzmBOSMOqQTL",
48
+ "bank_name": "TEST BANK",
49
+ "swift_code": "TSTEZ122"
50
+ }
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.source.expiring",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "src_00000000000000",
13
+ "object": "source",
14
+ "amount": null,
15
+ "client_secret": "src_client_secret_CH3cDRaFa1EXA06n54QOMyMF",
16
+ "created": 1517919906,
17
+ "currency": "usd",
18
+ "flow": "receiver",
19
+ "livemode": false,
20
+ "metadata": {
21
+ },
22
+ "owner": {
23
+ "address": null,
24
+ "email": "jenny.rosen@example.com",
25
+ "name": null,
26
+ "phone": null,
27
+ "verified_address": null,
28
+ "verified_email": null,
29
+ "verified_name": null,
30
+ "verified_phone": null
31
+ },
32
+ "receiver": {
33
+ "address": "121042882-38381234567890123",
34
+ "amount_charged": 0,
35
+ "amount_received": 0,
36
+ "amount_returned": 0,
37
+ "refund_attributes_method": "email",
38
+ "refund_attributes_status": "missing"
39
+ },
40
+ "statement_descriptor": null,
41
+ "status": "pending",
42
+ "type": "ach_credit_transfer",
43
+ "usage": "reusable",
44
+ "ach_credit_transfer": {
45
+ "account_number": "test_52796e3294dc",
46
+ "routing_number": "110000000",
47
+ "fingerprint": "ecpwEzmBOSMOqQTL",
48
+ "bank_name": "TEST BANK",
49
+ "swift_code": "TSTEZ122"
50
+ }
51
+ }
52
+ }
53
+ }