factpulse 0.1.0__tar.gz

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.
Files changed (675) hide show
  1. factpulse-0.1.0/LICENSE +21 -0
  2. factpulse-0.1.0/PKG-INFO +234 -0
  3. factpulse-0.1.0/README.md +213 -0
  4. factpulse-0.1.0/factpulse/__init__.py +699 -0
  5. factpulse-0.1.0/factpulse/api/__init__.py +19 -0
  6. factpulse-0.1.0/factpulse/api/afnorpdppa_api.py +600 -0
  7. factpulse-0.1.0/factpulse/api/afnorpdppa_directory_service_api.py +5472 -0
  8. factpulse-0.1.0/factpulse/api/afnorpdppa_flow_service_api.py +1206 -0
  9. factpulse-0.1.0/factpulse/api/async_tasks_api.py +307 -0
  10. factpulse-0.1.0/factpulse/api/chorus_pro_api.py +4533 -0
  11. factpulse-0.1.0/factpulse/api/client_management_api.py +3543 -0
  12. factpulse-0.1.0/factpulse/api/downloads_api.py +607 -0
  13. factpulse-0.1.0/factpulse/api/electronic_signature_api.py +1399 -0
  14. factpulse-0.1.0/factpulse/api/factur_x_conversion_api.py +1226 -0
  15. factpulse-0.1.0/factpulse/api/factur_x_generation_api.py +1027 -0
  16. factpulse-0.1.0/factpulse/api/factur_x_validation_api.py +1029 -0
  17. factpulse-0.1.0/factpulse/api/factur_xpdfxml_verification_api.py +923 -0
  18. factpulse-0.1.0/factpulse/api/flux10_e_reporting_api.py +3277 -0
  19. factpulse-0.1.0/factpulse/api/flux6_invoice_lifecycle_cdar_api.py +2819 -0
  20. factpulse-0.1.0/factpulse/api/health_api.py +783 -0
  21. factpulse-0.1.0/factpulse/api_client.py +805 -0
  22. factpulse-0.1.0/factpulse/api_response.py +21 -0
  23. factpulse-0.1.0/factpulse/configuration.py +621 -0
  24. factpulse-0.1.0/factpulse/exceptions.py +220 -0
  25. factpulse-0.1.0/factpulse/models/__init__.py +328 -0
  26. factpulse-0.1.0/factpulse/models/acknowledgment_status.py +39 -0
  27. factpulse-0.1.0/factpulse/models/action_code_info.py +92 -0
  28. factpulse-0.1.0/factpulse/models/action_codes_response.py +100 -0
  29. factpulse-0.1.0/factpulse/models/additional_document.py +116 -0
  30. factpulse-0.1.0/factpulse/models/afnor_acknowledgement.py +100 -0
  31. factpulse-0.1.0/factpulse/models/afnor_acknowledgement_detail.py +105 -0
  32. factpulse-0.1.0/factpulse/models/afnor_address_edit.py +111 -0
  33. factpulse-0.1.0/factpulse/models/afnor_address_patch.py +141 -0
  34. factpulse-0.1.0/factpulse/models/afnor_address_put.py +129 -0
  35. factpulse-0.1.0/factpulse/models/afnor_address_read.py +113 -0
  36. factpulse-0.1.0/factpulse/models/afnor_algorithm.py +41 -0
  37. factpulse-0.1.0/factpulse/models/afnor_contains_operator.py +37 -0
  38. factpulse-0.1.0/factpulse/models/afnor_create_directory_line_body.py +98 -0
  39. factpulse-0.1.0/factpulse/models/afnor_create_directory_line_body_addressing_information.py +122 -0
  40. factpulse-0.1.0/factpulse/models/afnor_create_directory_line_body_period.py +91 -0
  41. factpulse-0.1.0/factpulse/models/afnor_create_routing_code_body.py +153 -0
  42. factpulse-0.1.0/factpulse/models/afnor_credentials.py +107 -0
  43. factpulse-0.1.0/factpulse/models/afnor_destination.py +127 -0
  44. factpulse-0.1.0/factpulse/models/afnor_diffusion_status.py +38 -0
  45. factpulse-0.1.0/factpulse/models/afnor_directory_line_field.py +42 -0
  46. factpulse-0.1.0/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code.py +139 -0
  47. factpulse-0.1.0/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.py +92 -0
  48. factpulse-0.1.0/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.py +134 -0
  49. factpulse-0.1.0/factpulse/models/afnor_directory_line_post201_response.py +94 -0
  50. factpulse-0.1.0/factpulse/models/afnor_directory_line_search_post200_response.py +104 -0
  51. factpulse-0.1.0/factpulse/models/afnor_entity_type.py +38 -0
  52. factpulse-0.1.0/factpulse/models/afnor_error.py +97 -0
  53. factpulse-0.1.0/factpulse/models/afnor_facility_administrative_status.py +38 -0
  54. factpulse-0.1.0/factpulse/models/afnor_facility_nature.py +38 -0
  55. factpulse-0.1.0/factpulse/models/afnor_facility_payload_history.py +140 -0
  56. factpulse-0.1.0/factpulse/models/afnor_facility_payload_history_ule_b2g_additional_data.py +98 -0
  57. factpulse-0.1.0/factpulse/models/afnor_facility_payload_included.py +134 -0
  58. factpulse-0.1.0/factpulse/models/afnor_facility_type.py +38 -0
  59. factpulse-0.1.0/factpulse/models/afnor_flow.py +129 -0
  60. factpulse-0.1.0/factpulse/models/afnor_flow_ack_status.py +39 -0
  61. factpulse-0.1.0/factpulse/models/afnor_flow_direction.py +38 -0
  62. factpulse-0.1.0/factpulse/models/afnor_flow_info.py +112 -0
  63. factpulse-0.1.0/factpulse/models/afnor_flow_profile.py +39 -0
  64. factpulse-0.1.0/factpulse/models/afnor_flow_syntax.py +41 -0
  65. factpulse-0.1.0/factpulse/models/afnor_flow_type.py +49 -0
  66. factpulse-0.1.0/factpulse/models/afnor_full_flow_info.py +117 -0
  67. factpulse-0.1.0/factpulse/models/afnor_health_check_response.py +92 -0
  68. factpulse-0.1.0/factpulse/models/afnor_legal_unit_administrative_status.py +38 -0
  69. factpulse-0.1.0/factpulse/models/afnor_legal_unit_payload_history.py +107 -0
  70. factpulse-0.1.0/factpulse/models/afnor_legal_unit_payload_included.py +107 -0
  71. factpulse-0.1.0/factpulse/models/afnor_legal_unit_payload_included_no_siren.py +95 -0
  72. factpulse-0.1.0/factpulse/models/afnor_platform_status.py +38 -0
  73. factpulse-0.1.0/factpulse/models/afnor_processing_rule.py +42 -0
  74. factpulse-0.1.0/factpulse/models/afnor_reason_code.py +141 -0
  75. factpulse-0.1.0/factpulse/models/afnor_reason_code_enum.py +51 -0
  76. factpulse-0.1.0/factpulse/models/afnor_recipient_platform_type.py +38 -0
  77. factpulse-0.1.0/factpulse/models/afnor_result.py +127 -0
  78. factpulse-0.1.0/factpulse/models/afnor_routing_code_administrative_status.py +38 -0
  79. factpulse-0.1.0/factpulse/models/afnor_routing_code_field.py +44 -0
  80. factpulse-0.1.0/factpulse/models/afnor_routing_code_payload_history_legal_unit_facility.py +158 -0
  81. factpulse-0.1.0/factpulse/models/afnor_routing_code_post201_response.py +113 -0
  82. factpulse-0.1.0/factpulse/models/afnor_routing_code_search.py +122 -0
  83. factpulse-0.1.0/factpulse/models/afnor_routing_code_search_filters.py +128 -0
  84. factpulse-0.1.0/factpulse/models/afnor_routing_code_search_filters_administrative_status.py +92 -0
  85. factpulse-0.1.0/factpulse/models/afnor_routing_code_search_filters_routing_code_name.py +102 -0
  86. factpulse-0.1.0/factpulse/models/afnor_routing_code_search_filters_routing_identifier.py +102 -0
  87. factpulse-0.1.0/factpulse/models/afnor_routing_code_search_post200_response.py +104 -0
  88. factpulse-0.1.0/factpulse/models/afnor_routing_code_search_sorting_inner.py +92 -0
  89. factpulse-0.1.0/factpulse/models/afnor_search_directory_line.py +109 -0
  90. factpulse-0.1.0/factpulse/models/afnor_search_directory_line_filters.py +116 -0
  91. factpulse-0.1.0/factpulse/models/afnor_search_directory_line_filters_addressing_identifier.py +92 -0
  92. factpulse-0.1.0/factpulse/models/afnor_search_directory_line_filters_addressing_suffix.py +92 -0
  93. factpulse-0.1.0/factpulse/models/afnor_search_directory_line_sorting_inner.py +92 -0
  94. factpulse-0.1.0/factpulse/models/afnor_search_flow_content.py +104 -0
  95. factpulse-0.1.0/factpulse/models/afnor_search_flow_filters.py +106 -0
  96. factpulse-0.1.0/factpulse/models/afnor_search_flow_params.py +95 -0
  97. factpulse-0.1.0/factpulse/models/afnor_search_siren.py +109 -0
  98. factpulse-0.1.0/factpulse/models/afnor_search_siren_filters.py +110 -0
  99. factpulse-0.1.0/factpulse/models/afnor_search_siren_filters_administrative_status.py +92 -0
  100. factpulse-0.1.0/factpulse/models/afnor_search_siren_filters_business_name.py +92 -0
  101. factpulse-0.1.0/factpulse/models/afnor_search_siren_filters_entity_type.py +92 -0
  102. factpulse-0.1.0/factpulse/models/afnor_search_siren_filters_siren.py +102 -0
  103. factpulse-0.1.0/factpulse/models/afnor_search_siren_sorting_inner.py +92 -0
  104. factpulse-0.1.0/factpulse/models/afnor_search_siret.py +122 -0
  105. factpulse-0.1.0/factpulse/models/afnor_search_siret_filters.py +140 -0
  106. factpulse-0.1.0/factpulse/models/afnor_search_siret_filters_address_lines.py +92 -0
  107. factpulse-0.1.0/factpulse/models/afnor_search_siret_filters_administrative_status.py +92 -0
  108. factpulse-0.1.0/factpulse/models/afnor_search_siret_filters_country_subdivision.py +92 -0
  109. factpulse-0.1.0/factpulse/models/afnor_search_siret_filters_facility_type.py +92 -0
  110. factpulse-0.1.0/factpulse/models/afnor_search_siret_filters_locality.py +92 -0
  111. factpulse-0.1.0/factpulse/models/afnor_search_siret_filters_name.py +92 -0
  112. factpulse-0.1.0/factpulse/models/afnor_search_siret_filters_postal_code.py +102 -0
  113. factpulse-0.1.0/factpulse/models/afnor_search_siret_filters_siret.py +102 -0
  114. factpulse-0.1.0/factpulse/models/afnor_search_siret_sorting_inner.py +92 -0
  115. factpulse-0.1.0/factpulse/models/afnor_siren_field.py +41 -0
  116. factpulse-0.1.0/factpulse/models/afnor_siren_search_post200_response.py +104 -0
  117. factpulse-0.1.0/factpulse/models/afnor_siret_field.py +50 -0
  118. factpulse-0.1.0/factpulse/models/afnor_siret_search_post200_response.py +104 -0
  119. factpulse-0.1.0/factpulse/models/afnor_sorting_order.py +38 -0
  120. factpulse-0.1.0/factpulse/models/afnor_strict_operator.py +37 -0
  121. factpulse-0.1.0/factpulse/models/afnor_update_patch_directory_line_body.py +89 -0
  122. factpulse-0.1.0/factpulse/models/afnor_update_patch_routing_code_body.py +120 -0
  123. factpulse-0.1.0/factpulse/models/afnor_update_put_routing_code_body.py +114 -0
  124. factpulse-0.1.0/factpulse/models/afnor_webhook_callback_content.py +92 -0
  125. factpulse-0.1.0/factpulse/models/aggregated_payment_input.py +106 -0
  126. factpulse-0.1.0/factpulse/models/aggregated_transaction_input.py +136 -0
  127. factpulse-0.1.0/factpulse/models/allowance_charge.py +150 -0
  128. factpulse-0.1.0/factpulse/models/allowance_charge_reason_code.py +74 -0
  129. factpulse-0.1.0/factpulse/models/allowance_reason_code.py +43 -0
  130. factpulse-0.1.0/factpulse/models/allowance_total_amount.py +146 -0
  131. factpulse-0.1.0/factpulse/models/amount.py +140 -0
  132. factpulse-0.1.0/factpulse/models/amount1.py +140 -0
  133. factpulse-0.1.0/factpulse/models/amount2.py +140 -0
  134. factpulse-0.1.0/factpulse/models/amount_due.py +140 -0
  135. factpulse-0.1.0/factpulse/models/api_error.py +105 -0
  136. factpulse-0.1.0/factpulse/models/api_profile.py +41 -0
  137. factpulse-0.1.0/factpulse/models/async_task_status.py +98 -0
  138. factpulse-0.1.0/factpulse/models/base_amount.py +146 -0
  139. factpulse-0.1.0/factpulse/models/bounding_box_schema.py +101 -0
  140. factpulse-0.1.0/factpulse/models/buyercountry.py +137 -0
  141. factpulse-0.1.0/factpulse/models/celery_status.py +41 -0
  142. factpulse-0.1.0/factpulse/models/certificate_info_response.py +115 -0
  143. factpulse-0.1.0/factpulse/models/charge_total_amount.py +146 -0
  144. factpulse-0.1.0/factpulse/models/chorus_pro_credentials.py +96 -0
  145. factpulse-0.1.0/factpulse/models/chorus_pro_destination.py +109 -0
  146. factpulse-0.1.0/factpulse/models/chorus_pro_result.py +102 -0
  147. factpulse-0.1.0/factpulse/models/client_activate_response.py +93 -0
  148. factpulse-0.1.0/factpulse/models/client_create_request.py +113 -0
  149. factpulse-0.1.0/factpulse/models/client_detail.py +130 -0
  150. factpulse-0.1.0/factpulse/models/client_list_response.py +102 -0
  151. factpulse-0.1.0/factpulse/models/client_summary.py +130 -0
  152. factpulse-0.1.0/factpulse/models/client_update_request.py +118 -0
  153. factpulse-0.1.0/factpulse/models/contact.py +114 -0
  154. factpulse-0.1.0/factpulse/models/convert_resume_request.py +88 -0
  155. factpulse-0.1.0/factpulse/models/convert_success_response.py +127 -0
  156. factpulse-0.1.0/factpulse/models/convert_validation_failed_response.py +121 -0
  157. factpulse-0.1.0/factpulse/models/country_code.py +206 -0
  158. factpulse-0.1.0/factpulse/models/create_aggregated_report_request.py +181 -0
  159. factpulse-0.1.0/factpulse/models/create_cdar_request.py +175 -0
  160. factpulse-0.1.0/factpulse/models/create_e_reporting_request.py +184 -0
  161. factpulse-0.1.0/factpulse/models/currency.py +137 -0
  162. factpulse-0.1.0/factpulse/models/currency_code.py +89 -0
  163. factpulse-0.1.0/factpulse/models/delivery_party.py +122 -0
  164. factpulse-0.1.0/factpulse/models/destination.py +141 -0
  165. factpulse-0.1.0/factpulse/models/doc_type.py +40 -0
  166. factpulse-0.1.0/factpulse/models/document_type_info.py +92 -0
  167. factpulse-0.1.0/factpulse/models/e_reporting_flow_type.py +40 -0
  168. factpulse-0.1.0/factpulse/models/e_reporting_validation_error.py +97 -0
  169. factpulse-0.1.0/factpulse/models/electronic_address.py +91 -0
  170. factpulse-0.1.0/factpulse/models/encaisseamount.py +146 -0
  171. factpulse-0.1.0/factpulse/models/encaisseamount1.py +146 -0
  172. factpulse-0.1.0/factpulse/models/encaissee_request.py +140 -0
  173. factpulse-0.1.0/factpulse/models/enriched_invoice_info.py +134 -0
  174. factpulse-0.1.0/factpulse/models/error_level.py +38 -0
  175. factpulse-0.1.0/factpulse/models/error_source.py +45 -0
  176. factpulse-0.1.0/factpulse/models/extraction_info.py +94 -0
  177. factpulse-0.1.0/factpulse/models/factur_x_invoice.py +321 -0
  178. factpulse-0.1.0/factpulse/models/factur_xpdf_info.py +92 -0
  179. factpulse-0.1.0/factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.py +41 -0
  180. factpulse-0.1.0/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py +116 -0
  181. factpulse-0.1.0/factpulse/models/facture_electronique_rest_api_schemas_validation_validation_error_response.py +88 -0
  182. factpulse-0.1.0/factpulse/models/field_status.py +41 -0
  183. factpulse-0.1.0/factpulse/models/file_info.py +95 -0
  184. factpulse-0.1.0/factpulse/models/files_info.py +107 -0
  185. factpulse-0.1.0/factpulse/models/flow_direction.py +38 -0
  186. factpulse-0.1.0/factpulse/models/flow_profile.py +39 -0
  187. factpulse-0.1.0/factpulse/models/flow_summary.py +132 -0
  188. factpulse-0.1.0/factpulse/models/flow_syntax.py +41 -0
  189. factpulse-0.1.0/factpulse/models/flow_type.py +49 -0
  190. factpulse-0.1.0/factpulse/models/generate_aggregated_report_response.py +100 -0
  191. factpulse-0.1.0/factpulse/models/generate_cdar_response.py +96 -0
  192. factpulse-0.1.0/factpulse/models/generate_certificate_request.py +119 -0
  193. factpulse-0.1.0/factpulse/models/generate_certificate_response.py +107 -0
  194. factpulse-0.1.0/factpulse/models/generate_e_reporting_response.py +96 -0
  195. factpulse-0.1.0/factpulse/models/get_chorus_pro_id_request.py +101 -0
  196. factpulse-0.1.0/factpulse/models/get_chorus_pro_id_response.py +99 -0
  197. factpulse-0.1.0/factpulse/models/get_invoice_request.py +99 -0
  198. factpulse-0.1.0/factpulse/models/get_invoice_response.py +143 -0
  199. factpulse-0.1.0/factpulse/models/get_structure_request.py +101 -0
  200. factpulse-0.1.0/factpulse/models/get_structure_response.py +143 -0
  201. factpulse-0.1.0/factpulse/models/global_allowance_amount.py +140 -0
  202. factpulse-0.1.0/factpulse/models/gross_unit_price.py +146 -0
  203. factpulse-0.1.0/factpulse/models/http_validation_error.py +96 -0
  204. factpulse-0.1.0/factpulse/models/incoming_invoice.py +175 -0
  205. factpulse-0.1.0/factpulse/models/incoming_supplier.py +145 -0
  206. factpulse-0.1.0/factpulse/models/invoice_format.py +39 -0
  207. factpulse-0.1.0/factpulse/models/invoice_input.py +191 -0
  208. factpulse-0.1.0/factpulse/models/invoice_line.py +370 -0
  209. factpulse-0.1.0/factpulse/models/invoice_line_allowance_amount.py +146 -0
  210. factpulse-0.1.0/factpulse/models/invoice_note.py +95 -0
  211. factpulse-0.1.0/factpulse/models/invoice_payment_input.py +110 -0
  212. factpulse-0.1.0/factpulse/models/invoice_references.py +195 -0
  213. factpulse-0.1.0/factpulse/models/invoice_status.py +97 -0
  214. factpulse-0.1.0/factpulse/models/invoice_totals.py +178 -0
  215. factpulse-0.1.0/factpulse/models/invoice_totals_prepayment.py +146 -0
  216. factpulse-0.1.0/factpulse/models/invoice_type_code.py +52 -0
  217. factpulse-0.1.0/factpulse/models/invoice_type_code_output.py +52 -0
  218. factpulse-0.1.0/factpulse/models/invoicing_framework.py +111 -0
  219. factpulse-0.1.0/factpulse/models/invoicing_framework_code.py +40 -0
  220. factpulse-0.1.0/factpulse/models/issuer_role_code.py +38 -0
  221. factpulse-0.1.0/factpulse/models/key_rotation_request.py +91 -0
  222. factpulse-0.1.0/factpulse/models/key_rotation_response.py +99 -0
  223. factpulse-0.1.0/factpulse/models/line_net_amount.py +146 -0
  224. factpulse-0.1.0/factpulse/models/line_sub_type.py +39 -0
  225. factpulse-0.1.0/factpulse/models/line_total_amount.py +146 -0
  226. factpulse-0.1.0/factpulse/models/location_inner.py +139 -0
  227. factpulse-0.1.0/factpulse/models/mandatory_note_schema.py +125 -0
  228. factpulse-0.1.0/factpulse/models/manual_rate.py +140 -0
  229. factpulse-0.1.0/factpulse/models/manual_vat_rate.py +140 -0
  230. factpulse-0.1.0/factpulse/models/missing_field.py +108 -0
  231. factpulse-0.1.0/factpulse/models/operation_nature.py +50 -0
  232. factpulse-0.1.0/factpulse/models/output_format.py +38 -0
  233. factpulse-0.1.0/factpulse/models/page_dimensions_schema.py +90 -0
  234. factpulse-0.1.0/factpulse/models/payee.py +169 -0
  235. factpulse-0.1.0/factpulse/models/payment_amount_by_rate.py +98 -0
  236. factpulse-0.1.0/factpulse/models/payment_card.py +100 -0
  237. factpulse-0.1.0/factpulse/models/payment_means.py +42 -0
  238. factpulse-0.1.0/factpulse/models/pdf_validation_result_api.py +170 -0
  239. factpulse-0.1.0/factpulse/models/pdp_config_response.py +191 -0
  240. factpulse-0.1.0/factpulse/models/pdp_config_update_request.py +115 -0
  241. factpulse-0.1.0/factpulse/models/pdp_credentials.py +101 -0
  242. factpulse-0.1.0/factpulse/models/percentage.py +146 -0
  243. factpulse-0.1.0/factpulse/models/postal_address.py +135 -0
  244. factpulse-0.1.0/factpulse/models/price_allowance_amount.py +146 -0
  245. factpulse-0.1.0/factpulse/models/price_basis_quantity.py +146 -0
  246. factpulse-0.1.0/factpulse/models/processing_options.py +95 -0
  247. factpulse-0.1.0/factpulse/models/processing_rule.py +42 -0
  248. factpulse-0.1.0/factpulse/models/product_characteristic.py +90 -0
  249. factpulse-0.1.0/factpulse/models/product_classification.py +102 -0
  250. factpulse-0.1.0/factpulse/models/quantity.py +140 -0
  251. factpulse-0.1.0/factpulse/models/rate.py +140 -0
  252. factpulse-0.1.0/factpulse/models/rate1.py +140 -0
  253. factpulse-0.1.0/factpulse/models/reason_code_info.py +92 -0
  254. factpulse-0.1.0/factpulse/models/reason_codes_response.py +100 -0
  255. factpulse-0.1.0/factpulse/models/recipient.py +168 -0
  256. factpulse-0.1.0/factpulse/models/recipient_input.py +116 -0
  257. factpulse-0.1.0/factpulse/models/refusee_request.py +141 -0
  258. factpulse-0.1.0/factpulse/models/report_issuer.py +106 -0
  259. factpulse-0.1.0/factpulse/models/report_period.py +91 -0
  260. factpulse-0.1.0/factpulse/models/report_sender.py +98 -0
  261. factpulse-0.1.0/factpulse/models/rounding_amount.py +146 -0
  262. factpulse-0.1.0/factpulse/models/schematron_validation_error.py +128 -0
  263. factpulse-0.1.0/factpulse/models/scheme_id.py +54 -0
  264. factpulse-0.1.0/factpulse/models/search_flow_request.py +144 -0
  265. factpulse-0.1.0/factpulse/models/search_flow_response.py +102 -0
  266. factpulse-0.1.0/factpulse/models/search_services_response.py +102 -0
  267. factpulse-0.1.0/factpulse/models/search_structure_request.py +120 -0
  268. factpulse-0.1.0/factpulse/models/search_structure_response.py +102 -0
  269. factpulse-0.1.0/factpulse/models/secret_status.py +104 -0
  270. factpulse-0.1.0/factpulse/models/sellercountry.py +137 -0
  271. factpulse-0.1.0/factpulse/models/signature_info.py +102 -0
  272. factpulse-0.1.0/factpulse/models/signature_info_api.py +123 -0
  273. factpulse-0.1.0/factpulse/models/signature_parameters.py +134 -0
  274. factpulse-0.1.0/factpulse/models/simplified_cdar_response.py +96 -0
  275. factpulse-0.1.0/factpulse/models/simplified_invoice_data.py +151 -0
  276. factpulse-0.1.0/factpulse/models/status_code_info.py +92 -0
  277. factpulse-0.1.0/factpulse/models/status_codes_response.py +100 -0
  278. factpulse-0.1.0/factpulse/models/structure_info.py +96 -0
  279. factpulse-0.1.0/factpulse/models/structure_parameters.py +92 -0
  280. factpulse-0.1.0/factpulse/models/structure_service.py +94 -0
  281. factpulse-0.1.0/factpulse/models/submission_mode.py +39 -0
  282. factpulse-0.1.0/factpulse/models/submit_aggregated_report_request.py +127 -0
  283. factpulse-0.1.0/factpulse/models/submit_cdar_request.py +205 -0
  284. factpulse-0.1.0/factpulse/models/submit_cdar_response.py +104 -0
  285. factpulse-0.1.0/factpulse/models/submit_cdarxml_request.py +125 -0
  286. factpulse-0.1.0/factpulse/models/submit_complete_invoice_request.py +117 -0
  287. factpulse-0.1.0/factpulse/models/submit_complete_invoice_response.py +146 -0
  288. factpulse-0.1.0/factpulse/models/submit_e_reporting_request.py +127 -0
  289. factpulse-0.1.0/factpulse/models/submit_e_reporting_response.py +117 -0
  290. factpulse-0.1.0/factpulse/models/submit_flow_request.py +124 -0
  291. factpulse-0.1.0/factpulse/models/submit_flow_response.py +110 -0
  292. factpulse-0.1.0/factpulse/models/submit_gross_amount.py +140 -0
  293. factpulse-0.1.0/factpulse/models/submit_invoice_request.py +177 -0
  294. factpulse-0.1.0/factpulse/models/submit_invoice_response.py +104 -0
  295. factpulse-0.1.0/factpulse/models/submit_net_amount.py +140 -0
  296. factpulse-0.1.0/factpulse/models/submit_vat_amount.py +140 -0
  297. factpulse-0.1.0/factpulse/models/supplementary_attachment.py +96 -0
  298. factpulse-0.1.0/factpulse/models/supplier.py +226 -0
  299. factpulse-0.1.0/factpulse/models/task_response.py +88 -0
  300. factpulse-0.1.0/factpulse/models/tax_breakdown_input.py +104 -0
  301. factpulse-0.1.0/factpulse/models/tax_due_date_type.py +42 -0
  302. factpulse-0.1.0/factpulse/models/tax_representative.py +96 -0
  303. factpulse-0.1.0/factpulse/models/taxable_amount.py +140 -0
  304. factpulse-0.1.0/factpulse/models/taxableamount.py +140 -0
  305. factpulse-0.1.0/factpulse/models/taxamount.py +140 -0
  306. factpulse-0.1.0/factpulse/models/taxamount1.py +140 -0
  307. factpulse-0.1.0/factpulse/models/taxamount2.py +140 -0
  308. factpulse-0.1.0/factpulse/models/taxexclusiveamount.py +140 -0
  309. factpulse-0.1.0/factpulse/models/taxexclusiveamount1.py +140 -0
  310. factpulse-0.1.0/factpulse/models/total_gross_amount.py +140 -0
  311. factpulse-0.1.0/factpulse/models/total_net_amount.py +140 -0
  312. factpulse-0.1.0/factpulse/models/total_vat_amount.py +140 -0
  313. factpulse-0.1.0/factpulse/models/transaction_category.py +40 -0
  314. factpulse-0.1.0/factpulse/models/transmission_type_code.py +38 -0
  315. factpulse-0.1.0/factpulse/models/unit_net_price.py +140 -0
  316. factpulse-0.1.0/factpulse/models/unit_of_measure.py +42 -0
  317. factpulse-0.1.0/factpulse/models/validate_cdar_request.py +147 -0
  318. factpulse-0.1.0/factpulse/models/validate_cdar_response.py +107 -0
  319. factpulse-0.1.0/factpulse/models/validate_e_reporting_request.py +92 -0
  320. factpulse-0.1.0/factpulse/models/validate_e_reporting_response.py +113 -0
  321. factpulse-0.1.0/factpulse/models/validation_error.py +100 -0
  322. factpulse-0.1.0/factpulse/models/validation_error_detail.py +108 -0
  323. factpulse-0.1.0/factpulse/models/validation_error_response.py +99 -0
  324. factpulse-0.1.0/factpulse/models/validation_info.py +106 -0
  325. factpulse-0.1.0/factpulse/models/validation_success_response.py +88 -0
  326. factpulse-0.1.0/factpulse/models/vat_accounting_code.py +40 -0
  327. factpulse-0.1.0/factpulse/models/vat_amount.py +140 -0
  328. factpulse-0.1.0/factpulse/models/vat_category.py +45 -0
  329. factpulse-0.1.0/factpulse/models/vat_line.py +141 -0
  330. factpulse-0.1.0/factpulse/models/vat_point_date_code.py +39 -0
  331. factpulse-0.1.0/factpulse/models/vat_rate.py +146 -0
  332. factpulse-0.1.0/factpulse/models/verification_success_response.py +136 -0
  333. factpulse-0.1.0/factpulse/models/verified_field_schema.py +130 -0
  334. factpulse-0.1.0/factpulse/models/webhook_secret_delete_response.py +90 -0
  335. factpulse-0.1.0/factpulse/models/webhook_secret_generate_response.py +95 -0
  336. factpulse-0.1.0/factpulse/models/webhook_secret_status_response.py +96 -0
  337. factpulse-0.1.0/factpulse/py.typed +0 -0
  338. factpulse-0.1.0/factpulse/rest.py +264 -0
  339. factpulse-0.1.0/factpulse.egg-info/PKG-INFO +234 -0
  340. factpulse-0.1.0/factpulse.egg-info/SOURCES.txt +674 -0
  341. factpulse-0.1.0/factpulse.egg-info/dependency_links.txt +1 -0
  342. factpulse-0.1.0/factpulse.egg-info/requires.txt +4 -0
  343. factpulse-0.1.0/factpulse.egg-info/top_level.txt +2 -0
  344. factpulse-0.1.0/factpulse_helpers/__init__.py +34 -0
  345. factpulse-0.1.0/factpulse_helpers/client.py +261 -0
  346. factpulse-0.1.0/factpulse_helpers/exceptions.py +253 -0
  347. factpulse-0.1.0/pyproject.toml +95 -0
  348. factpulse-0.1.0/setup.cfg +7 -0
  349. factpulse-0.1.0/setup.py +57 -0
  350. factpulse-0.1.0/test/test_acknowledgment_status.py +34 -0
  351. factpulse-0.1.0/test/test_action_code_info.py +57 -0
  352. factpulse-0.1.0/test/test_action_codes_response.py +66 -0
  353. factpulse-0.1.0/test/test_additional_document.py +57 -0
  354. factpulse-0.1.0/test/test_afnor_acknowledgement.py +60 -0
  355. factpulse-0.1.0/test/test_afnor_acknowledgement_detail.py +59 -0
  356. factpulse-0.1.0/test/test_afnor_address_edit.py +58 -0
  357. factpulse-0.1.0/test/test_afnor_address_patch.py +58 -0
  358. factpulse-0.1.0/test/test_afnor_address_put.py +65 -0
  359. factpulse-0.1.0/test/test_afnor_address_read.py +59 -0
  360. factpulse-0.1.0/test/test_afnor_algorithm.py +34 -0
  361. factpulse-0.1.0/test/test_afnor_contains_operator.py +34 -0
  362. factpulse-0.1.0/test/test_afnor_create_directory_line_body.py +59 -0
  363. factpulse-0.1.0/test/test_afnor_create_directory_line_body_addressing_information.py +56 -0
  364. factpulse-0.1.0/test/test_afnor_create_directory_line_body_period.py +54 -0
  365. factpulse-0.1.0/test/test_afnor_create_routing_code_body.py +71 -0
  366. factpulse-0.1.0/test/test_afnor_credentials.py +54 -0
  367. factpulse-0.1.0/test/test_afnor_destination.py +56 -0
  368. factpulse-0.1.0/test/test_afnor_diffusion_status.py +34 -0
  369. factpulse-0.1.0/test/test_afnor_directory_line_field.py +34 -0
  370. factpulse-0.1.0/test/test_afnor_directory_line_payload_history_legal_unit_facility_routing_code.py +100 -0
  371. factpulse-0.1.0/test/test_afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.py +53 -0
  372. factpulse-0.1.0/test/test_afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.py +65 -0
  373. factpulse-0.1.0/test/test_afnor_directory_line_post201_response.py +54 -0
  374. factpulse-0.1.0/test/test_afnor_directory_line_search_post200_response.py +106 -0
  375. factpulse-0.1.0/test/test_afnor_entity_type.py +34 -0
  376. factpulse-0.1.0/test/test_afnor_error.py +56 -0
  377. factpulse-0.1.0/test/test_afnor_facility_administrative_status.py +34 -0
  378. factpulse-0.1.0/test/test_afnor_facility_nature.py +34 -0
  379. factpulse-0.1.0/test/test_afnor_facility_payload_history.py +77 -0
  380. factpulse-0.1.0/test/test_afnor_facility_payload_history_ule_b2g_additional_data.py +57 -0
  381. factpulse-0.1.0/test/test_afnor_facility_payload_included.py +73 -0
  382. factpulse-0.1.0/test/test_afnor_facility_type.py +34 -0
  383. factpulse-0.1.0/test/test_afnor_flow.py +70 -0
  384. factpulse-0.1.0/test/test_afnor_flow_ack_status.py +34 -0
  385. factpulse-0.1.0/test/test_afnor_flow_direction.py +34 -0
  386. factpulse-0.1.0/test/test_afnor_flow_info.py +58 -0
  387. factpulse-0.1.0/test/test_afnor_flow_profile.py +34 -0
  388. factpulse-0.1.0/test/test_afnor_flow_syntax.py +34 -0
  389. factpulse-0.1.0/test/test_afnor_flow_type.py +34 -0
  390. factpulse-0.1.0/test/test_afnor_full_flow_info.py +60 -0
  391. factpulse-0.1.0/test/test_afnor_health_check_response.py +57 -0
  392. factpulse-0.1.0/test/test_afnor_legal_unit_administrative_status.py +34 -0
  393. factpulse-0.1.0/test/test_afnor_legal_unit_payload_history.py +55 -0
  394. factpulse-0.1.0/test/test_afnor_legal_unit_payload_included.py +55 -0
  395. factpulse-0.1.0/test/test_afnor_legal_unit_payload_included_no_siren.py +54 -0
  396. factpulse-0.1.0/test/test_afnor_platform_status.py +34 -0
  397. factpulse-0.1.0/test/test_afnor_processing_rule.py +34 -0
  398. factpulse-0.1.0/test/test_afnor_reason_code.py +51 -0
  399. factpulse-0.1.0/test/test_afnor_reason_code_enum.py +34 -0
  400. factpulse-0.1.0/test/test_afnor_recipient_platform_type.py +34 -0
  401. factpulse-0.1.0/test/test_afnor_result.py +62 -0
  402. factpulse-0.1.0/test/test_afnor_routing_code_administrative_status.py +34 -0
  403. factpulse-0.1.0/test/test_afnor_routing_code_field.py +34 -0
  404. factpulse-0.1.0/test/test_afnor_routing_code_payload_history_legal_unit_facility.py +94 -0
  405. factpulse-0.1.0/test/test_afnor_routing_code_post201_response.py +54 -0
  406. factpulse-0.1.0/test/test_afnor_routing_code_search.py +66 -0
  407. factpulse-0.1.0/test/test_afnor_routing_code_search_filters.py +72 -0
  408. factpulse-0.1.0/test/test_afnor_routing_code_search_filters_administrative_status.py +53 -0
  409. factpulse-0.1.0/test/test_afnor_routing_code_search_filters_routing_code_name.py +53 -0
  410. factpulse-0.1.0/test/test_afnor_routing_code_search_filters_routing_identifier.py +53 -0
  411. factpulse-0.1.0/test/test_afnor_routing_code_search_post200_response.py +103 -0
  412. factpulse-0.1.0/test/test_afnor_routing_code_search_sorting_inner.py +53 -0
  413. factpulse-0.1.0/test/test_afnor_search_directory_line.py +63 -0
  414. factpulse-0.1.0/test/test_afnor_search_directory_line_filters.py +66 -0
  415. factpulse-0.1.0/test/test_afnor_search_directory_line_filters_addressing_identifier.py +53 -0
  416. factpulse-0.1.0/test/test_afnor_search_directory_line_filters_addressing_suffix.py +53 -0
  417. factpulse-0.1.0/test/test_afnor_search_directory_line_sorting_inner.py +53 -0
  418. factpulse-0.1.0/test/test_afnor_search_flow_content.py +88 -0
  419. factpulse-0.1.0/test/test_afnor_search_flow_filters.py +64 -0
  420. factpulse-0.1.0/test/test_afnor_search_flow_params.py +80 -0
  421. factpulse-0.1.0/test/test_afnor_search_siren.py +62 -0
  422. factpulse-0.1.0/test/test_afnor_search_siren_filters.py +63 -0
  423. factpulse-0.1.0/test/test_afnor_search_siren_filters_administrative_status.py +53 -0
  424. factpulse-0.1.0/test/test_afnor_search_siren_filters_business_name.py +53 -0
  425. factpulse-0.1.0/test/test_afnor_search_siren_filters_entity_type.py +53 -0
  426. factpulse-0.1.0/test/test_afnor_search_siren_filters_siren.py +53 -0
  427. factpulse-0.1.0/test/test_afnor_search_siren_sorting_inner.py +53 -0
  428. factpulse-0.1.0/test/test_afnor_search_siret.py +68 -0
  429. factpulse-0.1.0/test/test_afnor_search_siret_filters.py +78 -0
  430. factpulse-0.1.0/test/test_afnor_search_siret_filters_address_lines.py +53 -0
  431. factpulse-0.1.0/test/test_afnor_search_siret_filters_administrative_status.py +53 -0
  432. factpulse-0.1.0/test/test_afnor_search_siret_filters_country_subdivision.py +53 -0
  433. factpulse-0.1.0/test/test_afnor_search_siret_filters_facility_type.py +53 -0
  434. factpulse-0.1.0/test/test_afnor_search_siret_filters_locality.py +53 -0
  435. factpulse-0.1.0/test/test_afnor_search_siret_filters_name.py +53 -0
  436. factpulse-0.1.0/test/test_afnor_search_siret_filters_postal_code.py +53 -0
  437. factpulse-0.1.0/test/test_afnor_search_siret_filters_siret.py +53 -0
  438. factpulse-0.1.0/test/test_afnor_search_siret_sorting_inner.py +53 -0
  439. factpulse-0.1.0/test/test_afnor_siren_field.py +34 -0
  440. factpulse-0.1.0/test/test_afnor_siren_search_post200_response.py +71 -0
  441. factpulse-0.1.0/test/test_afnor_siret_field.py +34 -0
  442. factpulse-0.1.0/test/test_afnor_siret_search_post200_response.py +98 -0
  443. factpulse-0.1.0/test/test_afnor_sorting_order.py +34 -0
  444. factpulse-0.1.0/test/test_afnor_strict_operator.py +34 -0
  445. factpulse-0.1.0/test/test_afnor_update_patch_directory_line_body.py +52 -0
  446. factpulse-0.1.0/test/test_afnor_update_patch_routing_code_body.py +62 -0
  447. factpulse-0.1.0/test/test_afnor_update_put_routing_code_body.py +65 -0
  448. factpulse-0.1.0/test/test_afnor_webhook_callback_content.py +71 -0
  449. factpulse-0.1.0/test/test_afnorpdppa_api.py +46 -0
  450. factpulse-0.1.0/test/test_afnorpdppa_directory_service_api.py +165 -0
  451. factpulse-0.1.0/test/test_afnorpdppa_flow_service_api.py +60 -0
  452. factpulse-0.1.0/test/test_aggregated_payment_input.py +64 -0
  453. factpulse-0.1.0/test/test_aggregated_transaction_input.py +74 -0
  454. factpulse-0.1.0/test/test_allowance_charge.py +61 -0
  455. factpulse-0.1.0/test/test_allowance_charge_reason_code.py +34 -0
  456. factpulse-0.1.0/test/test_allowance_reason_code.py +34 -0
  457. factpulse-0.1.0/test/test_allowance_total_amount.py +51 -0
  458. factpulse-0.1.0/test/test_amount.py +51 -0
  459. factpulse-0.1.0/test/test_amount1.py +51 -0
  460. factpulse-0.1.0/test/test_amount2.py +51 -0
  461. factpulse-0.1.0/test/test_amount_due.py +51 -0
  462. factpulse-0.1.0/test/test_api_error.py +63 -0
  463. factpulse-0.1.0/test/test_api_profile.py +34 -0
  464. factpulse-0.1.0/test/test_async_task_status.py +56 -0
  465. factpulse-0.1.0/test/test_async_tasks_api.py +39 -0
  466. factpulse-0.1.0/test/test_base_amount.py +51 -0
  467. factpulse-0.1.0/test/test_bounding_box_schema.py +64 -0
  468. factpulse-0.1.0/test/test_buyercountry.py +51 -0
  469. factpulse-0.1.0/test/test_celery_status.py +34 -0
  470. factpulse-0.1.0/test/test_certificate_info_response.py +74 -0
  471. factpulse-0.1.0/test/test_charge_total_amount.py +51 -0
  472. factpulse-0.1.0/test/test_chorus_pro_api.py +144 -0
  473. factpulse-0.1.0/test/test_chorus_pro_credentials.py +60 -0
  474. factpulse-0.1.0/test/test_chorus_pro_destination.py +53 -0
  475. factpulse-0.1.0/test/test_chorus_pro_result.py +55 -0
  476. factpulse-0.1.0/test/test_client_activate_response.py +57 -0
  477. factpulse-0.1.0/test/test_client_create_request.py +55 -0
  478. factpulse-0.1.0/test/test_client_detail.py +69 -0
  479. factpulse-0.1.0/test/test_client_list_response.py +85 -0
  480. factpulse-0.1.0/test/test_client_management_api.py +116 -0
  481. factpulse-0.1.0/test/test_client_summary.py +69 -0
  482. factpulse-0.1.0/test/test_client_update_request.py +54 -0
  483. factpulse-0.1.0/test/test_contact.py +55 -0
  484. factpulse-0.1.0/test/test_convert_resume_request.py +52 -0
  485. factpulse-0.1.0/test/test_convert_success_response.py +118 -0
  486. factpulse-0.1.0/test/test_convert_validation_failed_response.py +116 -0
  487. factpulse-0.1.0/test/test_country_code.py +34 -0
  488. factpulse-0.1.0/test/test_create_aggregated_report_request.py +137 -0
  489. factpulse-0.1.0/test/test_create_cdar_request.py +81 -0
  490. factpulse-0.1.0/test/test_create_e_reporting_request.py +139 -0
  491. factpulse-0.1.0/test/test_currency.py +51 -0
  492. factpulse-0.1.0/test/test_currency_code.py +34 -0
  493. factpulse-0.1.0/test/test_delivery_party.py +64 -0
  494. factpulse-0.1.0/test/test_destination.py +56 -0
  495. factpulse-0.1.0/test/test_doc_type.py +34 -0
  496. factpulse-0.1.0/test/test_document_type_info.py +57 -0
  497. factpulse-0.1.0/test/test_downloads_api.py +46 -0
  498. factpulse-0.1.0/test/test_e_reporting_flow_type.py +34 -0
  499. factpulse-0.1.0/test/test_e_reporting_validation_error.py +56 -0
  500. factpulse-0.1.0/test/test_electronic_address.py +54 -0
  501. factpulse-0.1.0/test/test_electronic_signature_api.py +60 -0
  502. factpulse-0.1.0/test/test_encaisseamount.py +51 -0
  503. factpulse-0.1.0/test/test_encaisseamount1.py +51 -0
  504. factpulse-0.1.0/test/test_encaissee_request.py +68 -0
  505. factpulse-0.1.0/test/test_enriched_invoice_info.py +65 -0
  506. factpulse-0.1.0/test/test_error_level.py +34 -0
  507. factpulse-0.1.0/test/test_error_source.py +34 -0
  508. factpulse-0.1.0/test/test_extraction_info.py +57 -0
  509. factpulse-0.1.0/test/test_factur_x_conversion_api.py +60 -0
  510. factpulse-0.1.0/test/test_factur_x_generation_api.py +53 -0
  511. factpulse-0.1.0/test/test_factur_x_invoice.py +349 -0
  512. factpulse-0.1.0/test/test_factur_x_validation_api.py +53 -0
  513. factpulse-0.1.0/test/test_factur_xpdf_info.py +56 -0
  514. factpulse-0.1.0/test/test_factur_xpdfxml_verification_api.py +53 -0
  515. factpulse-0.1.0/test/test_facture_electronique_rest_api_schemas_ereporting_invoice_type_code.py +34 -0
  516. factpulse-0.1.0/test/test_facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py +56 -0
  517. factpulse-0.1.0/test/test_facture_electronique_rest_api_schemas_validation_validation_error_response.py +57 -0
  518. factpulse-0.1.0/test/test_field_status.py +34 -0
  519. factpulse-0.1.0/test/test_file_info.py +53 -0
  520. factpulse-0.1.0/test/test_files_info.py +57 -0
  521. factpulse-0.1.0/test/test_flow_direction.py +34 -0
  522. factpulse-0.1.0/test/test_flow_profile.py +34 -0
  523. factpulse-0.1.0/test/test_flow_summary.py +61 -0
  524. factpulse-0.1.0/test/test_flow_syntax.py +34 -0
  525. factpulse-0.1.0/test/test_flow_type.py +34 -0
  526. factpulse-0.1.0/test/test_flux10_e_reporting_api.py +109 -0
  527. factpulse-0.1.0/test/test_flux6_invoice_lifecycle_cdar_api.py +102 -0
  528. factpulse-0.1.0/test/test_generate_aggregated_report_response.py +65 -0
  529. factpulse-0.1.0/test/test_generate_cdar_response.py +61 -0
  530. factpulse-0.1.0/test/test_generate_certificate_request.py +62 -0
  531. factpulse-0.1.0/test/test_generate_certificate_response.py +92 -0
  532. factpulse-0.1.0/test/test_generate_e_reporting_response.py +61 -0
  533. factpulse-0.1.0/test/test_get_chorus_pro_id_request.py +55 -0
  534. factpulse-0.1.0/test/test_get_chorus_pro_id_response.py +58 -0
  535. factpulse-0.1.0/test/test_get_invoice_request.py +54 -0
  536. factpulse-0.1.0/test/test_get_invoice_response.py +65 -0
  537. factpulse-0.1.0/test/test_get_structure_request.py +55 -0
  538. factpulse-0.1.0/test/test_get_structure_response.py +65 -0
  539. factpulse-0.1.0/test/test_global_allowance_amount.py +51 -0
  540. factpulse-0.1.0/test/test_gross_unit_price.py +51 -0
  541. factpulse-0.1.0/test/test_health_api.py +53 -0
  542. factpulse-0.1.0/test/test_http_validation_error.py +59 -0
  543. factpulse-0.1.0/test/test_incoming_invoice.py +94 -0
  544. factpulse-0.1.0/test/test_incoming_supplier.py +69 -0
  545. factpulse-0.1.0/test/test_invoice_format.py +34 -0
  546. factpulse-0.1.0/test/test_invoice_input.py +84 -0
  547. factpulse-0.1.0/test/test_invoice_line.py +120 -0
  548. factpulse-0.1.0/test/test_invoice_line_allowance_amount.py +51 -0
  549. factpulse-0.1.0/test/test_invoice_note.py +54 -0
  550. factpulse-0.1.0/test/test_invoice_payment_input.py +68 -0
  551. factpulse-0.1.0/test/test_invoice_references.py +72 -0
  552. factpulse-0.1.0/test/test_invoice_status.py +56 -0
  553. factpulse-0.1.0/test/test_invoice_totals.py +66 -0
  554. factpulse-0.1.0/test/test_invoice_totals_prepayment.py +51 -0
  555. factpulse-0.1.0/test/test_invoice_type_code.py +34 -0
  556. factpulse-0.1.0/test/test_invoice_type_code_output.py +34 -0
  557. factpulse-0.1.0/test/test_invoicing_framework.py +56 -0
  558. factpulse-0.1.0/test/test_invoicing_framework_code.py +34 -0
  559. factpulse-0.1.0/test/test_issuer_role_code.py +34 -0
  560. factpulse-0.1.0/test/test_key_rotation_request.py +55 -0
  561. factpulse-0.1.0/test/test_key_rotation_response.py +60 -0
  562. factpulse-0.1.0/test/test_line_net_amount.py +51 -0
  563. factpulse-0.1.0/test/test_line_sub_type.py +34 -0
  564. factpulse-0.1.0/test/test_line_total_amount.py +51 -0
  565. factpulse-0.1.0/test/test_location_inner.py +51 -0
  566. factpulse-0.1.0/test/test_mandatory_note_schema.py +60 -0
  567. factpulse-0.1.0/test/test_manual_rate.py +51 -0
  568. factpulse-0.1.0/test/test_manual_vat_rate.py +51 -0
  569. factpulse-0.1.0/test/test_missing_field.py +65 -0
  570. factpulse-0.1.0/test/test_operation_nature.py +34 -0
  571. factpulse-0.1.0/test/test_output_format.py +34 -0
  572. factpulse-0.1.0/test/test_page_dimensions_schema.py +55 -0
  573. factpulse-0.1.0/test/test_payee.py +66 -0
  574. factpulse-0.1.0/test/test_payment_amount_by_rate.py +55 -0
  575. factpulse-0.1.0/test/test_payment_card.py +53 -0
  576. factpulse-0.1.0/test/test_payment_means.py +34 -0
  577. factpulse-0.1.0/test/test_pdf_validation_result_api.py +100 -0
  578. factpulse-0.1.0/test/test_pdp_config_response.py +71 -0
  579. factpulse-0.1.0/test/test_pdp_config_update_request.py +62 -0
  580. factpulse-0.1.0/test/test_pdp_credentials.py +60 -0
  581. factpulse-0.1.0/test/test_percentage.py +51 -0
  582. factpulse-0.1.0/test/test_postal_address.py +58 -0
  583. factpulse-0.1.0/test/test_price_allowance_amount.py +51 -0
  584. factpulse-0.1.0/test/test_price_basis_quantity.py +51 -0
  585. factpulse-0.1.0/test/test_processing_options.py +55 -0
  586. factpulse-0.1.0/test/test_processing_rule.py +34 -0
  587. factpulse-0.1.0/test/test_product_characteristic.py +55 -0
  588. factpulse-0.1.0/test/test_product_classification.py +55 -0
  589. factpulse-0.1.0/test/test_quantity.py +51 -0
  590. factpulse-0.1.0/test/test_rate.py +51 -0
  591. factpulse-0.1.0/test/test_rate1.py +51 -0
  592. factpulse-0.1.0/test/test_reason_code_info.py +57 -0
  593. factpulse-0.1.0/test/test_reason_codes_response.py +66 -0
  594. factpulse-0.1.0/test/test_recipient.py +77 -0
  595. factpulse-0.1.0/test/test_recipient_input.py +56 -0
  596. factpulse-0.1.0/test/test_refusee_request.py +68 -0
  597. factpulse-0.1.0/test/test_report_issuer.py +56 -0
  598. factpulse-0.1.0/test/test_report_period.py +55 -0
  599. factpulse-0.1.0/test/test_report_sender.py +56 -0
  600. factpulse-0.1.0/test/test_rounding_amount.py +51 -0
  601. factpulse-0.1.0/test/test_schematron_validation_error.py +62 -0
  602. factpulse-0.1.0/test/test_scheme_id.py +34 -0
  603. factpulse-0.1.0/test/test_search_flow_request.py +64 -0
  604. factpulse-0.1.0/test/test_search_flow_response.py +79 -0
  605. factpulse-0.1.0/test/test_search_services_response.py +63 -0
  606. factpulse-0.1.0/test/test_search_structure_request.py +56 -0
  607. factpulse-0.1.0/test/test_search_structure_response.py +64 -0
  608. factpulse-0.1.0/test/test_secret_status.py +57 -0
  609. factpulse-0.1.0/test/test_sellercountry.py +51 -0
  610. factpulse-0.1.0/test/test_signature_info.py +55 -0
  611. factpulse-0.1.0/test/test_signature_info_api.py +58 -0
  612. factpulse-0.1.0/test/test_signature_parameters.py +60 -0
  613. factpulse-0.1.0/test/test_simplified_cdar_response.py +61 -0
  614. factpulse-0.1.0/test/test_simplified_invoice_data.py +72 -0
  615. factpulse-0.1.0/test/test_status_code_info.py +57 -0
  616. factpulse-0.1.0/test/test_status_codes_response.py +66 -0
  617. factpulse-0.1.0/test/test_structure_info.py +61 -0
  618. factpulse-0.1.0/test/test_structure_parameters.py +54 -0
  619. factpulse-0.1.0/test/test_structure_service.py +59 -0
  620. factpulse-0.1.0/test/test_submission_mode.py +34 -0
  621. factpulse-0.1.0/test/test_submit_aggregated_report_request.py +58 -0
  622. factpulse-0.1.0/test/test_submit_cdar_request.py +86 -0
  623. factpulse-0.1.0/test/test_submit_cdar_response.py +57 -0
  624. factpulse-0.1.0/test/test_submit_cdarxml_request.py +59 -0
  625. factpulse-0.1.0/test/test_submit_complete_invoice_request.py +98 -0
  626. factpulse-0.1.0/test/test_submit_complete_invoice_response.py +86 -0
  627. factpulse-0.1.0/test/test_submit_e_reporting_request.py +58 -0
  628. factpulse-0.1.0/test/test_submit_e_reporting_response.py +64 -0
  629. factpulse-0.1.0/test/test_submit_flow_request.py +58 -0
  630. factpulse-0.1.0/test/test_submit_flow_response.py +63 -0
  631. factpulse-0.1.0/test/test_submit_gross_amount.py +51 -0
  632. factpulse-0.1.0/test/test_submit_invoice_request.py +72 -0
  633. factpulse-0.1.0/test/test_submit_invoice_response.py +57 -0
  634. factpulse-0.1.0/test/test_submit_net_amount.py +51 -0
  635. factpulse-0.1.0/test/test_submit_vat_amount.py +51 -0
  636. factpulse-0.1.0/test/test_supplementary_attachment.py +61 -0
  637. factpulse-0.1.0/test/test_supplier.py +87 -0
  638. factpulse-0.1.0/test/test_task_response.py +53 -0
  639. factpulse-0.1.0/test/test_tax_breakdown_input.py +57 -0
  640. factpulse-0.1.0/test/test_tax_due_date_type.py +34 -0
  641. factpulse-0.1.0/test/test_tax_representative.py +71 -0
  642. factpulse-0.1.0/test/test_taxable_amount.py +51 -0
  643. factpulse-0.1.0/test/test_taxableamount.py +51 -0
  644. factpulse-0.1.0/test/test_taxamount.py +51 -0
  645. factpulse-0.1.0/test/test_taxamount1.py +51 -0
  646. factpulse-0.1.0/test/test_taxamount2.py +51 -0
  647. factpulse-0.1.0/test/test_taxexclusiveamount.py +51 -0
  648. factpulse-0.1.0/test/test_taxexclusiveamount1.py +51 -0
  649. factpulse-0.1.0/test/test_total_gross_amount.py +51 -0
  650. factpulse-0.1.0/test/test_total_net_amount.py +51 -0
  651. factpulse-0.1.0/test/test_total_vat_amount.py +51 -0
  652. factpulse-0.1.0/test/test_transaction_category.py +34 -0
  653. factpulse-0.1.0/test/test_transmission_type_code.py +34 -0
  654. factpulse-0.1.0/test/test_unit_net_price.py +51 -0
  655. factpulse-0.1.0/test/test_unit_of_measure.py +34 -0
  656. factpulse-0.1.0/test/test_validate_cdar_request.py +59 -0
  657. factpulse-0.1.0/test/test_validate_cdar_response.py +67 -0
  658. factpulse-0.1.0/test/test_validate_e_reporting_request.py +53 -0
  659. factpulse-0.1.0/test/test_validate_e_reporting_response.py +71 -0
  660. factpulse-0.1.0/test/test_validation_error.py +61 -0
  661. factpulse-0.1.0/test/test_validation_error_detail.py +58 -0
  662. factpulse-0.1.0/test/test_validation_error_response.py +57 -0
  663. factpulse-0.1.0/test/test_validation_info.py +70 -0
  664. factpulse-0.1.0/test/test_validation_success_response.py +53 -0
  665. factpulse-0.1.0/test/test_vat_accounting_code.py +34 -0
  666. factpulse-0.1.0/test/test_vat_amount.py +51 -0
  667. factpulse-0.1.0/test/test_vat_category.py +34 -0
  668. factpulse-0.1.0/test/test_vat_line.py +61 -0
  669. factpulse-0.1.0/test/test_vat_point_date_code.py +34 -0
  670. factpulse-0.1.0/test/test_vat_rate.py +51 -0
  671. factpulse-0.1.0/test/test_verification_success_response.py +71 -0
  672. factpulse-0.1.0/test/test_verified_field_schema.py +63 -0
  673. factpulse-0.1.0/test/test_webhook_secret_delete_response.py +55 -0
  674. factpulse-0.1.0/test/test_webhook_secret_generate_response.py +59 -0
  675. factpulse-0.1.0/test/test_webhook_secret_status_response.py +54 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 FactPulse
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,234 @@
1
+ Metadata-Version: 2.4
2
+ Name: factpulse
3
+ Version: 0.1.0
4
+ Summary: FactPulse REST API
5
+ Home-page: https://github.com/factpulse/sdk-python
6
+ Author: FactPulse
7
+ Author-email: FactPulse <contact@factpulse.fr>
8
+ License: Proprietary
9
+ Project-URL: Repository, https://github.com/GIT_USER_ID/GIT_REPO_ID
10
+ Keywords: OpenAPI,OpenAPI-Generator,FactPulse REST API
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: urllib3<3.0.0,>=2.1.0
15
+ Requires-Dist: python-dateutil>=2.8.2
16
+ Requires-Dist: pydantic>=2
17
+ Requires-Dist: typing-extensions>=4.7.1
18
+ Dynamic: author
19
+ Dynamic: home-page
20
+ Dynamic: license-file
21
+
22
+ # FactPulse SDK Python
23
+
24
+ Official Python client for the FactPulse API - French electronic invoicing.
25
+
26
+ ## Features
27
+
28
+ - **Factur-X**: Generation and validation of electronic invoices (MINIMUM, BASIC, EN16931, EXTENDED profiles)
29
+ - **Chorus Pro**: Integration with the French public invoicing platform
30
+ - **AFNOR PDP/PA**: Submission of flows compliant with XP Z12-013 standard
31
+ - **Electronic signature**: PDF signing (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
32
+ - **Thin HTTP wrapper**: Generic `post()` and `get()` methods with automatic JWT auth and polling
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ pip install factpulse
38
+ ```
39
+
40
+ ## Quick Start
41
+
42
+ ```python
43
+ import base64
44
+ from factpulse_helpers import FactPulseClient
45
+
46
+ # Create the client
47
+ client = FactPulseClient(
48
+ email="your_email@example.com",
49
+ password="your_password",
50
+ client_uid="your-client-uuid", # From dashboard: Configuration > Clients
51
+ )
52
+
53
+ # Read your source PDF
54
+ with open("source_invoice.pdf", "rb") as f:
55
+ pdf_b64 = base64.b64encode(f.read()).decode()
56
+
57
+ # Generate Factur-X and submit to PDP in one call
58
+ result = client.post(
59
+ "processing/invoices/submit-complete-async",
60
+ invoiceData={
61
+ "number": "INV-2025-001",
62
+ "supplier": {
63
+ "name": "ACME Corporation",
64
+ "siret": "12345678901234",
65
+ "iban": "FR7630001007941234567890185",
66
+ "routing_address": "12345678901234",
67
+ },
68
+ "recipient": {
69
+ "name": "Client Company SA",
70
+ "siret": "98765432109876",
71
+ "routing_address": "98765432109876",
72
+ },
73
+ "lines": [
74
+ {
75
+ "description": "Consulting services",
76
+ "quantity": 10,
77
+ "unitPrice": 100.0,
78
+ "vatRate": 20.0,
79
+ }
80
+ ],
81
+ },
82
+ sourcePdf=pdf_b64,
83
+ profile="EN16931",
84
+ destination={"type": "afnor"},
85
+ )
86
+
87
+ # PDF is in result["content"] (auto-polled, auto-decoded from base64)
88
+ with open("facturx_invoice.pdf", "wb") as f:
89
+ f.write(result["content"])
90
+
91
+ print(f"Flow ID: {result['afnorResult']['flowId']}")
92
+ ```
93
+
94
+ ## API Methods
95
+
96
+ The SDK provides two generic methods that map directly to API endpoints:
97
+
98
+ ```python
99
+ # POST /api/v1/{path}
100
+ result = client.post("path/to/endpoint", key1=value1, key2=value2)
101
+
102
+ # GET /api/v1/{path}
103
+ result = client.get("path/to/endpoint", param1=value1)
104
+ ```
105
+
106
+ ### Common Endpoints
107
+
108
+ | Endpoint | Method | Description |
109
+ |----------|--------|-------------|
110
+ | `processing/invoices/submit-complete-async` | POST | Generate Factur-X + submit to PDP |
111
+ | `processing/generate-invoice` | POST | Generate Factur-X XML or PDF |
112
+ | `processing/validate-xml` | POST | Validate Factur-X XML |
113
+ | `processing/validate-facturx-pdf` | POST | Validate Factur-X PDF |
114
+ | `processing/sign-pdf` | POST | Sign PDF with certificate |
115
+ | `afnor/flow/v1/flows` | POST | Submit flow to AFNOR PDP |
116
+ | `afnor/incoming-flows/{flow_id}` | GET | Get incoming invoice |
117
+ | `chorus-pro/factures/soumettre` | POST | Submit to Chorus Pro |
118
+
119
+ ## Webhooks
120
+
121
+ Instead of polling, you can receive results via webhook by adding `callbackUrl`:
122
+
123
+ ```python
124
+ # Submit with webhook - returns immediately
125
+ result = client.post(
126
+ "processing/invoices/submit-complete-async",
127
+ invoiceData=invoice_data,
128
+ sourcePdf=pdf_b64,
129
+ destination={"type": "afnor"},
130
+ callbackUrl="https://your-server.com/webhook/factpulse",
131
+ webhookMode="INLINE", # or "DOWNLOAD_URL"
132
+ )
133
+
134
+ task_id = result["taskId"]
135
+ # Result will be POSTed to your webhook URL
136
+ ```
137
+
138
+ ### Webhook Receiver Example (Flask)
139
+
140
+ ```python
141
+ import hmac
142
+ import hashlib
143
+ from flask import Flask, request, jsonify
144
+
145
+ app = Flask(__name__)
146
+ WEBHOOK_SECRET = "your-shared-secret"
147
+
148
+ def verify_signature(payload: bytes, signature: str) -> bool:
149
+ if not signature.startswith("sha256="):
150
+ return False
151
+ expected = hmac.new(WEBHOOK_SECRET.encode(), payload, hashlib.sha256).hexdigest()
152
+ return hmac.compare_digest(signature[7:], expected)
153
+
154
+ @app.route("/webhook/factpulse", methods=["POST"])
155
+ def webhook_handler():
156
+ signature = request.headers.get("X-Webhook-Signature", "")
157
+ if not verify_signature(request.data, signature):
158
+ return jsonify({"error": "Invalid signature"}), 401
159
+
160
+ event = request.json
161
+ event_type = event["event_type"]
162
+ data = event["data"]
163
+
164
+ if event_type == "submission.completed":
165
+ flow_id = data.get("afnorResult", {}).get("flowId")
166
+ print(f"Invoice submitted: {flow_id}")
167
+ elif event_type == "submission.failed":
168
+ print(f"Submission failed: {data.get('error')}")
169
+
170
+ return jsonify({"status": "received"})
171
+ ```
172
+
173
+ ### Webhook Event Types
174
+
175
+ | Event | Description |
176
+ |-------|-------------|
177
+ | `generation.completed` | Factur-X generated successfully |
178
+ | `generation.failed` | Generation failed |
179
+ | `validation.completed` | Validation passed |
180
+ | `validation.failed` | Validation failed |
181
+ | `signature.completed` | PDF signed |
182
+ | `submission.completed` | Submitted to PDP/Chorus |
183
+ | `submission.failed` | Submission failed |
184
+
185
+ ## Zero-Storage Mode
186
+
187
+ Pass PDP credentials directly in the request (no server-side storage):
188
+
189
+ ```python
190
+ result = client.post(
191
+ "processing/invoices/submit-complete-async",
192
+ invoiceData=invoice_data,
193
+ sourcePdf=pdf_b64,
194
+ destination={
195
+ "type": "afnor",
196
+ "flowServiceUrl": "https://api.pdp.example.com/flow/v1",
197
+ "tokenUrl": "https://auth.pdp.example.com/oauth/token",
198
+ "clientId": "your_pdp_client_id",
199
+ "clientSecret": "your_pdp_client_secret",
200
+ },
201
+ )
202
+ ```
203
+
204
+ ## Error Handling
205
+
206
+ ```python
207
+ from factpulse_helpers import FactPulseClient, FactPulseError
208
+
209
+ try:
210
+ result = client.post("processing/validate-xml", xmlContent=xml_string)
211
+ except FactPulseError as e:
212
+ print(f"Error: {e}")
213
+ print(f"Status code: {e.status_code}")
214
+ print(f"Details: {e.details}") # Validation errors list
215
+ ```
216
+
217
+ ## Available Helpers
218
+
219
+ The SDK provides the following helper classes:
220
+
221
+ - `FactPulseClient`: Main HTTP client with auto-auth and polling
222
+ - `FactPulseError`: Base exception class
223
+ - `FactPulseAuthError`: Authentication failure
224
+ - `FactPulseValidationError`: Validation errors with details
225
+ - `FactPulsePollingTimeout`: Task polling timeout
226
+
227
+ ## Resources
228
+
229
+ - **API Documentation**: https://factpulse.fr/api/facturation/documentation
230
+ - **Support**: contact@factpulse.fr
231
+
232
+ ## License
233
+
234
+ MIT License - Copyright (c) 2025 FactPulse
@@ -0,0 +1,213 @@
1
+ # FactPulse SDK Python
2
+
3
+ Official Python client for the FactPulse API - French electronic invoicing.
4
+
5
+ ## Features
6
+
7
+ - **Factur-X**: Generation and validation of electronic invoices (MINIMUM, BASIC, EN16931, EXTENDED profiles)
8
+ - **Chorus Pro**: Integration with the French public invoicing platform
9
+ - **AFNOR PDP/PA**: Submission of flows compliant with XP Z12-013 standard
10
+ - **Electronic signature**: PDF signing (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
11
+ - **Thin HTTP wrapper**: Generic `post()` and `get()` methods with automatic JWT auth and polling
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pip install factpulse
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```python
22
+ import base64
23
+ from factpulse_helpers import FactPulseClient
24
+
25
+ # Create the client
26
+ client = FactPulseClient(
27
+ email="your_email@example.com",
28
+ password="your_password",
29
+ client_uid="your-client-uuid", # From dashboard: Configuration > Clients
30
+ )
31
+
32
+ # Read your source PDF
33
+ with open("source_invoice.pdf", "rb") as f:
34
+ pdf_b64 = base64.b64encode(f.read()).decode()
35
+
36
+ # Generate Factur-X and submit to PDP in one call
37
+ result = client.post(
38
+ "processing/invoices/submit-complete-async",
39
+ invoiceData={
40
+ "number": "INV-2025-001",
41
+ "supplier": {
42
+ "name": "ACME Corporation",
43
+ "siret": "12345678901234",
44
+ "iban": "FR7630001007941234567890185",
45
+ "routing_address": "12345678901234",
46
+ },
47
+ "recipient": {
48
+ "name": "Client Company SA",
49
+ "siret": "98765432109876",
50
+ "routing_address": "98765432109876",
51
+ },
52
+ "lines": [
53
+ {
54
+ "description": "Consulting services",
55
+ "quantity": 10,
56
+ "unitPrice": 100.0,
57
+ "vatRate": 20.0,
58
+ }
59
+ ],
60
+ },
61
+ sourcePdf=pdf_b64,
62
+ profile="EN16931",
63
+ destination={"type": "afnor"},
64
+ )
65
+
66
+ # PDF is in result["content"] (auto-polled, auto-decoded from base64)
67
+ with open("facturx_invoice.pdf", "wb") as f:
68
+ f.write(result["content"])
69
+
70
+ print(f"Flow ID: {result['afnorResult']['flowId']}")
71
+ ```
72
+
73
+ ## API Methods
74
+
75
+ The SDK provides two generic methods that map directly to API endpoints:
76
+
77
+ ```python
78
+ # POST /api/v1/{path}
79
+ result = client.post("path/to/endpoint", key1=value1, key2=value2)
80
+
81
+ # GET /api/v1/{path}
82
+ result = client.get("path/to/endpoint", param1=value1)
83
+ ```
84
+
85
+ ### Common Endpoints
86
+
87
+ | Endpoint | Method | Description |
88
+ |----------|--------|-------------|
89
+ | `processing/invoices/submit-complete-async` | POST | Generate Factur-X + submit to PDP |
90
+ | `processing/generate-invoice` | POST | Generate Factur-X XML or PDF |
91
+ | `processing/validate-xml` | POST | Validate Factur-X XML |
92
+ | `processing/validate-facturx-pdf` | POST | Validate Factur-X PDF |
93
+ | `processing/sign-pdf` | POST | Sign PDF with certificate |
94
+ | `afnor/flow/v1/flows` | POST | Submit flow to AFNOR PDP |
95
+ | `afnor/incoming-flows/{flow_id}` | GET | Get incoming invoice |
96
+ | `chorus-pro/factures/soumettre` | POST | Submit to Chorus Pro |
97
+
98
+ ## Webhooks
99
+
100
+ Instead of polling, you can receive results via webhook by adding `callbackUrl`:
101
+
102
+ ```python
103
+ # Submit with webhook - returns immediately
104
+ result = client.post(
105
+ "processing/invoices/submit-complete-async",
106
+ invoiceData=invoice_data,
107
+ sourcePdf=pdf_b64,
108
+ destination={"type": "afnor"},
109
+ callbackUrl="https://your-server.com/webhook/factpulse",
110
+ webhookMode="INLINE", # or "DOWNLOAD_URL"
111
+ )
112
+
113
+ task_id = result["taskId"]
114
+ # Result will be POSTed to your webhook URL
115
+ ```
116
+
117
+ ### Webhook Receiver Example (Flask)
118
+
119
+ ```python
120
+ import hmac
121
+ import hashlib
122
+ from flask import Flask, request, jsonify
123
+
124
+ app = Flask(__name__)
125
+ WEBHOOK_SECRET = "your-shared-secret"
126
+
127
+ def verify_signature(payload: bytes, signature: str) -> bool:
128
+ if not signature.startswith("sha256="):
129
+ return False
130
+ expected = hmac.new(WEBHOOK_SECRET.encode(), payload, hashlib.sha256).hexdigest()
131
+ return hmac.compare_digest(signature[7:], expected)
132
+
133
+ @app.route("/webhook/factpulse", methods=["POST"])
134
+ def webhook_handler():
135
+ signature = request.headers.get("X-Webhook-Signature", "")
136
+ if not verify_signature(request.data, signature):
137
+ return jsonify({"error": "Invalid signature"}), 401
138
+
139
+ event = request.json
140
+ event_type = event["event_type"]
141
+ data = event["data"]
142
+
143
+ if event_type == "submission.completed":
144
+ flow_id = data.get("afnorResult", {}).get("flowId")
145
+ print(f"Invoice submitted: {flow_id}")
146
+ elif event_type == "submission.failed":
147
+ print(f"Submission failed: {data.get('error')}")
148
+
149
+ return jsonify({"status": "received"})
150
+ ```
151
+
152
+ ### Webhook Event Types
153
+
154
+ | Event | Description |
155
+ |-------|-------------|
156
+ | `generation.completed` | Factur-X generated successfully |
157
+ | `generation.failed` | Generation failed |
158
+ | `validation.completed` | Validation passed |
159
+ | `validation.failed` | Validation failed |
160
+ | `signature.completed` | PDF signed |
161
+ | `submission.completed` | Submitted to PDP/Chorus |
162
+ | `submission.failed` | Submission failed |
163
+
164
+ ## Zero-Storage Mode
165
+
166
+ Pass PDP credentials directly in the request (no server-side storage):
167
+
168
+ ```python
169
+ result = client.post(
170
+ "processing/invoices/submit-complete-async",
171
+ invoiceData=invoice_data,
172
+ sourcePdf=pdf_b64,
173
+ destination={
174
+ "type": "afnor",
175
+ "flowServiceUrl": "https://api.pdp.example.com/flow/v1",
176
+ "tokenUrl": "https://auth.pdp.example.com/oauth/token",
177
+ "clientId": "your_pdp_client_id",
178
+ "clientSecret": "your_pdp_client_secret",
179
+ },
180
+ )
181
+ ```
182
+
183
+ ## Error Handling
184
+
185
+ ```python
186
+ from factpulse_helpers import FactPulseClient, FactPulseError
187
+
188
+ try:
189
+ result = client.post("processing/validate-xml", xmlContent=xml_string)
190
+ except FactPulseError as e:
191
+ print(f"Error: {e}")
192
+ print(f"Status code: {e.status_code}")
193
+ print(f"Details: {e.details}") # Validation errors list
194
+ ```
195
+
196
+ ## Available Helpers
197
+
198
+ The SDK provides the following helper classes:
199
+
200
+ - `FactPulseClient`: Main HTTP client with auto-auth and polling
201
+ - `FactPulseError`: Base exception class
202
+ - `FactPulseAuthError`: Authentication failure
203
+ - `FactPulseValidationError`: Validation errors with details
204
+ - `FactPulsePollingTimeout`: Task polling timeout
205
+
206
+ ## Resources
207
+
208
+ - **API Documentation**: https://factpulse.fr/api/facturation/documentation
209
+ - **Support**: contact@factpulse.fr
210
+
211
+ ## License
212
+
213
+ MIT License - Copyright (c) 2025 FactPulse