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
//! The [`PlaidClient`] is the main entry point for this library.
//!
//! Library created with [`libninja`](https://www.libninja.com).
#![allow(non_camel_case_types)]

use serde_json::json;
pub mod model;
pub mod request_model;
use crate::model::*;

impl PlaidClient {
    pub fn from_env() -> PlaidClient {
        let url = format!(
            "https://{}.plaid.com",
            std::env::var("PLAID_ENV")
                .expect("Environment variable PLAID_ENV is not set."),
        );
        PlaidClient::new(&url)
            .with_authentication(PlaidAuthentication::from_env())
    }
}
pub struct PlaidClient {
    pub(crate) client: httpclient::Client,
    authentication: Option<PlaidAuthentication>,
}
impl PlaidClient {}
impl PlaidClient {
    pub fn new(url: &str) -> Self {
        let client = httpclient::Client::new(Some(url.to_string()));
        let authentication = None;
        Self { client, authentication }
    }
    pub fn with_authentication(mut self, authentication: PlaidAuthentication) -> Self {
        self.authentication = Some(authentication);
        self
    }
    pub fn authenticate<'a>(
        &self,
        mut r: httpclient::RequestBuilder<'a>,
    ) -> httpclient::RequestBuilder<'a> {
        if let Some(ref authentication) = self.authentication {
            match authentication {
                PlaidAuthentication::ClientId { client_id, secret, .. } => {
                    r = r
                        .push_json(
                            json!({ "client_id" : client_id, "secret" : secret, }),
                        );
                }
            }
        }
        r
    }
    pub fn with_middleware<M: httpclient::Middleware + 'static>(
        mut self,
        middleware: M,
    ) -> Self {
        self.client = self.client.with_middleware(middleware);
        self
    }
    ///List a user’s connected applications
    pub fn item_application_list(
        &self,
        access_token: Option<String>,
    ) -> request_model::ItemApplicationListRequest {
        request_model::ItemApplicationListRequest {
            client: &self,
            access_token,
        }
    }
    /**Update the scopes of access for a particular application

Enable consumers to update product access on selected accounts for an application.*/
    pub fn item_application_scopes_update(
        &self,
        access_token: String,
        application_id: String,
        scopes: serde_json::Value,
        state: String,
        context: String,
    ) -> request_model::ItemApplicationScopesUpdateRequest {
        request_model::ItemApplicationScopesUpdateRequest {
            client: &self,
            access_token,
            application_id,
            scopes,
            state,
            context,
        }
    }
    /**Retrieve information about a Plaid application

Allows financial institutions to retrieve information about Plaid clients for the purpose of building control-tower experiences*/
    pub fn application_get(
        &self,
        application_id: String,
    ) -> request_model::ApplicationGetRequest {
        request_model::ApplicationGetRequest {
            client: &self,
            application_id,
        }
    }
    /**Retrieve an Item

Returns information about the status of an Item.

See endpoint docs at <https://plaid.com/docs/api/items/#itemget>.*/
    pub fn item_get(&self, access_token: String) -> request_model::ItemGetRequest {
        request_model::ItemGetRequest {
            client: &self,
            access_token,
        }
    }
    /**Retrieve auth data

The `/auth/get` endpoint returns the bank account and bank identification numbers (such as routing numbers, for US accounts) associated with an Item's checking and savings accounts, along with high-level account data and balances when available.

Note: This request may take some time to complete if `auth` was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the data.

Also note that `/auth/get` will not return data for any new accounts opened after the Item was created. To obtain data for new accounts, create a new Item.

Versioning note: In API version 2017-03-08, the schema of the `numbers` object returned by this endpoint is substantially different. For details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2018-05-22).

See endpoint docs at <https://plaid.com/docs/api/products/auth/#authget>.*/
    pub fn auth_get(
        &self,
        access_token: String,
        options: serde_json::Value,
    ) -> request_model::AuthGetRequest {
        request_model::AuthGetRequest {
            client: &self,
            access_token,
            options,
        }
    }
    /**Get transaction data

The `/transactions/get` endpoint allows developers to receive user-authorized transaction data for credit, depository, and some loan-type accounts (only those with account subtype `student`; coverage may be limited). For transaction history from investments accounts, use the [Investments endpoint](https://plaid.com/docs/api/products/investments/) instead. Transaction data is standardized across financial institutions, and in many cases transactions are linked to a clean name, entity type, location, and category. Similarly, account data is standardized and returned with a clean name, number, balance, and other meta information where available.

Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift.  Transactions are not immutable and can also be removed altogether by the institution; a removed transaction will no longer appear in `/transactions/get`.  For more details, see [Pending and posted transactions](https://plaid.com/docs/transactions/transactions-data/#pending-and-posted-transactions).

Due to the potentially large number of transactions associated with an Item, results are paginated. Manipulate the `count` and `offset` parameters in conjunction with the `total_transactions` response body field to fetch all available transactions.

Data returned by `/transactions/get` will be the data available for the Item as of the most recent successful check for new transactions. Plaid typically checks for new data multiple times a day, but these checks may occur less frequently, such as once a day, depending on the institution. An Item's `status.transactions.last_successful_update` field will show the timestamp of the most recent successful update. To force Plaid to check for new transactions, you can use the `/transactions/refresh` endpoint.

Note that data may not be immediately available to `/transactions/get`. Plaid will begin to prepare transactions data upon Item link, if Link was initialized with `transactions`, or upon the first call to `/transactions/get`, if it wasn't. To be alerted when transaction data is ready to be fetched, listen for the [`INITIAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#initial_update) and [`HISTORICAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#historical_update) webhooks. If no transaction history is ready when `/transactions/get` is called, it will return a `PRODUCT_NOT_READY` error.

See endpoint docs at <https://plaid.com/docs/api/products/transactions/#transactionsget>.*/
    pub fn transactions_get(
        &self,
        options: serde_json::Value,
        access_token: String,
        start_date: String,
        end_date: String,
    ) -> request_model::TransactionsGetRequest {
        request_model::TransactionsGetRequest {
            client: &self,
            options,
            access_token,
            start_date,
            end_date,
        }
    }
    /**Refresh transaction data

`/transactions/refresh` is an optional endpoint for users of the Transactions product. It initiates an on-demand extraction to fetch the newest transactions for an Item. This on-demand extraction takes place in addition to the periodic extractions that automatically occur multiple times a day for any Transactions-enabled Item. If changes to transactions are discovered after calling `/transactions/refresh`, Plaid will fire a webhook: [`TRANSACTIONS_REMOVED`](https://plaid.com/docs/api/products/transactions/#transactions_removed) will be fired if any removed transactions are detected, and [`DEFAULT_UPDATE`](https://plaid.com/docs/api/products/transactions/#default_update) will be fired if any new transactions are detected. New transactions can be fetched by calling `/transactions/get`.

Access to `/transactions/refresh` in Production is specific to certain pricing plans. If you cannot access `/transactions/refresh` in Production, [contact Sales](https://www.plaid.com/contact) for assistance.

See endpoint docs at <https://plaid.com/docs/api/products/transactions/#transactionsrefresh>.*/
    pub fn transactions_refresh(
        &self,
        access_token: String,
    ) -> request_model::TransactionsRefreshRequest {
        request_model::TransactionsRefreshRequest {
            client: &self,
            access_token,
        }
    }
    /**Fetch recurring transaction streams

The `/transactions/recurring/get` endpoint allows developers to receive a summary of the recurring outflow and inflow streams (expenses and deposits) from a user’s checking, savings or credit card accounts. Additionally, Plaid provides key insights about each recurring stream including the category, merchant, last amount, and more. Developers can use these insights to build tools and experiences that help their users better manage cash flow, monitor subscriptions, reduce spend, and stay on track with bill payments.

This endpoint is not included by default as part of Transactions. To request access to this endpoint and learn more about pricing, contact your Plaid account manager.

Note that unlike `/transactions/get`, `/transactions/recurring/get` will not initialize an Item with Transactions. The Item must already have been initialized with Transactions (either during Link, by specifying it in `/link/token/create`, or after Link, by calling `/transactions/get`) before calling this endpoint. Data is available to `/transactions/recurring/get` approximately 5 seconds after the [`HISTORICAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#historical_update) webhook has fired (about 1-2 minutes after initialization).

After the initial call, you can call `/transactions/recurring/get` endpoint at any point in the future to retrieve the latest summary of recurring streams. Since recurring streams do not change often, it will typically not be necessary to call this endpoint more than once per day.

See endpoint docs at <https://plaid.com/docs/api/products/transactions/#transactionsrecurringget>.*/
    pub fn transactions_recurring_get(
        &self,
        access_token: String,
        options: serde_json::Value,
        account_ids: Vec<String>,
    ) -> request_model::TransactionsRecurringGetRequest {
        request_model::TransactionsRecurringGetRequest {
            client: &self,
            access_token,
            options,
            account_ids,
        }
    }
    /**Get incremental transaction updates on an Item

This endpoint replaces `/transactions/get` and its associated webhooks for most common use-cases.

The `/transactions/sync` endpoint allows developers to subscribe to all transactions associated with an Item and get updates synchronously in a stream-like manner, using a cursor to track which updates have already been seen. `/transactions/sync` provides the same functionality as `/transactions/get` and can be used instead of `/transactions/get` to simplify the process of tracking transactions updates.

This endpoint provides user-authorized transaction data for `credit`, `depository`, and some loan-type accounts (only those with account subtype `student`; coverage may be limited). For transaction history from `investments` accounts, use `/investments/transactions/get` instead.

Returned transactions data is grouped into three types of update, indicating whether the transaction was added, removed, or modified since the last call to the API.

In the first call to `/transactions/sync` for an Item, the endpoint will return all historical transactions data associated with that Item up until the time of the API call (as "adds"), which then generates a `next_cursor` for that Item. In subsequent calls, send the `next_cursor` to receive only the changes that have occurred since the previous call.

Due to the potentially large number of transactions associated with an Item, results are paginated. The `has_more` field specifies if additional calls are necessary to fetch all available transaction updates.

Whenever new or updated transaction data becomes available, `/transactions/sync` will provide these updates. Plaid typically checks for new data multiple times a day, but these checks may occur less frequently, such as once a day, depending on the institution. An Item's `status.transactions.last_successful_update` field will show the timestamp of the most recent successful update. To force Plaid to check for new transactions, use the `/transactions/refresh` endpoint.

Note that for newly created Items, data may not be immediately available to `/transactions/sync`. Plaid begins preparing transactions data when the Item is created, but the process can take anywhere from a few seconds to several minutes to complete, depending on the number of transactions available.

To be alerted when new data is available, listen for the [`SYNC_UPDATES_AVAILABLE`](https://plaid.com/docs/api/products/transactions/#sync_updates_available) webhook.

See endpoint docs at <https://plaid.com/docs/api/products/transactions/#transactionssync>.*/
    pub fn transactions_sync(
        &self,
        access_token: String,
        cursor: String,
        count: i64,
        options: serde_json::Value,
    ) -> request_model::TransactionsSyncRequest {
        request_model::TransactionsSyncRequest {
            client: &self,
            access_token,
            cursor,
            count,
            options,
        }
    }
    /**Get details of all supported institutions

Returns a JSON response containing details on all financial institutions currently supported by Plaid. Because Plaid supports thousands of institutions, results are paginated.

If there is no overlap between an institution’s enabled products and a client’s enabled products, then the institution will be filtered out from the response. As a result, the number of institutions returned may not match the count specified in the call.

See endpoint docs at <https://plaid.com/docs/api/institutions/#institutionsget>.*/
    pub fn institutions_get(
        &self,
        count: i64,
        offset: i64,
        country_codes: Vec<CountryCode>,
        options: serde_json::Value,
    ) -> request_model::InstitutionsGetRequest {
        request_model::InstitutionsGetRequest {
            client: &self,
            count,
            offset,
            country_codes,
            options,
        }
    }
    /**Search institutions

Returns a JSON response containing details for institutions that match the query parameters, up to a maximum of ten institutions per query.

Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` parameters to authenticate to this endpoint. The `public_key` parameter has since been deprecated; all customers are encouraged to use `client_id` and `secret` instead.


See endpoint docs at <https://plaid.com/docs/api/institutions/#institutionssearch>.*/
    pub fn institutions_search(
        &self,
        query: String,
        products: Option<Vec<Products>>,
        country_codes: Vec<CountryCode>,
        options: serde_json::Value,
    ) -> request_model::InstitutionsSearchRequest {
        request_model::InstitutionsSearchRequest {
            client: &self,
            query,
            products,
            country_codes,
            options,
        }
    }
    /**Get details of an institution

Returns a JSON response containing details on a specified financial institution currently supported by Plaid.

Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` to authenticate to this endpoint. The `public_key` has been deprecated; all customers are encouraged to use `client_id` and `secret` instead.


See endpoint docs at <https://plaid.com/docs/api/institutions/#institutionsget_by_id>.*/
    pub fn institutions_get_by_id(
        &self,
        institution_id: String,
        country_codes: Vec<CountryCode>,
        options: serde_json::Value,
    ) -> request_model::InstitutionsGetByIdRequest {
        request_model::InstitutionsGetByIdRequest {
            client: &self,
            institution_id,
            country_codes,
            options,
        }
    }
    /**Remove an Item

The `/item/remove` endpoint allows you to remove an Item. Once removed, the `access_token`, as well as any processor tokens or bank account tokens associated with the Item, is no longer valid and cannot be used to access any data that was associated with the Item.

Note that in the Development environment, issuing an `/item/remove`  request will not decrement your live credential count. To increase your credential account in Development, contact Support.

Also note that for certain OAuth-based institutions, an Item removed via `/item/remove` may still show as an active connection in the institution's OAuth permission manager.

API versions 2019-05-29 and earlier return a `removed` boolean as part of the response.

See endpoint docs at <https://plaid.com/docs/api/items/#itemremove>.*/
    pub fn item_remove(&self, access_token: String) -> request_model::ItemRemoveRequest {
        request_model::ItemRemoveRequest {
            client: &self,
            access_token,
        }
    }
    /**Retrieve accounts

The `/accounts/get` endpoint can be used to retrieve a list of accounts associated with any linked Item. Plaid will only return active bank accounts — that is, accounts that are not closed and are capable of carrying a balance.
For items that went through the updated account selection pane, this endpoint only returns accounts that were permissioned by the user when they initially created the Item. If a user creates a new account after the initial link, you can capture this event through the [`NEW_ACCOUNTS_AVAILABLE`](https://plaid.com/docs/api/items/#new_accounts_available) webhook and then use Link's [update mode](https://plaid.com/docs/link/update-mode/) to request that the user share this new account with you.

This endpoint retrieves cached information, rather than extracting fresh information from the institution. As a result, balances returned may not be up-to-date; for realtime balance information, use `/accounts/balance/get` instead. Note that some information is nullable.

See endpoint docs at <https://plaid.com/docs/api/accounts/#accountsget>.*/
    pub fn accounts_get(
        &self,
        access_token: String,
        options: serde_json::Value,
    ) -> request_model::AccountsGetRequest {
        request_model::AccountsGetRequest {
            client: &self,
            access_token,
            options,
        }
    }
    /**Get Categories

Send a request to the `/categories/get` endpoint to get detailed information on categories returned by Plaid. This endpoint does not require authentication.

See endpoint docs at <https://plaid.com/docs/api/products/transactions/#categoriesget>.*/
    pub fn categories_get(&self) -> request_model::CategoriesGetRequest {
        request_model::CategoriesGetRequest {
            client: &self,
        }
    }
    /**Create a test Item and processor token

Use the `/sandbox/processor_token/create` endpoint to create a valid `processor_token` for an arbitrary institution ID and test credentials. The created `processor_token` corresponds to a new Sandbox Item. You can then use this `processor_token` with the `/processor/` API endpoints in Sandbox. You can also use `/sandbox/processor_token/create` with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data.

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxprocessor_tokencreate>.*/
    pub fn sandbox_processor_token_create(
        &self,
        institution_id: String,
        options: serde_json::Value,
    ) -> request_model::SandboxProcessorTokenCreateRequest {
        request_model::SandboxProcessorTokenCreateRequest {
            client: &self,
            institution_id,
            options,
        }
    }
    /**Create a test Item

Use the `/sandbox/public_token/create` endpoint to create a valid `public_token`  for an arbitrary institution ID, initial products, and test credentials. The created `public_token` maps to a new Sandbox Item. You can then call `/item/public_token/exchange` to exchange the `public_token` for an `access_token` and perform all API actions. `/sandbox/public_token/create` can also be used with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data. `/sandbox/public_token/create` cannot be used with OAuth institutions.

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxpublic_tokencreate>.*/
    pub fn sandbox_public_token_create(
        &self,
        institution_id: String,
        initial_products: Vec<Products>,
        options: serde_json::Value,
        user_token: String,
    ) -> request_model::SandboxPublicTokenCreateRequest {
        request_model::SandboxPublicTokenCreateRequest {
            client: &self,
            institution_id,
            initial_products,
            options,
            user_token,
        }
    }
    /**Fire a test webhook

The `/sandbox/item/fire_webhook` endpoint is used to test that code correctly handles webhooks. This endpoint can trigger the following webhooks:

`DEFAULT_UPDATE`: Transactions update webhook to be fired for a given Sandbox Item. If the Item does not support Transactions, a `SANDBOX_PRODUCT_NOT_ENABLED` error will result.

`NEW_ACCOUNTS_AVAILABLE`: Webhook to be fired for a given Sandbox Item created with Account Select v2.

`AUTH_DATA_UPDATE`: Webhook to be fired for a given Sandbox Item created with Auth as an enabled product.

`RECURRING_TRANSACTIONS_UPDATE`: Recurring Transactions webhook to be fired for a given Sandbox Item. If the Item does not support Recurring Transactions, a `SANDBOX_PRODUCT_NOT_ENABLED` error will result.

Note that this endpoint is provided for developer ease-of-use and is not required for testing webhooks; webhooks will also fire in Sandbox under the same conditions that they would in Production or Development.

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxitemfire_webhook>.*/
    pub fn sandbox_item_fire_webhook(
        &self,
        access_token: String,
        webhook_type: String,
        webhook_code: String,
    ) -> request_model::SandboxItemFireWebhookRequest {
        request_model::SandboxItemFireWebhookRequest {
            client: &self,
            access_token,
            webhook_type,
            webhook_code,
        }
    }
    /**Retrieve real-time balance data

The `/accounts/balance/get` endpoint returns the real-time balance for each of an Item's accounts. While other endpoints may return a balance object, only `/accounts/balance/get` forces the available and current balance fields to be refreshed rather than cached. This endpoint can be used for existing Items that were added via any of Plaid’s other products. This endpoint can be used as long as Link has been initialized with any other product, `balance` itself is not a product that can be used to initialize Link.

See endpoint docs at <https://plaid.com/docs/api/products/balance/#accountsbalanceget>.*/
    pub fn accounts_balance_get(
        &self,
        access_token: String,
        options: serde_json::Value,
    ) -> request_model::AccountsBalanceGetRequest {
        request_model::AccountsBalanceGetRequest {
            client: &self,
            access_token,
            options,
        }
    }
    /**Retrieve identity data

The `/identity/get` endpoint allows you to retrieve various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses. Only name data is guaranteed to be returned; other fields will be empty arrays if not provided by the institution.

This request may take some time to complete if identity was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the data.

Note: In API versions 2018-05-22 and earlier, the `owners` object is not returned, and instead identity information is returned in the top level `identity` object. For more details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2019-05-29).

See endpoint docs at <https://plaid.com/docs/api/products/identity/#identityget>.*/
    pub fn identity_get(
        &self,
        access_token: String,
        options: serde_json::Value,
    ) -> request_model::IdentityGetRequest {
        request_model::IdentityGetRequest {
            client: &self,
            access_token,
            options,
        }
    }
    /**Retrieve identity match score

The `/identity/match` endpoint generates a match score, which indicates how well the provided identity data matches the identity information on file with the account holder's financial institution.

This request may take some time to complete if Identity was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the data.

See endpoint docs at <https://plaid.com/docs/api/products/identity/#identitymatch>.*/
    pub fn identity_match(
        &self,
        access_token: String,
        user: serde_json::Value,
        options: serde_json::Value,
    ) -> request_model::IdentityMatchRequest {
        request_model::IdentityMatchRequest {
            client: &self,
            access_token,
            user,
            options,
        }
    }
    /**Retrieve a dashboard user

Retrieve information about a dashboard user.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#dashboard_userget>.*/
    pub fn dashobard_user_get(
        &self,
        dashboard_user_id: String,
    ) -> request_model::DashobardUserGetRequest {
        request_model::DashobardUserGetRequest {
            client: &self,
            dashboard_user_id,
        }
    }
    /**List dashboard users

List all dashboard users associated with your account.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#dashboard_userlist>.*/
    pub fn dashboard_user_list(
        &self,
        cursor: Option<String>,
    ) -> request_model::DashboardUserListRequest {
        request_model::DashboardUserListRequest {
            client: &self,
            cursor,
        }
    }
    /**Create a new identity verification

Create a new Identity Verification for the user specified by the `client_user_id` field. The requirements and behavior of the verification are determined by the `template_id` provided.
If you don't know whether the associated user already has an active Identity Verification, you can specify `"is_idempotent": true` in the request body. With idempotency enabled, a new Identity Verification will only be created if one does not already exist for the associated `client_user_id` and `template_id`. If an Identity Verification is found, it will be returned unmodified with an `200 OK` HTTP status code.


See endpoint docs at <https://plaid.com/docs/api/products/identity-verification/#identity_verificationcreate>.*/
    pub fn identity_verification_create(
        &self,
        is_shareable: bool,
        template_id: String,
        gave_consent: bool,
        user: serde_json::Value,
        is_idempotent: Option<bool>,
    ) -> request_model::IdentityVerificationCreateRequest {
        request_model::IdentityVerificationCreateRequest {
            client: &self,
            is_shareable,
            template_id,
            gave_consent,
            user,
            is_idempotent,
        }
    }
    /**Retrieve Identity Verification

Retrieve a previously created identity verification

See endpoint docs at <https://plaid.com/docs/api/products/identity-verification/#identity_verificationget>.*/
    pub fn identity_verification_get(
        &self,
        identity_verification_id: String,
    ) -> request_model::IdentityVerificationGetRequest {
        request_model::IdentityVerificationGetRequest {
            client: &self,
            identity_verification_id,
        }
    }
    /**List Identity Verifications

Filter and list Identity Verifications created by your account

See endpoint docs at <https://plaid.com/docs/api/products/identity-verification/#identity_verificationlist>.*/
    pub fn identity_verification_list(
        &self,
        template_id: String,
        client_user_id: String,
        cursor: Option<String>,
    ) -> request_model::IdentityVerificationListRequest {
        request_model::IdentityVerificationListRequest {
            client: &self,
            template_id,
            client_user_id,
            cursor,
        }
    }
    /**Retry an Identity Verification

Allow a customer to retry their identity verification

See endpoint docs at <https://plaid.com/docs/api/products/identity-verification/#identity_verificationretry>.*/
    pub fn identity_verification_retry(
        &self,
        client_user_id: String,
        template_id: String,
        strategy: String,
        steps: Option<serde_json::Value>,
    ) -> request_model::IdentityVerificationRetryRequest {
        request_model::IdentityVerificationRetryRequest {
            client: &self,
            client_user_id,
            template_id,
            strategy,
            steps,
        }
    }
    /**Create a watchlist screening for an entity

Create a new entity watchlist screening to check your customer against watchlists defined in the associated entity watchlist program. If your associated program has ongoing screening enabled, this is the profile information that will be used to monitor your customer over time.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentitycreate>.*/
    pub fn watchlist_screening_entity_create(
        &self,
        search_terms: serde_json::Value,
        client_user_id: Option<serde_json::Value>,
    ) -> request_model::WatchlistScreeningEntityCreateRequest {
        request_model::WatchlistScreeningEntityCreateRequest {
            client: &self,
            search_terms,
            client_user_id,
        }
    }
    /**Get an entity screening

Retrieve an entity watchlist screening.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentityget>.*/
    pub fn watchlist_screening_entity_get(
        &self,
        entity_watchlist_screening_id: String,
    ) -> request_model::WatchlistScreeningEntityGetRequest {
        request_model::WatchlistScreeningEntityGetRequest {
            client: &self,
            entity_watchlist_screening_id,
        }
    }
    /**List history for entity watchlist screenings

List all changes to the entity watchlist screening in reverse-chronological order. If the watchlist screening has not been edited, no history will be returned.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentityhistorylist>.*/
    pub fn watchlist_screening_entity_history_list(
        &self,
        entity_watchlist_screening_id: String,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningEntityHistoryListRequest {
        request_model::WatchlistScreeningEntityHistoryListRequest {
            client: &self,
            entity_watchlist_screening_id,
            cursor,
        }
    }
    /**List hits for entity watchlist screenings

List all hits for the entity watchlist screening.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentityhitlist>.*/
    pub fn watchlist_screening_entity_hits_list(
        &self,
        entity_watchlist_screening_id: String,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningEntityHitsListRequest {
        request_model::WatchlistScreeningEntityHitsListRequest {
            client: &self,
            entity_watchlist_screening_id,
            cursor,
        }
    }
    /**List entity watchlist screenings

List all entity screenings.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentitylist>.*/
    pub fn watchlist_screening_entity_list(
        &self,
        entity_watchlist_program_id: String,
        client_user_id: Option<serde_json::Value>,
        status: Option<serde_json::Value>,
        assignee: Option<serde_json::Value>,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningEntityListRequest {
        request_model::WatchlistScreeningEntityListRequest {
            client: &self,
            entity_watchlist_program_id,
            client_user_id,
            status,
            assignee,
            cursor,
        }
    }
    /**Get entity watchlist screening program

Get an entity watchlist screening program

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentityprogramget>.*/
    pub fn watchlist_screening_entity_program_get(
        &self,
        entity_watchlist_program_id: String,
    ) -> request_model::WatchlistScreeningEntityProgramGetRequest {
        request_model::WatchlistScreeningEntityProgramGetRequest {
            client: &self,
            entity_watchlist_program_id,
        }
    }
    /**List entity watchlist screening programs

List all entity watchlist screening programs

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentityprogramlist>.*/
    pub fn watchlist_screening_entity_program_list(
        &self,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningEntityProgramListRequest {
        request_model::WatchlistScreeningEntityProgramListRequest {
            client: &self,
            cursor,
        }
    }
    /**Create a review for an entity watchlist screening

Create a review for an entity watchlist screening. Reviews are compliance reports created by users in your organization regarding the relevance of potential hits found by Plaid.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentityreviewcreate>.*/
    pub fn watchlist_screening_entity_review_create(
        &self,
        confirmed_hits: Vec<EntityWatchlistScreeningHitId>,
        dismissed_hits: Vec<EntityWatchlistScreeningHitId>,
        comment: Option<String>,
        entity_watchlist_screening_id: String,
    ) -> request_model::WatchlistScreeningEntityReviewCreateRequest {
        request_model::WatchlistScreeningEntityReviewCreateRequest {
            client: &self,
            confirmed_hits,
            dismissed_hits,
            comment,
            entity_watchlist_screening_id,
        }
    }
    /**List reviews for entity watchlist screenings

List all reviews for a particular entity watchlist screening. Reviews are compliance reports created by users in your organization regarding the relevance of potential hits found by Plaid.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentityreviewlist>.*/
    pub fn watchlist_screening_entity_review_list(
        &self,
        entity_watchlist_screening_id: String,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningEntityReviewListRequest {
        request_model::WatchlistScreeningEntityReviewListRequest {
            client: &self,
            entity_watchlist_screening_id,
            cursor,
        }
    }
    /**Update an entity screening

Update an entity watchlist screening.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningentityupdate>.*/
    pub fn watchlist_screening_entity_update(
        &self,
        entity_watchlist_screening_id: String,
        search_terms: Option<serde_json::Value>,
        assignee: Option<serde_json::Value>,
        status: Option<serde_json::Value>,
        client_user_id: Option<serde_json::Value>,
        reset_fields: Option<Vec<UpdateEntityScreeningRequestResettableField>>,
    ) -> request_model::WatchlistScreeningEntityUpdateRequest {
        request_model::WatchlistScreeningEntityUpdateRequest {
            client: &self,
            entity_watchlist_screening_id,
            search_terms,
            assignee,
            status,
            client_user_id,
            reset_fields,
        }
    }
    /**Create a watchlist screening for a person

Create a new Watchlist Screening to check your customer against watchlists defined in the associated Watchlist Program. If your associated program has ongoing screening enabled, this is the profile information that will be used to monitor your customer over time.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividualcreate>.*/
    pub fn watchlist_screening_individual_create(
        &self,
        search_terms: serde_json::Value,
        client_user_id: Option<serde_json::Value>,
    ) -> request_model::WatchlistScreeningIndividualCreateRequest {
        request_model::WatchlistScreeningIndividualCreateRequest {
            client: &self,
            search_terms,
            client_user_id,
        }
    }
    /**Retrieve an individual watchlist screening

Retrieve a previously created individual watchlist screening

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividualget>.*/
    pub fn watchlist_screening_individual_get(
        &self,
        watchlist_screening_id: String,
    ) -> request_model::WatchlistScreeningIndividualGetRequest {
        request_model::WatchlistScreeningIndividualGetRequest {
            client: &self,
            watchlist_screening_id,
        }
    }
    /**List history for individual watchlist screenings

List all changes to the individual watchlist screening in reverse-chronological order. If the watchlist screening has not been edited, no history will be returned.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividualhistorylist>.*/
    pub fn watchlist_screening_individual_history_list(
        &self,
        watchlist_screening_id: String,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningIndividualHistoryListRequest {
        request_model::WatchlistScreeningIndividualHistoryListRequest {
            client: &self,
            watchlist_screening_id,
            cursor,
        }
    }
    /**List hits for individual watchlist screening

List all hits found by Plaid for a particular individual watchlist screening.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividualhitlist>.*/
    pub fn watchlist_screening_individual_hit_list(
        &self,
        watchlist_screening_id: String,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningIndividualHitListRequest {
        request_model::WatchlistScreeningIndividualHitListRequest {
            client: &self,
            watchlist_screening_id,
            cursor,
        }
    }
    /**List Individual Watchlist Screenings

List previously created watchlist screenings for individuals

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividuallist>.*/
    pub fn watchlist_screening_individual_list(
        &self,
        watchlist_program_id: String,
        client_user_id: Option<serde_json::Value>,
        status: Option<serde_json::Value>,
        assignee: Option<serde_json::Value>,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningIndividualListRequest {
        request_model::WatchlistScreeningIndividualListRequest {
            client: &self,
            watchlist_program_id,
            client_user_id,
            status,
            assignee,
            cursor,
        }
    }
    /**Get individual watchlist screening program

Get an individual watchlist screening program

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividualprogramget>.*/
    pub fn watchlist_screening_individual_program_get(
        &self,
        watchlist_program_id: String,
    ) -> request_model::WatchlistScreeningIndividualProgramGetRequest {
        request_model::WatchlistScreeningIndividualProgramGetRequest {
            client: &self,
            watchlist_program_id,
        }
    }
    /**List individual watchlist screening programs

List all individual watchlist screening programs

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividualprogramlist>.*/
    pub fn watchlist_screening_individual_program_list(
        &self,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningIndividualProgramListRequest {
        request_model::WatchlistScreeningIndividualProgramListRequest {
            client: &self,
            cursor,
        }
    }
    /**Create a review for an individual watchlist screening

Create a review for the individual watchlist screening. Reviews are compliance reports created by users in your organization regarding the relevance of potential hits found by Plaid.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividualreviewcreate>.*/
    pub fn watchlist_screening_individual_review_create(
        &self,
        confirmed_hits: Vec<WatchlistScreeningHitId>,
        dismissed_hits: Vec<WatchlistScreeningHitId>,
        comment: Option<String>,
        watchlist_screening_id: String,
    ) -> request_model::WatchlistScreeningIndividualReviewCreateRequest {
        request_model::WatchlistScreeningIndividualReviewCreateRequest {
            client: &self,
            confirmed_hits,
            dismissed_hits,
            comment,
            watchlist_screening_id,
        }
    }
    /**List reviews for individual watchlist screenings

List all reviews for the individual watchlist screening.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividualreviewlist>.*/
    pub fn watchlist_screening_individual_reviews_list(
        &self,
        watchlist_screening_id: String,
        cursor: Option<String>,
    ) -> request_model::WatchlistScreeningIndividualReviewsListRequest {
        request_model::WatchlistScreeningIndividualReviewsListRequest {
            client: &self,
            watchlist_screening_id,
            cursor,
        }
    }
    /**Update individual watchlist screening

Update a specific individual watchlist screening. This endpoint can be used to add additional customer information, correct outdated information, add a reference id, assign the individual to a reviewer, and update which program it is associated with. Please note that you may not update `search_terms` and `status` at the same time since editing `search_terms` may trigger an automatic `status` change.

See endpoint docs at <https://plaid.com/docs/api/products/monitor/#watchlist_screeningindividualupdate>.*/
    pub fn watchlist_screening_individual_update(
        &self,
        watchlist_screening_id: String,
        search_terms: Option<serde_json::Value>,
        assignee: Option<serde_json::Value>,
        status: Option<serde_json::Value>,
        client_user_id: Option<serde_json::Value>,
        reset_fields: Option<Vec<UpdateIndividualScreeningRequestResettableField>>,
    ) -> request_model::WatchlistScreeningIndividualUpdateRequest {
        request_model::WatchlistScreeningIndividualUpdateRequest {
            client: &self,
            watchlist_screening_id,
            search_terms,
            assignee,
            status,
            client_user_id,
            reset_fields,
        }
    }
    /**Retrieve Auth data

The `/processor/auth/get` endpoint returns the bank account and bank identification number (such as the routing number, for US accounts), for a checking or savings account that''s associated with a given `processor_token`. The endpoint also returns high-level account data and balances when available.

Versioning note: API versions 2019-05-29 and earlier use a different schema for the `numbers` object returned by this endpoint. For details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2020-09-14).


See endpoint docs at <https://plaid.com/docs/api/processors/#processorauthget>.*/
    pub fn processor_auth_get(
        &self,
        processor_token: String,
    ) -> request_model::ProcessorAuthGetRequest {
        request_model::ProcessorAuthGetRequest {
            client: &self,
            processor_token,
        }
    }
    /**Create a bank transfer as a processor

Use the `/processor/bank_transfer/create` endpoint to initiate a new bank transfer as a processor

See endpoint docs at <https://plaid.com/docs/api/processors/#bank_transfercreate>.*/
    pub fn processor_bank_transfer_create(
        &self,
        idempotency_key: String,
        processor_token: String,
        type_: String,
        network: String,
        amount: String,
        iso_currency_code: String,
        description: String,
        ach_class: String,
        user: serde_json::Value,
        custom_tag: Option<String>,
        metadata: Option<serde_json::Value>,
        origination_account_id: Option<String>,
    ) -> request_model::ProcessorBankTransferCreateRequest {
        request_model::ProcessorBankTransferCreateRequest {
            client: &self,
            idempotency_key,
            processor_token,
            type_,
            network,
            amount,
            iso_currency_code,
            description,
            ach_class,
            user,
            custom_tag,
            metadata,
            origination_account_id,
        }
    }
    /**Retrieve Identity data

The `/processor/identity/get` endpoint allows you to retrieve various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses.

See endpoint docs at <https://plaid.com/docs/api/processors/#processoridentityget>.*/
    pub fn processor_identity_get(
        &self,
        processor_token: String,
    ) -> request_model::ProcessorIdentityGetRequest {
        request_model::ProcessorIdentityGetRequest {
            client: &self,
            processor_token,
        }
    }
    /**Retrieve Balance data

The `/processor/balance/get` endpoint returns the real-time balance for each of an Item's accounts. While other endpoints may return a balance object, only `/processor/balance/get` forces the available and current balance fields to be refreshed rather than cached.

See endpoint docs at <https://plaid.com/docs/api/processors/#processorbalanceget>.*/
    pub fn processor_balance_get(
        &self,
        processor_token: String,
        options: serde_json::Value,
    ) -> request_model::ProcessorBalanceGetRequest {
        request_model::ProcessorBalanceGetRequest {
            client: &self,
            processor_token,
            options,
        }
    }
    /**Update Webhook URL

The POST `/item/webhook/update` allows you to update the webhook URL associated with an Item. This request triggers a [`WEBHOOK_UPDATE_ACKNOWLEDGED`](https://plaid.com/docs/api/items/#webhook_update_acknowledged) webhook to the newly specified webhook URL.

See endpoint docs at <https://plaid.com/docs/api/items/#itemwebhookupdate>.*/
    pub fn item_webhook_update(
        &self,
        access_token: String,
        webhook: Option<String>,
    ) -> request_model::ItemWebhookUpdateRequest {
        request_model::ItemWebhookUpdateRequest {
            client: &self,
            access_token,
            webhook,
        }
    }
    /**Invalidate access_token

By default, the `access_token` associated with an Item does not expire and should be stored in a persistent, secure manner.

You can use the `/item/access_token/invalidate` endpoint to rotate the `access_token` associated with an Item. The endpoint returns a new `access_token` and immediately invalidates the previous `access_token`.


See endpoint docs at <https://plaid.com/docs/api/tokens/#itemaccess_tokeninvalidate>.*/
    pub fn item_access_token_invalidate(
        &self,
        access_token: String,
    ) -> request_model::ItemAccessTokenInvalidateRequest {
        request_model::ItemAccessTokenInvalidateRequest {
            client: &self,
            access_token,
        }
    }
    /**Get webhook verification key

Plaid signs all outgoing webhooks and provides JSON Web Tokens (JWTs) so that you can verify the authenticity of any incoming webhooks to your application. A message signature is included in the `Plaid-Verification` header.

The `/webhook_verification_key/get` endpoint provides a JSON Web Key (JWK) that can be used to verify a JWT.

See endpoint docs at <https://plaid.com/docs/api/webhooks/webhook-verification/#webhook_verification_keyget>.*/
    pub fn webhook_verification_key_get(
        &self,
        key_id: String,
    ) -> request_model::WebhookVerificationKeyGetRequest {
        request_model::WebhookVerificationKeyGetRequest {
            client: &self,
            key_id,
        }
    }
    /**Retrieve Liabilities data

The `/liabilities/get` endpoint returns various details about an Item with loan or credit accounts. Liabilities data is available primarily for US financial institutions, with some limited coverage of Canadian institutions. Currently supported account types are account type `credit` with account subtype `credit card` or `paypal`, and account type `loan` with account subtype `student` or `mortgage`. To limit accounts listed in Link to types and subtypes supported by Liabilities, you can use the `account_filters` parameter when [creating a Link token](https://plaid.com/docs/api/tokens/#linktokencreate).

The types of information returned by Liabilities can include balances and due dates, loan terms, and account details such as original loan amount and guarantor. Data is refreshed approximately once per day; the latest data can be retrieved by calling `/liabilities/get`.

Note: This request may take some time to complete if `liabilities` was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the additional data.

See endpoint docs at <https://plaid.com/docs/api/products/liabilities/#liabilitiesget>.*/
    pub fn liabilities_get(
        &self,
        access_token: String,
        options: serde_json::Value,
    ) -> request_model::LiabilitiesGetRequest {
        request_model::LiabilitiesGetRequest {
            client: &self,
            access_token,
            options,
        }
    }
    /**Create payment recipient

Create a payment recipient for payment initiation.  The recipient must be in Europe, within a country that is a member of the Single Euro Payment Area (SEPA).  For a standing order (recurring) payment, the recipient must be in the UK.

The endpoint is idempotent: if a developer has already made a request with the same payment details, Plaid will return the same `recipient_id`.


See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationrecipientcreate>.*/
    pub fn payment_initiation_recipient_create(
        &self,
        name: String,
        iban: Option<String>,
        bacs: Option<serde_json::Value>,
        address: Option<serde_json::Value>,
    ) -> request_model::PaymentInitiationRecipientCreateRequest {
        request_model::PaymentInitiationRecipientCreateRequest {
            client: &self,
            name,
            iban,
            bacs,
            address,
        }
    }
    /**Reverse an existing payment

Reverse a previously initiated payment.

A payment can only be reversed once and will be refunded to the original sender's account.


See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationpaymentreverse>.*/
    pub fn payment_initiation_payment_reverse(
        &self,
        payment_id: String,
        idempotency_key: String,
        reference: String,
    ) -> request_model::PaymentInitiationPaymentReverseRequest {
        request_model::PaymentInitiationPaymentReverseRequest {
            client: &self,
            payment_id,
            idempotency_key,
            reference,
        }
    }
    /**Get payment recipient

Get details about a payment recipient you have previously created.

See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationrecipientget>.*/
    pub fn payment_initiation_recipient_get(
        &self,
        recipient_id: String,
    ) -> request_model::PaymentInitiationRecipientGetRequest {
        request_model::PaymentInitiationRecipientGetRequest {
            client: &self,
            recipient_id,
        }
    }
    /**List payment recipients

The `/payment_initiation/recipient/list` endpoint list the payment recipients that you have previously created.

See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationrecipientlist>.*/
    pub fn payment_initiation_recipient_list(
        &self,
    ) -> request_model::PaymentInitiationRecipientListRequest {
        request_model::PaymentInitiationRecipientListRequest {
            client: &self,
        }
    }
    /**Create a payment

After creating a payment recipient, you can use the `/payment_initiation/payment/create` endpoint to create a payment to that recipient.  Payments can be one-time or standing order (recurring) and can be denominated in either EUR or GBP.  If making domestic GBP-denominated payments, your recipient must have been created with BACS numbers. In general, EUR-denominated payments will be sent via SEPA Credit Transfer and GBP-denominated payments will be sent via the Faster Payments network, but the payment network used will be determined by the institution. Payments sent via Faster Payments will typically arrive immediately, while payments sent via SEPA Credit Transfer will typically arrive in one business day.

Standing orders (recurring payments) must be denominated in GBP and can only be sent to recipients in the UK. Once created, standing order payments cannot be modified or canceled via the API. An end user can cancel or modify a standing order directly on their banking application or website, or by contacting the bank. Standing orders will follow the payment rules of the underlying rails (Faster Payments in UK). Payments can be sent Monday to Friday, excluding bank holidays. If the pre-arranged date falls on a weekend or bank holiday, the payment is made on the next working day. It is not possible to guarantee the exact time the payment will reach the recipient’s account, although at least 90% of standing order payments are sent by 6am.

In the Development environment, payments must be below 5 GBP / EUR. For details on any payment limits in Production, contact your Plaid Account Manager.

See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationpaymentcreate>.*/
    pub fn payment_initiation_payment_create(
        &self,
        recipient_id: String,
        reference: String,
        amount: serde_json::Value,
        schedule: serde_json::Value,
        options: Option<serde_json::Value>,
    ) -> request_model::PaymentInitiationPaymentCreateRequest {
        request_model::PaymentInitiationPaymentCreateRequest {
            client: &self,
            recipient_id,
            reference,
            amount,
            schedule,
            options,
        }
    }
    /**Create payment token

The `/payment_initiation/payment/token/create` endpoint has been deprecated. New Plaid customers will be unable to use this endpoint, and existing customers are encouraged to migrate to the newer, `link_token`-based flow. The recommended flow is to provide the `payment_id` to `/link/token/create`, which returns a `link_token` used to initialize Link.

The `/payment_initiation/payment/token/create` is used to create a `payment_token`, which can then be used in Link initialization to enter a payment initiation flow. You can only use a `payment_token` once. If this attempt fails, the end user aborts the flow, or the token expires, you will need to create a new payment token. Creating a new payment token does not require end user input.

See endpoint docs at <https://plaid.com/docs/link/maintain-legacy-integration/#creating-a-payment-token>.*/
    pub fn create_payment_token(
        &self,
        payment_id: String,
    ) -> request_model::CreatePaymentTokenRequest {
        request_model::CreatePaymentTokenRequest {
            client: &self,
            payment_id,
        }
    }
    /**Create payment consent

The `/payment_initiation/consent/create` endpoint is used to create a payment consent, which can be used to initiate payments on behalf of the user. Payment consents are created with `UNAUTHORISED` status by default and must be authorised by the user before payments can be initiated.

Consents can be limited in time and scope, and have constraints that describe limitations for payments.

See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationconsentcreate>.*/
    pub fn payment_initiation_consent_create(
        &self,
        recipient_id: String,
        reference: String,
        scopes: Vec<PaymentInitiationConsentScope>,
        constraints: serde_json::Value,
        options: Option<serde_json::Value>,
    ) -> request_model::PaymentInitiationConsentCreateRequest {
        request_model::PaymentInitiationConsentCreateRequest {
            client: &self,
            recipient_id,
            reference,
            scopes,
            constraints,
            options,
        }
    }
    /**Get payment consent

The `/payment_initiation/consent/get` endpoint can be used to check the status of a payment consent, as well as to receive basic information such as recipient and constraints.

See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationconsentget>.*/
    pub fn payment_initiation_consent_get(
        &self,
        consent_id: String,
    ) -> request_model::PaymentInitiationConsentGetRequest {
        request_model::PaymentInitiationConsentGetRequest {
            client: &self,
            consent_id,
        }
    }
    /**Revoke payment consent

The `/payment_initiation/consent/revoke` endpoint can be used to revoke the payment consent. Once the consent is revoked, it is not possible to initiate payments using it.

See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationconsentrevoke>.*/
    pub fn payment_initiation_consent_revoke(
        &self,
        consent_id: String,
    ) -> request_model::PaymentInitiationConsentRevokeRequest {
        request_model::PaymentInitiationConsentRevokeRequest {
            client: &self,
            consent_id,
        }
    }
    /**Execute a single payment using consent

The `/payment_initiation/consent/payment/execute` endpoint can be used to execute payments using payment consent.

See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationconsentpaymentexecute>.*/
    pub fn payment_initiation_consent_payment_execute(
        &self,
        consent_id: String,
        amount: serde_json::Value,
        idempotency_key: String,
    ) -> request_model::PaymentInitiationConsentPaymentExecuteRequest {
        request_model::PaymentInitiationConsentPaymentExecuteRequest {
            client: &self,
            consent_id,
            amount,
            idempotency_key,
        }
    }
    /**Force a Sandbox Item into an error state

`/sandbox/item/reset_login/` forces an Item into an `ITEM_LOGIN_REQUIRED` state in order to simulate an Item whose login is no longer valid. This makes it easy to test Link's [update mode](https://plaid.com/docs/link/update-mode) flow in the Sandbox environment.  After calling `/sandbox/item/reset_login`, You can then use Plaid Link update mode to restore the Item to a good state. An `ITEM_LOGIN_REQUIRED` webhook will also be fired after a call to this endpoint, if one is associated with the Item.


In the Sandbox, Items will transition to an `ITEM_LOGIN_REQUIRED` error state automatically after 30 days, even if this endpoint is not called.

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxitemreset_login>.*/
    pub fn sandbox_item_reset_login(
        &self,
        access_token: String,
    ) -> request_model::SandboxItemResetLoginRequest {
        request_model::SandboxItemResetLoginRequest {
            client: &self,
            access_token,
        }
    }
    /**Set verification status for Sandbox account

The `/sandbox/item/set_verification_status` endpoint can be used to change the verification status of an Item in in the Sandbox in order to simulate the Automated Micro-deposit flow.

Note that not all Plaid developer accounts are enabled for micro-deposit based verification by default. Your account must be enabled for this feature in order to test it in Sandbox. To enable this features or check your status, contact your account manager or [submit a product access Support ticket](https://dashboard.plaid.com/support/new/product-and-development/product-troubleshooting/request-product-access).

For more information on testing Automated Micro-deposits in Sandbox, see [Auth full coverage testing](https://plaid.com/docs/auth/coverage/testing#).

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxitemset_verification_status>.*/
    pub fn sandbox_item_set_verification_status(
        &self,
        access_token: String,
        account_id: String,
        verification_status: String,
    ) -> request_model::SandboxItemSetVerificationStatusRequest {
        request_model::SandboxItemSetVerificationStatusRequest {
            client: &self,
            access_token,
            account_id,
            verification_status,
        }
    }
    /**Exchange public token for an access token

Exchange a Link `public_token` for an API `access_token`. Link hands off the `public_token` client-side via the `onSuccess` callback once a user has successfully created an Item. The `public_token` is ephemeral and expires after 30 minutes. An `access_token` does not expire, but can be revoked by calling `/item/remove`.

The response also includes an `item_id` that should be stored with the `access_token`. The `item_id` is used to identify an Item in a webhook. The `item_id` can also be retrieved by making an `/item/get` request.

See endpoint docs at <https://plaid.com/docs/api/tokens/#itempublic_tokenexchange>.*/
    pub fn item_public_token_exchange(
        &self,
        public_token: String,
    ) -> request_model::ItemPublicTokenExchangeRequest {
        request_model::ItemPublicTokenExchangeRequest {
            client: &self,
            public_token,
        }
    }
    /**Create public token

Note: As of July 2020, the `/item/public_token/create` endpoint is deprecated. Instead, use `/link/token/create` with an `access_token` to create a Link token for use with [update mode](https://plaid.com/docs/link/update-mode).

If you need your user to take action to restore or resolve an error associated with an Item, generate a public token with the `/item/public_token/create` endpoint and then initialize Link with that `public_token`.

A `public_token` is one-time use and expires after 30 minutes. You use a `public_token` to initialize Link in [update mode](https://plaid.com/docs/link/update-mode) for a particular Item. You can generate a `public_token` for an Item even if you did not use Link to create the Item originally.

The `/item/public_token/create` endpoint is **not** used to create your initial `public_token`. If you have not already received an `access_token` for a specific Item, use Link to obtain your `public_token` instead. See the [Quickstart](https://plaid.com/docs/quickstart) for more information.

See endpoint docs at <https://plaid.com/docs/api/tokens/#itempublic_tokencreate>.*/
    pub fn item_create_public_token(
        &self,
        access_token: String,
    ) -> request_model::ItemCreatePublicTokenRequest {
        request_model::ItemCreatePublicTokenRequest {
            client: &self,
            access_token,
        }
    }
    /**Create user

This endpoint should be called for each of your end users before they begin a Plaid income flow. This provides you a single token to access all income data associated with the user. You should only create one per end user.

If you call the endpoint multiple times with the same `client_user_id`, the first creation call will succeed and the rest will fail with an error message indicating that the user has been created for the given `client_user_id`.

See endpoint docs at <https://plaid.com/docs/api/products/income/#usercreate>.*/
    pub fn user_create(
        &self,
        client_user_id: String,
    ) -> request_model::UserCreateRequest {
        request_model::UserCreateRequest {
            client: &self,
            client_user_id,
        }
    }
    /**Get payment details

The `/payment_initiation/payment/get` endpoint can be used to check the status of a payment, as well as to receive basic information such as recipient and payment amount. In the case of standing orders, the `/payment_initiation/payment/get` endpoint will provide information about the status of the overall standing order itself; the API cannot be used to retrieve payment status for individual payments within a standing order.

See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationpaymentget>.*/
    pub fn payment_initiation_payment_get(
        &self,
        payment_id: String,
    ) -> request_model::PaymentInitiationPaymentGetRequest {
        request_model::PaymentInitiationPaymentGetRequest {
            client: &self,
            payment_id,
        }
    }
    /**List payments

The `/payment_initiation/payment/list` endpoint can be used to retrieve all created payments. By default, the 10 most recent payments are returned. You can request more payments and paginate through the results using the optional `count` and `cursor` parameters.

See endpoint docs at <https://plaid.com/docs/api/products/payment-initiation/#payment_initiationpaymentlist>.*/
    pub fn payment_initiation_payment_list(
        &self,
        count: Option<i64>,
        cursor: Option<String>,
        consent_id: Option<String>,
    ) -> request_model::PaymentInitiationPaymentListRequest {
        request_model::PaymentInitiationPaymentListRequest {
            client: &self,
            count,
            cursor,
            consent_id,
        }
    }
    /**Create an Asset Report

The `/asset_report/create` endpoint initiates the process of creating an Asset Report, which can then be retrieved by passing the `asset_report_token` return value to the `/asset_report/get` or `/asset_report/pdf/get` endpoints.

The Asset Report takes some time to be created and is not available immediately after calling `/asset_report/create`. When the Asset Report is ready to be retrieved using `/asset_report/get` or `/asset_report/pdf/get`, Plaid will fire a `PRODUCT_READY` webhook. For full details of the webhook schema, see [Asset Report webhooks](https://plaid.com/docs/api/products/assets/#webhooks).

The `/asset_report/create` endpoint creates an Asset Report at a moment in time. Asset Reports are immutable. To get an updated Asset Report, use the `/asset_report/refresh` endpoint.

See endpoint docs at <https://plaid.com/docs/api/products/assets/#asset_reportcreate>.*/
    pub fn asset_report_create(
        &self,
        access_tokens: Vec<AccessToken>,
        days_requested: i64,
        options: serde_json::Value,
    ) -> request_model::AssetReportCreateRequest {
        request_model::AssetReportCreateRequest {
            client: &self,
            access_tokens,
            days_requested,
            options,
        }
    }
    /**Refresh an Asset Report

An Asset Report is an immutable snapshot of a user's assets. In order to "refresh" an Asset Report you created previously, you can use the `/asset_report/refresh` endpoint to create a new Asset Report based on the old one, but with the most recent data available.

The new Asset Report will contain the same Items as the original Report, as well as the same filters applied by any call to `/asset_report/filter`. By default, the new Asset Report will also use the same parameters you submitted with your original `/asset_report/create` request, but the original `days_requested` value and the values of any parameters in the `options` object can be overridden with new values. To change these arguments, simply supply new values for them in your request to `/asset_report/refresh`. Submit an empty string ("") for any previously-populated fields you would like set as empty.

See endpoint docs at <https://plaid.com/docs/api/products/assets/#asset_reportrefresh>.*/
    pub fn asset_report_refresh(
        &self,
        asset_report_token: String,
        days_requested: Option<i64>,
        options: serde_json::Value,
    ) -> request_model::AssetReportRefreshRequest {
        request_model::AssetReportRefreshRequest {
            client: &self,
            asset_report_token,
            days_requested,
            options,
        }
    }
    /**Refresh a Relay Token's Asset Report

The `/asset_report/relay/refresh` endpoint allows third parties to refresh an Asset Report that was relayed to them, using an `asset_relay_token` that was created by the report owner. A new Asset Report will be created based on the old one, but with the most recent data available.

See endpoint docs at <https://plaid.com/docs/api/products/#asset_reportrelayrefresh>.*/
    pub fn asset_report_relay_refresh(
        &self,
        asset_relay_token: String,
        webhook: Option<String>,
    ) -> request_model::AssetReportRelayRefreshRequest {
        request_model::AssetReportRelayRefreshRequest {
            client: &self,
            asset_relay_token,
            webhook,
        }
    }
    /**Delete an Asset Report

The `/item/remove` endpoint allows you to invalidate an `access_token`, meaning you will not be able to create new Asset Reports with it. Removing an Item does not affect any Asset Reports or Audit Copies you have already created, which will remain accessible until you remove them specifically.

The `/asset_report/remove` endpoint allows you to remove an Asset Report. Removing an Asset Report invalidates its `asset_report_token`, meaning you will no longer be able to use it to access Report data or create new Audit Copies. Removing an Asset Report does not affect the underlying Items, but does invalidate any `audit_copy_tokens` associated with the Asset Report.

See endpoint docs at <https://plaid.com/docs/api/products/assets/#asset_reportremove>.*/
    pub fn asset_report_remove(
        &self,
        asset_report_token: String,
    ) -> request_model::AssetReportRemoveRequest {
        request_model::AssetReportRemoveRequest {
            client: &self,
            asset_report_token,
        }
    }
    /**Filter Asset Report

By default, an Asset Report will contain all of the accounts on a given Item. In some cases, you may not want the Asset Report to contain all accounts. For example, you might have the end user choose which accounts are relevant in Link using the Account Select view, which you can enable in the dashboard. Or, you might always exclude certain account types or subtypes, which you can identify by using the `/accounts/get` endpoint. To narrow an Asset Report to only a subset of accounts, use the `/asset_report/filter` endpoint.

To exclude certain Accounts from an Asset Report, first use the `/asset_report/create` endpoint to create the report, then send the `asset_report_token` along with a list of `account_ids` to exclude to the `/asset_report/filter` endpoint, to create a new Asset Report which contains only a subset of the original Asset Report's data.

Because Asset Reports are immutable, calling `/asset_report/filter` does not alter the original Asset Report in any way; rather, `/asset_report/filter` creates a new Asset Report with a new token and id. Asset Reports created via `/asset_report/filter` do not contain new Asset data, and are not billed.

Plaid will fire a [`PRODUCT_READY`](https://plaid.com/docs/api/products/assets/#product_ready) webhook once generation of the filtered Asset Report has completed.

See endpoint docs at <https://plaid.com/docs/api/products/assets/#asset_reportfilter>.*/
    pub fn asset_report_filter(
        &self,
        asset_report_token: String,
        account_ids_to_exclude: Vec<String>,
    ) -> request_model::AssetReportFilterRequest {
        request_model::AssetReportFilterRequest {
            client: &self,
            asset_report_token,
            account_ids_to_exclude,
        }
    }
    /**Retrieve an Asset Report

The `/asset_report/get` endpoint retrieves the Asset Report in JSON format. Before calling `/asset_report/get`, you must first create the Asset Report using `/asset_report/create` (or filter an Asset Report using `/asset_report/filter`) and then wait for the [`PRODUCT_READY`](https://plaid.com/docs/api/products/assets/#product_ready) webhook to fire, indicating that the Report is ready to be retrieved.

By default, an Asset Report includes transaction descriptions as returned by the bank, as opposed to parsed and categorized by Plaid. You can also receive cleaned and categorized transactions, as well as additional insights like merchant name or location information. We call this an Asset Report with Insights. An Asset Report with Insights provides transaction category, location, and merchant information in addition to the transaction strings provided in a standard Asset Report.

To retrieve an Asset Report with Insights, call the `/asset_report/get` endpoint with `include_insights` set to `true`.

See endpoint docs at <https://plaid.com/docs/api/products/assets/#asset_reportget>.*/
    pub fn asset_report_get(
        &self,
        asset_report_token: String,
        include_insights: bool,
        fast_report: bool,
    ) -> request_model::AssetReportGetRequest {
        request_model::AssetReportGetRequest {
            client: &self,
            asset_report_token,
            include_insights,
            fast_report,
        }
    }
    /**Create Asset Report Audit Copy

Plaid can provide an Audit Copy of any Asset Report directly to a participating third party on your behalf. For example, Plaid can supply an Audit Copy directly to Fannie Mae on your behalf if you participate in the Day 1 Certainty™ program. An Audit Copy contains the same underlying data as the Asset Report.

To grant access to an Audit Copy, use the `/asset_report/audit_copy/create` endpoint to create an `audit_copy_token` and then pass that token to the third party who needs access. Each third party has its own `auditor_id`, for example `fannie_mae`. You’ll need to create a separate Audit Copy for each third party to whom you want to grant access to the Report.

See endpoint docs at <https://plaid.com/docs/api/products/assets/#asset_reportaudit_copycreate>.*/
    pub fn asset_report_audit_copy_create(
        &self,
        asset_report_token: String,
        auditor_id: String,
    ) -> request_model::AssetReportAuditCopyCreateRequest {
        request_model::AssetReportAuditCopyCreateRequest {
            client: &self,
            asset_report_token,
            auditor_id,
        }
    }
    /**Remove Asset Report Audit Copy

The `/asset_report/audit_copy/remove` endpoint allows you to remove an Audit Copy. Removing an Audit Copy invalidates the `audit_copy_token` associated with it, meaning both you and any third parties holding the token will no longer be able to use it to access Report data. Items associated with the Asset Report, the Asset Report itself and other Audit Copies of it are not affected and will remain accessible after removing the given Audit Copy.

See endpoint docs at <https://plaid.com/docs/api/products/assets/#asset_reportaudit_copyremove>.*/
    pub fn asset_report_audit_copy_remove(
        &self,
        audit_copy_token: String,
    ) -> request_model::AssetReportAuditCopyRemoveRequest {
        request_model::AssetReportAuditCopyRemoveRequest {
            client: &self,
            audit_copy_token,
        }
    }
    /**Create an `asset_relay_token` to share an Asset Report with a partner client

Plaid can share an Asset Report directly with a participating third party on your behalf. The shared Asset Report is the exact same Asset Report originally created in `/asset_report/create`.

To grant access to an Asset Report to a third party, use the `/asset_report/relay/create` endpoint to create an `asset_relay_token` and then pass that token to the third party who needs access. Each third party has its own `secondary_client_id`, for example `ce5bd328dcd34123456`. You'll need to create a separate `asset_relay_token` for each third party to whom you want to grant access to the Report.

See endpoint docs at <https://plaid.com/docs/none/>.*/
    pub fn asset_report_relay_create(
        &self,
        asset_report_token: String,
        secondary_client_id: String,
        webhook: Option<String>,
    ) -> request_model::AssetReportRelayCreateRequest {
        request_model::AssetReportRelayCreateRequest {
            client: &self,
            asset_report_token,
            secondary_client_id,
            webhook,
        }
    }
    /**Retrieve an Asset Report that was shared with you

`/asset_report/relay/get` allows third parties to get an Asset Report that was shared with them, using an `asset_relay_token` that was created by the report owner.

See endpoint docs at <https://plaid.com/docs/none/>.*/
    pub fn asset_report_relay_get(
        &self,
        asset_relay_token: String,
    ) -> request_model::AssetReportRelayGetRequest {
        request_model::AssetReportRelayGetRequest {
            client: &self,
            asset_relay_token,
        }
    }
    /**Remove Asset Report Relay Token

The `/asset_report/relay/remove` endpoint allows you to invalidate an `asset_relay_token`, meaning the third party holding the token will no longer be able to use it to access the Asset Report to which the `asset_relay_token` gives access to. The Asset Report, Items associated with it, and other Asset Relay Tokens that provide access to the same Asset Report are not affected and will remain accessible after removing the given `asset_relay_token.

See endpoint docs at <https://plaid.com/docs/none/>.*/
    pub fn asset_report_relay_remove(
        &self,
        asset_relay_token: String,
    ) -> request_model::AssetReportRelayRemoveRequest {
        request_model::AssetReportRelayRemoveRequest {
            client: &self,
            asset_relay_token,
        }
    }
    /**Get Investment holdings

The `/investments/holdings/get` endpoint allows developers to receive user-authorized stock position data for `investment`-type accounts.

See endpoint docs at <https://plaid.com/docs/api/products/investments/#investmentsholdingsget>.*/
    pub fn investments_holdings_get(
        &self,
        access_token: String,
        options: serde_json::Value,
    ) -> request_model::InvestmentsHoldingsGetRequest {
        request_model::InvestmentsHoldingsGetRequest {
            client: &self,
            access_token,
            options,
        }
    }
    /**Get investment transactions

The `/investments/transactions/get` endpoint allows developers to retrieve up to 24 months of user-authorized transaction data for investment accounts.

Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift.

Due to the potentially large number of investment transactions associated with an Item, results are paginated. Manipulate the count and offset parameters in conjunction with the `total_investment_transactions` response body field to fetch all available investment transactions.

See endpoint docs at <https://plaid.com/docs/api/products/investments/#investmentstransactionsget>.*/
    pub fn investments_transactions_get(
        &self,
        access_token: String,
        start_date: String,
        end_date: String,
        options: serde_json::Value,
    ) -> request_model::InvestmentsTransactionsGetRequest {
        request_model::InvestmentsTransactionsGetRequest {
            client: &self,
            access_token,
            start_date,
            end_date,
            options,
        }
    }
    /**Create processor token

Used to create a token suitable for sending to one of Plaid's partners to enable integrations. Note that Stripe partnerships use bank account tokens instead; see `/processor/stripe/bank_account_token/create` for creating tokens for use with Stripe integrations. Processor tokens can also be revoked, using `/item/remove`.

See endpoint docs at <https://plaid.com/docs/api/processors/#processortokencreate>.*/
    pub fn processor_token_create(
        &self,
        access_token: String,
        account_id: String,
        processor: String,
    ) -> request_model::ProcessorTokenCreateRequest {
        request_model::ProcessorTokenCreateRequest {
            client: &self,
            access_token,
            account_id,
            processor,
        }
    }
    /**Create Stripe bank account token

Used to create a token suitable for sending to Stripe to enable Plaid-Stripe integrations. For a detailed guide on integrating Stripe, see [Add Stripe to your app](https://plaid.com/docs/auth/partnerships/stripe/). Bank account tokens can also be revoked, using `/item/remove`.

See endpoint docs at <https://plaid.com/docs/api/processors/#processorstripebank_account_tokencreate>.*/
    pub fn processor_stripe_bank_account_token_create(
        &self,
        access_token: String,
        account_id: String,
    ) -> request_model::ProcessorStripeBankAccountTokenCreateRequest {
        request_model::ProcessorStripeBankAccountTokenCreateRequest {
            client: &self,
            access_token,
            account_id,
        }
    }
    /**Create Apex bank account token

Used to create a token suitable for sending to Apex to enable Plaid-Apex integrations.

See endpoint docs at <https://plaid.com/docs/none/>.*/
    pub fn processor_apex_processor_token_create(
        &self,
        access_token: String,
        account_id: String,
    ) -> request_model::ProcessorApexProcessorTokenCreateRequest {
        request_model::ProcessorApexProcessorTokenCreateRequest {
            client: &self,
            access_token,
            account_id,
        }
    }
    /**Create a deposit switch

This endpoint creates a deposit switch entity that will be persisted throughout the lifecycle of the switch.

See endpoint docs at <https://plaid.com/docs/deposit-switch/reference#deposit_switchcreate>.*/
    pub fn deposit_switch_create(
        &self,
        target_access_token: String,
        target_account_id: String,
        country_code: Option<String>,
        options: serde_json::Value,
    ) -> request_model::DepositSwitchCreateRequest {
        request_model::DepositSwitchCreateRequest {
            client: &self,
            target_access_token,
            target_account_id,
            country_code,
            options,
        }
    }
    /**Import Item

`/item/import` creates an Item via your Plaid Exchange Integration and returns an `access_token`. As part of an `/item/import` request, you will include a User ID (`user_auth.user_id`) and Authentication Token (`user_auth.auth_token`) that enable data aggregation through your Plaid Exchange API endpoints. These authentication principals are to be chosen by you.

Upon creating an Item via `/item/import`, Plaid will automatically begin an extraction of that Item through the Plaid Exchange infrastructure you have already integrated. This will automatically generate the Plaid native account ID for the account the user will switch their direct deposit to (`target_account_id`).*/
    pub fn item_import(
        &self,
        products: Vec<Products>,
        user_auth: serde_json::Value,
        options: serde_json::Value,
    ) -> request_model::ItemImportRequest {
        request_model::ItemImportRequest {
            client: &self,
            products,
            user_auth,
            options,
        }
    }
    /**Create a deposit switch token

In order for the end user to take action, you will need to create a public token representing the deposit switch. This token is used to initialize Link. It can be used one time and expires after 30 minutes.


See endpoint docs at <https://plaid.com/docs/deposit-switch/reference#deposit_switchtokencreate>.*/
    pub fn deposit_switch_token_create(
        &self,
        deposit_switch_id: String,
    ) -> request_model::DepositSwitchTokenCreateRequest {
        request_model::DepositSwitchTokenCreateRequest {
            client: &self,
            deposit_switch_id,
        }
    }
    /**Create Link Token

The `/link/token/create` endpoint creates a `link_token`, which is required as a parameter when initializing Link. Once Link has been initialized, it returns a `public_token`, which can then be exchanged for an `access_token` via `/item/public_token/exchange` as part of the main Link flow.

A `link_token` generated by `/link/token/create` is also used to initialize other Link flows, such as the update mode flow for tokens with expired credentials, or the Payment Initiation (Europe) flow.

See endpoint docs at <https://plaid.com/docs/api/tokens/#linktokencreate>.*/
    pub fn link_token_create(
        &self,
        client_name: String,
        language: String,
        country_codes: Vec<CountryCode>,
        user: serde_json::Value,
        products: Vec<Products>,
        additional_consented_products: Vec<Products>,
        webhook: String,
        access_token: String,
        link_customization_name: String,
        redirect_uri: String,
        android_package_name: String,
        institution_data: serde_json::Value,
        account_filters: serde_json::Value,
        eu_config: serde_json::Value,
        institution_id: String,
        payment_initiation: serde_json::Value,
        deposit_switch: serde_json::Value,
        income_verification: serde_json::Value,
        auth: serde_json::Value,
        transfer: serde_json::Value,
        update: serde_json::Value,
        identity_verification: serde_json::Value,
        user_token: String,
    ) -> request_model::LinkTokenCreateRequest {
        request_model::LinkTokenCreateRequest {
            client: &self,
            client_name,
            language,
            country_codes,
            user,
            products,
            additional_consented_products,
            webhook,
            access_token,
            link_customization_name,
            redirect_uri,
            android_package_name,
            institution_data,
            account_filters,
            eu_config,
            institution_id,
            payment_initiation,
            deposit_switch,
            income_verification,
            auth,
            transfer,
            update,
            identity_verification,
            user_token,
        }
    }
    /**Get Link Token

The `/link/token/get` endpoint gets information about a previously-created `link_token` using the
`/link/token/create` endpoint. It can be useful for debugging purposes.

See endpoint docs at <https://plaid.com/docs/api/tokens/#linktokenget>.*/
    pub fn link_token_get(
        &self,
        link_token: String,
    ) -> request_model::LinkTokenGetRequest {
        request_model::LinkTokenGetRequest {
            client: &self,
            link_token,
        }
    }
    /**Retrieve an Asset Report Audit Copy

`/asset_report/audit_copy/get` allows auditors to get a copy of an Asset Report that was previously shared via the `/asset_report/audit_copy/create` endpoint.  The caller of `/asset_report/audit_copy/create` must provide the `audit_copy_token` to the auditor.  This token can then be used to call `/asset_report/audit_copy/create`.

See endpoint docs at <https://plaid.com/docs/none/>.*/
    pub fn asset_report_audit_copy_get(
        &self,
        audit_copy_token: String,
    ) -> request_model::AssetReportAuditCopyGetRequest {
        request_model::AssetReportAuditCopyGetRequest {
            client: &self,
            audit_copy_token,
        }
    }
    /**Retrieve a deposit switch

This endpoint returns information related to how the user has configured their payroll allocation and the state of the switch. You can use this information to build logic related to the user's direct deposit allocation preferences.

See endpoint docs at <https://plaid.com/docs/deposit-switch/reference#deposit_switchget>.*/
    pub fn deposit_switch_get(
        &self,
        deposit_switch_id: String,
    ) -> request_model::DepositSwitchGetRequest {
        request_model::DepositSwitchGetRequest {
            client: &self,
            deposit_switch_id,
        }
    }
    /**Retrieve a transfer

The `/transfer/get` fetches information about the transfer corresponding to the given `transfer_id`.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transferget>.*/
    pub fn transfer_get(
        &self,
        transfer_id: String,
    ) -> request_model::TransferGetRequest {
        request_model::TransferGetRequest {
            client: &self,
            transfer_id,
        }
    }
    /**Retrieve a bank transfer

The `/bank_transfer/get` fetches information about the bank transfer corresponding to the given `bank_transfer_id`.

See endpoint docs at <https://plaid.com/docs/bank-transfers/reference#bank_transferget>.*/
    pub fn bank_transfer_get(
        &self,
        bank_transfer_id: String,
    ) -> request_model::BankTransferGetRequest {
        request_model::BankTransferGetRequest {
            client: &self,
            bank_transfer_id,
        }
    }
    /**Create a transfer authorization

Use the `/transfer/authorization/create` endpoint to determine transfer failure risk.

In Plaid's sandbox environment the decisions will be returned as follows:

  - To approve a transfer with null rationale code, make an authorization request with an `amount` less than the available balance in the account.

  - To approve a transfer with the rationale code `MANUALLY_VERIFIED_ITEM`, create an Item in Link through the [Same Day Micro-deposits flow](https://plaid.com/docs/auth/coverage/testing/#testing-same-day-micro-deposits).

  - To approve a transfer with the rationale code `LOGIN_REQUIRED`, [reset the login for an Item](https://plaid.com/docs/sandbox/#item_login_required).

  - To decline a transfer with the rationale code `NSF`, the available balance on the account must be less than the authorization `amount`. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox.

  - To decline a transfer with the rationale code `RISK`, the available balance on the account must be exactly $0. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox.

For guaranteed ACH customers, the following fields are required : `user.phone_number` (optional if `email_address` provided), `user.email_address` (optional if `phone_number` provided), `device.ip_address`, `device.user_agent`, and `user_present`.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transferauthorizationcreate>.*/
    pub fn transfer_authorization_create(
        &self,
        access_token: String,
        account_id: String,
        type_: String,
        network: String,
        amount: String,
        ach_class: String,
        user: serde_json::Value,
        device: serde_json::Value,
        origination_account_id: String,
        iso_currency_code: String,
        user_present: Option<bool>,
        payment_profile_id: String,
    ) -> request_model::TransferAuthorizationCreateRequest {
        request_model::TransferAuthorizationCreateRequest {
            client: &self,
            access_token,
            account_id,
            type_,
            network,
            amount,
            ach_class,
            user,
            device,
            origination_account_id,
            iso_currency_code,
            user_present,
            payment_profile_id,
        }
    }
    /**Create a transfer

Use the `/transfer/create` endpoint to initiate a new transfer.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transfercreate>.*/
    pub fn transfer_create(
        &self,
        idempotency_key: String,
        access_token: String,
        account_id: String,
        authorization_id: String,
        type_: String,
        network: String,
        amount: String,
        description: String,
        ach_class: String,
        user: serde_json::Value,
        metadata: Option<serde_json::Value>,
        origination_account_id: Option<String>,
        iso_currency_code: String,
        payment_profile_id: String,
    ) -> request_model::TransferCreateRequest {
        request_model::TransferCreateRequest {
            client: &self,
            idempotency_key,
            access_token,
            account_id,
            authorization_id,
            type_,
            network,
            amount,
            description,
            ach_class,
            user,
            metadata,
            origination_account_id,
            iso_currency_code,
            payment_profile_id,
        }
    }
    /**Create a bank transfer

Use the `/bank_transfer/create` endpoint to initiate a new bank transfer.

See endpoint docs at <https://plaid.com/docs/bank-transfers/reference#bank_transfercreate>.*/
    pub fn bank_transfer_create(
        &self,
        idempotency_key: String,
        access_token: String,
        account_id: String,
        type_: String,
        network: String,
        amount: String,
        iso_currency_code: String,
        description: String,
        ach_class: String,
        user: serde_json::Value,
        custom_tag: Option<String>,
        metadata: Option<serde_json::Value>,
        origination_account_id: Option<String>,
    ) -> request_model::BankTransferCreateRequest {
        request_model::BankTransferCreateRequest {
            client: &self,
            idempotency_key,
            access_token,
            account_id,
            type_,
            network,
            amount,
            iso_currency_code,
            description,
            ach_class,
            user,
            custom_tag,
            metadata,
            origination_account_id,
        }
    }
    /**List transfers

Use the `/transfer/list` endpoint to see a list of all your transfers and their statuses. Results are paginated; use the `count` and `offset` query parameters to retrieve the desired transfers.


See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transferlist>.*/
    pub fn transfer_list(
        &self,
        start_date: Option<String>,
        end_date: Option<String>,
        count: i64,
        offset: i64,
        origination_account_id: Option<String>,
    ) -> request_model::TransferListRequest {
        request_model::TransferListRequest {
            client: &self,
            start_date,
            end_date,
            count,
            offset,
            origination_account_id,
        }
    }
    /**List bank transfers

Use the `/bank_transfer/list` endpoint to see a list of all your bank transfers and their statuses. Results are paginated; use the `count` and `offset` query parameters to retrieve the desired bank transfers.


See endpoint docs at <https://plaid.com/docs/bank-transfers/reference#bank_transferlist>.*/
    pub fn bank_transfer_list(
        &self,
        start_date: Option<String>,
        end_date: Option<String>,
        count: i64,
        offset: i64,
        origination_account_id: Option<String>,
        direction: Option<String>,
    ) -> request_model::BankTransferListRequest {
        request_model::BankTransferListRequest {
            client: &self,
            start_date,
            end_date,
            count,
            offset,
            origination_account_id,
            direction,
        }
    }
    /**Cancel a transfer

Use the `/transfer/cancel` endpoint to cancel a transfer.  A transfer is eligible for cancelation if the `cancellable` property returned by `/transfer/get` is `true`.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transfercancel>.*/
    pub fn transfer_cancel(
        &self,
        transfer_id: String,
    ) -> request_model::TransferCancelRequest {
        request_model::TransferCancelRequest {
            client: &self,
            transfer_id,
        }
    }
    /**Cancel a bank transfer

Use the `/bank_transfer/cancel` endpoint to cancel a bank transfer.  A transfer is eligible for cancelation if the `cancellable` property returned by `/bank_transfer/get` is `true`.

See endpoint docs at <https://plaid.com/docs/bank-transfers/reference#bank_transfercancel>.*/
    pub fn bank_transfer_cancel(
        &self,
        bank_transfer_id: String,
    ) -> request_model::BankTransferCancelRequest {
        request_model::BankTransferCancelRequest {
            client: &self,
            bank_transfer_id,
        }
    }
    /**List transfer events

Use the `/transfer/event/list` endpoint to get a list of transfer events based on specified filter criteria.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transfereventlist>.*/
    pub fn transfer_event_list(
        &self,
        start_date: Option<String>,
        end_date: Option<String>,
        transfer_id: Option<String>,
        account_id: Option<String>,
        transfer_type: Option<String>,
        event_types: Vec<TransferEventType>,
        sweep_id: String,
        count: Option<i64>,
        offset: Option<i64>,
        origination_account_id: Option<String>,
    ) -> request_model::TransferEventListRequest {
        request_model::TransferEventListRequest {
            client: &self,
            start_date,
            end_date,
            transfer_id,
            account_id,
            transfer_type,
            event_types,
            sweep_id,
            count,
            offset,
            origination_account_id,
        }
    }
    /**List bank transfer events

Use the `/bank_transfer/event/list` endpoint to get a list of bank transfer events based on specified filter criteria.

See endpoint docs at <https://plaid.com/docs/bank-transfers/reference#bank_transfereventlist>.*/
    pub fn bank_transfer_event_list(
        &self,
        start_date: Option<String>,
        end_date: Option<String>,
        bank_transfer_id: Option<String>,
        account_id: Option<String>,
        bank_transfer_type: Option<String>,
        event_types: Vec<BankTransferEventType>,
        count: Option<i64>,
        offset: Option<i64>,
        origination_account_id: Option<String>,
        direction: Option<String>,
    ) -> request_model::BankTransferEventListRequest {
        request_model::BankTransferEventListRequest {
            client: &self,
            start_date,
            end_date,
            bank_transfer_id,
            account_id,
            bank_transfer_type,
            event_types,
            count,
            offset,
            origination_account_id,
            direction,
        }
    }
    /**Sync transfer events

`/transfer/event/sync` allows you to request up to the next 25 transfer events that happened after a specific `event_id`. Use the `/transfer/event/sync` endpoint to guarantee you have seen all transfer events.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transfereventsync>.*/
    pub fn transfer_event_sync(
        &self,
        after_id: i64,
        count: Option<i64>,
    ) -> request_model::TransferEventSyncRequest {
        request_model::TransferEventSyncRequest {
            client: &self,
            after_id,
            count,
        }
    }
    /**Sync bank transfer events

`/bank_transfer/event/sync` allows you to request up to the next 25 bank transfer events that happened after a specific `event_id`. Use the `/bank_transfer/event/sync` endpoint to guarantee you have seen all bank transfer events.

See endpoint docs at <https://plaid.com/docs/bank-transfers/reference#bank_transfereventsync>.*/
    pub fn bank_transfer_event_sync(
        &self,
        after_id: i64,
        count: Option<i64>,
    ) -> request_model::BankTransferEventSyncRequest {
        request_model::BankTransferEventSyncRequest {
            client: &self,
            after_id,
            count,
        }
    }
    /**Retrieve a sweep

The `/transfer/sweep/get` endpoint fetches a sweep corresponding to the given `sweep_id`.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transfersweepget>.*/
    pub fn transfer_sweep_get(
        &self,
        sweep_id: String,
    ) -> request_model::TransferSweepGetRequest {
        request_model::TransferSweepGetRequest {
            client: &self,
            sweep_id,
        }
    }
    /**Retrieve a sweep

The `/bank_transfer/sweep/get` endpoint fetches information about the sweep corresponding to the given `sweep_id`.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#bank_transfersweepget>.*/
    pub fn bank_transfer_sweep_get(
        &self,
        sweep_id: String,
    ) -> request_model::BankTransferSweepGetRequest {
        request_model::BankTransferSweepGetRequest {
            client: &self,
            sweep_id,
        }
    }
    /**List sweeps

The `/transfer/sweep/list` endpoint fetches sweeps matching the given filters.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transfersweeplist>.*/
    pub fn transfer_sweep_list(
        &self,
        start_date: Option<String>,
        end_date: Option<String>,
        count: Option<i64>,
        offset: i64,
    ) -> request_model::TransferSweepListRequest {
        request_model::TransferSweepListRequest {
            client: &self,
            start_date,
            end_date,
            count,
            offset,
        }
    }
    /**List sweeps

The `/bank_transfer/sweep/list` endpoint fetches information about the sweeps matching the given filters.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#bank_transfersweeplist>.*/
    pub fn bank_transfer_sweep_list(
        &self,
        origination_account_id: Option<String>,
        start_time: Option<String>,
        end_time: Option<String>,
        count: Option<i64>,
    ) -> request_model::BankTransferSweepListRequest {
        request_model::BankTransferSweepListRequest {
            client: &self,
            origination_account_id,
            start_time,
            end_time,
            count,
        }
    }
    /**Get balance of your Bank Transfer account

Use the `/bank_transfer/balance/get` endpoint to see the available balance in your bank transfer account. Debit transfers increase this balance once their status is posted. Credit transfers decrease this balance when they are created.

The transactable balance shows the amount in your account that you are able to use for transfers, and is essentially your available balance minus your minimum balance.

Note that this endpoint can only be used with FBO accounts, when using Bank Transfers in the Full Service configuration. It cannot be used on your own account when using Bank Transfers in the BTS Platform configuration.

See endpoint docs at <https://plaid.com/docs/bank-transfers/reference#bank_transferbalanceget>.*/
    pub fn bank_transfer_balance_get(
        &self,
        origination_account_id: Option<String>,
    ) -> request_model::BankTransferBalanceGetRequest {
        request_model::BankTransferBalanceGetRequest {
            client: &self,
            origination_account_id,
        }
    }
    /**Migrate account into Bank Transfers

As an alternative to adding Items via Link, you can also use the `/bank_transfer/migrate_account` endpoint to migrate known account and routing numbers to Plaid Items.  Note that Items created in this way are not compatible with endpoints for other products, such as `/accounts/balance/get`, and can only be used with Bank Transfer endpoints.  If you require access to other endpoints, create the Item through Link instead.  Access to `/bank_transfer/migrate_account` is not enabled by default; to obtain access, contact your Plaid Account Manager.

See endpoint docs at <https://plaid.com/docs/bank-transfers/reference#bank_transfermigrate_account>.*/
    pub fn bank_transfer_migrate_account(
        &self,
        account_number: String,
        routing_number: String,
        wire_routing_number: String,
        account_type: String,
    ) -> request_model::BankTransferMigrateAccountRequest {
        request_model::BankTransferMigrateAccountRequest {
            client: &self,
            account_number,
            routing_number,
            wire_routing_number,
            account_type,
        }
    }
    /**Migrate account into Transfers

As an alternative to adding Items via Link, you can also use the `/transfer/migrate_account` endpoint to migrate known account and routing numbers to Plaid Items.  Note that Items created in this way are not compatible with endpoints for other products, such as `/accounts/balance/get`, and can only be used with Transfer endpoints.  If you require access to other endpoints, create the Item through Link instead.  Access to `/transfer/migrate_account` is not enabled by default; to obtain access, contact your Plaid Account Manager.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transfermigrate_account>.*/
    pub fn transfer_migrate_account(
        &self,
        account_number: String,
        routing_number: String,
        wire_routing_number: String,
        account_type: String,
    ) -> request_model::TransferMigrateAccountRequest {
        request_model::TransferMigrateAccountRequest {
            client: &self,
            account_number,
            routing_number,
            wire_routing_number,
            account_type,
        }
    }
    /**Create a transfer intent object to invoke the Transfer UI

Use the `/transfer/intent/create` endpoint to generate a transfer intent object and invoke the Transfer UI.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transferintentcreate>.*/
    pub fn transfer_intent_create(
        &self,
        account_id: Option<String>,
        mode: String,
        amount: String,
        description: String,
        ach_class: String,
        origination_account_id: Option<String>,
        user: serde_json::Value,
        metadata: Option<serde_json::Value>,
        iso_currency_code: String,
        require_guarantee: Option<bool>,
    ) -> request_model::TransferIntentCreateRequest {
        request_model::TransferIntentCreateRequest {
            client: &self,
            account_id,
            mode,
            amount,
            description,
            ach_class,
            origination_account_id,
            user,
            metadata,
            iso_currency_code,
            require_guarantee,
        }
    }
    /**Retrieve more information about a transfer intent

Use the `/transfer/intent/get` endpoint to retrieve more information about a transfer intent.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transferintentget>.*/
    pub fn transfer_intent_get(
        &self,
        transfer_intent_id: String,
    ) -> request_model::TransferIntentGetRequest {
        request_model::TransferIntentGetRequest {
            client: &self,
            transfer_intent_id,
        }
    }
    /**Lists historical repayments

The `/transfer/repayment/list` endpoint fetches repayments matching the given filters. Repayments are returned in reverse-chronological order (most recent first) starting at the given `start_time`.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transferrepaymentlist>.*/
    pub fn transfer_repayment_list(
        &self,
        start_date: Option<String>,
        end_date: Option<String>,
        count: Option<i64>,
        offset: i64,
    ) -> request_model::TransferRepaymentListRequest {
        request_model::TransferRepaymentListRequest {
            client: &self,
            start_date,
            end_date,
            count,
            offset,
        }
    }
    /**List the returns included in a repayment

The `/transfer/repayment/return/list` endpoint retrieves the set of returns that were batched together into the specified repayment. The sum of amounts of returns retrieved by this request equals the amount of the repayment.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#transferrepaymentreturnlist>.*/
    pub fn transfer_repayment_return_list(
        &self,
        repayment_id: String,
        count: Option<i64>,
        offset: i64,
    ) -> request_model::TransferRepaymentReturnListRequest {
        request_model::TransferRepaymentReturnListRequest {
            client: &self,
            repayment_id,
            count,
            offset,
        }
    }
    /**Simulate a bank transfer event in Sandbox

Use the `/sandbox/bank_transfer/simulate` endpoint to simulate a bank transfer event in the Sandbox environment.  Note that while an event will be simulated and will appear when using endpoints such as `/bank_transfer/event/sync` or `/bank_transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox.

See endpoint docs at <https://plaid.com/docs/bank-transfers/reference/#sandboxbank_transfersimulate>.*/
    pub fn sandbox_bank_transfer_simulate(
        &self,
        bank_transfer_id: String,
        event_type: String,
        failure_reason: Option<serde_json::Value>,
    ) -> request_model::SandboxBankTransferSimulateRequest {
        request_model::SandboxBankTransferSimulateRequest {
            client: &self,
            bank_transfer_id,
            event_type,
            failure_reason,
        }
    }
    /**Simulate creating a sweep

Use the `/sandbox/transfer/sweep/simulate` endpoint to create a sweep and associated events in the Sandbox environment. Upon calling this endpoint, all `posted` or `pending` transfers with a sweep status of `unswept` will become `swept`, and all `returned` transfers with a sweep status of `swept` will become `return_swept`.

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxtransfersweepsimulate>.*/
    pub fn sandbox_transfer_sweep_simulate(
        &self,
    ) -> request_model::SandboxTransferSweepSimulateRequest {
        request_model::SandboxTransferSweepSimulateRequest {
            client: &self,
        }
    }
    /**Simulate a transfer event in Sandbox

Use the `/sandbox/transfer/simulate` endpoint to simulate a transfer event in the Sandbox environment.  Note that while an event will be simulated and will appear when using endpoints such as `/transfer/event/sync` or `/transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox.

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxtransfersimulate>.*/
    pub fn sandbox_transfer_simulate(
        &self,
        transfer_id: String,
        event_type: String,
        failure_reason: Option<serde_json::Value>,
    ) -> request_model::SandboxTransferSimulateRequest {
        request_model::SandboxTransferSimulateRequest {
            client: &self,
            transfer_id,
            event_type,
            failure_reason,
        }
    }
    /**Trigger the creation of a repayment

Use the `/sandbox/transfer/repayment/simulate` endpoint to trigger the creation of a repayment. As a side effect of calling this route, a repayment is created that includes all unreimbursed returns of guaranteed transfers. If there are no such returns, an 400 error is returned.

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxtransferrepaymentsimulate>.*/
    pub fn sandbox_transfer_repayment_simulate(
        &self,
    ) -> request_model::SandboxTransferRepaymentSimulateRequest {
        request_model::SandboxTransferRepaymentSimulateRequest {
            client: &self,
        }
    }
    /**Manually fire a Transfer webhook

Use the `/sandbox/transfer/fire_webhook` endpoint to manually trigger a Transfer webhook in the Sandbox environment.

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxtransferfire_webhook>.*/
    pub fn sandbox_transfer_fire_webhook(
        &self,
        webhook: String,
    ) -> request_model::SandboxTransferFireWebhookRequest {
        request_model::SandboxTransferFireWebhookRequest {
            client: &self,
            webhook,
        }
    }
    /**Search employer database

`/employers/search` allows you the ability to search Plaid’s database of known employers, for use with Deposit Switch. You can use this endpoint to look up a user's employer in order to confirm that they are supported. Users with non-supported employers can then be routed out of the Deposit Switch flow.

The data in the employer database is currently limited. As the Deposit Switch and Income products progress through their respective beta periods, more employers are being regularly added. Because the employer database is frequently updated, we recommend that you do not cache or store data from this endpoint for more than a day.

See endpoint docs at <https://plaid.com/docs/api/employers/#employerssearch>.*/
    pub fn employers_search(
        &self,
        query: String,
        products: Vec<String>,
    ) -> request_model::EmployersSearchRequest {
        request_model::EmployersSearchRequest {
            client: &self,
            query,
            products,
        }
    }
    /**(Deprecated) Create an income verification instance

`/income/verification/create` begins the income verification process by returning an `income_verification_id`. You can then provide the `income_verification_id` to `/link/token/create` under the `income_verification` parameter in order to create a Link instance that will prompt the user to go through the income verification flow. Plaid will fire an `INCOME` webhook once the user completes the Payroll Income flow, or when the uploaded documents in the Document Income flow have finished processing.

See endpoint docs at <https://plaid.com/docs/api/products/income/#incomeverificationcreate>.*/
    pub fn income_verification_create(
        &self,
        webhook: String,
        precheck_id: String,
        options: serde_json::Value,
    ) -> request_model::IncomeVerificationCreateRequest {
        request_model::IncomeVerificationCreateRequest {
            client: &self,
            webhook,
            precheck_id,
            options,
        }
    }
    /**(Deprecated) Retrieve information from the paystubs used for income verification

`/income/verification/paystubs/get` returns the information collected from the paystubs that were used to verify an end user's income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error.

This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead.

See endpoint docs at <https://plaid.com/docs/api/products/income/#incomeverificationpaystubsget>.*/
    pub fn income_verification_paystubs_get(
        &self,
        income_verification_id: Option<String>,
        access_token: Option<String>,
    ) -> request_model::IncomeVerificationPaystubsGetRequest {
        request_model::IncomeVerificationPaystubsGetRequest {
            client: &self,
            income_verification_id,
            access_token,
        }
    }
    /**(Deprecated) Refresh an income verification

`/income/verification/refresh` refreshes a given income verification.

See endpoint docs at <https://plaid.com/docs/api/products/income/#incomeverificationrefresh>.*/
    pub fn income_verification_refresh(
        &self,
        income_verification_id: Option<String>,
        access_token: Option<String>,
    ) -> request_model::IncomeVerificationRefreshRequest {
        request_model::IncomeVerificationRefreshRequest {
            client: &self,
            income_verification_id,
            access_token,
        }
    }
    /**(Deprecated) Retrieve information from the tax documents used for income verification

`/income/verification/taxforms/get` returns the information collected from forms that were used to verify an end user''s income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error.

This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead.

See endpoint docs at <https://plaid.com/docs/api/products/income/#incomeverificationtaxformsget>.*/
    pub fn income_verification_taxforms_get(
        &self,
        income_verification_id: Option<String>,
        access_token: Option<String>,
    ) -> request_model::IncomeVerificationTaxformsGetRequest {
        request_model::IncomeVerificationTaxformsGetRequest {
            client: &self,
            income_verification_id,
            access_token,
        }
    }
    /**(Deprecated) Check digital income verification eligibility and optimize conversion

`/income/verification/precheck` is an optional endpoint that can be called before initializing a Link session for income verification. It evaluates whether a given user is supportable by digital income verification and returns a `precheck_id` that can be provided to `/link/token/create`. If the user is eligible for digital verification, providing the `precheck_id` in this way will generate a Link UI optimized for the end user and their specific employer. If the user cannot be confirmed as eligible, the `precheck_id` can still be provided to `/link/token/create` and the user can still use the income verification flow, but they may be required to manually upload a paystub to verify their income.

While all request fields are optional, providing either `employer` or `transactions_access_tokens` data will increase the chance of receiving a useful result.

This endpoint has been deprecated; new integrations should use `/credit/payroll_income/precheck` instead.

See endpoint docs at <https://plaid.com/docs/api/products/income/#incomeverificationprecheck>.*/
    pub fn income_verification_precheck(
        &self,
        user: Option<serde_json::Value>,
        employer: Option<serde_json::Value>,
        transactions_access_token: serde_json::Value,
        transactions_access_tokens: Vec<AccessToken>,
        us_military_info: Option<serde_json::Value>,
    ) -> request_model::IncomeVerificationPrecheckRequest {
        request_model::IncomeVerificationPrecheckRequest {
            client: &self,
            user,
            employer,
            transactions_access_token,
            transactions_access_tokens,
            us_military_info,
        }
    }
    /**(Deprecated) Retrieve a summary of an individual's employment information

`/employment/verification/get` returns a list of employments through a user payroll that was verified by an end user.

This endpoint has been deprecated; new integrations should use `/credit/employment/get` instead.

See endpoint docs at <https://plaid.com/docs/api/products/income/#employmentverificationget>.*/
    pub fn employment_verification_get(
        &self,
        access_token: String,
    ) -> request_model::EmploymentVerificationGetRequest {
        request_model::EmploymentVerificationGetRequest {
            client: &self,
            access_token,
        }
    }
    /**Create a deposit switch without using Plaid Exchange

This endpoint provides an alternative to `/deposit_switch/create` for customers who have not yet fully integrated with Plaid Exchange. Like `/deposit_switch/create`, it creates a deposit switch entity that will be persisted throughout the lifecycle of the switch.

See endpoint docs at <https://plaid.com/docs/deposit-switch/reference#deposit_switchaltcreate>.*/
    pub fn deposit_switch_alt_create(
        &self,
        target_account: serde_json::Value,
        target_user: serde_json::Value,
        options: serde_json::Value,
        country_code: Option<String>,
    ) -> request_model::DepositSwitchAltCreateRequest {
        request_model::DepositSwitchAltCreateRequest {
            client: &self,
            target_account,
            target_user,
            options,
            country_code,
        }
    }
    /**Create Asset or Income Report Audit Copy Token

Plaid can provide an Audit Copy token of an Asset Report and/or Income Report directly to a participating third party on your behalf. For example, Plaid can supply an Audit Copy token directly to Fannie Mae on your behalf if you participate in the Day 1 Certainty™ program. An Audit Copy token contains the same underlying data as the Asset Report and/or Income Report (result of /credit/payroll_income/get).

To grant access to an Audit Copy token, use the `/credit/audit_copy_token/create` endpoint to create an `audit_copy_token` and then pass that token to the third party who needs access. Each third party has its own `auditor_id`, for example `fannie_mae`. You’ll need to create a separate Audit Copy for each third party to whom you want to grant access to the Report.

See endpoint docs at <https://plaid.com/docs/api/products/income/#creditaudit_copy_tokencreate>.*/
    pub fn credit_audit_copy_token_create(
        &self,
        report_tokens: Vec<ReportToken>,
        auditor_id: String,
    ) -> request_model::CreditAuditCopyTokenCreateRequest {
        request_model::CreditAuditCopyTokenCreateRequest {
            client: &self,
            report_tokens,
            auditor_id,
        }
    }
    /**Remove an Audit Copy token

The `/credit/audit_copy_token/remove` endpoint allows you to remove an Audit Copy. Removing an Audit Copy invalidates the `audit_copy_token` associated with it, meaning both you and any third parties holding the token will no longer be able to use it to access Report data. Items associated with the Report data and other Audit Copies of it are not affected and will remain accessible after removing the given Audit Copy.

See endpoint docs at <https://plaid.com/docs/api/products/income/#creditaudit_copy_tokenremove>.*/
    pub fn credit_report_audit_copy_remove(
        &self,
        audit_copy_token: String,
    ) -> request_model::CreditReportAuditCopyRemoveRequest {
        request_model::CreditReportAuditCopyRemoveRequest {
            client: &self,
            audit_copy_token,
        }
    }
    /**Retrieve information from the bank accounts used for income verification

`/credit/bank_income/get` returns the bank income report(s) for a specified user.

See endpoint docs at <https://plaid.com/docs/api/products/income/#creditbank_incomeget>.*/
    pub fn credit_bank_income_get(
        &self,
        user_token: String,
        options: serde_json::Value,
    ) -> request_model::CreditBankIncomeGetRequest {
        request_model::CreditBankIncomeGetRequest {
            client: &self,
            user_token,
            options,
        }
    }
    /**Refresh a user's bank income information

`/credit/bank_income/refresh` refreshes the bank income report data for a specific user.

See endpoint docs at <https://plaid.com/docs/api/products/income/#creditbank_incomerefresh>.*/
    pub fn credit_bank_income_refresh(
        &self,
        user_token: String,
        options: serde_json::Value,
    ) -> request_model::CreditBankIncomeRefreshRequest {
        request_model::CreditBankIncomeRefreshRequest {
            client: &self,
            user_token,
            options,
        }
    }
    /**Retrieve a user's payroll information

This endpoint gets payroll income information for a specific user, either as a result of the user connecting to their payroll provider or uploading a pay related document.

See endpoint docs at <https://plaid.com/docs/api/products/income/#creditpayroll_incomeget>.*/
    pub fn credit_payroll_income_get(
        &self,
        user_token: String,
    ) -> request_model::CreditPayrollIncomeGetRequest {
        request_model::CreditPayrollIncomeGetRequest {
            client: &self,
            user_token,
        }
    }
    /**Check income verification eligibility and optimize conversion

`/credit/payroll_income/precheck` is an optional endpoint that can be called before initializing a Link session for income verification. It evaluates whether a given user is supportable by digital income verification. If the user is eligible for digital verification, that information will be associated with the user token, and in this way will generate a Link UI optimized for the end user and their specific employer. If the user cannot be confirmed as eligible, the user can still use the income verification flow, but they may be required to manually upload a paystub to verify their income.

While all request fields are optional, providing `employer` data will increase the chance of receiving a useful result.

See endpoint docs at <https://plaid.com/docs/api/products/income/#creditpayroll_incomeprecheck>.*/
    pub fn credit_payroll_income_precheck(
        &self,
        user_token: String,
        access_tokens: Vec<AccessToken>,
        employer: Option<serde_json::Value>,
        us_military_info: Option<serde_json::Value>,
    ) -> request_model::CreditPayrollIncomePrecheckRequest {
        request_model::CreditPayrollIncomePrecheckRequest {
            client: &self,
            user_token,
            access_tokens,
            employer,
            us_military_info,
        }
    }
    /**Retrieve a summary of an individual's employment information

`/credit/employment/get` returns a list of items with employment information from a user's payroll provider that was verified by an end user.

See endpoint docs at <https://plaid.com/docs/api/products/income/#creditemploymentget>.*/
    pub fn credit_employment_get(
        &self,
        user_token: String,
    ) -> request_model::CreditEmploymentGetRequest {
        request_model::CreditEmploymentGetRequest {
            client: &self,
            user_token,
        }
    }
    /**Refresh a digital payroll income verification

`/credit/payroll_income/refresh` refreshes a given digital payroll income verification.

See endpoint docs at <https://plaid.com/docs/api/products/income/#creditpayroll_incomerefresh>.*/
    pub fn credit_payroll_income_refresh(
        &self,
        user_token: String,
    ) -> request_model::CreditPayrollIncomeRefreshRequest {
        request_model::CreditPayrollIncomeRefreshRequest {
            client: &self,
            user_token,
        }
    }
    /**Create a `relay_token` to share an Asset Report with a partner client

Plaid can share an Asset Report directly with a participating third party on your behalf. The shared Asset Report is the exact same Asset Report originally created in `/asset_report/create`.

To grant access to an Asset Report to a third party, use the `/credit/relay/create` endpoint to create a `relay_token` and then pass that token to the third party who needs access. Each third party has its own `secondary_client_id`, for example `ce5bd328dcd34123456`. You'll need to create a separate `relay_token` for each third party to whom you want to grant access to the Report.

See endpoint docs at <https://plaid.com/docs/none/>.*/
    pub fn credit_relay_create(
        &self,
        report_tokens: Vec<ReportToken>,
        secondary_client_id: String,
        webhook: Option<String>,
    ) -> request_model::CreditRelayCreateRequest {
        request_model::CreditRelayCreateRequest {
            client: &self,
            report_tokens,
            secondary_client_id,
            webhook,
        }
    }
    /**Retrieve the reports associated with a Relay token that was shared with you

`/credit/relay/get` allows third parties to get a report that was shared with them, using an `relay_token` that was created by the report owner.

See endpoint docs at <https://plaid.com/docs/none/>.*/
    pub fn credit_relay_get(
        &self,
        relay_token: String,
        report_type: String,
    ) -> request_model::CreditRelayGetRequest {
        request_model::CreditRelayGetRequest {
            client: &self,
            relay_token,
            report_type,
        }
    }
    /**Refresh a report of a Relay Token

The `/credit/relay/refresh` endpoint allows third parties to refresh an report that was relayed to them, using a `relay_token` that was created by the report owner. A new report will be created based on the old one, but with the most recent data available.

See endpoint docs at <https://plaid.com/docs/api/products/#creditrelayrefresh>.*/
    pub fn credit_relay_refresh(
        &self,
        relay_token: String,
        report_type: String,
        webhook: Option<String>,
    ) -> request_model::CreditRelayRefreshRequest {
        request_model::CreditRelayRefreshRequest {
            client: &self,
            relay_token,
            report_type,
            webhook,
        }
    }
    /**Remove Credit Relay Token

The `/credit/relay/remove` endpoint allows you to invalidate a `relay_token`, meaning the third party holding the token will no longer be able to use it to access the reports to which the `relay_token` gives access to. The report, items associated with it, and other Relay tokens that provide access to the same report are not affected and will remain accessible after removing the given `relay_token.

See endpoint docs at <https://plaid.com/docs/none/>.*/
    pub fn credit_relay_remove(
        &self,
        relay_token: String,
    ) -> request_model::CreditRelayRemoveRequest {
        request_model::CreditRelayRemoveRequest {
            client: &self,
            relay_token,
        }
    }
    /**Manually fire a Bank Transfer webhook

Use the `/sandbox/bank_transfer/fire_webhook` endpoint to manually trigger a Bank Transfers webhook in the Sandbox environment.

See endpoint docs at <https://plaid.com/docs/bank-transfers/reference/#sandboxbank_transferfire_webhook>.*/
    pub fn sandbox_bank_transfer_fire_webhook(
        &self,
        webhook: String,
    ) -> request_model::SandboxBankTransferFireWebhookRequest {
        request_model::SandboxBankTransferFireWebhookRequest {
            client: &self,
            webhook,
        }
    }
    /**Manually fire an Income webhook

Use the `/sandbox/income/fire_webhook` endpoint to manually trigger an Income webhook in the Sandbox environment.

See endpoint docs at <https://plaid.com/docs/api/sandbox/#sandboxincomefire_webhook>.*/
    pub fn sandbox_income_fire_webhook(
        &self,
        item_id: String,
        user_id: String,
        webhook: String,
        verification_status: String,
    ) -> request_model::SandboxIncomeFireWebhookRequest {
        request_model::SandboxIncomeFireWebhookRequest {
            client: &self,
            item_id,
            user_id,
            webhook,
            verification_status,
        }
    }
    ///Save the selected accounts when connecting to the Platypus Oauth institution
    pub fn sandbox_oauth_select_accounts(
        &self,
        oauth_state_id: String,
        accounts: Vec<String>,
    ) -> request_model::SandboxOauthSelectAccountsRequest {
        request_model::SandboxOauthSelectAccountsRequest {
            client: &self,
            oauth_state_id,
            accounts,
        }
    }
    /**Evaluate a planned ACH transaction

Use `/signal/evaluate` to evaluate a planned ACH transaction to get a return risk assessment (such as a risk score and risk tier) and additional risk signals.

In order to obtain a valid score for an ACH transaction, Plaid must have an access token for the account, and the Item must be healthy (receiving product updates) or have recently been in a healthy state. If the transaction does not meet eligibility requirements, an error will be returned corresponding to the underlying cause. If `/signal/evaluate` is called on the same transaction multiple times within a 24-hour period, cached results may be returned.

See endpoint docs at <https://plaid.com/docs/signal/reference#signalevaluate>.*/
    pub fn signal_evaluate(
        &self,
        access_token: String,
        account_id: String,
        client_transaction_id: String,
        amount: f64,
        user_present: Option<bool>,
        client_user_id: String,
        user: serde_json::Value,
        device: serde_json::Value,
    ) -> request_model::SignalEvaluateRequest {
        request_model::SignalEvaluateRequest {
            client: &self,
            access_token,
            account_id,
            client_transaction_id,
            amount,
            user_present,
            client_user_id,
            user,
            device,
        }
    }
    /**Report whether you initiated an ACH transaction

After calling `/signal/evaluate`, call `/signal/decision/report` to report whether the transaction was initiated. This endpoint will return an `INVALID_REQUEST` error if called a second time with a different value for `initiated`.

See endpoint docs at <https://plaid.com/docs/signal/reference#signaldecisionreport>.*/
    pub fn signal_decision_report(
        &self,
        client_transaction_id: String,
        initiated: bool,
        days_funds_on_hold: Option<i64>,
    ) -> request_model::SignalDecisionReportRequest {
        request_model::SignalDecisionReportRequest {
            client: &self,
            client_transaction_id,
            initiated,
            days_funds_on_hold,
        }
    }
    /**Report a return for an ACH transaction

Call the `/signal/return/report` endpoint to report a returned transaction that was previously sent to the `/signal/evaluate` endpoint. Your feedback will be used by the model to incorporate the latest risk trend in your portfolio.

See endpoint docs at <https://plaid.com/docs/signal/reference#signalreturnreport>.*/
    pub fn signal_return_report(
        &self,
        client_transaction_id: String,
        return_code: String,
    ) -> request_model::SignalReturnReportRequest {
        request_model::SignalReturnReportRequest {
            client: &self,
            client_transaction_id,
            return_code,
        }
    }
    /**Prepare the Signal product before calling `/signal/evaluate`

Call `/signal/prepare` with Plaid-linked bank account information at least 10 seconds before calling `/signal/evaluate` or as soon as an end-user enters the ACH deposit flow in your application.

See endpoint docs at <https://plaid.com/docs/signal/reference#signalprepare>.*/
    pub fn signal_prepare(
        &self,
        access_token: String,
    ) -> request_model::SignalPrepareRequest {
        request_model::SignalPrepareRequest {
            client: &self,
            access_token,
        }
    }
    /**Create an e-wallet

Create an e-wallet. The response is the newly created e-wallet object.

See endpoint docs at <https://plaid.com/docs/api/products/#walletcreate>.*/
    pub fn wallet_create(
        &self,
        iso_currency_code: String,
    ) -> request_model::WalletCreateRequest {
        request_model::WalletCreateRequest {
            client: &self,
            iso_currency_code,
        }
    }
    /**Fetch an e-wallet

Fetch an e-wallet. The response includes the current balance.

See endpoint docs at <https://plaid.com/docs/api/products/#walletget>.*/
    pub fn wallet_get(&self, wallet_id: String) -> request_model::WalletGetRequest {
        request_model::WalletGetRequest {
            client: &self,
            wallet_id,
        }
    }
    /**Fetch a list of e-wallets

This endpoint lists all e-wallets in descending order of creation.

See endpoint docs at <https://plaid.com/docs/api/products/#walletlist>.*/
    pub fn wallet_list(
        &self,
        iso_currency_code: String,
        cursor: String,
        count: i64,
    ) -> request_model::WalletListRequest {
        request_model::WalletListRequest {
            client: &self,
            iso_currency_code,
            cursor,
            count,
        }
    }
    /**Execute a transaction using an e-wallet

Execute a transaction using the specified e-wallet.
Specify the e-wallet to debit from, the counterparty to credit to, the idempotency key to prevent duplicate payouts, the amount and reference for the payout.
The payouts are executed over the Faster Payment rails, where settlement usually only takes a few seconds.

See endpoint docs at <https://plaid.com/docs/api/products/#wallettransactionexecute>.*/
    pub fn wallet_transaction_execute(
        &self,
        idempotency_key: String,
        wallet_id: String,
        counterparty: serde_json::Value,
        amount: serde_json::Value,
        reference: String,
    ) -> request_model::WalletTransactionExecuteRequest {
        request_model::WalletTransactionExecuteRequest {
            client: &self,
            idempotency_key,
            wallet_id,
            counterparty,
            amount,
            reference,
        }
    }
    /**Fetch a specific e-wallet transaction

See endpoint docs at <https://plaid.com/docs/api/products/#wallettransactionget>.*/
    pub fn wallet_transaction_get(
        &self,
        transaction_id: String,
    ) -> request_model::WalletTransactionGetRequest {
        request_model::WalletTransactionGetRequest {
            client: &self,
            transaction_id,
        }
    }
    /**List e-wallet transactions

This endpoint lists the latest transactions of the specified e-wallet. Transactions are returned in descending order by the `created_at` time.

See endpoint docs at <https://plaid.com/docs/api/products/#wallettransactionslist>.*/
    pub fn wallet_transactions_list(
        &self,
        wallet_id: String,
        cursor: String,
        count: i64,
    ) -> request_model::WalletTransactionsListRequest {
        request_model::WalletTransactionsListRequest {
            client: &self,
            wallet_id,
            cursor,
            count,
        }
    }
    /**enhance locally-held transaction data

The '/beta/transactions/v1/enhance' endpoint enriches raw transaction data provided directly by clients.

The product is currently in beta.*/
    pub fn transactions_enhance(
        &self,
        account_type: String,
        transactions: Vec<ClientProvidedRawTransaction>,
    ) -> request_model::TransactionsEnhanceRequest {
        request_model::TransactionsEnhanceRequest {
            client: &self,
            account_type,
            transactions,
        }
    }
    /**Create transaction category rule

The `/transactions/rules/v1/create` endpoint creates transaction categorization rules.

Rules will be applied on the Item's transactions returned in `/transactions/get` response.

The product is currently in beta. To request access, contact transactions-feedback@plaid.com.*/
    pub fn transactions_rules_create(
        &self,
        access_token: String,
        personal_finance_category: String,
        rule_details: serde_json::Value,
    ) -> request_model::TransactionsRulesCreateRequest {
        request_model::TransactionsRulesCreateRequest {
            client: &self,
            access_token,
            personal_finance_category,
            rule_details,
        }
    }
    /**Return a list of rules created for the Item associated with the access token.

The `/transactions/rules/v1/list` returns a list of transaction rules created for the Item associated with the access token.*/
    pub fn transactions_rules_list(
        &self,
        access_token: String,
    ) -> request_model::TransactionsRulesListRequest {
        request_model::TransactionsRulesListRequest {
            client: &self,
            access_token,
        }
    }
    /**Remove transaction rule

The `/transactions/rules/v1/remove` endpoint is used to remove a transaction rule.*/
    pub fn transactions_rules_remove(
        &self,
        access_token: String,
        rule_id: String,
    ) -> request_model::TransactionsRulesRemoveRequest {
        request_model::TransactionsRulesRemoveRequest {
            client: &self,
            access_token,
            rule_id,
        }
    }
    /**Create payment profile

Use `/payment_profile/create` endpoint to create a new payment profile, the return value is a Payment Profile ID. Attach it to the link token create request and the link workflow will then "activate" this Payment Profile if the linkage is successful. It can then be used to create Transfers using `/transfer/authorization/create` and /transfer/create`.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#payment_profilecreate>.*/
    pub fn payment_profile_create(&self) -> request_model::PaymentProfileCreateRequest {
        request_model::PaymentProfileCreateRequest {
            client: &self,
        }
    }
    /**Get payment profile

Use the `/payment_profile/get` endpoint to get the status of a given Payment Profile.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#payment_profileget>.*/
    pub fn payment_profile_get(
        &self,
        payment_profile_id: String,
    ) -> request_model::PaymentProfileGetRequest {
        request_model::PaymentProfileGetRequest {
            client: &self,
            payment_profile_id,
        }
    }
    /**Remove payment profile

Use the `/payment_profile/remove` endpoint to remove a given Payment Profile. Once it’s removed, it can no longer be used to create transfers.

See endpoint docs at <https://plaid.com/docs/api/products/transfer/#payment_profileremove>.*/
    pub fn payment_profile_remove(
        &self,
        payment_profile_id: String,
    ) -> request_model::PaymentProfileRemoveRequest {
        request_model::PaymentProfileRemoveRequest {
            client: &self,
            payment_profile_id,
        }
    }
    /**Creates a new client for a reseller partner end customer.

The `/partner/v1/customers/create` endpoint is used by reseller partners to create an end customer client.*/
    pub fn partner_customers_create(
        &self,
    ) -> request_model::PartnerCustomersCreateRequest {
        request_model::PartnerCustomersCreateRequest {
            client: &self,
        }
    }
}
pub enum PlaidAuthentication {
    ClientId { client_id: String, secret: String, plaid_version: String },
}
impl PlaidAuthentication {
    pub fn from_env() -> Self {
        Self::ClientId {
            client_id: std::env::var("PLAID_CLIENT_ID")
                .expect("Environment variable PLAID_CLIENT_ID is not set."),
            secret: std::env::var("PLAID_SECRET")
                .expect("Environment variable PLAID_SECRET is not set."),
            plaid_version: std::env::var("PLAID_VERSION")
                .expect("Environment variable PLAID_VERSION is not set."),
        }
    }
}