factpulse 1.0.9__py3-none-any.whl → 3.0.7__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 (269) hide show
  1. factpulse/__init__.py +275 -203
  2. factpulse/api/__init__.py +5 -3
  3. factpulse/api/afnorpdppa_api.py +559 -9
  4. factpulse/api/afnorpdppa_directory_service_api.py +4313 -66
  5. factpulse/api/afnorpdppa_flow_service_api.py +23 -23
  6. factpulse/api/chorus_pro_api.py +362 -404
  7. factpulse/api/{signature_lectronique_api.py → document_conversion_api.py} +519 -371
  8. factpulse/api/health_api.py +526 -0
  9. factpulse/api/invoice_processing_api.py +3437 -0
  10. factpulse/api/pdfxml_verification_api.py +1719 -0
  11. factpulse/api/{sant_api.py → user_api.py} +18 -17
  12. factpulse/api_client.py +6 -6
  13. factpulse/configuration.py +6 -4
  14. factpulse/exceptions.py +8 -5
  15. factpulse/models/__init__.py +133 -99
  16. factpulse/models/acknowledgment_status.py +38 -0
  17. factpulse/models/additional_document.py +115 -0
  18. factpulse/models/afnor_credentials.py +106 -0
  19. factpulse/models/afnor_destination.py +127 -0
  20. factpulse/models/afnor_health_check_response.py +91 -0
  21. factpulse/models/afnor_result.py +105 -0
  22. factpulse/models/allowance_charge.py +147 -0
  23. factpulse/models/allowance_reason_code.py +42 -0
  24. factpulse/models/allowance_total_amount.py +145 -0
  25. factpulse/models/amount.py +139 -0
  26. factpulse/models/amount_due.py +139 -0
  27. factpulse/models/api_error.py +104 -0
  28. factpulse/models/async_task_status.py +97 -0
  29. factpulse/models/base_amount.py +145 -0
  30. factpulse/models/bounding_box_schema.py +100 -0
  31. factpulse/models/celery_status.py +40 -0
  32. factpulse/models/certificate_info_response.py +24 -24
  33. factpulse/models/charge_total_amount.py +145 -0
  34. factpulse/models/chorus_pro_destination.py +108 -0
  35. factpulse/models/chorus_pro_result.py +101 -0
  36. factpulse/models/contact.py +113 -0
  37. factpulse/models/convert_error_response.py +105 -0
  38. factpulse/models/convert_pending_input_response.py +114 -0
  39. factpulse/models/convert_resume_request.py +87 -0
  40. factpulse/models/convert_success_response.py +126 -0
  41. factpulse/models/convert_validation_failed_response.py +120 -0
  42. factpulse/models/delivery_party.py +121 -0
  43. factpulse/models/destination.py +27 -27
  44. factpulse/models/document_type_info.py +91 -0
  45. factpulse/models/electronic_address.py +90 -0
  46. factpulse/models/enriched_invoice_info.py +133 -0
  47. factpulse/models/error_level.py +37 -0
  48. factpulse/models/error_source.py +43 -0
  49. factpulse/models/extraction_info.py +93 -0
  50. factpulse/models/factur_x_invoice.py +320 -0
  51. factpulse/models/factur_x_profile.py +39 -0
  52. factpulse/models/factur_xpdf_info.py +91 -0
  53. factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.py +95 -0
  54. factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py +115 -0
  55. factpulse/models/field_status.py +40 -0
  56. factpulse/models/file_info.py +94 -0
  57. factpulse/models/files_info.py +106 -0
  58. factpulse/models/flow_direction.py +37 -0
  59. factpulse/models/flow_profile.py +38 -0
  60. factpulse/models/flow_summary.py +131 -0
  61. factpulse/models/flow_syntax.py +40 -0
  62. factpulse/models/flow_type.py +40 -0
  63. factpulse/models/generate_certificate_request.py +26 -26
  64. factpulse/models/generate_certificate_response.py +15 -15
  65. factpulse/models/get_chorus_pro_id_request.py +100 -0
  66. factpulse/models/get_chorus_pro_id_response.py +98 -0
  67. factpulse/models/get_invoice_request.py +98 -0
  68. factpulse/models/get_invoice_response.py +142 -0
  69. factpulse/models/get_structure_request.py +100 -0
  70. factpulse/models/get_structure_response.py +142 -0
  71. factpulse/models/global_allowance_amount.py +139 -0
  72. factpulse/models/gross_unit_price.py +145 -0
  73. factpulse/models/http_validation_error.py +2 -2
  74. factpulse/models/incoming_invoice.py +196 -0
  75. factpulse/models/incoming_supplier.py +144 -0
  76. factpulse/models/invoice_format.py +38 -0
  77. factpulse/models/invoice_line.py +354 -0
  78. factpulse/models/invoice_line_allowance_amount.py +145 -0
  79. factpulse/models/invoice_note.py +94 -0
  80. factpulse/models/invoice_references.py +194 -0
  81. factpulse/models/invoice_status.py +96 -0
  82. factpulse/models/invoice_totals.py +177 -0
  83. factpulse/models/invoice_totals_prepayment.py +145 -0
  84. factpulse/models/invoice_type_code.py +51 -0
  85. factpulse/models/invoicing_framework.py +110 -0
  86. factpulse/models/invoicing_framework_code.py +39 -0
  87. factpulse/models/line_net_amount.py +145 -0
  88. factpulse/models/line_total_amount.py +145 -0
  89. factpulse/models/mandatory_note_schema.py +124 -0
  90. factpulse/models/manual_rate.py +139 -0
  91. factpulse/models/manual_vat_rate.py +139 -0
  92. factpulse/models/missing_field.py +107 -0
  93. factpulse/models/operation_nature.py +49 -0
  94. factpulse/models/output_format.py +37 -0
  95. factpulse/models/page_dimensions_schema.py +89 -0
  96. factpulse/models/payee.py +168 -0
  97. factpulse/models/payment_card.py +99 -0
  98. factpulse/models/payment_means.py +41 -0
  99. factpulse/models/pdf_validation_result_api.py +169 -0
  100. factpulse/models/pdp_credentials.py +20 -13
  101. factpulse/models/percentage.py +145 -0
  102. factpulse/models/postal_address.py +134 -0
  103. factpulse/models/price_allowance_amount.py +145 -0
  104. factpulse/models/price_basis_quantity.py +145 -0
  105. factpulse/models/processing_options.py +94 -0
  106. factpulse/models/product_characteristic.py +89 -0
  107. factpulse/models/product_classification.py +101 -0
  108. factpulse/models/quantity.py +139 -0
  109. factpulse/models/recipient.py +167 -0
  110. factpulse/models/rounding_amount.py +145 -0
  111. factpulse/models/scheme_id.py +14 -8
  112. factpulse/models/search_flow_request.py +143 -0
  113. factpulse/models/search_flow_response.py +101 -0
  114. factpulse/models/search_services_response.py +101 -0
  115. factpulse/models/search_structure_request.py +119 -0
  116. factpulse/models/search_structure_response.py +101 -0
  117. factpulse/models/signature_info.py +6 -6
  118. factpulse/models/signature_info_api.py +122 -0
  119. factpulse/models/signature_parameters.py +133 -0
  120. factpulse/models/simplified_invoice_data.py +124 -0
  121. factpulse/models/structure_info.py +14 -14
  122. factpulse/models/structure_parameters.py +91 -0
  123. factpulse/models/structure_service.py +93 -0
  124. factpulse/models/submission_mode.py +38 -0
  125. factpulse/models/submit_complete_invoice_request.py +116 -0
  126. factpulse/models/submit_complete_invoice_response.py +145 -0
  127. factpulse/models/submit_flow_request.py +123 -0
  128. factpulse/models/submit_flow_response.py +109 -0
  129. factpulse/models/submit_gross_amount.py +139 -0
  130. factpulse/models/submit_invoice_request.py +176 -0
  131. factpulse/models/submit_invoice_response.py +103 -0
  132. factpulse/models/submit_net_amount.py +139 -0
  133. factpulse/models/submit_vat_amount.py +139 -0
  134. factpulse/models/supplementary_attachment.py +95 -0
  135. factpulse/models/supplier.py +225 -0
  136. factpulse/models/task_response.py +87 -0
  137. factpulse/models/tax_representative.py +95 -0
  138. factpulse/models/taxable_amount.py +139 -0
  139. factpulse/models/total_gross_amount.py +139 -0
  140. factpulse/models/total_net_amount.py +139 -0
  141. factpulse/models/total_vat_amount.py +139 -0
  142. factpulse/models/unit_net_price.py +139 -0
  143. factpulse/models/unit_of_measure.py +41 -0
  144. factpulse/models/validation_error.py +2 -2
  145. factpulse/models/validation_error_detail.py +107 -0
  146. factpulse/models/validation_error_loc_inner.py +2 -2
  147. factpulse/models/validation_error_response.py +87 -0
  148. factpulse/models/validation_info.py +105 -0
  149. factpulse/models/validation_success_response.py +87 -0
  150. factpulse/models/vat_accounting_code.py +39 -0
  151. factpulse/models/vat_amount.py +139 -0
  152. factpulse/models/vat_category.py +44 -0
  153. factpulse/models/vat_line.py +140 -0
  154. factpulse/models/vat_point_date_code.py +38 -0
  155. factpulse/models/vat_rate.py +145 -0
  156. factpulse/models/verification_success_response.py +135 -0
  157. factpulse/models/verified_field_schema.py +129 -0
  158. factpulse/rest.py +9 -4
  159. factpulse-3.0.7.dist-info/METADATA +292 -0
  160. factpulse-3.0.7.dist-info/RECORD +168 -0
  161. factpulse-3.0.7.dist-info/top_level.txt +2 -0
  162. factpulse_helpers/__init__.py +96 -0
  163. factpulse_helpers/client.py +2111 -0
  164. factpulse_helpers/exceptions.py +253 -0
  165. factpulse/api/processing_endpoints_unifis_api.py +0 -592
  166. factpulse/api/traitement_facture_api.py +0 -3439
  167. factpulse/api/utilisateur_api.py +0 -282
  168. factpulse/models/adresse_electronique.py +0 -90
  169. factpulse/models/adresse_postale.py +0 -120
  170. factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.py +0 -104
  171. factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.py +0 -104
  172. factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.py +0 -102
  173. factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.py +0 -104
  174. factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.py +0 -104
  175. factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.py +0 -104
  176. factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.py +0 -104
  177. factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.py +0 -104
  178. factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.py +0 -104
  179. factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.py +0 -104
  180. factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.py +0 -104
  181. factpulse/models/cadre_de_facturation.py +0 -102
  182. factpulse/models/categorie_tva.py +0 -44
  183. factpulse/models/chorus_pro_credentials.py +0 -95
  184. factpulse/models/code_cadre_facturation.py +0 -39
  185. factpulse/models/code_raison_reduction.py +0 -42
  186. factpulse/models/consulter_facture_request.py +0 -98
  187. factpulse/models/consulter_facture_response.py +0 -142
  188. factpulse/models/consulter_structure_request.py +0 -100
  189. factpulse/models/consulter_structure_response.py +0 -142
  190. factpulse/models/credentials_afnor.py +0 -106
  191. factpulse/models/credentials_chorus_pro.py +0 -115
  192. factpulse/models/destinataire.py +0 -116
  193. factpulse/models/destination_afnor.py +0 -127
  194. factpulse/models/destination_chorus_pro.py +0 -108
  195. factpulse/models/direction_flux.py +0 -37
  196. factpulse/models/donnees_facture_simplifiees.py +0 -124
  197. factpulse/models/facture_enrichie_info_input.py +0 -123
  198. factpulse/models/facture_enrichie_info_output.py +0 -133
  199. factpulse/models/facture_factur_x.py +0 -173
  200. factpulse/models/flux_resume.py +0 -131
  201. factpulse/models/format_sortie.py +0 -37
  202. factpulse/models/fournisseur.py +0 -146
  203. factpulse/models/information_signature_api.py +0 -122
  204. factpulse/models/ligne_de_poste.py +0 -188
  205. factpulse/models/ligne_de_poste_montant_remise_ht.py +0 -145
  206. factpulse/models/ligne_de_poste_montant_total_ligne_ht.py +0 -145
  207. factpulse/models/ligne_de_poste_taux_tva_manuel.py +0 -145
  208. factpulse/models/ligne_de_tva.py +0 -118
  209. factpulse/models/mode_depot.py +0 -38
  210. factpulse/models/mode_paiement.py +0 -41
  211. factpulse/models/montant_ht_total.py +0 -139
  212. factpulse/models/montant_total.py +0 -138
  213. factpulse/models/montant_total_acompte.py +0 -145
  214. factpulse/models/montant_total_montant_remise_globale_ttc.py +0 -145
  215. factpulse/models/montant_ttc_total.py +0 -139
  216. factpulse/models/montant_tva.py +0 -139
  217. factpulse/models/montantapayer.py +0 -139
  218. factpulse/models/montantbaseht.py +0 -139
  219. factpulse/models/montanthttotal.py +0 -139
  220. factpulse/models/montantttctotal.py +0 -139
  221. factpulse/models/montanttva.py +0 -139
  222. factpulse/models/montanttva1.py +0 -139
  223. factpulse/models/montantunitaireht.py +0 -139
  224. factpulse/models/obtenir_id_chorus_pro_request.py +0 -100
  225. factpulse/models/obtenir_id_chorus_pro_response.py +0 -98
  226. factpulse/models/options_processing.py +0 -94
  227. factpulse/models/parametres_signature.py +0 -133
  228. factpulse/models/parametres_structure.py +0 -91
  229. factpulse/models/pdf_factur_x_info.py +0 -91
  230. factpulse/models/piece_jointe_complementaire.py +0 -95
  231. factpulse/models/profil_api.py +0 -39
  232. factpulse/models/profil_flux.py +0 -38
  233. factpulse/models/quantite.py +0 -139
  234. factpulse/models/quota_info.py +0 -95
  235. factpulse/models/rechercher_services_response.py +0 -101
  236. factpulse/models/rechercher_structure_request.py +0 -119
  237. factpulse/models/rechercher_structure_response.py +0 -101
  238. factpulse/models/references.py +0 -124
  239. factpulse/models/reponse_healthcheck_afnor.py +0 -91
  240. factpulse/models/reponse_recherche_flux.py +0 -101
  241. factpulse/models/reponse_soumission_flux.py +0 -109
  242. factpulse/models/reponse_tache.py +0 -87
  243. factpulse/models/reponse_validation_erreur.py +0 -87
  244. factpulse/models/reponse_validation_succes.py +0 -87
  245. factpulse/models/requete_recherche_flux.py +0 -143
  246. factpulse/models/requete_soumission_flux.py +0 -123
  247. factpulse/models/resultat_afnor.py +0 -105
  248. factpulse/models/resultat_chorus_pro.py +0 -101
  249. factpulse/models/resultat_validation_pdfapi.py +0 -169
  250. factpulse/models/service_structure.py +0 -93
  251. factpulse/models/soumettre_facture_complete_request.py +0 -116
  252. factpulse/models/soumettre_facture_complete_response.py +0 -145
  253. factpulse/models/soumettre_facture_request.py +0 -164
  254. factpulse/models/soumettre_facture_response.py +0 -103
  255. factpulse/models/statut_acquittement.py +0 -38
  256. factpulse/models/statut_facture.py +0 -96
  257. factpulse/models/statut_tache.py +0 -99
  258. factpulse/models/syntaxe_flux.py +0 -40
  259. factpulse/models/tauxmanuel.py +0 -139
  260. factpulse/models/type_facture.py +0 -37
  261. factpulse/models/type_flux.py +0 -40
  262. factpulse/models/type_tva.py +0 -39
  263. factpulse/models/unite.py +0 -41
  264. factpulse/models/utilisateur.py +0 -128
  265. factpulse-1.0.9.dist-info/METADATA +0 -182
  266. factpulse-1.0.9.dist-info/RECORD +0 -131
  267. factpulse-1.0.9.dist-info/top_level.txt +0 -1
  268. {factpulse-1.0.9.dist-info → factpulse-3.0.7.dist-info}/WHEEL +0 -0
  269. {factpulse-1.0.9.dist-info → factpulse-3.0.7.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,292 @@
1
+ Metadata-Version: 2.4
2
+ Name: factpulse
3
+ Version: 3.0.7
4
+ Summary: FactPulse REST API
5
+ Home-page: https://github.com/factpulse/sdk-python
6
+ Author: OpenAPI Generator community
7
+ Author-email: OpenAPI Generator Community <team@openapitools.org>
8
+ Project-URL: Repository, https://github.com/GIT_USER_ID/GIT_REPO_ID
9
+ Keywords: OpenAPI,OpenAPI-Generator,FactPulse REST API
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: urllib3<3.0.0,>=2.1.0
14
+ Requires-Dist: python-dateutil>=2.8.2
15
+ Requires-Dist: pydantic>=2
16
+ Requires-Dist: typing-extensions>=4.7.1
17
+ Dynamic: author
18
+ Dynamic: home-page
19
+ Dynamic: license-file
20
+
21
+ # FactPulse SDK Python
22
+
23
+ Official Python client for the FactPulse API - French electronic invoicing.
24
+
25
+ ## Features
26
+
27
+ - **Factur-X**: Generation and validation of electronic invoices (MINIMUM, BASIC, EN16931, EXTENDED profiles)
28
+ - **Chorus Pro**: Integration with the French public invoicing platform
29
+ - **AFNOR PDP/PA**: Submission of flows compliant with XP Z12-013 standard
30
+ - **Electronic signature**: PDF signing (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
31
+ - **Simplified client**: JWT authentication and polling integrated via `factpulse_helpers`
32
+
33
+ ## Installation
34
+
35
+ ```bash
36
+ pip install factpulse
37
+ ```
38
+
39
+ ## Quick Start
40
+
41
+ The `factpulse_helpers` module provides a simplified API with automatic authentication and polling:
42
+
43
+ ```python
44
+ from factpulse_helpers import (
45
+ FactPulseClient,
46
+ amount,
47
+ total_amount,
48
+ invoice_line,
49
+ vat_line,
50
+ supplier,
51
+ recipient,
52
+ )
53
+
54
+ # Create the client
55
+ client = FactPulseClient(
56
+ email="your_email@example.com",
57
+ password="your_password"
58
+ )
59
+
60
+ # Build the invoice with helpers
61
+ invoice_data = {
62
+ "number": "INV-2025-001",
63
+ "date": "2025-01-15",
64
+ "supplier": supplier(
65
+ name="My Company SAS",
66
+ siret="12345678901234",
67
+ address_line1="123 Example Street",
68
+ postal_code="75001",
69
+ city="Paris",
70
+ ),
71
+ "recipient": recipient(
72
+ name="Client SARL",
73
+ siret="98765432109876",
74
+ address_line1="456 Test Avenue",
75
+ postal_code="69001",
76
+ city="Lyon",
77
+ ),
78
+ "totalAmount": total_amount(
79
+ excluding_tax=1000.00,
80
+ vat=200.00,
81
+ including_tax=1200.00,
82
+ due=1200.00,
83
+ ),
84
+ "lines": [
85
+ invoice_line(
86
+ number=1,
87
+ description="Consulting services",
88
+ quantity=10,
89
+ unit_price=100.00,
90
+ line_total=1000.00,
91
+ )
92
+ ],
93
+ "vatLines": [
94
+ vat_line(
95
+ base_amount=1000.00,
96
+ vat_amount=200.00,
97
+ rate="20.00",
98
+ )
99
+ ],
100
+ }
101
+
102
+ # Generate the Factur-X PDF
103
+ with open("source_invoice.pdf", "rb") as f:
104
+ pdf_source = f.read()
105
+
106
+ pdf_bytes = client.generate_facturx(
107
+ invoice_data=invoice_data,
108
+ pdf_source=pdf_source,
109
+ profile="EN16931",
110
+ sync=True,
111
+ )
112
+
113
+ with open("facturx_invoice.pdf", "wb") as f:
114
+ f.write(pdf_bytes)
115
+ ```
116
+
117
+ ## Available Helpers
118
+
119
+ ### amount(value)
120
+
121
+ Converts a value to a formatted string for monetary amounts.
122
+
123
+ ```python
124
+ from factpulse_helpers import amount
125
+
126
+ amount(1234.5) # "1234.50"
127
+ amount("1234.56") # "1234.56"
128
+ amount(None) # "0.00"
129
+ ```
130
+
131
+ ### total_amount(excluding_tax, vat, including_tax, due, ...)
132
+
133
+ Creates a complete TotalAmount object.
134
+
135
+ ```python
136
+ from factpulse_helpers import total_amount
137
+
138
+ total = total_amount(
139
+ excluding_tax=1000.00,
140
+ vat=200.00,
141
+ including_tax=1200.00,
142
+ due=1200.00,
143
+ discount_including_tax=50.00, # Optional
144
+ discount_reason="Loyalty", # Optional
145
+ prepayment=100.00, # Optional
146
+ )
147
+ ```
148
+
149
+ ### invoice_line(number, description, quantity, unit_price, line_total, ...)
150
+
151
+ Creates an invoice line.
152
+
153
+ ```python
154
+ from factpulse_helpers import invoice_line
155
+
156
+ line = invoice_line(
157
+ number=1,
158
+ description="Consulting services",
159
+ quantity=5,
160
+ unit_price=200.00,
161
+ line_total=1000.00, # Required
162
+ vat_rate="VAT20", # Or manual_vat_rate="20.00"
163
+ vat_category="S", # S, Z, E, AE, K
164
+ unit="HOUR", # PACKAGE, PIECE, HOUR, DAY...
165
+ reference="REF-001", # Optional
166
+ )
167
+ ```
168
+
169
+ ### vat_line(base_amount, vat_amount, ...)
170
+
171
+ Creates a VAT breakdown line.
172
+
173
+ ```python
174
+ from factpulse_helpers import vat_line
175
+
176
+ vat = vat_line(
177
+ base_amount=1000.00,
178
+ vat_amount=200.00,
179
+ rate="VAT20", # Or manual_rate="20.00"
180
+ category="S", # S, Z, E, AE, K
181
+ )
182
+ ```
183
+
184
+ ### postal_address(line1, postal_code, city, ...)
185
+
186
+ Creates a structured postal address.
187
+
188
+ ```python
189
+ from factpulse_helpers import postal_address
190
+
191
+ address = postal_address(
192
+ line1="123 Republic Street",
193
+ postal_code="75001",
194
+ city="Paris",
195
+ country="FR", # Default: "FR"
196
+ line2="Building A", # Optional
197
+ )
198
+ ```
199
+
200
+ ### electronic_address(identifier, scheme_id)
201
+
202
+ Creates an electronic address (digital identifier).
203
+
204
+ ```python
205
+ from factpulse_helpers import electronic_address
206
+
207
+ # SIRET (scheme_id="0225")
208
+ address = electronic_address("12345678901234", "0225")
209
+
210
+ # SIREN (scheme_id="0009")
211
+ address = electronic_address("123456789", "0009")
212
+ ```
213
+
214
+ ### supplier(name, siret, address_line1, postal_code, city, ...)
215
+
216
+ Creates a complete supplier with automatic SIREN and intra-EU VAT calculation.
217
+
218
+ ```python
219
+ from factpulse_helpers import supplier
220
+
221
+ s = supplier(
222
+ name="My Company SAS",
223
+ siret="12345678901234",
224
+ address_line1="123 Example Street",
225
+ postal_code="75001",
226
+ city="Paris",
227
+ iban="FR7630006000011234567890189", # Optional
228
+ )
229
+ # SIREN and intra-EU VAT number calculated automatically
230
+ ```
231
+
232
+ ### recipient(name, siret, address_line1, postal_code, city, ...)
233
+
234
+ Creates a recipient (customer) with automatic SIREN calculation.
235
+
236
+ ```python
237
+ from factpulse_helpers import recipient
238
+
239
+ r = recipient(
240
+ name="Client SARL",
241
+ siret="98765432109876",
242
+ address_line1="456 Test Avenue",
243
+ postal_code="69001",
244
+ city="Lyon",
245
+ )
246
+ ```
247
+
248
+ ## Zero-Trust Mode (Chorus Pro / AFNOR)
249
+
250
+ To pass your own credentials without server-side storage:
251
+
252
+ ```python
253
+ from factpulse_helpers import (
254
+ FactPulseClient,
255
+ ChorusProCredentials,
256
+ AFNORCredentials,
257
+ )
258
+
259
+ # Chorus Pro
260
+ chorus_creds = ChorusProCredentials(
261
+ piste_client_id="your_client_id",
262
+ piste_client_secret="your_client_secret",
263
+ chorus_pro_login="your_login",
264
+ chorus_pro_password="your_password",
265
+ sandbox=True,
266
+ )
267
+
268
+ # AFNOR PDP
269
+ afnor_creds = AFNORCredentials(
270
+ flow_service_url="https://api.pdp.fr/flow/v1",
271
+ token_url="https://auth.pdp.fr/oauth/token",
272
+ client_id="your_client_id",
273
+ client_secret="your_client_secret",
274
+ )
275
+
276
+ client = FactPulseClient(
277
+ email="your_email@example.com",
278
+ password="your_password",
279
+ chorus_credentials=chorus_creds,
280
+ afnor_credentials=afnor_creds,
281
+ )
282
+ ```
283
+
284
+ ## Resources
285
+
286
+ - **API Documentation**: https://factpulse.fr/api/facturation/documentation
287
+ - **Complete Example**: See `complete_example_python.py` in this package
288
+ - **Support**: contact@factpulse.fr
289
+
290
+ ## License
291
+
292
+ MIT License - Copyright (c) 2025 FactPulse
@@ -0,0 +1,168 @@
1
+ factpulse/__init__.py,sha256=aPzbEBJUs9gCdL-IV55cq46wIYHqi3j6wHoKamRUkOU,22547
2
+ factpulse/api_client.py,sha256=eRdhmj4N75dHASiBsBKWw-bg_eQ8JZI_U5JjpMcquzU,32222
3
+ factpulse/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
+ factpulse/configuration.py,sha256=iWpfVEuxFl1PdM59L_ynjW4YsoyZKensPUwxhtaEHN4,22953
5
+ factpulse/exceptions.py,sha256=1juIo0sBUs8R1sKcQugPNKEx9Yo74FXNm8KhrEpOjvM,11001
6
+ factpulse/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ factpulse/rest.py,sha256=UzCWoBgsyvLH_-uV9cNYJBBU0nwKumDItZWKQ2Iacwo,14113
8
+ factpulse/api/__init__.py,sha256=ov23mFEVSUfC0-qJGFfj85kddEjo2oVTpblrwG7xoh4,629
9
+ factpulse/api/afnorpdppa_api.py,sha256=2fljfVdJutvT5L5_-oYetvXH-WT9YkR9mTtw8Zft2mI,37494
10
+ factpulse/api/afnorpdppa_directory_service_api.py,sha256=WtgEiEu7Wauo5rqRCUXQf5Lnt5_TIyXboq_1hMV5cl8,203845
11
+ factpulse/api/afnorpdppa_flow_service_api.py,sha256=mERbcQgpz3Ip-DD7FjfBDkM0EY1Kf0Znr056ZmNHbJo,45649
12
+ factpulse/api/chorus_pro_api.py,sha256=3A_XhFqwR9l4pB89OJNv5p4ydWcs586GdkQNe2T4Seo,204886
13
+ factpulse/api/document_conversion_api.py,sha256=nNIqC8bYEKWda_2I7oEZDekIdAsuIgF0BfeUyctzyAc,68420
14
+ factpulse/api/health_api.py,sha256=pslrFqGFwRssXOo1q_g8468rBHK0jGye1s6HdpWWUmo,24921
15
+ factpulse/api/invoice_processing_api.py,sha256=mWq4tHtOdcoW5cyjqV6vMWa7zYAQhAFXlL7cJ7HZ-DU,216504
16
+ factpulse/api/pdfxml_verification_api.py,sha256=bp1eg91Fi_65kp3vEKMUqlOjoBXd4s97yZr1ORrKNsk,88972
17
+ factpulse/api/user_api.py,sha256=OsED6foOfDD2I0Hoa_tc9ED9TsGS0A0VExapEEgTyk0,15450
18
+ factpulse/models/__init__.py,sha256=UuabqqxuILNFgxsRUFWOahPXaYv_6AWab2sqYrA2_P8,14216
19
+ factpulse/models/acknowledgment_status.py,sha256=xZJy7ll6zTPR-XoAhBEsKrFzKJWCP4ok_jfspEH-XZM,5257
20
+ factpulse/models/additional_document.py,sha256=tFs8JR5Mh0ZT65nzBNoF5Vrvbre9GDT3zehnmrUCHYE,8379
21
+ factpulse/models/afnor_credentials.py,sha256=xxkBec47HuU5FYZgfL7ZkaVoBvFpJqCIOk7K5MDp0Yk,8370
22
+ factpulse/models/afnor_destination.py,sha256=SLab8Qx-lmV3oPT6_YJoGtvBO8PaDDh_vXp1BUGME4o,8957
23
+ factpulse/models/afnor_health_check_response.py,sha256=CjCWKA7DqvOG6yigJgJ0kmFursjIwQmnwFN2VwA43Ls,7412
24
+ factpulse/models/afnor_result.py,sha256=7Pwu3RnH96NS5aQ0yAb3kVRNEtFkYZZpek-fYviQEX8,8054
25
+ factpulse/models/allowance_charge.py,sha256=UVc5Cdl0P6M6X20u_M-6ujJVbdhbTzl5yvejSlNSGBw,10400
26
+ factpulse/models/allowance_reason_code.py,sha256=Dh53uJ-Liuo9l8b8xBndzD4cs1sf-wETcWDOBdzhZP8,5681
27
+ factpulse/models/allowance_total_amount.py,sha256=7CODqgJ9CXhGkGroqoThAzsjVvIMv5Muogm4G6bw2Gs,9584
28
+ factpulse/models/amount.py,sha256=5mrck3OfwY86kNxkzWq8mPlpQmXNhsJdz1SKyDqu7oY,9406
29
+ factpulse/models/amount_due.py,sha256=N8FtIDZZqJoAqkTrCyBVS6B4oBSEZw31m5EyKHBmpKo,9451
30
+ factpulse/models/api_error.py,sha256=DiCBqKxksfbD5NTeoWolbPx9an6RgJ_CyaqxEk_nAu4,8157
31
+ factpulse/models/async_task_status.py,sha256=Scj2BxD1zavPWiFrPhE76qXAESYGFCsdWueWVVAuqn4,7738
32
+ factpulse/models/base_amount.py,sha256=MhtCdrr8NeQqH8Zm45KeeQapfXDjIPXuHKS1kobOfNQ,9544
33
+ factpulse/models/bounding_box_schema.py,sha256=C8CjGreTgjq7dQaPbHCvUugp0W9cbZXnTZ8n6iy7Iw4,8007
34
+ factpulse/models/celery_status.py,sha256=WAQjWEyhTGvrkHmbfWBDIEtTmeE11_Ey8CvZ-Qq6xh8,5641
35
+ factpulse/models/certificate_info_response.py,sha256=0tRDRJTrVlNokKCvJKbwNqUSjhVwWQEOgvN8flR3Hd0,8641
36
+ factpulse/models/charge_total_amount.py,sha256=mT4sCyrd4Rgctid7aOZ0pRYurpAwkS1Ido94uWEg6rc,9566
37
+ factpulse/models/chorus_pro_destination.py,sha256=_V5kleizacdNOt-oN-PRXx91N1ia9QVxs32SEkwy6XY,8241
38
+ factpulse/models/chorus_pro_result.py,sha256=SjyBRt1_N6N6tVZR4_MvJLoIPRfzNP-d-xWAwTjy0pI,7924
39
+ factpulse/models/contact.py,sha256=ZVVCL5yB5h5IJGKGBRqBLyXnVvLmYWpF6aySfsVZlKc,8179
40
+ factpulse/models/convert_error_response.py,sha256=Brb_kfNDpNwHncdsD9bQjDpGUYj2QxhgWJSiMchOE98,7962
41
+ factpulse/models/convert_pending_input_response.py,sha256=TIxAsNlhQWFFUE3gHYnd7RdLyzZGMF7C6cSgFboczs0,8852
42
+ factpulse/models/convert_resume_request.py,sha256=mI7psjvDjk3mQJU_Ci3HVvSiyVh_e4vGIXpkp1M95cU,7545
43
+ factpulse/models/convert_success_response.py,sha256=-Rv_nvS7Bx58ocJvoCn37xaLNKC3j4TsdfQp7IWPij4,10131
44
+ factpulse/models/convert_validation_failed_response.py,sha256=dSp7B2pLlwL7goBmkto14_BxteCWaW_OiVwI1w0ou_c,9647
45
+ factpulse/models/delivery_party.py,sha256=Ss_x1ju2_VEQicYw3KBdwEyQ855mwdjbBaUqMlNYP8U,8855
46
+ factpulse/models/destination.py,sha256=YdZ2zeCYEkb4vN3t-gTx2Bi9jHZ_oSU9dxSrMYQ67Nc,9978
47
+ factpulse/models/document_type_info.py,sha256=JlAtKt-lMjExGvg-lVH3rfxcK-J8hrT66JYw4IvOwJc,7292
48
+ factpulse/models/electronic_address.py,sha256=8KOOw6tx0UsLKZTXmt_Ig7FiqwvVVhr_4cWdjp7fGnY,7341
49
+ factpulse/models/enriched_invoice_info.py,sha256=GLaJH871wf070Je-jHrt1lCWkZwl_BQqrC0aMbw4868,9640
50
+ factpulse/models/error_level.py,sha256=Di6ewcuirjG583hT47YmSXK7osFmX7XQw6LFqiV2kQo,5206
51
+ factpulse/models/error_source.py,sha256=FyHCXoCqVqPsuyAd13l509SPNMsl5sgsRSgzDpBA3OY,5355
52
+ factpulse/models/extraction_info.py,sha256=XuQYJtfzeoGujUoW6hYs6q1L3jNrmloiE5SE5uG_4r8,7753
53
+ factpulse/models/factur_x_invoice.py,sha256=JMjR1xVXzzAyLeBkqEOV0MENyuNtE2fB_NdSvazVBDA,21147
54
+ factpulse/models/factur_x_profile.py,sha256=Cq9QICIl9dLZZw_my4-Cr0rHsgk7MvD_URc_LVhJqtk,5419
55
+ factpulse/models/factur_xpdf_info.py,sha256=2P4f42QTXp3ooe11zGzp0FzRnHvMuNS41BE1h5Hcv90,7361
56
+ factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.py,sha256=zEOfgzZ3cF58-z1GwmVs1VYFIwITBAFIC1NVKbWUtCU,8445
57
+ factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py,sha256=uTbqXc3yMIyoEJ9pAHDDyTPfY7VQL5Z4NwxFamW5T7E,9229
58
+ factpulse/models/field_status.py,sha256=1pSVqDi1RxxsUcx3gNz5fhColWDjYOlpHIWvbI3r0XA,5348
59
+ factpulse/models/file_info.py,sha256=u60fVXEl2AUaQrcP_5hjaOM2cys17l4-aleMIIe9r8k,7458
60
+ factpulse/models/files_info.py,sha256=lGTaIuk4Ju56G2iY1gCmrijsXkIN7IiGpk17n8IHxws,7963
61
+ factpulse/models/flow_direction.py,sha256=DO8dOXLsljbJPVfJaksRRqz6NL2tyUQOkx8wdigubVQ,5203
62
+ factpulse/models/flow_profile.py,sha256=TybZe0j3Bh1ZSAQPeHEDdjs9ybY8RjJeI5P9LTzxt4A,5268
63
+ factpulse/models/flow_summary.py,sha256=9U3sewLJy6Wk7a4nCmYX15Fnykd6gzHzY2k8ddFTwKE,9129
64
+ factpulse/models/flow_syntax.py,sha256=h-is1HlgDdmy-7G-aSonTSL1Q8ejQVKI5D9cFQpgrQ8,5283
65
+ factpulse/models/flow_type.py,sha256=qns07GcV6vuJJZIZIPYsU_zr8HYtOn-VBwSK68wqBS8,5365
66
+ factpulse/models/generate_certificate_request.py,sha256=ZVXMmJR0wZ5QvpHIu3MbsalCoR48D_-5MHA2PdfXN1I,9917
67
+ factpulse/models/generate_certificate_response.py,sha256=hCgus2FLy0DmEs0B-_jCXdjHokrGwmzXJ41VQjWgosc,8889
68
+ factpulse/models/get_chorus_pro_id_request.py,sha256=0_FCrolKwRk30fFCvVKKygTPy5tRRQxF2A2OMv1w_U8,8183
69
+ factpulse/models/get_chorus_pro_id_response.py,sha256=EsjpBRSo3L0dxyesE5rppL-0NL4enHkB1C9nEgr06IA,7806
70
+ factpulse/models/get_invoice_request.py,sha256=C124VzNkbTW9NDFr6tkJsoDTzlnUY0vnv1GAxTcBdaM,7931
71
+ factpulse/models/get_invoice_response.py,sha256=3doNVK99y428zHqTUgZTr7e2oIz6Aphe2A7Fz_K5vyo,10384
72
+ factpulse/models/get_structure_request.py,sha256=RY2_NrHCh7SVQXIHWmXYOTmrQPZ4L9JDd7yB46njKIc,8175
73
+ factpulse/models/get_structure_response.py,sha256=coGHlE2DuQeiMOQOt9eGr8dhy8oazHSCpiChMreKSJ0,10145
74
+ factpulse/models/global_allowance_amount.py,sha256=CPMGUB7HcKPVmsVIEXc0e20O7gai_Bz57yEkmS-l3pQ,9576
75
+ factpulse/models/gross_unit_price.py,sha256=giAf9R5czk7QYzfuaE-mzCfUB5Q5qEaGD3X7BNQ23ZY,9552
76
+ factpulse/models/http_validation_error.py,sha256=d63cZDRiYz-Yz_4H9LtGybU5cjBJ_zgb4SrwKcjQHt4,7462
77
+ factpulse/models/incoming_invoice.py,sha256=2aE1YLWyWJEQfEOk4s1HDguzAWrnpIjB4cSvvDFxTXA,14135
78
+ factpulse/models/incoming_supplier.py,sha256=RMffz32PAAbFSm3DLO3QE0SmbcFA82zoahCiELE1_tE,10223
79
+ factpulse/models/invoice_format.py,sha256=L2hW50hiMQO_3H3KQGMop8n6om5HO-18SdJBoLIABGU,5263
80
+ factpulse/models/invoice_line.py,sha256=tLefsuVB631wHjXGDh0l4Hui5SIbyiHTZxUj6P0Fxv4,23416
81
+ factpulse/models/invoice_line_allowance_amount.py,sha256=KwMWFZJRFzkjvyH-ge3xWq1s9vg67lfL1_cJlY7r5yk,9679
82
+ factpulse/models/invoice_note.py,sha256=V4OEkmEa0Agm2vMgholeZzXuV5q-cLepskn930OMdhY,7440
83
+ factpulse/models/invoice_references.py,sha256=I_jmAJBLvvlNx5ltq_2J_uKh8f1Cl6nnf1WT7oTH7Q4,13556
84
+ factpulse/models/invoice_status.py,sha256=35UGjrfYzZzZ6qj3krvDra9tfGrgl4qrRSex4myAGFY,7500
85
+ factpulse/models/invoice_totals.py,sha256=sUbOmJP32Ezd0DruNMMD8rNZugv20mg9QfsX0OaqqeE,13409
86
+ factpulse/models/invoice_totals_prepayment.py,sha256=jilvAFxmG6sU85nBVmJ9tkK_KgdgYS5zD3aSqSWpstU,9628
87
+ factpulse/models/invoice_type_code.py,sha256=RzftlOanLZnJZ3iKTpw0Yd7acJtwYWGQe8ruKBv9Ws8,6842
88
+ factpulse/models/invoicing_framework.py,sha256=3ZkqyjGPrpmvNVAcfVvT1Ts__dl3X14WQ57-5R66CsQ,8990
89
+ factpulse/models/invoicing_framework_code.py,sha256=1jFkGgjkfRATj2F43ZFDpp3iGAbBQBfa5EwZ91HDIIU,5469
90
+ factpulse/models/line_net_amount.py,sha256=4I268KgANjGoNhtMLJZ8rLQgHMwba7BVNeSfefSPkKw,9574
91
+ factpulse/models/line_total_amount.py,sha256=z29AJdPWyZMvyfZntQKoG8KodGwA0qjP1aAZS5FvDUs,9555
92
+ factpulse/models/mandatory_note_schema.py,sha256=leKtBkC5_tyzyiAjgYP3HRvymPy5evkTLQVF5s8DnMg,9047
93
+ factpulse/models/manual_rate.py,sha256=DI1PJ7cKgXHmEtkNHn_nYkiEVSTc8CoVEvktncHpJKw,9486
94
+ factpulse/models/manual_vat_rate.py,sha256=LjSeJw9WQ68cqc2eyyZqbE4PmN8Vf5QBUFJNrmMTYUM,9508
95
+ factpulse/models/missing_field.py,sha256=vBZejF3kixK1BLZQM63XrwjVZeTwcKh0Vfm9WXX908U,8200
96
+ factpulse/models/operation_nature.py,sha256=u7FnCSYVxHZg5GpLWIxiBISUczVFgTr0bPWFYXjip2w,5787
97
+ factpulse/models/output_format.py,sha256=fskPOWR86n7OQYx0FA74qTT0bGC5pxOTgjd8SfnKQC0,5225
98
+ factpulse/models/page_dimensions_schema.py,sha256=vtni8LP5dwTXSZlpFOeUvb2OG_ihJe2KYlOjZY-tmng,7190
99
+ factpulse/models/payee.py,sha256=whZFlf7Mm57aY4BofqsJUOtG_8lBzjb0cW7mxE_Qo8s,11373
100
+ factpulse/models/payment_card.py,sha256=FYZz5XNf1jPpKObXlZvxW2NdBW6uWeVQFC8C_4Xhqdk,7608
101
+ factpulse/models/payment_means.py,sha256=5_h1qI99LiMWUA5g3NfHG0OU_ZF9ns4wIA3ZJupibUY,5325
102
+ factpulse/models/pdf_validation_result_api.py,sha256=q_Ff8crvnedCt6Whtxct4gnXtKUyXtEj-euPHcQVtVc,13273
103
+ factpulse/models/pdp_credentials.py,sha256=gtlpRL0Fgb-YsBXWldQPpCOsxVYMOvVYER96KN3pyC4,8231
104
+ factpulse/models/percentage.py,sha256=dCQBrZuvbYLL0oSdFIpM4AgQSVo6NOv_yArV9s-WBd4,9539
105
+ factpulse/models/postal_address.py,sha256=3E1r99Ap_aMZhryNNXNshJNycZqbQxNdRn2_9cT7f98,9432
106
+ factpulse/models/price_allowance_amount.py,sha256=YsfYats-20rQ7in9lON9vpM3O2JvFtg7AiiQjXT-n7o,9571
107
+ factpulse/models/price_basis_quantity.py,sha256=0OxrApolj39POZ8qx9rsskGdeVMyfInkjpE6lb5zA9U,9573
108
+ factpulse/models/processing_options.py,sha256=X9fdcnxG2rPuQr1dP1rXmMvPnjsMdGR-4dIGnioJR-w,8086
109
+ factpulse/models/product_characteristic.py,sha256=pKHzcY16PmBnGxqaOFofnfU60Bg8npJRgRHw_e3Pd5I,7194
110
+ factpulse/models/product_classification.py,sha256=-wK9l4XeVD6FtzMGSfoeVEISZ6RO1_xo5nS__UR7VGY,7811
111
+ factpulse/models/quantity.py,sha256=Du1Xs_y4sDCd4WEAPgSCpgHFRu34pfI6SQXIG_wPEYU,9441
112
+ factpulse/models/recipient.py,sha256=8O2Ee43h5kMgerHMD-5ycKPq0rNOeS6WI3jJqPiowZg,11314
113
+ factpulse/models/rounding_amount.py,sha256=MHQ4TWFr-fmynHjdqxdnOSPH8xeLpBOB5Na6xb7IZkM,9545
114
+ factpulse/models/scheme_id.py,sha256=igtHE3rcALkS7yLLXAPg00LPjZD26Ffkc3IKJLVqBpE,6026
115
+ factpulse/models/search_flow_request.py,sha256=RpU_1pgV58YZbPzfpFCrIQcbXCOnJgdDe1c4MCOmXPE,10329
116
+ factpulse/models/search_flow_response.py,sha256=mQwM2vP29IS8-ePKge61KTR2pz8epYxoutXh1_V3RCs,7831
117
+ factpulse/models/search_services_response.py,sha256=Znm-tFJ2Z3J6FGznzhP7jLvbEGQUL7n57IIjxBQr4jA,7899
118
+ factpulse/models/search_structure_request.py,sha256=F1EAgsUc8o_rIVbbney0NdmVvyjkLQLXgu6gDcK144k,9445
119
+ factpulse/models/search_structure_response.py,sha256=NmiQ60acf-MSlhrjDmFVumUnIpvJmHdZe6dbWUdsG7E,8000
120
+ factpulse/models/signature_info.py,sha256=qvLwDDMS3VeFPG0vDeZeVhmeopzUscQRfHRbtUnZmIM,7631
121
+ factpulse/models/signature_info_api.py,sha256=6djXmJnT642Wr_uj2iBzJDACy_JYKm-KRVLtPLbFZx8,8728
122
+ factpulse/models/signature_parameters.py,sha256=aF5H1PhFnrjnNkOQPUTHpkQbgFZxAxqLmH1TQztnEfo,10264
123
+ factpulse/models/simplified_invoice_data.py,sha256=Pgznub81c4-L5zXu9jboiKMX5TYXjZ9L4rOcAaYyyak,9353
124
+ factpulse/models/structure_info.py,sha256=X9dWu1bUy0ENjyxnQgz8M2A71SZz2TKG1d1xujaI53c,7759
125
+ factpulse/models/structure_parameters.py,sha256=M3aHVyqfe6rd9ykso3i_SnzusbLeK-ZI8c7qpZa6u0I,7892
126
+ factpulse/models/structure_service.py,sha256=8lj6U3vVovZyg30MKa45KCgfoBJp3dOalwOH8IFQWZM,7496
127
+ factpulse/models/submission_mode.py,sha256=OITc_hA0ArDl6NeV0MzEWYjiNfg10vQrQeHVjaoWavM,5312
128
+ factpulse/models/submit_complete_invoice_request.py,sha256=ucCtSynLggIdJPNYHneEit8HixroRKHq-L_4u81cpLY,9316
129
+ factpulse/models/submit_complete_invoice_response.py,sha256=8Z5k_kjIKiapTKGAFxPT4RoqVjohFwQROpWpTw4o66I,10931
130
+ factpulse/models/submit_flow_request.py,sha256=vjbd_sRX9LUEclgiviU3GFY8Ryjgmymc5yXAooh4KcE,9232
131
+ factpulse/models/submit_flow_response.py,sha256=cPHRWjV_MEFk5mtYDLk2jvN8k6KO0ZdOhw4JuMyvXuQ,8238
132
+ factpulse/models/submit_gross_amount.py,sha256=09nt1Qjcf-qARZlYpxtXf2-pN2KPK-MYv-3OZ1tzO5M,9436
133
+ factpulse/models/submit_invoice_request.py,sha256=uIg5OU6sFGuQLR5GrNKIm4HtKTdSjDaGVZt4Scap0O4,13017
134
+ factpulse/models/submit_invoice_response.py,sha256=oxiQNRRcdbaF21vDAql5EMTDnOCMeIj0_Z2HJlXJYrg,8065
135
+ factpulse/models/submit_net_amount.py,sha256=jTIQ8iefiiwy7XHfEGb3pCSSpn3JQ_HNivhJfUX-wR4,9424
136
+ factpulse/models/submit_vat_amount.py,sha256=4SR_0N7glj8bIevzEg8f5eRSmkrOdAvaB3pzdtV9ksU,9418
137
+ factpulse/models/supplementary_attachment.py,sha256=uDfpQnGmovo_1RM3cXuj4gJZhDOyrnNf6kBfus8Xhv4,7406
138
+ factpulse/models/supplier.py,sha256=TchY6MFLuLQ8F0TayCIgwH2o2MWPT4kDmMhE9RH7yUI,14312
139
+ factpulse/models/task_response.py,sha256=PMPkU-HvEEy_qJpVOB_rOjmgK-wi2gEou1IzCYrGM6Y,7055
140
+ factpulse/models/tax_representative.py,sha256=pizslzTj20mFMrF-S7yQ6YMUX7UQ6jMCXHrl3jnEbjo,7784
141
+ factpulse/models/taxable_amount.py,sha256=cVETGoZWf0nXXvRzezS50DeD1fcf731tRn9KWt5E9sA,9476
142
+ factpulse/models/total_gross_amount.py,sha256=sxO9R60zCxXn09vapu__Soss8huFZobbpEbMCDTPWg0,9493
143
+ factpulse/models/total_net_amount.py,sha256=UL2yuUsZMr8t187W4n29KeCfPn0bms6iHo5oY4NVEIs,9486
144
+ factpulse/models/total_vat_amount.py,sha256=X-_X0y2nxIYCnUtjcsS-GrJ5tHAZsz8ROScJ3koEhd0,9478
145
+ factpulse/models/unit_net_price.py,sha256=gGw0qynAzBD7ZdJrbnSnbOsd_Aba_GPc2KPUdQKe58k,9437
146
+ factpulse/models/unit_of_measure.py,sha256=UqiQfq32-sHBv9jZJBQ-W8D6cLOQJJ61fCMoSxT9mTQ,5332
147
+ factpulse/models/validation_error.py,sha256=HqQpB6EXDLBOYSeyGQ-vHHEiQ8vulf6fNj53bHUUvcQ,7554
148
+ factpulse/models/validation_error_detail.py,sha256=HqU5a_YppZKaU977v8__zV9ftSJ6cMwu_TDzWelwvpo,8167
149
+ factpulse/models/validation_error_loc_inner.py,sha256=e2_k_BNmeNl_JavYKrvPTDoW4BqeiMyIMNReB1uAfKw,9348
150
+ factpulse/models/validation_error_response.py,sha256=JdvpXOtfF8TphLuyT9vfzjuo7bxwolNYQxtCb7S6A9o,7059
151
+ factpulse/models/validation_info.py,sha256=gGnDTnEf3sIfBEL1iftH0JO9nApwxgv22ixJsQIf7oA,8413
152
+ factpulse/models/validation_success_response.py,sha256=2JJcIkkAtbpRIUWKe7MKOAgDMIXtgzhFKSNsR_jPzvM,7066
153
+ factpulse/models/vat_accounting_code.py,sha256=B5MhIAvbK63mtyX0jOmTNBKNl5xIEeguLhOdv3Prc_8,5332
154
+ factpulse/models/vat_amount.py,sha256=X6y_TN9al9PdorhJ8TzPgsxLwEvY96C6a_kk0AwCMsE,9452
155
+ factpulse/models/vat_category.py,sha256=_HenJMtwtXmhg5JUEdXya1L97vjizNQy5-5gLOQLdns,5706
156
+ factpulse/models/vat_line.py,sha256=sGoEZLKT320zieGkDXMUEBw1oEGNvh-tr92On5ffeuM,10055
157
+ factpulse/models/vat_point_date_code.py,sha256=BULFejhDKHXPUsiDJUjXPBLGTXgcNEpqW8frg27C8cw,5306
158
+ factpulse/models/vat_rate.py,sha256=xsUqjMBfnI6NjDDIKqYRCxOBX7ED9NwLMJsSLUGJGbg,9527
159
+ factpulse/models/verification_success_response.py,sha256=g5S0Ola2LshGkHC8Tw01LCT3kJYP_jIaxb0u1epMpMw,11179
160
+ factpulse/models/verified_field_schema.py,sha256=z3SFdgogb9pe2uH81lw-5rWKeOcWbM8DYFCWORfr8lc,9568
161
+ factpulse-3.0.7.dist-info/licenses/LICENSE,sha256=TOREZ0FjfXTO1zqJjqfiuyBoj79tmdfVAJuWN_KV-i8,1066
162
+ factpulse_helpers/__init__.py,sha256=sNudk_JnH-cY-ckqYGGw7GoCY3Esqu6KSIW474rhWAg,2533
163
+ factpulse_helpers/client.py,sha256=np4ZfuOBqATBll60CV4JsdZnxY1o9WGKKbtWe-GQyZM,80207
164
+ factpulse_helpers/exceptions.py,sha256=xraFc_rLUALO1kGrl1US01zIg5hKatfxxqgcE5aNY0g,9083
165
+ factpulse-3.0.7.dist-info/METADATA,sha256=yAPUjyv3LDTvVaWPgOw2xqmBBRcuHjnPr1qTUHxUSh4,6930
166
+ factpulse-3.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
167
+ factpulse-3.0.7.dist-info/top_level.txt,sha256=gG17jwZIkNxBJeHxdyLCU6kkoGMr2Ir2metnQ7eT2xY,28
168
+ factpulse-3.0.7.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ factpulse
2
+ factpulse_helpers
@@ -0,0 +1,96 @@
1
+ """
2
+ FactPulse Helpers - Simplified client with built-in JWT authentication and polling.
3
+
4
+ This module provides:
5
+ - FactPulseClient: Client with JWT auth and automatic polling
6
+ - ChorusProCredentials / AFNORCredentials: Dataclasses for Zero-Trust mode
7
+ - Amount helpers: amount(), invoice_totals(), invoice_line(), vat_line()
8
+ - JSON helpers: DecimalEncoder, json_dumps_safe() for serializing Decimal/datetime
9
+
10
+ Example:
11
+ >>> from factpulse_helpers import (
12
+ ... FactPulseClient,
13
+ ... ChorusProCredentials,
14
+ ... AFNORCredentials,
15
+ ... invoice_totals,
16
+ ... invoice_line,
17
+ ... )
18
+ >>>
19
+ >>> client = FactPulseClient(
20
+ ... email="user@example.com",
21
+ ... password="password",
22
+ ... chorus_credentials=ChorusProCredentials(
23
+ ... piste_client_id="...",
24
+ ... piste_client_secret="...",
25
+ ... chorus_pro_login="...",
26
+ ... chorus_pro_password="..."
27
+ ... )
28
+ ... )
29
+ """
30
+ from .client import (
31
+ FactPulseClient,
32
+ ChorusProCredentials,
33
+ AFNORCredentials,
34
+ amount,
35
+ invoice_totals,
36
+ invoice_line,
37
+ vat_line,
38
+ postal_address,
39
+ electronic_address,
40
+ supplier,
41
+ recipient,
42
+ # JSON utilities
43
+ DecimalEncoder,
44
+ json_dumps_safe,
45
+ )
46
+ from .exceptions import (
47
+ FactPulseError,
48
+ FactPulseAuthError,
49
+ FactPulsePollingTimeout,
50
+ FactPulseValidationError,
51
+ FactPulseNotFoundError,
52
+ FactPulseServiceUnavailableError,
53
+ FactPulseAPIError,
54
+ ValidationErrorDetail,
55
+ parse_api_error,
56
+ api_exception_to_validation_error,
57
+ )
58
+
59
+ __all__ = [
60
+ # Main client
61
+ "FactPulseClient",
62
+ # Credentials
63
+ "ChorusProCredentials",
64
+ "AFNORCredentials",
65
+ # Amount and line helpers
66
+ "amount",
67
+ "invoice_totals",
68
+ "invoice_line",
69
+ "vat_line",
70
+ # Party helpers (supplier/recipient)
71
+ "postal_address",
72
+ "electronic_address",
73
+ "supplier",
74
+ "recipient",
75
+ # JSON utilities (Decimal, datetime handling, etc.)
76
+ "DecimalEncoder",
77
+ "json_dumps_safe",
78
+ # Exceptions
79
+ "FactPulseError",
80
+ "FactPulseAuthError",
81
+ "FactPulsePollingTimeout",
82
+ "FactPulseValidationError",
83
+ "FactPulseNotFoundError",
84
+ "FactPulseServiceUnavailableError",
85
+ "FactPulseAPIError",
86
+ "ValidationErrorDetail",
87
+ # Helpers for parsing API errors
88
+ "parse_api_error",
89
+ "api_exception_to_validation_error",
90
+ ]
91
+
92
+
93
+ # Backward compatibility alias
94
+ def format_amount(value) -> str:
95
+ """Format an amount for the FactPulse API. Alias for amount()."""
96
+ return amount(value)