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.
- checksums.yaml +4 -4
- data/app/services/stripe_model_callbacks/event_mocker_service.rb +1 -1
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.created.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.updated.json +31 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.closed.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.created.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_reinstated.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_withdrawn.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.updated.json +96 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refund.updated.json +28 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refunded.json +98 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.created.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.updated.json +31 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.bank_account.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.deleted.json +47 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.deleted.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.updated.json +55 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.card.json +80 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.deleted.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.expiring.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.updated.json +56 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.json +83 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.deleted.json +83 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.trial_will_end.json +88 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.updated.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.updated.json +50 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.created.json +90 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_failed.json +90 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_succeeded.json +188 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.sent.json +90 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.upcoming.json +90 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.updated.json +95 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoiceitem/invoiceitem.created.json +34 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.created.json +72 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.updated.json +74 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.canceled.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.created.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.failed.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.paid.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.updated.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.created.json +27 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.deleted.json +27 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.updated.json +30 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.created.json +48 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.deleted.json +48 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.updated.json +50 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.created.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.deleted.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.updated.json +39 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.closed.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.opened.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.deleted.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.updated.json +38 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.canceled.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.chargeable.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.failed.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.mandate_notification.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.transaction_created.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.created.json +41 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.reversed.json +40 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.updated.json +44 -0
- data/lib/stripe_model_callbacks/version.rb +1 -1
- metadata +66 -1
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.refund.updated",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "re_00000000000000",
|
13
|
+
"object": "refund",
|
14
|
+
"amount": 100,
|
15
|
+
"balance_transaction": null,
|
16
|
+
"charge": "ch_00000000000000",
|
17
|
+
"created": 1517848627,
|
18
|
+
"currency": "usd",
|
19
|
+
"metadata": {
|
20
|
+
},
|
21
|
+
"reason": null,
|
22
|
+
"receipt_number": null,
|
23
|
+
"status": "succeeded"
|
24
|
+
},
|
25
|
+
"previous_attributes": {
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
@@ -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
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.bank_account.deleted.json
ADDED
@@ -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
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.created.json
ADDED
@@ -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
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.deleted.json
ADDED
@@ -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
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.updated.json
ADDED
@@ -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
|
+
}
|