async-stripe-webhook 1.0.0-rc.5

API bindings for the Stripe HTTP API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
#[derive(Clone)]
#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum AccountExternalAccountCreated {
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
    BankAccount(stripe_shared::BankAccount),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
    Card(stripe_shared::Card),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
    Source(stripe_shared::Source),
}

#[derive(Default)]
pub struct AccountExternalAccountCreatedBuilder {
    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}

const _: () = {
    use miniserde::de::{Map, Visitor};
    use miniserde::json::Value;
    use miniserde::{Deserialize, Result, make_place};
    use stripe_types::MapBuilder;
    use stripe_types::miniserde_helpers::FromValueOpt;

    use super::*;

    make_place!(Place);

    struct Builder<'a> {
        out: &'a mut Option<AccountExternalAccountCreated>,
        builder: AccountExternalAccountCreatedBuilder,
    }

    impl Deserialize for AccountExternalAccountCreated {
        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
            Place::new(out)
        }
    }

    impl Visitor for Place<AccountExternalAccountCreated> {
        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
        }
    }

    impl Map for Builder<'_> {
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.builder.key(k)
        }

        fn finish(&mut self) -> Result<()> {
            *self.out = self.builder.take_out();
            Ok(())
        }
    }

    impl MapBuilder for AccountExternalAccountCreatedBuilder {
        type Out = AccountExternalAccountCreated;
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.inner.key_inner(k)
        }

        fn deser_default() -> Self {
            Self::default()
        }

        fn take_out(&mut self) -> Option<Self::Out> {
            let (k, o) = self.inner.finish_inner()?;
            AccountExternalAccountCreated::construct(&k, o)
        }
    }

    impl stripe_types::ObjectDeser for AccountExternalAccountCreated {
        type Builder = AccountExternalAccountCreatedBuilder;
    }
    impl AccountExternalAccountCreated {
        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
            Some(match key {
                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),

                _ => {
                    tracing::warn!(
                        "Unknown object type '{}' for enum '{}'",
                        key,
                        "AccountExternalAccountCreated"
                    );
                    return None;
                }
            })
        }
    }

    impl FromValueOpt for AccountExternalAccountCreated {
        fn from_value(v: Value) -> Option<Self> {
            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
            Self::construct(&typ, obj)
        }
    }
};

#[cfg(feature = "redact-generated-debug")]
impl std::fmt::Debug for AccountExternalAccountCreated {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("AccountExternalAccountCreated").finish_non_exhaustive()
    }
}
#[derive(Clone)]
#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum AccountExternalAccountDeleted {
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
    BankAccount(stripe_shared::BankAccount),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
    Card(stripe_shared::Card),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
    Source(stripe_shared::Source),
}

#[derive(Default)]
pub struct AccountExternalAccountDeletedBuilder {
    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}

const _: () = {
    use miniserde::de::{Map, Visitor};
    use miniserde::json::Value;
    use miniserde::{Deserialize, Result, make_place};
    use stripe_types::MapBuilder;
    use stripe_types::miniserde_helpers::FromValueOpt;

    use super::*;

    make_place!(Place);

    struct Builder<'a> {
        out: &'a mut Option<AccountExternalAccountDeleted>,
        builder: AccountExternalAccountDeletedBuilder,
    }

    impl Deserialize for AccountExternalAccountDeleted {
        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
            Place::new(out)
        }
    }

    impl Visitor for Place<AccountExternalAccountDeleted> {
        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
        }
    }

    impl Map for Builder<'_> {
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.builder.key(k)
        }

        fn finish(&mut self) -> Result<()> {
            *self.out = self.builder.take_out();
            Ok(())
        }
    }

    impl MapBuilder for AccountExternalAccountDeletedBuilder {
        type Out = AccountExternalAccountDeleted;
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.inner.key_inner(k)
        }

        fn deser_default() -> Self {
            Self::default()
        }

        fn take_out(&mut self) -> Option<Self::Out> {
            let (k, o) = self.inner.finish_inner()?;
            AccountExternalAccountDeleted::construct(&k, o)
        }
    }

    impl stripe_types::ObjectDeser for AccountExternalAccountDeleted {
        type Builder = AccountExternalAccountDeletedBuilder;
    }
    impl AccountExternalAccountDeleted {
        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
            Some(match key {
                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),

                _ => {
                    tracing::warn!(
                        "Unknown object type '{}' for enum '{}'",
                        key,
                        "AccountExternalAccountDeleted"
                    );
                    return None;
                }
            })
        }
    }

    impl FromValueOpt for AccountExternalAccountDeleted {
        fn from_value(v: Value) -> Option<Self> {
            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
            Self::construct(&typ, obj)
        }
    }
};

#[cfg(feature = "redact-generated-debug")]
impl std::fmt::Debug for AccountExternalAccountDeleted {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("AccountExternalAccountDeleted").finish_non_exhaustive()
    }
}
#[derive(Clone)]
#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum AccountExternalAccountUpdated {
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
    BankAccount(stripe_shared::BankAccount),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
    Card(stripe_shared::Card),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
    Source(stripe_shared::Source),
}

#[derive(Default)]
pub struct AccountExternalAccountUpdatedBuilder {
    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}

const _: () = {
    use miniserde::de::{Map, Visitor};
    use miniserde::json::Value;
    use miniserde::{Deserialize, Result, make_place};
    use stripe_types::MapBuilder;
    use stripe_types::miniserde_helpers::FromValueOpt;

    use super::*;

    make_place!(Place);

    struct Builder<'a> {
        out: &'a mut Option<AccountExternalAccountUpdated>,
        builder: AccountExternalAccountUpdatedBuilder,
    }

    impl Deserialize for AccountExternalAccountUpdated {
        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
            Place::new(out)
        }
    }

    impl Visitor for Place<AccountExternalAccountUpdated> {
        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
        }
    }

    impl Map for Builder<'_> {
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.builder.key(k)
        }

        fn finish(&mut self) -> Result<()> {
            *self.out = self.builder.take_out();
            Ok(())
        }
    }

    impl MapBuilder for AccountExternalAccountUpdatedBuilder {
        type Out = AccountExternalAccountUpdated;
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.inner.key_inner(k)
        }

        fn deser_default() -> Self {
            Self::default()
        }

        fn take_out(&mut self) -> Option<Self::Out> {
            let (k, o) = self.inner.finish_inner()?;
            AccountExternalAccountUpdated::construct(&k, o)
        }
    }

    impl stripe_types::ObjectDeser for AccountExternalAccountUpdated {
        type Builder = AccountExternalAccountUpdatedBuilder;
    }
    impl AccountExternalAccountUpdated {
        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
            Some(match key {
                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),

                _ => {
                    tracing::warn!(
                        "Unknown object type '{}' for enum '{}'",
                        key,
                        "AccountExternalAccountUpdated"
                    );
                    return None;
                }
            })
        }
    }

    impl FromValueOpt for AccountExternalAccountUpdated {
        fn from_value(v: Value) -> Option<Self> {
            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
            Self::construct(&typ, obj)
        }
    }
};

#[cfg(feature = "redact-generated-debug")]
impl std::fmt::Debug for AccountExternalAccountUpdated {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("AccountExternalAccountUpdated").finish_non_exhaustive()
    }
}
#[derive(Clone)]
#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum CustomerSourceCreated {
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
    BankAccount(stripe_shared::BankAccount),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
    Card(stripe_shared::Card),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
    Source(stripe_shared::Source),
}

#[derive(Default)]
pub struct CustomerSourceCreatedBuilder {
    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}

const _: () = {
    use miniserde::de::{Map, Visitor};
    use miniserde::json::Value;
    use miniserde::{Deserialize, Result, make_place};
    use stripe_types::MapBuilder;
    use stripe_types::miniserde_helpers::FromValueOpt;

    use super::*;

    make_place!(Place);

    struct Builder<'a> {
        out: &'a mut Option<CustomerSourceCreated>,
        builder: CustomerSourceCreatedBuilder,
    }

    impl Deserialize for CustomerSourceCreated {
        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
            Place::new(out)
        }
    }

    impl Visitor for Place<CustomerSourceCreated> {
        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
        }
    }

    impl Map for Builder<'_> {
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.builder.key(k)
        }

        fn finish(&mut self) -> Result<()> {
            *self.out = self.builder.take_out();
            Ok(())
        }
    }

    impl MapBuilder for CustomerSourceCreatedBuilder {
        type Out = CustomerSourceCreated;
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.inner.key_inner(k)
        }

        fn deser_default() -> Self {
            Self::default()
        }

        fn take_out(&mut self) -> Option<Self::Out> {
            let (k, o) = self.inner.finish_inner()?;
            CustomerSourceCreated::construct(&k, o)
        }
    }

    impl stripe_types::ObjectDeser for CustomerSourceCreated {
        type Builder = CustomerSourceCreatedBuilder;
    }
    impl CustomerSourceCreated {
        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
            Some(match key {
                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),

                _ => {
                    tracing::warn!(
                        "Unknown object type '{}' for enum '{}'",
                        key,
                        "CustomerSourceCreated"
                    );
                    return None;
                }
            })
        }
    }

    impl FromValueOpt for CustomerSourceCreated {
        fn from_value(v: Value) -> Option<Self> {
            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
            Self::construct(&typ, obj)
        }
    }
};

#[cfg(feature = "redact-generated-debug")]
impl std::fmt::Debug for CustomerSourceCreated {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("CustomerSourceCreated").finish_non_exhaustive()
    }
}
#[derive(Clone)]
#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum CustomerSourceDeleted {
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
    BankAccount(stripe_shared::BankAccount),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
    Card(stripe_shared::Card),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
    Source(stripe_shared::Source),
}

#[derive(Default)]
pub struct CustomerSourceDeletedBuilder {
    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}

const _: () = {
    use miniserde::de::{Map, Visitor};
    use miniserde::json::Value;
    use miniserde::{Deserialize, Result, make_place};
    use stripe_types::MapBuilder;
    use stripe_types::miniserde_helpers::FromValueOpt;

    use super::*;

    make_place!(Place);

    struct Builder<'a> {
        out: &'a mut Option<CustomerSourceDeleted>,
        builder: CustomerSourceDeletedBuilder,
    }

    impl Deserialize for CustomerSourceDeleted {
        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
            Place::new(out)
        }
    }

    impl Visitor for Place<CustomerSourceDeleted> {
        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
        }
    }

    impl Map for Builder<'_> {
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.builder.key(k)
        }

        fn finish(&mut self) -> Result<()> {
            *self.out = self.builder.take_out();
            Ok(())
        }
    }

    impl MapBuilder for CustomerSourceDeletedBuilder {
        type Out = CustomerSourceDeleted;
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.inner.key_inner(k)
        }

        fn deser_default() -> Self {
            Self::default()
        }

        fn take_out(&mut self) -> Option<Self::Out> {
            let (k, o) = self.inner.finish_inner()?;
            CustomerSourceDeleted::construct(&k, o)
        }
    }

    impl stripe_types::ObjectDeser for CustomerSourceDeleted {
        type Builder = CustomerSourceDeletedBuilder;
    }
    impl CustomerSourceDeleted {
        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
            Some(match key {
                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),

                _ => {
                    tracing::warn!(
                        "Unknown object type '{}' for enum '{}'",
                        key,
                        "CustomerSourceDeleted"
                    );
                    return None;
                }
            })
        }
    }

    impl FromValueOpt for CustomerSourceDeleted {
        fn from_value(v: Value) -> Option<Self> {
            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
            Self::construct(&typ, obj)
        }
    }
};

#[cfg(feature = "redact-generated-debug")]
impl std::fmt::Debug for CustomerSourceDeleted {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("CustomerSourceDeleted").finish_non_exhaustive()
    }
}
#[derive(Clone)]
#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum CustomerSourceExpiring {
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
    Card(stripe_shared::Card),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
    Source(stripe_shared::Source),
}

#[derive(Default)]
pub struct CustomerSourceExpiringBuilder {
    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}

const _: () = {
    use miniserde::de::{Map, Visitor};
    use miniserde::json::Value;
    use miniserde::{Deserialize, Result, make_place};
    use stripe_types::MapBuilder;
    use stripe_types::miniserde_helpers::FromValueOpt;

    use super::*;

    make_place!(Place);

    struct Builder<'a> {
        out: &'a mut Option<CustomerSourceExpiring>,
        builder: CustomerSourceExpiringBuilder,
    }

    impl Deserialize for CustomerSourceExpiring {
        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
            Place::new(out)
        }
    }

    impl Visitor for Place<CustomerSourceExpiring> {
        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
        }
    }

    impl Map for Builder<'_> {
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.builder.key(k)
        }

        fn finish(&mut self) -> Result<()> {
            *self.out = self.builder.take_out();
            Ok(())
        }
    }

    impl MapBuilder for CustomerSourceExpiringBuilder {
        type Out = CustomerSourceExpiring;
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.inner.key_inner(k)
        }

        fn deser_default() -> Self {
            Self::default()
        }

        fn take_out(&mut self) -> Option<Self::Out> {
            let (k, o) = self.inner.finish_inner()?;
            CustomerSourceExpiring::construct(&k, o)
        }
    }

    impl stripe_types::ObjectDeser for CustomerSourceExpiring {
        type Builder = CustomerSourceExpiringBuilder;
    }
    impl CustomerSourceExpiring {
        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
            Some(match key {
                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),

                _ => {
                    tracing::warn!(
                        "Unknown object type '{}' for enum '{}'",
                        key,
                        "CustomerSourceExpiring"
                    );
                    return None;
                }
            })
        }
    }

    impl FromValueOpt for CustomerSourceExpiring {
        fn from_value(v: Value) -> Option<Self> {
            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
            Self::construct(&typ, obj)
        }
    }
};

#[cfg(feature = "redact-generated-debug")]
impl std::fmt::Debug for CustomerSourceExpiring {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("CustomerSourceExpiring").finish_non_exhaustive()
    }
}
#[derive(Clone)]
#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(tag = "object"))]
pub enum CustomerSourceUpdated {
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "bank_account"))]
    BankAccount(stripe_shared::BankAccount),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "card"))]
    Card(stripe_shared::Card),
    #[cfg_attr(any(feature = "deserialize", feature = "serialize"), serde(rename = "source"))]
    Source(stripe_shared::Source),
}

#[derive(Default)]
pub struct CustomerSourceUpdatedBuilder {
    inner: stripe_types::miniserde_helpers::ObjectBuilderInner,
}

