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,370 @@
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
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from factpulse.models.additional_document import AdditionalDocument
24
+ from factpulse.models.allowance_charge import AllowanceCharge
25
+ from factpulse.models.allowance_reason_code import AllowanceReasonCode
26
+ from factpulse.models.gross_unit_price import GrossUnitPrice
27
+ from factpulse.models.invoice_line_allowance_amount import InvoiceLineAllowanceAmount
28
+ from factpulse.models.invoice_note import InvoiceNote
29
+ from factpulse.models.line_net_amount import LineNetAmount
30
+ from factpulse.models.line_sub_type import LineSubType
31
+ from factpulse.models.manual_vat_rate import ManualVatRate
32
+ from factpulse.models.price_allowance_amount import PriceAllowanceAmount
33
+ from factpulse.models.price_basis_quantity import PriceBasisQuantity
34
+ from factpulse.models.product_characteristic import ProductCharacteristic
35
+ from factpulse.models.product_classification import ProductClassification
36
+ from factpulse.models.quantity import Quantity
37
+ from factpulse.models.unit_net_price import UnitNetPrice
38
+ from factpulse.models.unit_of_measure import UnitOfMeasure
39
+ from factpulse.models.vat_category import VATCategory
40
+ from typing import Optional, Set
41
+ from typing_extensions import Self
42
+
43
+ class InvoiceLine(BaseModel):
44
+ """
45
+ Represents an invoice line item (BG-25).
46
+ """ # noqa: E501
47
+ line_number: StrictInt = Field(description="Invoice line identifier (BT-126).")
48
+ line_note: Optional[StrictStr] = None
49
+ parent_line_id: Optional[StrictStr] = None
50
+ line_sub_type: Optional[LineSubType] = None
51
+ reference: Optional[StrictStr] = None
52
+ buyer_assigned_id: Optional[StrictStr] = None
53
+ product_global_id: Optional[StrictStr] = None
54
+ product_global_id_scheme: Optional[StrictStr] = None
55
+ item_name: StrictStr = Field(description="Item name (BT-153).")
56
+ item_description: Optional[StrictStr] = None
57
+ origin_country: Optional[StrictStr] = None
58
+ characteristics: Optional[List[ProductCharacteristic]] = None
59
+ classifications: Optional[List[ProductClassification]] = None
60
+ quantity: Quantity
61
+ unit: UnitOfMeasure = Field(description="Invoiced quantity unit of measure code (BT-130).")
62
+ gross_unit_price: Optional[GrossUnitPrice] = None
63
+ unit_net_price: UnitNetPrice
64
+ price_basis_quantity: Optional[PriceBasisQuantity] = None
65
+ price_basis_unit: Optional[StrictStr] = None
66
+ price_allowance_amount: Optional[PriceAllowanceAmount] = None
67
+ line_net_amount: Optional[LineNetAmount] = Field(default=None, alias="lineNetAmount")
68
+ allowance_amount: Optional[InvoiceLineAllowanceAmount] = Field(default=None, alias="allowanceAmount")
69
+ allowance_reason_code: Optional[AllowanceReasonCode] = Field(default=None, alias="allowanceReasonCode")
70
+ allowance_reason: Optional[StrictStr] = Field(default=None, alias="allowanceReason")
71
+ allowances_charges: Optional[List[AllowanceCharge]] = None
72
+ vat_rate: Optional[StrictStr] = None
73
+ manual_vat_rate: Optional[ManualVatRate] = None
74
+ vat_category: Optional[VATCategory] = None
75
+ period_start_date: Optional[StrictStr] = None
76
+ period_end_date: Optional[StrictStr] = None
77
+ purchase_order_line_ref: Optional[StrictStr] = None
78
+ accounting_account: Optional[StrictStr] = None
79
+ additional_documents: Optional[List[AdditionalDocument]] = None
80
+ line_notes: Optional[List[InvoiceNote]] = None
81
+ __properties: ClassVar[List[str]] = ["line_number", "line_note", "parent_line_id", "line_sub_type", "reference", "buyer_assigned_id", "product_global_id", "product_global_id_scheme", "item_name", "item_description", "origin_country", "characteristics", "classifications", "quantity", "unit", "gross_unit_price", "unit_net_price", "price_basis_quantity", "price_basis_unit", "price_allowance_amount", "lineNetAmount", "allowanceAmount", "allowanceReasonCode", "allowanceReason", "allowances_charges", "vat_rate", "manual_vat_rate", "vat_category", "period_start_date", "period_end_date", "purchase_order_line_ref", "accounting_account", "additional_documents", "line_notes"]
82
+
83
+ model_config = ConfigDict(
84
+ populate_by_name=True,
85
+ validate_assignment=True,
86
+ protected_namespaces=(),
87
+ )
88
+
89
+
90
+ def to_str(self) -> str:
91
+ """Returns the string representation of the model using alias"""
92
+ return pprint.pformat(self.model_dump(by_alias=True))
93
+
94
+ def to_json(self) -> str:
95
+ """Returns the JSON representation of the model using alias"""
96
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
97
+ return json.dumps(self.to_dict())
98
+
99
+ @classmethod
100
+ def from_json(cls, json_str: str) -> Optional[Self]:
101
+ """Create an instance of InvoiceLine from a JSON string"""
102
+ return cls.from_dict(json.loads(json_str))
103
+
104
+ def to_dict(self) -> Dict[str, Any]:
105
+ """Return the dictionary representation of the model using alias.
106
+
107
+ This has the following differences from calling pydantic's
108
+ `self.model_dump(by_alias=True)`:
109
+
110
+ * `None` is only added to the output dict for nullable fields that
111
+ were set at model initialization. Other fields with value `None`
112
+ are ignored.
113
+ """
114
+ excluded_fields: Set[str] = set([
115
+ ])
116
+
117
+ _dict = self.model_dump(
118
+ by_alias=True,
119
+ exclude=excluded_fields,
120
+ exclude_none=True,
121
+ )
122
+ # override the default output from pydantic by calling `to_dict()` of each item in characteristics (list)
123
+ _items = []
124
+ if self.characteristics:
125
+ for _item_characteristics in self.characteristics:
126
+ if _item_characteristics:
127
+ _items.append(_item_characteristics.to_dict())
128
+ _dict['characteristics'] = _items
129
+ # override the default output from pydantic by calling `to_dict()` of each item in classifications (list)
130
+ _items = []
131
+ if self.classifications:
132
+ for _item_classifications in self.classifications:
133
+ if _item_classifications:
134
+ _items.append(_item_classifications.to_dict())
135
+ _dict['classifications'] = _items
136
+ # override the default output from pydantic by calling `to_dict()` of quantity
137
+ if self.quantity:
138
+ _dict['quantity'] = self.quantity.to_dict()
139
+ # override the default output from pydantic by calling `to_dict()` of gross_unit_price
140
+ if self.gross_unit_price:
141
+ _dict['gross_unit_price'] = self.gross_unit_price.to_dict()
142
+ # override the default output from pydantic by calling `to_dict()` of unit_net_price
143
+ if self.unit_net_price:
144
+ _dict['unit_net_price'] = self.unit_net_price.to_dict()
145
+ # override the default output from pydantic by calling `to_dict()` of price_basis_quantity
146
+ if self.price_basis_quantity:
147
+ _dict['price_basis_quantity'] = self.price_basis_quantity.to_dict()
148
+ # override the default output from pydantic by calling `to_dict()` of price_allowance_amount
149
+ if self.price_allowance_amount:
150
+ _dict['price_allowance_amount'] = self.price_allowance_amount.to_dict()
151
+ # override the default output from pydantic by calling `to_dict()` of line_net_amount
152
+ if self.line_net_amount:
153
+ _dict['lineNetAmount'] = self.line_net_amount.to_dict()
154
+ # override the default output from pydantic by calling `to_dict()` of allowance_amount
155
+ if self.allowance_amount:
156
+ _dict['allowanceAmount'] = self.allowance_amount.to_dict()
157
+ # override the default output from pydantic by calling `to_dict()` of each item in allowances_charges (list)
158
+ _items = []
159
+ if self.allowances_charges:
160
+ for _item_allowances_charges in self.allowances_charges:
161
+ if _item_allowances_charges:
162
+ _items.append(_item_allowances_charges.to_dict())
163
+ _dict['allowances_charges'] = _items
164
+ # override the default output from pydantic by calling `to_dict()` of manual_vat_rate
165
+ if self.manual_vat_rate:
166
+ _dict['manual_vat_rate'] = self.manual_vat_rate.to_dict()
167
+ # override the default output from pydantic by calling `to_dict()` of each item in additional_documents (list)
168
+ _items = []
169
+ if self.additional_documents:
170
+ for _item_additional_documents in self.additional_documents:
171
+ if _item_additional_documents:
172
+ _items.append(_item_additional_documents.to_dict())
173
+ _dict['additional_documents'] = _items
174
+ # override the default output from pydantic by calling `to_dict()` of each item in line_notes (list)
175
+ _items = []
176
+ if self.line_notes:
177
+ for _item_line_notes in self.line_notes:
178
+ if _item_line_notes:
179
+ _items.append(_item_line_notes.to_dict())
180
+ _dict['line_notes'] = _items
181
+ # set to None if line_note (nullable) is None
182
+ # and model_fields_set contains the field
183
+ if self.line_note is None and "line_note" in self.model_fields_set:
184
+ _dict['line_note'] = None
185
+
186
+ # set to None if parent_line_id (nullable) is None
187
+ # and model_fields_set contains the field
188
+ if self.parent_line_id is None and "parent_line_id" in self.model_fields_set:
189
+ _dict['parent_line_id'] = None
190
+
191
+ # set to None if line_sub_type (nullable) is None
192
+ # and model_fields_set contains the field
193
+ if self.line_sub_type is None and "line_sub_type" in self.model_fields_set:
194
+ _dict['line_sub_type'] = None
195
+
196
+ # set to None if reference (nullable) is None
197
+ # and model_fields_set contains the field
198
+ if self.reference is None and "reference" in self.model_fields_set:
199
+ _dict['reference'] = None
200
+
201
+ # set to None if buyer_assigned_id (nullable) is None
202
+ # and model_fields_set contains the field
203
+ if self.buyer_assigned_id is None and "buyer_assigned_id" in self.model_fields_set:
204
+ _dict['buyer_assigned_id'] = None
205
+
206
+ # set to None if product_global_id (nullable) is None
207
+ # and model_fields_set contains the field
208
+ if self.product_global_id is None and "product_global_id" in self.model_fields_set:
209
+ _dict['product_global_id'] = None
210
+
211
+ # set to None if product_global_id_scheme (nullable) is None
212
+ # and model_fields_set contains the field
213
+ if self.product_global_id_scheme is None and "product_global_id_scheme" in self.model_fields_set:
214
+ _dict['product_global_id_scheme'] = None
215
+
216
+ # set to None if item_description (nullable) is None
217
+ # and model_fields_set contains the field
218
+ if self.item_description is None and "item_description" in self.model_fields_set:
219
+ _dict['item_description'] = None
220
+
221
+ # set to None if origin_country (nullable) is None
222
+ # and model_fields_set contains the field
223
+ if self.origin_country is None and "origin_country" in self.model_fields_set:
224
+ _dict['origin_country'] = None
225
+
226
+ # set to None if characteristics (nullable) is None
227
+ # and model_fields_set contains the field
228
+ if self.characteristics is None and "characteristics" in self.model_fields_set:
229
+ _dict['characteristics'] = None
230
+
231
+ # set to None if classifications (nullable) is None
232
+ # and model_fields_set contains the field
233
+ if self.classifications is None and "classifications" in self.model_fields_set:
234
+ _dict['classifications'] = None
235
+
236
+ # set to None if gross_unit_price (nullable) is None
237
+ # and model_fields_set contains the field
238
+ if self.gross_unit_price is None and "gross_unit_price" in self.model_fields_set:
239
+ _dict['gross_unit_price'] = None
240
+
241
+ # set to None if price_basis_quantity (nullable) is None
242
+ # and model_fields_set contains the field
243
+ if self.price_basis_quantity is None and "price_basis_quantity" in self.model_fields_set:
244
+ _dict['price_basis_quantity'] = None
245
+
246
+ # set to None if price_basis_unit (nullable) is None
247
+ # and model_fields_set contains the field
248
+ if self.price_basis_unit is None and "price_basis_unit" in self.model_fields_set:
249
+ _dict['price_basis_unit'] = None
250
+
251
+ # set to None if price_allowance_amount (nullable) is None
252
+ # and model_fields_set contains the field
253
+ if self.price_allowance_amount is None and "price_allowance_amount" in self.model_fields_set:
254
+ _dict['price_allowance_amount'] = None
255
+
256
+ # set to None if line_net_amount (nullable) is None
257
+ # and model_fields_set contains the field
258
+ if self.line_net_amount is None and "line_net_amount" in self.model_fields_set:
259
+ _dict['lineNetAmount'] = None
260
+
261
+ # set to None if allowance_amount (nullable) is None
262
+ # and model_fields_set contains the field
263
+ if self.allowance_amount is None and "allowance_amount" in self.model_fields_set:
264
+ _dict['allowanceAmount'] = None
265
+
266
+ # set to None if allowance_reason_code (nullable) is None
267
+ # and model_fields_set contains the field
268
+ if self.allowance_reason_code is None and "allowance_reason_code" in self.model_fields_set:
269
+ _dict['allowanceReasonCode'] = None
270
+
271
+ # set to None if allowance_reason (nullable) is None
272
+ # and model_fields_set contains the field
273
+ if self.allowance_reason is None and "allowance_reason" in self.model_fields_set:
274
+ _dict['allowanceReason'] = None
275
+
276
+ # set to None if allowances_charges (nullable) is None
277
+ # and model_fields_set contains the field
278
+ if self.allowances_charges is None and "allowances_charges" in self.model_fields_set:
279
+ _dict['allowances_charges'] = None
280
+
281
+ # set to None if vat_rate (nullable) is None
282
+ # and model_fields_set contains the field
283
+ if self.vat_rate is None and "vat_rate" in self.model_fields_set:
284
+ _dict['vat_rate'] = None
285
+
286
+ # set to None if vat_category (nullable) is None
287
+ # and model_fields_set contains the field
288
+ if self.vat_category is None and "vat_category" in self.model_fields_set:
289
+ _dict['vat_category'] = None
290
+
291
+ # set to None if period_start_date (nullable) is None
292
+ # and model_fields_set contains the field
293
+ if self.period_start_date is None and "period_start_date" in self.model_fields_set:
294
+ _dict['period_start_date'] = None
295
+
296
+ # set to None if period_end_date (nullable) is None
297
+ # and model_fields_set contains the field
298
+ if self.period_end_date is None and "period_end_date" in self.model_fields_set:
299
+ _dict['period_end_date'] = None
300
+
301
+ # set to None if purchase_order_line_ref (nullable) is None
302
+ # and model_fields_set contains the field
303
+ if self.purchase_order_line_ref is None and "purchase_order_line_ref" in self.model_fields_set:
304
+ _dict['purchase_order_line_ref'] = None
305
+
306
+ # set to None if accounting_account (nullable) is None
307
+ # and model_fields_set contains the field
308
+ if self.accounting_account is None and "accounting_account" in self.model_fields_set:
309
+ _dict['accounting_account'] = None
310
+
311
+ # set to None if additional_documents (nullable) is None
312
+ # and model_fields_set contains the field
313
+ if self.additional_documents is None and "additional_documents" in self.model_fields_set:
314
+ _dict['additional_documents'] = None
315
+
316
+ # set to None if line_notes (nullable) is None
317
+ # and model_fields_set contains the field
318
+ if self.line_notes is None and "line_notes" in self.model_fields_set:
319
+ _dict['line_notes'] = None
320
+
321
+ return _dict
322
+
323
+ @classmethod
324
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
325
+ """Create an instance of InvoiceLine from a dict"""
326
+ if obj is None:
327
+ return None
328
+
329
+ if not isinstance(obj, dict):
330
+ return cls.model_validate(obj)
331
+
332
+ _obj = cls.model_validate({
333
+ "line_number": obj.get("line_number"),
334
+ "line_note": obj.get("line_note"),
335
+ "parent_line_id": obj.get("parent_line_id"),
336
+ "line_sub_type": obj.get("line_sub_type"),
337
+ "reference": obj.get("reference"),
338
+ "buyer_assigned_id": obj.get("buyer_assigned_id"),
339
+ "product_global_id": obj.get("product_global_id"),
340
+ "product_global_id_scheme": obj.get("product_global_id_scheme"),
341
+ "item_name": obj.get("item_name"),
342
+ "item_description": obj.get("item_description"),
343
+ "origin_country": obj.get("origin_country"),
344
+ "characteristics": [ProductCharacteristic.from_dict(_item) for _item in obj["characteristics"]] if obj.get("characteristics") is not None else None,
345
+ "classifications": [ProductClassification.from_dict(_item) for _item in obj["classifications"]] if obj.get("classifications") is not None else None,
346
+ "quantity": Quantity.from_dict(obj["quantity"]) if obj.get("quantity") is not None else None,
347
+ "unit": obj.get("unit"),
348
+ "gross_unit_price": GrossUnitPrice.from_dict(obj["gross_unit_price"]) if obj.get("gross_unit_price") is not None else None,
349
+ "unit_net_price": UnitNetPrice.from_dict(obj["unit_net_price"]) if obj.get("unit_net_price") is not None else None,
350
+ "price_basis_quantity": PriceBasisQuantity.from_dict(obj["price_basis_quantity"]) if obj.get("price_basis_quantity") is not None else None,
351
+ "price_basis_unit": obj.get("price_basis_unit"),
352
+ "price_allowance_amount": PriceAllowanceAmount.from_dict(obj["price_allowance_amount"]) if obj.get("price_allowance_amount") is not None else None,
353
+ "lineNetAmount": LineNetAmount.from_dict(obj["lineNetAmount"]) if obj.get("lineNetAmount") is not None else None,
354
+ "allowanceAmount": InvoiceLineAllowanceAmount.from_dict(obj["allowanceAmount"]) if obj.get("allowanceAmount") is not None else None,
355
+ "allowanceReasonCode": obj.get("allowanceReasonCode"),
356
+ "allowanceReason": obj.get("allowanceReason"),
357
+ "allowances_charges": [AllowanceCharge.from_dict(_item) for _item in obj["allowances_charges"]] if obj.get("allowances_charges") is not None else None,
358
+ "vat_rate": obj.get("vat_rate"),
359
+ "manual_vat_rate": ManualVatRate.from_dict(obj["manual_vat_rate"]) if obj.get("manual_vat_rate") is not None else None,
360
+ "vat_category": obj.get("vat_category"),
361
+ "period_start_date": obj.get("period_start_date"),
362
+ "period_end_date": obj.get("period_end_date"),
363
+ "purchase_order_line_ref": obj.get("purchase_order_line_ref"),
364
+ "accounting_account": obj.get("accounting_account"),
365
+ "additional_documents": [AdditionalDocument.from_dict(_item) for _item in obj["additional_documents"]] if obj.get("additional_documents") is not None else None,
366
+ "line_notes": [InvoiceNote.from_dict(_item) for _item in obj["line_notes"]] if obj.get("line_notes") is not None else None
367
+ })
368
+ return _obj
369
+
370
+
@@ -0,0 +1,146 @@
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
+
16
+ from __future__ import annotations
17
+ from inspect import getfullargspec
18
+ import json
19
+ import pprint
20
+ import re # noqa: F401
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
22
+ from typing import Optional, Union
23
+ from typing_extensions import Annotated
24
+ from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
25
+ from typing_extensions import Literal, Self
26
+ from pydantic import Field
27
+
28
+ INVOICELINEALLOWANCEAMOUNT_ANY_OF_SCHEMAS = ["float", "str"]
29
+
30
+ class InvoiceLineAllowanceAmount(BaseModel):
31
+ """
32
+ Simple line allowance amount (BT-136). (Accepte number, string ou integer)
33
+ """
34
+
35
+ # data type: float
36
+ anyof_schema_1_validator: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = None
37
+ # data type: str
38
+ anyof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = None
39
+ if TYPE_CHECKING:
40
+ actual_instance: Optional[Union[float, str]] = None
41
+ else:
42
+ actual_instance: Any = None
43
+ any_of_schemas: Set[str] = { "float", "str" }
44
+
45
+ model_config = {
46
+ "validate_assignment": True,
47
+ "protected_namespaces": (),
48
+ }
49
+
50
+ def __init__(self, *args, **kwargs) -> None:
51
+ if args:
52
+ if len(args) > 1:
53
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
54
+ if kwargs:
55
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
56
+ super().__init__(actual_instance=args[0])
57
+ else:
58
+ super().__init__(**kwargs)
59
+
60
+ @field_validator('actual_instance')
61
+ def actual_instance_must_validate_anyof(cls, v):
62
+ if v is None:
63
+ return v
64
+
65
+ instance = InvoiceLineAllowanceAmount.model_construct()
66
+ error_messages = []
67
+ # validate data type: float
68
+ try:
69
+ instance.anyof_schema_1_validator = v
70
+ return v
71
+ except (ValidationError, ValueError) as e:
72
+ error_messages.append(str(e))
73
+ # validate data type: str
74
+ try:
75
+ instance.anyof_schema_2_validator = v
76
+ return v
77
+ except (ValidationError, ValueError) as e:
78
+ error_messages.append(str(e))
79
+ if error_messages:
80
+ # no match
81
+ raise ValueError("No match found when setting the actual_instance in InvoiceLineAllowanceAmount with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
82
+ else:
83
+ return v
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Dict[str, Any]) -> Self:
87
+ return cls.from_json(json.dumps(obj))
88
+
89
+ @classmethod
90
+ def from_json(cls, json_str: str) -> Self:
91
+ """Returns the object represented by the json string"""
92
+ instance = cls.model_construct()
93
+ if json_str is None:
94
+ return instance
95
+
96
+ error_messages = []
97
+ # deserialize data into float
98
+ try:
99
+ # validation
100
+ instance.anyof_schema_1_validator = json.loads(json_str)
101
+ # assign value to actual_instance
102
+ instance.actual_instance = instance.anyof_schema_1_validator
103
+ return instance
104
+ except (ValidationError, ValueError) as e:
105
+ error_messages.append(str(e))
106
+ # deserialize data into str
107
+ try:
108
+ # validation
109
+ instance.anyof_schema_2_validator = json.loads(json_str)
110
+ # assign value to actual_instance
111
+ instance.actual_instance = instance.anyof_schema_2_validator
112
+ return instance
113
+ except (ValidationError, ValueError) as e:
114
+ error_messages.append(str(e))
115
+
116
+ if error_messages:
117
+ # no match
118
+ raise ValueError("No match found when deserializing the JSON string into InvoiceLineAllowanceAmount with anyOf schemas: float, str. Details: " + ", ".join(error_messages))
119
+ else:
120
+ return instance
121
+
122
+ def to_json(self) -> str:
123
+ """Returns the JSON representation of the actual instance"""
124
+ if self.actual_instance is None:
125
+ return "null"
126
+
127
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
128
+ return self.actual_instance.to_json()
129
+ else:
130
+ return json.dumps(self.actual_instance)
131
+
132
+ def to_dict(self) -> Optional[Union[Dict[str, Any], float, str]]:
133
+ """Returns the dict representation of the actual instance"""
134
+ if self.actual_instance is None:
135
+ return None
136
+
137
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
138
+ return self.actual_instance.to_dict()
139
+ else:
140
+ return self.actual_instance
141
+
142
+ def to_str(self) -> str:
143
+ """Returns the string representation of the actual instance"""
144
+ return pprint.pformat(self.model_dump())
145
+
146
+
@@ -0,0 +1,95 @@
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
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class InvoiceNote(BaseModel):
27
+ """
28
+ Invoice note (IncludedNote in Factur-X). Mandatory notes for BR-FR-05 are: - PMT: Fixed recovery fee - PMD: Late payment penalties - AAB: Early payment discount
29
+ """ # noqa: E501
30
+ subject_code: Optional[StrictStr] = None
31
+ content: StrictStr = Field(description="Note content")
32
+ __properties: ClassVar[List[str]] = ["subject_code", "content"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of InvoiceNote from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ # set to None if subject_code (nullable) is None
74
+ # and model_fields_set contains the field
75
+ if self.subject_code is None and "subject_code" in self.model_fields_set:
76
+ _dict['subject_code'] = None
77
+
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of InvoiceNote from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate({
90
+ "subject_code": obj.get("subject_code"),
91
+ "content": obj.get("content")
92
+ })
93
+ return _obj
94
+
95
+