stripe_model_callbacks 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/app/services/stripe_model_callbacks/event_mocker_service.rb +1 -1
  3. data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.created.json +29 -0
  4. data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.deleted.json +29 -0
  5. data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.updated.json +31 -0
  6. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.closed.json +65 -0
  7. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.created.json +65 -0
  8. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_reinstated.json +65 -0
  9. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_withdrawn.json +65 -0
  10. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.updated.json +96 -0
  11. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refund.updated.json +28 -0
  12. data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refunded.json +98 -0
  13. data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.created.json +29 -0
  14. data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.deleted.json +29 -0
  15. data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.updated.json +31 -0
  16. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.bank_account.deleted.json +29 -0
  17. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.created.json +36 -0
  18. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.deleted.json +47 -0
  19. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.created.json +36 -0
  20. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.deleted.json +36 -0
  21. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.updated.json +55 -0
  22. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.card.json +80 -0
  23. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.json +53 -0
  24. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.deleted.json +53 -0
  25. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.expiring.json +53 -0
  26. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.updated.json +56 -0
  27. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.json +83 -0
  28. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.deleted.json +83 -0
  29. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.trial_will_end.json +88 -0
  30. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.updated.json +100 -0
  31. data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.updated.json +50 -0
  32. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.created.json +90 -0
  33. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_failed.json +90 -0
  34. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_succeeded.json +188 -0
  35. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.sent.json +90 -0
  36. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.upcoming.json +90 -0
  37. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.updated.json +95 -0
  38. data/lib/stripe_model_callbacks/fixtures/stripe_events/invoiceitem/invoiceitem.created.json +34 -0
  39. data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.created.json +72 -0
  40. data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.updated.json +74 -0
  41. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.canceled.json +35 -0
  42. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.created.json +35 -0
  43. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.failed.json +35 -0
  44. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.paid.json +35 -0
  45. data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.updated.json +37 -0
  46. data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.created.json +27 -0
  47. data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.deleted.json +27 -0
  48. data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.updated.json +30 -0
  49. data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.created.json +48 -0
  50. data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.deleted.json +48 -0
  51. data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.updated.json +50 -0
  52. data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.created.json +37 -0
  53. data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.deleted.json +37 -0
  54. data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.updated.json +39 -0
  55. data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.closed.json +21 -0
  56. data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.opened.json +21 -0
  57. data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.created.json +36 -0
  58. data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.deleted.json +36 -0
  59. data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.updated.json +38 -0
  60. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.canceled.json +53 -0
  61. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.chargeable.json +53 -0
  62. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.failed.json +53 -0
  63. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.mandate_notification.json +53 -0
  64. data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.transaction_created.json +21 -0
  65. data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.created.json +41 -0
  66. data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.reversed.json +40 -0
  67. data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.updated.json +44 -0
  68. data/lib/stripe_model_callbacks/version.rb +1 -1
  69. metadata +66 -1
@@ -0,0 +1,37 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "recipient.deleted",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "rp_00000000000000",
13
+ "object": "recipient",
14
+ "active_account": null,
15
+ "cards": {
16
+ "object": "list",
17
+ "data": [
18
+
19
+ ],
20
+ "has_more": false,
21
+ "total_count": 0,
22
+ "url": "/v1/recipients/rp_1BsGdUAT5SYrvIfdO2mKG5rT/cards"
23
+ },
24
+ "created": 1517862740,
25
+ "default_card": null,
26
+ "description": "Recipient for John Doe",
27
+ "email": "test@example.com",
28
+ "livemode": false,
29
+ "metadata": {
30
+ },
31
+ "migrated_to": null,
32
+ "name": "John Doe",
33
+ "type": "individual",
34
+ "verified": false
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "recipient.updated",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "rp_00000000000000",
13
+ "object": "recipient",
14
+ "active_account": null,
15
+ "cards": {
16
+ "object": "list",
17
+ "data": [
18
+
19
+ ],
20
+ "has_more": false,
21
+ "total_count": 0,
22
+ "url": "/v1/recipients/rp_1BsGduAT5SYrvIfdk3BOUh7c/cards"
23
+ },
24
+ "created": 1517862766,
25
+ "default_card": null,
26
+ "description": "Recipient for John Doe",
27
+ "email": "test@example.com",
28
+ "livemode": false,
29
+ "metadata": {
30
+ },
31
+ "migrated_to": null,
32
+ "name": "John Doe",
33
+ "type": "individual",
34
+ "verified": false
35
+ },
36
+ "previous_attributes": {
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "review.closed",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-02-05",
10
+ "data": {
11
+ "object": {
12
+ "id": "prv_00000000000000",
13
+ "object": "review",
14
+ "charge": "ch_00000000000000",
15
+ "created": 1518091642,
16
+ "livemode": false,
17
+ "open": true,
18
+ "reason": "rule"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "review.opened",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-02-05",
10
+ "data": {
11
+ "object": {
12
+ "id": "prv_00000000000000",
13
+ "object": "review",
14
+ "charge": "ch_00000000000000",
15
+ "created": 1518091606,
16
+ "livemode": false,
17
+ "open": true,
18
+ "reason": "rule"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "sku.created",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "sku_00000000000000",
13
+ "object": "sku",
14
+ "active": true,
15
+ "attributes": {
16
+ "size": "Medium",
17
+ "gender": "Unisex"
18
+ },
19
+ "created": 1517860189,
20
+ "currency": "usd",
21
+ "image": null,
22
+ "inventory": {
23
+ "quantity": 50,
24
+ "type": "finite",
25
+ "value": null
26
+ },
27
+ "livemode": false,
28
+ "metadata": {
29
+ },
30
+ "package_dimensions": null,
31
+ "price": 1500,
32
+ "product": "prod_00000000000000",
33
+ "updated": 1517860189
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "sku.deleted",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "sku_00000000000000",
13
+ "object": "sku",
14
+ "active": true,
15
+ "attributes": {
16
+ "size": "Medium",
17
+ "gender": "Unisex"
18
+ },
19
+ "created": 1517860796,
20
+ "currency": "usd",
21
+ "image": null,
22
+ "inventory": {
23
+ "quantity": 50,
24
+ "type": "finite",
25
+ "value": null
26
+ },
27
+ "livemode": false,
28
+ "metadata": {
29
+ },
30
+ "package_dimensions": null,
31
+ "price": 1500,
32
+ "product": "prod_00000000000000",
33
+ "updated": 1517860796
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "sku.updated",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "sku_00000000000000",
13
+ "object": "sku",
14
+ "active": true,
15
+ "attributes": {
16
+ "size": "Medium",
17
+ "gender": "Unisex"
18
+ },
19
+ "created": 1517860625,
20
+ "currency": "usd",
21
+ "image": null,
22
+ "inventory": {
23
+ "quantity": 50,
24
+ "type": "finite",
25
+ "value": null
26
+ },
27
+ "livemode": false,
28
+ "metadata": {
29
+ },
30
+ "package_dimensions": null,
31
+ "price": 1500,
32
+ "product": "prod_00000000000000",
33
+ "updated": 1517860625
34
+ },
35
+ "previous_attributes": {
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "source.canceled",
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_CGz38yIZuPGBR0ytLA9HdqqJ",
16
+ "created": 1517902906,
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": "source.chargeable",
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_CH01F485RhmrXTuK10ExxZVs",
16
+ "created": 1517906510,
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": "source.failed",
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_CGz4B3s2LM5ZBtZuTHwuPxgc",
16
+ "created": 1517902949,
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": "source.mandate_notification",
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_CGz5Ss7pgMg0MVqljzgoEEUs",
16
+ "created": 1517903015,
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
+ }