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,90 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "invoice.sent",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-02-05",
10
+ "data": {
11
+ "object": {
12
+ "id": "in_00000000000000",
13
+ "object": "invoice",
14
+ "amount_due": 3500,
15
+ "application_fee": null,
16
+ "attempt_count": 1,
17
+ "attempted": true,
18
+ "billing": "charge_automatically",
19
+ "charge": "ch_00000000000000",
20
+ "closed": true,
21
+ "currency": "dkk",
22
+ "customer": "cus_00000000000000",
23
+ "date": 1517763745,
24
+ "description": null,
25
+ "discount": null,
26
+ "due_date": null,
27
+ "ending_balance": 0,
28
+ "forgiven": false,
29
+ "lines": {
30
+ "data": [
31
+ {
32
+ "id": "sub_CHS7NOE0WD1Jro",
33
+ "object": "line_item",
34
+ "amount": 6000,
35
+ "currency": "dkk",
36
+ "description": "1x Manage translations for your apps (at 60.00 kr)",
37
+ "discountable": true,
38
+ "livemode": true,
39
+ "metadata": {
40
+ },
41
+ "period": {
42
+ "start": 1520430249,
43
+ "end": 1523108649
44
+ },
45
+ "plan": {
46
+ "id": "peak_flow_build",
47
+ "object": "plan",
48
+ "amount": 6000,
49
+ "created": 1517990173,
50
+ "currency": "dkk",
51
+ "interval": "month",
52
+ "interval_count": 1,
53
+ "livemode": false,
54
+ "metadata": {
55
+ },
56
+ "nickname": null,
57
+ "product": "prod_CHMVwyJFgchZEk",
58
+ "trial_period_days": null
59
+ },
60
+ "proration": false,
61
+ "quantity": 1,
62
+ "subscription": null,
63
+ "subscription_item": "si_CHS7VAL80FwJv7",
64
+ "type": "subscription"
65
+ }
66
+ ],
67
+ "has_more": false,
68
+ "object": "list",
69
+ "url": "/v1/invoices/in_1BrqsnAT5SYrvIfdQBWofPKO/lines"
70
+ },
71
+ "livemode": false,
72
+ "metadata": {
73
+ },
74
+ "next_payment_attempt": null,
75
+ "number": "a04598880b-0007",
76
+ "paid": true,
77
+ "period_end": 1517763745,
78
+ "period_start": 1517763745,
79
+ "receipt_number": null,
80
+ "starting_balance": 0,
81
+ "statement_descriptor": null,
82
+ "subscription": "sub_00000000000000",
83
+ "subtotal": 3500,
84
+ "tax": null,
85
+ "tax_percent": null,
86
+ "total": 3500,
87
+ "webhooks_delivered_at": 1517763754
88
+ }
89
+ }
90
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "invoice.upcoming",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-02-05",
10
+ "data": {
11
+ "object": {
12
+ "id": null,
13
+ "object": "invoice",
14
+ "amount_due": 3500,
15
+ "application_fee": null,
16
+ "attempt_count": 1,
17
+ "attempted": true,
18
+ "billing": "charge_automatically",
19
+ "charge": "ch_00000000000000",
20
+ "closed": true,
21
+ "currency": "dkk",
22
+ "customer": "cus_00000000000000",
23
+ "date": 1517763745,
24
+ "description": null,
25
+ "discount": null,
26
+ "due_date": null,
27
+ "ending_balance": 0,
28
+ "forgiven": false,
29
+ "lines": {
30
+ "data": [
31
+ {
32
+ "id": "sub_CHS7NOE0WD1Jro",
33
+ "object": "line_item",
34
+ "amount": 6000,
35
+ "currency": "dkk",
36
+ "description": "1x Manage translations for your apps (at 60.00 kr)",
37
+ "discountable": true,
38
+ "livemode": true,
39
+ "metadata": {
40
+ },
41
+ "period": {
42
+ "start": 1520430249,
43
+ "end": 1523108649
44
+ },
45
+ "plan": {
46
+ "id": "peak_flow_build",
47
+ "object": "plan",
48
+ "amount": 6000,
49
+ "created": 1517990173,
50
+ "currency": "dkk",
51
+ "interval": "month",
52
+ "interval_count": 1,
53
+ "livemode": false,
54
+ "metadata": {
55
+ },
56
+ "nickname": null,
57
+ "product": "prod_CHMVwyJFgchZEk",
58
+ "trial_period_days": null
59
+ },
60
+ "proration": false,
61
+ "quantity": 1,
62
+ "subscription": null,
63
+ "subscription_item": "si_CHS7VAL80FwJv7",
64
+ "type": "subscription"
65
+ }
66
+ ],
67
+ "has_more": false,
68
+ "object": "list",
69
+ "url": "/v1/invoices/in_1BrqsnAT5SYrvIfdQBWofPKO/lines"
70
+ },
71
+ "livemode": false,
72
+ "metadata": {
73
+ },
74
+ "next_payment_attempt": null,
75
+ "number": "a04598880b-0007",
76
+ "paid": true,
77
+ "period_end": 1517763745,
78
+ "period_start": 1517763745,
79
+ "receipt_number": null,
80
+ "starting_balance": 0,
81
+ "statement_descriptor": null,
82
+ "subscription": "sub_00000000000000",
83
+ "subtotal": 3500,
84
+ "tax": null,
85
+ "tax_percent": null,
86
+ "total": 3500,
87
+ "webhooks_delivered_at": 1517763754
88
+ }
89
+ }
90
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "invoice.updated",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-02-05",
10
+ "data": {
11
+ "object": {
12
+ "id": "in_00000000000000",
13
+ "object": "invoice",
14
+ "amount_due": 3500,
15
+ "application_fee": null,
16
+ "attempt_count": 1,
17
+ "attempted": true,
18
+ "billing": "charge_automatically",
19
+ "charge": "ch_00000000000000",
20
+ "closed": true,
21
+ "currency": "dkk",
22
+ "customer": "cus_00000000000000",
23
+ "date": 1517763745,
24
+ "description": null,
25
+ "discount": null,
26
+ "due_date": null,
27
+ "ending_balance": 0,
28
+ "forgiven": false,
29
+ "lines": {
30
+ "data": [
31
+ {
32
+ "id": "sub_CHS7NOE0WD1Jro",
33
+ "object": "line_item",
34
+ "amount": 6000,
35
+ "currency": "dkk",
36
+ "description": "1x Manage translations for your apps (at 60.00 kr)",
37
+ "discountable": true,
38
+ "livemode": true,
39
+ "metadata": {
40
+ },
41
+ "period": {
42
+ "start": 1520430249,
43
+ "end": 1523108649
44
+ },
45
+ "plan": {
46
+ "id": "peak_flow_build",
47
+ "object": "plan",
48
+ "amount": 6000,
49
+ "created": 1517990173,
50
+ "currency": "dkk",
51
+ "interval": "month",
52
+ "interval_count": 1,
53
+ "livemode": false,
54
+ "metadata": {
55
+ },
56
+ "nickname": null,
57
+ "product": "prod_CHMVwyJFgchZEk",
58
+ "trial_period_days": null
59
+ },
60
+ "proration": false,
61
+ "quantity": 1,
62
+ "subscription": null,
63
+ "subscription_item": "si_CHS7VAL80FwJv7",
64
+ "type": "subscription"
65
+ }
66
+ ],
67
+ "has_more": false,
68
+ "object": "list",
69
+ "url": "/v1/invoices/in_1BrqsnAT5SYrvIfdQBWofPKO/lines"
70
+ },
71
+ "livemode": false,
72
+ "metadata": {
73
+ },
74
+ "next_payment_attempt": null,
75
+ "number": "a04598880b-0007",
76
+ "paid": true,
77
+ "period_end": 1517763745,
78
+ "period_start": 1517763745,
79
+ "receipt_number": null,
80
+ "starting_balance": 0,
81
+ "statement_descriptor": null,
82
+ "subscription": "sub_00000000000000",
83
+ "subtotal": 3500,
84
+ "tax": null,
85
+ "tax_percent": null,
86
+ "total": 3500,
87
+ "webhooks_delivered_at": 1517763754
88
+ },
89
+ "previous_attributes": {
90
+ "lines": [
91
+
92
+ ]
93
+ }
94
+ }
95
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "invoiceitem.created",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "ii_00000000000000",
13
+ "object": "invoiceitem",
14
+ "amount": 1000,
15
+ "currency": "usd",
16
+ "customer": "cus_00000000000000",
17
+ "date": 1517772716,
18
+ "description": "My First Invoice Item (created for API docs)",
19
+ "discountable": true,
20
+ "invoice": null,
21
+ "livemode": false,
22
+ "metadata": {
23
+ },
24
+ "period": {
25
+ "start": 1517772716,
26
+ "end": 1517772716
27
+ },
28
+ "plan": null,
29
+ "proration": false,
30
+ "quantity": null,
31
+ "subscription": null
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "order.created",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "or_00000000000000",
13
+ "object": "order",
14
+ "amount": 1500,
15
+ "amount_returned": null,
16
+ "application": null,
17
+ "application_fee": null,
18
+ "charge": null,
19
+ "created": 1517837533,
20
+ "currency": "usd",
21
+ "customer": null,
22
+ "email": null,
23
+ "items": [
24
+ {
25
+ "object": "order_item",
26
+ "amount": 1500,
27
+ "currency": "usd",
28
+ "description": "T-shirt",
29
+ "parent": "sk_1BrqWPAT5SYrvIfdCfVmF7Kx",
30
+ "quantity": null,
31
+ "type": "sku"
32
+ }
33
+ ],
34
+ "livemode": false,
35
+ "metadata": {
36
+ },
37
+ "returns": {
38
+ "object": "list",
39
+ "data": [
40
+
41
+ ],
42
+ "has_more": false,
43
+ "total_count": 0,
44
+ "url": "/v1/order_returns?order=or_1BsA4vAT5SYrvIfdykv5w2Gw"
45
+ },
46
+ "selected_shipping_method": null,
47
+ "shipping": {
48
+ "address": {
49
+ "city": "Anytown",
50
+ "country": "US",
51
+ "line1": "1234 Main street",
52
+ "line2": null,
53
+ "postal_code": "123456",
54
+ "state": null
55
+ },
56
+ "carrier": null,
57
+ "name": "Jenny Rosen",
58
+ "phone": null,
59
+ "tracking_number": null
60
+ },
61
+ "shipping_methods": null,
62
+ "status": "created",
63
+ "status_transitions": {
64
+ "canceled": null,
65
+ "fulfiled": null,
66
+ "paid": null,
67
+ "returned": null
68
+ },
69
+ "updated": 1517837533
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "created": 1326853478,
3
+ "livemode": false,
4
+ "id": "evt_00000000000000",
5
+ "type": "order.updated",
6
+ "object": "event",
7
+ "request": null,
8
+ "pending_webhooks": 1,
9
+ "api_version": "2018-01-23",
10
+ "data": {
11
+ "object": {
12
+ "id": "or_00000000000000",
13
+ "object": "order",
14
+ "amount": 1500,
15
+ "amount_returned": null,
16
+ "application": null,
17
+ "application_fee": null,
18
+ "charge": null,
19
+ "created": 1517839939,
20
+ "currency": "usd",
21
+ "customer": null,
22
+ "email": null,
23
+ "items": [
24
+ {
25
+ "object": "order_item",
26
+ "amount": 1500,
27
+ "currency": "usd",
28
+ "description": "T-shirt",
29
+ "parent": "sk_1BrqWPAT5SYrvIfdCfVmF7Kx",
30
+ "quantity": null,
31
+ "type": "sku"
32
+ }
33
+ ],
34
+ "livemode": false,
35
+ "metadata": {
36
+ },
37
+ "returns": {
38
+ "object": "list",
39
+ "data": [
40
+
41
+ ],
42
+ "has_more": false,
43
+ "total_count": 0,
44
+ "url": "/v1/order_returns?order=or_1BsAhjAT5SYrvIfdxnwUAXCT"
45
+ },
46
+ "selected_shipping_method": null,
47
+ "shipping": {
48
+ "address": {
49
+ "city": "Anytown",
50
+ "country": "US",
51
+ "line1": "1234 Main street",
52
+ "line2": null,
53
+ "postal_code": "123456",
54
+ "state": null
55
+ },
56
+ "carrier": null,
57
+ "name": "Jenny Rosen",
58
+ "phone": null,
59
+ "tracking_number": null
60
+ },
61
+ "shipping_methods": null,
62
+ "status": "created",
63
+ "status_transitions": {
64
+ "canceled": null,
65
+ "fulfiled": null,
66
+ "paid": null,
67
+ "returned": null
68
+ },
69
+ "updated": 1517839939
70
+ },
71
+ "previous_attributes": {
72
+ }
73
+ }
74
+ }