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,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
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.source.updated",
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_CGQ1vsxpatHxAyu1kS06C67y",
16
+ "created": 1517772593,
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
+ "previous_attributes": {
53
+ "exp_year": "2013"
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.subscription.created",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "sub_CGPXJjUMVXBLSx",
13
+ "object": "subscription",
14
+ "application_fee_percent": null,
15
+ "billing": "charge_automatically",
16
+ "cancel_at_period_end": false,
17
+ "canceled_at": null,
18
+ "created": 1517770770,
19
+ "current_period_end": 1520189970,
20
+ "current_period_start": 1517770770,
21
+ "customer": "cus_00000000000000",
22
+ "days_until_due": null,
23
+ "discount": null,
24
+ "ended_at": null,
25
+ "items": {
26
+ "object": "list",
27
+ "data": [
28
+ {
29
+ "id": "si_CGPX2RZhm2pE0o",
30
+ "object": "subscription_item",
31
+ "created": 1517770770,
32
+ "metadata": {
33
+ },
34
+ "plan": {
35
+ "id": "silver-express-898",
36
+ "object": "plan",
37
+ "amount": 999,
38
+ "created": 1506381458,
39
+ "currency": "usd",
40
+ "interval": "month",
41
+ "interval_count": 1,
42
+ "livemode": false,
43
+ "metadata": {
44
+ },
45
+ "name": "Silver Express",
46
+ "statement_descriptor": null,
47
+ "trial_period_days": null
48
+ },
49
+ "quantity": 1,
50
+ "subscription": "sub_CGPXJjUMVXBLSx"
51
+ }
52
+ ],
53
+ "has_more": false,
54
+ "total_count": 1,
55
+ "url": "/v1/subscription_items?subscription=sub_CGPXJjUMVXBLSx"
56
+ },
57
+ "livemode": false,
58
+ "metadata": {
59
+ },
60
+ "plan": {
61
+ "id": "silver-express-898",
62
+ "object": "plan",
63
+ "amount": 999,
64
+ "created": 1506381458,
65
+ "currency": "usd",
66
+ "interval": "month",
67
+ "interval_count": 1,
68
+ "livemode": false,
69
+ "metadata": {
70
+ },
71
+ "name": "Silver Express",
72
+ "statement_descriptor": null,
73
+ "trial_period_days": null
74
+ },
75
+ "quantity": 1,
76
+ "start": 1517770770,
77
+ "status": "active",
78
+ "tax_percent": null,
79
+ "trial_end": null,
80
+ "trial_start": null
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "customer.subscription.deleted",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "sub_00000000000000",
13
+ "object": "subscription",
14
+ "application_fee_percent": null,
15
+ "billing": "charge_automatically",
16
+ "cancel_at_period_end": false,
17
+ "canceled_at": null,
18
+ "created": 1517771609,
19
+ "current_period_end": 1520190809,
20
+ "current_period_start": 1517771609,
21
+ "customer": "cus_00000000000000",
22
+ "days_until_due": null,
23
+ "discount": null,
24
+ "ended_at": 1517769949,
25
+ "items": {
26
+ "object": "list",
27
+ "data": [
28
+ {
29
+ "id": "si_CGPlDRAW5ZPZKJ",
30
+ "object": "subscription_item",
31
+ "created": 1517771609,
32
+ "metadata": {
33
+ },
34
+ "plan": {
35
+ "id": "silver-express-898",
36
+ "object": "plan",
37
+ "amount": 999,
38
+ "created": 1506381458,
39
+ "currency": "usd",
40
+ "interval": "month",
41
+ "interval_count": 1,
42
+ "livemode": false,
43
+ "metadata": {
44
+ },
45
+ "name": "Silver Express",
46
+ "statement_descriptor": null,
47
+ "trial_period_days": null
48
+ },
49
+ "quantity": 1,
50
+ "subscription": "sub_CGPlqkdRaAAkq4"
51
+ }
52
+ ],
53
+ "has_more": false,
54
+ "total_count": 1,
55
+ "url": "/v1/subscription_items?subscription=sub_CGPlqkdRaAAkq4"
56
+ },
57
+ "livemode": false,
58
+ "metadata": {
59
+ },
60
+ "plan": {
61
+ "id": "silver-express-898_00000000000000",
62
+ "object": "plan",
63
+ "amount": 999,
64
+ "created": 1506381458,
65
+ "currency": "usd",
66
+ "interval": "month",
67
+ "interval_count": 1,
68
+ "livemode": false,
69
+ "metadata": {
70
+ },
71
+ "name": "Silver Express",
72
+ "statement_descriptor": null,
73
+ "trial_period_days": null
74
+ },
75
+ "quantity": 1,
76
+ "start": 1517771609,
77
+ "status": "canceled",
78
+ "tax_percent": null,
79
+ "trial_end": null,
80
+ "trial_start": null
81
+ }
82
+ }
83
+ }