factpulse 4.0.1 → 4.0.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -4
- data/Gemfile.lock +1 -1
- data/docs/AFNORPDPPAApi.md +5 -72
- data/docs/AsyncTasksApi.md +77 -0
- data/docs/ChorusProCredentials.md +8 -8
- data/docs/ChorusProDestination.md +1 -1
- data/docs/CreateAggregatedReportRequest.md +3 -1
- data/docs/CreateEReportingRequest.md +3 -1
- data/docs/ElectronicSignatureApi.md +319 -0
- data/docs/EncaisseeRequest.md +10 -6
- data/docs/{DocumentConversionApi.md → FacturXConversionApi.md} +39 -39
- data/docs/FacturXGenerationApi.md +239 -0
- data/docs/FacturXInvoice.md +1 -1
- data/docs/FacturXPDFXMLVerificationApi.md +225 -0
- data/docs/FacturXValidationApi.md +241 -0
- data/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +26 -0
- data/docs/{EReportingApi.md → Flux10EReportingApi.md} +53 -51
- data/docs/{CDARCycleDeVieApi.md → Flux6InvoiceLifecycleCDARApi.md} +145 -75
- data/docs/GetChorusProIdRequest.md +1 -1
- data/docs/GetInvoiceRequest.md +1 -1
- data/docs/GetStructureRequest.md +1 -1
- data/docs/HealthApi.md +67 -0
- data/docs/InvoiceInput.md +4 -2
- data/docs/IssuerRoleCode.md +15 -0
- data/docs/RefuseeRequest.md +10 -6
- data/docs/ReportIssuer.md +24 -0
- data/docs/ReportSender.md +1 -1
- data/docs/SearchStructureRequest.md +1 -1
- data/docs/SubmitInvoiceRequest.md +1 -1
- data/factpulse.gemspec +2 -2
- data/lib/factpulse/api/afnorpdppa_api.rb +5 -62
- data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +1 -1
- data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +1 -1
- data/lib/factpulse/api/async_tasks_api.rb +85 -0
- data/lib/factpulse/api/chorus_pro_api.rb +1 -1
- data/lib/factpulse/api/client_management_api.rb +1 -1
- data/lib/factpulse/api/downloads_api.rb +1 -1
- data/lib/factpulse/api/electronic_signature_api.rb +339 -0
- data/lib/factpulse/api/{document_conversion_api.rb → factur_x_conversion_api.rb} +42 -42
- data/lib/factpulse/api/factur_x_generation_api.rb +254 -0
- data/lib/factpulse/api/factur_x_validation_api.rb +256 -0
- data/lib/factpulse/api/factur_xpdfxml_verification_api.rb +232 -0
- data/lib/factpulse/api/{e_reporting_api.rb → flux10_e_reporting_api.rb} +54 -51
- data/lib/factpulse/api/flux6_invoice_lifecycle_cdar_api.rb +670 -0
- data/lib/factpulse/api/health_api.rb +58 -1
- data/lib/factpulse/api_client.rb +1 -1
- data/lib/factpulse/api_error.rb +1 -1
- data/lib/factpulse/api_model_base.rb +1 -1
- data/lib/factpulse/configuration.rb +1 -1
- data/lib/factpulse/models/acknowledgment_status.rb +1 -1
- data/lib/factpulse/models/action_code_info.rb +1 -1
- data/lib/factpulse/models/action_codes_response.rb +1 -1
- data/lib/factpulse/models/additional_document.rb +1 -1
- data/lib/factpulse/models/afnor_acknowledgement.rb +1 -1
- data/lib/factpulse/models/afnor_acknowledgement_detail.rb +1 -1
- data/lib/factpulse/models/afnor_address_edit.rb +1 -1
- data/lib/factpulse/models/afnor_address_patch.rb +1 -1
- data/lib/factpulse/models/afnor_address_put.rb +1 -1
- data/lib/factpulse/models/afnor_address_read.rb +1 -1
- data/lib/factpulse/models/afnor_algorithm.rb +1 -1
- data/lib/factpulse/models/afnor_contains_operator.rb +1 -1
- data/lib/factpulse/models/afnor_create_directory_line_body.rb +1 -1
- data/lib/factpulse/models/afnor_create_directory_line_body_addressing_information.rb +1 -1
- data/lib/factpulse/models/afnor_create_directory_line_body_period.rb +1 -1
- data/lib/factpulse/models/afnor_create_routing_code_body.rb +1 -1
- data/lib/factpulse/models/afnor_credentials.rb +1 -1
- data/lib/factpulse/models/afnor_destination.rb +1 -1
- data/lib/factpulse/models/afnor_diffusion_status.rb +1 -1
- data/lib/factpulse/models/afnor_directory_line_field.rb +1 -1
- data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code.rb +1 -1
- data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.rb +1 -1
- data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.rb +1 -1
- data/lib/factpulse/models/afnor_directory_line_post201_response.rb +1 -1
- data/lib/factpulse/models/afnor_directory_line_search_post200_response.rb +1 -1
- data/lib/factpulse/models/afnor_entity_type.rb +1 -1
- data/lib/factpulse/models/afnor_error.rb +1 -1
- data/lib/factpulse/models/afnor_facility_administrative_status.rb +1 -1
- data/lib/factpulse/models/afnor_facility_nature.rb +1 -1
- data/lib/factpulse/models/afnor_facility_payload_history.rb +1 -1
- data/lib/factpulse/models/afnor_facility_payload_history_ule_b2g_additional_data.rb +1 -1
- data/lib/factpulse/models/afnor_facility_payload_included.rb +1 -1
- data/lib/factpulse/models/afnor_facility_type.rb +1 -1
- data/lib/factpulse/models/afnor_flow.rb +1 -1
- data/lib/factpulse/models/afnor_flow_ack_status.rb +1 -1
- data/lib/factpulse/models/afnor_flow_direction.rb +1 -1
- data/lib/factpulse/models/afnor_flow_info.rb +1 -1
- data/lib/factpulse/models/afnor_flow_profile.rb +1 -1
- data/lib/factpulse/models/afnor_flow_syntax.rb +1 -1
- data/lib/factpulse/models/afnor_flow_type.rb +1 -1
- data/lib/factpulse/models/afnor_full_flow_info.rb +1 -1
- data/lib/factpulse/models/afnor_health_check_response.rb +1 -1
- data/lib/factpulse/models/afnor_legal_unit_administrative_status.rb +1 -1
- data/lib/factpulse/models/afnor_legal_unit_payload_history.rb +1 -1
- data/lib/factpulse/models/afnor_legal_unit_payload_included.rb +1 -1
- data/lib/factpulse/models/afnor_legal_unit_payload_included_no_siren.rb +1 -1
- data/lib/factpulse/models/afnor_platform_status.rb +1 -1
- data/lib/factpulse/models/afnor_processing_rule.rb +1 -1
- data/lib/factpulse/models/afnor_reason_code.rb +1 -1
- data/lib/factpulse/models/afnor_reason_code_enum.rb +1 -1
- data/lib/factpulse/models/afnor_recipient_platform_type.rb +1 -1
- data/lib/factpulse/models/afnor_result.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_administrative_status.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_field.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_payload_history_legal_unit_facility.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_post201_response.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_search.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_search_filters.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_search_filters_administrative_status.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_search_filters_routing_code_name.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_search_filters_routing_identifier.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_search_post200_response.rb +1 -1
- data/lib/factpulse/models/afnor_routing_code_search_sorting_inner.rb +1 -1
- data/lib/factpulse/models/afnor_search_directory_line.rb +1 -1
- data/lib/factpulse/models/afnor_search_directory_line_filters.rb +1 -1
- data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_identifier.rb +1 -1
- data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_suffix.rb +1 -1
- data/lib/factpulse/models/afnor_search_directory_line_sorting_inner.rb +1 -1
- data/lib/factpulse/models/afnor_search_flow_content.rb +1 -1
- data/lib/factpulse/models/afnor_search_flow_filters.rb +1 -1
- data/lib/factpulse/models/afnor_search_flow_params.rb +1 -1
- data/lib/factpulse/models/afnor_search_siren.rb +1 -1
- data/lib/factpulse/models/afnor_search_siren_filters.rb +1 -1
- data/lib/factpulse/models/afnor_search_siren_filters_administrative_status.rb +1 -1
- data/lib/factpulse/models/afnor_search_siren_filters_business_name.rb +1 -1
- data/lib/factpulse/models/afnor_search_siren_filters_entity_type.rb +1 -1
- data/lib/factpulse/models/afnor_search_siren_filters_siren.rb +1 -1
- data/lib/factpulse/models/afnor_search_siren_sorting_inner.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters_address_lines.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters_administrative_status.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters_country_subdivision.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters_facility_type.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters_locality.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters_name.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters_postal_code.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters_siret.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_sorting_inner.rb +1 -1
- data/lib/factpulse/models/afnor_siren_field.rb +1 -1
- data/lib/factpulse/models/afnor_siren_search_post200_response.rb +1 -1
- data/lib/factpulse/models/afnor_siret_field.rb +1 -1
- data/lib/factpulse/models/afnor_siret_search_post200_response.rb +1 -1
- data/lib/factpulse/models/afnor_sorting_order.rb +1 -1
- data/lib/factpulse/models/afnor_strict_operator.rb +1 -1
- data/lib/factpulse/models/afnor_update_patch_directory_line_body.rb +1 -1
- data/lib/factpulse/models/afnor_update_patch_routing_code_body.rb +1 -1
- data/lib/factpulse/models/afnor_update_put_routing_code_body.rb +1 -1
- data/lib/factpulse/models/afnor_webhook_callback_content.rb +1 -1
- data/lib/factpulse/models/aggregated_payment_input.rb +1 -1
- data/lib/factpulse/models/aggregated_transaction_input.rb +1 -1
- data/lib/factpulse/models/allowance_charge.rb +1 -1
- data/lib/factpulse/models/allowance_charge_reason_code.rb +1 -1
- data/lib/factpulse/models/allowance_reason_code.rb +1 -1
- data/lib/factpulse/models/allowance_total_amount.rb +1 -1
- data/lib/factpulse/models/amount.rb +1 -1
- data/lib/factpulse/models/amount1.rb +1 -1
- data/lib/factpulse/models/amount2.rb +1 -1
- data/lib/factpulse/models/amount_due.rb +1 -1
- data/lib/factpulse/models/api_error.rb +1 -1
- data/lib/factpulse/models/api_profile.rb +1 -1
- data/lib/factpulse/models/async_task_status.rb +1 -1
- data/lib/factpulse/models/base_amount.rb +1 -1
- data/lib/factpulse/models/bounding_box_schema.rb +1 -1
- data/lib/factpulse/models/buyercountry.rb +2 -2
- data/lib/factpulse/models/celery_status.rb +1 -1
- data/lib/factpulse/models/certificate_info_response.rb +1 -1
- data/lib/factpulse/models/charge_total_amount.rb +1 -1
- data/lib/factpulse/models/chorus_pro_credentials.rb +27 -95
- data/lib/factpulse/models/chorus_pro_destination.rb +2 -2
- data/lib/factpulse/models/chorus_pro_result.rb +1 -1
- data/lib/factpulse/models/client_activate_response.rb +1 -1
- data/lib/factpulse/models/client_create_request.rb +1 -1
- data/lib/factpulse/models/client_detail.rb +1 -1
- data/lib/factpulse/models/client_list_response.rb +1 -1
- data/lib/factpulse/models/client_summary.rb +1 -1
- data/lib/factpulse/models/client_update_request.rb +1 -1
- data/lib/factpulse/models/contact.rb +1 -1
- data/lib/factpulse/models/convert_resume_request.rb +1 -1
- data/lib/factpulse/models/convert_success_response.rb +1 -1
- data/lib/factpulse/models/convert_validation_failed_response.rb +1 -1
- data/lib/factpulse/models/country_code.rb +1 -1
- data/lib/factpulse/models/create_aggregated_report_request.rb +13 -3
- data/lib/factpulse/models/create_cdar_request.rb +1 -1
- data/lib/factpulse/models/create_e_reporting_request.rb +13 -3
- data/lib/factpulse/models/currency.rb +1 -1
- data/lib/factpulse/models/currency_code.rb +1 -1
- data/lib/factpulse/models/delivery_party.rb +1 -1
- data/lib/factpulse/models/destination.rb +1 -1
- data/lib/factpulse/models/doc_type.rb +1 -1
- data/lib/factpulse/models/document_type_info.rb +1 -1
- data/lib/factpulse/models/e_reporting_flow_type.rb +1 -1
- data/lib/factpulse/models/e_reporting_validation_error.rb +1 -1
- data/lib/factpulse/models/electronic_address.rb +1 -1
- data/lib/factpulse/models/encaisseamount.rb +1 -1
- data/lib/factpulse/models/encaisseamount1.rb +1 -1
- data/lib/factpulse/models/encaissee_request.rb +86 -32
- data/lib/factpulse/models/enriched_invoice_info.rb +1 -1
- data/lib/factpulse/models/error_level.rb +1 -1
- data/lib/factpulse/models/error_source.rb +3 -2
- data/lib/factpulse/models/extraction_info.rb +1 -1
- data/lib/factpulse/models/factur_x_invoice.rb +1 -18
- data/lib/factpulse/models/factur_xpdf_info.rb +1 -1
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_cdar_validation_error_response.rb +1 -1
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb +259 -0
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb +1 -1
- data/lib/factpulse/models/field_status.rb +1 -1
- data/lib/factpulse/models/file_info.rb +1 -1
- data/lib/factpulse/models/files_info.rb +1 -1
- data/lib/factpulse/models/flow_direction.rb +1 -1
- data/lib/factpulse/models/flow_profile.rb +1 -1
- data/lib/factpulse/models/flow_summary.rb +1 -1
- data/lib/factpulse/models/flow_syntax.rb +1 -1
- data/lib/factpulse/models/flow_type.rb +1 -1
- data/lib/factpulse/models/generate_aggregated_report_response.rb +1 -1
- data/lib/factpulse/models/generate_cdar_response.rb +1 -1
- data/lib/factpulse/models/generate_certificate_request.rb +1 -1
- data/lib/factpulse/models/generate_certificate_response.rb +1 -1
- data/lib/factpulse/models/generate_e_reporting_response.rb +1 -1
- data/lib/factpulse/models/get_chorus_pro_id_request.rb +2 -2
- data/lib/factpulse/models/get_chorus_pro_id_response.rb +1 -1
- data/lib/factpulse/models/get_invoice_request.rb +2 -2
- data/lib/factpulse/models/get_invoice_response.rb +1 -1
- data/lib/factpulse/models/get_structure_request.rb +2 -2
- data/lib/factpulse/models/get_structure_response.rb +1 -1
- data/lib/factpulse/models/global_allowance_amount.rb +1 -1
- data/lib/factpulse/models/gross_unit_price.rb +1 -1
- data/lib/factpulse/models/http_validation_error.rb +1 -1
- data/lib/factpulse/models/incoming_invoice.rb +1 -1
- data/lib/factpulse/models/incoming_supplier.rb +1 -1
- data/lib/factpulse/models/invoice_format.rb +1 -1
- data/lib/factpulse/models/invoice_input.rb +14 -21
- data/lib/factpulse/models/invoice_line.rb +1 -1
- data/lib/factpulse/models/invoice_line_allowance_amount.rb +1 -1
- data/lib/factpulse/models/invoice_note.rb +1 -1
- data/lib/factpulse/models/invoice_payment_input.rb +1 -1
- data/lib/factpulse/models/invoice_references.rb +1 -1
- data/lib/factpulse/models/invoice_status.rb +1 -1
- data/lib/factpulse/models/invoice_totals.rb +1 -1
- data/lib/factpulse/models/invoice_totals_prepayment.rb +1 -1
- data/lib/factpulse/models/invoice_type_code.rb +1 -1
- data/lib/factpulse/models/invoice_type_code_output.rb +1 -1
- data/lib/factpulse/models/invoicing_framework.rb +1 -1
- data/lib/factpulse/models/invoicing_framework_code.rb +1 -1
- data/lib/factpulse/models/issuer_role_code.rb +40 -0
- data/lib/factpulse/models/line_net_amount.rb +1 -1
- data/lib/factpulse/models/line_sub_type.rb +1 -1
- data/lib/factpulse/models/line_total_amount.rb +1 -1
- data/lib/factpulse/models/location_inner.rb +1 -1
- data/lib/factpulse/models/mandatory_note_schema.rb +1 -1
- data/lib/factpulse/models/manual_rate.rb +1 -1
- data/lib/factpulse/models/manual_vat_rate.rb +1 -1
- data/lib/factpulse/models/missing_field.rb +1 -1
- data/lib/factpulse/models/operation_nature.rb +1 -1
- data/lib/factpulse/models/output_format.rb +1 -1
- data/lib/factpulse/models/page_dimensions_schema.rb +1 -1
- data/lib/factpulse/models/payee.rb +1 -1
- data/lib/factpulse/models/payment_amount_by_rate.rb +1 -1
- data/lib/factpulse/models/payment_card.rb +1 -1
- data/lib/factpulse/models/payment_means.rb +1 -1
- data/lib/factpulse/models/pdf_validation_result_api.rb +1 -1
- data/lib/factpulse/models/pdp_config_response.rb +1 -1
- data/lib/factpulse/models/pdp_config_update_request.rb +1 -1
- data/lib/factpulse/models/pdp_credentials.rb +1 -1
- data/lib/factpulse/models/percentage.rb +1 -1
- data/lib/factpulse/models/postal_address.rb +1 -1
- data/lib/factpulse/models/price_allowance_amount.rb +1 -1
- data/lib/factpulse/models/price_basis_quantity.rb +1 -1
- data/lib/factpulse/models/processing_options.rb +1 -1
- data/lib/factpulse/models/processing_rule.rb +1 -1
- data/lib/factpulse/models/product_characteristic.rb +1 -1
- data/lib/factpulse/models/product_classification.rb +1 -1
- data/lib/factpulse/models/quantity.rb +1 -1
- data/lib/factpulse/models/rate.rb +1 -1
- data/lib/factpulse/models/rate1.rb +1 -1
- data/lib/factpulse/models/reason_code_info.rb +1 -1
- data/lib/factpulse/models/reason_codes_response.rb +1 -1
- data/lib/factpulse/models/recipient.rb +1 -1
- data/lib/factpulse/models/recipient_input.rb +1 -1
- data/lib/factpulse/models/refusee_request.rb +84 -30
- data/lib/factpulse/models/report_issuer.rb +236 -0
- data/lib/factpulse/models/report_period.rb +1 -1
- data/lib/factpulse/models/report_sender.rb +3 -3
- data/lib/factpulse/models/rounding_amount.rb +1 -1
- data/lib/factpulse/models/schematron_validation_error.rb +1 -1
- data/lib/factpulse/models/scheme_id.rb +1 -1
- data/lib/factpulse/models/search_flow_request.rb +1 -1
- data/lib/factpulse/models/search_flow_response.rb +1 -1
- data/lib/factpulse/models/search_services_response.rb +1 -1
- data/lib/factpulse/models/search_structure_request.rb +2 -2
- data/lib/factpulse/models/search_structure_response.rb +1 -1
- data/lib/factpulse/models/secret_status.rb +1 -1
- data/lib/factpulse/models/sellercountry.rb +2 -2
- data/lib/factpulse/models/signature_info.rb +1 -1
- data/lib/factpulse/models/signature_info_api.rb +1 -1
- data/lib/factpulse/models/signature_parameters.rb +1 -1
- data/lib/factpulse/models/simplified_cdar_response.rb +1 -1
- data/lib/factpulse/models/simplified_invoice_data.rb +1 -1
- data/lib/factpulse/models/status_code_info.rb +1 -1
- data/lib/factpulse/models/status_codes_response.rb +1 -1
- data/lib/factpulse/models/structure_info.rb +1 -1
- data/lib/factpulse/models/structure_parameters.rb +1 -1
- data/lib/factpulse/models/structure_service.rb +1 -1
- data/lib/factpulse/models/submission_mode.rb +1 -1
- data/lib/factpulse/models/submit_aggregated_report_request.rb +1 -1
- data/lib/factpulse/models/submit_cdar_request.rb +1 -1
- data/lib/factpulse/models/submit_cdar_response.rb +1 -1
- data/lib/factpulse/models/submit_cdarxml_request.rb +1 -1
- data/lib/factpulse/models/submit_complete_invoice_request.rb +1 -1
- data/lib/factpulse/models/submit_complete_invoice_response.rb +1 -1
- data/lib/factpulse/models/submit_e_reporting_request.rb +1 -1
- data/lib/factpulse/models/submit_e_reporting_response.rb +1 -1
- data/lib/factpulse/models/submit_flow_request.rb +1 -1
- data/lib/factpulse/models/submit_flow_response.rb +1 -1
- data/lib/factpulse/models/submit_gross_amount.rb +1 -1
- data/lib/factpulse/models/submit_invoice_request.rb +2 -2
- data/lib/factpulse/models/submit_invoice_response.rb +1 -1
- data/lib/factpulse/models/submit_net_amount.rb +1 -1
- data/lib/factpulse/models/submit_vat_amount.rb +1 -1
- data/lib/factpulse/models/supplementary_attachment.rb +1 -1
- data/lib/factpulse/models/supplier.rb +1 -1
- data/lib/factpulse/models/task_response.rb +1 -1
- data/lib/factpulse/models/tax_breakdown_input.rb +1 -1
- data/lib/factpulse/models/tax_due_date_type.rb +1 -1
- data/lib/factpulse/models/tax_representative.rb +1 -1
- data/lib/factpulse/models/taxable_amount.rb +1 -1
- data/lib/factpulse/models/taxableamount.rb +1 -1
- data/lib/factpulse/models/taxamount.rb +1 -1
- data/lib/factpulse/models/taxamount1.rb +1 -1
- data/lib/factpulse/models/taxamount2.rb +1 -1
- data/lib/factpulse/models/taxexclusiveamount.rb +1 -1
- data/lib/factpulse/models/taxexclusiveamount1.rb +1 -1
- data/lib/factpulse/models/total_gross_amount.rb +1 -1
- data/lib/factpulse/models/total_net_amount.rb +1 -1
- data/lib/factpulse/models/total_vat_amount.rb +1 -1
- data/lib/factpulse/models/transaction_category.rb +1 -1
- data/lib/factpulse/models/transmission_type_code.rb +1 -1
- data/lib/factpulse/models/unit_net_price.rb +1 -1
- data/lib/factpulse/models/unit_of_measure.rb +1 -1
- data/lib/factpulse/models/validate_cdar_request.rb +1 -1
- data/lib/factpulse/models/validate_cdar_response.rb +1 -1
- data/lib/factpulse/models/validate_e_reporting_request.rb +1 -1
- data/lib/factpulse/models/validate_e_reporting_response.rb +1 -1
- data/lib/factpulse/models/validation_error.rb +1 -1
- data/lib/factpulse/models/validation_error_detail.rb +1 -1
- data/lib/factpulse/models/validation_error_response.rb +1 -1
- data/lib/factpulse/models/validation_info.rb +1 -1
- data/lib/factpulse/models/validation_success_response.rb +1 -1
- data/lib/factpulse/models/vat_accounting_code.rb +1 -1
- data/lib/factpulse/models/vat_amount.rb +1 -1
- data/lib/factpulse/models/vat_category.rb +1 -1
- data/lib/factpulse/models/vat_line.rb +1 -1
- data/lib/factpulse/models/vat_point_date_code.rb +1 -1
- data/lib/factpulse/models/vat_rate.rb +1 -1
- data/lib/factpulse/models/verification_success_response.rb +1 -1
- data/lib/factpulse/models/verified_field_schema.rb +1 -1
- data/lib/factpulse/version.rb +2 -2
- data/lib/factpulse.rb +12 -8
- metadata +46 -37
- data/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +0 -26
- data/docs/InvoiceProcessingApi.md +0 -855
- data/docs/PDFXMLVerificationApi.md +0 -443
- data/docs/UserApi.md +0 -74
- data/lib/factpulse/api/cdar_cycle_de_vie_api.rb +0 -601
- data/lib/factpulse/api/invoice_processing_api.rb +0 -868
- data/lib/factpulse/api/pdfxml_verification_api.rb +0 -442
- data/lib/factpulse/api/user_api.rb +0 -79
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb +0 -191
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# FactPulse::
|
|
1
|
+
# FactPulse::FacturXConversionApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://factpulse.fr*
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**convert_document_async_api_v1_convert_async_post**](
|
|
8
|
-
| [**download_file_api_v1_convert_conversion_id_download_filename_get**](
|
|
9
|
-
| [**get_conversion_status_api_v1_convert_conversion_id_status_get**](
|
|
10
|
-
| [**resume_conversion_api_v1_convert_conversion_id_resume_post**](
|
|
7
|
+
| [**convert_document_async_api_v1_convert_async_post**](FacturXConversionApi.md#convert_document_async_api_v1_convert_async_post) | **POST** /api/v1/convert/async | Convert a document to Factur-X (async mode) |
|
|
8
|
+
| [**download_file_api_v1_convert_conversion_id_download_filename_get**](FacturXConversionApi.md#download_file_api_v1_convert_conversion_id_download_filename_get) | **GET** /api/v1/convert/{conversion_id}/download/{filename} | Download a generated file |
|
|
9
|
+
| [**get_conversion_status_api_v1_convert_conversion_id_status_get**](FacturXConversionApi.md#get_conversion_status_api_v1_convert_conversion_id_status_get) | **GET** /api/v1/convert/{conversion_id}/status | Check conversion status |
|
|
10
|
+
| [**resume_conversion_api_v1_convert_conversion_id_resume_post**](FacturXConversionApi.md#resume_conversion_api_v1_convert_conversion_id_resume_post) | **POST** /api/v1/convert/{conversion_id}/resume | Resume a conversion with corrections |
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## convert_document_async_api_v1_convert_async_post
|
|
14
14
|
|
|
15
15
|
> Object convert_document_async_api_v1_convert_async_post(file, opts)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Convert a document to Factur-X (async mode)
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Launch an asynchronous conversion via Celery. ## Workflow 1. **Upload**: Document is sent as multipart/form-data 2. **Celery Task**: Task is queued for processing 3. **Callback**: Webhook notification on completion ## Possible responses - **202**: Task accepted, processing - **400**: Invalid file
|
|
20
20
|
|
|
21
21
|
### Examples
|
|
22
22
|
|
|
@@ -29,20 +29,20 @@ FactPulse.configure do |config|
|
|
|
29
29
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
api_instance = FactPulse::
|
|
33
|
-
file = File.new('/path/to/some/file') # File | Document
|
|
32
|
+
api_instance = FactPulse::FacturXConversionApi.new
|
|
33
|
+
file = File.new('/path/to/some/file') # File | Document to convert (PDF, DOCX, XLSX, JPG, PNG)
|
|
34
34
|
opts = {
|
|
35
|
-
output: 'output_example', # String |
|
|
35
|
+
output: 'output_example', # String | Output format: pdf, xml, both
|
|
36
36
|
callback_url: 'callback_url_example', # String |
|
|
37
|
-
webhook_mode: 'webhook_mode_example' # String |
|
|
37
|
+
webhook_mode: 'webhook_mode_example' # String | Content delivery mode: 'inline' (base64 in webhook) or 'download_url' (temporary URL, 1h TTL)
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
begin
|
|
41
|
-
#
|
|
41
|
+
# Convert a document to Factur-X (async mode)
|
|
42
42
|
result = api_instance.convert_document_async_api_v1_convert_async_post(file, opts)
|
|
43
43
|
p result
|
|
44
44
|
rescue FactPulse::ApiError => e
|
|
45
|
-
puts "Error when calling
|
|
45
|
+
puts "Error when calling FacturXConversionApi->convert_document_async_api_v1_convert_async_post: #{e}"
|
|
46
46
|
end
|
|
47
47
|
```
|
|
48
48
|
|
|
@@ -54,13 +54,13 @@ This returns an Array which contains the response data, status code and headers.
|
|
|
54
54
|
|
|
55
55
|
```ruby
|
|
56
56
|
begin
|
|
57
|
-
#
|
|
57
|
+
# Convert a document to Factur-X (async mode)
|
|
58
58
|
data, status_code, headers = api_instance.convert_document_async_api_v1_convert_async_post_with_http_info(file, opts)
|
|
59
59
|
p status_code # => 2xx
|
|
60
60
|
p headers # => { ... }
|
|
61
61
|
p data # => Object
|
|
62
62
|
rescue FactPulse::ApiError => e
|
|
63
|
-
puts "Error when calling
|
|
63
|
+
puts "Error when calling FacturXConversionApi->convert_document_async_api_v1_convert_async_post_with_http_info: #{e}"
|
|
64
64
|
end
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -68,10 +68,10 @@ end
|
|
|
68
68
|
|
|
69
69
|
| Name | Type | Description | Notes |
|
|
70
70
|
| ---- | ---- | ----------- | ----- |
|
|
71
|
-
| **file** | **File** | Document
|
|
72
|
-
| **output** | **String** |
|
|
71
|
+
| **file** | **File** | Document to convert (PDF, DOCX, XLSX, JPG, PNG) | |
|
|
72
|
+
| **output** | **String** | Output format: pdf, xml, both | [optional][default to 'pdf'] |
|
|
73
73
|
| **callback_url** | **String** | | [optional] |
|
|
74
|
-
| **webhook_mode** | **String** |
|
|
74
|
+
| **webhook_mode** | **String** | Content delivery mode: 'inline' (base64 in webhook) or 'download_url' (temporary URL, 1h TTL) | [optional][default to 'inline'] |
|
|
75
75
|
|
|
76
76
|
### Return type
|
|
77
77
|
|
|
@@ -91,9 +91,9 @@ end
|
|
|
91
91
|
|
|
92
92
|
> Object download_file_api_v1_convert_conversion_id_download_filename_get(conversion_id, filename)
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
Download a generated file
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
Download the generated Factur-X PDF or XML file. ## Available files - `facturx.pdf`: PDF/A-3 with embedded XML - `facturx.xml`: XML CII only (Cross Industry Invoice) Files are available for 24 hours after generation.
|
|
97
97
|
|
|
98
98
|
### Examples
|
|
99
99
|
|
|
@@ -106,16 +106,16 @@ FactPulse.configure do |config|
|
|
|
106
106
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
api_instance = FactPulse::
|
|
109
|
+
api_instance = FactPulse::FacturXConversionApi.new
|
|
110
110
|
conversion_id = 'conversion_id_example' # String | Conversion ID returned by POST /convert (UUID format)
|
|
111
111
|
filename = 'filename_example' # String | File to download: 'facturx.pdf' or 'facturx.xml'
|
|
112
112
|
|
|
113
113
|
begin
|
|
114
|
-
#
|
|
114
|
+
# Download a generated file
|
|
115
115
|
result = api_instance.download_file_api_v1_convert_conversion_id_download_filename_get(conversion_id, filename)
|
|
116
116
|
p result
|
|
117
117
|
rescue FactPulse::ApiError => e
|
|
118
|
-
puts "Error when calling
|
|
118
|
+
puts "Error when calling FacturXConversionApi->download_file_api_v1_convert_conversion_id_download_filename_get: #{e}"
|
|
119
119
|
end
|
|
120
120
|
```
|
|
121
121
|
|
|
@@ -127,13 +127,13 @@ This returns an Array which contains the response data, status code and headers.
|
|
|
127
127
|
|
|
128
128
|
```ruby
|
|
129
129
|
begin
|
|
130
|
-
#
|
|
130
|
+
# Download a generated file
|
|
131
131
|
data, status_code, headers = api_instance.download_file_api_v1_convert_conversion_id_download_filename_get_with_http_info(conversion_id, filename)
|
|
132
132
|
p status_code # => 2xx
|
|
133
133
|
p headers # => { ... }
|
|
134
134
|
p data # => Object
|
|
135
135
|
rescue FactPulse::ApiError => e
|
|
136
|
-
puts "Error when calling
|
|
136
|
+
puts "Error when calling FacturXConversionApi->download_file_api_v1_convert_conversion_id_download_filename_get_with_http_info: #{e}"
|
|
137
137
|
end
|
|
138
138
|
```
|
|
139
139
|
|
|
@@ -162,9 +162,9 @@ end
|
|
|
162
162
|
|
|
163
163
|
> Hash<String, Object> get_conversion_status_api_v1_convert_conversion_id_status_get(conversion_id)
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
Check conversion status
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
Returns the current status of an asynchronous conversion.
|
|
168
168
|
|
|
169
169
|
### Examples
|
|
170
170
|
|
|
@@ -177,15 +177,15 @@ FactPulse.configure do |config|
|
|
|
177
177
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
178
178
|
end
|
|
179
179
|
|
|
180
|
-
api_instance = FactPulse::
|
|
180
|
+
api_instance = FactPulse::FacturXConversionApi.new
|
|
181
181
|
conversion_id = 'conversion_id_example' # String | Conversion ID returned by POST /convert (UUID format)
|
|
182
182
|
|
|
183
183
|
begin
|
|
184
|
-
#
|
|
184
|
+
# Check conversion status
|
|
185
185
|
result = api_instance.get_conversion_status_api_v1_convert_conversion_id_status_get(conversion_id)
|
|
186
186
|
p result
|
|
187
187
|
rescue FactPulse::ApiError => e
|
|
188
|
-
puts "Error when calling
|
|
188
|
+
puts "Error when calling FacturXConversionApi->get_conversion_status_api_v1_convert_conversion_id_status_get: #{e}"
|
|
189
189
|
end
|
|
190
190
|
```
|
|
191
191
|
|
|
@@ -197,13 +197,13 @@ This returns an Array which contains the response data, status code and headers.
|
|
|
197
197
|
|
|
198
198
|
```ruby
|
|
199
199
|
begin
|
|
200
|
-
#
|
|
200
|
+
# Check conversion status
|
|
201
201
|
data, status_code, headers = api_instance.get_conversion_status_api_v1_convert_conversion_id_status_get_with_http_info(conversion_id)
|
|
202
202
|
p status_code # => 2xx
|
|
203
203
|
p headers # => { ... }
|
|
204
204
|
p data # => Hash<String, Object>
|
|
205
205
|
rescue FactPulse::ApiError => e
|
|
206
|
-
puts "Error when calling
|
|
206
|
+
puts "Error when calling FacturXConversionApi->get_conversion_status_api_v1_convert_conversion_id_status_get_with_http_info: #{e}"
|
|
207
207
|
end
|
|
208
208
|
```
|
|
209
209
|
|
|
@@ -231,9 +231,9 @@ end
|
|
|
231
231
|
|
|
232
232
|
> <ConvertSuccessResponse> resume_conversion_api_v1_convert_conversion_id_resume_post(conversion_id, convert_resume_request)
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
Resume a conversion with corrections
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
Resume a conversion after completing missing data or correcting errors. The OCR extraction is preserved, data is updated with corrections, then a new Schematron validation is performed.
|
|
237
237
|
|
|
238
238
|
### Examples
|
|
239
239
|
|
|
@@ -246,16 +246,16 @@ FactPulse.configure do |config|
|
|
|
246
246
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
247
247
|
end
|
|
248
248
|
|
|
249
|
-
api_instance = FactPulse::
|
|
249
|
+
api_instance = FactPulse::FacturXConversionApi.new
|
|
250
250
|
conversion_id = 'conversion_id_example' # String | Conversion ID returned by POST /convert (UUID format)
|
|
251
251
|
convert_resume_request = FactPulse::ConvertResumeRequest.new # ConvertResumeRequest |
|
|
252
252
|
|
|
253
253
|
begin
|
|
254
|
-
#
|
|
254
|
+
# Resume a conversion with corrections
|
|
255
255
|
result = api_instance.resume_conversion_api_v1_convert_conversion_id_resume_post(conversion_id, convert_resume_request)
|
|
256
256
|
p result
|
|
257
257
|
rescue FactPulse::ApiError => e
|
|
258
|
-
puts "Error when calling
|
|
258
|
+
puts "Error when calling FacturXConversionApi->resume_conversion_api_v1_convert_conversion_id_resume_post: #{e}"
|
|
259
259
|
end
|
|
260
260
|
```
|
|
261
261
|
|
|
@@ -267,13 +267,13 @@ This returns an Array which contains the response data, status code and headers.
|
|
|
267
267
|
|
|
268
268
|
```ruby
|
|
269
269
|
begin
|
|
270
|
-
#
|
|
270
|
+
# Resume a conversion with corrections
|
|
271
271
|
data, status_code, headers = api_instance.resume_conversion_api_v1_convert_conversion_id_resume_post_with_http_info(conversion_id, convert_resume_request)
|
|
272
272
|
p status_code # => 2xx
|
|
273
273
|
p headers # => { ... }
|
|
274
274
|
p data # => <ConvertSuccessResponse>
|
|
275
275
|
rescue FactPulse::ApiError => e
|
|
276
|
-
puts "Error when calling
|
|
276
|
+
puts "Error when calling FacturXConversionApi->resume_conversion_api_v1_convert_conversion_id_resume_post_with_http_info: #{e}"
|
|
277
277
|
end
|
|
278
278
|
```
|
|
279
279
|
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# FactPulse::FacturXGenerationApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://factpulse.fr*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**generate_invoice_api_v1_processing_generate_invoice_post**](FacturXGenerationApi.md#generate_invoice_api_v1_processing_generate_invoice_post) | **POST** /api/v1/processing/generate-invoice | Generate a Factur-X invoice |
|
|
8
|
+
| [**submit_complete_invoice_api_v1_processing_invoices_submit_complete_post**](FacturXGenerationApi.md#submit_complete_invoice_api_v1_processing_invoices_submit_complete_post) | **POST** /api/v1/processing/invoices/submit-complete | Submit a complete invoice (generation + signature + submission) |
|
|
9
|
+
| [**submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post**](FacturXGenerationApi.md#submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post) | **POST** /api/v1/processing/invoices/submit-complete-async | Submit a complete invoice (asynchronous with Celery) |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## generate_invoice_api_v1_processing_generate_invoice_post
|
|
13
|
+
|
|
14
|
+
> <TaskResponse> generate_invoice_api_v1_processing_generate_invoice_post(invoice_data, opts)
|
|
15
|
+
|
|
16
|
+
Generate a Factur-X invoice
|
|
17
|
+
|
|
18
|
+
Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A supplier SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"number\": \"FACT-2025-001\", \"supplier\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"recipient\": {\"siret\": \"35600000000048\"}, \"lines\": [ {\"description\": \"Service\", \"quantity\": 10, \"unitPrice\": 100.00, \"vatRate\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `number`: Unique invoice number - `supplier.siret`: Supplier's SIRET (14 digits) - `supplier.iban`: Bank account IBAN (no public API to retrieve it) - `recipient.siret`: Recipient's SIRET - `lines[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format='pdf') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when the task completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `generation.completed` or `generation.failed` - `data.task_id`: The Celery task ID - `data.content_b64` or `data.xml_content`: The generated content - `X-Webhook-Signature` header for HMAC verification See `/docs/WEBHOOKS.md` for full documentation. ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
|
|
19
|
+
|
|
20
|
+
### Examples
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'time'
|
|
24
|
+
require 'factpulse'
|
|
25
|
+
# setup authorization
|
|
26
|
+
FactPulse.configure do |config|
|
|
27
|
+
# Configure Bearer authorization: HTTPBearer
|
|
28
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
api_instance = FactPulse::FacturXGenerationApi.new
|
|
32
|
+
invoice_data = 'invoice_data_example' # String | Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically!
|
|
33
|
+
opts = {
|
|
34
|
+
profile: FactPulse::APIProfile::MINIMUM, # APIProfile | Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
|
|
35
|
+
output_format: FactPulse::OutputFormat::XML, # OutputFormat | Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML).
|
|
36
|
+
auto_enrich: true, # Boolean | 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
|
|
37
|
+
source_pdf: File.new('/path/to/some/file'), # File |
|
|
38
|
+
callback_url: 'callback_url_example', # String |
|
|
39
|
+
webhook_mode: 'webhook_mode_example', # String | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
40
|
+
skip_br_fr: true # Boolean |
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
begin
|
|
44
|
+
# Generate a Factur-X invoice
|
|
45
|
+
result = api_instance.generate_invoice_api_v1_processing_generate_invoice_post(invoice_data, opts)
|
|
46
|
+
p result
|
|
47
|
+
rescue FactPulse::ApiError => e
|
|
48
|
+
puts "Error when calling FacturXGenerationApi->generate_invoice_api_v1_processing_generate_invoice_post: #{e}"
|
|
49
|
+
end
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### Using the generate_invoice_api_v1_processing_generate_invoice_post_with_http_info variant
|
|
53
|
+
|
|
54
|
+
This returns an Array which contains the response data, status code and headers.
|
|
55
|
+
|
|
56
|
+
> <Array(<TaskResponse>, Integer, Hash)> generate_invoice_api_v1_processing_generate_invoice_post_with_http_info(invoice_data, opts)
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
begin
|
|
60
|
+
# Generate a Factur-X invoice
|
|
61
|
+
data, status_code, headers = api_instance.generate_invoice_api_v1_processing_generate_invoice_post_with_http_info(invoice_data, opts)
|
|
62
|
+
p status_code # => 2xx
|
|
63
|
+
p headers # => { ... }
|
|
64
|
+
p data # => <TaskResponse>
|
|
65
|
+
rescue FactPulse::ApiError => e
|
|
66
|
+
puts "Error when calling FacturXGenerationApi->generate_invoice_api_v1_processing_generate_invoice_post_with_http_info: #{e}"
|
|
67
|
+
end
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Parameters
|
|
71
|
+
|
|
72
|
+
| Name | Type | Description | Notes |
|
|
73
|
+
| ---- | ---- | ----------- | ----- |
|
|
74
|
+
| **invoice_data** | **String** | Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically! | |
|
|
75
|
+
| **profile** | [**APIProfile**](APIProfile.md) | Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED. | [optional] |
|
|
76
|
+
| **output_format** | [**OutputFormat**](OutputFormat.md) | Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML). | [optional] |
|
|
77
|
+
| **auto_enrich** | **Boolean** | 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only) | [optional][default to true] |
|
|
78
|
+
| **source_pdf** | **File** | | [optional] |
|
|
79
|
+
| **callback_url** | **String** | | [optional] |
|
|
80
|
+
| **webhook_mode** | **String** | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL) | [optional][default to 'inline'] |
|
|
81
|
+
| **skip_br_fr** | **Boolean** | | [optional] |
|
|
82
|
+
|
|
83
|
+
### Return type
|
|
84
|
+
|
|
85
|
+
[**TaskResponse**](TaskResponse.md)
|
|
86
|
+
|
|
87
|
+
### Authorization
|
|
88
|
+
|
|
89
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
90
|
+
|
|
91
|
+
### HTTP request headers
|
|
92
|
+
|
|
93
|
+
- **Content-Type**: multipart/form-data
|
|
94
|
+
- **Accept**: application/json
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## submit_complete_invoice_api_v1_processing_invoices_submit_complete_post
|
|
98
|
+
|
|
99
|
+
> <SubmitCompleteInvoiceResponse> submit_complete_invoice_api_v1_processing_invoices_submit_complete_post(submit_complete_invoice_request)
|
|
100
|
+
|
|
101
|
+
Submit a complete invoice (generation + signature + submission)
|
|
102
|
+
|
|
103
|
+
Unified endpoint to submit a complete invoice to different destinations. **Facture prête pour Flux 2** - Génère une facture Factur-X complète avec signature optionnelle et soumission vers Chorus Pro ou PDP AFNOR. **Automated workflow:** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Destination credentials - 2 modes available:** **Mode 1 - Retrieval via JWT (recommended):** - Credentials are retrieved automatically via the JWT `client_uid` - Do not provide the `credentials` field in `destination` - Zero-trust architecture: no secrets in the payload - Example: `\"destination\": {\"type\": \"chorus_pro\"}` **Mode 2 - Credentials in the payload:** - Provide credentials directly in the payload - Useful for tests or third-party integrations - Example: `\"destination\": {\"type\": \"chorus_pro\", \"credentials\": {...}}` **Electronic signature (optional) - 2 modes available:** **Mode 1 - Stored certificate (recommended):** - Certificate is retrieved automatically via the JWT `client_uid` - No key to provide in the payload - PAdES-B-LT signature with timestamp (eIDAS compliant) - Example: `\"signature\": {\"reason\": \"Factur-X compliance\"}` **Mode 2 - Keys in the payload (for tests):** - Provide `key_pem` and `cert_pem` directly - PEM format accepted: raw or base64 - Useful for tests or special cases without stored certificate - Example: `\"signature\": {\"key_pem\": \"-----BEGIN...\", \"cert_pem\": \"-----BEGIN...\"}` If `key_pem` and `cert_pem` are provided → Mode 2 Otherwise → Mode 1 (certificate retrieved via `client_uid`)
|
|
104
|
+
|
|
105
|
+
### Examples
|
|
106
|
+
|
|
107
|
+
```ruby
|
|
108
|
+
require 'time'
|
|
109
|
+
require 'factpulse'
|
|
110
|
+
# setup authorization
|
|
111
|
+
FactPulse.configure do |config|
|
|
112
|
+
# Configure Bearer authorization: HTTPBearer
|
|
113
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
api_instance = FactPulse::FacturXGenerationApi.new
|
|
117
|
+
submit_complete_invoice_request = FactPulse::SubmitCompleteInvoiceRequest.new({invoice_data: FactPulse::SimplifiedInvoiceData.new({number: 'number_example', supplier: { key: 3.56}, recipient: { key: 3.56}, lines: [{ key: 3.56}]}), source_pdf: 'source_pdf_example', destination: FactPulse::AFNORDestination.new}) # SubmitCompleteInvoiceRequest |
|
|
118
|
+
|
|
119
|
+
begin
|
|
120
|
+
# Submit a complete invoice (generation + signature + submission)
|
|
121
|
+
result = api_instance.submit_complete_invoice_api_v1_processing_invoices_submit_complete_post(submit_complete_invoice_request)
|
|
122
|
+
p result
|
|
123
|
+
rescue FactPulse::ApiError => e
|
|
124
|
+
puts "Error when calling FacturXGenerationApi->submit_complete_invoice_api_v1_processing_invoices_submit_complete_post: #{e}"
|
|
125
|
+
end
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### Using the submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info variant
|
|
129
|
+
|
|
130
|
+
This returns an Array which contains the response data, status code and headers.
|
|
131
|
+
|
|
132
|
+
> <Array(<SubmitCompleteInvoiceResponse>, Integer, Hash)> submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request)
|
|
133
|
+
|
|
134
|
+
```ruby
|
|
135
|
+
begin
|
|
136
|
+
# Submit a complete invoice (generation + signature + submission)
|
|
137
|
+
data, status_code, headers = api_instance.submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request)
|
|
138
|
+
p status_code # => 2xx
|
|
139
|
+
p headers # => { ... }
|
|
140
|
+
p data # => <SubmitCompleteInvoiceResponse>
|
|
141
|
+
rescue FactPulse::ApiError => e
|
|
142
|
+
puts "Error when calling FacturXGenerationApi->submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info: #{e}"
|
|
143
|
+
end
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Parameters
|
|
147
|
+
|
|
148
|
+
| Name | Type | Description | Notes |
|
|
149
|
+
| ---- | ---- | ----------- | ----- |
|
|
150
|
+
| **submit_complete_invoice_request** | [**SubmitCompleteInvoiceRequest**](SubmitCompleteInvoiceRequest.md) | | |
|
|
151
|
+
|
|
152
|
+
### Return type
|
|
153
|
+
|
|
154
|
+
[**SubmitCompleteInvoiceResponse**](SubmitCompleteInvoiceResponse.md)
|
|
155
|
+
|
|
156
|
+
### Authorization
|
|
157
|
+
|
|
158
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
159
|
+
|
|
160
|
+
### HTTP request headers
|
|
161
|
+
|
|
162
|
+
- **Content-Type**: application/json
|
|
163
|
+
- **Accept**: application/json
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post
|
|
167
|
+
|
|
168
|
+
> <TaskResponse> submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post(submit_complete_invoice_request, opts)
|
|
169
|
+
|
|
170
|
+
Submit a complete invoice (asynchronous with Celery)
|
|
171
|
+
|
|
172
|
+
Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Facture prête pour Flux 2** - Génère une facture Factur-X complète de manière asynchrone. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Webhook notification (recommended):** Instead of polling, add `?callback_url=https://your-server.com/webhook` to receive automatic notification: - `event_type`: `submission.completed`, `submission.failed`, or `submission.partial` - `data.submission_result`: Complete submission result - `X-Webhook-Signature` header for HMAC verification **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
173
|
+
|
|
174
|
+
### Examples
|
|
175
|
+
|
|
176
|
+
```ruby
|
|
177
|
+
require 'time'
|
|
178
|
+
require 'factpulse'
|
|
179
|
+
# setup authorization
|
|
180
|
+
FactPulse.configure do |config|
|
|
181
|
+
# Configure Bearer authorization: HTTPBearer
|
|
182
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
api_instance = FactPulse::FacturXGenerationApi.new
|
|
186
|
+
submit_complete_invoice_request = FactPulse::SubmitCompleteInvoiceRequest.new({invoice_data: FactPulse::SimplifiedInvoiceData.new({number: 'number_example', supplier: { key: 3.56}, recipient: { key: 3.56}, lines: [{ key: 3.56}]}), source_pdf: 'source_pdf_example', destination: FactPulse::AFNORDestination.new}) # SubmitCompleteInvoiceRequest |
|
|
187
|
+
opts = {
|
|
188
|
+
callback_url: 'callback_url_example', # String | Webhook URL for async notification when submission completes.
|
|
189
|
+
webhook_mode: 'webhook_mode_example' # String | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
begin
|
|
193
|
+
# Submit a complete invoice (asynchronous with Celery)
|
|
194
|
+
result = api_instance.submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post(submit_complete_invoice_request, opts)
|
|
195
|
+
p result
|
|
196
|
+
rescue FactPulse::ApiError => e
|
|
197
|
+
puts "Error when calling FacturXGenerationApi->submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post: #{e}"
|
|
198
|
+
end
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
#### Using the submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info variant
|
|
202
|
+
|
|
203
|
+
This returns an Array which contains the response data, status code and headers.
|
|
204
|
+
|
|
205
|
+
> <Array(<TaskResponse>, Integer, Hash)> submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request, opts)
|
|
206
|
+
|
|
207
|
+
```ruby
|
|
208
|
+
begin
|
|
209
|
+
# Submit a complete invoice (asynchronous with Celery)
|
|
210
|
+
data, status_code, headers = api_instance.submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request, opts)
|
|
211
|
+
p status_code # => 2xx
|
|
212
|
+
p headers # => { ... }
|
|
213
|
+
p data # => <TaskResponse>
|
|
214
|
+
rescue FactPulse::ApiError => e
|
|
215
|
+
puts "Error when calling FacturXGenerationApi->submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info: #{e}"
|
|
216
|
+
end
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Parameters
|
|
220
|
+
|
|
221
|
+
| Name | Type | Description | Notes |
|
|
222
|
+
| ---- | ---- | ----------- | ----- |
|
|
223
|
+
| **submit_complete_invoice_request** | [**SubmitCompleteInvoiceRequest**](SubmitCompleteInvoiceRequest.md) | | |
|
|
224
|
+
| **callback_url** | **String** | Webhook URL for async notification when submission completes. | [optional] |
|
|
225
|
+
| **webhook_mode** | **String** | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL) | [optional][default to 'inline'] |
|
|
226
|
+
|
|
227
|
+
### Return type
|
|
228
|
+
|
|
229
|
+
[**TaskResponse**](TaskResponse.md)
|
|
230
|
+
|
|
231
|
+
### Authorization
|
|
232
|
+
|
|
233
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
234
|
+
|
|
235
|
+
### HTTP request headers
|
|
236
|
+
|
|
237
|
+
- **Content-Type**: application/json
|
|
238
|
+
- **Accept**: application/json
|
|
239
|
+
|
data/docs/FacturXInvoice.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **invoice_number** | **String** | | |
|
|
8
8
|
| **payment_due_date** | **String** | | |
|
|
9
9
|
| **invoice_date** | **String** | | [optional] |
|
|
10
|
-
| **submission_mode** | [**SubmissionMode**](SubmissionMode.md) | |
|
|
10
|
+
| **submission_mode** | [**SubmissionMode**](SubmissionMode.md) | | [optional] |
|
|
11
11
|
| **recipient** | [**Recipient**](Recipient.md) | | |
|
|
12
12
|
| **supplier** | [**Supplier**](Supplier.md) | | |
|
|
13
13
|
| **invoicing_framework** | [**InvoicingFramework**](InvoicingFramework.md) | | |
|