nordlet 0.5.5

Official Rust SDK for the Nordlet Accounting API
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
use crate::api::*;
use crate::{ApiError, ClientConfig, HttpClient, RequestOptions};
use reqwest::Method;

pub struct DeclarationsClient {
    pub http_client: HttpClient,
}

impl DeclarationsClient {
    pub fn new(config: ClientConfig) -> Result<Self, ApiError> {
        Ok(Self {
            http_client: HttpClient::new(config.clone())?,
        })
    }

    /// Builds the Lithuanian Intrastat report of a month for one flow as the IDAIS INTRASTATReportSubmission XML: dispatches from the issued sale invoices and purchase credit notes, arrivals from the registered purchase invoices and sale credit notes, grouped into report items. `transactionNature`, `deliveryTerms`, `transportMode` and `regionCode` are the defaults for lines without their own values; `statisticalValueRequired` adds the statistical value to each item. Answers 422 when the company is not a VAT payer. With `persist`, the file is stored and a submission for `lt-intrastat-arrivals` or `lt-intrastat-dispatches` is created.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_intrastat_compute(
        &self,
        request: &LtIntrastatComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtIntrastatComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/intrastat/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Builds the i.VAZ transport document message (iVAZ1.3.3) for up to 100 issued waybills and returns the XML. Answers 422 when the registration code of the company is not numeric or when a waybill is not issued. With `persist`, the file is stored and a submission for `lt-ivaz` is created.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_ivaz_generate(
        &self,
        request: &LtIvazGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtIvazGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/ivaz/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Checks the Intrastat reporting obligation of a year per flow: the value of goods traded with other Member States in the previous year, the month from which reporting is due (January when that value already passed the reporting threshold, else the month the cumulative value of the year passes it), whether the statistical value is required, and the monthly values. Answers 422 when no thresholds are stored for the year.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_intrastat_obligation(
        &self,
        request: &LtIntrastatObligationDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtIntrastatObligationDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/intrastat/obligation",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Builds the Lithuanian i.SAF register XML of a month: `dataType` F covers both registers, S the issued sale invoices only, P the registered purchase invoices only. Returns the XML without storing it; `declarations/submissions/create` stores it as a submission.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_isaf_generate(
        &self,
        request: &LtIsafGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtIsafGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/isaf/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Computes the fields of the Lithuanian VAT return FR0600 for the period of `months` months starting in `month`, with the breakdown by VAT classifier behind them. `deductionPercent` is the share of input VAT deducted and is written to field 28.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_fr0600_compute(
        &self,
        request: &LtFr0600ComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtFr0600ComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/fr0600/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Computes fields 5 to 7 of the monthly GPM313 from the payroll run of the month the pay was earned: the run of the previous month with `payoutTiming` `next-month`, the run of the same month with `same-month`. `paymentDay` decides whether the withheld tax goes to field 6 (paid by the 15th) or field 7 (after it). Fields 8 to 12 are returned as zero.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_gpm313_compute(
        &self,
        request: &LtGpm313ComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtGpm313ComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/gpm313/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Computes the monthly SAM figures from the payroll run of the month: per employee the insured income, the employee and employer contributions together and the resulting tariff, plus the insured count and the totals. A missing run or a run still in draft is reported in the warnings.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_sam_compute(
        &self,
        request: &LtSamComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtSamComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/sam/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Lists the rows of the 1-SD (employment contracts that start in the date range) or of the 2-SD (contracts that ended in the range, with the final insured income and contributions from the payroll line of the termination month). Answers 422 when `fromDate` is after `toDate`.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_sd_generate(
        &self,
        request: &LtSdGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtSdGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/sd/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Builds the Lithuanian SAF-T (version 2.01) XML for a date range: `dataType` F is the full file, GL, SI, PI, PA, MG and AS limit it to the general ledger, sale invoices, purchase invoices, payments, movements of goods or asset transactions. Answers 422 when `fromDate` is after `toDate`. With `persist`, the file is stored and a submission for `lt-saft` is created.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_saft_generate(
        &self,
        request: &LtSaftGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtSaftGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/saft/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Builds an i.VAZ amendment message for up to 100 issued waybills, carrying their current data as TransportDocumentAmendment elements. Answers 422 when the registration code of the company is not numeric or when a waybill is not issued. With `persist`, the file is stored and a submission for `lt-ivaz-amendment` is created.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_ivaz_amend(
        &self,
        request: &LtIvazAmendDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtIvazAmendDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/ivaz/amend",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Builds an i.VAZ cancellation message for up to 100 waybills, each with a cancellation reason code and optional additional information. Answers 422 when the registration code of the company is not numeric; a waybill that was never issued is reported in the warnings. With `persist`, the file is stored and a submission for `lt-ivaz-cancellation` is created.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_ivaz_cancel(
        &self,
        request: &LtIvazCancelDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtIvazCancelDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/ivaz/cancel",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Computes the rows of the Lithuanian FR0564 report of a month from the issued sale invoices and credit notes with the `intra_eu_b2b` or `reverse_charge` scheme: one row per buyer VAT number of another Member State, with goods and services split by the type of the catalogue item. Invoices not in EUR and buyers without a valid EU VAT number are left out and named in the warnings; the triangular column is always zero.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_fr0564_compute(
        &self,
        request: &LtFr0564ComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtFr0564ComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/fr0564/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Computes the rows of the annual GPM312 from the payroll runs of the payout months of the year (December of the previous year to November with `payoutTiming` `next-month`, January to December with `same-month`): one row per employee and payment type code, with the amount paid, the tax withheld and the rate applied.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_gpm312_compute(
        &self,
        request: &LtGpm312ComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtGpm312ComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/gpm312/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Computes the boxes of the Lithuanian annual corporate income tax return PLN204 for the fiscal year from the financial statements and the tax adjustments recorded with `declarations/tax-adjustments/create`: the PLN204S annex from the `non_deductible` adjustments and the PLN204Z annex from the `non_taxable_income` ones, by their `code`. The small-entity rate is applied when the size criteria allow it. Answers 422 when such an adjustment has no code or a code the annex does not list, or when no rate table covers the period.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_pln204_compute(
        &self,
        request: &LtPln204ComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtPln204ComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/pln204/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Computes the Union OSS return of a quarter from the issued invoices and credit notes with the `oss_union` VAT scheme: one row per Member State of consumption and VAT rate, classified as standard or reduced, and a corrections section for the credit notes that credit invoices of earlier periods. Amounts are in EUR, converted at the official rate of the last day of the period. Answers 422 when the company is not established in the EU.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_oss_compute(
        &self,
        request: &EuOssComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuOssComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/oss/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Computes the IOSS return of a month from the issued invoices and credit notes with the `ioss` VAT scheme, with the same rows, corrections and EUR conversion as `declarations/eu/oss/compute`. Answers 422 when the company is not established in the EU.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_ioss_compute(
        &self,
        request: &EuIossComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuIossComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/ioss/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Builds the monthly return of the special scheme for transfers of own goods from the warehouse transfers between warehouses in two different EU Member States: one row per destination and dispatch country with the cost of the goods as the taxable amount in EUR, the transfers behind the rows, and the due date. Answers 422 when the company is not established in the EU.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_own_goods_transfers_compute(
        &self,
        request: &EuOwnGoodsTransfersComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuOwnGoodsTransfersComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/own-goods-transfers/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Lists the transactions of a date range that fall under EU digital reporting: issued sale invoices and credit notes with the `intra_eu_b2b` or `reverse_charge` scheme to EU customers, and registered purchase invoices from suppliers in other Member States whose lines carry a self-assessed VAT classifier. Each transaction names the article it is reported under, the Member State it is reported to, its deadline and the data still missing. Answers 422 when the company is not identified for VAT in the EU.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_digital_reporting_list(
        &self,
        request: &EuDigitalReportingListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuDigitalReportingListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/digital-reporting/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Which platform sellers are reportable for the year (Council Directive (EU) 2021/514, Annex V) and why the others are excluded, the data still missing, and how the company files the report in its Member State.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_dac7_preview(
        &self,
        request: &EuDac7PreviewDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuDac7PreviewDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/dac7/preview",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Builds the DAC7 (DPI) XML report of a year for the Member State of the company and returns it base64-encoded with the file name the administration expects. Answers 422 when no DAC7 filing channel exists for the company country. The sellers and the missing data behind it come from `declarations/eu/dac7/preview`.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_dac7_xml(
        &self,
        request: &EuDac7XmlDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuDac7XmlDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/dac7/xml",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Sums the cross-border sales to EU consumers (invoices under the `oss_union` scheme, and domestic-scheme invoices to partners without a VAT number in another Member State) of the current and the preceding calendar year as of `date` (default: the current date of the company) and compares both with the EUR 10 000 distance sales threshold.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_distance_sales_threshold_get(
        &self,
        request: &EuDistanceSalesThresholdGetDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuDistanceSalesThresholdGetDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/distance-sales-threshold/get",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Sums the turnover of the company within the Union (issued invoices and credit notes other than export and out-of-scope supplies) for the current and the previous calendar year as of `date` (default: the current date of the company) and compares it with the EUR 100 000 cap of the cross-border SME scheme. The status is `not_applicable` for a registered VAT payer, otherwise `below`, `approaching` or `exceeded`.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_union_turnover_get(
        &self,
        request: &EuUnionTurnoverGetDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuUnionTurnoverGetDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/union-turnover/get",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Builds the quarterly report of the cross-border SME scheme: the value of the issued supplies within the Union per Member State of supply (the VAT country of the invoice, else the country of the partner, else the home country), in the base currency of the company. Supplies that resolve to a non-EU country are left out and named in the warnings.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_sme_cross_border_report_compute(
        &self,
        request: &EuSmeCrossBorderReportComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuSmeCrossBorderReportComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/sme-cross-border-report/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Returns the stored table of national SME VAT exemption thresholds per Member State, with sector thresholds and intra-EU acquisition triggers where recorded, and the national and Union-wide caps of the directive. No company data is read.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_sme_thresholds_list(
        &self,
        request: &EuSmeThresholdsListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuSmeThresholdsListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/sme-thresholds/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Compares the gross turnover of the company in the current calendar year as of `date` (default: the current date of the company) with the national SME exemption threshold of its country. The status is `not_applicable` for a registered VAT payer, `unknown` when no threshold is on file or its currency differs from the base currency, otherwise `below`, `approaching` or `exceeded`; when the country has an intra-EU acquisitions trigger, the acquisitions from and services to other Member States are compared with it too.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_sme_threshold_get(
        &self,
        request: &EuSmeThresholdGetDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuSmeThresholdGetDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/sme-threshold/get",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Lists the national VAT return forms Nordlet can compute, with the country, form key, form name, filing frequency and source.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_vat_return_packs_list(
        &self,
        request: &EuVatReturnPacksListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuVatReturnPacksListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/vat-return/packs/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Computes the national VAT return of `countryCode` for the period of `months` months starting in `month`, as the numbered boxes of the form with labels and amounts. Answers 422 when no return pack is registered for the country; the packs are listed by `declarations/eu/vat-return/packs/list`.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn eu_vat_return_compute(
        &self,
        request: &EuVatReturnComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EuVatReturnComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/eu/vat-return/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Generate the Polish JPK_V7M(3) file (VAT declaration with evidence) for a month, per the MF schema in force since February 2026. Amounts must already be in PLN; rows are marked BFK until a KSeF integration supplies invoice numbers. Review the warnings before submitting via e-dokumenty.mf.gov.pl.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_jpk_v7m_generate(
        &self,
        request: &PlJpkV7MGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlJpkV7MGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/jpk-v7m/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the rows of the Polish recapitulative statement VAT-UE for a month: section C intra-Community supplies of goods, section D intra-Community acquisitions, section E services taxed where the customer is established. Amounts are full złoty per counterparty. The VAT-UE(5) file itself goes out from the EU sales list deadline in the calendar.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_vat_ue_generate(
        &self,
        request: &PlVatUeGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlVatUeGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/vat-ue/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the rows of the Polish INTRASTAT declaration for a month, arrivals or dispatches, grouped by CN code, partner country, country of origin, partner VAT number, nature of transaction, transport and delivery terms. Values are whole złoty converted at the invoice rate; credit notes with goods lines are returns (code 21). Goods without a CN code are left out and named in the warnings. The IST message itself goes out from the Intrastat deadline in the calendar.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_intrastat_generate(
        &self,
        request: &PlIntrastatGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlIntrastatGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/intrastat/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// List the invoices KSeF holds for this company as the buyer, for a window of acquisition timestamps. Each row carries the KSeF number and, when the document number matches a registered purchase invoice, the invoice it belongs to.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_ksef_received_list(
        &self,
        request: &PlKsefReceivedListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlKsefReceivedListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/ksef/received/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Read one invoice out of KSeF by its national number. With a purchase invoice given, the KSeF number is written onto that invoice, which is what makes the purchase row of JPK_V7M carry NrKSeF instead of the BFK marker.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_ksef_received_fetch(
        &self,
        request: &PlKsefReceivedFetchDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlKsefReceivedFetchDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/ksef/received/fetch",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// The UPO for a KSeF session. KSeF issues one receipt per session rather than per invoice, so the session reference number from the send is what identifies it.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_ksef_receipt(
        &self,
        request: &PlKsefReceiptDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlKsefReceiptDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/ksef/receipt",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// The differences between the accounting result and the taxable profit: non-deductible expenses, income added to or left out of the tax base, extra deductible expenses, donations, losses carried forward, reliefs and tax credits. The annual corporate income tax return is built from them.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn tax_adjustments_list(
        &self,
        request: &TaxAdjustmentsListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<TaxAdjustmentsListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/tax-adjustments/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Records a tax adjustment of one kind for a tax year, with an optional form `code`. Answers 422 when the amount is zero.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn tax_adjustments_create(
        &self,
        request: &TaxAdjustmentsCreateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<TaxAdjustmentsCreateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/tax-adjustments/create",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Changes the kind, code, amount or description of a recorded tax adjustment; fields left out keep their value and an empty `code` clears it. Answers 422 when the new amount is zero.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn tax_adjustments_update(
        &self,
        request: &TaxAdjustmentsUpdateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<TaxAdjustmentsUpdateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/tax-adjustments/update",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Deletes a recorded tax adjustment.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn tax_adjustments_delete(
        &self,
        request: &TaxAdjustmentsDeleteDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<TaxAdjustmentsDeleteDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/tax-adjustments/delete",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// What the company has paid the administration towards a tax before the return is filed: payments on account, tax withheld at source by others, a final settlement, and a refund received. Returns report these on their own lines, so the amount they ask for is the balance.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn tax_payments_list(
        &self,
        request: &TaxPaymentsListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<TaxPaymentsListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/tax-payments/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Records a payment made towards a tax (`tax`) of a year, and of a month when given, as an advance payment, tax withheld by others, a final settlement or a refund received. Answers 422 when the amount is zero.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn tax_payments_create(
        &self,
        request: &TaxPaymentsCreateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<TaxPaymentsCreateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/tax-payments/create",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Changes the kind, amount, payment date, reference or description of a recorded tax payment; fields left out keep their value and an empty `reference` clears it. Answers 422 when the new amount is zero.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn tax_payments_update(
        &self,
        request: &TaxPaymentsUpdateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<TaxPaymentsUpdateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/tax-payments/update",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Deletes a recorded tax payment.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn tax_payments_delete(
        &self,
        request: &TaxPaymentsDeleteDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<TaxPaymentsDeleteDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/tax-payments/delete",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Whether the general meeting adopted the annual accounts and on which date, the date the accounts were prepared, and which directors signed them. The annual accounts filed with the trade register are built from these facts.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_get(
        &self,
        request: &AnnualAccountsGetDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsGetDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/get",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Creates or replaces the record of a year: whether and when the accounts were adopted, when they were prepared, whether they were audited (with the qualification flag and the auditor report date) or the auditor was not elected, the report texts and the appropriation of the result. Answers 422 when `adopted` is true without `adoptionDate`, when the adoption date is not after 31 December of the year, or when the date of preparation is after the adoption date.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_set(
        &self,
        request: &AnnualAccountsSetDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsSetDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/set",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Adds a director to the signatures of the annual accounts of the year: signed, with the date and place of signature, or not signed, with the reason. Answers 422 when no annual accounts record exists for the year (`declarations/annual-accounts/set` first), when a signed entry lacks the date or the place, or when an unsigned entry lacks the reason.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_signatures_create(
        &self,
        request: &AnnualAccountsSignaturesCreateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsSignaturesCreateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/signatures/create",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Replaces the name, type and signing facts of a recorded director signature. Answers 422 when a signed entry lacks the date or the place of signature, or when an unsigned entry lacks the reason.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_signatures_update(
        &self,
        request: &AnnualAccountsSignaturesUpdateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsSignaturesUpdateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/signatures/update",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Deletes a recorded director signature.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_signatures_delete(
        &self,
        request: &AnnualAccountsSignaturesDeleteDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsSignaturesDeleteDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/signatures/delete",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Adds a profit distribution decision (decision date, kind, amount, description) to the annual accounts record of the year. Answers 422 when no annual accounts record exists for the year.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_distributions_create(
        &self,
        request: &AnnualAccountsDistributionsCreateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsDistributionsCreateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/distributions/create",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Replaces the decision date, kind, amount and description of a recorded profit distribution.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_distributions_update(
        &self,
        request: &AnnualAccountsDistributionsUpdateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsDistributionsUpdateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/distributions/update",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Deletes a recorded profit distribution.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_distributions_delete(
        &self,
        request: &AnnualAccountsDistributionsDeleteDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsDistributionsDeleteDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/distributions/delete",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Links a file uploaded through files/upload (its storageKey) to the annual accounts of the year as the notes, the management report, the auditor statement, the profit appropriation resolution, the approval certificate, the general data sheet, the full report as a pdf, or another document. Deposits that must carry these documents take them from here.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_attachments_add(
        &self,
        request: &AnnualAccountsAttachmentsAddDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsAttachmentsAddDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/attachments/add",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Removes the attachment from the annual accounts and deletes its file record and the stored bytes.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn annual_accounts_attachments_delete(
        &self,
        request: &AnnualAccountsAttachmentsDeleteDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AnnualAccountsAttachmentsDeleteDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/annual-accounts/attachments/delete",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Compute the company income tax return TD4 of a tax year from the ledger and the recorded tax adjustments: the accounting profit, the add-backs, deductions, capital allowances and losses brought forward, the chargeable income, the corporation tax at the rate of the year and the double tax relief, as the fields the company keys into TAXISnet or Tax For All. The Tax Department publishes no upload layout for the TD4; the XML is a working file.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn cy_td4_generate(
        &self,
        request: &CyTd4GenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<CyTd4GenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/cy/td4/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the annual return HE32 of a year: the figures the Registrar’s e-filing screens ask for (company number, registered office, made-up-to date, share capital, register of members, directors and secretary, annual general meeting date, the accounts summary), the working file, and the printed form HE32(I) filled in as a PDF for signing and for keying into the Registrar’s system, which takes the return only through its own screens.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn cy_he32_generate(
        &self,
        request: &CyHe32GenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<CyHe32GenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/cy/he32/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build one of the German returns that ELSTER accepts only through a licensed ERiC transmission (E-Bilanz, Körperschaftsteuer, Gewerbesteuer with its Zerlegungserklärung, annual VAT return, Lohnsteuer-Anmeldung, Lohnsteuerbescheinigung) for the company to send through its own ELSTER-capable program. The period is the year, or YYYY-MM for the monthly Lohnsteuer-Anmeldung.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn de_returns_generate(
        &self,
        request: &DeReturnsGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<DeReturnsGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/de/returns/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// The facts of one year that the German annual returns (Körperschaftsteuer, Gewerbesteuer, Umsatzsteuererklärung) need and the ledger does not hold: changes of shareholders, contracts with shareholders, the tax contribution account, loss carry-back, the donation carry-forward, the business premises with the municipalities for the apportionment of the trade tax, the land values or property tax and the participations for the trade tax additions and reductions, the foreign income per country for the Anlage AESt, the date of leaving the small-business scheme and the Anlage UN answers of a company seated abroad. A key that is absent has not been answered.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn de_return_facts_get(
        &self,
        request: &DeReturnFactsGetDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<DeReturnFactsGetDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/de/return-facts/get",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Replace the facts of one year for the German annual returns. The returns built afterwards read them; a key left out stays unanswered.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn de_return_facts_set(
        &self,
        request: &DeReturnFactsSetDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<DeReturnFactsSetDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/de/return-facts/set",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the DEÜV notifications of a month (Anmeldung for every start, Abmeldung for every leaving, in December the Jahresmeldung for everyone employed on 31 December) as DSME records with the DBME, DBNA, DBGB and DBAN blocks of Anlage 4 in force from 2026, from the approved payroll runs and the employee record, for the company's own transmission channel.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn de_deuev_generate(
        &self,
        request: &DeDeuevGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<DeDeuevGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/de/deuev/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the monthly contribution statement to the health insurers (Beitragsnachweis) from the payroll run: one fixed-length record BW02 per insurer, in the record layout in force from 2026, ready for the company's own transmission channel.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn de_beitragsnachweis_generate(
        &self,
        request: &DeBeitragsnachweisGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<DeBeitragsnachweisGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/de/beitragsnachweis/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Compute the oplysningsskema for selskaber (selskabsselvangivelsen) of an income year from the ledger and the recorded tax adjustments: accounting result before tax, tax adjustments, losses carried forward, taxable income, the 22 % corporation tax, reliefs and the balance, as the rubrikker the company keys into TastSelv Selskabsskat (DIAS). Skatteforvaltningen publishes no file format for the return; the XML is a working file.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn dk_selskabsskat_generate(
        &self,
        request: &DkSelskabsskatGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<DkSelskabsskatGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/dk/selskabsskat/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Send one employment register (töötamise register) entry for an employment contract to e-MTA over X-tee: the start of work, or its end with the reason recorded on the contract.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn ee_employment_register_send(
        &self,
        request: &EeEmploymentRegisterSendDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EeEmploymentRegisterSendDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/ee/employment-register/send",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Nordlet's declaración responsable for its VERI*FACTU invoicing system (Orden HAC/1177/2024, art. 15), as a PDF and as plain text.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn es_verifactu_declaracion_responsable(
        &self,
        request: &EsVerifactuDeclaracionResponsableDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<EsVerifactuDeclaracionResponsableDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/es/verifactu/declaracion-responsable",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the Form CT1 of an accounting year as the ROS version 26 XML and the accompanying financial statements as inline XBRL on the FRS 102 Irish Extension 2026 taxonomy Revenue accepts, both from the ledger, the recorded tax adjustments, the annual accounts record and the officers, for upload through the company’s own ROS account. Says whether the company is above the iXBRL deferral limits (balance sheet total €4.4 million, turnover €8.8 million, 50 employees).
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn ie_ct1_generate(
        &self,
        request: &IeCt1GenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<IeCt1GenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/ie/ct1/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the working paper for the Form B1 annual return of a financial year - company details, registered office, directors and secretary from Account → Officers, the members from Account → Shareholders, the issued share capital and the figures of the financial statements - in the order the CORE screens ask for them. The CRO publishes no file format for the B1, so it is keyed into CORE.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn ie_b1_generate(
        &self,
        request: &IeB1GenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<IeB1GenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/ie/b1/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the TD16-TD19 integration document for a registered purchase invoice and send it to the Sistema di Interscambio. Since July 2022 a purchase from a supplier established abroad is reported this way instead of the esterometro. The Italian VAT rate to self-assess is a judgement about the supply: pass vatRatePercent unless the purchase lines already carry it, otherwise the request is refused rather than guessed.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn it_sdi_purchase_send(
        &self,
        request: &ItSdiPurchaseSendDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<ItSdiPurchaseSendDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/it/sdi/purchase-send",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Render the TD16-TD19 integration document for a registered purchase invoice without sending it, so the rate and the document type can be checked first.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn it_sdi_purchase_preview(
        &self,
        request: &ItSdiPurchasePreviewDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<ItSdiPurchasePreviewDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/it/sdi/purchase-preview",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Upload the SAF-T file to i.SAF-T over the iSAFTUploaderService web service and start its processing. The file, the case reference and the status are kept as a declaration submission (submissionId), whose outcome Nordlet then checks with i.SAF-T. The submission itself is confirmed separately, because after confirmation the file can no longer be corrected. A range and data type already sent is sent again only with amend: true.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_saft_send(
        &self,
        request: &LtSaftSendDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtSaftSendDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/saft/send",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Render the Sodra 1-SD or 2-SD notice for the contracts starting or ending in the range as an .ffdata document for EDAS.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_sd_ffdata(
        &self,
        request: &LtSdFfdataDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtSdFfdataDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/sd/ffdata",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Render the annual corporate income tax return PLN204 as an .ffdata document, including the PLN204S and PLN204Z annexes, from the ledger and the tax adjustments recorded for that year.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn lt_pln204_ffdata(
        &self,
        request: &LtPln204FfdataDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LtPln204FfdataDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/lt/pln204/ffdata",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Compute the company income tax return and self-assessment of a year of assessment from the ledger and the recorded tax adjustments: the accounting profit before tax, the add-backs and deductions, the approved donations, capital allowances and losses carried forward, the chargeable income, the 35 % charge, the relief against the tax and the allocation of the distributable profit to the five tax accounts. The Malta Tax and Customs Administration issues the return as a personalised spreadsheet to the registered tax practitioner and publishes no layout, so the XML is a working file and the figures are keyed into that spreadsheet.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn mt_company_tax_generate(
        &self,
        request: &MtCompanyTaxGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<MtCompanyTaxGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/mt/company-tax/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the annual return of a year: the company number, registered office and made-up-to date, the share capital, the register of members, the directors and the company secretary and the accounts summary, as the figures the Malta Business Registry asks for on its own screens, plus the printed Annual Return Form of the Seventh Schedule filled in as a PDF for signing.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn mt_annual_return_generate(
        &self,
        request: &MtAnnualReturnGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<MtAnnualReturnGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/mt/annual-return/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Generate JPK_FA(4), the on-demand structure with every sales invoice issued in a period, its VAT bases per rate and one row per invoice line. Filed only when the tax office asks for it.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_jpk_fa_generate(
        &self,
        request: &PlJpkFaGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlJpkFaGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/jpk-fa/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Generate JPK_KR(1), the on-demand structure with the chart of accounts and its opening balances and turnover, the journal and the double entries behind it. Filed only when the tax office asks for it.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_jpk_kr_generate(
        &self,
        request: &PlJpkKrGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlJpkKrGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/jpk-kr/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Generate JPK_MAG(2), the on-demand structure with the warehouse documents of one warehouse: goods received from outside (PZ) or internally (PW) and issued to a customer (WZ) or internally (RW). Filed only when the tax office asks for it.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_jpk_mag_generate(
        &self,
        request: &PlJpkMagGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlJpkMagGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/jpk-mag/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Generate PIT-11(29) for every person on the payroll of one year: the pay, the deductible costs, the advance withheld and the social and health contributions taken off it. One document per person, because that is how the form is filed, addressed to the tax office of the place of residence of that person (employee field plKodUrzedu); a person without that code is refused with 422.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_pit11_generate(
        &self,
        request: &PlPit11GenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlPit11GenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/pit-11/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Generate CIT-8(34), the annual corporate income tax return, from the ledger of the year and the recorded tax adjustments. The tax office code and the small-taxpayer setting come from the e-Deklaracje compliance settings, the seat address from the JPK gateway settings. Names the annexes the figures would need, which are not produced.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_cit8_generate(
        &self,
        request: &PlCit8GenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlCit8GenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/cit-8/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Compute the monthly ZUS DRA settlement from the payroll run of one month: the pension, disability, sickness, accident and health insurance contributions and the Labour Fund, Solidarity Fund and guaranteed benefits fund charges, each split between the insured person and the payer. The amounts are carried into Płatnik or ePłatnik by hand.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_zus_dra_compute(
        &self,
        request: &PlZusDraComputeDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlZusDraComputeDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/zus-dra/compute",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the KEDU file for one month: the ZUS DRA settlement and one ZUS RCA report per person on the payroll, in the schema kedu_5_4 that Płatnik and ePłatnik import. The payer REGON, short name and declaration deadline code come from the ZUS compliance settings; the insurance title code and working time of each person from the employee record.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_zus_dra_kedu(
        &self,
        request: &PlZusDraKeduDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlZusDraKeduDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/zus-dra/kedu",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Fill the published ZUS DRA form for one month and return it as a PDF. The amounts, the payer identity and the deadline code are the same ones the KEDU file carries; blocks the payroll does not hold (paid benefits, bridging pensions, income declaration of a self-paying person) stay empty.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn pl_zus_dra_pdf(
        &self,
        request: &PlZusDraPdfDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<PlZusDraPdfDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/pl/zus-dra/pdf",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the RO e-Transport declaration for an issued waybill: goods with their tariff codes and masses, the commercial partner, the route and the vehicle. The XML follows the ANAF eTransport v2 schema and is kept as a file on the waybill. Anything listed in blockers has to be filled in before /etransport/send will accept it.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn ro_etransport_build(
        &self,
        request: &RoEtransportBuildDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<RoEtransportBuildDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/ro/etransport/build",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Hand the RO e-Transport declaration for an issued waybill to ANAF under the SPV OAuth token in compliance settings, and return the upload index the UIT is read back with. Answers 422 while any field the ANAF validator requires is still missing.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn ro_etransport_submit(
        &self,
        request: &RoEtransportSubmitDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<RoEtransportSubmitDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/ro/etransport/submit",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Read the outcome of an e-Transport declaration from ANAF by its upload index, under the SPV OAuth token in compliance settings. Returns the UIT code once the declaration validates.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn ro_etransport_status(
        &self,
        request: &RoEtransportStatusDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<RoEtransportStatusDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/ro/etransport/status",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the annual wage declaration (Lohndeklaration) to the AHV-IV-FAK from the approved payroll runs of the year as the CSV that AHVeasy imports under Lohndeklaration → CSV-Import der Lohndaten: one row per employee with the 18 columns of the AHVeasy template, the AHV-liable wage and the ALV wage.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn li_lohndeklaration_generate(
        &self,
        request: &LiLohndeklarationGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LiLohndeklarationGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/li/lohndeklaration/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Build the annual wage list (Lohnliste) of a Liechtenstein employer from the approved payroll runs of the year as the XLSX file the tax administration's eLohnausweis / eLohnlisten application imports: one row per employee with PEID, name, birth date, address, gross wage, wage tax withheld and the settlement period.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn li_lohnlisten_generate(
        &self,
        request: &LiLohnlistenGenerateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<LiLohnlistenGenerateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/li/lohnlisten/generate",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Lists the filing systems the company can configure: those of the company country (or of `country` when given), the EU-wide systems and the cross-border e-invoicing systems `it_sdi`, `pl_ksef` and `ro_efactura`. Each row carries the stored values, with a secret or certificate field shown as `__secret_set__` and the fields taken from the company profile filled from it.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn configs_list(
        &self,
        request: &ConfigsListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<ConfigsListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/configs/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Stores the settings of one filing system for the company, merging the given fields into the stored ones. A secret or certificate value is encrypted before it is stored, an empty string clears a field, and `__secret_set__` leaves a stored secret unchanged. Answers 422 for an unknown system.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn configs_update(
        &self,
        request: &ConfigsUpdateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<ConfigsUpdateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/configs/update",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Stores a PEM certificate, a PEM private key or a PKCS#12 bundle (base64 in `content`, opened with `passphrase` when it needs one) in the settings of the filing system and replaces the earlier upload of the same kind; for a PEM certificate the fingerprint, subject, issuer and validity dates are recorded. Answers 422 when the system is unknown or does not authenticate with a certificate. Returns the full certificate list of the company.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn certificates_upload(
        &self,
        request: &CertificatesUploadDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<CertificatesUploadDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/certificates/upload",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Lists the certificates and private keys stored for the filing systems of the company, ordered by system and field, each with its validity facts and health (`ok`, `expiring`, `expired` or `unknown`).
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn certificates_list(
        &self,
        request: &CertificatesListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<CertificatesListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/certificates/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Removes the certificate or the private key (`fieldKey`) of a filing system from the settings of the company and from the certificate list, and returns the remaining certificates.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn certificates_delete(
        &self,
        request: &CertificatesDeleteDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<CertificatesDeleteDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/certificates/delete",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Lists the filing deadlines Nordlet can file by itself for the country of the company: for each, whether automatic filing is switched on, whether the rule applies to the company profile, whether its filing system is configured, the state of its certificate and whether it would go to the test or the production service.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn automation_list(
        &self,
        request: &AutomationListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AutomationListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/automation/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Switches automatic filing of one deadline on or off for the company and returns the list of `declarations/automation/list`. Answers 422 when the deadline is not one Nordlet files, or when switching on while the filing system is connected to the test service of the administration (unless the company is a sandbox), is not configured, or has no valid certificate.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn automation_update(
        &self,
        request: &AutomationUpdateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<AutomationUpdateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/automation/update",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Sends a submission that is still in status `generated` through its filing system once more, with the stored file or, when none was stored yet, a freshly generated one, and returns the updated submission. Answers 409 when the submission is already submitted, accepted or rejected.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn submissions_retry(
        &self,
        request: &SubmissionsRetryDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<SubmissionsRetryDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/submissions/retry",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Builds the Lithuanian i.SAF register file of a month (`dataType` F both registers, S sale invoices only, P purchase invoices only), stores it and creates a submission in status `generated` for the obligation `lt-isaf`, the only obligation accepted. The XML alone comes from `declarations/lt/isaf/generate`; the submission is moved on with `declarations/submissions/mark`.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn submissions_create(
        &self,
        request: &SubmissionsCreateDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<SubmissionsCreateDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/submissions/create",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Records by hand that a submission was sent, accepted or rejected, with the reference and message of the administration when given. The allowed moves are `generated` to `submitted` and `submitted` to `accepted` or `rejected`; any other move answers 409. A submission without a transport system is marked as sent manually.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn submissions_mark(
        &self,
        request: &SubmissionsMarkDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<SubmissionsMarkDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/submissions/mark",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }

    /// Lists the declaration submissions of the company, newest first, filterable by `obligation`, `status`, `periodYear` and `periodMonth` and sortable by `createdAt` or `periodYear`.
    ///
    /// # Arguments
    ///
    /// * `options` - Additional request options such as headers, timeout, etc.
    ///
    /// # Returns
    ///
    /// JSON response from the API
    pub async fn submissions_list(
        &self,
        request: &SubmissionsListDeclarationsRequest,
        options: Option<RequestOptions>,
    ) -> Result<SubmissionsListDeclarationsResponse, ApiError> {
        self.http_client
            .execute_request(
                Method::POST,
                "v1/declarations/submissions/list",
                Some(serde_json::to_value(request).map_err(ApiError::Serialization)?),
                None,
                options,
            )
            .await
    }
}