const _: () = {
    use miniserde::de::{Map, Visitor};
    use miniserde::json::Value;
    use miniserde::{Deserialize, Result, make_place};
    use stripe_types::MapBuilder;
    use stripe_types::miniserde_helpers::FromValueOpt;

    use super::*;

    make_place!(Place);

    struct Builder<'a> {
        out: &'a mut Option<CustomerSourceUpdated>,
        builder: CustomerSourceUpdatedBuilder,
    }

    impl Deserialize for CustomerSourceUpdated {
        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
            Place::new(out)
        }
    }

    impl Visitor for Place<CustomerSourceUpdated> {
        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
            Ok(Box::new(Builder { out: &mut self.out, builder: Default::default() }))
        }
    }

    impl Map for Builder<'_> {
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.builder.key(k)
        }

        fn finish(&mut self) -> Result<()> {
            *self.out = self.builder.take_out();
            Ok(())
        }
    }

    impl MapBuilder for CustomerSourceUpdatedBuilder {
        type Out = CustomerSourceUpdated;
        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
            self.inner.key_inner(k)
        }

        fn deser_default() -> Self {
            Self::default()
        }

        fn take_out(&mut self) -> Option<Self::Out> {
            let (k, o) = self.inner.finish_inner()?;
            CustomerSourceUpdated::construct(&k, o)
        }
    }

    impl stripe_types::ObjectDeser for CustomerSourceUpdated {
        type Builder = CustomerSourceUpdatedBuilder;
    }
    impl CustomerSourceUpdated {
        fn construct(key: &str, o: miniserde::json::Object) -> Option<Self> {
            Some(match key {
                "bank_account" => Self::BankAccount(FromValueOpt::from_value(Value::Object(o))?),
                "card" => Self::Card(FromValueOpt::from_value(Value::Object(o))?),
                "source" => Self::Source(FromValueOpt::from_value(Value::Object(o))?),

                _ => {
                    tracing::warn!(
                        "Unknown object type '{}' for enum '{}'",
                        key,
                        "CustomerSourceUpdated"
                    );
                    return None;
                }
            })
        }
    }

    impl FromValueOpt for CustomerSourceUpdated {
        fn from_value(v: Value) -> Option<Self> {
            let (typ, obj) = stripe_types::miniserde_helpers::extract_object_discr(v)?;
            Self::construct(&typ, obj)
        }
    }
};

