factpulse 2.0.37__py3-none-any.whl → 3.0.23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of factpulse might be problematic. Click here for more details.

Files changed (400) hide show
  1. factpulse/__init__.py +542 -197
  2. factpulse/api/__init__.py +7 -4
  3. factpulse/api/afnorpdppa_api.py +49 -47
  4. factpulse/api/afnorpdppa_directory_service_api.py +1225 -310
  5. factpulse/api/afnorpdppa_flow_service_api.py +212 -81
  6. factpulse/api/chorus_pro_api.py +271 -218
  7. factpulse/api/document_conversion_api.py +1222 -0
  8. factpulse/api/downloads_api.py +1171 -0
  9. factpulse/api/e_reporting_api.py +3254 -0
  10. factpulse/api/{sant_api.py → health_api.py} +29 -22
  11. factpulse/api/invoice_processing_api.py +3634 -0
  12. factpulse/api/{vrification_pdfxml_api.py → pdfxml_verification_api.py} +331 -252
  13. factpulse/api/{utilisateur_api.py → user_api.py} +21 -17
  14. factpulse/api_client.py +4 -3
  15. factpulse/configuration.py +11 -6
  16. factpulse/exceptions.py +3 -2
  17. factpulse/models/__init__.py +265 -95
  18. factpulse/models/accept_language.py +38 -0
  19. factpulse/models/acknowledgment_status.py +39 -0
  20. factpulse/models/additional_document.py +116 -0
  21. factpulse/models/afnor_acknowledgement.py +100 -0
  22. factpulse/models/afnor_acknowledgement_detail.py +105 -0
  23. factpulse/models/afnor_address_edit.py +111 -0
  24. factpulse/models/afnor_address_patch.py +141 -0
  25. factpulse/models/afnor_address_put.py +129 -0
  26. factpulse/models/afnor_address_read.py +113 -0
  27. factpulse/models/afnor_algorithm.py +41 -0
  28. factpulse/models/afnor_contains_operator.py +37 -0
  29. factpulse/models/afnor_create_directory_line_body.py +98 -0
  30. factpulse/models/afnor_create_directory_line_body_addressing_information.py +122 -0
  31. factpulse/models/afnor_create_directory_line_body_period.py +91 -0
  32. factpulse/models/afnor_create_routing_code_body.py +153 -0
  33. factpulse/models/afnor_credentials.py +107 -0
  34. factpulse/models/afnor_destination.py +127 -0
  35. factpulse/models/afnor_diffusion_status.py +38 -0
  36. factpulse/models/afnor_directory_line_field.py +42 -0
  37. factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code.py +139 -0
  38. factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.py +92 -0
  39. factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.py +134 -0
  40. factpulse/models/afnor_directory_line_post201_response.py +94 -0
  41. factpulse/models/afnor_directory_line_search_post200_response.py +104 -0
  42. factpulse/models/afnor_entity_type.py +38 -0
  43. factpulse/models/afnor_error.py +97 -0
  44. factpulse/models/afnor_facility_administrative_status.py +38 -0
  45. factpulse/models/afnor_facility_nature.py +38 -0
  46. factpulse/models/afnor_facility_payload_history.py +140 -0
  47. factpulse/models/afnor_facility_payload_history_ule_b2g_additional_data.py +98 -0
  48. factpulse/models/afnor_facility_payload_included.py +134 -0
  49. factpulse/models/afnor_facility_type.py +38 -0
  50. factpulse/models/afnor_flow.py +129 -0
  51. factpulse/models/afnor_flow_ack_status.py +39 -0
  52. factpulse/models/afnor_flow_direction.py +38 -0
  53. factpulse/models/afnor_flow_info.py +112 -0
  54. factpulse/models/afnor_flow_profile.py +39 -0
  55. factpulse/models/afnor_flow_syntax.py +41 -0
  56. factpulse/models/afnor_flow_type.py +49 -0
  57. factpulse/models/afnor_full_flow_info.py +117 -0
  58. factpulse/models/afnor_health_check_response.py +92 -0
  59. factpulse/models/afnor_legal_unit_administrative_status.py +38 -0
  60. factpulse/models/afnor_legal_unit_payload_history.py +107 -0
  61. factpulse/models/afnor_legal_unit_payload_included.py +107 -0
  62. factpulse/models/afnor_legal_unit_payload_included_no_siren.py +95 -0
  63. factpulse/models/afnor_platform_status.py +38 -0
  64. factpulse/models/afnor_processing_rule.py +42 -0
  65. factpulse/models/afnor_reason_code.py +141 -0
  66. factpulse/models/afnor_reason_code_enum.py +51 -0
  67. factpulse/models/afnor_recipient_platform_type.py +38 -0
  68. factpulse/models/afnor_result.py +127 -0
  69. factpulse/models/afnor_routing_code_administrative_status.py +38 -0
  70. factpulse/models/afnor_routing_code_field.py +44 -0
  71. factpulse/models/afnor_routing_code_payload_history_legal_unit_facility.py +158 -0
  72. factpulse/models/afnor_routing_code_post201_response.py +113 -0
  73. factpulse/models/afnor_routing_code_search.py +122 -0
  74. factpulse/models/afnor_routing_code_search_filters.py +128 -0
  75. factpulse/models/afnor_routing_code_search_filters_administrative_status.py +92 -0
  76. factpulse/models/afnor_routing_code_search_filters_routing_code_name.py +102 -0
  77. factpulse/models/afnor_routing_code_search_filters_routing_identifier.py +102 -0
  78. factpulse/models/afnor_routing_code_search_post200_response.py +104 -0
  79. factpulse/models/afnor_routing_code_search_sorting_inner.py +92 -0
  80. factpulse/models/afnor_search_directory_line.py +109 -0
  81. factpulse/models/afnor_search_directory_line_filters.py +116 -0
  82. factpulse/models/afnor_search_directory_line_filters_addressing_identifier.py +92 -0
  83. factpulse/models/afnor_search_directory_line_filters_addressing_suffix.py +92 -0
  84. factpulse/models/afnor_search_directory_line_sorting_inner.py +92 -0
  85. factpulse/models/afnor_search_flow_content.py +104 -0
  86. factpulse/models/afnor_search_flow_filters.py +106 -0
  87. factpulse/models/afnor_search_flow_params.py +95 -0
  88. factpulse/models/afnor_search_siren.py +109 -0
  89. factpulse/models/afnor_search_siren_filters.py +110 -0
  90. factpulse/models/afnor_search_siren_filters_administrative_status.py +92 -0
  91. factpulse/models/afnor_search_siren_filters_business_name.py +92 -0
  92. factpulse/models/afnor_search_siren_filters_entity_type.py +92 -0
  93. factpulse/models/afnor_search_siren_filters_siren.py +102 -0
  94. factpulse/models/afnor_search_siren_sorting_inner.py +92 -0
  95. factpulse/models/afnor_search_siret.py +122 -0
  96. factpulse/models/afnor_search_siret_filters.py +140 -0
  97. factpulse/models/afnor_search_siret_filters_address_lines.py +92 -0
  98. factpulse/models/afnor_search_siret_filters_administrative_status.py +92 -0
  99. factpulse/models/afnor_search_siret_filters_country_subdivision.py +92 -0
  100. factpulse/models/afnor_search_siret_filters_facility_type.py +92 -0
  101. factpulse/models/afnor_search_siret_filters_locality.py +92 -0
  102. factpulse/models/afnor_search_siret_filters_name.py +92 -0
  103. factpulse/models/afnor_search_siret_filters_postal_code.py +102 -0
  104. factpulse/models/afnor_search_siret_filters_siret.py +102 -0
  105. factpulse/models/afnor_search_siret_sorting_inner.py +92 -0
  106. factpulse/models/afnor_siren_field.py +41 -0
  107. factpulse/models/afnor_siren_search_post200_response.py +104 -0
  108. factpulse/models/afnor_siret_field.py +50 -0
  109. factpulse/models/afnor_siret_search_post200_response.py +104 -0
  110. factpulse/models/afnor_sorting_order.py +38 -0
  111. factpulse/models/afnor_strict_operator.py +37 -0
  112. factpulse/models/afnor_update_patch_directory_line_body.py +89 -0
  113. factpulse/models/afnor_update_patch_routing_code_body.py +120 -0
  114. factpulse/models/afnor_update_put_routing_code_body.py +114 -0
  115. factpulse/models/afnor_webhook_callback_content.py +92 -0
  116. factpulse/models/aggregated_payment_input.py +106 -0
  117. factpulse/models/aggregated_transaction_input.py +136 -0
  118. factpulse/models/allowance_charge.py +150 -0
  119. factpulse/models/allowance_charge_reason_code.py +74 -0
  120. factpulse/models/allowance_reason_code.py +43 -0
  121. factpulse/models/allowance_total_amount.py +146 -0
  122. factpulse/models/amount.py +140 -0
  123. factpulse/models/amount1.py +140 -0
  124. factpulse/models/amount_due.py +140 -0
  125. factpulse/models/api_error.py +6 -5
  126. factpulse/models/api_profile.py +41 -0
  127. factpulse/models/async_task_status.py +98 -0
  128. factpulse/models/base_amount.py +146 -0
  129. factpulse/models/bounding_box_schema.py +11 -10
  130. factpulse/models/buyercountry.py +137 -0
  131. factpulse/models/celery_status.py +41 -0
  132. factpulse/models/certificate_info_response.py +25 -24
  133. factpulse/models/charge_total_amount.py +146 -0
  134. factpulse/models/chorus_pro_credentials.py +14 -13
  135. factpulse/models/chorus_pro_destination.py +109 -0
  136. factpulse/models/chorus_pro_result.py +102 -0
  137. factpulse/models/contact.py +114 -0
  138. factpulse/models/convert_resume_request.py +88 -0
  139. factpulse/models/convert_success_response.py +127 -0
  140. factpulse/models/convert_validation_failed_response.py +121 -0
  141. factpulse/models/country_code.py +206 -0
  142. factpulse/models/create_aggregated_report_request.py +170 -0
  143. factpulse/models/create_e_reporting_request.py +173 -0
  144. factpulse/models/currency.py +137 -0
  145. factpulse/models/currency_code.py +89 -0
  146. factpulse/models/delivery_party.py +122 -0
  147. factpulse/models/destination.py +28 -27
  148. factpulse/models/directory_line_include.py +40 -0
  149. factpulse/models/doc_type.py +40 -0
  150. factpulse/models/document_type_info.py +92 -0
  151. factpulse/models/e_reporting_flow_type.py +40 -0
  152. factpulse/models/e_reporting_validation_error.py +97 -0
  153. factpulse/models/electronic_address.py +91 -0
  154. factpulse/models/enriched_invoice_info.py +134 -0
  155. factpulse/models/error_level.py +3 -2
  156. factpulse/models/error_source.py +3 -2
  157. factpulse/models/extraction_info.py +94 -0
  158. factpulse/models/factur_x_invoice.py +321 -0
  159. factpulse/models/factur_xpdf_info.py +92 -0
  160. factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.py +41 -0
  161. factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py +116 -0
  162. factpulse/models/field_status.py +41 -0
  163. factpulse/models/file_info.py +95 -0
  164. factpulse/models/files_info.py +107 -0
  165. factpulse/models/flow_direction.py +38 -0
  166. factpulse/models/flow_profile.py +39 -0
  167. factpulse/models/flow_summary.py +132 -0
  168. factpulse/models/flow_syntax.py +41 -0
  169. factpulse/models/flow_type.py +49 -0
  170. factpulse/models/generate_aggregated_report_response.py +100 -0
  171. factpulse/models/generate_certificate_request.py +27 -26
  172. factpulse/models/generate_certificate_response.py +16 -15
  173. factpulse/models/generate_e_reporting_response.py +96 -0
  174. factpulse/models/get_chorus_pro_id_request.py +101 -0
  175. factpulse/models/get_chorus_pro_id_response.py +99 -0
  176. factpulse/models/get_invoice_request.py +99 -0
  177. factpulse/models/get_invoice_response.py +143 -0
  178. factpulse/models/get_structure_request.py +101 -0
  179. factpulse/models/get_structure_response.py +143 -0
  180. factpulse/models/global_allowance_amount.py +140 -0
  181. factpulse/models/gross_unit_price.py +146 -0
  182. factpulse/models/http_validation_error.py +3 -2
  183. factpulse/models/incoming_invoice.py +175 -0
  184. factpulse/models/incoming_supplier.py +145 -0
  185. factpulse/models/invoice_format.py +39 -0
  186. factpulse/models/invoice_input.py +179 -0
  187. factpulse/models/invoice_line.py +370 -0
  188. factpulse/models/invoice_line_allowance_amount.py +146 -0
  189. factpulse/models/invoice_note.py +95 -0
  190. factpulse/models/invoice_payment_input.py +110 -0
  191. factpulse/models/invoice_references.py +195 -0
  192. factpulse/models/invoice_status.py +97 -0
  193. factpulse/models/invoice_totals.py +178 -0
  194. factpulse/models/invoice_totals_prepayment.py +146 -0
  195. factpulse/models/invoice_type_code.py +52 -0
  196. factpulse/models/invoice_type_code_output.py +52 -0
  197. factpulse/models/invoicing_framework.py +111 -0
  198. factpulse/models/invoicing_framework_code.py +40 -0
  199. factpulse/models/line_net_amount.py +146 -0
  200. factpulse/models/line_sub_type.py +39 -0
  201. factpulse/models/line_total_amount.py +146 -0
  202. factpulse/models/location_inner.py +139 -0
  203. factpulse/models/mandatory_note_schema.py +125 -0
  204. factpulse/models/manual_rate.py +140 -0
  205. factpulse/models/manual_vat_rate.py +140 -0
  206. factpulse/models/missing_field.py +108 -0
  207. factpulse/models/operation_nature.py +50 -0
  208. factpulse/models/output_format.py +38 -0
  209. factpulse/models/page_dimensions_schema.py +90 -0
  210. factpulse/models/payee.py +169 -0
  211. factpulse/models/payment_amount_by_rate.py +98 -0
  212. factpulse/models/payment_card.py +100 -0
  213. factpulse/models/payment_means.py +42 -0
  214. factpulse/models/pdf_validation_result_api.py +170 -0
  215. factpulse/models/pdp_credentials.py +16 -15
  216. factpulse/models/percentage.py +146 -0
  217. factpulse/models/postal_address.py +135 -0
  218. factpulse/models/price_allowance_amount.py +146 -0
  219. factpulse/models/price_basis_quantity.py +146 -0
  220. factpulse/models/processing_options.py +95 -0
  221. factpulse/models/processing_rule.py +42 -0
  222. factpulse/models/product_characteristic.py +90 -0
  223. factpulse/models/product_classification.py +102 -0
  224. factpulse/models/quantity.py +140 -0
  225. factpulse/models/rate.py +140 -0
  226. factpulse/models/rate1.py +140 -0
  227. factpulse/models/recipient.py +168 -0
  228. factpulse/models/report_period.py +91 -0
  229. factpulse/models/report_sender.py +98 -0
  230. factpulse/models/rounding_amount.py +146 -0
  231. factpulse/models/routing_code_include.py +38 -0
  232. factpulse/models/schematron_validation_error.py +128 -0
  233. factpulse/models/scheme_id.py +18 -4
  234. factpulse/models/search_flow_request.py +144 -0
  235. factpulse/models/search_flow_response.py +102 -0
  236. factpulse/models/search_services_response.py +102 -0
  237. factpulse/models/search_structure_request.py +120 -0
  238. factpulse/models/search_structure_response.py +102 -0
  239. factpulse/models/sellercountry.py +137 -0
  240. factpulse/models/signature_info.py +7 -6
  241. factpulse/models/signature_info_api.py +123 -0
  242. factpulse/models/signature_parameters.py +134 -0
  243. factpulse/models/simplified_invoice_data.py +151 -0
  244. factpulse/models/siret_include.py +37 -0
  245. factpulse/models/structure_info.py +15 -14
  246. factpulse/models/structure_parameters.py +92 -0
  247. factpulse/models/structure_service.py +94 -0
  248. factpulse/models/submission_mode.py +39 -0
  249. factpulse/models/submit_aggregated_report_request.py +127 -0
  250. factpulse/models/submit_complete_invoice_request.py +117 -0
  251. factpulse/models/submit_complete_invoice_response.py +146 -0
  252. factpulse/models/submit_e_reporting_request.py +127 -0
  253. factpulse/models/submit_e_reporting_response.py +117 -0
  254. factpulse/models/submit_flow_request.py +124 -0
  255. factpulse/models/submit_flow_response.py +110 -0
  256. factpulse/models/submit_gross_amount.py +140 -0
  257. factpulse/models/submit_invoice_request.py +177 -0
  258. factpulse/models/submit_invoice_response.py +104 -0
  259. factpulse/models/submit_net_amount.py +140 -0
  260. factpulse/models/submit_vat_amount.py +140 -0
  261. factpulse/models/supplementary_attachment.py +96 -0
  262. factpulse/models/supplier.py +226 -0
  263. factpulse/models/task_response.py +88 -0
  264. factpulse/models/tax_breakdown_input.py +104 -0
  265. factpulse/models/tax_due_date_type.py +42 -0
  266. factpulse/models/tax_representative.py +96 -0
  267. factpulse/models/taxable_amount.py +140 -0
  268. factpulse/models/taxableamount.py +140 -0
  269. factpulse/models/taxamount.py +140 -0
  270. factpulse/models/taxamount1.py +140 -0
  271. factpulse/models/taxamount2.py +140 -0
  272. factpulse/models/taxexclusiveamount.py +140 -0
  273. factpulse/models/taxexclusiveamount1.py +140 -0
  274. factpulse/models/total_gross_amount.py +140 -0
  275. factpulse/models/total_net_amount.py +140 -0
  276. factpulse/models/total_vat_amount.py +140 -0
  277. factpulse/models/transaction_category.py +40 -0
  278. factpulse/models/transmission_type_code.py +38 -0
  279. factpulse/models/unit_net_price.py +140 -0
  280. factpulse/models/unit_of_measure.py +42 -0
  281. factpulse/models/validate_e_reporting_request.py +92 -0
  282. factpulse/models/validate_e_reporting_response.py +113 -0
  283. factpulse/models/validation_error.py +6 -5
  284. factpulse/models/validation_error_detail.py +7 -6
  285. factpulse/models/validation_error_response.py +88 -0
  286. factpulse/models/validation_info.py +106 -0
  287. factpulse/models/validation_success_response.py +88 -0
  288. factpulse/models/vat_accounting_code.py +40 -0
  289. factpulse/models/vat_amount.py +140 -0
  290. factpulse/models/vat_category.py +45 -0
  291. factpulse/models/vat_line.py +141 -0
  292. factpulse/models/vat_point_date_code.py +39 -0
  293. factpulse/models/vat_rate.py +146 -0
  294. factpulse/models/verification_success_response.py +136 -0
  295. factpulse/models/verified_field_schema.py +130 -0
  296. factpulse/rest.py +3 -2
  297. factpulse-3.0.23.dist-info/METADATA +294 -0
  298. factpulse-3.0.23.dist-info/RECORD +306 -0
  299. {factpulse-2.0.37.dist-info → factpulse-3.0.23.dist-info}/licenses/LICENSE +1 -1
  300. factpulse_helpers/__init__.py +34 -34
  301. factpulse_helpers/client.py +1020 -795
  302. factpulse_helpers/exceptions.py +68 -68
  303. factpulse/api/traitement_facture_api.py +0 -3437
  304. factpulse/models/adresse_electronique.py +0 -90
  305. factpulse/models/adresse_postale.py +0 -120
  306. factpulse/models/cadre_de_facturation.py +0 -110
  307. factpulse/models/categorie_tva.py +0 -44
  308. factpulse/models/champ_verifie_schema.py +0 -129
  309. factpulse/models/code_cadre_facturation.py +0 -39
  310. factpulse/models/code_raison_reduction.py +0 -42
  311. factpulse/models/consulter_facture_request.py +0 -98
  312. factpulse/models/consulter_facture_response.py +0 -142
  313. factpulse/models/consulter_structure_request.py +0 -100
  314. factpulse/models/consulter_structure_response.py +0 -142
  315. factpulse/models/credentials_afnor.py +0 -106
  316. factpulse/models/credentials_chorus_pro.py +0 -115
  317. factpulse/models/destinataire.py +0 -130
  318. factpulse/models/destination_afnor.py +0 -127
  319. factpulse/models/destination_chorus_pro.py +0 -108
  320. factpulse/models/dimension_page_schema.py +0 -89
  321. factpulse/models/direction_flux.py +0 -37
  322. factpulse/models/donnees_facture_simplifiees.py +0 -124
  323. factpulse/models/facture_enrichie_info.py +0 -133
  324. factpulse/models/facture_entrante.py +0 -196
  325. factpulse/models/facture_factur_x.py +0 -183
  326. factpulse/models/flux_resume.py +0 -131
  327. factpulse/models/format_facture.py +0 -38
  328. factpulse/models/format_sortie.py +0 -37
  329. factpulse/models/fournisseur.py +0 -153
  330. factpulse/models/fournisseur_entrant.py +0 -144
  331. factpulse/models/information_signature_api.py +0 -122
  332. factpulse/models/ligne_de_poste.py +0 -183
  333. factpulse/models/ligne_de_poste_montant_remise_ht.py +0 -145
  334. factpulse/models/ligne_de_poste_taux_tva_manuel.py +0 -145
  335. factpulse/models/ligne_de_tva.py +0 -132
  336. factpulse/models/mode_depot.py +0 -38
  337. factpulse/models/mode_paiement.py +0 -41
  338. factpulse/models/montant_a_payer.py +0 -139
  339. factpulse/models/montant_base_ht.py +0 -139
  340. factpulse/models/montant_ht_total.py +0 -139
  341. factpulse/models/montant_remise_globale_ttc.py +0 -139
  342. factpulse/models/montant_total.py +0 -133
  343. factpulse/models/montant_total_acompte.py +0 -145
  344. factpulse/models/montant_total_ligne_ht.py +0 -139
  345. factpulse/models/montant_ttc_total.py +0 -139
  346. factpulse/models/montant_tva.py +0 -139
  347. factpulse/models/montant_tva_ligne.py +0 -139
  348. factpulse/models/montant_tva_total.py +0 -139
  349. factpulse/models/montant_unitaire_ht.py +0 -139
  350. factpulse/models/nature_operation.py +0 -49
  351. factpulse/models/note.py +0 -94
  352. factpulse/models/note_obligatoire_schema.py +0 -124
  353. factpulse/models/obtenir_id_chorus_pro_request.py +0 -100
  354. factpulse/models/obtenir_id_chorus_pro_response.py +0 -98
  355. factpulse/models/options_processing.py +0 -94
  356. factpulse/models/parametres_signature.py +0 -133
  357. factpulse/models/parametres_structure.py +0 -91
  358. factpulse/models/pdf_factur_x_info.py +0 -91
  359. factpulse/models/piece_jointe_complementaire.py +0 -95
  360. factpulse/models/profil_api.py +0 -39
  361. factpulse/models/profil_flux.py +0 -38
  362. factpulse/models/quantite.py +0 -139
  363. factpulse/models/rechercher_services_response.py +0 -101
  364. factpulse/models/rechercher_structure_request.py +0 -119
  365. factpulse/models/rechercher_structure_response.py +0 -101
  366. factpulse/models/references.py +0 -124
  367. factpulse/models/reponse_healthcheck_afnor.py +0 -91
  368. factpulse/models/reponse_recherche_flux.py +0 -101
  369. factpulse/models/reponse_soumission_flux.py +0 -109
  370. factpulse/models/reponse_tache.py +0 -87
  371. factpulse/models/reponse_validation_erreur.py +0 -87
  372. factpulse/models/reponse_validation_succes.py +0 -87
  373. factpulse/models/reponse_verification_succes.py +0 -135
  374. factpulse/models/requete_recherche_flux.py +0 -143
  375. factpulse/models/requete_soumission_flux.py +0 -123
  376. factpulse/models/resultat_afnor.py +0 -105
  377. factpulse/models/resultat_chorus_pro.py +0 -101
  378. factpulse/models/resultat_validation_pdfapi.py +0 -169
  379. factpulse/models/service_structure.py +0 -93
  380. factpulse/models/soumettre_facture_complete_request.py +0 -116
  381. factpulse/models/soumettre_facture_complete_response.py +0 -145
  382. factpulse/models/soumettre_facture_request.py +0 -176
  383. factpulse/models/soumettre_facture_response.py +0 -103
  384. factpulse/models/statut_acquittement.py +0 -38
  385. factpulse/models/statut_celery.py +0 -40
  386. factpulse/models/statut_champ_api.py +0 -40
  387. factpulse/models/statut_facture.py +0 -96
  388. factpulse/models/statut_tache.py +0 -97
  389. factpulse/models/syntaxe_flux.py +0 -40
  390. factpulse/models/tauxmanuel.py +0 -139
  391. factpulse/models/type_document.py +0 -40
  392. factpulse/models/type_facture.py +0 -37
  393. factpulse/models/type_flux.py +0 -40
  394. factpulse/models/type_tva.py +0 -39
  395. factpulse/models/unite.py +0 -41
  396. factpulse/models/validation_error_loc_inner.py +0 -138
  397. factpulse-2.0.37.dist-info/METADATA +0 -292
  398. factpulse-2.0.37.dist-info/RECORD +0 -134
  399. {factpulse-2.0.37.dist-info → factpulse-3.0.23.dist-info}/WHEEL +0 -0
  400. {factpulse-2.0.37.dist-info → factpulse-3.0.23.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,3254 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FactPulse REST API
5
+
6
+ REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://factpulse.fr/api/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://factpulse.fr/documentation-api/
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: contact@factpulse.fr
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictBool, StrictBytes, StrictStr
21
+ from typing import Any, Dict, Optional, Tuple, Union
22
+ from typing_extensions import Annotated
23
+ from factpulse.models.create_aggregated_report_request import CreateAggregatedReportRequest
24
+ from factpulse.models.create_e_reporting_request import CreateEReportingRequest
25
+ from factpulse.models.generate_aggregated_report_response import GenerateAggregatedReportResponse
26
+ from factpulse.models.generate_e_reporting_response import GenerateEReportingResponse
27
+ from factpulse.models.submit_aggregated_report_request import SubmitAggregatedReportRequest
28
+ from factpulse.models.submit_e_reporting_request import SubmitEReportingRequest
29
+ from factpulse.models.submit_e_reporting_response import SubmitEReportingResponse
30
+ from factpulse.models.validate_e_reporting_request import ValidateEReportingRequest
31
+ from factpulse.models.validate_e_reporting_response import ValidateEReportingResponse
32
+
33
+ from factpulse.api_client import ApiClient, RequestSerialized
34
+ from factpulse.api_response import ApiResponse
35
+ from factpulse.rest import RESTResponseType
36
+
37
+
38
+ class EReportingApi:
39
+ """NOTE: This class is auto generated by OpenAPI Generator
40
+ Ref: https://openapi-generator.tech
41
+
42
+ Do not edit the class manually.
43
+ """
44
+
45
+ def __init__(self, api_client=None) -> None:
46
+ if api_client is None:
47
+ api_client = ApiClient.get_default()
48
+ self.api_client = api_client
49
+
50
+
51
+ @validate_call
52
+ def generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post(
53
+ self,
54
+ create_aggregated_report_request: CreateAggregatedReportRequest,
55
+ _request_timeout: Union[
56
+ None,
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Tuple[
59
+ Annotated[StrictFloat, Field(gt=0)],
60
+ Annotated[StrictFloat, Field(gt=0)]
61
+ ]
62
+ ] = None,
63
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
64
+ _content_type: Optional[StrictStr] = None,
65
+ _headers: Optional[Dict[StrictStr, Any]] = None,
66
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
67
+ ) -> GenerateAggregatedReportResponse:
68
+ """Generate aggregated e-reporting XML (PPF-compliant)
69
+
70
+ Generate a PPF-compliant aggregated e-reporting XML containing multiple flux types in a single file. This endpoint creates a Report XML that can contain: - **TransactionsReport**: Invoice (10.1) AND/OR Transactions (10.3) - **PaymentsReport**: Invoice payments (10.2) AND/OR Transaction payments (10.4) The AFNOR FlowType is automatically determined based on content: - Single type → Specific FlowType (e.g., AggregatedCustomerTransactionReport) - Multiple types → MultiFlowReport **CategoryCode (TT-81)** must use PPF-compliant values: - TLB1: Goods deliveries - TPS1: Service provisions - TNT1: Non-taxed transactions - TMA1: Mixed transactions
71
+
72
+ :param create_aggregated_report_request: (required)
73
+ :type create_aggregated_report_request: CreateAggregatedReportRequest
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post_serialize(
97
+ create_aggregated_report_request=create_aggregated_report_request,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index
102
+ )
103
+
104
+ _response_types_map: Dict[str, Optional[str]] = {
105
+ '200': "GenerateAggregatedReportResponse",
106
+ '400': None,
107
+ '422': None,
108
+ '500': None,
109
+ '401': "APIError",
110
+ }
111
+ response_data = self.api_client.call_api(
112
+ *_param,
113
+ _request_timeout=_request_timeout
114
+ )
115
+ response_data.read()
116
+ return self.api_client.response_deserialize(
117
+ response_data=response_data,
118
+ response_types_map=_response_types_map,
119
+ ).data
120
+
121
+
122
+ @validate_call
123
+ def generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post_with_http_info(
124
+ self,
125
+ create_aggregated_report_request: CreateAggregatedReportRequest,
126
+ _request_timeout: Union[
127
+ None,
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Tuple[
130
+ Annotated[StrictFloat, Field(gt=0)],
131
+ Annotated[StrictFloat, Field(gt=0)]
132
+ ]
133
+ ] = None,
134
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
135
+ _content_type: Optional[StrictStr] = None,
136
+ _headers: Optional[Dict[StrictStr, Any]] = None,
137
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
138
+ ) -> ApiResponse[GenerateAggregatedReportResponse]:
139
+ """Generate aggregated e-reporting XML (PPF-compliant)
140
+
141
+ Generate a PPF-compliant aggregated e-reporting XML containing multiple flux types in a single file. This endpoint creates a Report XML that can contain: - **TransactionsReport**: Invoice (10.1) AND/OR Transactions (10.3) - **PaymentsReport**: Invoice payments (10.2) AND/OR Transaction payments (10.4) The AFNOR FlowType is automatically determined based on content: - Single type → Specific FlowType (e.g., AggregatedCustomerTransactionReport) - Multiple types → MultiFlowReport **CategoryCode (TT-81)** must use PPF-compliant values: - TLB1: Goods deliveries - TPS1: Service provisions - TNT1: Non-taxed transactions - TMA1: Mixed transactions
142
+
143
+ :param create_aggregated_report_request: (required)
144
+ :type create_aggregated_report_request: CreateAggregatedReportRequest
145
+ :param _request_timeout: timeout setting for this request. If one
146
+ number provided, it will be total request
147
+ timeout. It can also be a pair (tuple) of
148
+ (connection, read) timeouts.
149
+ :type _request_timeout: int, tuple(int, int), optional
150
+ :param _request_auth: set to override the auth_settings for an a single
151
+ request; this effectively ignores the
152
+ authentication in the spec for a single request.
153
+ :type _request_auth: dict, optional
154
+ :param _content_type: force content-type for the request.
155
+ :type _content_type: str, Optional
156
+ :param _headers: set to override the headers for a single
157
+ request; this effectively ignores the headers
158
+ in the spec for a single request.
159
+ :type _headers: dict, optional
160
+ :param _host_index: set to override the host_index for a single
161
+ request; this effectively ignores the host_index
162
+ in the spec for a single request.
163
+ :type _host_index: int, optional
164
+ :return: Returns the result object.
165
+ """ # noqa: E501
166
+
167
+ _param = self._generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post_serialize(
168
+ create_aggregated_report_request=create_aggregated_report_request,
169
+ _request_auth=_request_auth,
170
+ _content_type=_content_type,
171
+ _headers=_headers,
172
+ _host_index=_host_index
173
+ )
174
+
175
+ _response_types_map: Dict[str, Optional[str]] = {
176
+ '200': "GenerateAggregatedReportResponse",
177
+ '400': None,
178
+ '422': None,
179
+ '500': None,
180
+ '401': "APIError",
181
+ }
182
+ response_data = self.api_client.call_api(
183
+ *_param,
184
+ _request_timeout=_request_timeout
185
+ )
186
+ response_data.read()
187
+ return self.api_client.response_deserialize(
188
+ response_data=response_data,
189
+ response_types_map=_response_types_map,
190
+ )
191
+
192
+
193
+ @validate_call
194
+ def generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post_without_preload_content(
195
+ self,
196
+ create_aggregated_report_request: CreateAggregatedReportRequest,
197
+ _request_timeout: Union[
198
+ None,
199
+ Annotated[StrictFloat, Field(gt=0)],
200
+ Tuple[
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Annotated[StrictFloat, Field(gt=0)]
203
+ ]
204
+ ] = None,
205
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
206
+ _content_type: Optional[StrictStr] = None,
207
+ _headers: Optional[Dict[StrictStr, Any]] = None,
208
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209
+ ) -> RESTResponseType:
210
+ """Generate aggregated e-reporting XML (PPF-compliant)
211
+
212
+ Generate a PPF-compliant aggregated e-reporting XML containing multiple flux types in a single file. This endpoint creates a Report XML that can contain: - **TransactionsReport**: Invoice (10.1) AND/OR Transactions (10.3) - **PaymentsReport**: Invoice payments (10.2) AND/OR Transaction payments (10.4) The AFNOR FlowType is automatically determined based on content: - Single type → Specific FlowType (e.g., AggregatedCustomerTransactionReport) - Multiple types → MultiFlowReport **CategoryCode (TT-81)** must use PPF-compliant values: - TLB1: Goods deliveries - TPS1: Service provisions - TNT1: Non-taxed transactions - TMA1: Mixed transactions
213
+
214
+ :param create_aggregated_report_request: (required)
215
+ :type create_aggregated_report_request: CreateAggregatedReportRequest
216
+ :param _request_timeout: timeout setting for this request. If one
217
+ number provided, it will be total request
218
+ timeout. It can also be a pair (tuple) of
219
+ (connection, read) timeouts.
220
+ :type _request_timeout: int, tuple(int, int), optional
221
+ :param _request_auth: set to override the auth_settings for an a single
222
+ request; this effectively ignores the
223
+ authentication in the spec for a single request.
224
+ :type _request_auth: dict, optional
225
+ :param _content_type: force content-type for the request.
226
+ :type _content_type: str, Optional
227
+ :param _headers: set to override the headers for a single
228
+ request; this effectively ignores the headers
229
+ in the spec for a single request.
230
+ :type _headers: dict, optional
231
+ :param _host_index: set to override the host_index for a single
232
+ request; this effectively ignores the host_index
233
+ in the spec for a single request.
234
+ :type _host_index: int, optional
235
+ :return: Returns the result object.
236
+ """ # noqa: E501
237
+
238
+ _param = self._generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post_serialize(
239
+ create_aggregated_report_request=create_aggregated_report_request,
240
+ _request_auth=_request_auth,
241
+ _content_type=_content_type,
242
+ _headers=_headers,
243
+ _host_index=_host_index
244
+ )
245
+
246
+ _response_types_map: Dict[str, Optional[str]] = {
247
+ '200': "GenerateAggregatedReportResponse",
248
+ '400': None,
249
+ '422': None,
250
+ '500': None,
251
+ '401': "APIError",
252
+ }
253
+ response_data = self.api_client.call_api(
254
+ *_param,
255
+ _request_timeout=_request_timeout
256
+ )
257
+ return response_data.response
258
+
259
+
260
+ def _generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post_serialize(
261
+ self,
262
+ create_aggregated_report_request,
263
+ _request_auth,
264
+ _content_type,
265
+ _headers,
266
+ _host_index,
267
+ ) -> RequestSerialized:
268
+
269
+ _host = None
270
+
271
+ _collection_formats: Dict[str, str] = {
272
+ }
273
+
274
+ _path_params: Dict[str, str] = {}
275
+ _query_params: List[Tuple[str, str]] = []
276
+ _header_params: Dict[str, Optional[str]] = _headers or {}
277
+ _form_params: List[Tuple[str, str]] = []
278
+ _files: Dict[
279
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
280
+ ] = {}
281
+ _body_params: Optional[bytes] = None
282
+
283
+ # process the path parameters
284
+ # process the query parameters
285
+ # process the header parameters
286
+ # process the form parameters
287
+ # process the body parameter
288
+ if create_aggregated_report_request is not None:
289
+ _body_params = create_aggregated_report_request
290
+
291
+
292
+ # set the HTTP header `Accept`
293
+ if 'Accept' not in _header_params:
294
+ _header_params['Accept'] = self.api_client.select_header_accept(
295
+ [
296
+ 'application/json'
297
+ ]
298
+ )
299
+
300
+ # set the HTTP header `Content-Type`
301
+ if _content_type:
302
+ _header_params['Content-Type'] = _content_type
303
+ else:
304
+ _default_content_type = (
305
+ self.api_client.select_header_content_type(
306
+ [
307
+ 'application/json'
308
+ ]
309
+ )
310
+ )
311
+ if _default_content_type is not None:
312
+ _header_params['Content-Type'] = _default_content_type
313
+
314
+ # authentication setting
315
+ _auth_settings: List[str] = [
316
+ 'HTTPBearer'
317
+ ]
318
+
319
+ return self.api_client.param_serialize(
320
+ method='POST',
321
+ resource_path='/api/v1/ereporting/generate-aggregated',
322
+ path_params=_path_params,
323
+ query_params=_query_params,
324
+ header_params=_header_params,
325
+ body=_body_params,
326
+ post_params=_form_params,
327
+ files=_files,
328
+ auth_settings=_auth_settings,
329
+ collection_formats=_collection_formats,
330
+ _host=_host,
331
+ _request_auth=_request_auth
332
+ )
333
+
334
+
335
+
336
+
337
+ @validate_call
338
+ def generate_ereporting_api_v1_ereporting_generate_post(
339
+ self,
340
+ create_e_reporting_request: CreateEReportingRequest,
341
+ _request_timeout: Union[
342
+ None,
343
+ Annotated[StrictFloat, Field(gt=0)],
344
+ Tuple[
345
+ Annotated[StrictFloat, Field(gt=0)],
346
+ Annotated[StrictFloat, Field(gt=0)]
347
+ ]
348
+ ] = None,
349
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
350
+ _content_type: Optional[StrictStr] = None,
351
+ _headers: Optional[Dict[StrictStr, Any]] = None,
352
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
353
+ ) -> GenerateEReportingResponse:
354
+ """Generate e-reporting XML
355
+
356
+ Generate e-reporting XML (FRR format) from structured data. Supports all four flow types: - **10.1**: Unitary B2B international transactions (use `invoices` field) - **10.2**: Payments for B2B international invoices (use `invoicePayments` field) - **10.3**: Aggregated B2C transactions (use `transactions` field) - **10.4**: Aggregated B2C payments (use `aggregatedPayments` field) The generated XML is compliant with DGFIP specifications and ready for submission to a PA (Plateforme Agréée).
357
+
358
+ :param create_e_reporting_request: (required)
359
+ :type create_e_reporting_request: CreateEReportingRequest
360
+ :param _request_timeout: timeout setting for this request. If one
361
+ number provided, it will be total request
362
+ timeout. It can also be a pair (tuple) of
363
+ (connection, read) timeouts.
364
+ :type _request_timeout: int, tuple(int, int), optional
365
+ :param _request_auth: set to override the auth_settings for an a single
366
+ request; this effectively ignores the
367
+ authentication in the spec for a single request.
368
+ :type _request_auth: dict, optional
369
+ :param _content_type: force content-type for the request.
370
+ :type _content_type: str, Optional
371
+ :param _headers: set to override the headers for a single
372
+ request; this effectively ignores the headers
373
+ in the spec for a single request.
374
+ :type _headers: dict, optional
375
+ :param _host_index: set to override the host_index for a single
376
+ request; this effectively ignores the host_index
377
+ in the spec for a single request.
378
+ :type _host_index: int, optional
379
+ :return: Returns the result object.
380
+ """ # noqa: E501
381
+
382
+ _param = self._generate_ereporting_api_v1_ereporting_generate_post_serialize(
383
+ create_e_reporting_request=create_e_reporting_request,
384
+ _request_auth=_request_auth,
385
+ _content_type=_content_type,
386
+ _headers=_headers,
387
+ _host_index=_host_index
388
+ )
389
+
390
+ _response_types_map: Dict[str, Optional[str]] = {
391
+ '200': "GenerateEReportingResponse",
392
+ '400': None,
393
+ '422': None,
394
+ '500': None,
395
+ '401': "APIError",
396
+ }
397
+ response_data = self.api_client.call_api(
398
+ *_param,
399
+ _request_timeout=_request_timeout
400
+ )
401
+ response_data.read()
402
+ return self.api_client.response_deserialize(
403
+ response_data=response_data,
404
+ response_types_map=_response_types_map,
405
+ ).data
406
+
407
+
408
+ @validate_call
409
+ def generate_ereporting_api_v1_ereporting_generate_post_with_http_info(
410
+ self,
411
+ create_e_reporting_request: CreateEReportingRequest,
412
+ _request_timeout: Union[
413
+ None,
414
+ Annotated[StrictFloat, Field(gt=0)],
415
+ Tuple[
416
+ Annotated[StrictFloat, Field(gt=0)],
417
+ Annotated[StrictFloat, Field(gt=0)]
418
+ ]
419
+ ] = None,
420
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
421
+ _content_type: Optional[StrictStr] = None,
422
+ _headers: Optional[Dict[StrictStr, Any]] = None,
423
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
424
+ ) -> ApiResponse[GenerateEReportingResponse]:
425
+ """Generate e-reporting XML
426
+
427
+ Generate e-reporting XML (FRR format) from structured data. Supports all four flow types: - **10.1**: Unitary B2B international transactions (use `invoices` field) - **10.2**: Payments for B2B international invoices (use `invoicePayments` field) - **10.3**: Aggregated B2C transactions (use `transactions` field) - **10.4**: Aggregated B2C payments (use `aggregatedPayments` field) The generated XML is compliant with DGFIP specifications and ready for submission to a PA (Plateforme Agréée).
428
+
429
+ :param create_e_reporting_request: (required)
430
+ :type create_e_reporting_request: CreateEReportingRequest
431
+ :param _request_timeout: timeout setting for this request. If one
432
+ number provided, it will be total request
433
+ timeout. It can also be a pair (tuple) of
434
+ (connection, read) timeouts.
435
+ :type _request_timeout: int, tuple(int, int), optional
436
+ :param _request_auth: set to override the auth_settings for an a single
437
+ request; this effectively ignores the
438
+ authentication in the spec for a single request.
439
+ :type _request_auth: dict, optional
440
+ :param _content_type: force content-type for the request.
441
+ :type _content_type: str, Optional
442
+ :param _headers: set to override the headers for a single
443
+ request; this effectively ignores the headers
444
+ in the spec for a single request.
445
+ :type _headers: dict, optional
446
+ :param _host_index: set to override the host_index for a single
447
+ request; this effectively ignores the host_index
448
+ in the spec for a single request.
449
+ :type _host_index: int, optional
450
+ :return: Returns the result object.
451
+ """ # noqa: E501
452
+
453
+ _param = self._generate_ereporting_api_v1_ereporting_generate_post_serialize(
454
+ create_e_reporting_request=create_e_reporting_request,
455
+ _request_auth=_request_auth,
456
+ _content_type=_content_type,
457
+ _headers=_headers,
458
+ _host_index=_host_index
459
+ )
460
+
461
+ _response_types_map: Dict[str, Optional[str]] = {
462
+ '200': "GenerateEReportingResponse",
463
+ '400': None,
464
+ '422': None,
465
+ '500': None,
466
+ '401': "APIError",
467
+ }
468
+ response_data = self.api_client.call_api(
469
+ *_param,
470
+ _request_timeout=_request_timeout
471
+ )
472
+ response_data.read()
473
+ return self.api_client.response_deserialize(
474
+ response_data=response_data,
475
+ response_types_map=_response_types_map,
476
+ )
477
+
478
+
479
+ @validate_call
480
+ def generate_ereporting_api_v1_ereporting_generate_post_without_preload_content(
481
+ self,
482
+ create_e_reporting_request: CreateEReportingRequest,
483
+ _request_timeout: Union[
484
+ None,
485
+ Annotated[StrictFloat, Field(gt=0)],
486
+ Tuple[
487
+ Annotated[StrictFloat, Field(gt=0)],
488
+ Annotated[StrictFloat, Field(gt=0)]
489
+ ]
490
+ ] = None,
491
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
492
+ _content_type: Optional[StrictStr] = None,
493
+ _headers: Optional[Dict[StrictStr, Any]] = None,
494
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
495
+ ) -> RESTResponseType:
496
+ """Generate e-reporting XML
497
+
498
+ Generate e-reporting XML (FRR format) from structured data. Supports all four flow types: - **10.1**: Unitary B2B international transactions (use `invoices` field) - **10.2**: Payments for B2B international invoices (use `invoicePayments` field) - **10.3**: Aggregated B2C transactions (use `transactions` field) - **10.4**: Aggregated B2C payments (use `aggregatedPayments` field) The generated XML is compliant with DGFIP specifications and ready for submission to a PA (Plateforme Agréée).
499
+
500
+ :param create_e_reporting_request: (required)
501
+ :type create_e_reporting_request: CreateEReportingRequest
502
+ :param _request_timeout: timeout setting for this request. If one
503
+ number provided, it will be total request
504
+ timeout. It can also be a pair (tuple) of
505
+ (connection, read) timeouts.
506
+ :type _request_timeout: int, tuple(int, int), optional
507
+ :param _request_auth: set to override the auth_settings for an a single
508
+ request; this effectively ignores the
509
+ authentication in the spec for a single request.
510
+ :type _request_auth: dict, optional
511
+ :param _content_type: force content-type for the request.
512
+ :type _content_type: str, Optional
513
+ :param _headers: set to override the headers for a single
514
+ request; this effectively ignores the headers
515
+ in the spec for a single request.
516
+ :type _headers: dict, optional
517
+ :param _host_index: set to override the host_index for a single
518
+ request; this effectively ignores the host_index
519
+ in the spec for a single request.
520
+ :type _host_index: int, optional
521
+ :return: Returns the result object.
522
+ """ # noqa: E501
523
+
524
+ _param = self._generate_ereporting_api_v1_ereporting_generate_post_serialize(
525
+ create_e_reporting_request=create_e_reporting_request,
526
+ _request_auth=_request_auth,
527
+ _content_type=_content_type,
528
+ _headers=_headers,
529
+ _host_index=_host_index
530
+ )
531
+
532
+ _response_types_map: Dict[str, Optional[str]] = {
533
+ '200': "GenerateEReportingResponse",
534
+ '400': None,
535
+ '422': None,
536
+ '500': None,
537
+ '401': "APIError",
538
+ }
539
+ response_data = self.api_client.call_api(
540
+ *_param,
541
+ _request_timeout=_request_timeout
542
+ )
543
+ return response_data.response
544
+
545
+
546
+ def _generate_ereporting_api_v1_ereporting_generate_post_serialize(
547
+ self,
548
+ create_e_reporting_request,
549
+ _request_auth,
550
+ _content_type,
551
+ _headers,
552
+ _host_index,
553
+ ) -> RequestSerialized:
554
+
555
+ _host = None
556
+
557
+ _collection_formats: Dict[str, str] = {
558
+ }
559
+
560
+ _path_params: Dict[str, str] = {}
561
+ _query_params: List[Tuple[str, str]] = []
562
+ _header_params: Dict[str, Optional[str]] = _headers or {}
563
+ _form_params: List[Tuple[str, str]] = []
564
+ _files: Dict[
565
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
566
+ ] = {}
567
+ _body_params: Optional[bytes] = None
568
+
569
+ # process the path parameters
570
+ # process the query parameters
571
+ # process the header parameters
572
+ # process the form parameters
573
+ # process the body parameter
574
+ if create_e_reporting_request is not None:
575
+ _body_params = create_e_reporting_request
576
+
577
+
578
+ # set the HTTP header `Accept`
579
+ if 'Accept' not in _header_params:
580
+ _header_params['Accept'] = self.api_client.select_header_accept(
581
+ [
582
+ 'application/json'
583
+ ]
584
+ )
585
+
586
+ # set the HTTP header `Content-Type`
587
+ if _content_type:
588
+ _header_params['Content-Type'] = _content_type
589
+ else:
590
+ _default_content_type = (
591
+ self.api_client.select_header_content_type(
592
+ [
593
+ 'application/json'
594
+ ]
595
+ )
596
+ )
597
+ if _default_content_type is not None:
598
+ _header_params['Content-Type'] = _default_content_type
599
+
600
+ # authentication setting
601
+ _auth_settings: List[str] = [
602
+ 'HTTPBearer'
603
+ ]
604
+
605
+ return self.api_client.param_serialize(
606
+ method='POST',
607
+ resource_path='/api/v1/ereporting/generate',
608
+ path_params=_path_params,
609
+ query_params=_query_params,
610
+ header_params=_header_params,
611
+ body=_body_params,
612
+ post_params=_form_params,
613
+ files=_files,
614
+ auth_settings=_auth_settings,
615
+ collection_formats=_collection_formats,
616
+ _host=_host,
617
+ _request_auth=_request_auth
618
+ )
619
+
620
+
621
+
622
+
623
+ @validate_call
624
+ def generate_ereporting_download_api_v1_ereporting_generate_download_post(
625
+ self,
626
+ create_e_reporting_request: CreateEReportingRequest,
627
+ filename: Annotated[Optional[StrictStr], Field(description="Output filename (default: ereporting_{reportId}.xml)")] = None,
628
+ _request_timeout: Union[
629
+ None,
630
+ Annotated[StrictFloat, Field(gt=0)],
631
+ Tuple[
632
+ Annotated[StrictFloat, Field(gt=0)],
633
+ Annotated[StrictFloat, Field(gt=0)]
634
+ ]
635
+ ] = None,
636
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
637
+ _content_type: Optional[StrictStr] = None,
638
+ _headers: Optional[Dict[StrictStr, Any]] = None,
639
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
640
+ ) -> None:
641
+ """Generate and download e-reporting XML
642
+
643
+ Generate e-reporting XML and return as downloadable file.
644
+
645
+ :param create_e_reporting_request: (required)
646
+ :type create_e_reporting_request: CreateEReportingRequest
647
+ :param filename: Output filename (default: ereporting_{reportId}.xml)
648
+ :type filename: str
649
+ :param _request_timeout: timeout setting for this request. If one
650
+ number provided, it will be total request
651
+ timeout. It can also be a pair (tuple) of
652
+ (connection, read) timeouts.
653
+ :type _request_timeout: int, tuple(int, int), optional
654
+ :param _request_auth: set to override the auth_settings for an a single
655
+ request; this effectively ignores the
656
+ authentication in the spec for a single request.
657
+ :type _request_auth: dict, optional
658
+ :param _content_type: force content-type for the request.
659
+ :type _content_type: str, Optional
660
+ :param _headers: set to override the headers for a single
661
+ request; this effectively ignores the headers
662
+ in the spec for a single request.
663
+ :type _headers: dict, optional
664
+ :param _host_index: set to override the host_index for a single
665
+ request; this effectively ignores the host_index
666
+ in the spec for a single request.
667
+ :type _host_index: int, optional
668
+ :return: Returns the result object.
669
+ """ # noqa: E501
670
+
671
+ _param = self._generate_ereporting_download_api_v1_ereporting_generate_download_post_serialize(
672
+ create_e_reporting_request=create_e_reporting_request,
673
+ filename=filename,
674
+ _request_auth=_request_auth,
675
+ _content_type=_content_type,
676
+ _headers=_headers,
677
+ _host_index=_host_index
678
+ )
679
+
680
+ _response_types_map: Dict[str, Optional[str]] = {
681
+ '200': None,
682
+ '400': None,
683
+ '422': None,
684
+ '500': None,
685
+ '401': "APIError",
686
+ }
687
+ response_data = self.api_client.call_api(
688
+ *_param,
689
+ _request_timeout=_request_timeout
690
+ )
691
+ response_data.read()
692
+ return self.api_client.response_deserialize(
693
+ response_data=response_data,
694
+ response_types_map=_response_types_map,
695
+ ).data
696
+
697
+
698
+ @validate_call
699
+ def generate_ereporting_download_api_v1_ereporting_generate_download_post_with_http_info(
700
+ self,
701
+ create_e_reporting_request: CreateEReportingRequest,
702
+ filename: Annotated[Optional[StrictStr], Field(description="Output filename (default: ereporting_{reportId}.xml)")] = None,
703
+ _request_timeout: Union[
704
+ None,
705
+ Annotated[StrictFloat, Field(gt=0)],
706
+ Tuple[
707
+ Annotated[StrictFloat, Field(gt=0)],
708
+ Annotated[StrictFloat, Field(gt=0)]
709
+ ]
710
+ ] = None,
711
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
712
+ _content_type: Optional[StrictStr] = None,
713
+ _headers: Optional[Dict[StrictStr, Any]] = None,
714
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
715
+ ) -> ApiResponse[None]:
716
+ """Generate and download e-reporting XML
717
+
718
+ Generate e-reporting XML and return as downloadable file.
719
+
720
+ :param create_e_reporting_request: (required)
721
+ :type create_e_reporting_request: CreateEReportingRequest
722
+ :param filename: Output filename (default: ereporting_{reportId}.xml)
723
+ :type filename: str
724
+ :param _request_timeout: timeout setting for this request. If one
725
+ number provided, it will be total request
726
+ timeout. It can also be a pair (tuple) of
727
+ (connection, read) timeouts.
728
+ :type _request_timeout: int, tuple(int, int), optional
729
+ :param _request_auth: set to override the auth_settings for an a single
730
+ request; this effectively ignores the
731
+ authentication in the spec for a single request.
732
+ :type _request_auth: dict, optional
733
+ :param _content_type: force content-type for the request.
734
+ :type _content_type: str, Optional
735
+ :param _headers: set to override the headers for a single
736
+ request; this effectively ignores the headers
737
+ in the spec for a single request.
738
+ :type _headers: dict, optional
739
+ :param _host_index: set to override the host_index for a single
740
+ request; this effectively ignores the host_index
741
+ in the spec for a single request.
742
+ :type _host_index: int, optional
743
+ :return: Returns the result object.
744
+ """ # noqa: E501
745
+
746
+ _param = self._generate_ereporting_download_api_v1_ereporting_generate_download_post_serialize(
747
+ create_e_reporting_request=create_e_reporting_request,
748
+ filename=filename,
749
+ _request_auth=_request_auth,
750
+ _content_type=_content_type,
751
+ _headers=_headers,
752
+ _host_index=_host_index
753
+ )
754
+
755
+ _response_types_map: Dict[str, Optional[str]] = {
756
+ '200': None,
757
+ '400': None,
758
+ '422': None,
759
+ '500': None,
760
+ '401': "APIError",
761
+ }
762
+ response_data = self.api_client.call_api(
763
+ *_param,
764
+ _request_timeout=_request_timeout
765
+ )
766
+ response_data.read()
767
+ return self.api_client.response_deserialize(
768
+ response_data=response_data,
769
+ response_types_map=_response_types_map,
770
+ )
771
+
772
+
773
+ @validate_call
774
+ def generate_ereporting_download_api_v1_ereporting_generate_download_post_without_preload_content(
775
+ self,
776
+ create_e_reporting_request: CreateEReportingRequest,
777
+ filename: Annotated[Optional[StrictStr], Field(description="Output filename (default: ereporting_{reportId}.xml)")] = None,
778
+ _request_timeout: Union[
779
+ None,
780
+ Annotated[StrictFloat, Field(gt=0)],
781
+ Tuple[
782
+ Annotated[StrictFloat, Field(gt=0)],
783
+ Annotated[StrictFloat, Field(gt=0)]
784
+ ]
785
+ ] = None,
786
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
787
+ _content_type: Optional[StrictStr] = None,
788
+ _headers: Optional[Dict[StrictStr, Any]] = None,
789
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
790
+ ) -> RESTResponseType:
791
+ """Generate and download e-reporting XML
792
+
793
+ Generate e-reporting XML and return as downloadable file.
794
+
795
+ :param create_e_reporting_request: (required)
796
+ :type create_e_reporting_request: CreateEReportingRequest
797
+ :param filename: Output filename (default: ereporting_{reportId}.xml)
798
+ :type filename: str
799
+ :param _request_timeout: timeout setting for this request. If one
800
+ number provided, it will be total request
801
+ timeout. It can also be a pair (tuple) of
802
+ (connection, read) timeouts.
803
+ :type _request_timeout: int, tuple(int, int), optional
804
+ :param _request_auth: set to override the auth_settings for an a single
805
+ request; this effectively ignores the
806
+ authentication in the spec for a single request.
807
+ :type _request_auth: dict, optional
808
+ :param _content_type: force content-type for the request.
809
+ :type _content_type: str, Optional
810
+ :param _headers: set to override the headers for a single
811
+ request; this effectively ignores the headers
812
+ in the spec for a single request.
813
+ :type _headers: dict, optional
814
+ :param _host_index: set to override the host_index for a single
815
+ request; this effectively ignores the host_index
816
+ in the spec for a single request.
817
+ :type _host_index: int, optional
818
+ :return: Returns the result object.
819
+ """ # noqa: E501
820
+
821
+ _param = self._generate_ereporting_download_api_v1_ereporting_generate_download_post_serialize(
822
+ create_e_reporting_request=create_e_reporting_request,
823
+ filename=filename,
824
+ _request_auth=_request_auth,
825
+ _content_type=_content_type,
826
+ _headers=_headers,
827
+ _host_index=_host_index
828
+ )
829
+
830
+ _response_types_map: Dict[str, Optional[str]] = {
831
+ '200': None,
832
+ '400': None,
833
+ '422': None,
834
+ '500': None,
835
+ '401': "APIError",
836
+ }
837
+ response_data = self.api_client.call_api(
838
+ *_param,
839
+ _request_timeout=_request_timeout
840
+ )
841
+ return response_data.response
842
+
843
+
844
+ def _generate_ereporting_download_api_v1_ereporting_generate_download_post_serialize(
845
+ self,
846
+ create_e_reporting_request,
847
+ filename,
848
+ _request_auth,
849
+ _content_type,
850
+ _headers,
851
+ _host_index,
852
+ ) -> RequestSerialized:
853
+
854
+ _host = None
855
+
856
+ _collection_formats: Dict[str, str] = {
857
+ }
858
+
859
+ _path_params: Dict[str, str] = {}
860
+ _query_params: List[Tuple[str, str]] = []
861
+ _header_params: Dict[str, Optional[str]] = _headers or {}
862
+ _form_params: List[Tuple[str, str]] = []
863
+ _files: Dict[
864
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
865
+ ] = {}
866
+ _body_params: Optional[bytes] = None
867
+
868
+ # process the path parameters
869
+ # process the query parameters
870
+ if filename is not None:
871
+
872
+ _query_params.append(('filename', filename))
873
+
874
+ # process the header parameters
875
+ # process the form parameters
876
+ # process the body parameter
877
+ if create_e_reporting_request is not None:
878
+ _body_params = create_e_reporting_request
879
+
880
+
881
+ # set the HTTP header `Accept`
882
+ if 'Accept' not in _header_params:
883
+ _header_params['Accept'] = self.api_client.select_header_accept(
884
+ [
885
+ 'application/json'
886
+ ]
887
+ )
888
+
889
+ # set the HTTP header `Content-Type`
890
+ if _content_type:
891
+ _header_params['Content-Type'] = _content_type
892
+ else:
893
+ _default_content_type = (
894
+ self.api_client.select_header_content_type(
895
+ [
896
+ 'application/json'
897
+ ]
898
+ )
899
+ )
900
+ if _default_content_type is not None:
901
+ _header_params['Content-Type'] = _default_content_type
902
+
903
+ # authentication setting
904
+ _auth_settings: List[str] = [
905
+ 'HTTPBearer'
906
+ ]
907
+
908
+ return self.api_client.param_serialize(
909
+ method='POST',
910
+ resource_path='/api/v1/ereporting/generate/download',
911
+ path_params=_path_params,
912
+ query_params=_query_params,
913
+ header_params=_header_params,
914
+ body=_body_params,
915
+ post_params=_form_params,
916
+ files=_files,
917
+ auth_settings=_auth_settings,
918
+ collection_formats=_collection_formats,
919
+ _host=_host,
920
+ _request_auth=_request_auth
921
+ )
922
+
923
+
924
+
925
+
926
+ @validate_call
927
+ def list_category_codes_api_v1_ereporting_category_codes_get(
928
+ self,
929
+ _request_timeout: Union[
930
+ None,
931
+ Annotated[StrictFloat, Field(gt=0)],
932
+ Tuple[
933
+ Annotated[StrictFloat, Field(gt=0)],
934
+ Annotated[StrictFloat, Field(gt=0)]
935
+ ]
936
+ ] = None,
937
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
938
+ _content_type: Optional[StrictStr] = None,
939
+ _headers: Optional[Dict[StrictStr, Any]] = None,
940
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
941
+ ) -> Dict[str, object]:
942
+ """List PPF-compliant category codes
943
+
944
+ Returns the list of valid CategoryCode values (TT-81) for e-reporting transactions. Source: Annexe 6 - Format sémantique FE e-reporting v1.9
945
+
946
+ :param _request_timeout: timeout setting for this request. If one
947
+ number provided, it will be total request
948
+ timeout. It can also be a pair (tuple) of
949
+ (connection, read) timeouts.
950
+ :type _request_timeout: int, tuple(int, int), optional
951
+ :param _request_auth: set to override the auth_settings for an a single
952
+ request; this effectively ignores the
953
+ authentication in the spec for a single request.
954
+ :type _request_auth: dict, optional
955
+ :param _content_type: force content-type for the request.
956
+ :type _content_type: str, Optional
957
+ :param _headers: set to override the headers for a single
958
+ request; this effectively ignores the headers
959
+ in the spec for a single request.
960
+ :type _headers: dict, optional
961
+ :param _host_index: set to override the host_index for a single
962
+ request; this effectively ignores the host_index
963
+ in the spec for a single request.
964
+ :type _host_index: int, optional
965
+ :return: Returns the result object.
966
+ """ # noqa: E501
967
+
968
+ _param = self._list_category_codes_api_v1_ereporting_category_codes_get_serialize(
969
+ _request_auth=_request_auth,
970
+ _content_type=_content_type,
971
+ _headers=_headers,
972
+ _host_index=_host_index
973
+ )
974
+
975
+ _response_types_map: Dict[str, Optional[str]] = {
976
+ '200': "Dict[str, object]",
977
+ '400': None,
978
+ '422': None,
979
+ '500': None,
980
+ }
981
+ response_data = self.api_client.call_api(
982
+ *_param,
983
+ _request_timeout=_request_timeout
984
+ )
985
+ response_data.read()
986
+ return self.api_client.response_deserialize(
987
+ response_data=response_data,
988
+ response_types_map=_response_types_map,
989
+ ).data
990
+
991
+
992
+ @validate_call
993
+ def list_category_codes_api_v1_ereporting_category_codes_get_with_http_info(
994
+ self,
995
+ _request_timeout: Union[
996
+ None,
997
+ Annotated[StrictFloat, Field(gt=0)],
998
+ Tuple[
999
+ Annotated[StrictFloat, Field(gt=0)],
1000
+ Annotated[StrictFloat, Field(gt=0)]
1001
+ ]
1002
+ ] = None,
1003
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1004
+ _content_type: Optional[StrictStr] = None,
1005
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1006
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1007
+ ) -> ApiResponse[Dict[str, object]]:
1008
+ """List PPF-compliant category codes
1009
+
1010
+ Returns the list of valid CategoryCode values (TT-81) for e-reporting transactions. Source: Annexe 6 - Format sémantique FE e-reporting v1.9
1011
+
1012
+ :param _request_timeout: timeout setting for this request. If one
1013
+ number provided, it will be total request
1014
+ timeout. It can also be a pair (tuple) of
1015
+ (connection, read) timeouts.
1016
+ :type _request_timeout: int, tuple(int, int), optional
1017
+ :param _request_auth: set to override the auth_settings for an a single
1018
+ request; this effectively ignores the
1019
+ authentication in the spec for a single request.
1020
+ :type _request_auth: dict, optional
1021
+ :param _content_type: force content-type for the request.
1022
+ :type _content_type: str, Optional
1023
+ :param _headers: set to override the headers for a single
1024
+ request; this effectively ignores the headers
1025
+ in the spec for a single request.
1026
+ :type _headers: dict, optional
1027
+ :param _host_index: set to override the host_index for a single
1028
+ request; this effectively ignores the host_index
1029
+ in the spec for a single request.
1030
+ :type _host_index: int, optional
1031
+ :return: Returns the result object.
1032
+ """ # noqa: E501
1033
+
1034
+ _param = self._list_category_codes_api_v1_ereporting_category_codes_get_serialize(
1035
+ _request_auth=_request_auth,
1036
+ _content_type=_content_type,
1037
+ _headers=_headers,
1038
+ _host_index=_host_index
1039
+ )
1040
+
1041
+ _response_types_map: Dict[str, Optional[str]] = {
1042
+ '200': "Dict[str, object]",
1043
+ '400': None,
1044
+ '422': None,
1045
+ '500': None,
1046
+ }
1047
+ response_data = self.api_client.call_api(
1048
+ *_param,
1049
+ _request_timeout=_request_timeout
1050
+ )
1051
+ response_data.read()
1052
+ return self.api_client.response_deserialize(
1053
+ response_data=response_data,
1054
+ response_types_map=_response_types_map,
1055
+ )
1056
+
1057
+
1058
+ @validate_call
1059
+ def list_category_codes_api_v1_ereporting_category_codes_get_without_preload_content(
1060
+ self,
1061
+ _request_timeout: Union[
1062
+ None,
1063
+ Annotated[StrictFloat, Field(gt=0)],
1064
+ Tuple[
1065
+ Annotated[StrictFloat, Field(gt=0)],
1066
+ Annotated[StrictFloat, Field(gt=0)]
1067
+ ]
1068
+ ] = None,
1069
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1070
+ _content_type: Optional[StrictStr] = None,
1071
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1072
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1073
+ ) -> RESTResponseType:
1074
+ """List PPF-compliant category codes
1075
+
1076
+ Returns the list of valid CategoryCode values (TT-81) for e-reporting transactions. Source: Annexe 6 - Format sémantique FE e-reporting v1.9
1077
+
1078
+ :param _request_timeout: timeout setting for this request. If one
1079
+ number provided, it will be total request
1080
+ timeout. It can also be a pair (tuple) of
1081
+ (connection, read) timeouts.
1082
+ :type _request_timeout: int, tuple(int, int), optional
1083
+ :param _request_auth: set to override the auth_settings for an a single
1084
+ request; this effectively ignores the
1085
+ authentication in the spec for a single request.
1086
+ :type _request_auth: dict, optional
1087
+ :param _content_type: force content-type for the request.
1088
+ :type _content_type: str, Optional
1089
+ :param _headers: set to override the headers for a single
1090
+ request; this effectively ignores the headers
1091
+ in the spec for a single request.
1092
+ :type _headers: dict, optional
1093
+ :param _host_index: set to override the host_index for a single
1094
+ request; this effectively ignores the host_index
1095
+ in the spec for a single request.
1096
+ :type _host_index: int, optional
1097
+ :return: Returns the result object.
1098
+ """ # noqa: E501
1099
+
1100
+ _param = self._list_category_codes_api_v1_ereporting_category_codes_get_serialize(
1101
+ _request_auth=_request_auth,
1102
+ _content_type=_content_type,
1103
+ _headers=_headers,
1104
+ _host_index=_host_index
1105
+ )
1106
+
1107
+ _response_types_map: Dict[str, Optional[str]] = {
1108
+ '200': "Dict[str, object]",
1109
+ '400': None,
1110
+ '422': None,
1111
+ '500': None,
1112
+ }
1113
+ response_data = self.api_client.call_api(
1114
+ *_param,
1115
+ _request_timeout=_request_timeout
1116
+ )
1117
+ return response_data.response
1118
+
1119
+
1120
+ def _list_category_codes_api_v1_ereporting_category_codes_get_serialize(
1121
+ self,
1122
+ _request_auth,
1123
+ _content_type,
1124
+ _headers,
1125
+ _host_index,
1126
+ ) -> RequestSerialized:
1127
+
1128
+ _host = None
1129
+
1130
+ _collection_formats: Dict[str, str] = {
1131
+ }
1132
+
1133
+ _path_params: Dict[str, str] = {}
1134
+ _query_params: List[Tuple[str, str]] = []
1135
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1136
+ _form_params: List[Tuple[str, str]] = []
1137
+ _files: Dict[
1138
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1139
+ ] = {}
1140
+ _body_params: Optional[bytes] = None
1141
+
1142
+ # process the path parameters
1143
+ # process the query parameters
1144
+ # process the header parameters
1145
+ # process the form parameters
1146
+ # process the body parameter
1147
+
1148
+
1149
+ # set the HTTP header `Accept`
1150
+ if 'Accept' not in _header_params:
1151
+ _header_params['Accept'] = self.api_client.select_header_accept(
1152
+ [
1153
+ 'application/json'
1154
+ ]
1155
+ )
1156
+
1157
+
1158
+ # authentication setting
1159
+ _auth_settings: List[str] = [
1160
+ ]
1161
+
1162
+ return self.api_client.param_serialize(
1163
+ method='GET',
1164
+ resource_path='/api/v1/ereporting/category-codes',
1165
+ path_params=_path_params,
1166
+ query_params=_query_params,
1167
+ header_params=_header_params,
1168
+ body=_body_params,
1169
+ post_params=_form_params,
1170
+ files=_files,
1171
+ auth_settings=_auth_settings,
1172
+ collection_formats=_collection_formats,
1173
+ _host=_host,
1174
+ _request_auth=_request_auth
1175
+ )
1176
+
1177
+
1178
+
1179
+
1180
+ @validate_call
1181
+ def list_flow_types_api_v1_ereporting_flow_types_get(
1182
+ self,
1183
+ _request_timeout: Union[
1184
+ None,
1185
+ Annotated[StrictFloat, Field(gt=0)],
1186
+ Tuple[
1187
+ Annotated[StrictFloat, Field(gt=0)],
1188
+ Annotated[StrictFloat, Field(gt=0)]
1189
+ ]
1190
+ ] = None,
1191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1192
+ _content_type: Optional[StrictStr] = None,
1193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1195
+ ) -> Dict[str, object]:
1196
+ """List available flow types
1197
+
1198
+ Returns the list of supported e-reporting flow types with descriptions.
1199
+
1200
+ :param _request_timeout: timeout setting for this request. If one
1201
+ number provided, it will be total request
1202
+ timeout. It can also be a pair (tuple) of
1203
+ (connection, read) timeouts.
1204
+ :type _request_timeout: int, tuple(int, int), optional
1205
+ :param _request_auth: set to override the auth_settings for an a single
1206
+ request; this effectively ignores the
1207
+ authentication in the spec for a single request.
1208
+ :type _request_auth: dict, optional
1209
+ :param _content_type: force content-type for the request.
1210
+ :type _content_type: str, Optional
1211
+ :param _headers: set to override the headers for a single
1212
+ request; this effectively ignores the headers
1213
+ in the spec for a single request.
1214
+ :type _headers: dict, optional
1215
+ :param _host_index: set to override the host_index for a single
1216
+ request; this effectively ignores the host_index
1217
+ in the spec for a single request.
1218
+ :type _host_index: int, optional
1219
+ :return: Returns the result object.
1220
+ """ # noqa: E501
1221
+
1222
+ _param = self._list_flow_types_api_v1_ereporting_flow_types_get_serialize(
1223
+ _request_auth=_request_auth,
1224
+ _content_type=_content_type,
1225
+ _headers=_headers,
1226
+ _host_index=_host_index
1227
+ )
1228
+
1229
+ _response_types_map: Dict[str, Optional[str]] = {
1230
+ '200': "Dict[str, object]",
1231
+ '400': None,
1232
+ '422': None,
1233
+ '500': None,
1234
+ }
1235
+ response_data = self.api_client.call_api(
1236
+ *_param,
1237
+ _request_timeout=_request_timeout
1238
+ )
1239
+ response_data.read()
1240
+ return self.api_client.response_deserialize(
1241
+ response_data=response_data,
1242
+ response_types_map=_response_types_map,
1243
+ ).data
1244
+
1245
+
1246
+ @validate_call
1247
+ def list_flow_types_api_v1_ereporting_flow_types_get_with_http_info(
1248
+ self,
1249
+ _request_timeout: Union[
1250
+ None,
1251
+ Annotated[StrictFloat, Field(gt=0)],
1252
+ Tuple[
1253
+ Annotated[StrictFloat, Field(gt=0)],
1254
+ Annotated[StrictFloat, Field(gt=0)]
1255
+ ]
1256
+ ] = None,
1257
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1258
+ _content_type: Optional[StrictStr] = None,
1259
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1260
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1261
+ ) -> ApiResponse[Dict[str, object]]:
1262
+ """List available flow types
1263
+
1264
+ Returns the list of supported e-reporting flow types with descriptions.
1265
+
1266
+ :param _request_timeout: timeout setting for this request. If one
1267
+ number provided, it will be total request
1268
+ timeout. It can also be a pair (tuple) of
1269
+ (connection, read) timeouts.
1270
+ :type _request_timeout: int, tuple(int, int), optional
1271
+ :param _request_auth: set to override the auth_settings for an a single
1272
+ request; this effectively ignores the
1273
+ authentication in the spec for a single request.
1274
+ :type _request_auth: dict, optional
1275
+ :param _content_type: force content-type for the request.
1276
+ :type _content_type: str, Optional
1277
+ :param _headers: set to override the headers for a single
1278
+ request; this effectively ignores the headers
1279
+ in the spec for a single request.
1280
+ :type _headers: dict, optional
1281
+ :param _host_index: set to override the host_index for a single
1282
+ request; this effectively ignores the host_index
1283
+ in the spec for a single request.
1284
+ :type _host_index: int, optional
1285
+ :return: Returns the result object.
1286
+ """ # noqa: E501
1287
+
1288
+ _param = self._list_flow_types_api_v1_ereporting_flow_types_get_serialize(
1289
+ _request_auth=_request_auth,
1290
+ _content_type=_content_type,
1291
+ _headers=_headers,
1292
+ _host_index=_host_index
1293
+ )
1294
+
1295
+ _response_types_map: Dict[str, Optional[str]] = {
1296
+ '200': "Dict[str, object]",
1297
+ '400': None,
1298
+ '422': None,
1299
+ '500': None,
1300
+ }
1301
+ response_data = self.api_client.call_api(
1302
+ *_param,
1303
+ _request_timeout=_request_timeout
1304
+ )
1305
+ response_data.read()
1306
+ return self.api_client.response_deserialize(
1307
+ response_data=response_data,
1308
+ response_types_map=_response_types_map,
1309
+ )
1310
+
1311
+
1312
+ @validate_call
1313
+ def list_flow_types_api_v1_ereporting_flow_types_get_without_preload_content(
1314
+ self,
1315
+ _request_timeout: Union[
1316
+ None,
1317
+ Annotated[StrictFloat, Field(gt=0)],
1318
+ Tuple[
1319
+ Annotated[StrictFloat, Field(gt=0)],
1320
+ Annotated[StrictFloat, Field(gt=0)]
1321
+ ]
1322
+ ] = None,
1323
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1324
+ _content_type: Optional[StrictStr] = None,
1325
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1326
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1327
+ ) -> RESTResponseType:
1328
+ """List available flow types
1329
+
1330
+ Returns the list of supported e-reporting flow types with descriptions.
1331
+
1332
+ :param _request_timeout: timeout setting for this request. If one
1333
+ number provided, it will be total request
1334
+ timeout. It can also be a pair (tuple) of
1335
+ (connection, read) timeouts.
1336
+ :type _request_timeout: int, tuple(int, int), optional
1337
+ :param _request_auth: set to override the auth_settings for an a single
1338
+ request; this effectively ignores the
1339
+ authentication in the spec for a single request.
1340
+ :type _request_auth: dict, optional
1341
+ :param _content_type: force content-type for the request.
1342
+ :type _content_type: str, Optional
1343
+ :param _headers: set to override the headers for a single
1344
+ request; this effectively ignores the headers
1345
+ in the spec for a single request.
1346
+ :type _headers: dict, optional
1347
+ :param _host_index: set to override the host_index for a single
1348
+ request; this effectively ignores the host_index
1349
+ in the spec for a single request.
1350
+ :type _host_index: int, optional
1351
+ :return: Returns the result object.
1352
+ """ # noqa: E501
1353
+
1354
+ _param = self._list_flow_types_api_v1_ereporting_flow_types_get_serialize(
1355
+ _request_auth=_request_auth,
1356
+ _content_type=_content_type,
1357
+ _headers=_headers,
1358
+ _host_index=_host_index
1359
+ )
1360
+
1361
+ _response_types_map: Dict[str, Optional[str]] = {
1362
+ '200': "Dict[str, object]",
1363
+ '400': None,
1364
+ '422': None,
1365
+ '500': None,
1366
+ }
1367
+ response_data = self.api_client.call_api(
1368
+ *_param,
1369
+ _request_timeout=_request_timeout
1370
+ )
1371
+ return response_data.response
1372
+
1373
+
1374
+ def _list_flow_types_api_v1_ereporting_flow_types_get_serialize(
1375
+ self,
1376
+ _request_auth,
1377
+ _content_type,
1378
+ _headers,
1379
+ _host_index,
1380
+ ) -> RequestSerialized:
1381
+
1382
+ _host = None
1383
+
1384
+ _collection_formats: Dict[str, str] = {
1385
+ }
1386
+
1387
+ _path_params: Dict[str, str] = {}
1388
+ _query_params: List[Tuple[str, str]] = []
1389
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1390
+ _form_params: List[Tuple[str, str]] = []
1391
+ _files: Dict[
1392
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1393
+ ] = {}
1394
+ _body_params: Optional[bytes] = None
1395
+
1396
+ # process the path parameters
1397
+ # process the query parameters
1398
+ # process the header parameters
1399
+ # process the form parameters
1400
+ # process the body parameter
1401
+
1402
+
1403
+ # set the HTTP header `Accept`
1404
+ if 'Accept' not in _header_params:
1405
+ _header_params['Accept'] = self.api_client.select_header_accept(
1406
+ [
1407
+ 'application/json'
1408
+ ]
1409
+ )
1410
+
1411
+
1412
+ # authentication setting
1413
+ _auth_settings: List[str] = [
1414
+ ]
1415
+
1416
+ return self.api_client.param_serialize(
1417
+ method='GET',
1418
+ resource_path='/api/v1/ereporting/flow-types',
1419
+ path_params=_path_params,
1420
+ query_params=_query_params,
1421
+ header_params=_header_params,
1422
+ body=_body_params,
1423
+ post_params=_form_params,
1424
+ files=_files,
1425
+ auth_settings=_auth_settings,
1426
+ collection_formats=_collection_formats,
1427
+ _host=_host,
1428
+ _request_auth=_request_auth
1429
+ )
1430
+
1431
+
1432
+
1433
+
1434
+ @validate_call
1435
+ def submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post(
1436
+ self,
1437
+ submit_aggregated_report_request: SubmitAggregatedReportRequest,
1438
+ _request_timeout: Union[
1439
+ None,
1440
+ Annotated[StrictFloat, Field(gt=0)],
1441
+ Tuple[
1442
+ Annotated[StrictFloat, Field(gt=0)],
1443
+ Annotated[StrictFloat, Field(gt=0)]
1444
+ ]
1445
+ ] = None,
1446
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1447
+ _content_type: Optional[StrictStr] = None,
1448
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1449
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1450
+ ) -> SubmitEReportingResponse:
1451
+ """Submit aggregated e-reporting to PA/PDP
1452
+
1453
+ Generate and submit a PPF-compliant aggregated e-reporting to a PA/PDP. Combines generation and submission in a single call. Automatically determines the AFNOR FlowType based on content.
1454
+
1455
+ :param submit_aggregated_report_request: (required)
1456
+ :type submit_aggregated_report_request: SubmitAggregatedReportRequest
1457
+ :param _request_timeout: timeout setting for this request. If one
1458
+ number provided, it will be total request
1459
+ timeout. It can also be a pair (tuple) of
1460
+ (connection, read) timeouts.
1461
+ :type _request_timeout: int, tuple(int, int), optional
1462
+ :param _request_auth: set to override the auth_settings for an a single
1463
+ request; this effectively ignores the
1464
+ authentication in the spec for a single request.
1465
+ :type _request_auth: dict, optional
1466
+ :param _content_type: force content-type for the request.
1467
+ :type _content_type: str, Optional
1468
+ :param _headers: set to override the headers for a single
1469
+ request; this effectively ignores the headers
1470
+ in the spec for a single request.
1471
+ :type _headers: dict, optional
1472
+ :param _host_index: set to override the host_index for a single
1473
+ request; this effectively ignores the host_index
1474
+ in the spec for a single request.
1475
+ :type _host_index: int, optional
1476
+ :return: Returns the result object.
1477
+ """ # noqa: E501
1478
+
1479
+ _param = self._submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_serialize(
1480
+ submit_aggregated_report_request=submit_aggregated_report_request,
1481
+ _request_auth=_request_auth,
1482
+ _content_type=_content_type,
1483
+ _headers=_headers,
1484
+ _host_index=_host_index
1485
+ )
1486
+
1487
+ _response_types_map: Dict[str, Optional[str]] = {
1488
+ '200': "SubmitEReportingResponse",
1489
+ '400': None,
1490
+ '422': None,
1491
+ '500': None,
1492
+ '401': "APIError",
1493
+ }
1494
+ response_data = self.api_client.call_api(
1495
+ *_param,
1496
+ _request_timeout=_request_timeout
1497
+ )
1498
+ response_data.read()
1499
+ return self.api_client.response_deserialize(
1500
+ response_data=response_data,
1501
+ response_types_map=_response_types_map,
1502
+ ).data
1503
+
1504
+
1505
+ @validate_call
1506
+ def submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_with_http_info(
1507
+ self,
1508
+ submit_aggregated_report_request: SubmitAggregatedReportRequest,
1509
+ _request_timeout: Union[
1510
+ None,
1511
+ Annotated[StrictFloat, Field(gt=0)],
1512
+ Tuple[
1513
+ Annotated[StrictFloat, Field(gt=0)],
1514
+ Annotated[StrictFloat, Field(gt=0)]
1515
+ ]
1516
+ ] = None,
1517
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1518
+ _content_type: Optional[StrictStr] = None,
1519
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1520
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1521
+ ) -> ApiResponse[SubmitEReportingResponse]:
1522
+ """Submit aggregated e-reporting to PA/PDP
1523
+
1524
+ Generate and submit a PPF-compliant aggregated e-reporting to a PA/PDP. Combines generation and submission in a single call. Automatically determines the AFNOR FlowType based on content.
1525
+
1526
+ :param submit_aggregated_report_request: (required)
1527
+ :type submit_aggregated_report_request: SubmitAggregatedReportRequest
1528
+ :param _request_timeout: timeout setting for this request. If one
1529
+ number provided, it will be total request
1530
+ timeout. It can also be a pair (tuple) of
1531
+ (connection, read) timeouts.
1532
+ :type _request_timeout: int, tuple(int, int), optional
1533
+ :param _request_auth: set to override the auth_settings for an a single
1534
+ request; this effectively ignores the
1535
+ authentication in the spec for a single request.
1536
+ :type _request_auth: dict, optional
1537
+ :param _content_type: force content-type for the request.
1538
+ :type _content_type: str, Optional
1539
+ :param _headers: set to override the headers for a single
1540
+ request; this effectively ignores the headers
1541
+ in the spec for a single request.
1542
+ :type _headers: dict, optional
1543
+ :param _host_index: set to override the host_index for a single
1544
+ request; this effectively ignores the host_index
1545
+ in the spec for a single request.
1546
+ :type _host_index: int, optional
1547
+ :return: Returns the result object.
1548
+ """ # noqa: E501
1549
+
1550
+ _param = self._submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_serialize(
1551
+ submit_aggregated_report_request=submit_aggregated_report_request,
1552
+ _request_auth=_request_auth,
1553
+ _content_type=_content_type,
1554
+ _headers=_headers,
1555
+ _host_index=_host_index
1556
+ )
1557
+
1558
+ _response_types_map: Dict[str, Optional[str]] = {
1559
+ '200': "SubmitEReportingResponse",
1560
+ '400': None,
1561
+ '422': None,
1562
+ '500': None,
1563
+ '401': "APIError",
1564
+ }
1565
+ response_data = self.api_client.call_api(
1566
+ *_param,
1567
+ _request_timeout=_request_timeout
1568
+ )
1569
+ response_data.read()
1570
+ return self.api_client.response_deserialize(
1571
+ response_data=response_data,
1572
+ response_types_map=_response_types_map,
1573
+ )
1574
+
1575
+
1576
+ @validate_call
1577
+ def submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_without_preload_content(
1578
+ self,
1579
+ submit_aggregated_report_request: SubmitAggregatedReportRequest,
1580
+ _request_timeout: Union[
1581
+ None,
1582
+ Annotated[StrictFloat, Field(gt=0)],
1583
+ Tuple[
1584
+ Annotated[StrictFloat, Field(gt=0)],
1585
+ Annotated[StrictFloat, Field(gt=0)]
1586
+ ]
1587
+ ] = None,
1588
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1589
+ _content_type: Optional[StrictStr] = None,
1590
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1591
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1592
+ ) -> RESTResponseType:
1593
+ """Submit aggregated e-reporting to PA/PDP
1594
+
1595
+ Generate and submit a PPF-compliant aggregated e-reporting to a PA/PDP. Combines generation and submission in a single call. Automatically determines the AFNOR FlowType based on content.
1596
+
1597
+ :param submit_aggregated_report_request: (required)
1598
+ :type submit_aggregated_report_request: SubmitAggregatedReportRequest
1599
+ :param _request_timeout: timeout setting for this request. If one
1600
+ number provided, it will be total request
1601
+ timeout. It can also be a pair (tuple) of
1602
+ (connection, read) timeouts.
1603
+ :type _request_timeout: int, tuple(int, int), optional
1604
+ :param _request_auth: set to override the auth_settings for an a single
1605
+ request; this effectively ignores the
1606
+ authentication in the spec for a single request.
1607
+ :type _request_auth: dict, optional
1608
+ :param _content_type: force content-type for the request.
1609
+ :type _content_type: str, Optional
1610
+ :param _headers: set to override the headers for a single
1611
+ request; this effectively ignores the headers
1612
+ in the spec for a single request.
1613
+ :type _headers: dict, optional
1614
+ :param _host_index: set to override the host_index for a single
1615
+ request; this effectively ignores the host_index
1616
+ in the spec for a single request.
1617
+ :type _host_index: int, optional
1618
+ :return: Returns the result object.
1619
+ """ # noqa: E501
1620
+
1621
+ _param = self._submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_serialize(
1622
+ submit_aggregated_report_request=submit_aggregated_report_request,
1623
+ _request_auth=_request_auth,
1624
+ _content_type=_content_type,
1625
+ _headers=_headers,
1626
+ _host_index=_host_index
1627
+ )
1628
+
1629
+ _response_types_map: Dict[str, Optional[str]] = {
1630
+ '200': "SubmitEReportingResponse",
1631
+ '400': None,
1632
+ '422': None,
1633
+ '500': None,
1634
+ '401': "APIError",
1635
+ }
1636
+ response_data = self.api_client.call_api(
1637
+ *_param,
1638
+ _request_timeout=_request_timeout
1639
+ )
1640
+ return response_data.response
1641
+
1642
+
1643
+ def _submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_serialize(
1644
+ self,
1645
+ submit_aggregated_report_request,
1646
+ _request_auth,
1647
+ _content_type,
1648
+ _headers,
1649
+ _host_index,
1650
+ ) -> RequestSerialized:
1651
+
1652
+ _host = None
1653
+
1654
+ _collection_formats: Dict[str, str] = {
1655
+ }
1656
+
1657
+ _path_params: Dict[str, str] = {}
1658
+ _query_params: List[Tuple[str, str]] = []
1659
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1660
+ _form_params: List[Tuple[str, str]] = []
1661
+ _files: Dict[
1662
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1663
+ ] = {}
1664
+ _body_params: Optional[bytes] = None
1665
+
1666
+ # process the path parameters
1667
+ # process the query parameters
1668
+ # process the header parameters
1669
+ # process the form parameters
1670
+ # process the body parameter
1671
+ if submit_aggregated_report_request is not None:
1672
+ _body_params = submit_aggregated_report_request
1673
+
1674
+
1675
+ # set the HTTP header `Accept`
1676
+ if 'Accept' not in _header_params:
1677
+ _header_params['Accept'] = self.api_client.select_header_accept(
1678
+ [
1679
+ 'application/json'
1680
+ ]
1681
+ )
1682
+
1683
+ # set the HTTP header `Content-Type`
1684
+ if _content_type:
1685
+ _header_params['Content-Type'] = _content_type
1686
+ else:
1687
+ _default_content_type = (
1688
+ self.api_client.select_header_content_type(
1689
+ [
1690
+ 'application/json'
1691
+ ]
1692
+ )
1693
+ )
1694
+ if _default_content_type is not None:
1695
+ _header_params['Content-Type'] = _default_content_type
1696
+
1697
+ # authentication setting
1698
+ _auth_settings: List[str] = [
1699
+ 'HTTPBearer'
1700
+ ]
1701
+
1702
+ return self.api_client.param_serialize(
1703
+ method='POST',
1704
+ resource_path='/api/v1/ereporting/submit-aggregated',
1705
+ path_params=_path_params,
1706
+ query_params=_query_params,
1707
+ header_params=_header_params,
1708
+ body=_body_params,
1709
+ post_params=_form_params,
1710
+ files=_files,
1711
+ auth_settings=_auth_settings,
1712
+ collection_formats=_collection_formats,
1713
+ _host=_host,
1714
+ _request_auth=_request_auth
1715
+ )
1716
+
1717
+
1718
+
1719
+
1720
+ @validate_call
1721
+ def submit_ereporting_api_v1_ereporting_submit_post(
1722
+ self,
1723
+ submit_e_reporting_request: SubmitEReportingRequest,
1724
+ _request_timeout: Union[
1725
+ None,
1726
+ Annotated[StrictFloat, Field(gt=0)],
1727
+ Tuple[
1728
+ Annotated[StrictFloat, Field(gt=0)],
1729
+ Annotated[StrictFloat, Field(gt=0)]
1730
+ ]
1731
+ ] = None,
1732
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1733
+ _content_type: Optional[StrictStr] = None,
1734
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1735
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1736
+ ) -> SubmitEReportingResponse:
1737
+ """Submit e-reporting to PA/PDP
1738
+
1739
+ Generate and submit e-reporting to a PA (Plateforme Agréée). Authentication strategies (same as invoices): 1. **JWT with client_uid** (recommended): PDP credentials fetched from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in request The e-reporting is submitted using the AFNOR Flow Service API with syntax=FRR (FRench Reporting).
1740
+
1741
+ :param submit_e_reporting_request: (required)
1742
+ :type submit_e_reporting_request: SubmitEReportingRequest
1743
+ :param _request_timeout: timeout setting for this request. If one
1744
+ number provided, it will be total request
1745
+ timeout. It can also be a pair (tuple) of
1746
+ (connection, read) timeouts.
1747
+ :type _request_timeout: int, tuple(int, int), optional
1748
+ :param _request_auth: set to override the auth_settings for an a single
1749
+ request; this effectively ignores the
1750
+ authentication in the spec for a single request.
1751
+ :type _request_auth: dict, optional
1752
+ :param _content_type: force content-type for the request.
1753
+ :type _content_type: str, Optional
1754
+ :param _headers: set to override the headers for a single
1755
+ request; this effectively ignores the headers
1756
+ in the spec for a single request.
1757
+ :type _headers: dict, optional
1758
+ :param _host_index: set to override the host_index for a single
1759
+ request; this effectively ignores the host_index
1760
+ in the spec for a single request.
1761
+ :type _host_index: int, optional
1762
+ :return: Returns the result object.
1763
+ """ # noqa: E501
1764
+
1765
+ _param = self._submit_ereporting_api_v1_ereporting_submit_post_serialize(
1766
+ submit_e_reporting_request=submit_e_reporting_request,
1767
+ _request_auth=_request_auth,
1768
+ _content_type=_content_type,
1769
+ _headers=_headers,
1770
+ _host_index=_host_index
1771
+ )
1772
+
1773
+ _response_types_map: Dict[str, Optional[str]] = {
1774
+ '200': "SubmitEReportingResponse",
1775
+ '400': None,
1776
+ '422': None,
1777
+ '500': None,
1778
+ '401': "APIError",
1779
+ }
1780
+ response_data = self.api_client.call_api(
1781
+ *_param,
1782
+ _request_timeout=_request_timeout
1783
+ )
1784
+ response_data.read()
1785
+ return self.api_client.response_deserialize(
1786
+ response_data=response_data,
1787
+ response_types_map=_response_types_map,
1788
+ ).data
1789
+
1790
+
1791
+ @validate_call
1792
+ def submit_ereporting_api_v1_ereporting_submit_post_with_http_info(
1793
+ self,
1794
+ submit_e_reporting_request: SubmitEReportingRequest,
1795
+ _request_timeout: Union[
1796
+ None,
1797
+ Annotated[StrictFloat, Field(gt=0)],
1798
+ Tuple[
1799
+ Annotated[StrictFloat, Field(gt=0)],
1800
+ Annotated[StrictFloat, Field(gt=0)]
1801
+ ]
1802
+ ] = None,
1803
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1804
+ _content_type: Optional[StrictStr] = None,
1805
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1806
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1807
+ ) -> ApiResponse[SubmitEReportingResponse]:
1808
+ """Submit e-reporting to PA/PDP
1809
+
1810
+ Generate and submit e-reporting to a PA (Plateforme Agréée). Authentication strategies (same as invoices): 1. **JWT with client_uid** (recommended): PDP credentials fetched from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in request The e-reporting is submitted using the AFNOR Flow Service API with syntax=FRR (FRench Reporting).
1811
+
1812
+ :param submit_e_reporting_request: (required)
1813
+ :type submit_e_reporting_request: SubmitEReportingRequest
1814
+ :param _request_timeout: timeout setting for this request. If one
1815
+ number provided, it will be total request
1816
+ timeout. It can also be a pair (tuple) of
1817
+ (connection, read) timeouts.
1818
+ :type _request_timeout: int, tuple(int, int), optional
1819
+ :param _request_auth: set to override the auth_settings for an a single
1820
+ request; this effectively ignores the
1821
+ authentication in the spec for a single request.
1822
+ :type _request_auth: dict, optional
1823
+ :param _content_type: force content-type for the request.
1824
+ :type _content_type: str, Optional
1825
+ :param _headers: set to override the headers for a single
1826
+ request; this effectively ignores the headers
1827
+ in the spec for a single request.
1828
+ :type _headers: dict, optional
1829
+ :param _host_index: set to override the host_index for a single
1830
+ request; this effectively ignores the host_index
1831
+ in the spec for a single request.
1832
+ :type _host_index: int, optional
1833
+ :return: Returns the result object.
1834
+ """ # noqa: E501
1835
+
1836
+ _param = self._submit_ereporting_api_v1_ereporting_submit_post_serialize(
1837
+ submit_e_reporting_request=submit_e_reporting_request,
1838
+ _request_auth=_request_auth,
1839
+ _content_type=_content_type,
1840
+ _headers=_headers,
1841
+ _host_index=_host_index
1842
+ )
1843
+
1844
+ _response_types_map: Dict[str, Optional[str]] = {
1845
+ '200': "SubmitEReportingResponse",
1846
+ '400': None,
1847
+ '422': None,
1848
+ '500': None,
1849
+ '401': "APIError",
1850
+ }
1851
+ response_data = self.api_client.call_api(
1852
+ *_param,
1853
+ _request_timeout=_request_timeout
1854
+ )
1855
+ response_data.read()
1856
+ return self.api_client.response_deserialize(
1857
+ response_data=response_data,
1858
+ response_types_map=_response_types_map,
1859
+ )
1860
+
1861
+
1862
+ @validate_call
1863
+ def submit_ereporting_api_v1_ereporting_submit_post_without_preload_content(
1864
+ self,
1865
+ submit_e_reporting_request: SubmitEReportingRequest,
1866
+ _request_timeout: Union[
1867
+ None,
1868
+ Annotated[StrictFloat, Field(gt=0)],
1869
+ Tuple[
1870
+ Annotated[StrictFloat, Field(gt=0)],
1871
+ Annotated[StrictFloat, Field(gt=0)]
1872
+ ]
1873
+ ] = None,
1874
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1875
+ _content_type: Optional[StrictStr] = None,
1876
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1877
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1878
+ ) -> RESTResponseType:
1879
+ """Submit e-reporting to PA/PDP
1880
+
1881
+ Generate and submit e-reporting to a PA (Plateforme Agréée). Authentication strategies (same as invoices): 1. **JWT with client_uid** (recommended): PDP credentials fetched from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in request The e-reporting is submitted using the AFNOR Flow Service API with syntax=FRR (FRench Reporting).
1882
+
1883
+ :param submit_e_reporting_request: (required)
1884
+ :type submit_e_reporting_request: SubmitEReportingRequest
1885
+ :param _request_timeout: timeout setting for this request. If one
1886
+ number provided, it will be total request
1887
+ timeout. It can also be a pair (tuple) of
1888
+ (connection, read) timeouts.
1889
+ :type _request_timeout: int, tuple(int, int), optional
1890
+ :param _request_auth: set to override the auth_settings for an a single
1891
+ request; this effectively ignores the
1892
+ authentication in the spec for a single request.
1893
+ :type _request_auth: dict, optional
1894
+ :param _content_type: force content-type for the request.
1895
+ :type _content_type: str, Optional
1896
+ :param _headers: set to override the headers for a single
1897
+ request; this effectively ignores the headers
1898
+ in the spec for a single request.
1899
+ :type _headers: dict, optional
1900
+ :param _host_index: set to override the host_index for a single
1901
+ request; this effectively ignores the host_index
1902
+ in the spec for a single request.
1903
+ :type _host_index: int, optional
1904
+ :return: Returns the result object.
1905
+ """ # noqa: E501
1906
+
1907
+ _param = self._submit_ereporting_api_v1_ereporting_submit_post_serialize(
1908
+ submit_e_reporting_request=submit_e_reporting_request,
1909
+ _request_auth=_request_auth,
1910
+ _content_type=_content_type,
1911
+ _headers=_headers,
1912
+ _host_index=_host_index
1913
+ )
1914
+
1915
+ _response_types_map: Dict[str, Optional[str]] = {
1916
+ '200': "SubmitEReportingResponse",
1917
+ '400': None,
1918
+ '422': None,
1919
+ '500': None,
1920
+ '401': "APIError",
1921
+ }
1922
+ response_data = self.api_client.call_api(
1923
+ *_param,
1924
+ _request_timeout=_request_timeout
1925
+ )
1926
+ return response_data.response
1927
+
1928
+
1929
+ def _submit_ereporting_api_v1_ereporting_submit_post_serialize(
1930
+ self,
1931
+ submit_e_reporting_request,
1932
+ _request_auth,
1933
+ _content_type,
1934
+ _headers,
1935
+ _host_index,
1936
+ ) -> RequestSerialized:
1937
+
1938
+ _host = None
1939
+
1940
+ _collection_formats: Dict[str, str] = {
1941
+ }
1942
+
1943
+ _path_params: Dict[str, str] = {}
1944
+ _query_params: List[Tuple[str, str]] = []
1945
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1946
+ _form_params: List[Tuple[str, str]] = []
1947
+ _files: Dict[
1948
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1949
+ ] = {}
1950
+ _body_params: Optional[bytes] = None
1951
+
1952
+ # process the path parameters
1953
+ # process the query parameters
1954
+ # process the header parameters
1955
+ # process the form parameters
1956
+ # process the body parameter
1957
+ if submit_e_reporting_request is not None:
1958
+ _body_params = submit_e_reporting_request
1959
+
1960
+
1961
+ # set the HTTP header `Accept`
1962
+ if 'Accept' not in _header_params:
1963
+ _header_params['Accept'] = self.api_client.select_header_accept(
1964
+ [
1965
+ 'application/json'
1966
+ ]
1967
+ )
1968
+
1969
+ # set the HTTP header `Content-Type`
1970
+ if _content_type:
1971
+ _header_params['Content-Type'] = _content_type
1972
+ else:
1973
+ _default_content_type = (
1974
+ self.api_client.select_header_content_type(
1975
+ [
1976
+ 'application/json'
1977
+ ]
1978
+ )
1979
+ )
1980
+ if _default_content_type is not None:
1981
+ _header_params['Content-Type'] = _default_content_type
1982
+
1983
+ # authentication setting
1984
+ _auth_settings: List[str] = [
1985
+ 'HTTPBearer'
1986
+ ]
1987
+
1988
+ return self.api_client.param_serialize(
1989
+ method='POST',
1990
+ resource_path='/api/v1/ereporting/submit',
1991
+ path_params=_path_params,
1992
+ query_params=_query_params,
1993
+ header_params=_header_params,
1994
+ body=_body_params,
1995
+ post_params=_form_params,
1996
+ files=_files,
1997
+ auth_settings=_auth_settings,
1998
+ collection_formats=_collection_formats,
1999
+ _host=_host,
2000
+ _request_auth=_request_auth
2001
+ )
2002
+
2003
+
2004
+
2005
+
2006
+ @validate_call
2007
+ def submit_xml_ereporting_api_v1_ereporting_submit_xml_post(
2008
+ self,
2009
+ xml_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="E-reporting XML file")],
2010
+ tracking_id: Optional[StrictStr] = None,
2011
+ skip_validation: Annotated[Optional[StrictBool], Field(description="Skip XSD validation")] = None,
2012
+ pdp_flow_service_url: Optional[StrictStr] = None,
2013
+ pdp_token_url: Optional[StrictStr] = None,
2014
+ pdp_client_id: Optional[StrictStr] = None,
2015
+ pdp_client_secret: Optional[StrictStr] = None,
2016
+ _request_timeout: Union[
2017
+ None,
2018
+ Annotated[StrictFloat, Field(gt=0)],
2019
+ Tuple[
2020
+ Annotated[StrictFloat, Field(gt=0)],
2021
+ Annotated[StrictFloat, Field(gt=0)]
2022
+ ]
2023
+ ] = None,
2024
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2025
+ _content_type: Optional[StrictStr] = None,
2026
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2027
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2028
+ ) -> SubmitEReportingResponse:
2029
+ """Submit pre-generated e-reporting XML
2030
+
2031
+ Submit a pre-generated e-reporting XML file directly to a PA/PDP. This endpoint is designed for clients who generate their own PPF-compliant XML and only need FactPulse for the PDP submission. **Process:** 1. Validates the XML against PPF XSD schemas 2. Determines the appropriate AFNOR FlowType 3. Submits to the configured PDP/PA 4. Returns the flowId for tracking **Authentication:** Same strategies as /submit endpoint (JWT or zero-storage credentials).
2032
+
2033
+ :param xml_file: E-reporting XML file (required)
2034
+ :type xml_file: bytearray
2035
+ :param tracking_id:
2036
+ :type tracking_id: str
2037
+ :param skip_validation: Skip XSD validation
2038
+ :type skip_validation: bool
2039
+ :param pdp_flow_service_url:
2040
+ :type pdp_flow_service_url: str
2041
+ :param pdp_token_url:
2042
+ :type pdp_token_url: str
2043
+ :param pdp_client_id:
2044
+ :type pdp_client_id: str
2045
+ :param pdp_client_secret:
2046
+ :type pdp_client_secret: str
2047
+ :param _request_timeout: timeout setting for this request. If one
2048
+ number provided, it will be total request
2049
+ timeout. It can also be a pair (tuple) of
2050
+ (connection, read) timeouts.
2051
+ :type _request_timeout: int, tuple(int, int), optional
2052
+ :param _request_auth: set to override the auth_settings for an a single
2053
+ request; this effectively ignores the
2054
+ authentication in the spec for a single request.
2055
+ :type _request_auth: dict, optional
2056
+ :param _content_type: force content-type for the request.
2057
+ :type _content_type: str, Optional
2058
+ :param _headers: set to override the headers for a single
2059
+ request; this effectively ignores the headers
2060
+ in the spec for a single request.
2061
+ :type _headers: dict, optional
2062
+ :param _host_index: set to override the host_index for a single
2063
+ request; this effectively ignores the host_index
2064
+ in the spec for a single request.
2065
+ :type _host_index: int, optional
2066
+ :return: Returns the result object.
2067
+ """ # noqa: E501
2068
+
2069
+ _param = self._submit_xml_ereporting_api_v1_ereporting_submit_xml_post_serialize(
2070
+ xml_file=xml_file,
2071
+ tracking_id=tracking_id,
2072
+ skip_validation=skip_validation,
2073
+ pdp_flow_service_url=pdp_flow_service_url,
2074
+ pdp_token_url=pdp_token_url,
2075
+ pdp_client_id=pdp_client_id,
2076
+ pdp_client_secret=pdp_client_secret,
2077
+ _request_auth=_request_auth,
2078
+ _content_type=_content_type,
2079
+ _headers=_headers,
2080
+ _host_index=_host_index
2081
+ )
2082
+
2083
+ _response_types_map: Dict[str, Optional[str]] = {
2084
+ '200': "SubmitEReportingResponse",
2085
+ '400': None,
2086
+ '422': None,
2087
+ '500': None,
2088
+ '401': "APIError",
2089
+ }
2090
+ response_data = self.api_client.call_api(
2091
+ *_param,
2092
+ _request_timeout=_request_timeout
2093
+ )
2094
+ response_data.read()
2095
+ return self.api_client.response_deserialize(
2096
+ response_data=response_data,
2097
+ response_types_map=_response_types_map,
2098
+ ).data
2099
+
2100
+
2101
+ @validate_call
2102
+ def submit_xml_ereporting_api_v1_ereporting_submit_xml_post_with_http_info(
2103
+ self,
2104
+ xml_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="E-reporting XML file")],
2105
+ tracking_id: Optional[StrictStr] = None,
2106
+ skip_validation: Annotated[Optional[StrictBool], Field(description="Skip XSD validation")] = None,
2107
+ pdp_flow_service_url: Optional[StrictStr] = None,
2108
+ pdp_token_url: Optional[StrictStr] = None,
2109
+ pdp_client_id: Optional[StrictStr] = None,
2110
+ pdp_client_secret: Optional[StrictStr] = None,
2111
+ _request_timeout: Union[
2112
+ None,
2113
+ Annotated[StrictFloat, Field(gt=0)],
2114
+ Tuple[
2115
+ Annotated[StrictFloat, Field(gt=0)],
2116
+ Annotated[StrictFloat, Field(gt=0)]
2117
+ ]
2118
+ ] = None,
2119
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2120
+ _content_type: Optional[StrictStr] = None,
2121
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2122
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2123
+ ) -> ApiResponse[SubmitEReportingResponse]:
2124
+ """Submit pre-generated e-reporting XML
2125
+
2126
+ Submit a pre-generated e-reporting XML file directly to a PA/PDP. This endpoint is designed for clients who generate their own PPF-compliant XML and only need FactPulse for the PDP submission. **Process:** 1. Validates the XML against PPF XSD schemas 2. Determines the appropriate AFNOR FlowType 3. Submits to the configured PDP/PA 4. Returns the flowId for tracking **Authentication:** Same strategies as /submit endpoint (JWT or zero-storage credentials).
2127
+
2128
+ :param xml_file: E-reporting XML file (required)
2129
+ :type xml_file: bytearray
2130
+ :param tracking_id:
2131
+ :type tracking_id: str
2132
+ :param skip_validation: Skip XSD validation
2133
+ :type skip_validation: bool
2134
+ :param pdp_flow_service_url:
2135
+ :type pdp_flow_service_url: str
2136
+ :param pdp_token_url:
2137
+ :type pdp_token_url: str
2138
+ :param pdp_client_id:
2139
+ :type pdp_client_id: str
2140
+ :param pdp_client_secret:
2141
+ :type pdp_client_secret: str
2142
+ :param _request_timeout: timeout setting for this request. If one
2143
+ number provided, it will be total request
2144
+ timeout. It can also be a pair (tuple) of
2145
+ (connection, read) timeouts.
2146
+ :type _request_timeout: int, tuple(int, int), optional
2147
+ :param _request_auth: set to override the auth_settings for an a single
2148
+ request; this effectively ignores the
2149
+ authentication in the spec for a single request.
2150
+ :type _request_auth: dict, optional
2151
+ :param _content_type: force content-type for the request.
2152
+ :type _content_type: str, Optional
2153
+ :param _headers: set to override the headers for a single
2154
+ request; this effectively ignores the headers
2155
+ in the spec for a single request.
2156
+ :type _headers: dict, optional
2157
+ :param _host_index: set to override the host_index for a single
2158
+ request; this effectively ignores the host_index
2159
+ in the spec for a single request.
2160
+ :type _host_index: int, optional
2161
+ :return: Returns the result object.
2162
+ """ # noqa: E501
2163
+
2164
+ _param = self._submit_xml_ereporting_api_v1_ereporting_submit_xml_post_serialize(
2165
+ xml_file=xml_file,
2166
+ tracking_id=tracking_id,
2167
+ skip_validation=skip_validation,
2168
+ pdp_flow_service_url=pdp_flow_service_url,
2169
+ pdp_token_url=pdp_token_url,
2170
+ pdp_client_id=pdp_client_id,
2171
+ pdp_client_secret=pdp_client_secret,
2172
+ _request_auth=_request_auth,
2173
+ _content_type=_content_type,
2174
+ _headers=_headers,
2175
+ _host_index=_host_index
2176
+ )
2177
+
2178
+ _response_types_map: Dict[str, Optional[str]] = {
2179
+ '200': "SubmitEReportingResponse",
2180
+ '400': None,
2181
+ '422': None,
2182
+ '500': None,
2183
+ '401': "APIError",
2184
+ }
2185
+ response_data = self.api_client.call_api(
2186
+ *_param,
2187
+ _request_timeout=_request_timeout
2188
+ )
2189
+ response_data.read()
2190
+ return self.api_client.response_deserialize(
2191
+ response_data=response_data,
2192
+ response_types_map=_response_types_map,
2193
+ )
2194
+
2195
+
2196
+ @validate_call
2197
+ def submit_xml_ereporting_api_v1_ereporting_submit_xml_post_without_preload_content(
2198
+ self,
2199
+ xml_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="E-reporting XML file")],
2200
+ tracking_id: Optional[StrictStr] = None,
2201
+ skip_validation: Annotated[Optional[StrictBool], Field(description="Skip XSD validation")] = None,
2202
+ pdp_flow_service_url: Optional[StrictStr] = None,
2203
+ pdp_token_url: Optional[StrictStr] = None,
2204
+ pdp_client_id: Optional[StrictStr] = None,
2205
+ pdp_client_secret: Optional[StrictStr] = None,
2206
+ _request_timeout: Union[
2207
+ None,
2208
+ Annotated[StrictFloat, Field(gt=0)],
2209
+ Tuple[
2210
+ Annotated[StrictFloat, Field(gt=0)],
2211
+ Annotated[StrictFloat, Field(gt=0)]
2212
+ ]
2213
+ ] = None,
2214
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2215
+ _content_type: Optional[StrictStr] = None,
2216
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2217
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2218
+ ) -> RESTResponseType:
2219
+ """Submit pre-generated e-reporting XML
2220
+
2221
+ Submit a pre-generated e-reporting XML file directly to a PA/PDP. This endpoint is designed for clients who generate their own PPF-compliant XML and only need FactPulse for the PDP submission. **Process:** 1. Validates the XML against PPF XSD schemas 2. Determines the appropriate AFNOR FlowType 3. Submits to the configured PDP/PA 4. Returns the flowId for tracking **Authentication:** Same strategies as /submit endpoint (JWT or zero-storage credentials).
2222
+
2223
+ :param xml_file: E-reporting XML file (required)
2224
+ :type xml_file: bytearray
2225
+ :param tracking_id:
2226
+ :type tracking_id: str
2227
+ :param skip_validation: Skip XSD validation
2228
+ :type skip_validation: bool
2229
+ :param pdp_flow_service_url:
2230
+ :type pdp_flow_service_url: str
2231
+ :param pdp_token_url:
2232
+ :type pdp_token_url: str
2233
+ :param pdp_client_id:
2234
+ :type pdp_client_id: str
2235
+ :param pdp_client_secret:
2236
+ :type pdp_client_secret: str
2237
+ :param _request_timeout: timeout setting for this request. If one
2238
+ number provided, it will be total request
2239
+ timeout. It can also be a pair (tuple) of
2240
+ (connection, read) timeouts.
2241
+ :type _request_timeout: int, tuple(int, int), optional
2242
+ :param _request_auth: set to override the auth_settings for an a single
2243
+ request; this effectively ignores the
2244
+ authentication in the spec for a single request.
2245
+ :type _request_auth: dict, optional
2246
+ :param _content_type: force content-type for the request.
2247
+ :type _content_type: str, Optional
2248
+ :param _headers: set to override the headers for a single
2249
+ request; this effectively ignores the headers
2250
+ in the spec for a single request.
2251
+ :type _headers: dict, optional
2252
+ :param _host_index: set to override the host_index for a single
2253
+ request; this effectively ignores the host_index
2254
+ in the spec for a single request.
2255
+ :type _host_index: int, optional
2256
+ :return: Returns the result object.
2257
+ """ # noqa: E501
2258
+
2259
+ _param = self._submit_xml_ereporting_api_v1_ereporting_submit_xml_post_serialize(
2260
+ xml_file=xml_file,
2261
+ tracking_id=tracking_id,
2262
+ skip_validation=skip_validation,
2263
+ pdp_flow_service_url=pdp_flow_service_url,
2264
+ pdp_token_url=pdp_token_url,
2265
+ pdp_client_id=pdp_client_id,
2266
+ pdp_client_secret=pdp_client_secret,
2267
+ _request_auth=_request_auth,
2268
+ _content_type=_content_type,
2269
+ _headers=_headers,
2270
+ _host_index=_host_index
2271
+ )
2272
+
2273
+ _response_types_map: Dict[str, Optional[str]] = {
2274
+ '200': "SubmitEReportingResponse",
2275
+ '400': None,
2276
+ '422': None,
2277
+ '500': None,
2278
+ '401': "APIError",
2279
+ }
2280
+ response_data = self.api_client.call_api(
2281
+ *_param,
2282
+ _request_timeout=_request_timeout
2283
+ )
2284
+ return response_data.response
2285
+
2286
+
2287
+ def _submit_xml_ereporting_api_v1_ereporting_submit_xml_post_serialize(
2288
+ self,
2289
+ xml_file,
2290
+ tracking_id,
2291
+ skip_validation,
2292
+ pdp_flow_service_url,
2293
+ pdp_token_url,
2294
+ pdp_client_id,
2295
+ pdp_client_secret,
2296
+ _request_auth,
2297
+ _content_type,
2298
+ _headers,
2299
+ _host_index,
2300
+ ) -> RequestSerialized:
2301
+
2302
+ _host = None
2303
+
2304
+ _collection_formats: Dict[str, str] = {
2305
+ }
2306
+
2307
+ _path_params: Dict[str, str] = {}
2308
+ _query_params: List[Tuple[str, str]] = []
2309
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2310
+ _form_params: List[Tuple[str, str]] = []
2311
+ _files: Dict[
2312
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2313
+ ] = {}
2314
+ _body_params: Optional[bytes] = None
2315
+
2316
+ # process the path parameters
2317
+ # process the query parameters
2318
+ # process the header parameters
2319
+ # process the form parameters
2320
+ if xml_file is not None:
2321
+ _files['xml_file'] = xml_file
2322
+ if tracking_id is not None:
2323
+ _form_params.append(('tracking_id', tracking_id))
2324
+ if skip_validation is not None:
2325
+ _form_params.append(('skip_validation', skip_validation))
2326
+ if pdp_flow_service_url is not None:
2327
+ _form_params.append(('pdp_flow_service_url', pdp_flow_service_url))
2328
+ if pdp_token_url is not None:
2329
+ _form_params.append(('pdp_token_url', pdp_token_url))
2330
+ if pdp_client_id is not None:
2331
+ _form_params.append(('pdp_client_id', pdp_client_id))
2332
+ if pdp_client_secret is not None:
2333
+ _form_params.append(('pdp_client_secret', pdp_client_secret))
2334
+ # process the body parameter
2335
+
2336
+
2337
+ # set the HTTP header `Accept`
2338
+ if 'Accept' not in _header_params:
2339
+ _header_params['Accept'] = self.api_client.select_header_accept(
2340
+ [
2341
+ 'application/json'
2342
+ ]
2343
+ )
2344
+
2345
+ # set the HTTP header `Content-Type`
2346
+ if _content_type:
2347
+ _header_params['Content-Type'] = _content_type
2348
+ else:
2349
+ _default_content_type = (
2350
+ self.api_client.select_header_content_type(
2351
+ [
2352
+ 'multipart/form-data'
2353
+ ]
2354
+ )
2355
+ )
2356
+ if _default_content_type is not None:
2357
+ _header_params['Content-Type'] = _default_content_type
2358
+
2359
+ # authentication setting
2360
+ _auth_settings: List[str] = [
2361
+ 'HTTPBearer'
2362
+ ]
2363
+
2364
+ return self.api_client.param_serialize(
2365
+ method='POST',
2366
+ resource_path='/api/v1/ereporting/submit-xml',
2367
+ path_params=_path_params,
2368
+ query_params=_query_params,
2369
+ header_params=_header_params,
2370
+ body=_body_params,
2371
+ post_params=_form_params,
2372
+ files=_files,
2373
+ auth_settings=_auth_settings,
2374
+ collection_formats=_collection_formats,
2375
+ _host=_host,
2376
+ _request_auth=_request_auth
2377
+ )
2378
+
2379
+
2380
+
2381
+
2382
+ @validate_call
2383
+ def validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post(
2384
+ self,
2385
+ create_aggregated_report_request: CreateAggregatedReportRequest,
2386
+ _request_timeout: Union[
2387
+ None,
2388
+ Annotated[StrictFloat, Field(gt=0)],
2389
+ Tuple[
2390
+ Annotated[StrictFloat, Field(gt=0)],
2391
+ Annotated[StrictFloat, Field(gt=0)]
2392
+ ]
2393
+ ] = None,
2394
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2395
+ _content_type: Optional[StrictStr] = None,
2396
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2397
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2398
+ ) -> Dict[str, object]:
2399
+ """Validate aggregated e-reporting data
2400
+
2401
+ Validates aggregated e-reporting data without generating XML.
2402
+
2403
+ :param create_aggregated_report_request: (required)
2404
+ :type create_aggregated_report_request: CreateAggregatedReportRequest
2405
+ :param _request_timeout: timeout setting for this request. If one
2406
+ number provided, it will be total request
2407
+ timeout. It can also be a pair (tuple) of
2408
+ (connection, read) timeouts.
2409
+ :type _request_timeout: int, tuple(int, int), optional
2410
+ :param _request_auth: set to override the auth_settings for an a single
2411
+ request; this effectively ignores the
2412
+ authentication in the spec for a single request.
2413
+ :type _request_auth: dict, optional
2414
+ :param _content_type: force content-type for the request.
2415
+ :type _content_type: str, Optional
2416
+ :param _headers: set to override the headers for a single
2417
+ request; this effectively ignores the headers
2418
+ in the spec for a single request.
2419
+ :type _headers: dict, optional
2420
+ :param _host_index: set to override the host_index for a single
2421
+ request; this effectively ignores the host_index
2422
+ in the spec for a single request.
2423
+ :type _host_index: int, optional
2424
+ :return: Returns the result object.
2425
+ """ # noqa: E501
2426
+
2427
+ _param = self._validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post_serialize(
2428
+ create_aggregated_report_request=create_aggregated_report_request,
2429
+ _request_auth=_request_auth,
2430
+ _content_type=_content_type,
2431
+ _headers=_headers,
2432
+ _host_index=_host_index
2433
+ )
2434
+
2435
+ _response_types_map: Dict[str, Optional[str]] = {
2436
+ '200': "Dict[str, object]",
2437
+ '400': None,
2438
+ '422': None,
2439
+ '500': None,
2440
+ '401': "APIError",
2441
+ }
2442
+ response_data = self.api_client.call_api(
2443
+ *_param,
2444
+ _request_timeout=_request_timeout
2445
+ )
2446
+ response_data.read()
2447
+ return self.api_client.response_deserialize(
2448
+ response_data=response_data,
2449
+ response_types_map=_response_types_map,
2450
+ ).data
2451
+
2452
+
2453
+ @validate_call
2454
+ def validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post_with_http_info(
2455
+ self,
2456
+ create_aggregated_report_request: CreateAggregatedReportRequest,
2457
+ _request_timeout: Union[
2458
+ None,
2459
+ Annotated[StrictFloat, Field(gt=0)],
2460
+ Tuple[
2461
+ Annotated[StrictFloat, Field(gt=0)],
2462
+ Annotated[StrictFloat, Field(gt=0)]
2463
+ ]
2464
+ ] = None,
2465
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2466
+ _content_type: Optional[StrictStr] = None,
2467
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2468
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2469
+ ) -> ApiResponse[Dict[str, object]]:
2470
+ """Validate aggregated e-reporting data
2471
+
2472
+ Validates aggregated e-reporting data without generating XML.
2473
+
2474
+ :param create_aggregated_report_request: (required)
2475
+ :type create_aggregated_report_request: CreateAggregatedReportRequest
2476
+ :param _request_timeout: timeout setting for this request. If one
2477
+ number provided, it will be total request
2478
+ timeout. It can also be a pair (tuple) of
2479
+ (connection, read) timeouts.
2480
+ :type _request_timeout: int, tuple(int, int), optional
2481
+ :param _request_auth: set to override the auth_settings for an a single
2482
+ request; this effectively ignores the
2483
+ authentication in the spec for a single request.
2484
+ :type _request_auth: dict, optional
2485
+ :param _content_type: force content-type for the request.
2486
+ :type _content_type: str, Optional
2487
+ :param _headers: set to override the headers for a single
2488
+ request; this effectively ignores the headers
2489
+ in the spec for a single request.
2490
+ :type _headers: dict, optional
2491
+ :param _host_index: set to override the host_index for a single
2492
+ request; this effectively ignores the host_index
2493
+ in the spec for a single request.
2494
+ :type _host_index: int, optional
2495
+ :return: Returns the result object.
2496
+ """ # noqa: E501
2497
+
2498
+ _param = self._validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post_serialize(
2499
+ create_aggregated_report_request=create_aggregated_report_request,
2500
+ _request_auth=_request_auth,
2501
+ _content_type=_content_type,
2502
+ _headers=_headers,
2503
+ _host_index=_host_index
2504
+ )
2505
+
2506
+ _response_types_map: Dict[str, Optional[str]] = {
2507
+ '200': "Dict[str, object]",
2508
+ '400': None,
2509
+ '422': None,
2510
+ '500': None,
2511
+ '401': "APIError",
2512
+ }
2513
+ response_data = self.api_client.call_api(
2514
+ *_param,
2515
+ _request_timeout=_request_timeout
2516
+ )
2517
+ response_data.read()
2518
+ return self.api_client.response_deserialize(
2519
+ response_data=response_data,
2520
+ response_types_map=_response_types_map,
2521
+ )
2522
+
2523
+
2524
+ @validate_call
2525
+ def validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post_without_preload_content(
2526
+ self,
2527
+ create_aggregated_report_request: CreateAggregatedReportRequest,
2528
+ _request_timeout: Union[
2529
+ None,
2530
+ Annotated[StrictFloat, Field(gt=0)],
2531
+ Tuple[
2532
+ Annotated[StrictFloat, Field(gt=0)],
2533
+ Annotated[StrictFloat, Field(gt=0)]
2534
+ ]
2535
+ ] = None,
2536
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2537
+ _content_type: Optional[StrictStr] = None,
2538
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2539
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2540
+ ) -> RESTResponseType:
2541
+ """Validate aggregated e-reporting data
2542
+
2543
+ Validates aggregated e-reporting data without generating XML.
2544
+
2545
+ :param create_aggregated_report_request: (required)
2546
+ :type create_aggregated_report_request: CreateAggregatedReportRequest
2547
+ :param _request_timeout: timeout setting for this request. If one
2548
+ number provided, it will be total request
2549
+ timeout. It can also be a pair (tuple) of
2550
+ (connection, read) timeouts.
2551
+ :type _request_timeout: int, tuple(int, int), optional
2552
+ :param _request_auth: set to override the auth_settings for an a single
2553
+ request; this effectively ignores the
2554
+ authentication in the spec for a single request.
2555
+ :type _request_auth: dict, optional
2556
+ :param _content_type: force content-type for the request.
2557
+ :type _content_type: str, Optional
2558
+ :param _headers: set to override the headers for a single
2559
+ request; this effectively ignores the headers
2560
+ in the spec for a single request.
2561
+ :type _headers: dict, optional
2562
+ :param _host_index: set to override the host_index for a single
2563
+ request; this effectively ignores the host_index
2564
+ in the spec for a single request.
2565
+ :type _host_index: int, optional
2566
+ :return: Returns the result object.
2567
+ """ # noqa: E501
2568
+
2569
+ _param = self._validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post_serialize(
2570
+ create_aggregated_report_request=create_aggregated_report_request,
2571
+ _request_auth=_request_auth,
2572
+ _content_type=_content_type,
2573
+ _headers=_headers,
2574
+ _host_index=_host_index
2575
+ )
2576
+
2577
+ _response_types_map: Dict[str, Optional[str]] = {
2578
+ '200': "Dict[str, object]",
2579
+ '400': None,
2580
+ '422': None,
2581
+ '500': None,
2582
+ '401': "APIError",
2583
+ }
2584
+ response_data = self.api_client.call_api(
2585
+ *_param,
2586
+ _request_timeout=_request_timeout
2587
+ )
2588
+ return response_data.response
2589
+
2590
+
2591
+ def _validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post_serialize(
2592
+ self,
2593
+ create_aggregated_report_request,
2594
+ _request_auth,
2595
+ _content_type,
2596
+ _headers,
2597
+ _host_index,
2598
+ ) -> RequestSerialized:
2599
+
2600
+ _host = None
2601
+
2602
+ _collection_formats: Dict[str, str] = {
2603
+ }
2604
+
2605
+ _path_params: Dict[str, str] = {}
2606
+ _query_params: List[Tuple[str, str]] = []
2607
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2608
+ _form_params: List[Tuple[str, str]] = []
2609
+ _files: Dict[
2610
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2611
+ ] = {}
2612
+ _body_params: Optional[bytes] = None
2613
+
2614
+ # process the path parameters
2615
+ # process the query parameters
2616
+ # process the header parameters
2617
+ # process the form parameters
2618
+ # process the body parameter
2619
+ if create_aggregated_report_request is not None:
2620
+ _body_params = create_aggregated_report_request
2621
+
2622
+
2623
+ # set the HTTP header `Accept`
2624
+ if 'Accept' not in _header_params:
2625
+ _header_params['Accept'] = self.api_client.select_header_accept(
2626
+ [
2627
+ 'application/json'
2628
+ ]
2629
+ )
2630
+
2631
+ # set the HTTP header `Content-Type`
2632
+ if _content_type:
2633
+ _header_params['Content-Type'] = _content_type
2634
+ else:
2635
+ _default_content_type = (
2636
+ self.api_client.select_header_content_type(
2637
+ [
2638
+ 'application/json'
2639
+ ]
2640
+ )
2641
+ )
2642
+ if _default_content_type is not None:
2643
+ _header_params['Content-Type'] = _default_content_type
2644
+
2645
+ # authentication setting
2646
+ _auth_settings: List[str] = [
2647
+ 'HTTPBearer'
2648
+ ]
2649
+
2650
+ return self.api_client.param_serialize(
2651
+ method='POST',
2652
+ resource_path='/api/v1/ereporting/validate-aggregated',
2653
+ path_params=_path_params,
2654
+ query_params=_query_params,
2655
+ header_params=_header_params,
2656
+ body=_body_params,
2657
+ post_params=_form_params,
2658
+ files=_files,
2659
+ auth_settings=_auth_settings,
2660
+ collection_formats=_collection_formats,
2661
+ _host=_host,
2662
+ _request_auth=_request_auth
2663
+ )
2664
+
2665
+
2666
+
2667
+
2668
+ @validate_call
2669
+ def validate_ereporting_api_v1_ereporting_validate_post(
2670
+ self,
2671
+ validate_e_reporting_request: ValidateEReportingRequest,
2672
+ _request_timeout: Union[
2673
+ None,
2674
+ Annotated[StrictFloat, Field(gt=0)],
2675
+ Tuple[
2676
+ Annotated[StrictFloat, Field(gt=0)],
2677
+ Annotated[StrictFloat, Field(gt=0)]
2678
+ ]
2679
+ ] = None,
2680
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2681
+ _content_type: Optional[StrictStr] = None,
2682
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2683
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2684
+ ) -> ValidateEReportingResponse:
2685
+ """Validate e-reporting data
2686
+
2687
+ Validate e-reporting data without generating or submitting. Performs: - Schema validation - Business rule validation (correct flux type vs data) - Data consistency checks (tax totals, dates, etc.) Returns validation errors and warnings.
2688
+
2689
+ :param validate_e_reporting_request: (required)
2690
+ :type validate_e_reporting_request: ValidateEReportingRequest
2691
+ :param _request_timeout: timeout setting for this request. If one
2692
+ number provided, it will be total request
2693
+ timeout. It can also be a pair (tuple) of
2694
+ (connection, read) timeouts.
2695
+ :type _request_timeout: int, tuple(int, int), optional
2696
+ :param _request_auth: set to override the auth_settings for an a single
2697
+ request; this effectively ignores the
2698
+ authentication in the spec for a single request.
2699
+ :type _request_auth: dict, optional
2700
+ :param _content_type: force content-type for the request.
2701
+ :type _content_type: str, Optional
2702
+ :param _headers: set to override the headers for a single
2703
+ request; this effectively ignores the headers
2704
+ in the spec for a single request.
2705
+ :type _headers: dict, optional
2706
+ :param _host_index: set to override the host_index for a single
2707
+ request; this effectively ignores the host_index
2708
+ in the spec for a single request.
2709
+ :type _host_index: int, optional
2710
+ :return: Returns the result object.
2711
+ """ # noqa: E501
2712
+
2713
+ _param = self._validate_ereporting_api_v1_ereporting_validate_post_serialize(
2714
+ validate_e_reporting_request=validate_e_reporting_request,
2715
+ _request_auth=_request_auth,
2716
+ _content_type=_content_type,
2717
+ _headers=_headers,
2718
+ _host_index=_host_index
2719
+ )
2720
+
2721
+ _response_types_map: Dict[str, Optional[str]] = {
2722
+ '200': "ValidateEReportingResponse",
2723
+ '400': None,
2724
+ '422': None,
2725
+ '500': None,
2726
+ '401': "APIError",
2727
+ }
2728
+ response_data = self.api_client.call_api(
2729
+ *_param,
2730
+ _request_timeout=_request_timeout
2731
+ )
2732
+ response_data.read()
2733
+ return self.api_client.response_deserialize(
2734
+ response_data=response_data,
2735
+ response_types_map=_response_types_map,
2736
+ ).data
2737
+
2738
+
2739
+ @validate_call
2740
+ def validate_ereporting_api_v1_ereporting_validate_post_with_http_info(
2741
+ self,
2742
+ validate_e_reporting_request: ValidateEReportingRequest,
2743
+ _request_timeout: Union[
2744
+ None,
2745
+ Annotated[StrictFloat, Field(gt=0)],
2746
+ Tuple[
2747
+ Annotated[StrictFloat, Field(gt=0)],
2748
+ Annotated[StrictFloat, Field(gt=0)]
2749
+ ]
2750
+ ] = None,
2751
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2752
+ _content_type: Optional[StrictStr] = None,
2753
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2754
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2755
+ ) -> ApiResponse[ValidateEReportingResponse]:
2756
+ """Validate e-reporting data
2757
+
2758
+ Validate e-reporting data without generating or submitting. Performs: - Schema validation - Business rule validation (correct flux type vs data) - Data consistency checks (tax totals, dates, etc.) Returns validation errors and warnings.
2759
+
2760
+ :param validate_e_reporting_request: (required)
2761
+ :type validate_e_reporting_request: ValidateEReportingRequest
2762
+ :param _request_timeout: timeout setting for this request. If one
2763
+ number provided, it will be total request
2764
+ timeout. It can also be a pair (tuple) of
2765
+ (connection, read) timeouts.
2766
+ :type _request_timeout: int, tuple(int, int), optional
2767
+ :param _request_auth: set to override the auth_settings for an a single
2768
+ request; this effectively ignores the
2769
+ authentication in the spec for a single request.
2770
+ :type _request_auth: dict, optional
2771
+ :param _content_type: force content-type for the request.
2772
+ :type _content_type: str, Optional
2773
+ :param _headers: set to override the headers for a single
2774
+ request; this effectively ignores the headers
2775
+ in the spec for a single request.
2776
+ :type _headers: dict, optional
2777
+ :param _host_index: set to override the host_index for a single
2778
+ request; this effectively ignores the host_index
2779
+ in the spec for a single request.
2780
+ :type _host_index: int, optional
2781
+ :return: Returns the result object.
2782
+ """ # noqa: E501
2783
+
2784
+ _param = self._validate_ereporting_api_v1_ereporting_validate_post_serialize(
2785
+ validate_e_reporting_request=validate_e_reporting_request,
2786
+ _request_auth=_request_auth,
2787
+ _content_type=_content_type,
2788
+ _headers=_headers,
2789
+ _host_index=_host_index
2790
+ )
2791
+
2792
+ _response_types_map: Dict[str, Optional[str]] = {
2793
+ '200': "ValidateEReportingResponse",
2794
+ '400': None,
2795
+ '422': None,
2796
+ '500': None,
2797
+ '401': "APIError",
2798
+ }
2799
+ response_data = self.api_client.call_api(
2800
+ *_param,
2801
+ _request_timeout=_request_timeout
2802
+ )
2803
+ response_data.read()
2804
+ return self.api_client.response_deserialize(
2805
+ response_data=response_data,
2806
+ response_types_map=_response_types_map,
2807
+ )
2808
+
2809
+
2810
+ @validate_call
2811
+ def validate_ereporting_api_v1_ereporting_validate_post_without_preload_content(
2812
+ self,
2813
+ validate_e_reporting_request: ValidateEReportingRequest,
2814
+ _request_timeout: Union[
2815
+ None,
2816
+ Annotated[StrictFloat, Field(gt=0)],
2817
+ Tuple[
2818
+ Annotated[StrictFloat, Field(gt=0)],
2819
+ Annotated[StrictFloat, Field(gt=0)]
2820
+ ]
2821
+ ] = None,
2822
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2823
+ _content_type: Optional[StrictStr] = None,
2824
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2825
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2826
+ ) -> RESTResponseType:
2827
+ """Validate e-reporting data
2828
+
2829
+ Validate e-reporting data without generating or submitting. Performs: - Schema validation - Business rule validation (correct flux type vs data) - Data consistency checks (tax totals, dates, etc.) Returns validation errors and warnings.
2830
+
2831
+ :param validate_e_reporting_request: (required)
2832
+ :type validate_e_reporting_request: ValidateEReportingRequest
2833
+ :param _request_timeout: timeout setting for this request. If one
2834
+ number provided, it will be total request
2835
+ timeout. It can also be a pair (tuple) of
2836
+ (connection, read) timeouts.
2837
+ :type _request_timeout: int, tuple(int, int), optional
2838
+ :param _request_auth: set to override the auth_settings for an a single
2839
+ request; this effectively ignores the
2840
+ authentication in the spec for a single request.
2841
+ :type _request_auth: dict, optional
2842
+ :param _content_type: force content-type for the request.
2843
+ :type _content_type: str, Optional
2844
+ :param _headers: set to override the headers for a single
2845
+ request; this effectively ignores the headers
2846
+ in the spec for a single request.
2847
+ :type _headers: dict, optional
2848
+ :param _host_index: set to override the host_index for a single
2849
+ request; this effectively ignores the host_index
2850
+ in the spec for a single request.
2851
+ :type _host_index: int, optional
2852
+ :return: Returns the result object.
2853
+ """ # noqa: E501
2854
+
2855
+ _param = self._validate_ereporting_api_v1_ereporting_validate_post_serialize(
2856
+ validate_e_reporting_request=validate_e_reporting_request,
2857
+ _request_auth=_request_auth,
2858
+ _content_type=_content_type,
2859
+ _headers=_headers,
2860
+ _host_index=_host_index
2861
+ )
2862
+
2863
+ _response_types_map: Dict[str, Optional[str]] = {
2864
+ '200': "ValidateEReportingResponse",
2865
+ '400': None,
2866
+ '422': None,
2867
+ '500': None,
2868
+ '401': "APIError",
2869
+ }
2870
+ response_data = self.api_client.call_api(
2871
+ *_param,
2872
+ _request_timeout=_request_timeout
2873
+ )
2874
+ return response_data.response
2875
+
2876
+
2877
+ def _validate_ereporting_api_v1_ereporting_validate_post_serialize(
2878
+ self,
2879
+ validate_e_reporting_request,
2880
+ _request_auth,
2881
+ _content_type,
2882
+ _headers,
2883
+ _host_index,
2884
+ ) -> RequestSerialized:
2885
+
2886
+ _host = None
2887
+
2888
+ _collection_formats: Dict[str, str] = {
2889
+ }
2890
+
2891
+ _path_params: Dict[str, str] = {}
2892
+ _query_params: List[Tuple[str, str]] = []
2893
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2894
+ _form_params: List[Tuple[str, str]] = []
2895
+ _files: Dict[
2896
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2897
+ ] = {}
2898
+ _body_params: Optional[bytes] = None
2899
+
2900
+ # process the path parameters
2901
+ # process the query parameters
2902
+ # process the header parameters
2903
+ # process the form parameters
2904
+ # process the body parameter
2905
+ if validate_e_reporting_request is not None:
2906
+ _body_params = validate_e_reporting_request
2907
+
2908
+
2909
+ # set the HTTP header `Accept`
2910
+ if 'Accept' not in _header_params:
2911
+ _header_params['Accept'] = self.api_client.select_header_accept(
2912
+ [
2913
+ 'application/json'
2914
+ ]
2915
+ )
2916
+
2917
+ # set the HTTP header `Content-Type`
2918
+ if _content_type:
2919
+ _header_params['Content-Type'] = _content_type
2920
+ else:
2921
+ _default_content_type = (
2922
+ self.api_client.select_header_content_type(
2923
+ [
2924
+ 'application/json'
2925
+ ]
2926
+ )
2927
+ )
2928
+ if _default_content_type is not None:
2929
+ _header_params['Content-Type'] = _default_content_type
2930
+
2931
+ # authentication setting
2932
+ _auth_settings: List[str] = [
2933
+ 'HTTPBearer'
2934
+ ]
2935
+
2936
+ return self.api_client.param_serialize(
2937
+ method='POST',
2938
+ resource_path='/api/v1/ereporting/validate',
2939
+ path_params=_path_params,
2940
+ query_params=_query_params,
2941
+ header_params=_header_params,
2942
+ body=_body_params,
2943
+ post_params=_form_params,
2944
+ files=_files,
2945
+ auth_settings=_auth_settings,
2946
+ collection_formats=_collection_formats,
2947
+ _host=_host,
2948
+ _request_auth=_request_auth
2949
+ )
2950
+
2951
+
2952
+
2953
+
2954
+ @validate_call
2955
+ def validate_xml_ereporting_api_v1_ereporting_validate_xml_post(
2956
+ self,
2957
+ xml_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="E-reporting XML file to validate")],
2958
+ validate_business_rules: Annotated[Optional[StrictBool], Field(description="Also validate business rules (ISO codes, enums)")] = None,
2959
+ _request_timeout: Union[
2960
+ None,
2961
+ Annotated[StrictFloat, Field(gt=0)],
2962
+ Tuple[
2963
+ Annotated[StrictFloat, Field(gt=0)],
2964
+ Annotated[StrictFloat, Field(gt=0)]
2965
+ ]
2966
+ ] = None,
2967
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2968
+ _content_type: Optional[StrictStr] = None,
2969
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2970
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2971
+ ) -> Dict[str, object]:
2972
+ """Validate e-reporting XML against PPF XSD schemas and business rules
2973
+
2974
+ Validates an e-reporting XML file against: 1. **XSD schemas**: Official PPF e-reporting XSD (structure, types, cardinality) 2. **Business rules**: ISO codes and enum validation - Currency codes (ISO 4217: EUR, USD, GBP, etc.) - Country codes (ISO 3166-1 alpha-2: FR, DE, US, etc.) - Scheme IDs (0009=SIRET, 0002=SIREN, etc.) - Role codes (UNCL 3035: SE=Seller, BY=Buyer, WK=Working party, etc.) Returns validation status and detailed error messages if invalid.
2975
+
2976
+ :param xml_file: E-reporting XML file to validate (required)
2977
+ :type xml_file: bytearray
2978
+ :param validate_business_rules: Also validate business rules (ISO codes, enums)
2979
+ :type validate_business_rules: bool
2980
+ :param _request_timeout: timeout setting for this request. If one
2981
+ number provided, it will be total request
2982
+ timeout. It can also be a pair (tuple) of
2983
+ (connection, read) timeouts.
2984
+ :type _request_timeout: int, tuple(int, int), optional
2985
+ :param _request_auth: set to override the auth_settings for an a single
2986
+ request; this effectively ignores the
2987
+ authentication in the spec for a single request.
2988
+ :type _request_auth: dict, optional
2989
+ :param _content_type: force content-type for the request.
2990
+ :type _content_type: str, Optional
2991
+ :param _headers: set to override the headers for a single
2992
+ request; this effectively ignores the headers
2993
+ in the spec for a single request.
2994
+ :type _headers: dict, optional
2995
+ :param _host_index: set to override the host_index for a single
2996
+ request; this effectively ignores the host_index
2997
+ in the spec for a single request.
2998
+ :type _host_index: int, optional
2999
+ :return: Returns the result object.
3000
+ """ # noqa: E501
3001
+
3002
+ _param = self._validate_xml_ereporting_api_v1_ereporting_validate_xml_post_serialize(
3003
+ xml_file=xml_file,
3004
+ validate_business_rules=validate_business_rules,
3005
+ _request_auth=_request_auth,
3006
+ _content_type=_content_type,
3007
+ _headers=_headers,
3008
+ _host_index=_host_index
3009
+ )
3010
+
3011
+ _response_types_map: Dict[str, Optional[str]] = {
3012
+ '200': "Dict[str, object]",
3013
+ '400': None,
3014
+ '422': None,
3015
+ '500': None,
3016
+ '401': "APIError",
3017
+ }
3018
+ response_data = self.api_client.call_api(
3019
+ *_param,
3020
+ _request_timeout=_request_timeout
3021
+ )
3022
+ response_data.read()
3023
+ return self.api_client.response_deserialize(
3024
+ response_data=response_data,
3025
+ response_types_map=_response_types_map,
3026
+ ).data
3027
+
3028
+
3029
+ @validate_call
3030
+ def validate_xml_ereporting_api_v1_ereporting_validate_xml_post_with_http_info(
3031
+ self,
3032
+ xml_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="E-reporting XML file to validate")],
3033
+ validate_business_rules: Annotated[Optional[StrictBool], Field(description="Also validate business rules (ISO codes, enums)")] = None,
3034
+ _request_timeout: Union[
3035
+ None,
3036
+ Annotated[StrictFloat, Field(gt=0)],
3037
+ Tuple[
3038
+ Annotated[StrictFloat, Field(gt=0)],
3039
+ Annotated[StrictFloat, Field(gt=0)]
3040
+ ]
3041
+ ] = None,
3042
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3043
+ _content_type: Optional[StrictStr] = None,
3044
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3045
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3046
+ ) -> ApiResponse[Dict[str, object]]:
3047
+ """Validate e-reporting XML against PPF XSD schemas and business rules
3048
+
3049
+ Validates an e-reporting XML file against: 1. **XSD schemas**: Official PPF e-reporting XSD (structure, types, cardinality) 2. **Business rules**: ISO codes and enum validation - Currency codes (ISO 4217: EUR, USD, GBP, etc.) - Country codes (ISO 3166-1 alpha-2: FR, DE, US, etc.) - Scheme IDs (0009=SIRET, 0002=SIREN, etc.) - Role codes (UNCL 3035: SE=Seller, BY=Buyer, WK=Working party, etc.) Returns validation status and detailed error messages if invalid.
3050
+
3051
+ :param xml_file: E-reporting XML file to validate (required)
3052
+ :type xml_file: bytearray
3053
+ :param validate_business_rules: Also validate business rules (ISO codes, enums)
3054
+ :type validate_business_rules: bool
3055
+ :param _request_timeout: timeout setting for this request. If one
3056
+ number provided, it will be total request
3057
+ timeout. It can also be a pair (tuple) of
3058
+ (connection, read) timeouts.
3059
+ :type _request_timeout: int, tuple(int, int), optional
3060
+ :param _request_auth: set to override the auth_settings for an a single
3061
+ request; this effectively ignores the
3062
+ authentication in the spec for a single request.
3063
+ :type _request_auth: dict, optional
3064
+ :param _content_type: force content-type for the request.
3065
+ :type _content_type: str, Optional
3066
+ :param _headers: set to override the headers for a single
3067
+ request; this effectively ignores the headers
3068
+ in the spec for a single request.
3069
+ :type _headers: dict, optional
3070
+ :param _host_index: set to override the host_index for a single
3071
+ request; this effectively ignores the host_index
3072
+ in the spec for a single request.
3073
+ :type _host_index: int, optional
3074
+ :return: Returns the result object.
3075
+ """ # noqa: E501
3076
+
3077
+ _param = self._validate_xml_ereporting_api_v1_ereporting_validate_xml_post_serialize(
3078
+ xml_file=xml_file,
3079
+ validate_business_rules=validate_business_rules,
3080
+ _request_auth=_request_auth,
3081
+ _content_type=_content_type,
3082
+ _headers=_headers,
3083
+ _host_index=_host_index
3084
+ )
3085
+
3086
+ _response_types_map: Dict[str, Optional[str]] = {
3087
+ '200': "Dict[str, object]",
3088
+ '400': None,
3089
+ '422': None,
3090
+ '500': None,
3091
+ '401': "APIError",
3092
+ }
3093
+ response_data = self.api_client.call_api(
3094
+ *_param,
3095
+ _request_timeout=_request_timeout
3096
+ )
3097
+ response_data.read()
3098
+ return self.api_client.response_deserialize(
3099
+ response_data=response_data,
3100
+ response_types_map=_response_types_map,
3101
+ )
3102
+
3103
+
3104
+ @validate_call
3105
+ def validate_xml_ereporting_api_v1_ereporting_validate_xml_post_without_preload_content(
3106
+ self,
3107
+ xml_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="E-reporting XML file to validate")],
3108
+ validate_business_rules: Annotated[Optional[StrictBool], Field(description="Also validate business rules (ISO codes, enums)")] = None,
3109
+ _request_timeout: Union[
3110
+ None,
3111
+ Annotated[StrictFloat, Field(gt=0)],
3112
+ Tuple[
3113
+ Annotated[StrictFloat, Field(gt=0)],
3114
+ Annotated[StrictFloat, Field(gt=0)]
3115
+ ]
3116
+ ] = None,
3117
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3118
+ _content_type: Optional[StrictStr] = None,
3119
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3120
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3121
+ ) -> RESTResponseType:
3122
+ """Validate e-reporting XML against PPF XSD schemas and business rules
3123
+
3124
+ Validates an e-reporting XML file against: 1. **XSD schemas**: Official PPF e-reporting XSD (structure, types, cardinality) 2. **Business rules**: ISO codes and enum validation - Currency codes (ISO 4217: EUR, USD, GBP, etc.) - Country codes (ISO 3166-1 alpha-2: FR, DE, US, etc.) - Scheme IDs (0009=SIRET, 0002=SIREN, etc.) - Role codes (UNCL 3035: SE=Seller, BY=Buyer, WK=Working party, etc.) Returns validation status and detailed error messages if invalid.
3125
+
3126
+ :param xml_file: E-reporting XML file to validate (required)
3127
+ :type xml_file: bytearray
3128
+ :param validate_business_rules: Also validate business rules (ISO codes, enums)
3129
+ :type validate_business_rules: bool
3130
+ :param _request_timeout: timeout setting for this request. If one
3131
+ number provided, it will be total request
3132
+ timeout. It can also be a pair (tuple) of
3133
+ (connection, read) timeouts.
3134
+ :type _request_timeout: int, tuple(int, int), optional
3135
+ :param _request_auth: set to override the auth_settings for an a single
3136
+ request; this effectively ignores the
3137
+ authentication in the spec for a single request.
3138
+ :type _request_auth: dict, optional
3139
+ :param _content_type: force content-type for the request.
3140
+ :type _content_type: str, Optional
3141
+ :param _headers: set to override the headers for a single
3142
+ request; this effectively ignores the headers
3143
+ in the spec for a single request.
3144
+ :type _headers: dict, optional
3145
+ :param _host_index: set to override the host_index for a single
3146
+ request; this effectively ignores the host_index
3147
+ in the spec for a single request.
3148
+ :type _host_index: int, optional
3149
+ :return: Returns the result object.
3150
+ """ # noqa: E501
3151
+
3152
+ _param = self._validate_xml_ereporting_api_v1_ereporting_validate_xml_post_serialize(
3153
+ xml_file=xml_file,
3154
+ validate_business_rules=validate_business_rules,
3155
+ _request_auth=_request_auth,
3156
+ _content_type=_content_type,
3157
+ _headers=_headers,
3158
+ _host_index=_host_index
3159
+ )
3160
+
3161
+ _response_types_map: Dict[str, Optional[str]] = {
3162
+ '200': "Dict[str, object]",
3163
+ '400': None,
3164
+ '422': None,
3165
+ '500': None,
3166
+ '401': "APIError",
3167
+ }
3168
+ response_data = self.api_client.call_api(
3169
+ *_param,
3170
+ _request_timeout=_request_timeout
3171
+ )
3172
+ return response_data.response
3173
+
3174
+
3175
+ def _validate_xml_ereporting_api_v1_ereporting_validate_xml_post_serialize(
3176
+ self,
3177
+ xml_file,
3178
+ validate_business_rules,
3179
+ _request_auth,
3180
+ _content_type,
3181
+ _headers,
3182
+ _host_index,
3183
+ ) -> RequestSerialized:
3184
+
3185
+ _host = None
3186
+
3187
+ _collection_formats: Dict[str, str] = {
3188
+ }
3189
+
3190
+ _path_params: Dict[str, str] = {}
3191
+ _query_params: List[Tuple[str, str]] = []
3192
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3193
+ _form_params: List[Tuple[str, str]] = []
3194
+ _files: Dict[
3195
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3196
+ ] = {}
3197
+ _body_params: Optional[bytes] = None
3198
+
3199
+ # process the path parameters
3200
+ # process the query parameters
3201
+ if validate_business_rules is not None:
3202
+
3203
+ _query_params.append(('validate_business_rules', validate_business_rules))
3204
+
3205
+ # process the header parameters
3206
+ # process the form parameters
3207
+ if xml_file is not None:
3208
+ _files['xml_file'] = xml_file
3209
+ # process the body parameter
3210
+
3211
+
3212
+ # set the HTTP header `Accept`
3213
+ if 'Accept' not in _header_params:
3214
+ _header_params['Accept'] = self.api_client.select_header_accept(
3215
+ [
3216
+ 'application/json'
3217
+ ]
3218
+ )
3219
+
3220
+ # set the HTTP header `Content-Type`
3221
+ if _content_type:
3222
+ _header_params['Content-Type'] = _content_type
3223
+ else:
3224
+ _default_content_type = (
3225
+ self.api_client.select_header_content_type(
3226
+ [
3227
+ 'multipart/form-data'
3228
+ ]
3229
+ )
3230
+ )
3231
+ if _default_content_type is not None:
3232
+ _header_params['Content-Type'] = _default_content_type
3233
+
3234
+ # authentication setting
3235
+ _auth_settings: List[str] = [
3236
+ 'HTTPBearer'
3237
+ ]
3238
+
3239
+ return self.api_client.param_serialize(
3240
+ method='POST',
3241
+ resource_path='/api/v1/ereporting/validate-xml',
3242
+ path_params=_path_params,
3243
+ query_params=_query_params,
3244
+ header_params=_header_params,
3245
+ body=_body_params,
3246
+ post_params=_form_params,
3247
+ files=_files,
3248
+ auth_settings=_auth_settings,
3249
+ collection_formats=_collection_formats,
3250
+ _host=_host,
3251
+ _request_auth=_request_auth
3252
+ )
3253
+
3254
+