nordlet 0.3.8

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
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())?,
        })
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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 Settings → Officers, the members from Settings → 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.
    ///
    /// # 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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }

    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
    }
}