#[cfg(feature = "redact-generated-debug")]
impl std::fmt::Debug for CustomerSourceUpdated {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("CustomerSourceUpdated").finish_non_exhaustive()
    }
}
#[derive(Clone)]
#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
#[cfg_attr(any(feature = "serialize", feature = "deserialize"), serde(untagged))]
#[non_exhaustive]
/// The event data for a webhook event.
pub enum EventObject {
    /// Occurs whenever a user authorizes an application. Sent to the related application only.
    AccountApplicationAuthorized(Box<stripe_shared::Application>),
    /// Occurs whenever a user deauthorizes an application. Sent to the related application only.
    AccountApplicationDeauthorized(Box<stripe_shared::Application>),
    /// Occurs whenever an external account is created.
    AccountExternalAccountCreated(Box<AccountExternalAccountCreated>),
    /// Occurs whenever an external account is deleted.
    AccountExternalAccountDeleted(Box<AccountExternalAccountDeleted>),
    /// Occurs whenever an external account is updated.
    AccountExternalAccountUpdated(Box<AccountExternalAccountUpdated>),
    /// Occurs whenever an account status or property has changed.
    AccountUpdated(Box<stripe_shared::Account>),
    /// Occurs whenever an application fee is created on a charge.
    ApplicationFeeCreated(Box<stripe_shared::ApplicationFee>),
    /// Occurs whenever an application fee refund is updated.
    ApplicationFeeRefundUpdated(Box<stripe_shared::ApplicationFeeRefund>),
    /// Occurs whenever an application fee is refunded, whether from refunding a charge or from [refunding the application fee directly](#fee_refunds).
    /// This includes partial refunds.
    ApplicationFeeRefunded(Box<stripe_shared::ApplicationFee>),
    /// Occurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out).
    /// By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis.
    /// This event is not fired for negative transactions.
    #[cfg(feature = "async-stripe-core")]
    BalanceAvailable(Box<stripe_core::Balance>),
    /// Occurs whenever a balance settings status or property has changed.
    #[cfg(feature = "async-stripe-core")]
    BalanceSettingsUpdated(Box<stripe_core::BalanceSettings>),
    /// Occurs whenever your custom alert threshold is met.
    #[cfg(feature = "async-stripe-billing")]
    BillingAlertTriggered(Box<stripe_billing::BillingAlertTriggered>),
    /// Occurs when a credit balance transaction is created
    BillingCreditBalanceTransactionCreated(Box<stripe_shared::BillingCreditBalanceTransaction>),
    /// Occurs when a credit grant is created
    BillingCreditGrantCreated(Box<stripe_shared::BillingCreditGrant>),
    /// Occurs when a credit grant is updated
    BillingCreditGrantUpdated(Box<stripe_shared::BillingCreditGrant>),
    /// Occurs when a meter is created
    #[cfg(feature = "async-stripe-billing")]
    BillingMeterCreated(Box<stripe_billing::BillingMeter>),
    /// Occurs when a meter is deactivated
    #[cfg(feature = "async-stripe-billing")]
    BillingMeterDeactivated(Box<stripe_billing::BillingMeter>),
    /// Occurs when a meter is reactivated
    #[cfg(feature = "async-stripe-billing")]
    BillingMeterReactivated(Box<stripe_billing::BillingMeter>),
    /// Occurs when a meter is updated
    #[cfg(feature = "async-stripe-billing")]
    BillingMeterUpdated(Box<stripe_billing::BillingMeter>),
    /// Occurs whenever a portal configuration is created.
    #[cfg(feature = "async-stripe-billing")]
    BillingPortalConfigurationCreated(Box<stripe_billing::BillingPortalConfiguration>),
    /// Occurs whenever a portal configuration is updated.
    #[cfg(feature = "async-stripe-billing")]
    BillingPortalConfigurationUpdated(Box<stripe_billing::BillingPortalConfiguration>),
    /// Occurs whenever a portal session is created.
    #[cfg(feature = "async-stripe-billing")]
    BillingPortalSessionCreated(Box<stripe_billing::BillingPortalSession>),
    /// Occurs whenever a capability has new requirements or a new status.
    CapabilityUpdated(Box<stripe_shared::Capability>),
    /// Occurs whenever there is a positive remaining cash balance after Stripe automatically reconciles new funds into the cash balance.
    /// If you enabled manual reconciliation, this webhook will fire whenever there are new funds into the cash balance.
    CashBalanceFundsAvailable(Box<stripe_shared::CashBalance>),
    /// Occurs whenever a previously uncaptured charge is captured.
    ChargeCaptured(Box<stripe_shared::Charge>),
    /// Occurs when a dispute is closed and the dispute status changes to `lost`, `warning_closed`, or `won`.
    ChargeDisputeClosed(Box<stripe_shared::Dispute>),
    /// Occurs whenever a customer disputes a charge with their bank.
    ChargeDisputeCreated(Box<stripe_shared::Dispute>),
    /// Occurs when funds are reinstated to your account after a dispute is closed.
    /// This includes [partially refunded payments](https://docs.stripe.com/disputes#disputes-on-partially-refunded-payments).
    ChargeDisputeFundsReinstated(Box<stripe_shared::Dispute>),
    /// Occurs when funds are removed from your account due to a dispute.
    ChargeDisputeFundsWithdrawn(Box<stripe_shared::Dispute>),
    /// Occurs when the dispute is updated (usually with evidence).
    ChargeDisputeUpdated(Box<stripe_shared::Dispute>),
    /// Occurs whenever an uncaptured charge expires.
    ChargeExpired(Box<stripe_shared::Charge>),
    /// Occurs whenever a failed charge attempt occurs.
    ChargeFailed(Box<stripe_shared::Charge>),
    /// Occurs whenever a pending charge is created.
    ChargePending(Box<stripe_shared::Charge>),
    /// Occurs whenever a refund is updated on selected payment methods.
    /// For updates on all refunds, listen to `refund.updated` instead.
    ChargeRefundUpdated(Box<stripe_shared::Refund>),
    /// Occurs whenever a charge is refunded, including partial refunds.
    /// Listen to `refund.created` for information about the refund.
    ChargeRefunded(Box<stripe_shared::Charge>),
    /// Occurs whenever a charge is successful.
    ChargeSucceeded(Box<stripe_shared::Charge>),
    /// Occurs whenever a charge description or metadata is updated, or upon an asynchronous capture.
    ChargeUpdated(Box<stripe_shared::Charge>),
    /// Occurs when a payment intent using a delayed payment method fails.
    CheckoutSessionAsyncPaymentFailed(Box<stripe_shared::CheckoutSession>),
    /// Occurs when a payment intent using a delayed payment method finally succeeds.
    CheckoutSessionAsyncPaymentSucceeded(Box<stripe_shared::CheckoutSession>),
    /// Occurs when a Checkout Session has been successfully completed.
    CheckoutSessionCompleted(Box<stripe_shared::CheckoutSession>),
    /// Occurs when a Checkout Session is expired.
    CheckoutSessionExpired(Box<stripe_shared::CheckoutSession>),
    /// Occurs when a Climate order is canceled.
    #[cfg(feature = "async-stripe-misc")]
    ClimateOrderCanceled(Box<stripe_misc::ClimateOrder>),
    /// Occurs when a Climate order is created.
    #[cfg(feature = "async-stripe-misc")]
    ClimateOrderCreated(Box<stripe_misc::ClimateOrder>),
    /// Occurs when a Climate order is delayed.
    #[cfg(feature = "async-stripe-misc")]
    ClimateOrderDelayed(Box<stripe_misc::ClimateOrder>),
    /// Occurs when a Climate order is delivered.
    #[cfg(feature = "async-stripe-misc")]
    ClimateOrderDelivered(Box<stripe_misc::ClimateOrder>),
    /// Occurs when a Climate order's product is substituted for another.
    #[cfg(feature = "async-stripe-misc")]
    ClimateOrderProductSubstituted(Box<stripe_misc::ClimateOrder>),
    /// Occurs when a Climate product is created.
    #[cfg(feature = "async-stripe-misc")]
    ClimateProductCreated(Box<stripe_misc::ClimateProduct>),
    /// Occurs when a Climate product is updated.
    #[cfg(feature = "async-stripe-misc")]
    ClimateProductPricingUpdated(Box<stripe_misc::ClimateProduct>),
    /// Occurs whenever a coupon is created.
    CouponCreated(Box<stripe_shared::Coupon>),
    /// Occurs whenever a coupon is deleted.
    CouponDeleted(Box<stripe_shared::Coupon>),
    /// Occurs whenever a coupon is updated.
    CouponUpdated(Box<stripe_shared::Coupon>),
    /// Occurs whenever a credit note is created.
    CreditNoteCreated(Box<stripe_shared::CreditNote>),
    /// Occurs whenever a credit note is updated.
    CreditNoteUpdated(Box<stripe_shared::CreditNote>),
    /// Occurs whenever a credit note is voided.
    CreditNoteVoided(Box<stripe_shared::CreditNote>),
    /// Occurs whenever a new customer is created.
    CustomerCreated(Box<stripe_shared::Customer>),
    /// Occurs whenever a customer is deleted.
    CustomerDeleted(Box<stripe_shared::Customer>),
    /// Occurs whenever a coupon is attached to a customer.
    CustomerDiscountCreated(Box<stripe_shared::Discount>),
    /// Occurs whenever a coupon is removed from a customer.
    CustomerDiscountDeleted(Box<stripe_shared::Discount>),
    /// Occurs whenever a customer is switched from one coupon to another.
    CustomerDiscountUpdated(Box<stripe_shared::Discount>),
    /// Occurs whenever a new source is created for a customer.
    CustomerSourceCreated(Box<CustomerSourceCreated>),
    /// Occurs whenever a source is removed from a customer.
    CustomerSourceDeleted(Box<CustomerSourceDeleted>),
    /// Occurs whenever a card or source will expire at the end of the month.
    /// This event only works with legacy integrations using Card or Source objects.
    /// If you use the PaymentMethod API, this event won't occur.
    CustomerSourceExpiring(Box<CustomerSourceExpiring>),
    /// Occurs whenever a source's details are changed.
    CustomerSourceUpdated(Box<CustomerSourceUpdated>),
    /// Occurs whenever a customer is signed up for a new plan.
    CustomerSubscriptionCreated(Box<stripe_shared::Subscription>),
    /// Occurs whenever a customer's subscription ends.
    CustomerSubscriptionDeleted(Box<stripe_shared::Subscription>),
    /// Occurs whenever a customer's subscription is paused.
    /// Only applies when subscriptions enter `status=paused`, not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is paused.
    CustomerSubscriptionPaused(Box<stripe_shared::Subscription>),
    /// Occurs whenever a customer's subscription's pending update is applied, and the subscription is updated.
    CustomerSubscriptionPendingUpdateApplied(Box<stripe_shared::Subscription>),
    /// Occurs whenever a customer's subscription's pending update expires before the related invoice is paid.
    CustomerSubscriptionPendingUpdateExpired(Box<stripe_shared::Subscription>),
    /// Occurs whenever a customer's subscription is no longer paused.
    /// Only applies when a `status=paused` subscription is [resumed](https://docs.stripe.com/api/subscriptions/resume), not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is resumed.
    CustomerSubscriptionResumed(Box<stripe_shared::Subscription>),
    /// Occurs three days before a subscription's trial period is scheduled to end, or when a trial is ended immediately (using `trial_end=now`).
    CustomerSubscriptionTrialWillEnd(Box<stripe_shared::Subscription>),
    /// Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active).
    CustomerSubscriptionUpdated(Box<stripe_shared::Subscription>),
    /// Occurs whenever a tax ID is created for a customer.
    CustomerTaxIdCreated(Box<stripe_shared::TaxId>),
    /// Occurs whenever a tax ID is deleted from a customer.
    CustomerTaxIdDeleted(Box<stripe_shared::TaxId>),
    /// Occurs whenever a customer's tax ID is updated.
    CustomerTaxIdUpdated(Box<stripe_shared::TaxId>),
    /// Occurs whenever any property of a customer changes.
    CustomerUpdated(Box<stripe_shared::Customer>),
    /// Occurs whenever a new customer cash balance transactions is created.
    CustomerCashBalanceTransactionCreated(Box<stripe_shared::CustomerCashBalanceTransaction>),
    /// Occurs whenever a customer's entitlements change.
    #[cfg(feature = "async-stripe-misc")]
    EntitlementsActiveEntitlementSummaryUpdated(
        Box<stripe_misc::EntitlementsActiveEntitlementSummary>,
    ),
    /// Occurs whenever a new Stripe-generated file is available for your account.
    FileCreated(Box<stripe_shared::File>),
    /// Occurs when a Financial Connections account's account numbers are updated.
    #[cfg(feature = "async-stripe-misc")]
    FinancialConnectionsAccountAccountNumbersUpdated(Box<stripe_misc::FinancialConnectionsAccount>),
    /// Occurs when a new Financial Connections account is created.
    #[cfg(feature = "async-stripe-misc")]
    FinancialConnectionsAccountCreated(Box<stripe_misc::FinancialConnectionsAccount>),
    /// Occurs when a Financial Connections account's status is updated from `active` to `inactive`.
    #[cfg(feature = "async-stripe-misc")]
    FinancialConnectionsAccountDeactivated(Box<stripe_misc::FinancialConnectionsAccount>),
    /// Occurs when a Financial Connections account is disconnected.
    #[cfg(feature = "async-stripe-misc")]
    FinancialConnectionsAccountDisconnected(Box<stripe_misc::FinancialConnectionsAccount>),
    /// Occurs when a Financial Connections account's status is updated from `inactive` to `active`.
    #[cfg(feature = "async-stripe-misc")]
    FinancialConnectionsAccountReactivated(Box<stripe_misc::FinancialConnectionsAccount>),
    /// Occurs when an Account’s `balance_refresh` status transitions from `pending` to either `succeeded` or `failed`.
    #[cfg(feature = "async-stripe-misc")]
    FinancialConnectionsAccountRefreshedBalance(Box<stripe_misc::FinancialConnectionsAccount>),
    /// Occurs when an Account’s `ownership_refresh` status transitions from `pending` to either `succeeded` or `failed`.
    #[cfg(feature = "async-stripe-misc")]
    FinancialConnectionsAccountRefreshedOwnership(Box<stripe_misc::FinancialConnectionsAccount>),
    /// Occurs when an Account’s `transaction_refresh` status transitions from `pending` to either `succeeded` or `failed`.
    #[cfg(feature = "async-stripe-misc")]
    FinancialConnectionsAccountRefreshedTransactions(Box<stripe_misc::FinancialConnectionsAccount>),
    /// Occurs when an Account’s tokenized account number is about to expire.
    #[cfg(feature = "async-stripe-misc")]
    FinancialConnectionsAccountUpcomingAccountNumberExpiry(
        Box<stripe_misc::FinancialConnectionsAccount>,
    ),
    /// Occurs whenever a VerificationSession is canceled
    #[cfg(feature = "async-stripe-misc")]
    IdentityVerificationSessionCanceled(Box<stripe_misc::IdentityVerificationSession>),
    /// Occurs whenever a VerificationSession is created
    #[cfg(feature = "async-stripe-misc")]
    IdentityVerificationSessionCreated(Box<stripe_misc::IdentityVerificationSession>),
    /// Occurs whenever a VerificationSession transitions to processing
    #[cfg(feature = "async-stripe-misc")]
    IdentityVerificationSessionProcessing(Box<stripe_misc::IdentityVerificationSession>),
    /// Occurs whenever a VerificationSession is redacted.
    #[cfg(feature = "async-stripe-misc")]
    IdentityVerificationSessionRedacted(Box<stripe_misc::IdentityVerificationSession>),
    /// Occurs whenever a VerificationSession transitions to require user input
    #[cfg(feature = "async-stripe-misc")]
    IdentityVerificationSessionRequiresInput(Box<stripe_misc::IdentityVerificationSession>),
    /// Occurs whenever a VerificationSession transitions to verified
    #[cfg(feature = "async-stripe-misc")]
    IdentityVerificationSessionVerified(Box<stripe_misc::IdentityVerificationSession>),
    /// Occurs whenever a new invoice is created.
    /// To learn how webhooks can be used with this event, and how they can affect it, see [Using Webhooks with Subscriptions](https://docs.stripe.com/subscriptions/webhooks).
    InvoiceCreated(Box<stripe_shared::Invoice>),
    /// Occurs whenever a draft invoice is deleted.
    /// Note: This event is not sent for [invoice previews](https://docs.stripe.com/api/invoices/create_preview).
    InvoiceDeleted(Box<stripe_shared::Invoice>),
    /// Occurs whenever a draft invoice cannot be finalized.
    /// See the invoice’s [last finalization error](https://docs.stripe.com/api/invoices/object#invoice_object-last_finalization_error) for details.
    InvoiceFinalizationFailed(Box<stripe_shared::Invoice>),
    /// Occurs whenever a draft invoice is finalized and updated to be an open invoice.
    InvoiceFinalized(Box<stripe_shared::Invoice>),
    /// Occurs whenever an invoice is marked uncollectible.
    InvoiceMarkedUncollectible(Box<stripe_shared::Invoice>),
    /// Occurs X number of days after an invoice becomes due&mdash;where X is determined by Automations
    InvoiceOverdue(Box<stripe_shared::Invoice>),
    /// Occurs when an invoice transitions to paid with a non-zero amount_overpaid.
    InvoiceOverpaid(Box<stripe_shared::Invoice>),
    /// Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band.
    InvoicePaid(Box<stripe_shared::Invoice>),
    /// Occurs whenever an invoice payment attempt requires further user action to complete.
    InvoicePaymentActionRequired(Box<stripe_shared::Invoice>),
    /// Occurs when an invoice requires a payment using a payment method that cannot be processed by Stripe.
    InvoicePaymentAttemptRequired(Box<stripe_shared::Invoice>),
    /// Occurs whenever an invoice payment attempt fails, due to either a declined payment, including soft decline, or to the lack of a stored payment method.
    InvoicePaymentFailed(Box<stripe_shared::Invoice>),
    /// Occurs whenever an invoice payment attempt succeeds.
    InvoicePaymentSucceeded(Box<stripe_shared::Invoice>),
    /// Occurs whenever an invoice email is sent out.
    InvoiceSent(Box<stripe_shared::Invoice>),
    /// Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged&mdash;where X is determined by your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic).
    /// Note: The received `Invoice` object will not have an invoice ID.
    InvoiceUpcoming(Box<stripe_shared::Invoice>),
    /// Occurs whenever an invoice changes (e.g., the invoice amount).
    InvoiceUpdated(Box<stripe_shared::Invoice>),
    /// Occurs whenever an invoice is voided.
    InvoiceVoided(Box<stripe_shared::Invoice>),
    /// Occurs X number of days before an invoice becomes due&mdash;where X is determined by Automations
    InvoiceWillBeDue(Box<stripe_shared::Invoice>),
    /// Occurs when an InvoicePayment is successfully paid.
    InvoicePaymentPaid(Box<stripe_shared::InvoicePayment>),
    /// Occurs whenever an invoice item is created.
    #[cfg(feature = "async-stripe-billing")]
    InvoiceitemCreated(Box<stripe_billing::InvoiceItem>),
    /// Occurs whenever an invoice item is deleted.
    #[cfg(feature = "async-stripe-billing")]
    InvoiceitemDeleted(Box<stripe_billing::InvoiceItem>),
    /// Occurs whenever an authorization is created.
    IssuingAuthorizationCreated(Box<stripe_shared::IssuingAuthorization>),
    /// Represents a synchronous request for authorization, see [Using your integration to handle authorization requests](https://docs.stripe.com/issuing/purchases/authorizations#authorization-handling).
    IssuingAuthorizationRequest(Box<stripe_shared::IssuingAuthorization>),
    /// Occurs whenever an authorization is updated.
    IssuingAuthorizationUpdated(Box<stripe_shared::IssuingAuthorization>),
    /// Occurs whenever a card is created.
    IssuingCardCreated(Box<stripe_shared::IssuingCard>),
    /// Occurs whenever a card is updated.
    IssuingCardUpdated(Box<stripe_shared::IssuingCard>),
    /// Occurs whenever a cardholder is created.
    IssuingCardholderCreated(Box<stripe_shared::IssuingCardholder>),
    /// Occurs whenever a cardholder is updated.
    IssuingCardholderUpdated(Box<stripe_shared::IssuingCardholder>),
    /// Occurs whenever a dispute is won, lost or expired.
    IssuingDisputeClosed(Box<stripe_shared::IssuingDispute>),
    /// Occurs whenever a dispute is created.
    IssuingDisputeCreated(Box<stripe_shared::IssuingDispute>),
    /// Occurs whenever funds are reinstated to your account for an Issuing dispute.
    IssuingDisputeFundsReinstated(Box<stripe_shared::IssuingDispute>),
    /// Occurs whenever funds are deducted from your account for an Issuing dispute.
    IssuingDisputeFundsRescinded(Box<stripe_shared::IssuingDispute>),
    /// Occurs whenever a dispute is submitted.
    IssuingDisputeSubmitted(Box<stripe_shared::IssuingDispute>),
    /// Occurs whenever a dispute is updated.
    IssuingDisputeUpdated(Box<stripe_shared::IssuingDispute>),
    /// Occurs whenever a personalization design is activated following the activation of the physical bundle that belongs to it.
    IssuingPersonalizationDesignActivated(Box<stripe_shared::IssuingPersonalizationDesign>),
    /// Occurs whenever a personalization design is deactivated following the deactivation of the physical bundle that belongs to it.
    IssuingPersonalizationDesignDeactivated(Box<stripe_shared::IssuingPersonalizationDesign>),
    /// Occurs whenever a personalization design is rejected by design review.
    IssuingPersonalizationDesignRejected(Box<stripe_shared::IssuingPersonalizationDesign>),
    /// Occurs whenever a personalization design is updated.
    IssuingPersonalizationDesignUpdated(Box<stripe_shared::IssuingPersonalizationDesign>),
    /// Occurs whenever an issuing digital wallet token is created.
    IssuingTokenCreated(Box<stripe_shared::IssuingToken>),
    /// Occurs whenever an issuing digital wallet token is updated.
    IssuingTokenUpdated(Box<stripe_shared::IssuingToken>),
    /// Occurs whenever an issuing transaction is created.
    IssuingTransactionCreated(Box<stripe_shared::IssuingTransaction>),
    /// Occurs whenever an issuing transaction is updated with receipt data.
    IssuingTransactionPurchaseDetailsReceiptUpdated(Box<stripe_shared::IssuingTransaction>),
    /// Occurs whenever an issuing transaction is updated.
    IssuingTransactionUpdated(Box<stripe_shared::IssuingTransaction>),
    /// Occurs whenever a Mandate is updated.
    MandateUpdated(Box<stripe_shared::Mandate>),
    /// Occurs when a PaymentIntent has funds to be captured.
    /// Check the `amount_capturable` property on the PaymentIntent to determine the amount that can be captured.
    /// You may capture the PaymentIntent with an `amount_to_capture` value up to the specified amount.
    /// [Learn more about capturing PaymentIntents.](https://docs.stripe.com/api/payment_intents/capture).
    PaymentIntentAmountCapturableUpdated(Box<stripe_shared::PaymentIntent>),
    /// Occurs when a PaymentIntent is canceled.
    PaymentIntentCanceled(Box<stripe_shared::PaymentIntent>),
    /// Occurs when a new PaymentIntent is created.
    PaymentIntentCreated(Box<stripe_shared::PaymentIntent>),
    /// Occurs when funds are applied to a customer_balance PaymentIntent and the 'amount_remaining' changes.
    PaymentIntentPartiallyFunded(Box<stripe_shared::PaymentIntent>),
    /// Occurs when a PaymentIntent has failed the attempt to create a payment method or a payment.
    PaymentIntentPaymentFailed(Box<stripe_shared::PaymentIntent>),
    /// Occurs when a PaymentIntent has started processing.
    PaymentIntentProcessing(Box<stripe_shared::PaymentIntent>),
    /// Occurs when a PaymentIntent transitions to requires_action state
    PaymentIntentRequiresAction(Box<stripe_shared::PaymentIntent>),
    /// Occurs when a PaymentIntent has successfully completed payment.
    PaymentIntentSucceeded(Box<stripe_shared::PaymentIntent>),
    /// Occurs when a payment link is created.
    PaymentLinkCreated(Box<stripe_shared::PaymentLink>),
    /// Occurs when a payment link is updated.
    PaymentLinkUpdated(Box<stripe_shared::PaymentLink>),
    /// Occurs whenever a new payment method is attached to a customer.
    PaymentMethodAttached(Box<stripe_shared::PaymentMethod>),
    /// Occurs whenever a payment method's details are automatically updated by the network.
    PaymentMethodAutomaticallyUpdated(Box<stripe_shared::PaymentMethod>),
    /// Occurs whenever a payment method is detached from a customer.
    PaymentMethodDetached(Box<stripe_shared::PaymentMethod>),
    /// Occurs whenever a payment method is updated via the [PaymentMethod update API](https://docs.stripe.com/api/payment_methods/update).
    PaymentMethodUpdated(Box<stripe_shared::PaymentMethod>),
    /// Occurs whenever a payout is canceled.
    PayoutCanceled(Box<stripe_shared::Payout>),
    /// Occurs whenever a payout is created.
    PayoutCreated(Box<stripe_shared::Payout>),
    /// Occurs whenever a payout attempt fails.
    PayoutFailed(Box<stripe_shared::Payout>),
    /// Occurs whenever a payout is *expected* to be available in the destination account.
    /// If the payout fails, a `payout.failed` notification is also sent, at a later time.
    PayoutPaid(Box<stripe_shared::Payout>),
    /// Occurs whenever balance transactions paid out in an automatic payout can be queried.
    PayoutReconciliationCompleted(Box<stripe_shared::Payout>),
    /// Occurs whenever a payout is updated.
    PayoutUpdated(Box<stripe_shared::Payout>),
    /// Occurs whenever a person associated with an account is created.
    PersonCreated(Box<stripe_shared::Person>),
    /// Occurs whenever a person associated with an account is deleted.
    PersonDeleted(Box<stripe_shared::Person>),
    /// Occurs whenever a person associated with an account is updated.
    PersonUpdated(Box<stripe_shared::Person>),
    /// Occurs whenever a plan is created.
    PlanCreated(Box<stripe_shared::Plan>),
    /// Occurs whenever a plan is deleted.
    PlanDeleted(Box<stripe_shared::Plan>),
    /// Occurs whenever a plan is updated.
    PlanUpdated(Box<stripe_shared::Plan>),
    /// Occurs whenever a price is created.
    PriceCreated(Box<stripe_shared::Price>),
    /// Occurs whenever a price is deleted.
    PriceDeleted(Box<stripe_shared::Price>),
    /// Occurs whenever a price is updated.
    PriceUpdated(Box<stripe_shared::Price>),
    /// Occurs whenever a product is created.
    ProductCreated(Box<stripe_shared::Product>),
    /// Occurs whenever a product is deleted.
    ProductDeleted(Box<stripe_shared::Product>),
    /// Occurs whenever a product is updated.
    ProductUpdated(Box<stripe_shared::Product>),
    /// Occurs whenever a promotion code is created.
    PromotionCodeCreated(Box<stripe_shared::PromotionCode>),
    /// Occurs whenever a promotion code is updated.
    PromotionCodeUpdated(Box<stripe_shared::PromotionCode>),
    /// Occurs whenever a quote is accepted.
    #[cfg(feature = "async-stripe-billing")]
    QuoteAccepted(Box<stripe_billing::Quote>),
    /// Occurs whenever a quote is canceled.
    #[cfg(feature = "async-stripe-billing")]
    QuoteCanceled(Box<stripe_billing::Quote>),
    /// Occurs whenever a quote is created.
    #[cfg(feature = "async-stripe-billing")]
    QuoteCreated(Box<stripe_billing::Quote>),
    /// Occurs whenever a quote is finalized.
    #[cfg(feature = "async-stripe-billing")]
    QuoteFinalized(Box<stripe_billing::Quote>),
    /// Occurs whenever an early fraud warning is created.
    #[cfg(feature = "async-stripe-fraud")]
    RadarEarlyFraudWarningCreated(Box<stripe_fraud::RadarEarlyFraudWarning>),
    /// Occurs whenever an early fraud warning is updated.
    #[cfg(feature = "async-stripe-fraud")]
    RadarEarlyFraudWarningUpdated(Box<stripe_fraud::RadarEarlyFraudWarning>),
    /// Occurs whenever a refund is created.
    RefundCreated(Box<stripe_shared::Refund>),
    /// Occurs whenever a refund has failed.
    RefundFailed(Box<stripe_shared::Refund>),
    /// Occurs whenever a refund is updated.
    RefundUpdated(Box<stripe_shared::Refund>),
    /// Occurs whenever a requested `ReportRun` failed to complete.
    #[cfg(feature = "async-stripe-misc")]
    ReportingReportRunFailed(Box<stripe_misc::ReportingReportRun>),
    /// Occurs whenever a requested `ReportRun` completed successfully.
    #[cfg(feature = "async-stripe-misc")]
    ReportingReportRunSucceeded(Box<stripe_misc::ReportingReportRun>),
    /// Occurs whenever a `ReportType` is updated (typically to indicate that a new day's data has come available).
    #[cfg(feature = "async-stripe-misc")]
    ReportingReportTypeUpdated(Box<stripe_misc::ReportingReportType>),
    /// Occurs when a reserve hold is created.
    #[cfg(feature = "async-stripe-reserve")]
    ReserveHoldCreated(Box<stripe_reserve::ReserveHold>),
    /// Occurs when a reserve hold is updated.
    #[cfg(feature = "async-stripe-reserve")]
    ReserveHoldUpdated(Box<stripe_reserve::ReserveHold>),
    /// Occurs when a reserve plan is created.
    #[cfg(feature = "async-stripe-reserve")]
    ReservePlanCreated(Box<stripe_reserve::ReservePlan>),
    /// Occurs when a reserve plan is disabled.
    #[cfg(feature = "async-stripe-reserve")]
    ReservePlanDisabled(Box<stripe_reserve::ReservePlan>),
    /// Occurs when a reserve plan expires.
    #[cfg(feature = "async-stripe-reserve")]
    ReservePlanExpired(Box<stripe_reserve::ReservePlan>),
    /// Occurs when a reserve plan is updated.
    #[cfg(feature = "async-stripe-reserve")]
    ReservePlanUpdated(Box<stripe_reserve::ReservePlan>),
    /// Occurs when a reserve release is created.
    #[cfg(feature = "async-stripe-reserve")]
    ReserveReleaseCreated(Box<stripe_reserve::ReserveRelease>),
    /// Occurs whenever a review is closed.
    /// The review's `reason` field indicates why: `approved`, `disputed`, `refunded`, `refunded_as_fraud`, or `canceled`.
    ReviewClosed(Box<stripe_shared::Review>),
    /// Occurs whenever a review is opened.
    ReviewOpened(Box<stripe_shared::Review>),
    /// Occurs when a SetupIntent is canceled.
    SetupIntentCanceled(Box<stripe_shared::SetupIntent>),
    /// Occurs when a new SetupIntent is created.
    SetupIntentCreated(Box<stripe_shared::SetupIntent>),
    /// Occurs when a SetupIntent is in requires_action state.
    SetupIntentRequiresAction(Box<stripe_shared::SetupIntent>),
    /// Occurs when a SetupIntent has failed the attempt to setup a payment method.
    SetupIntentSetupFailed(Box<stripe_shared::SetupIntent>),
    /// Occurs when an SetupIntent has successfully setup a payment method.
    SetupIntentSucceeded(Box<stripe_shared::SetupIntent>),
    /// Occurs whenever a Sigma scheduled query run finishes.
    #[cfg(feature = "async-stripe-misc")]
    SigmaScheduledQueryRunCreated(Box<stripe_misc::ScheduledQueryRun>),
    /// Occurs whenever a source is canceled.
    SourceCanceled(Box<stripe_shared::Source>),
    /// Occurs whenever a source transitions to chargeable.
    SourceChargeable(Box<stripe_shared::Source>),
    /// Occurs whenever a source fails.
    SourceFailed(Box<stripe_shared::Source>),
    /// Occurs whenever a source mandate notification method is set to manual.
    #[cfg(feature = "async-stripe-payment")]
    SourceMandateNotification(Box<stripe_payment::SourceMandateNotification>),
    /// Occurs whenever the refund attributes are required on a receiver source to process a refund or a mispayment.
    SourceRefundAttributesRequired(Box<stripe_shared::Source>),
    /// Occurs whenever a source transaction is created.
    SourceTransactionCreated(Box<stripe_shared::SourceTransaction>),
    /// Occurs whenever a source transaction is updated.
    SourceTransactionUpdated(Box<stripe_shared::SourceTransaction>),
    /// Occurs whenever a subscription schedule is canceled due to the underlying subscription being canceled because of delinquency.
    SubscriptionScheduleAborted(Box<stripe_shared::SubscriptionSchedule>),
    /// Occurs whenever a subscription schedule is canceled.
    SubscriptionScheduleCanceled(Box<stripe_shared::SubscriptionSchedule>),
    /// Occurs whenever a new subscription schedule is completed.
    SubscriptionScheduleCompleted(Box<stripe_shared::SubscriptionSchedule>),
    /// Occurs whenever a new subscription schedule is created.
    SubscriptionScheduleCreated(Box<stripe_shared::SubscriptionSchedule>),
    /// Occurs 7 days before a subscription schedule will expire.
    SubscriptionScheduleExpiring(Box<stripe_shared::SubscriptionSchedule>),
    /// Occurs whenever a new subscription schedule is released.
    SubscriptionScheduleReleased(Box<stripe_shared::SubscriptionSchedule>),
    /// Occurs whenever a subscription schedule is updated.
    SubscriptionScheduleUpdated(Box<stripe_shared::SubscriptionSchedule>),
    /// Occurs whenever tax settings is updated.
    #[cfg(feature = "async-stripe-misc")]
    TaxSettingsUpdated(Box<stripe_misc::TaxSettings>),
    /// Occurs whenever a new tax rate is created.
    TaxRateCreated(Box<stripe_shared::TaxRate>),
    /// Occurs whenever a tax rate is updated.
    TaxRateUpdated(Box<stripe_shared::TaxRate>),
    /// Occurs whenever an action sent to a Terminal reader failed.
    #[cfg(feature = "async-stripe-terminal")]
    TerminalReaderActionFailed(Box<stripe_terminal::TerminalReader>),
    /// Occurs whenever an action sent to a Terminal reader was successful.
    #[cfg(feature = "async-stripe-terminal")]
    TerminalReaderActionSucceeded(Box<stripe_terminal::TerminalReader>),
    /// Occurs whenever an action sent to a Terminal reader is updated.
    #[cfg(feature = "async-stripe-terminal")]
    TerminalReaderActionUpdated(Box<stripe_terminal::TerminalReader>),
    /// Occurs whenever a test clock starts advancing.
    TestHelpersTestClockAdvancing(Box<stripe_shared::TestHelpersTestClock>),
    /// Occurs whenever a test clock is created.
    TestHelpersTestClockCreated(Box<stripe_shared::TestHelpersTestClock>),
    /// Occurs whenever a test clock is deleted.
    TestHelpersTestClockDeleted(Box<stripe_shared::TestHelpersTestClock>),
    /// Occurs whenever a test clock fails to advance its frozen time.
    TestHelpersTestClockInternalFailure(Box<stripe_shared::TestHelpersTestClock>),
    /// Occurs whenever a test clock transitions to a ready status.
    TestHelpersTestClockReady(Box<stripe_shared::TestHelpersTestClock>),
    /// Occurs whenever a top-up is canceled.
    TopupCanceled(Box<stripe_shared::Topup>),
    /// Occurs whenever a top-up is created.
    TopupCreated(Box<stripe_shared::Topup>),
    /// Occurs whenever a top-up fails.
    TopupFailed(Box<stripe_shared::Topup>),
    /// Occurs whenever a top-up is reversed.
    TopupReversed(Box<stripe_shared::Topup>),
    /// Occurs whenever a top-up succeeds.
    TopupSucceeded(Box<stripe_shared::Topup>),
    /// Occurs whenever a transfer is created.
    TransferCreated(Box<stripe_shared::Transfer>),
    /// Occurs whenever a transfer is reversed, including partial reversals.
    TransferReversed(Box<stripe_shared::Transfer>),
    /// Occurs whenever a transfer's description or metadata is updated.
    TransferUpdated(Box<stripe_shared::Transfer>),
    /// Occurs whenever an CreditReversal is submitted and created.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryCreditReversalCreated(Box<stripe_treasury::TreasuryCreditReversal>),
    /// Occurs whenever an CreditReversal post is posted.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryCreditReversalPosted(Box<stripe_treasury::TreasuryCreditReversal>),
    /// Occurs whenever a DebitReversal is completed.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryDebitReversalCompleted(Box<stripe_treasury::TreasuryDebitReversal>),
    /// Occurs whenever a DebitReversal is created.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryDebitReversalCreated(Box<stripe_treasury::TreasuryDebitReversal>),
    /// Occurs whenever an initial credit is granted on a DebitReversal.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryDebitReversalInitialCreditGranted(Box<stripe_treasury::TreasuryDebitReversal>),
    /// Occurs whenever the status of the FinancialAccount becomes closed.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryFinancialAccountClosed(Box<stripe_treasury::TreasuryFinancialAccount>),
    /// Occurs whenever a new FinancialAccount is created.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryFinancialAccountCreated(Box<stripe_treasury::TreasuryFinancialAccount>),
    /// Occurs whenever the statuses of any features within an existing FinancialAccount are updated.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryFinancialAccountFeaturesStatusUpdated(Box<stripe_treasury::TreasuryFinancialAccount>),
    /// Occurs whenever an InboundTransfer is canceled.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryInboundTransferCanceled(Box<stripe_treasury::TreasuryInboundTransfer>),
    /// Occurs whenever an InboundTransfer is created.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryInboundTransferCreated(Box<stripe_treasury::TreasuryInboundTransfer>),
    /// Occurs whenever an InboundTransfer has failed.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryInboundTransferFailed(Box<stripe_treasury::TreasuryInboundTransfer>),
    /// Occurs whenever an InboundTransfer has succeeded.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryInboundTransferSucceeded(Box<stripe_treasury::TreasuryInboundTransfer>),
    /// Occurs whenever an OutboundPayment is canceled.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundPaymentCanceled(Box<stripe_treasury::TreasuryOutboundPayment>),
    /// Occurs whenever a new OutboundPayment is successfully created.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundPaymentCreated(Box<stripe_treasury::TreasuryOutboundPayment>),
    /// Occurs whenever the arrival date on an OutboundPayment updates.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundPaymentExpectedArrivalDateUpdated(
        Box<stripe_treasury::TreasuryOutboundPayment>,
    ),
    /// Occurs whenever an OutboundPayment fails.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundPaymentFailed(Box<stripe_treasury::TreasuryOutboundPayment>),
    /// Occurs whenever an OutboundPayment posts.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundPaymentPosted(Box<stripe_treasury::TreasuryOutboundPayment>),
    /// Occurs whenever an OutboundPayment was returned.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundPaymentReturned(Box<stripe_treasury::TreasuryOutboundPayment>),
    /// Occurs whenever tracking_details on an OutboundPayment is updated.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundPaymentTrackingDetailsUpdated(Box<stripe_treasury::TreasuryOutboundPayment>),
    /// Occurs whenever an OutboundTransfer is canceled.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundTransferCanceled(Box<stripe_treasury::TreasuryOutboundTransfer>),
    /// Occurs whenever an OutboundTransfer is created.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundTransferCreated(Box<stripe_treasury::TreasuryOutboundTransfer>),
    /// Occurs whenever the arrival date on an OutboundTransfer updates.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundTransferExpectedArrivalDateUpdated(
        Box<stripe_treasury::TreasuryOutboundTransfer>,
    ),
    /// Occurs whenever an OutboundTransfer has failed.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundTransferFailed(Box<stripe_treasury::TreasuryOutboundTransfer>),
    /// Occurs whenever an OutboundTransfer is posted.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundTransferPosted(Box<stripe_treasury::TreasuryOutboundTransfer>),
    /// Occurs whenever an OutboundTransfer is returned.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundTransferReturned(Box<stripe_treasury::TreasuryOutboundTransfer>),
    /// Occurs whenever tracking_details on an OutboundTransfer is updated.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryOutboundTransferTrackingDetailsUpdated(Box<stripe_treasury::TreasuryOutboundTransfer>),
    /// Occurs whenever a received_credit is created as a result of funds being pushed by another account.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryReceivedCreditCreated(Box<stripe_treasury::TreasuryReceivedCredit>),
    /// Occurs whenever a received_credit transitions to failed state. Only applicable for check deposits.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryReceivedCreditFailed(Box<stripe_treasury::TreasuryReceivedCredit>),
    /// Occurs whenever a received_credit transitions to succeeded state.
    /// Only applicable for check deposits.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryReceivedCreditSucceeded(Box<stripe_treasury::TreasuryReceivedCredit>),
    /// Occurs whenever a received_debit is created as a result of funds being pulled by another account.
    #[cfg(feature = "async-stripe-treasury")]
    TreasuryReceivedDebitCreated(Box<stripe_treasury::TreasuryReceivedDebit>),
    #[cfg_attr(
        any(feature = "deserialize", feature = "serialize"),
        serde(with = "stripe_types::with_serde_json")
    )]
    Unknown(miniserde::json::Value),
}
#[cfg(feature = "redact-generated-debug")]
impl std::fmt::Debug for EventObject {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("EventObject").finish_non_exhaustive()
    }
}
impl EventObject {
    #[inline(never)]
    pub(crate) fn from_raw_data(typ: &str, data: miniserde::json::Value) -> Option<Self> {
        use stripe_types::miniserde_helpers::FromValueOpt;

        // Helper to avoid stack allocation for each branch
        #[inline(always)]
        fn parse_and_box<T: FromValueOpt>(data: miniserde::json::Value) -> Option<Box<T>> {
            FromValueOpt::from_value(data).map(Box::new)
        }

        if typ == "account.application.authorized" {
            return parse_and_box(data).map(Self::AccountApplicationAuthorized);
        }
        if typ == "account.application.deauthorized" {
            return parse_and_box(data).map(Self::AccountApplicationDeauthorized);
        }
        if typ == "account.external_account.created" {
            return parse_and_box(data).map(Self::AccountExternalAccountCreated);
        }
        if typ == "account.external_account.deleted" {
            return parse_and_box(data).map(Self::AccountExternalAccountDeleted);
        }
        if typ == "account.external_account.updated" {
            return parse_and_box(data).map(Self::AccountExternalAccountUpdated);
        }
        if typ == "account.updated" {
            return parse_and_box(data).map(Self::AccountUpdated);
        }
        if typ == "application_fee.created" {
            return parse_and_box(data).map(Self::ApplicationFeeCreated);
        }
        if typ == "application_fee.refund.updated" {
            return parse_and_box(data).map(Self::ApplicationFeeRefundUpdated);
        }
        if typ == "application_fee.refunded" {
            return parse_and_box(data).map(Self::ApplicationFeeRefunded);
        }
        #[cfg(feature = "async-stripe-core")]
        if typ == "balance.available" {
            return parse_and_box(data).map(Self::BalanceAvailable);
        }
        #[cfg(feature = "async-stripe-core")]
        if typ == "balance_settings.updated" {
            return parse_and_box(data).map(Self::BalanceSettingsUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.alert.triggered" {
            return parse_and_box(data).map(Self::BillingAlertTriggered);
        }
        if typ == "billing.credit_balance_transaction.created" {
            return parse_and_box(data).map(Self::BillingCreditBalanceTransactionCreated);
        }
        if typ == "billing.credit_grant.created" {
            return parse_and_box(data).map(Self::BillingCreditGrantCreated);
        }
        if typ == "billing.credit_grant.updated" {
            return parse_and_box(data).map(Self::BillingCreditGrantUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.meter.created" {
            return parse_and_box(data).map(Self::BillingMeterCreated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.meter.deactivated" {
            return parse_and_box(data).map(Self::BillingMeterDeactivated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.meter.reactivated" {
            return parse_and_box(data).map(Self::BillingMeterReactivated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.meter.updated" {
            return parse_and_box(data).map(Self::BillingMeterUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing_portal.configuration.created" {
            return parse_and_box(data).map(Self::BillingPortalConfigurationCreated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing_portal.configuration.updated" {
            return parse_and_box(data).map(Self::BillingPortalConfigurationUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing_portal.session.created" {
            return parse_and_box(data).map(Self::BillingPortalSessionCreated);
        }
        if typ == "capability.updated" {
            return parse_and_box(data).map(Self::CapabilityUpdated);
        }
        if typ == "cash_balance.funds_available" {
            return parse_and_box(data).map(Self::CashBalanceFundsAvailable);
        }
        if typ == "charge.captured" {
            return parse_and_box(data).map(Self::ChargeCaptured);
        }
        if typ == "charge.dispute.closed" {
            return parse_and_box(data).map(Self::ChargeDisputeClosed);
        }
        if typ == "charge.dispute.created" {
            return parse_and_box(data).map(Self::ChargeDisputeCreated);
        }
        if typ == "charge.dispute.funds_reinstated" {
            return parse_and_box(data).map(Self::ChargeDisputeFundsReinstated);
        }
        if typ == "charge.dispute.funds_withdrawn" {
            return parse_and_box(data).map(Self::ChargeDisputeFundsWithdrawn);
        }
        if typ == "charge.dispute.updated" {
            return parse_and_box(data).map(Self::ChargeDisputeUpdated);
        }
        if typ == "charge.expired" {
            return parse_and_box(data).map(Self::ChargeExpired);
        }
        if typ == "charge.failed" {
            return parse_and_box(data).map(Self::ChargeFailed);
        }
        if typ == "charge.pending" {
            return parse_and_box(data).map(Self::ChargePending);
        }
        if typ == "charge.refund.updated" {
            return parse_and_box(data).map(Self::ChargeRefundUpdated);
        }
        if typ == "charge.refunded" {
            return parse_and_box(data).map(Self::ChargeRefunded);
        }
        if typ == "charge.succeeded" {
            return parse_and_box(data).map(Self::ChargeSucceeded);
        }
        if typ == "charge.updated" {
            return parse_and_box(data).map(Self::ChargeUpdated);
        }
        if typ == "checkout.session.async_payment_failed" {
            return parse_and_box(data).map(Self::CheckoutSessionAsyncPaymentFailed);
        }
        if typ == "checkout.session.async_payment_succeeded" {
            return parse_and_box(data).map(Self::CheckoutSessionAsyncPaymentSucceeded);
        }
        if typ == "checkout.session.completed" {
            return parse_and_box(data).map(Self::CheckoutSessionCompleted);
        }
        if typ == "checkout.session.expired" {
            return parse_and_box(data).map(Self::CheckoutSessionExpired);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.canceled" {
            return parse_and_box(data).map(Self::ClimateOrderCanceled);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.created" {
            return parse_and_box(data).map(Self::ClimateOrderCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.delayed" {
            return parse_and_box(data).map(Self::ClimateOrderDelayed);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.delivered" {
            return parse_and_box(data).map(Self::ClimateOrderDelivered);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.product_substituted" {
            return parse_and_box(data).map(Self::ClimateOrderProductSubstituted);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.product.created" {
            return parse_and_box(data).map(Self::ClimateProductCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.product.pricing_updated" {
            return parse_and_box(data).map(Self::ClimateProductPricingUpdated);
        }
        if typ == "coupon.created" {
            return parse_and_box(data).map(Self::CouponCreated);
        }
        if typ == "coupon.deleted" {
            return parse_and_box(data).map(Self::CouponDeleted);
        }
        if typ == "coupon.updated" {
            return parse_and_box(data).map(Self::CouponUpdated);
        }
        if typ == "credit_note.created" {
            return parse_and_box(data).map(Self::CreditNoteCreated);
        }
        if typ == "credit_note.updated" {
            return parse_and_box(data).map(Self::CreditNoteUpdated);
        }
        if typ == "credit_note.voided" {
            return parse_and_box(data).map(Self::CreditNoteVoided);
        }
        if typ == "customer.created" {
            return parse_and_box(data).map(Self::CustomerCreated);
        }
        if typ == "customer.deleted" {
            return parse_and_box(data).map(Self::CustomerDeleted);
        }
        if typ == "customer.discount.created" {
            return parse_and_box(data).map(Self::CustomerDiscountCreated);
        }
        if typ == "customer.discount.deleted" {
            return parse_and_box(data).map(Self::CustomerDiscountDeleted);
        }
        if typ == "customer.discount.updated" {
            return parse_and_box(data).map(Self::CustomerDiscountUpdated);
        }
        if typ == "customer.source.created" {
            return parse_and_box(data).map(Self::CustomerSourceCreated);
        }
        if typ == "customer.source.deleted" {
            return parse_and_box(data).map(Self::CustomerSourceDeleted);
        }
        if typ == "customer.source.expiring" {
            return parse_and_box(data).map(Self::CustomerSourceExpiring);
        }
        if typ == "customer.source.updated" {
            return parse_and_box(data).map(Self::CustomerSourceUpdated);
        }
        if typ == "customer.subscription.created" {
            return parse_and_box(data).map(Self::CustomerSubscriptionCreated);
        }
        if typ == "customer.subscription.deleted" {
            return parse_and_box(data).map(Self::CustomerSubscriptionDeleted);
        }
        if typ == "customer.subscription.paused" {
            return parse_and_box(data).map(Self::CustomerSubscriptionPaused);
        }
        if typ == "customer.subscription.pending_update_applied" {
            return parse_and_box(data).map(Self::CustomerSubscriptionPendingUpdateApplied);
        }
        if typ == "customer.subscription.pending_update_expired" {
            return parse_and_box(data).map(Self::CustomerSubscriptionPendingUpdateExpired);
        }
        if typ == "customer.subscription.resumed" {
            return parse_and_box(data).map(Self::CustomerSubscriptionResumed);
        }
        if typ == "customer.subscription.trial_will_end" {
            return parse_and_box(data).map(Self::CustomerSubscriptionTrialWillEnd);
        }
        if typ == "customer.subscription.updated" {
            return parse_and_box(data).map(Self::CustomerSubscriptionUpdated);
        }
        if typ == "customer.tax_id.created" {
            return parse_and_box(data).map(Self::CustomerTaxIdCreated);
        }
        if typ == "customer.tax_id.deleted" {
            return parse_and_box(data).map(Self::CustomerTaxIdDeleted);
        }
        if typ == "customer.tax_id.updated" {
            return parse_and_box(data).map(Self::CustomerTaxIdUpdated);
        }
        if typ == "customer.updated" {
            return parse_and_box(data).map(Self::CustomerUpdated);
        }
        if typ == "customer_cash_balance_transaction.created" {
            return parse_and_box(data).map(Self::CustomerCashBalanceTransactionCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "entitlements.active_entitlement_summary.updated" {
            return parse_and_box(data).map(Self::EntitlementsActiveEntitlementSummaryUpdated);
        }
        if typ == "file.created" {
            return parse_and_box(data).map(Self::FileCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.account_numbers_updated" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountAccountNumbersUpdated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.created" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.deactivated" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountDeactivated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.disconnected" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountDisconnected);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.reactivated" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountReactivated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.refreshed_balance" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountRefreshedBalance);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.refreshed_ownership" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountRefreshedOwnership);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.refreshed_transactions" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountRefreshedTransactions);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.upcoming_account_number_expiry" {
            return parse_and_box(data)
                .map(Self::FinancialConnectionsAccountUpcomingAccountNumberExpiry);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.canceled" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionCanceled);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.created" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.processing" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionProcessing);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.redacted" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionRedacted);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.requires_input" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionRequiresInput);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.verified" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionVerified);
        }
        if typ == "invoice.created" {
            return parse_and_box(data).map(Self::InvoiceCreated);
        }
        if typ == "invoice.deleted" {
            return parse_and_box(data).map(Self::InvoiceDeleted);
        }
        if typ == "invoice.finalization_failed" {
            return parse_and_box(data).map(Self::InvoiceFinalizationFailed);
        }
        if typ == "invoice.finalized" {
            return parse_and_box(data).map(Self::InvoiceFinalized);
        }
        if typ == "invoice.marked_uncollectible" {
            return parse_and_box(data).map(Self::InvoiceMarkedUncollectible);
        }
        if typ == "invoice.overdue" {
            return parse_and_box(data).map(Self::InvoiceOverdue);
        }
        if typ == "invoice.overpaid" {
            return parse_and_box(data).map(Self::InvoiceOverpaid);
        }
        if typ == "invoice.paid" {
            return parse_and_box(data).map(Self::InvoicePaid);
        }
        if typ == "invoice.payment_action_required" {
            return parse_and_box(data).map(Self::InvoicePaymentActionRequired);
        }
        if typ == "invoice.payment_attempt_required" {
            return parse_and_box(data).map(Self::InvoicePaymentAttemptRequired);
        }
        if typ == "invoice.payment_failed" {
            return parse_and_box(data).map(Self::InvoicePaymentFailed);
        }
        if typ == "invoice.payment_succeeded" {
            return parse_and_box(data).map(Self::InvoicePaymentSucceeded);
        }
        if typ == "invoice.sent" {
            return parse_and_box(data).map(Self::InvoiceSent);
        }
        if typ == "invoice.upcoming" {
            return parse_and_box(data).map(Self::InvoiceUpcoming);
        }
        if typ == "invoice.updated" {
            return parse_and_box(data).map(Self::InvoiceUpdated);
        }
        if typ == "invoice.voided" {
            return parse_and_box(data).map(Self::InvoiceVoided);
        }
        if typ == "invoice.will_be_due" {
            return parse_and_box(data).map(Self::InvoiceWillBeDue);
        }
        if typ == "invoice_payment.paid" {
            return parse_and_box(data).map(Self::InvoicePaymentPaid);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "invoiceitem.created" {
            return parse_and_box(data).map(Self::InvoiceitemCreated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "invoiceitem.deleted" {
            return parse_and_box(data).map(Self::InvoiceitemDeleted);
        }
        if typ == "issuing_authorization.created" {
            return parse_and_box(data).map(Self::IssuingAuthorizationCreated);
        }
        if typ == "issuing_authorization.request" {
            return parse_and_box(data).map(Self::IssuingAuthorizationRequest);
        }
        if typ == "issuing_authorization.updated" {
            return parse_and_box(data).map(Self::IssuingAuthorizationUpdated);
        }
        if typ == "issuing_card.created" {
            return parse_and_box(data).map(Self::IssuingCardCreated);
        }
        if typ == "issuing_card.updated" {
            return parse_and_box(data).map(Self::IssuingCardUpdated);
        }
        if typ == "issuing_cardholder.created" {
            return parse_and_box(data).map(Self::IssuingCardholderCreated);
        }
        if typ == "issuing_cardholder.updated" {
            return parse_and_box(data).map(Self::IssuingCardholderUpdated);
        }
        if typ == "issuing_dispute.closed" {
            return parse_and_box(data).map(Self::IssuingDisputeClosed);
        }
        if typ == "issuing_dispute.created" {
            return parse_and_box(data).map(Self::IssuingDisputeCreated);
        }
        if typ == "issuing_dispute.funds_reinstated" {
            return parse_and_box(data).map(Self::IssuingDisputeFundsReinstated);
        }
        if typ == "issuing_dispute.funds_rescinded" {
            return parse_and_box(data).map(Self::IssuingDisputeFundsRescinded);
        }
        if typ == "issuing_dispute.submitted" {
            return parse_and_box(data).map(Self::IssuingDisputeSubmitted);
        }
        if typ == "issuing_dispute.updated" {
            return parse_and_box(data).map(Self::IssuingDisputeUpdated);
        }
        if typ == "issuing_personalization_design.activated" {
            return parse_and_box(data).map(Self::IssuingPersonalizationDesignActivated);
        }
        if typ == "issuing_personalization_design.deactivated" {
            return parse_and_box(data).map(Self::IssuingPersonalizationDesignDeactivated);
        }
        if typ == "issuing_personalization_design.rejected" {
            return parse_and_box(data).map(Self::IssuingPersonalizationDesignRejected);
        }
        if typ == "issuing_personalization_design.updated" {
            return parse_and_box(data).map(Self::IssuingPersonalizationDesignUpdated);
        }
        if typ == "issuing_token.created" {
            return parse_and_box(data).map(Self::IssuingTokenCreated);
        }
        if typ == "issuing_token.updated" {
            return parse_and_box(data).map(Self::IssuingTokenUpdated);
        }
        if typ == "issuing_transaction.created" {
            return parse_and_box(data).map(Self::IssuingTransactionCreated);
        }
        if typ == "issuing_transaction.purchase_details_receipt_updated" {
            return parse_and_box(data).map(Self::IssuingTransactionPurchaseDetailsReceiptUpdated);
        }
        if typ == "issuing_transaction.updated" {
            return parse_and_box(data).map(Self::IssuingTransactionUpdated);
        }
        if typ == "mandate.updated" {
            return parse_and_box(data).map(Self::MandateUpdated);
        }
        if typ == "payment_intent.amount_capturable_updated" {
            return parse_and_box(data).map(Self::PaymentIntentAmountCapturableUpdated);
        }
        if typ == "payment_intent.canceled" {
            return parse_and_box(data).map(Self::PaymentIntentCanceled);
        }
        if typ == "payment_intent.created" {
            return parse_and_box(data).map(Self::PaymentIntentCreated);
        }
        if typ == "payment_intent.partially_funded" {
            return parse_and_box(data).map(Self::PaymentIntentPartiallyFunded);
        }
        if typ == "payment_intent.payment_failed" {
            return parse_and_box(data).map(Self::PaymentIntentPaymentFailed);
        }
        if typ == "payment_intent.processing" {
            return parse_and_box(data).map(Self::PaymentIntentProcessing);
        }
        if typ == "payment_intent.requires_action" {
            return parse_and_box(data).map(Self::PaymentIntentRequiresAction);
        }
        if typ == "payment_intent.succeeded" {
            return parse_and_box(data).map(Self::PaymentIntentSucceeded);
        }
        if typ == "payment_link.created" {
            return parse_and_box(data).map(Self::PaymentLinkCreated);
        }
        if typ == "payment_link.updated" {
            return parse_and_box(data).map(Self::PaymentLinkUpdated);
        }
        if typ == "payment_method.attached" {
            return parse_and_box(data).map(Self::PaymentMethodAttached);
        }
        if typ == "payment_method.automatically_updated" {
            return parse_and_box(data).map(Self::PaymentMethodAutomaticallyUpdated);
        }
        if typ == "payment_method.detached" {
            return parse_and_box(data).map(Self::PaymentMethodDetached);
        }
        if typ == "payment_method.updated" {
            return parse_and_box(data).map(Self::PaymentMethodUpdated);
        }
        if typ == "payout.canceled" {
            return parse_and_box(data).map(Self::PayoutCanceled);
        }
        if typ == "payout.created" {
            return parse_and_box(data).map(Self::PayoutCreated);
        }
        if typ == "payout.failed" {
            return parse_and_box(data).map(Self::PayoutFailed);
        }
        if typ == "payout.paid" {
            return parse_and_box(data).map(Self::PayoutPaid);
        }
        if typ == "payout.reconciliation_completed" {
            return parse_and_box(data).map(Self::PayoutReconciliationCompleted);
        }
        if typ == "payout.updated" {
            return parse_and_box(data).map(Self::PayoutUpdated);
        }
        if typ == "person.created" {
            return parse_and_box(data).map(Self::PersonCreated);
        }
        if typ == "person.deleted" {
            return parse_and_box(data).map(Self::PersonDeleted);
        }
        if typ == "person.updated" {
            return parse_and_box(data).map(Self::PersonUpdated);
        }
        if typ == "plan.created" {
            return parse_and_box(data).map(Self::PlanCreated);
        }
        if typ == "plan.deleted" {
            return parse_and_box(data).map(Self::PlanDeleted);
        }
        if typ == "plan.updated" {
            return parse_and_box(data).map(Self::PlanUpdated);
        }
        if typ == "price.created" {
            return parse_and_box(data).map(Self::PriceCreated);
        }
        if typ == "price.deleted" {
            return parse_and_box(data).map(Self::PriceDeleted);
        }
        if typ == "price.updated" {
            return parse_and_box(data).map(Self::PriceUpdated);
        }
        if typ == "product.created" {
            return parse_and_box(data).map(Self::ProductCreated);
        }
        if typ == "product.deleted" {
            return parse_and_box(data).map(Self::ProductDeleted);
        }
        if typ == "product.updated" {
            return parse_and_box(data).map(Self::ProductUpdated);
        }
        if typ == "promotion_code.created" {
            return parse_and_box(data).map(Self::PromotionCodeCreated);
        }
        if typ == "promotion_code.updated" {
            return parse_and_box(data).map(Self::PromotionCodeUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "quote.accepted" {
            return parse_and_box(data).map(Self::QuoteAccepted);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "quote.canceled" {
            return parse_and_box(data).map(Self::QuoteCanceled);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "quote.created" {
            return parse_and_box(data).map(Self::QuoteCreated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "quote.finalized" {
            return parse_and_box(data).map(Self::QuoteFinalized);
        }
        #[cfg(feature = "async-stripe-fraud")]
        if typ == "radar.early_fraud_warning.created" {
            return parse_and_box(data).map(Self::RadarEarlyFraudWarningCreated);
        }
        #[cfg(feature = "async-stripe-fraud")]
        if typ == "radar.early_fraud_warning.updated" {
            return parse_and_box(data).map(Self::RadarEarlyFraudWarningUpdated);
        }
        if typ == "refund.created" {
            return parse_and_box(data).map(Self::RefundCreated);
        }
        if typ == "refund.failed" {
            return parse_and_box(data).map(Self::RefundFailed);
        }
        if typ == "refund.updated" {
            return parse_and_box(data).map(Self::RefundUpdated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "reporting.report_run.failed" {
            return parse_and_box(data).map(Self::ReportingReportRunFailed);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "reporting.report_run.succeeded" {
            return parse_and_box(data).map(Self::ReportingReportRunSucceeded);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "reporting.report_type.updated" {
            return parse_and_box(data).map(Self::ReportingReportTypeUpdated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.hold.created" {
            return parse_and_box(data).map(Self::ReserveHoldCreated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.hold.updated" {
            return parse_and_box(data).map(Self::ReserveHoldUpdated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.plan.created" {
            return parse_and_box(data).map(Self::ReservePlanCreated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.plan.disabled" {
            return parse_and_box(data).map(Self::ReservePlanDisabled);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.plan.expired" {
            return parse_and_box(data).map(Self::ReservePlanExpired);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.plan.updated" {
            return parse_and_box(data).map(Self::ReservePlanUpdated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.release.created" {
            return parse_and_box(data).map(Self::ReserveReleaseCreated);
        }
        if typ == "review.closed" {
            return parse_and_box(data).map(Self::ReviewClosed);
        }
        if typ == "review.opened" {
            return parse_and_box(data).map(Self::ReviewOpened);
        }
        if typ == "setup_intent.canceled" {
            return parse_and_box(data).map(Self::SetupIntentCanceled);
        }
        if typ == "setup_intent.created" {
            return parse_and_box(data).map(Self::SetupIntentCreated);
        }
        if typ == "setup_intent.requires_action" {
            return parse_and_box(data).map(Self::SetupIntentRequiresAction);
        }
        if typ == "setup_intent.setup_failed" {
            return parse_and_box(data).map(Self::SetupIntentSetupFailed);
        }
        if typ == "setup_intent.succeeded" {
            return parse_and_box(data).map(Self::SetupIntentSucceeded);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "sigma.scheduled_query_run.created" {
            return parse_and_box(data).map(Self::SigmaScheduledQueryRunCreated);
        }
        if typ == "source.canceled" {
            return parse_and_box(data).map(Self::SourceCanceled);
        }
        if typ == "source.chargeable" {
            return parse_and_box(data).map(Self::SourceChargeable);
        }
        if typ == "source.failed" {
            return parse_and_box(data).map(Self::SourceFailed);
        }
        #[cfg(feature = "async-stripe-payment")]
        if typ == "source.mandate_notification" {
            return parse_and_box(data).map(Self::SourceMandateNotification);
        }
        if typ == "source.refund_attributes_required" {
            return parse_and_box(data).map(Self::SourceRefundAttributesRequired);
        }
        if typ == "source.transaction.created" {
            return parse_and_box(data).map(Self::SourceTransactionCreated);
        }
        if typ == "source.transaction.updated" {
            return parse_and_box(data).map(Self::SourceTransactionUpdated);
        }
        if typ == "subscription_schedule.aborted" {
            return parse_and_box(data).map(Self::SubscriptionScheduleAborted);
        }
        if typ == "subscription_schedule.canceled" {
            return parse_and_box(data).map(Self::SubscriptionScheduleCanceled);
        }
        if typ == "subscription_schedule.completed" {
            return parse_and_box(data).map(Self::SubscriptionScheduleCompleted);
        }
        if typ == "subscription_schedule.created" {
            return parse_and_box(data).map(Self::SubscriptionScheduleCreated);
        }
        if typ == "subscription_schedule.expiring" {
            return parse_and_box(data).map(Self::SubscriptionScheduleExpiring);
        }
        if typ == "subscription_schedule.released" {
            return parse_and_box(data).map(Self::SubscriptionScheduleReleased);
        }
        if typ == "subscription_schedule.updated" {
            return parse_and_box(data).map(Self::SubscriptionScheduleUpdated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "tax.settings.updated" {
            return parse_and_box(data).map(Self::TaxSettingsUpdated);
        }
        if typ == "tax_rate.created" {
            return parse_and_box(data).map(Self::TaxRateCreated);
        }
        if typ == "tax_rate.updated" {
            return parse_and_box(data).map(Self::TaxRateUpdated);
        }
        #[cfg(feature = "async-stripe-terminal")]
        if typ == "terminal.reader.action_failed" {
            return parse_and_box(data).map(Self::TerminalReaderActionFailed);
        }
        #[cfg(feature = "async-stripe-terminal")]
        if typ == "terminal.reader.action_succeeded" {
            return parse_and_box(data).map(Self::TerminalReaderActionSucceeded);
        }
        #[cfg(feature = "async-stripe-terminal")]
        if typ == "terminal.reader.action_updated" {
            return parse_and_box(data).map(Self::TerminalReaderActionUpdated);
        }
        if typ == "test_helpers.test_clock.advancing" {
            return parse_and_box(data).map(Self::TestHelpersTestClockAdvancing);
        }
        if typ == "test_helpers.test_clock.created" {
            return parse_and_box(data).map(Self::TestHelpersTestClockCreated);
        }
        if typ == "test_helpers.test_clock.deleted" {
            return parse_and_box(data).map(Self::TestHelpersTestClockDeleted);
        }
        if typ == "test_helpers.test_clock.internal_failure" {
            return parse_and_box(data).map(Self::TestHelpersTestClockInternalFailure);
        }
        if typ == "test_helpers.test_clock.ready" {
            return parse_and_box(data).map(Self::TestHelpersTestClockReady);
        }
        if typ == "topup.canceled" {
            return parse_and_box(data).map(Self::TopupCanceled);
        }
        if typ == "topup.created" {
            return parse_and_box(data).map(Self::TopupCreated);
        }
        if typ == "topup.failed" {
            return parse_and_box(data).map(Self::TopupFailed);
        }
        if typ == "topup.reversed" {
            return parse_and_box(data).map(Self::TopupReversed);
        }
        if typ == "topup.succeeded" {
            return parse_and_box(data).map(Self::TopupSucceeded);
        }
        if typ == "transfer.created" {
            return parse_and_box(data).map(Self::TransferCreated);
        }
        if typ == "transfer.reversed" {
            return parse_and_box(data).map(Self::TransferReversed);
        }
        if typ == "transfer.updated" {
            return parse_and_box(data).map(Self::TransferUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.credit_reversal.created" {
            return parse_and_box(data).map(Self::TreasuryCreditReversalCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.credit_reversal.posted" {
            return parse_and_box(data).map(Self::TreasuryCreditReversalPosted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.debit_reversal.completed" {
            return parse_and_box(data).map(Self::TreasuryDebitReversalCompleted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.debit_reversal.created" {
            return parse_and_box(data).map(Self::TreasuryDebitReversalCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.debit_reversal.initial_credit_granted" {
            return parse_and_box(data).map(Self::TreasuryDebitReversalInitialCreditGranted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.financial_account.closed" {
            return parse_and_box(data).map(Self::TreasuryFinancialAccountClosed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.financial_account.created" {
            return parse_and_box(data).map(Self::TreasuryFinancialAccountCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.financial_account.features_status_updated" {
            return parse_and_box(data).map(Self::TreasuryFinancialAccountFeaturesStatusUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.inbound_transfer.canceled" {
            return parse_and_box(data).map(Self::TreasuryInboundTransferCanceled);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.inbound_transfer.created" {
            return parse_and_box(data).map(Self::TreasuryInboundTransferCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.inbound_transfer.failed" {
            return parse_and_box(data).map(Self::TreasuryInboundTransferFailed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.inbound_transfer.succeeded" {
            return parse_and_box(data).map(Self::TreasuryInboundTransferSucceeded);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.canceled" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentCanceled);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.created" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.expected_arrival_date_updated" {
            return parse_and_box(data)
                .map(Self::TreasuryOutboundPaymentExpectedArrivalDateUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.failed" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentFailed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.posted" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentPosted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.returned" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentReturned);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.tracking_details_updated" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentTrackingDetailsUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.canceled" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferCanceled);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.created" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.expected_arrival_date_updated" {
            return parse_and_box(data)
                .map(Self::TreasuryOutboundTransferExpectedArrivalDateUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.failed" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferFailed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.posted" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferPosted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.returned" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferReturned);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.tracking_details_updated" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferTrackingDetailsUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.received_credit.created" {
            return parse_and_box(data).map(Self::TreasuryReceivedCreditCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.received_credit.failed" {
            return parse_and_box(data).map(Self::TreasuryReceivedCreditFailed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.received_credit.succeeded" {
            return parse_and_box(data).map(Self::TreasuryReceivedCreditSucceeded);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.received_debit.created" {
            return parse_and_box(data).map(Self::TreasuryReceivedDebitCreated);
        }

        Some(Self::Unknown(data))
    }

    #[cfg(feature = "deserialize")]
    #[inline(never)]
    pub(crate) fn from_json_value(typ: &str, data: serde_json::Value) -> Result<Self, String> {
        // Helper to avoid stack allocation for each branch
        #[inline(always)]
        fn parse_and_box<T: serde::de::DeserializeOwned>(
            data: serde_json::Value,
        ) -> Result<Box<T>, String> {
            use serde::de::IntoDeserializer;
            let deserializer = data.into_deserializer();
            #[cfg(feature = "detailed-errors")]
            {
                serde_path_to_error::deserialize(deserializer)
                    .map(Box::new)
                    .map_err(|e| e.to_string())
            }
            #[cfg(not(feature = "detailed-errors"))]
            {
                T::deserialize(deserializer).map(Box::new).map_err(|e| e.to_string())
            }
        }

        if typ == "account.application.authorized" {
            return parse_and_box(data).map(Self::AccountApplicationAuthorized);
        }
        if typ == "account.application.deauthorized" {
            return parse_and_box(data).map(Self::AccountApplicationDeauthorized);
        }
        if typ == "account.external_account.created" {
            return parse_and_box(data).map(Self::AccountExternalAccountCreated);
        }
        if typ == "account.external_account.deleted" {
            return parse_and_box(data).map(Self::AccountExternalAccountDeleted);
        }
        if typ == "account.external_account.updated" {
            return parse_and_box(data).map(Self::AccountExternalAccountUpdated);
        }
        if typ == "account.updated" {
            return parse_and_box(data).map(Self::AccountUpdated);
        }
        if typ == "application_fee.created" {
            return parse_and_box(data).map(Self::ApplicationFeeCreated);
        }
        if typ == "application_fee.refund.updated" {
            return parse_and_box(data).map(Self::ApplicationFeeRefundUpdated);
        }
        if typ == "application_fee.refunded" {
            return parse_and_box(data).map(Self::ApplicationFeeRefunded);
        }
        #[cfg(feature = "async-stripe-core")]
        if typ == "balance.available" {
            return parse_and_box(data).map(Self::BalanceAvailable);
        }
        #[cfg(feature = "async-stripe-core")]
        if typ == "balance_settings.updated" {
            return parse_and_box(data).map(Self::BalanceSettingsUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.alert.triggered" {
            return parse_and_box(data).map(Self::BillingAlertTriggered);
        }
        if typ == "billing.credit_balance_transaction.created" {
            return parse_and_box(data).map(Self::BillingCreditBalanceTransactionCreated);
        }
        if typ == "billing.credit_grant.created" {
            return parse_and_box(data).map(Self::BillingCreditGrantCreated);
        }
        if typ == "billing.credit_grant.updated" {
            return parse_and_box(data).map(Self::BillingCreditGrantUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.meter.created" {
            return parse_and_box(data).map(Self::BillingMeterCreated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.meter.deactivated" {
            return parse_and_box(data).map(Self::BillingMeterDeactivated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.meter.reactivated" {
            return parse_and_box(data).map(Self::BillingMeterReactivated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing.meter.updated" {
            return parse_and_box(data).map(Self::BillingMeterUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing_portal.configuration.created" {
            return parse_and_box(data).map(Self::BillingPortalConfigurationCreated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing_portal.configuration.updated" {
            return parse_and_box(data).map(Self::BillingPortalConfigurationUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "billing_portal.session.created" {
            return parse_and_box(data).map(Self::BillingPortalSessionCreated);
        }
        if typ == "capability.updated" {
            return parse_and_box(data).map(Self::CapabilityUpdated);
        }
        if typ == "cash_balance.funds_available" {
            return parse_and_box(data).map(Self::CashBalanceFundsAvailable);
        }
        if typ == "charge.captured" {
            return parse_and_box(data).map(Self::ChargeCaptured);
        }
        if typ == "charge.dispute.closed" {
            return parse_and_box(data).map(Self::ChargeDisputeClosed);
        }
        if typ == "charge.dispute.created" {
            return parse_and_box(data).map(Self::ChargeDisputeCreated);
        }
        if typ == "charge.dispute.funds_reinstated" {
            return parse_and_box(data).map(Self::ChargeDisputeFundsReinstated);
        }
        if typ == "charge.dispute.funds_withdrawn" {
            return parse_and_box(data).map(Self::ChargeDisputeFundsWithdrawn);
        }
        if typ == "charge.dispute.updated" {
            return parse_and_box(data).map(Self::ChargeDisputeUpdated);
        }
        if typ == "charge.expired" {
            return parse_and_box(data).map(Self::ChargeExpired);
        }
        if typ == "charge.failed" {
            return parse_and_box(data).map(Self::ChargeFailed);
        }
        if typ == "charge.pending" {
            return parse_and_box(data).map(Self::ChargePending);
        }
        if typ == "charge.refund.updated" {
            return parse_and_box(data).map(Self::ChargeRefundUpdated);
        }
        if typ == "charge.refunded" {
            return parse_and_box(data).map(Self::ChargeRefunded);
        }
        if typ == "charge.succeeded" {
            return parse_and_box(data).map(Self::ChargeSucceeded);
        }
        if typ == "charge.updated" {
            return parse_and_box(data).map(Self::ChargeUpdated);
        }
        if typ == "checkout.session.async_payment_failed" {
            return parse_and_box(data).map(Self::CheckoutSessionAsyncPaymentFailed);
        }
        if typ == "checkout.session.async_payment_succeeded" {
            return parse_and_box(data).map(Self::CheckoutSessionAsyncPaymentSucceeded);
        }
        if typ == "checkout.session.completed" {
            return parse_and_box(data).map(Self::CheckoutSessionCompleted);
        }
        if typ == "checkout.session.expired" {
            return parse_and_box(data).map(Self::CheckoutSessionExpired);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.canceled" {
            return parse_and_box(data).map(Self::ClimateOrderCanceled);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.created" {
            return parse_and_box(data).map(Self::ClimateOrderCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.delayed" {
            return parse_and_box(data).map(Self::ClimateOrderDelayed);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.delivered" {
            return parse_and_box(data).map(Self::ClimateOrderDelivered);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.order.product_substituted" {
            return parse_and_box(data).map(Self::ClimateOrderProductSubstituted);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.product.created" {
            return parse_and_box(data).map(Self::ClimateProductCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "climate.product.pricing_updated" {
            return parse_and_box(data).map(Self::ClimateProductPricingUpdated);
        }
        if typ == "coupon.created" {
            return parse_and_box(data).map(Self::CouponCreated);
        }
        if typ == "coupon.deleted" {
            return parse_and_box(data).map(Self::CouponDeleted);
        }
        if typ == "coupon.updated" {
            return parse_and_box(data).map(Self::CouponUpdated);
        }
        if typ == "credit_note.created" {
            return parse_and_box(data).map(Self::CreditNoteCreated);
        }
        if typ == "credit_note.updated" {
            return parse_and_box(data).map(Self::CreditNoteUpdated);
        }
        if typ == "credit_note.voided" {
            return parse_and_box(data).map(Self::CreditNoteVoided);
        }
        if typ == "customer.created" {
            return parse_and_box(data).map(Self::CustomerCreated);
        }
        if typ == "customer.deleted" {
            return parse_and_box(data).map(Self::CustomerDeleted);
        }
        if typ == "customer.discount.created" {
            return parse_and_box(data).map(Self::CustomerDiscountCreated);
        }
        if typ == "customer.discount.deleted" {
            return parse_and_box(data).map(Self::CustomerDiscountDeleted);
        }
        if typ == "customer.discount.updated" {
            return parse_and_box(data).map(Self::CustomerDiscountUpdated);
        }
        if typ == "customer.source.created" {
            return parse_and_box(data).map(Self::CustomerSourceCreated);
        }
        if typ == "customer.source.deleted" {
            return parse_and_box(data).map(Self::CustomerSourceDeleted);
        }
        if typ == "customer.source.expiring" {
            return parse_and_box(data).map(Self::CustomerSourceExpiring);
        }
        if typ == "customer.source.updated" {
            return parse_and_box(data).map(Self::CustomerSourceUpdated);
        }
        if typ == "customer.subscription.created" {
            return parse_and_box(data).map(Self::CustomerSubscriptionCreated);
        }
        if typ == "customer.subscription.deleted" {
            return parse_and_box(data).map(Self::CustomerSubscriptionDeleted);
        }
        if typ == "customer.subscription.paused" {
            return parse_and_box(data).map(Self::CustomerSubscriptionPaused);
        }
        if typ == "customer.subscription.pending_update_applied" {
            return parse_and_box(data).map(Self::CustomerSubscriptionPendingUpdateApplied);
        }
        if typ == "customer.subscription.pending_update_expired" {
            return parse_and_box(data).map(Self::CustomerSubscriptionPendingUpdateExpired);
        }
        if typ == "customer.subscription.resumed" {
            return parse_and_box(data).map(Self::CustomerSubscriptionResumed);
        }
        if typ == "customer.subscription.trial_will_end" {
            return parse_and_box(data).map(Self::CustomerSubscriptionTrialWillEnd);
        }
        if typ == "customer.subscription.updated" {
            return parse_and_box(data).map(Self::CustomerSubscriptionUpdated);
        }
        if typ == "customer.tax_id.created" {
            return parse_and_box(data).map(Self::CustomerTaxIdCreated);
        }
        if typ == "customer.tax_id.deleted" {
            return parse_and_box(data).map(Self::CustomerTaxIdDeleted);
        }
        if typ == "customer.tax_id.updated" {
            return parse_and_box(data).map(Self::CustomerTaxIdUpdated);
        }
        if typ == "customer.updated" {
            return parse_and_box(data).map(Self::CustomerUpdated);
        }
        if typ == "customer_cash_balance_transaction.created" {
            return parse_and_box(data).map(Self::CustomerCashBalanceTransactionCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "entitlements.active_entitlement_summary.updated" {
            return parse_and_box(data).map(Self::EntitlementsActiveEntitlementSummaryUpdated);
        }
        if typ == "file.created" {
            return parse_and_box(data).map(Self::FileCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.account_numbers_updated" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountAccountNumbersUpdated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.created" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.deactivated" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountDeactivated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.disconnected" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountDisconnected);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.reactivated" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountReactivated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.refreshed_balance" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountRefreshedBalance);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.refreshed_ownership" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountRefreshedOwnership);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.refreshed_transactions" {
            return parse_and_box(data).map(Self::FinancialConnectionsAccountRefreshedTransactions);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "financial_connections.account.upcoming_account_number_expiry" {
            return parse_and_box(data)
                .map(Self::FinancialConnectionsAccountUpcomingAccountNumberExpiry);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.canceled" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionCanceled);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.created" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionCreated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.processing" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionProcessing);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.redacted" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionRedacted);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.requires_input" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionRequiresInput);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "identity.verification_session.verified" {
            return parse_and_box(data).map(Self::IdentityVerificationSessionVerified);
        }
        if typ == "invoice.created" {
            return parse_and_box(data).map(Self::InvoiceCreated);
        }
        if typ == "invoice.deleted" {
            return parse_and_box(data).map(Self::InvoiceDeleted);
        }
        if typ == "invoice.finalization_failed" {
            return parse_and_box(data).map(Self::InvoiceFinalizationFailed);
        }
        if typ == "invoice.finalized" {
            return parse_and_box(data).map(Self::InvoiceFinalized);
        }
        if typ == "invoice.marked_uncollectible" {
            return parse_and_box(data).map(Self::InvoiceMarkedUncollectible);
        }
        if typ == "invoice.overdue" {
            return parse_and_box(data).map(Self::InvoiceOverdue);
        }
        if typ == "invoice.overpaid" {
            return parse_and_box(data).map(Self::InvoiceOverpaid);
        }
        if typ == "invoice.paid" {
            return parse_and_box(data).map(Self::InvoicePaid);
        }
        if typ == "invoice.payment_action_required" {
            return parse_and_box(data).map(Self::InvoicePaymentActionRequired);
        }
        if typ == "invoice.payment_attempt_required" {
            return parse_and_box(data).map(Self::InvoicePaymentAttemptRequired);
        }
        if typ == "invoice.payment_failed" {
            return parse_and_box(data).map(Self::InvoicePaymentFailed);
        }
        if typ == "invoice.payment_succeeded" {
            return parse_and_box(data).map(Self::InvoicePaymentSucceeded);
        }
        if typ == "invoice.sent" {
            return parse_and_box(data).map(Self::InvoiceSent);
        }
        if typ == "invoice.upcoming" {
            return parse_and_box(data).map(Self::InvoiceUpcoming);
        }
        if typ == "invoice.updated" {
            return parse_and_box(data).map(Self::InvoiceUpdated);
        }
        if typ == "invoice.voided" {
            return parse_and_box(data).map(Self::InvoiceVoided);
        }
        if typ == "invoice.will_be_due" {
            return parse_and_box(data).map(Self::InvoiceWillBeDue);
        }
        if typ == "invoice_payment.paid" {
            return parse_and_box(data).map(Self::InvoicePaymentPaid);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "invoiceitem.created" {
            return parse_and_box(data).map(Self::InvoiceitemCreated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "invoiceitem.deleted" {
            return parse_and_box(data).map(Self::InvoiceitemDeleted);
        }
        if typ == "issuing_authorization.created" {
            return parse_and_box(data).map(Self::IssuingAuthorizationCreated);
        }
        if typ == "issuing_authorization.request" {
            return parse_and_box(data).map(Self::IssuingAuthorizationRequest);
        }
        if typ == "issuing_authorization.updated" {
            return parse_and_box(data).map(Self::IssuingAuthorizationUpdated);
        }
        if typ == "issuing_card.created" {
            return parse_and_box(data).map(Self::IssuingCardCreated);
        }
        if typ == "issuing_card.updated" {
            return parse_and_box(data).map(Self::IssuingCardUpdated);
        }
        if typ == "issuing_cardholder.created" {
            return parse_and_box(data).map(Self::IssuingCardholderCreated);
        }
        if typ == "issuing_cardholder.updated" {
            return parse_and_box(data).map(Self::IssuingCardholderUpdated);
        }
        if typ == "issuing_dispute.closed" {
            return parse_and_box(data).map(Self::IssuingDisputeClosed);
        }
        if typ == "issuing_dispute.created" {
            return parse_and_box(data).map(Self::IssuingDisputeCreated);
        }
        if typ == "issuing_dispute.funds_reinstated" {
            return parse_and_box(data).map(Self::IssuingDisputeFundsReinstated);
        }
        if typ == "issuing_dispute.funds_rescinded" {
            return parse_and_box(data).map(Self::IssuingDisputeFundsRescinded);
        }
        if typ == "issuing_dispute.submitted" {
            return parse_and_box(data).map(Self::IssuingDisputeSubmitted);
        }
        if typ == "issuing_dispute.updated" {
            return parse_and_box(data).map(Self::IssuingDisputeUpdated);
        }
        if typ == "issuing_personalization_design.activated" {
            return parse_and_box(data).map(Self::IssuingPersonalizationDesignActivated);
        }
        if typ == "issuing_personalization_design.deactivated" {
            return parse_and_box(data).map(Self::IssuingPersonalizationDesignDeactivated);
        }
        if typ == "issuing_personalization_design.rejected" {
            return parse_and_box(data).map(Self::IssuingPersonalizationDesignRejected);
        }
        if typ == "issuing_personalization_design.updated" {
            return parse_and_box(data).map(Self::IssuingPersonalizationDesignUpdated);
        }
        if typ == "issuing_token.created" {
            return parse_and_box(data).map(Self::IssuingTokenCreated);
        }
        if typ == "issuing_token.updated" {
            return parse_and_box(data).map(Self::IssuingTokenUpdated);
        }
        if typ == "issuing_transaction.created" {
            return parse_and_box(data).map(Self::IssuingTransactionCreated);
        }
        if typ == "issuing_transaction.purchase_details_receipt_updated" {
            return parse_and_box(data).map(Self::IssuingTransactionPurchaseDetailsReceiptUpdated);
        }
        if typ == "issuing_transaction.updated" {
            return parse_and_box(data).map(Self::IssuingTransactionUpdated);
        }
        if typ == "mandate.updated" {
            return parse_and_box(data).map(Self::MandateUpdated);
        }
        if typ == "payment_intent.amount_capturable_updated" {
            return parse_and_box(data).map(Self::PaymentIntentAmountCapturableUpdated);
        }
        if typ == "payment_intent.canceled" {
            return parse_and_box(data).map(Self::PaymentIntentCanceled);
        }
        if typ == "payment_intent.created" {
            return parse_and_box(data).map(Self::PaymentIntentCreated);
        }
        if typ == "payment_intent.partially_funded" {
            return parse_and_box(data).map(Self::PaymentIntentPartiallyFunded);
        }
        if typ == "payment_intent.payment_failed" {
            return parse_and_box(data).map(Self::PaymentIntentPaymentFailed);
        }
        if typ == "payment_intent.processing" {
            return parse_and_box(data).map(Self::PaymentIntentProcessing);
        }
        if typ == "payment_intent.requires_action" {
            return parse_and_box(data).map(Self::PaymentIntentRequiresAction);
        }
        if typ == "payment_intent.succeeded" {
            return parse_and_box(data).map(Self::PaymentIntentSucceeded);
        }
        if typ == "payment_link.created" {
            return parse_and_box(data).map(Self::PaymentLinkCreated);
        }
        if typ == "payment_link.updated" {
            return parse_and_box(data).map(Self::PaymentLinkUpdated);
        }
        if typ == "payment_method.attached" {
            return parse_and_box(data).map(Self::PaymentMethodAttached);
        }
        if typ == "payment_method.automatically_updated" {
            return parse_and_box(data).map(Self::PaymentMethodAutomaticallyUpdated);
        }
        if typ == "payment_method.detached" {
            return parse_and_box(data).map(Self::PaymentMethodDetached);
        }
        if typ == "payment_method.updated" {
            return parse_and_box(data).map(Self::PaymentMethodUpdated);
        }
        if typ == "payout.canceled" {
            return parse_and_box(data).map(Self::PayoutCanceled);
        }
        if typ == "payout.created" {
            return parse_and_box(data).map(Self::PayoutCreated);
        }
        if typ == "payout.failed" {
            return parse_and_box(data).map(Self::PayoutFailed);
        }
        if typ == "payout.paid" {
            return parse_and_box(data).map(Self::PayoutPaid);
        }
        if typ == "payout.reconciliation_completed" {
            return parse_and_box(data).map(Self::PayoutReconciliationCompleted);
        }
        if typ == "payout.updated" {
            return parse_and_box(data).map(Self::PayoutUpdated);
        }
        if typ == "person.created" {
            return parse_and_box(data).map(Self::PersonCreated);
        }
        if typ == "person.deleted" {
            return parse_and_box(data).map(Self::PersonDeleted);
        }
        if typ == "person.updated" {
            return parse_and_box(data).map(Self::PersonUpdated);
        }
        if typ == "plan.created" {
            return parse_and_box(data).map(Self::PlanCreated);
        }
        if typ == "plan.deleted" {
            return parse_and_box(data).map(Self::PlanDeleted);
        }
        if typ == "plan.updated" {
            return parse_and_box(data).map(Self::PlanUpdated);
        }
        if typ == "price.created" {
            return parse_and_box(data).map(Self::PriceCreated);
        }
        if typ == "price.deleted" {
            return parse_and_box(data).map(Self::PriceDeleted);
        }
        if typ == "price.updated" {
            return parse_and_box(data).map(Self::PriceUpdated);
        }
        if typ == "product.created" {
            return parse_and_box(data).map(Self::ProductCreated);
        }
        if typ == "product.deleted" {
            return parse_and_box(data).map(Self::ProductDeleted);
        }
        if typ == "product.updated" {
            return parse_and_box(data).map(Self::ProductUpdated);
        }
        if typ == "promotion_code.created" {
            return parse_and_box(data).map(Self::PromotionCodeCreated);
        }
        if typ == "promotion_code.updated" {
            return parse_and_box(data).map(Self::PromotionCodeUpdated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "quote.accepted" {
            return parse_and_box(data).map(Self::QuoteAccepted);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "quote.canceled" {
            return parse_and_box(data).map(Self::QuoteCanceled);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "quote.created" {
            return parse_and_box(data).map(Self::QuoteCreated);
        }
        #[cfg(feature = "async-stripe-billing")]
        if typ == "quote.finalized" {
            return parse_and_box(data).map(Self::QuoteFinalized);
        }
        #[cfg(feature = "async-stripe-fraud")]
        if typ == "radar.early_fraud_warning.created" {
            return parse_and_box(data).map(Self::RadarEarlyFraudWarningCreated);
        }
        #[cfg(feature = "async-stripe-fraud")]
        if typ == "radar.early_fraud_warning.updated" {
            return parse_and_box(data).map(Self::RadarEarlyFraudWarningUpdated);
        }
        if typ == "refund.created" {
            return parse_and_box(data).map(Self::RefundCreated);
        }
        if typ == "refund.failed" {
            return parse_and_box(data).map(Self::RefundFailed);
        }
        if typ == "refund.updated" {
            return parse_and_box(data).map(Self::RefundUpdated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "reporting.report_run.failed" {
            return parse_and_box(data).map(Self::ReportingReportRunFailed);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "reporting.report_run.succeeded" {
            return parse_and_box(data).map(Self::ReportingReportRunSucceeded);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "reporting.report_type.updated" {
            return parse_and_box(data).map(Self::ReportingReportTypeUpdated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.hold.created" {
            return parse_and_box(data).map(Self::ReserveHoldCreated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.hold.updated" {
            return parse_and_box(data).map(Self::ReserveHoldUpdated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.plan.created" {
            return parse_and_box(data).map(Self::ReservePlanCreated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.plan.disabled" {
            return parse_and_box(data).map(Self::ReservePlanDisabled);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.plan.expired" {
            return parse_and_box(data).map(Self::ReservePlanExpired);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.plan.updated" {
            return parse_and_box(data).map(Self::ReservePlanUpdated);
        }
        #[cfg(feature = "async-stripe-reserve")]
        if typ == "reserve.release.created" {
            return parse_and_box(data).map(Self::ReserveReleaseCreated);
        }
        if typ == "review.closed" {
            return parse_and_box(data).map(Self::ReviewClosed);
        }
        if typ == "review.opened" {
            return parse_and_box(data).map(Self::ReviewOpened);
        }
        if typ == "setup_intent.canceled" {
            return parse_and_box(data).map(Self::SetupIntentCanceled);
        }
        if typ == "setup_intent.created" {
            return parse_and_box(data).map(Self::SetupIntentCreated);
        }
        if typ == "setup_intent.requires_action" {
            return parse_and_box(data).map(Self::SetupIntentRequiresAction);
        }
        if typ == "setup_intent.setup_failed" {
            return parse_and_box(data).map(Self::SetupIntentSetupFailed);
        }
        if typ == "setup_intent.succeeded" {
            return parse_and_box(data).map(Self::SetupIntentSucceeded);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "sigma.scheduled_query_run.created" {
            return parse_and_box(data).map(Self::SigmaScheduledQueryRunCreated);
        }
        if typ == "source.canceled" {
            return parse_and_box(data).map(Self::SourceCanceled);
        }
        if typ == "source.chargeable" {
            return parse_and_box(data).map(Self::SourceChargeable);
        }
        if typ == "source.failed" {
            return parse_and_box(data).map(Self::SourceFailed);
        }
        #[cfg(feature = "async-stripe-payment")]
        if typ == "source.mandate_notification" {
            return parse_and_box(data).map(Self::SourceMandateNotification);
        }
        if typ == "source.refund_attributes_required" {
            return parse_and_box(data).map(Self::SourceRefundAttributesRequired);
        }
        if typ == "source.transaction.created" {
            return parse_and_box(data).map(Self::SourceTransactionCreated);
        }
        if typ == "source.transaction.updated" {
            return parse_and_box(data).map(Self::SourceTransactionUpdated);
        }
        if typ == "subscription_schedule.aborted" {
            return parse_and_box(data).map(Self::SubscriptionScheduleAborted);
        }
        if typ == "subscription_schedule.canceled" {
            return parse_and_box(data).map(Self::SubscriptionScheduleCanceled);
        }
        if typ == "subscription_schedule.completed" {
            return parse_and_box(data).map(Self::SubscriptionScheduleCompleted);
        }
        if typ == "subscription_schedule.created" {
            return parse_and_box(data).map(Self::SubscriptionScheduleCreated);
        }
        if typ == "subscription_schedule.expiring" {
            return parse_and_box(data).map(Self::SubscriptionScheduleExpiring);
        }
        if typ == "subscription_schedule.released" {
            return parse_and_box(data).map(Self::SubscriptionScheduleReleased);
        }
        if typ == "subscription_schedule.updated" {
            return parse_and_box(data).map(Self::SubscriptionScheduleUpdated);
        }
        #[cfg(feature = "async-stripe-misc")]
        if typ == "tax.settings.updated" {
            return parse_and_box(data).map(Self::TaxSettingsUpdated);
        }
        if typ == "tax_rate.created" {
            return parse_and_box(data).map(Self::TaxRateCreated);
        }
        if typ == "tax_rate.updated" {
            return parse_and_box(data).map(Self::TaxRateUpdated);
        }
        #[cfg(feature = "async-stripe-terminal")]
        if typ == "terminal.reader.action_failed" {
            return parse_and_box(data).map(Self::TerminalReaderActionFailed);
        }
        #[cfg(feature = "async-stripe-terminal")]
        if typ == "terminal.reader.action_succeeded" {
            return parse_and_box(data).map(Self::TerminalReaderActionSucceeded);
        }
        #[cfg(feature = "async-stripe-terminal")]
        if typ == "terminal.reader.action_updated" {
            return parse_and_box(data).map(Self::TerminalReaderActionUpdated);
        }
        if typ == "test_helpers.test_clock.advancing" {
            return parse_and_box(data).map(Self::TestHelpersTestClockAdvancing);
        }
        if typ == "test_helpers.test_clock.created" {
            return parse_and_box(data).map(Self::TestHelpersTestClockCreated);
        }
        if typ == "test_helpers.test_clock.deleted" {
            return parse_and_box(data).map(Self::TestHelpersTestClockDeleted);
        }
        if typ == "test_helpers.test_clock.internal_failure" {
            return parse_and_box(data).map(Self::TestHelpersTestClockInternalFailure);
        }
        if typ == "test_helpers.test_clock.ready" {
            return parse_and_box(data).map(Self::TestHelpersTestClockReady);
        }
        if typ == "topup.canceled" {
            return parse_and_box(data).map(Self::TopupCanceled);
        }
        if typ == "topup.created" {
            return parse_and_box(data).map(Self::TopupCreated);
        }
        if typ == "topup.failed" {
            return parse_and_box(data).map(Self::TopupFailed);
        }
        if typ == "topup.reversed" {
            return parse_and_box(data).map(Self::TopupReversed);
        }
        if typ == "topup.succeeded" {
            return parse_and_box(data).map(Self::TopupSucceeded);
        }
        if typ == "transfer.created" {
            return parse_and_box(data).map(Self::TransferCreated);
        }
        if typ == "transfer.reversed" {
            return parse_and_box(data).map(Self::TransferReversed);
        }
        if typ == "transfer.updated" {
            return parse_and_box(data).map(Self::TransferUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.credit_reversal.created" {
            return parse_and_box(data).map(Self::TreasuryCreditReversalCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.credit_reversal.posted" {
            return parse_and_box(data).map(Self::TreasuryCreditReversalPosted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.debit_reversal.completed" {
            return parse_and_box(data).map(Self::TreasuryDebitReversalCompleted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.debit_reversal.created" {
            return parse_and_box(data).map(Self::TreasuryDebitReversalCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.debit_reversal.initial_credit_granted" {
            return parse_and_box(data).map(Self::TreasuryDebitReversalInitialCreditGranted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.financial_account.closed" {
            return parse_and_box(data).map(Self::TreasuryFinancialAccountClosed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.financial_account.created" {
            return parse_and_box(data).map(Self::TreasuryFinancialAccountCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.financial_account.features_status_updated" {
            return parse_and_box(data).map(Self::TreasuryFinancialAccountFeaturesStatusUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.inbound_transfer.canceled" {
            return parse_and_box(data).map(Self::TreasuryInboundTransferCanceled);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.inbound_transfer.created" {
            return parse_and_box(data).map(Self::TreasuryInboundTransferCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.inbound_transfer.failed" {
            return parse_and_box(data).map(Self::TreasuryInboundTransferFailed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.inbound_transfer.succeeded" {
            return parse_and_box(data).map(Self::TreasuryInboundTransferSucceeded);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.canceled" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentCanceled);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.created" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.expected_arrival_date_updated" {
            return parse_and_box(data)
                .map(Self::TreasuryOutboundPaymentExpectedArrivalDateUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.failed" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentFailed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.posted" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentPosted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.returned" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentReturned);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_payment.tracking_details_updated" {
            return parse_and_box(data).map(Self::TreasuryOutboundPaymentTrackingDetailsUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.canceled" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferCanceled);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.created" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.expected_arrival_date_updated" {
            return parse_and_box(data)
                .map(Self::TreasuryOutboundTransferExpectedArrivalDateUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.failed" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferFailed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.posted" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferPosted);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.returned" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferReturned);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.outbound_transfer.tracking_details_updated" {
            return parse_and_box(data).map(Self::TreasuryOutboundTransferTrackingDetailsUpdated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.received_credit.created" {
            return parse_and_box(data).map(Self::TreasuryReceivedCreditCreated);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.received_credit.failed" {
            return parse_and_box(data).map(Self::TreasuryReceivedCreditFailed);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.received_credit.succeeded" {
            return parse_and_box(data).map(Self::TreasuryReceivedCreditSucceeded);
        }
        #[cfg(feature = "async-stripe-treasury")]
        if typ == "treasury.received_debit.created" {
            return parse_and_box(data).map(Self::TreasuryReceivedDebitCreated);
        }

        // Unknown event type - error instead of silently accepting
        Err(format!("unknown event type '{typ}'"))
    }
}