factpulse 2.0.19__tar.gz → 3.0.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.
- factpulse-3.0.0/PKG-INFO +292 -0
- factpulse-3.0.0/README.md +272 -0
- factpulse-3.0.0/factpulse/__init__.py +282 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/api/__init__.py +4 -3
- factpulse-3.0.0/factpulse/api/afnorpdppa_api.py +834 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/api/afnorpdppa_directory_service_api.py +59 -59
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/api/afnorpdppa_flow_service_api.py +23 -23
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/api/chorus_pro_api.py +362 -404
- factpulse-2.0.19/factpulse/api/sant_api.py → factpulse-3.0.0/factpulse/api/health_api.py +22 -22
- factpulse-3.0.0/factpulse/api/invoice_processing_api.py +3437 -0
- factpulse-3.0.0/factpulse/api/pdfxml_verification_api.py +1719 -0
- factpulse-2.0.19/factpulse/api/utilisateur_api.py → factpulse-3.0.0/factpulse/api/user_api.py +17 -17
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/api_client.py +6 -6
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/configuration.py +3 -3
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/exceptions.py +3 -3
- factpulse-3.0.0/factpulse/models/__init__.py +126 -0
- factpulse-3.0.0/factpulse/models/acknowledgment_status.py +38 -0
- factpulse-3.0.0/factpulse/models/afnor_credentials.py +106 -0
- factpulse-3.0.0/factpulse/models/afnor_destination.py +127 -0
- factpulse-3.0.0/factpulse/models/afnor_health_check_response.py +91 -0
- factpulse-3.0.0/factpulse/models/afnor_result.py +105 -0
- factpulse-3.0.0/factpulse/models/allowance_reason_code.py +42 -0
- factpulse-3.0.0/factpulse/models/amount_due.py +139 -0
- factpulse-3.0.0/factpulse/models/api_error.py +104 -0
- factpulse-3.0.0/factpulse/models/api_profile.py +39 -0
- factpulse-3.0.0/factpulse/models/bounding_box_schema.py +100 -0
- factpulse-3.0.0/factpulse/models/celery_status.py +40 -0
- factpulse-3.0.0/factpulse/models/certificate_info_response.py +114 -0
- factpulse-3.0.0/factpulse/models/chorus_pro_destination.py +108 -0
- factpulse-3.0.0/factpulse/models/chorus_pro_result.py +101 -0
- factpulse-3.0.0/factpulse/models/destination.py +140 -0
- factpulse-3.0.0/factpulse/models/document_type.py +40 -0
- factpulse-3.0.0/factpulse/models/electronic_address.py +90 -0
- factpulse-3.0.0/factpulse/models/enriched_invoice_info.py +133 -0
- factpulse-3.0.0/factpulse/models/error_level.py +37 -0
- factpulse-3.0.0/factpulse/models/error_source.py +43 -0
- factpulse-3.0.0/factpulse/models/factur_xpdf_info.py +91 -0
- factpulse-3.0.0/factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.py +95 -0
- factpulse-3.0.0/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py +115 -0
- factpulse-3.0.0/factpulse/models/facture_factur_x.py +194 -0
- factpulse-3.0.0/factpulse/models/field_status.py +40 -0
- factpulse-3.0.0/factpulse/models/flow_direction.py +37 -0
- factpulse-3.0.0/factpulse/models/flow_profile.py +38 -0
- factpulse-3.0.0/factpulse/models/flow_summary.py +131 -0
- factpulse-3.0.0/factpulse/models/flow_syntax.py +40 -0
- factpulse-3.0.0/factpulse/models/flow_type.py +40 -0
- factpulse-3.0.0/factpulse/models/generate_certificate_request.py +118 -0
- factpulse-3.0.0/factpulse/models/generate_certificate_response.py +106 -0
- factpulse-3.0.0/factpulse/models/get_chorus_pro_id_request.py +100 -0
- factpulse-3.0.0/factpulse/models/get_chorus_pro_id_response.py +98 -0
- factpulse-3.0.0/factpulse/models/get_invoice_request.py +98 -0
- factpulse-3.0.0/factpulse/models/get_invoice_response.py +142 -0
- factpulse-3.0.0/factpulse/models/get_structure_request.py +100 -0
- factpulse-3.0.0/factpulse/models/get_structure_response.py +142 -0
- factpulse-3.0.0/factpulse/models/global_allowance_amount.py +139 -0
- factpulse-3.0.0/factpulse/models/http_validation_error.py +95 -0
- factpulse-3.0.0/factpulse/models/incoming_invoice.py +196 -0
- factpulse-3.0.0/factpulse/models/incoming_supplier.py +144 -0
- factpulse-3.0.0/factpulse/models/invoice_format.py +38 -0
- factpulse-3.0.0/factpulse/models/invoice_line.py +178 -0
- factpulse-3.0.0/factpulse/models/invoice_line_allowance_amount.py +145 -0
- factpulse-3.0.0/factpulse/models/invoice_note.py +94 -0
- factpulse-3.0.0/factpulse/models/invoice_references.py +124 -0
- factpulse-3.0.0/factpulse/models/invoice_status.py +96 -0
- factpulse-3.0.0/factpulse/models/invoice_totals.py +133 -0
- factpulse-3.0.0/factpulse/models/invoice_totals_prepayment.py +145 -0
- factpulse-3.0.0/factpulse/models/invoice_type_code.py +67 -0
- factpulse-3.0.0/factpulse/models/invoicing_framework.py +110 -0
- factpulse-3.0.0/factpulse/models/invoicing_framework_code.py +43 -0
- factpulse-3.0.0/factpulse/models/line_net_amount.py +139 -0
- factpulse-3.0.0/factpulse/models/mandatory_note_schema.py +124 -0
- factpulse-3.0.0/factpulse/models/manual_rate.py +139 -0
- factpulse-3.0.0/factpulse/models/manual_vat_rate.py +139 -0
- factpulse-3.0.0/factpulse/models/operation_nature.py +49 -0
- factpulse-3.0.0/factpulse/models/output_format.py +37 -0
- factpulse-3.0.0/factpulse/models/page_dimensions_schema.py +89 -0
- factpulse-3.0.0/factpulse/models/payee.py +147 -0
- factpulse-3.0.0/factpulse/models/payment_means.py +47 -0
- factpulse-3.0.0/factpulse/models/pdf_validation_result_api.py +169 -0
- factpulse-3.0.0/factpulse/models/pdp_credentials.py +100 -0
- factpulse-3.0.0/factpulse/models/postal_address.py +120 -0
- factpulse-3.0.0/factpulse/models/processing_options.py +94 -0
- factpulse-3.0.0/factpulse/models/quantity.py +139 -0
- factpulse-3.0.0/factpulse/models/recipient.py +135 -0
- factpulse-3.0.0/factpulse/models/scheme_id.py +40 -0
- factpulse-3.0.0/factpulse/models/search_flow_request.py +143 -0
- factpulse-3.0.0/factpulse/models/search_flow_response.py +101 -0
- factpulse-3.0.0/factpulse/models/search_services_response.py +101 -0
- factpulse-3.0.0/factpulse/models/search_structure_request.py +119 -0
- factpulse-3.0.0/factpulse/models/search_structure_response.py +101 -0
- factpulse-3.0.0/factpulse/models/signature_info.py +101 -0
- factpulse-3.0.0/factpulse/models/signature_info_api.py +122 -0
- factpulse-3.0.0/factpulse/models/signature_parameters.py +133 -0
- factpulse-3.0.0/factpulse/models/simplified_invoice_data.py +124 -0
- factpulse-3.0.0/factpulse/models/structure_info.py +95 -0
- factpulse-3.0.0/factpulse/models/structure_parameters.py +91 -0
- factpulse-3.0.0/factpulse/models/structure_service.py +93 -0
- factpulse-3.0.0/factpulse/models/submission_mode.py +41 -0
- factpulse-3.0.0/factpulse/models/submit_complete_invoice_request.py +116 -0
- factpulse-3.0.0/factpulse/models/submit_complete_invoice_response.py +145 -0
- factpulse-3.0.0/factpulse/models/submit_flow_request.py +123 -0
- factpulse-3.0.0/factpulse/models/submit_flow_response.py +109 -0
- factpulse-3.0.0/factpulse/models/submit_invoice_request.py +176 -0
- factpulse-3.0.0/factpulse/models/submit_invoice_response.py +103 -0
- factpulse-3.0.0/factpulse/models/supplementary_attachment.py +95 -0
- factpulse-3.0.0/factpulse/models/supplier.py +158 -0
- factpulse-3.0.0/factpulse/models/task_response.py +87 -0
- factpulse-3.0.0/factpulse/models/task_status.py +97 -0
- factpulse-3.0.0/factpulse/models/taxable_amount.py +139 -0
- factpulse-3.0.0/factpulse/models/total_gross_amount.py +139 -0
- factpulse-3.0.0/factpulse/models/total_net_amount.py +139 -0
- factpulse-3.0.0/factpulse/models/total_vat_amount.py +139 -0
- factpulse-3.0.0/factpulse/models/unit_net_price.py +139 -0
- factpulse-3.0.0/factpulse/models/unit_of_measure.py +47 -0
- factpulse-3.0.0/factpulse/models/validation_error.py +99 -0
- factpulse-3.0.0/factpulse/models/validation_error_detail.py +107 -0
- factpulse-3.0.0/factpulse/models/validation_error_loc_inner.py +138 -0
- factpulse-3.0.0/factpulse/models/validation_error_response.py +87 -0
- factpulse-3.0.0/factpulse/models/validation_success_response.py +87 -0
- factpulse-3.0.0/factpulse/models/vat_accounting_code.py +43 -0
- factpulse-3.0.0/factpulse/models/vat_amount.py +139 -0
- factpulse-3.0.0/factpulse/models/vat_category.py +44 -0
- factpulse-3.0.0/factpulse/models/vat_line.py +132 -0
- factpulse-3.0.0/factpulse/models/verification_success_response.py +135 -0
- factpulse-3.0.0/factpulse/models/verified_field_schema.py +129 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/rest.py +9 -4
- factpulse-3.0.0/factpulse.egg-info/PKG-INFO +292 -0
- factpulse-3.0.0/factpulse.egg-info/SOURCES.txt +256 -0
- factpulse-3.0.0/factpulse_helpers/__init__.py +96 -0
- factpulse-3.0.0/factpulse_helpers/client.py +2140 -0
- factpulse-3.0.0/factpulse_helpers/exceptions.py +253 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/pyproject.toml +3 -3
- factpulse-3.0.0/setup.py +49 -0
- factpulse-3.0.0/test/test_acknowledgment_status.py +33 -0
- factpulse-3.0.0/test/test_afnor_credentials.py +53 -0
- factpulse-3.0.0/test/test_afnor_destination.py +54 -0
- factpulse-3.0.0/test/test_afnor_health_check_response.py +56 -0
- factpulse-3.0.0/test/test_afnor_result.py +58 -0
- factpulse-3.0.0/test/test_afnorpdppa_api.py +52 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/test/test_afnorpdppa_directory_service_api.py +2 -2
- factpulse-3.0.0/test/test_afnorpdppa_flow_service_api.py +59 -0
- factpulse-3.0.0/test/test_allowance_reason_code.py +33 -0
- factpulse-3.0.0/test/test_amount_due.py +50 -0
- factpulse-3.0.0/test/test_api_error.py +62 -0
- factpulse-3.0.0/test/test_api_profile.py +33 -0
- factpulse-3.0.0/test/test_bounding_box_schema.py +63 -0
- factpulse-3.0.0/test/test_celery_status.py +33 -0
- factpulse-3.0.0/test/test_certificate_info_response.py +73 -0
- factpulse-3.0.0/test/test_chorus_pro_api.py +143 -0
- factpulse-3.0.0/test/test_chorus_pro_destination.py +52 -0
- factpulse-3.0.0/test/test_chorus_pro_result.py +54 -0
- factpulse-3.0.0/test/test_destination.py +54 -0
- factpulse-3.0.0/test/test_document_type.py +33 -0
- factpulse-3.0.0/test/test_electronic_address.py +53 -0
- factpulse-3.0.0/test/test_enriched_invoice_info.py +64 -0
- factpulse-3.0.0/test/test_error_level.py +33 -0
- factpulse-3.0.0/test/test_error_source.py +33 -0
- factpulse-3.0.0/test/test_factur_xpdf_info.py +55 -0
- factpulse-3.0.0/test/test_facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.py +59 -0
- factpulse-3.0.0/test/test_facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py +55 -0
- factpulse-3.0.0/test/test_facture_factur_x.py +187 -0
- factpulse-3.0.0/test/test_field_status.py +33 -0
- factpulse-3.0.0/test/test_flow_direction.py +33 -0
- factpulse-3.0.0/test/test_flow_profile.py +33 -0
- factpulse-3.0.0/test/test_flow_summary.py +60 -0
- factpulse-3.0.0/test/test_flow_syntax.py +33 -0
- factpulse-3.0.0/test/test_flow_type.py +33 -0
- factpulse-3.0.0/test/test_generate_certificate_request.py +61 -0
- factpulse-3.0.0/test/test_generate_certificate_response.py +91 -0
- factpulse-3.0.0/test/test_get_chorus_pro_id_request.py +54 -0
- factpulse-3.0.0/test/test_get_chorus_pro_id_response.py +57 -0
- factpulse-3.0.0/test/test_get_invoice_request.py +53 -0
- factpulse-3.0.0/test/test_get_invoice_response.py +64 -0
- factpulse-3.0.0/test/test_get_structure_request.py +54 -0
- factpulse-3.0.0/test/test_get_structure_response.py +64 -0
- factpulse-3.0.0/test/test_global_allowance_amount.py +50 -0
- factpulse-3.0.0/test/test_health_api.py +45 -0
- factpulse-3.0.0/test/test_http_validation_error.py +58 -0
- factpulse-3.0.0/test/test_incoming_invoice.py +93 -0
- factpulse-3.0.0/test/test_incoming_supplier.py +66 -0
- factpulse-3.0.0/test/test_invoice_format.py +33 -0
- factpulse-3.0.0/test/test_invoice_line.py +70 -0
- factpulse-3.0.0/test/test_invoice_line_allowance_amount.py +50 -0
- factpulse-3.0.0/test/test_invoice_note.py +53 -0
- factpulse-3.0.0/test/test_invoice_processing_api.py +108 -0
- factpulse-3.0.0/test/test_invoice_references.py +61 -0
- factpulse-3.0.0/test/test_invoice_status.py +55 -0
- factpulse-3.0.0/test/test_invoice_totals.py +61 -0
- factpulse-3.0.0/test/test_invoice_totals_prepayment.py +50 -0
- factpulse-3.0.0/test/test_invoice_type_code.py +33 -0
- factpulse-3.0.0/test/test_invoicing_framework.py +55 -0
- factpulse-3.0.0/test/test_invoicing_framework_code.py +33 -0
- factpulse-3.0.0/test/test_line_net_amount.py +50 -0
- factpulse-3.0.0/test/test_mandatory_note_schema.py +59 -0
- factpulse-3.0.0/test/test_manual_rate.py +50 -0
- factpulse-3.0.0/test/test_manual_vat_rate.py +50 -0
- factpulse-3.0.0/test/test_operation_nature.py +33 -0
- factpulse-3.0.0/test/test_output_format.py +33 -0
- factpulse-3.0.0/test/test_page_dimensions_schema.py +54 -0
- factpulse-3.0.0/test/test_payee.py +59 -0
- factpulse-3.0.0/test/test_payment_means.py +33 -0
- factpulse-3.0.0/test/test_pdf_validation_result_api.py +99 -0
- factpulse-3.0.0/test/test_pdfxml_verification_api.py +73 -0
- factpulse-3.0.0/test/test_pdp_credentials.py +59 -0
- factpulse-3.0.0/test/test_postal_address.py +55 -0
- factpulse-3.0.0/test/test_processing_options.py +54 -0
- factpulse-3.0.0/test/test_quantity.py +50 -0
- factpulse-3.0.0/test/test_recipient.py +66 -0
- factpulse-3.0.0/test/test_scheme_id.py +33 -0
- factpulse-3.0.0/test/test_search_flow_request.py +63 -0
- factpulse-3.0.0/test/test_search_flow_response.py +78 -0
- factpulse-3.0.0/test/test_search_services_response.py +62 -0
- factpulse-3.0.0/test/test_search_structure_request.py +55 -0
- factpulse-3.0.0/test/test_search_structure_response.py +63 -0
- factpulse-3.0.0/test/test_signature_info.py +54 -0
- factpulse-3.0.0/test/test_signature_info_api.py +57 -0
- factpulse-3.0.0/test/test_signature_parameters.py +59 -0
- factpulse-3.0.0/test/test_simplified_invoice_data.py +67 -0
- factpulse-3.0.0/test/test_structure_info.py +60 -0
- factpulse-3.0.0/test/test_structure_parameters.py +53 -0
- factpulse-3.0.0/test/test_structure_service.py +58 -0
- factpulse-3.0.0/test/test_submission_mode.py +33 -0
- factpulse-3.0.0/test/test_submit_complete_invoice_request.py +89 -0
- factpulse-3.0.0/test/test_submit_complete_invoice_response.py +82 -0
- factpulse-3.0.0/test/test_submit_flow_request.py +57 -0
- factpulse-3.0.0/test/test_submit_flow_response.py +62 -0
- factpulse-3.0.0/test/test_submit_invoice_request.py +71 -0
- factpulse-3.0.0/test/test_submit_invoice_response.py +56 -0
- factpulse-3.0.0/test/test_supplementary_attachment.py +60 -0
- factpulse-3.0.0/test/test_supplier.py +71 -0
- factpulse-3.0.0/test/test_task_response.py +52 -0
- factpulse-3.0.0/test/test_task_status.py +55 -0
- factpulse-3.0.0/test/test_taxable_amount.py +50 -0
- factpulse-3.0.0/test/test_total_gross_amount.py +50 -0
- factpulse-3.0.0/test/test_total_net_amount.py +50 -0
- factpulse-3.0.0/test/test_total_vat_amount.py +50 -0
- factpulse-3.0.0/test/test_unit_net_price.py +50 -0
- factpulse-3.0.0/test/test_unit_of_measure.py +33 -0
- factpulse-3.0.0/test/test_user_api.py +38 -0
- factpulse-3.0.0/test/test_validation_error.py +60 -0
- factpulse-3.0.0/test/test_validation_error_detail.py +57 -0
- factpulse-3.0.0/test/test_validation_error_loc_inner.py +50 -0
- factpulse-3.0.0/test/test_validation_error_response.py +56 -0
- factpulse-3.0.0/test/test_validation_success_response.py +52 -0
- factpulse-3.0.0/test/test_vat_accounting_code.py +33 -0
- factpulse-3.0.0/test/test_vat_amount.py +50 -0
- factpulse-3.0.0/test/test_vat_category.py +33 -0
- factpulse-3.0.0/test/test_vat_line.py +59 -0
- factpulse-3.0.0/test/test_verification_success_response.py +70 -0
- factpulse-3.0.0/test/test_verified_field_schema.py +62 -0
- factpulse-2.0.19/PKG-INFO +0 -217
- factpulse-2.0.19/README.md +0 -197
- factpulse-2.0.19/factpulse/__init__.py +0 -258
- factpulse-2.0.19/factpulse/api/afnorpdppa_api.py +0 -284
- factpulse-2.0.19/factpulse/api/traitement_facture_api.py +0 -3437
- factpulse-2.0.19/factpulse/models/__init__.py +0 -115
- factpulse-2.0.19/factpulse/models/adresse_electronique.py +0 -90
- factpulse-2.0.19/factpulse/models/adresse_postale.py +0 -120
- factpulse-2.0.19/factpulse/models/api_error.py +0 -104
- factpulse-2.0.19/factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.py +0 -104
- factpulse-2.0.19/factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.py +0 -104
- factpulse-2.0.19/factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.py +0 -102
- factpulse-2.0.19/factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.py +0 -104
- factpulse-2.0.19/factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.py +0 -104
- factpulse-2.0.19/factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.py +0 -104
- factpulse-2.0.19/factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.py +0 -104
- factpulse-2.0.19/factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.py +0 -104
- factpulse-2.0.19/factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.py +0 -104
- factpulse-2.0.19/factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.py +0 -104
- factpulse-2.0.19/factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.py +0 -104
- factpulse-2.0.19/factpulse/models/cadre_de_facturation.py +0 -102
- factpulse-2.0.19/factpulse/models/categorie_tva.py +0 -44
- factpulse-2.0.19/factpulse/models/certificate_info_response.py +0 -114
- factpulse-2.0.19/factpulse/models/chorus_pro_credentials.py +0 -95
- factpulse-2.0.19/factpulse/models/code_cadre_facturation.py +0 -39
- factpulse-2.0.19/factpulse/models/code_raison_reduction.py +0 -42
- factpulse-2.0.19/factpulse/models/consulter_facture_request.py +0 -98
- factpulse-2.0.19/factpulse/models/consulter_facture_response.py +0 -142
- factpulse-2.0.19/factpulse/models/consulter_structure_request.py +0 -100
- factpulse-2.0.19/factpulse/models/consulter_structure_response.py +0 -142
- factpulse-2.0.19/factpulse/models/credentials_afnor.py +0 -106
- factpulse-2.0.19/factpulse/models/credentials_chorus_pro.py +0 -115
- factpulse-2.0.19/factpulse/models/destinataire.py +0 -130
- factpulse-2.0.19/factpulse/models/destination.py +0 -140
- factpulse-2.0.19/factpulse/models/destination_afnor.py +0 -127
- factpulse-2.0.19/factpulse/models/destination_chorus_pro.py +0 -108
- factpulse-2.0.19/factpulse/models/donnees_facture_simplifiees.py +0 -124
- factpulse-2.0.19/factpulse/models/error_level.py +0 -37
- factpulse-2.0.19/factpulse/models/error_source.py +0 -43
- factpulse-2.0.19/factpulse/models/facture_enrichie_info.py +0 -133
- factpulse-2.0.19/factpulse/models/facture_factur_x.py +0 -183
- factpulse-2.0.19/factpulse/models/format_sortie.py +0 -37
- factpulse-2.0.19/factpulse/models/fournisseur.py +0 -153
- factpulse-2.0.19/factpulse/models/generate_certificate_request.py +0 -118
- factpulse-2.0.19/factpulse/models/generate_certificate_response.py +0 -106
- factpulse-2.0.19/factpulse/models/http_validation_error.py +0 -95
- factpulse-2.0.19/factpulse/models/information_signature_api.py +0 -122
- factpulse-2.0.19/factpulse/models/ligne_de_poste.py +0 -183
- factpulse-2.0.19/factpulse/models/ligne_de_poste_montant_remise_ht.py +0 -145
- factpulse-2.0.19/factpulse/models/ligne_de_poste_taux_tva_manuel.py +0 -145
- factpulse-2.0.19/factpulse/models/ligne_de_tva.py +0 -118
- factpulse-2.0.19/factpulse/models/mode_depot.py +0 -38
- factpulse-2.0.19/factpulse/models/mode_paiement.py +0 -41
- factpulse-2.0.19/factpulse/models/montant_a_payer.py +0 -139
- factpulse-2.0.19/factpulse/models/montant_base_ht.py +0 -139
- factpulse-2.0.19/factpulse/models/montant_ht_total.py +0 -139
- factpulse-2.0.19/factpulse/models/montant_remise_globale_ttc.py +0 -139
- factpulse-2.0.19/factpulse/models/montant_total.py +0 -133
- factpulse-2.0.19/factpulse/models/montant_total_acompte.py +0 -145
- factpulse-2.0.19/factpulse/models/montant_total_ligne_ht.py +0 -139
- factpulse-2.0.19/factpulse/models/montant_ttc_total.py +0 -139
- factpulse-2.0.19/factpulse/models/montant_tva.py +0 -139
- factpulse-2.0.19/factpulse/models/montant_tva_ligne.py +0 -139
- factpulse-2.0.19/factpulse/models/montant_tva_total.py +0 -139
- factpulse-2.0.19/factpulse/models/montant_unitaire_ht.py +0 -139
- factpulse-2.0.19/factpulse/models/note.py +0 -94
- factpulse-2.0.19/factpulse/models/obtenir_id_chorus_pro_request.py +0 -100
- factpulse-2.0.19/factpulse/models/obtenir_id_chorus_pro_response.py +0 -98
- factpulse-2.0.19/factpulse/models/options_processing.py +0 -94
- factpulse-2.0.19/factpulse/models/parametres_signature.py +0 -133
- factpulse-2.0.19/factpulse/models/parametres_structure.py +0 -91
- factpulse-2.0.19/factpulse/models/pdf_factur_x_info.py +0 -91
- factpulse-2.0.19/factpulse/models/piece_jointe_complementaire.py +0 -95
- factpulse-2.0.19/factpulse/models/profil_api.py +0 -39
- factpulse-2.0.19/factpulse/models/quantite.py +0 -139
- factpulse-2.0.19/factpulse/models/quota_info.py +0 -95
- factpulse-2.0.19/factpulse/models/rechercher_services_response.py +0 -101
- factpulse-2.0.19/factpulse/models/rechercher_structure_request.py +0 -119
- factpulse-2.0.19/factpulse/models/rechercher_structure_response.py +0 -101
- factpulse-2.0.19/factpulse/models/references.py +0 -124
- factpulse-2.0.19/factpulse/models/reponse_tache.py +0 -87
- factpulse-2.0.19/factpulse/models/reponse_validation_erreur.py +0 -87
- factpulse-2.0.19/factpulse/models/reponse_validation_succes.py +0 -87
- factpulse-2.0.19/factpulse/models/resultat_afnor.py +0 -105
- factpulse-2.0.19/factpulse/models/resultat_chorus_pro.py +0 -101
- factpulse-2.0.19/factpulse/models/resultat_validation_pdfapi.py +0 -169
- factpulse-2.0.19/factpulse/models/scheme_id.py +0 -40
- factpulse-2.0.19/factpulse/models/service_structure.py +0 -93
- factpulse-2.0.19/factpulse/models/signature_info.py +0 -101
- factpulse-2.0.19/factpulse/models/soumettre_facture_complete_request.py +0 -116
- factpulse-2.0.19/factpulse/models/soumettre_facture_complete_response.py +0 -145
- factpulse-2.0.19/factpulse/models/soumettre_facture_request.py +0 -176
- factpulse-2.0.19/factpulse/models/soumettre_facture_response.py +0 -103
- factpulse-2.0.19/factpulse/models/statut_celery.py +0 -40
- factpulse-2.0.19/factpulse/models/statut_facture.py +0 -96
- factpulse-2.0.19/factpulse/models/statut_tache.py +0 -97
- factpulse-2.0.19/factpulse/models/structure_info.py +0 -95
- factpulse-2.0.19/factpulse/models/tauxmanuel.py +0 -139
- factpulse-2.0.19/factpulse/models/type_facture.py +0 -37
- factpulse-2.0.19/factpulse/models/type_tva.py +0 -39
- factpulse-2.0.19/factpulse/models/unite.py +0 -41
- factpulse-2.0.19/factpulse/models/utilisateur.py +0 -128
- factpulse-2.0.19/factpulse/models/validation_error.py +0 -99
- factpulse-2.0.19/factpulse/models/validation_error_detail.py +0 -107
- factpulse-2.0.19/factpulse/models/validation_error_loc_inner.py +0 -138
- factpulse-2.0.19/factpulse.egg-info/PKG-INFO +0 -217
- factpulse-2.0.19/factpulse.egg-info/SOURCES.txt +0 -234
- factpulse-2.0.19/factpulse_helpers/__init__.py +0 -69
- factpulse-2.0.19/factpulse_helpers/client.py +0 -537
- factpulse-2.0.19/factpulse_helpers/exceptions.py +0 -46
- factpulse-2.0.19/setup.py +0 -49
- factpulse-2.0.19/test/test_adresse_electronique.py +0 -53
- factpulse-2.0.19/test/test_adresse_postale.py +0 -55
- factpulse-2.0.19/test/test_afnorpdppa_api.py +0 -38
- factpulse-2.0.19/test/test_afnorpdppa_flow_service_api.py +0 -59
- factpulse-2.0.19/test/test_api_error.py +0 -62
- factpulse-2.0.19/test/test_body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.py +0 -79
- factpulse-2.0.19/test/test_body_completer_facture_api_v1_chorus_pro_factures_completer_post.py +0 -79
- factpulse-2.0.19/test/test_body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.py +0 -77
- factpulse-2.0.19/test/test_body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.py +0 -79
- factpulse-2.0.19/test/test_body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.py +0 -79
- factpulse-2.0.19/test/test_body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.py +0 -79
- factpulse-2.0.19/test/test_body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.py +0 -79
- factpulse-2.0.19/test/test_body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.py +0 -79
- factpulse-2.0.19/test/test_body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.py +0 -79
- factpulse-2.0.19/test/test_body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.py +0 -79
- factpulse-2.0.19/test/test_body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.py +0 -79
- factpulse-2.0.19/test/test_cadre_de_facturation.py +0 -54
- factpulse-2.0.19/test/test_categorie_tva.py +0 -33
- factpulse-2.0.19/test/test_certificate_info_response.py +0 -73
- factpulse-2.0.19/test/test_chorus_pro_api.py +0 -143
- factpulse-2.0.19/test/test_chorus_pro_credentials.py +0 -59
- factpulse-2.0.19/test/test_code_cadre_facturation.py +0 -33
- factpulse-2.0.19/test/test_code_raison_reduction.py +0 -33
- factpulse-2.0.19/test/test_consulter_facture_request.py +0 -53
- factpulse-2.0.19/test/test_consulter_facture_response.py +0 -64
- factpulse-2.0.19/test/test_consulter_structure_request.py +0 -54
- factpulse-2.0.19/test/test_consulter_structure_response.py +0 -64
- factpulse-2.0.19/test/test_credentials_afnor.py +0 -53
- factpulse-2.0.19/test/test_credentials_chorus_pro.py +0 -55
- factpulse-2.0.19/test/test_destinataire.py +0 -66
- factpulse-2.0.19/test/test_destination.py +0 -54
- factpulse-2.0.19/test/test_destination_afnor.py +0 -54
- factpulse-2.0.19/test/test_destination_chorus_pro.py +0 -52
- factpulse-2.0.19/test/test_donnees_facture_simplifiees.py +0 -67
- factpulse-2.0.19/test/test_error_level.py +0 -33
- factpulse-2.0.19/test/test_error_source.py +0 -33
- factpulse-2.0.19/test/test_facture_enrichie_info.py +0 -64
- factpulse-2.0.19/test/test_facture_factur_x.py +0 -184
- factpulse-2.0.19/test/test_format_sortie.py +0 -33
- factpulse-2.0.19/test/test_fournisseur.py +0 -71
- factpulse-2.0.19/test/test_generate_certificate_request.py +0 -61
- factpulse-2.0.19/test/test_generate_certificate_response.py +0 -91
- factpulse-2.0.19/test/test_http_validation_error.py +0 -58
- factpulse-2.0.19/test/test_information_signature_api.py +0 -57
- factpulse-2.0.19/test/test_ligne_de_poste.py +0 -70
- factpulse-2.0.19/test/test_ligne_de_poste_montant_remise_ht.py +0 -50
- factpulse-2.0.19/test/test_ligne_de_poste_taux_tva_manuel.py +0 -50
- factpulse-2.0.19/test/test_ligne_de_tva.py +0 -57
- factpulse-2.0.19/test/test_mode_depot.py +0 -33
- factpulse-2.0.19/test/test_mode_paiement.py +0 -33
- factpulse-2.0.19/test/test_montant_a_payer.py +0 -50
- factpulse-2.0.19/test/test_montant_base_ht.py +0 -50
- factpulse-2.0.19/test/test_montant_ht_total.py +0 -50
- factpulse-2.0.19/test/test_montant_remise_globale_ttc.py +0 -50
- factpulse-2.0.19/test/test_montant_total.py +0 -61
- factpulse-2.0.19/test/test_montant_total_acompte.py +0 -50
- factpulse-2.0.19/test/test_montant_total_ligne_ht.py +0 -50
- factpulse-2.0.19/test/test_montant_ttc_total.py +0 -50
- factpulse-2.0.19/test/test_montant_tva.py +0 -50
- factpulse-2.0.19/test/test_montant_tva_ligne.py +0 -50
- factpulse-2.0.19/test/test_montant_tva_total.py +0 -50
- factpulse-2.0.19/test/test_montant_unitaire_ht.py +0 -50
- factpulse-2.0.19/test/test_note.py +0 -53
- factpulse-2.0.19/test/test_obtenir_id_chorus_pro_request.py +0 -54
- factpulse-2.0.19/test/test_obtenir_id_chorus_pro_response.py +0 -57
- factpulse-2.0.19/test/test_options_processing.py +0 -54
- factpulse-2.0.19/test/test_parametres_signature.py +0 -59
- factpulse-2.0.19/test/test_parametres_structure.py +0 -53
- factpulse-2.0.19/test/test_pdf_factur_x_info.py +0 -55
- factpulse-2.0.19/test/test_piece_jointe_complementaire.py +0 -60
- factpulse-2.0.19/test/test_profil_api.py +0 -33
- factpulse-2.0.19/test/test_quantite.py +0 -50
- factpulse-2.0.19/test/test_quota_info.py +0 -60
- factpulse-2.0.19/test/test_rechercher_services_response.py +0 -62
- factpulse-2.0.19/test/test_rechercher_structure_request.py +0 -55
- factpulse-2.0.19/test/test_rechercher_structure_response.py +0 -63
- factpulse-2.0.19/test/test_references.py +0 -61
- factpulse-2.0.19/test/test_reponse_tache.py +0 -52
- factpulse-2.0.19/test/test_reponse_validation_erreur.py +0 -56
- factpulse-2.0.19/test/test_reponse_validation_succes.py +0 -52
- factpulse-2.0.19/test/test_resultat_afnor.py +0 -58
- factpulse-2.0.19/test/test_resultat_chorus_pro.py +0 -54
- factpulse-2.0.19/test/test_resultat_validation_pdfapi.py +0 -99
- factpulse-2.0.19/test/test_sant_api.py +0 -45
- factpulse-2.0.19/test/test_scheme_id.py +0 -33
- factpulse-2.0.19/test/test_service_structure.py +0 -58
- factpulse-2.0.19/test/test_signature_info.py +0 -54
- factpulse-2.0.19/test/test_soumettre_facture_complete_request.py +0 -89
- factpulse-2.0.19/test/test_soumettre_facture_complete_response.py +0 -82
- factpulse-2.0.19/test/test_soumettre_facture_request.py +0 -71
- factpulse-2.0.19/test/test_soumettre_facture_response.py +0 -56
- factpulse-2.0.19/test/test_statut_celery.py +0 -33
- factpulse-2.0.19/test/test_statut_facture.py +0 -55
- factpulse-2.0.19/test/test_statut_tache.py +0 -55
- factpulse-2.0.19/test/test_structure_info.py +0 -60
- factpulse-2.0.19/test/test_tauxmanuel.py +0 -50
- factpulse-2.0.19/test/test_traitement_facture_api.py +0 -108
- factpulse-2.0.19/test/test_type_facture.py +0 -33
- factpulse-2.0.19/test/test_type_tva.py +0 -33
- factpulse-2.0.19/test/test_unite.py +0 -33
- factpulse-2.0.19/test/test_utilisateur.py +0 -71
- factpulse-2.0.19/test/test_utilisateur_api.py +0 -38
- factpulse-2.0.19/test/test_validation_error.py +0 -60
- factpulse-2.0.19/test/test_validation_error_detail.py +0 -57
- factpulse-2.0.19/test/test_validation_error_loc_inner.py +0 -50
- {factpulse-2.0.19 → factpulse-3.0.0}/LICENSE +0 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/api_response.py +0 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse/py.typed +0 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse.egg-info/dependency_links.txt +0 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse.egg-info/requires.txt +0 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/factpulse.egg-info/top_level.txt +0 -0
- {factpulse-2.0.19 → factpulse-3.0.0}/setup.cfg +0 -0
factpulse-3.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: factpulse
|
|
3
|
+
Version: 3.0.0
|
|
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,272 @@
|
|
|
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
|
+
- **Simplified client**: JWT authentication and polling integrated via `factpulse_helpers`
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install factpulse
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
The `factpulse_helpers` module provides a simplified API with automatic authentication and polling:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
from factpulse_helpers import (
|
|
25
|
+
FactPulseClient,
|
|
26
|
+
amount,
|
|
27
|
+
total_amount,
|
|
28
|
+
invoice_line,
|
|
29
|
+
vat_line,
|
|
30
|
+
supplier,
|
|
31
|
+
recipient,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# Create the client
|
|
35
|
+
client = FactPulseClient(
|
|
36
|
+
email="your_email@example.com",
|
|
37
|
+
password="your_password"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
# Build the invoice with helpers
|
|
41
|
+
invoice_data = {
|
|
42
|
+
"number": "INV-2025-001",
|
|
43
|
+
"date": "2025-01-15",
|
|
44
|
+
"supplier": supplier(
|
|
45
|
+
name="My Company SAS",
|
|
46
|
+
siret="12345678901234",
|
|
47
|
+
address_line1="123 Example Street",
|
|
48
|
+
postal_code="75001",
|
|
49
|
+
city="Paris",
|
|
50
|
+
),
|
|
51
|
+
"recipient": recipient(
|
|
52
|
+
name="Client SARL",
|
|
53
|
+
siret="98765432109876",
|
|
54
|
+
address_line1="456 Test Avenue",
|
|
55
|
+
postal_code="69001",
|
|
56
|
+
city="Lyon",
|
|
57
|
+
),
|
|
58
|
+
"totalAmount": total_amount(
|
|
59
|
+
excluding_tax=1000.00,
|
|
60
|
+
vat=200.00,
|
|
61
|
+
including_tax=1200.00,
|
|
62
|
+
due=1200.00,
|
|
63
|
+
),
|
|
64
|
+
"lines": [
|
|
65
|
+
invoice_line(
|
|
66
|
+
number=1,
|
|
67
|
+
description="Consulting services",
|
|
68
|
+
quantity=10,
|
|
69
|
+
unit_price=100.00,
|
|
70
|
+
line_total=1000.00,
|
|
71
|
+
)
|
|
72
|
+
],
|
|
73
|
+
"vatLines": [
|
|
74
|
+
vat_line(
|
|
75
|
+
base_amount=1000.00,
|
|
76
|
+
vat_amount=200.00,
|
|
77
|
+
rate="20.00",
|
|
78
|
+
)
|
|
79
|
+
],
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
# Generate the Factur-X PDF
|
|
83
|
+
with open("source_invoice.pdf", "rb") as f:
|
|
84
|
+
pdf_source = f.read()
|
|
85
|
+
|
|
86
|
+
pdf_bytes = client.generate_facturx(
|
|
87
|
+
invoice_data=invoice_data,
|
|
88
|
+
pdf_source=pdf_source,
|
|
89
|
+
profile="EN16931",
|
|
90
|
+
sync=True,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
with open("facturx_invoice.pdf", "wb") as f:
|
|
94
|
+
f.write(pdf_bytes)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Available Helpers
|
|
98
|
+
|
|
99
|
+
### amount(value)
|
|
100
|
+
|
|
101
|
+
Converts a value to a formatted string for monetary amounts.
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from factpulse_helpers import amount
|
|
105
|
+
|
|
106
|
+
amount(1234.5) # "1234.50"
|
|
107
|
+
amount("1234.56") # "1234.56"
|
|
108
|
+
amount(None) # "0.00"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### total_amount(excluding_tax, vat, including_tax, due, ...)
|
|
112
|
+
|
|
113
|
+
Creates a complete TotalAmount object.
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
from factpulse_helpers import total_amount
|
|
117
|
+
|
|
118
|
+
total = total_amount(
|
|
119
|
+
excluding_tax=1000.00,
|
|
120
|
+
vat=200.00,
|
|
121
|
+
including_tax=1200.00,
|
|
122
|
+
due=1200.00,
|
|
123
|
+
discount_including_tax=50.00, # Optional
|
|
124
|
+
discount_reason="Loyalty", # Optional
|
|
125
|
+
prepayment=100.00, # Optional
|
|
126
|
+
)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### invoice_line(number, description, quantity, unit_price, line_total, ...)
|
|
130
|
+
|
|
131
|
+
Creates an invoice line.
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
from factpulse_helpers import invoice_line
|
|
135
|
+
|
|
136
|
+
line = invoice_line(
|
|
137
|
+
number=1,
|
|
138
|
+
description="Consulting services",
|
|
139
|
+
quantity=5,
|
|
140
|
+
unit_price=200.00,
|
|
141
|
+
line_total=1000.00, # Required
|
|
142
|
+
vat_rate="VAT20", # Or manual_vat_rate="20.00"
|
|
143
|
+
vat_category="S", # S, Z, E, AE, K
|
|
144
|
+
unit="HOUR", # PACKAGE, PIECE, HOUR, DAY...
|
|
145
|
+
reference="REF-001", # Optional
|
|
146
|
+
)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### vat_line(base_amount, vat_amount, ...)
|
|
150
|
+
|
|
151
|
+
Creates a VAT breakdown line.
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
from factpulse_helpers import vat_line
|
|
155
|
+
|
|
156
|
+
vat = vat_line(
|
|
157
|
+
base_amount=1000.00,
|
|
158
|
+
vat_amount=200.00,
|
|
159
|
+
rate="VAT20", # Or manual_rate="20.00"
|
|
160
|
+
category="S", # S, Z, E, AE, K
|
|
161
|
+
)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### postal_address(line1, postal_code, city, ...)
|
|
165
|
+
|
|
166
|
+
Creates a structured postal address.
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
from factpulse_helpers import postal_address
|
|
170
|
+
|
|
171
|
+
address = postal_address(
|
|
172
|
+
line1="123 Republic Street",
|
|
173
|
+
postal_code="75001",
|
|
174
|
+
city="Paris",
|
|
175
|
+
country="FR", # Default: "FR"
|
|
176
|
+
line2="Building A", # Optional
|
|
177
|
+
)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### electronic_address(identifier, scheme_id)
|
|
181
|
+
|
|
182
|
+
Creates an electronic address (digital identifier).
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
from factpulse_helpers import electronic_address
|
|
186
|
+
|
|
187
|
+
# SIRET (scheme_id="0225")
|
|
188
|
+
address = electronic_address("12345678901234", "0225")
|
|
189
|
+
|
|
190
|
+
# SIREN (scheme_id="0009")
|
|
191
|
+
address = electronic_address("123456789", "0009")
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### supplier(name, siret, address_line1, postal_code, city, ...)
|
|
195
|
+
|
|
196
|
+
Creates a complete supplier with automatic SIREN and intra-EU VAT calculation.
|
|
197
|
+
|
|
198
|
+
```python
|
|
199
|
+
from factpulse_helpers import supplier
|
|
200
|
+
|
|
201
|
+
s = supplier(
|
|
202
|
+
name="My Company SAS",
|
|
203
|
+
siret="12345678901234",
|
|
204
|
+
address_line1="123 Example Street",
|
|
205
|
+
postal_code="75001",
|
|
206
|
+
city="Paris",
|
|
207
|
+
iban="FR7630006000011234567890189", # Optional
|
|
208
|
+
)
|
|
209
|
+
# SIREN and intra-EU VAT number calculated automatically
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### recipient(name, siret, address_line1, postal_code, city, ...)
|
|
213
|
+
|
|
214
|
+
Creates a recipient (customer) with automatic SIREN calculation.
|
|
215
|
+
|
|
216
|
+
```python
|
|
217
|
+
from factpulse_helpers import recipient
|
|
218
|
+
|
|
219
|
+
r = recipient(
|
|
220
|
+
name="Client SARL",
|
|
221
|
+
siret="98765432109876",
|
|
222
|
+
address_line1="456 Test Avenue",
|
|
223
|
+
postal_code="69001",
|
|
224
|
+
city="Lyon",
|
|
225
|
+
)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Zero-Trust Mode (Chorus Pro / AFNOR)
|
|
229
|
+
|
|
230
|
+
To pass your own credentials without server-side storage:
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
from factpulse_helpers import (
|
|
234
|
+
FactPulseClient,
|
|
235
|
+
ChorusProCredentials,
|
|
236
|
+
AFNORCredentials,
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
# Chorus Pro
|
|
240
|
+
chorus_creds = ChorusProCredentials(
|
|
241
|
+
piste_client_id="your_client_id",
|
|
242
|
+
piste_client_secret="your_client_secret",
|
|
243
|
+
chorus_pro_login="your_login",
|
|
244
|
+
chorus_pro_password="your_password",
|
|
245
|
+
sandbox=True,
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
# AFNOR PDP
|
|
249
|
+
afnor_creds = AFNORCredentials(
|
|
250
|
+
flow_service_url="https://api.pdp.fr/flow/v1",
|
|
251
|
+
token_url="https://auth.pdp.fr/oauth/token",
|
|
252
|
+
client_id="your_client_id",
|
|
253
|
+
client_secret="your_client_secret",
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
client = FactPulseClient(
|
|
257
|
+
email="your_email@example.com",
|
|
258
|
+
password="your_password",
|
|
259
|
+
chorus_credentials=chorus_creds,
|
|
260
|
+
afnor_credentials=afnor_creds,
|
|
261
|
+
)
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Resources
|
|
265
|
+
|
|
266
|
+
- **API Documentation**: https://factpulse.fr/api/facturation/documentation
|
|
267
|
+
- **Complete Example**: See `complete_example_python.py` in this package
|
|
268
|
+
- **Support**: contact@factpulse.fr
|
|
269
|
+
|
|
270
|
+
## License
|
|
271
|
+
|
|
272
|
+
MIT License - Copyright (c) 2025 FactPulse
|