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
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# FactPulse::FacturXPDFXMLVerificationApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://factpulse.fr*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_verification_status_api_v1_verification_verify_async_task_id_status_get**](FacturXPDFXMLVerificationApi.md#get_verification_status_api_v1_verification_verify_async_task_id_status_get) | **GET** /api/v1/verification/verify-async/{task_id}/status | Get status of an asynchronous verification |
|
|
8
|
+
| [**verify_pdf_async_api_v1_verification_verify_async_post**](FacturXPDFXMLVerificationApi.md#verify_pdf_async_api_v1_verification_verify_async_post) | **POST** /api/v1/verification/verify-async | Verify PDF/XML Factur-X compliance (asynchronous) |
|
|
9
|
+
| [**verify_pdf_sync_api_v1_verification_verify_post**](FacturXPDFXMLVerificationApi.md#verify_pdf_sync_api_v1_verification_verify_post) | **POST** /api/v1/verification/verify | Verify PDF/XML Factur-X compliance (synchronous) |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## get_verification_status_api_v1_verification_verify_async_task_id_status_get
|
|
13
|
+
|
|
14
|
+
> <AsyncTaskStatus> get_verification_status_api_v1_verification_verify_async_task_id_status_get(task_id)
|
|
15
|
+
|
|
16
|
+
Get status of an asynchronous verification
|
|
17
|
+
|
|
18
|
+
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
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::FacturXPDFXMLVerificationApi.new
|
|
32
|
+
task_id = 'task_id_example' # String | Celery task ID returned by /verify-async endpoint
|
|
33
|
+
|
|
34
|
+
begin
|
|
35
|
+
# Get status of an asynchronous verification
|
|
36
|
+
result = api_instance.get_verification_status_api_v1_verification_verify_async_task_id_status_get(task_id)
|
|
37
|
+
p result
|
|
38
|
+
rescue FactPulse::ApiError => e
|
|
39
|
+
puts "Error when calling FacturXPDFXMLVerificationApi->get_verification_status_api_v1_verification_verify_async_task_id_status_get: #{e}"
|
|
40
|
+
end
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### Using the get_verification_status_api_v1_verification_verify_async_task_id_status_get_with_http_info variant
|
|
44
|
+
|
|
45
|
+
This returns an Array which contains the response data, status code and headers.
|
|
46
|
+
|
|
47
|
+
> <Array(<AsyncTaskStatus>, Integer, Hash)> get_verification_status_api_v1_verification_verify_async_task_id_status_get_with_http_info(task_id)
|
|
48
|
+
|
|
49
|
+
```ruby
|
|
50
|
+
begin
|
|
51
|
+
# Get status of an asynchronous verification
|
|
52
|
+
data, status_code, headers = api_instance.get_verification_status_api_v1_verification_verify_async_task_id_status_get_with_http_info(task_id)
|
|
53
|
+
p status_code # => 2xx
|
|
54
|
+
p headers # => { ... }
|
|
55
|
+
p data # => <AsyncTaskStatus>
|
|
56
|
+
rescue FactPulse::ApiError => e
|
|
57
|
+
puts "Error when calling FacturXPDFXMLVerificationApi->get_verification_status_api_v1_verification_verify_async_task_id_status_get_with_http_info: #{e}"
|
|
58
|
+
end
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Parameters
|
|
62
|
+
|
|
63
|
+
| Name | Type | Description | Notes |
|
|
64
|
+
| ---- | ---- | ----------- | ----- |
|
|
65
|
+
| **task_id** | **String** | Celery task ID returned by /verify-async endpoint | |
|
|
66
|
+
|
|
67
|
+
### Return type
|
|
68
|
+
|
|
69
|
+
[**AsyncTaskStatus**](AsyncTaskStatus.md)
|
|
70
|
+
|
|
71
|
+
### Authorization
|
|
72
|
+
|
|
73
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
74
|
+
|
|
75
|
+
### HTTP request headers
|
|
76
|
+
|
|
77
|
+
- **Content-Type**: Not defined
|
|
78
|
+
- **Accept**: application/json
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## verify_pdf_async_api_v1_verification_verify_async_post
|
|
82
|
+
|
|
83
|
+
> <TaskResponse> verify_pdf_async_api_v1_verification_verify_async_post(pdf_file, opts)
|
|
84
|
+
|
|
85
|
+
Verify PDF/XML Factur-X compliance (asynchronous)
|
|
86
|
+
|
|
87
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
88
|
+
|
|
89
|
+
### Examples
|
|
90
|
+
|
|
91
|
+
```ruby
|
|
92
|
+
require 'time'
|
|
93
|
+
require 'factpulse'
|
|
94
|
+
# setup authorization
|
|
95
|
+
FactPulse.configure do |config|
|
|
96
|
+
# Configure Bearer authorization: HTTPBearer
|
|
97
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
api_instance = FactPulse::FacturXPDFXMLVerificationApi.new
|
|
101
|
+
pdf_file = File.new('/path/to/some/file') # File | Factur-X PDF file to verify
|
|
102
|
+
opts = {
|
|
103
|
+
force_ocr: true, # Boolean | Force OCR usage even if PDF contains native text
|
|
104
|
+
callback_url: 'callback_url_example', # String |
|
|
105
|
+
webhook_mode: 'webhook_mode_example' # String | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
begin
|
|
109
|
+
# Verify PDF/XML Factur-X compliance (asynchronous)
|
|
110
|
+
result = api_instance.verify_pdf_async_api_v1_verification_verify_async_post(pdf_file, opts)
|
|
111
|
+
p result
|
|
112
|
+
rescue FactPulse::ApiError => e
|
|
113
|
+
puts "Error when calling FacturXPDFXMLVerificationApi->verify_pdf_async_api_v1_verification_verify_async_post: #{e}"
|
|
114
|
+
end
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### Using the verify_pdf_async_api_v1_verification_verify_async_post_with_http_info variant
|
|
118
|
+
|
|
119
|
+
This returns an Array which contains the response data, status code and headers.
|
|
120
|
+
|
|
121
|
+
> <Array(<TaskResponse>, Integer, Hash)> verify_pdf_async_api_v1_verification_verify_async_post_with_http_info(pdf_file, opts)
|
|
122
|
+
|
|
123
|
+
```ruby
|
|
124
|
+
begin
|
|
125
|
+
# Verify PDF/XML Factur-X compliance (asynchronous)
|
|
126
|
+
data, status_code, headers = api_instance.verify_pdf_async_api_v1_verification_verify_async_post_with_http_info(pdf_file, opts)
|
|
127
|
+
p status_code # => 2xx
|
|
128
|
+
p headers # => { ... }
|
|
129
|
+
p data # => <TaskResponse>
|
|
130
|
+
rescue FactPulse::ApiError => e
|
|
131
|
+
puts "Error when calling FacturXPDFXMLVerificationApi->verify_pdf_async_api_v1_verification_verify_async_post_with_http_info: #{e}"
|
|
132
|
+
end
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Parameters
|
|
136
|
+
|
|
137
|
+
| Name | Type | Description | Notes |
|
|
138
|
+
| ---- | ---- | ----------- | ----- |
|
|
139
|
+
| **pdf_file** | **File** | Factur-X PDF file to verify | |
|
|
140
|
+
| **force_ocr** | **Boolean** | Force OCR usage even if PDF contains native text | [optional][default to false] |
|
|
141
|
+
| **callback_url** | **String** | | [optional] |
|
|
142
|
+
| **webhook_mode** | **String** | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL) | [optional][default to 'inline'] |
|
|
143
|
+
|
|
144
|
+
### Return type
|
|
145
|
+
|
|
146
|
+
[**TaskResponse**](TaskResponse.md)
|
|
147
|
+
|
|
148
|
+
### Authorization
|
|
149
|
+
|
|
150
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
151
|
+
|
|
152
|
+
### HTTP request headers
|
|
153
|
+
|
|
154
|
+
- **Content-Type**: multipart/form-data
|
|
155
|
+
- **Accept**: application/json
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## verify_pdf_sync_api_v1_verification_verify_post
|
|
159
|
+
|
|
160
|
+
> <VerificationSuccessResponse> verify_pdf_sync_api_v1_verification_verify_post(pdf_file)
|
|
161
|
+
|
|
162
|
+
Verify PDF/XML Factur-X compliance (synchronous)
|
|
163
|
+
|
|
164
|
+
Verifies compliance between the PDF and its embedded Factur-X XML. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will be rejected with a 400 error. This synchronous version uses only native PDF extraction (pdfplumber). For image PDFs requiring OCR, use the `/verify-async` endpoint. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency
|
|
165
|
+
|
|
166
|
+
### Examples
|
|
167
|
+
|
|
168
|
+
```ruby
|
|
169
|
+
require 'time'
|
|
170
|
+
require 'factpulse'
|
|
171
|
+
# setup authorization
|
|
172
|
+
FactPulse.configure do |config|
|
|
173
|
+
# Configure Bearer authorization: HTTPBearer
|
|
174
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
api_instance = FactPulse::FacturXPDFXMLVerificationApi.new
|
|
178
|
+
pdf_file = File.new('/path/to/some/file') # File | Factur-X PDF file to verify
|
|
179
|
+
|
|
180
|
+
begin
|
|
181
|
+
# Verify PDF/XML Factur-X compliance (synchronous)
|
|
182
|
+
result = api_instance.verify_pdf_sync_api_v1_verification_verify_post(pdf_file)
|
|
183
|
+
p result
|
|
184
|
+
rescue FactPulse::ApiError => e
|
|
185
|
+
puts "Error when calling FacturXPDFXMLVerificationApi->verify_pdf_sync_api_v1_verification_verify_post: #{e}"
|
|
186
|
+
end
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
#### Using the verify_pdf_sync_api_v1_verification_verify_post_with_http_info variant
|
|
190
|
+
|
|
191
|
+
This returns an Array which contains the response data, status code and headers.
|
|
192
|
+
|
|
193
|
+
> <Array(<VerificationSuccessResponse>, Integer, Hash)> verify_pdf_sync_api_v1_verification_verify_post_with_http_info(pdf_file)
|
|
194
|
+
|
|
195
|
+
```ruby
|
|
196
|
+
begin
|
|
197
|
+
# Verify PDF/XML Factur-X compliance (synchronous)
|
|
198
|
+
data, status_code, headers = api_instance.verify_pdf_sync_api_v1_verification_verify_post_with_http_info(pdf_file)
|
|
199
|
+
p status_code # => 2xx
|
|
200
|
+
p headers # => { ... }
|
|
201
|
+
p data # => <VerificationSuccessResponse>
|
|
202
|
+
rescue FactPulse::ApiError => e
|
|
203
|
+
puts "Error when calling FacturXPDFXMLVerificationApi->verify_pdf_sync_api_v1_verification_verify_post_with_http_info: #{e}"
|
|
204
|
+
end
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Parameters
|
|
208
|
+
|
|
209
|
+
| Name | Type | Description | Notes |
|
|
210
|
+
| ---- | ---- | ----------- | ----- |
|
|
211
|
+
| **pdf_file** | **File** | Factur-X PDF file to verify | |
|
|
212
|
+
|
|
213
|
+
### Return type
|
|
214
|
+
|
|
215
|
+
[**VerificationSuccessResponse**](VerificationSuccessResponse.md)
|
|
216
|
+
|
|
217
|
+
### Authorization
|
|
218
|
+
|
|
219
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
220
|
+
|
|
221
|
+
### HTTP request headers
|
|
222
|
+
|
|
223
|
+
- **Content-Type**: multipart/form-data
|
|
224
|
+
- **Accept**: application/json
|
|
225
|
+
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# FactPulse::FacturXValidationApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://factpulse.fr*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post**](FacturXValidationApi.md#validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post) | **POST** /api/v1/processing/validate-facturx-pdf | Validate a complete Factur-X PDF |
|
|
8
|
+
| [**validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post**](FacturXValidationApi.md#validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post) | **POST** /api/v1/processing/validate-facturx-async | Validate a Factur-X PDF (asynchronous with polling) |
|
|
9
|
+
| [**validate_xml_api_v1_processing_validate_xml_post**](FacturXValidationApi.md#validate_xml_api_v1_processing_validate_xml_post) | **POST** /api/v1/processing/validate-xml | Validate an existing Factur-X XML |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post
|
|
13
|
+
|
|
14
|
+
> <PDFValidationResultAPI> validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post(pdf_file, opts)
|
|
15
|
+
|
|
16
|
+
Validate a complete Factur-X PDF
|
|
17
|
+
|
|
18
|
+
Validates a complete Factur-X PDF according to European and French standards. ## Applied validation standards - **EN 16931**: European semantic standard (directive 2014/55/EU) - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Factur-X / ZUGFeRD**: Franco-German specification - **Schematron**: XML business rules validation - **eIDAS**: European regulation on electronic identification (signatures) ## Checks performed ### 1. Factur-X XML extraction and validation **Checks performed:** - Presence of embedded XML file (`factur-x.xml` or `zugferd-invoice.xml`) - Automatic profile detection (MINIMUM, BASIC, EN16931, EXTENDED) - XML parsing with UTF-8 validation - GuidelineSpecifiedDocumentContextParameter/ID extraction **Schematron validation:** - Business rules for detected profile (MINIMUM: 45 rules, EN16931: 178 rules) - Cardinality of required elements - Calculation consistency (net, VAT, gross amounts, discounts) - Identifier formats (SIRET, intra-EU VAT, IBAN) - Standardized codes (ISO country codes, UN/ECE units, VAT codes) **What is verified:** - ✅ XML structure conforming to Cross Industry Invoice XSD - ✅ Correct UN/CEFACT namespace - ✅ European business rules (BR-xx) - ✅ French-specific rules (FR-xx) ### 2. PDF/A-3 compliance **Basic validation (metadata):** - Presence of `/Type` field set to `Catalog` - Metadata `pdfaid:part` = 3 (PDF/A-3) - Metadata `pdfaid:conformance` = B or U - PDF version >= 1.4 **Strict VeraPDF validation (if use_verapdf=True):** - 146+ ISO 19005-3 rules (PDF/A-3B) - Absence of forbidden content (JavaScript, multimedia, dynamic forms) - Correctly embedded fonts and subsets - Compliant color spaces (sRGB, DeviceGray) - Valid file structure (cross-reference table) - XMP metadata conforming to ISO 16684-1 **What is verified:** - ✅ Long-term archivable file (20+ years) - ✅ Guaranteed readability (embedded fonts) - ✅ Legal compliance (France, Germany, EU) ### 3. XMP metadata (eXtensible Metadata Platform) **Checks performed:** - Presence of `<?xpacket>` block with XMP metadata - `fx:` namespace for Factur-X: `urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#` - Required Factur-X fields: - `fx:ConformanceLevel`: Profile (MINIMUM, BASIC, EN16931, EXTENDED) - `fx:DocumentFileName`: Embedded XML name - `fx:DocumentType`: \"INVOICE\" - `fx:Version`: Factur-X version (1.0.07) **What is verified:** - ✅ Metadata conforming to ISO 16684-1 - ✅ Correct declared Factur-X profile - ✅ Supported Factur-X version ### 4. Electronic signatures **Detection and analysis:** - Presence of `/Sig` dictionaries in PDF - Signature type: PAdES (PDF Advanced Electronic Signature) - Information extraction: - Signer name (`/Name`) - Signing date (`/M`) - Signature reason (`/Reason`) - Signature location (`/Location`) - Signature type (approval, certification) **What is verified:** - ✅ Presence of signatures or seals - ✅ Number of signatures (single or multi-signature) - ℹ️ No cryptographic verification (requires certificates) ## Parameters - **pdf_file** (required): The Factur-X PDF file to validate - **profile** (optional): Expected profile. If absent, auto-detected from XML - **use_verapdf** (optional, default=false): Enable strict PDF/A validation with VeraPDF - `false`: Fast metadata validation (2-3 seconds) - `true`: Complete ISO 19005-3 validation (15-30 seconds, **recommended for production**) ## Detailed response ```json { \"isCompliant\": true, \"xml\": { \"present\": true, \"compliant\": true, \"profile\": \"EN16931\", \"errors\": [] }, \"pdfa\": { \"compliant\": true, \"version\": \"PDF/A-3B\", \"method\": \"verapdf\", \"errors\": [] }, \"xmp\": { \"present\": true, \"compliant\": true, \"metadata\": {...} }, \"signatures\": { \"present\": true, \"count\": 1, \"details\": [...] } } ``` ## Use cases - **Before sending**: Validate generated invoice before transmission to client - **On reception**: Verify compliance of invoice received from supplier - **Audit**: Check quality of invoice batches - **Legal compliance**: Ensure B2B/B2G obligations are met in France - **Debugging**: Identify issues in generation process - **Archiving**: Guarantee long-term validity (PDF/A-3) ## Processing time - Basic validation: 2-3 seconds - VeraPDF validation: 15-30 seconds (depends on PDF size)
|
|
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::FacturXValidationApi.new
|
|
32
|
+
pdf_file = File.new('/path/to/some/file') # File | Factur-X PDF file to validate (.pdf format).
|
|
33
|
+
opts = {
|
|
34
|
+
profile: FactPulse::APIProfile::MINIMUM, # APIProfile |
|
|
35
|
+
use_verapdf: true, # Boolean | Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.
|
|
36
|
+
skip_br_fr: true # Boolean |
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
begin
|
|
40
|
+
# Validate a complete Factur-X PDF
|
|
41
|
+
result = api_instance.validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post(pdf_file, opts)
|
|
42
|
+
p result
|
|
43
|
+
rescue FactPulse::ApiError => e
|
|
44
|
+
puts "Error when calling FacturXValidationApi->validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post: #{e}"
|
|
45
|
+
end
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Using the validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post_with_http_info variant
|
|
49
|
+
|
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
|
51
|
+
|
|
52
|
+
> <Array(<PDFValidationResultAPI>, Integer, Hash)> validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post_with_http_info(pdf_file, opts)
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
begin
|
|
56
|
+
# Validate a complete Factur-X PDF
|
|
57
|
+
data, status_code, headers = api_instance.validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post_with_http_info(pdf_file, opts)
|
|
58
|
+
p status_code # => 2xx
|
|
59
|
+
p headers # => { ... }
|
|
60
|
+
p data # => <PDFValidationResultAPI>
|
|
61
|
+
rescue FactPulse::ApiError => e
|
|
62
|
+
puts "Error when calling FacturXValidationApi->validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post_with_http_info: #{e}"
|
|
63
|
+
end
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Parameters
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description | Notes |
|
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
|
70
|
+
| **pdf_file** | **File** | Factur-X PDF file to validate (.pdf format). | |
|
|
71
|
+
| **profile** | [**APIProfile**](APIProfile.md) | | [optional] |
|
|
72
|
+
| **use_verapdf** | **Boolean** | Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation. | [optional][default to false] |
|
|
73
|
+
| **skip_br_fr** | **Boolean** | | [optional] |
|
|
74
|
+
|
|
75
|
+
### Return type
|
|
76
|
+
|
|
77
|
+
[**PDFValidationResultAPI**](PDFValidationResultAPI.md)
|
|
78
|
+
|
|
79
|
+
### Authorization
|
|
80
|
+
|
|
81
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
82
|
+
|
|
83
|
+
### HTTP request headers
|
|
84
|
+
|
|
85
|
+
- **Content-Type**: multipart/form-data
|
|
86
|
+
- **Accept**: application/json
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post
|
|
90
|
+
|
|
91
|
+
> <TaskResponse> validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post(pdf_file, opts)
|
|
92
|
+
|
|
93
|
+
Validate a Factur-X PDF (asynchronous with polling)
|
|
94
|
+
|
|
95
|
+
Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn't wait during validation ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when validation completes: ``` callback_url=https://your-server.com/webhook webhook_mode=download_url # Optional: get download URL instead of base64 ``` The webhook will POST a JSON payload with: - `event_type`: `validation.completed` or `validation.failed` - `data.is_compliant`: Whether the PDF is Factur-X compliant - `data.detected_profile`: The detected Factur-X profile - `X-Webhook-Signature` header for HMAC verification ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile's Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result['is_compliant']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status['result']['errorMessage']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
96
|
+
|
|
97
|
+
### Examples
|
|
98
|
+
|
|
99
|
+
```ruby
|
|
100
|
+
require 'time'
|
|
101
|
+
require 'factpulse'
|
|
102
|
+
# setup authorization
|
|
103
|
+
FactPulse.configure do |config|
|
|
104
|
+
# Configure Bearer authorization: HTTPBearer
|
|
105
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
api_instance = FactPulse::FacturXValidationApi.new
|
|
109
|
+
pdf_file = File.new('/path/to/some/file') # File | Factur-X PDF file to validate (.pdf format).
|
|
110
|
+
opts = {
|
|
111
|
+
profile: FactPulse::APIProfile::MINIMUM, # APIProfile |
|
|
112
|
+
use_verapdf: true, # Boolean | Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.
|
|
113
|
+
callback_url: 'callback_url_example', # String |
|
|
114
|
+
webhook_mode: 'webhook_mode_example' # String | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
begin
|
|
118
|
+
# Validate a Factur-X PDF (asynchronous with polling)
|
|
119
|
+
result = api_instance.validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post(pdf_file, opts)
|
|
120
|
+
p result
|
|
121
|
+
rescue FactPulse::ApiError => e
|
|
122
|
+
puts "Error when calling FacturXValidationApi->validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post: #{e}"
|
|
123
|
+
end
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
#### Using the validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post_with_http_info variant
|
|
127
|
+
|
|
128
|
+
This returns an Array which contains the response data, status code and headers.
|
|
129
|
+
|
|
130
|
+
> <Array(<TaskResponse>, Integer, Hash)> validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post_with_http_info(pdf_file, opts)
|
|
131
|
+
|
|
132
|
+
```ruby
|
|
133
|
+
begin
|
|
134
|
+
# Validate a Factur-X PDF (asynchronous with polling)
|
|
135
|
+
data, status_code, headers = api_instance.validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post_with_http_info(pdf_file, opts)
|
|
136
|
+
p status_code # => 2xx
|
|
137
|
+
p headers # => { ... }
|
|
138
|
+
p data # => <TaskResponse>
|
|
139
|
+
rescue FactPulse::ApiError => e
|
|
140
|
+
puts "Error when calling FacturXValidationApi->validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post_with_http_info: #{e}"
|
|
141
|
+
end
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Parameters
|
|
145
|
+
|
|
146
|
+
| Name | Type | Description | Notes |
|
|
147
|
+
| ---- | ---- | ----------- | ----- |
|
|
148
|
+
| **pdf_file** | **File** | Factur-X PDF file to validate (.pdf format). | |
|
|
149
|
+
| **profile** | [**APIProfile**](APIProfile.md) | | [optional] |
|
|
150
|
+
| **use_verapdf** | **Boolean** | Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds. | [optional][default to false] |
|
|
151
|
+
| **callback_url** | **String** | | [optional] |
|
|
152
|
+
| **webhook_mode** | **String** | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL) | [optional][default to 'inline'] |
|
|
153
|
+
|
|
154
|
+
### Return type
|
|
155
|
+
|
|
156
|
+
[**TaskResponse**](TaskResponse.md)
|
|
157
|
+
|
|
158
|
+
### Authorization
|
|
159
|
+
|
|
160
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
161
|
+
|
|
162
|
+
### HTTP request headers
|
|
163
|
+
|
|
164
|
+
- **Content-Type**: multipart/form-data
|
|
165
|
+
- **Accept**: application/json
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## validate_xml_api_v1_processing_validate_xml_post
|
|
169
|
+
|
|
170
|
+
> <ValidationSuccessResponse> validate_xml_api_v1_processing_validate_xml_post(xml_file, opts)
|
|
171
|
+
|
|
172
|
+
Validate an existing Factur-X XML
|
|
173
|
+
|
|
174
|
+
Validates a Factur-X XML file against Schematron business rules according to EN 16931 standard. ## Applied Standard **Schematron ISO/IEC 19757-3**: Business rules validation language for XML - Semantic validation (beyond XSD syntax) - European EN 16931 business rules - French-specific Factur-X rules - Arithmetic calculations and data consistency ## Profiles and validated rules ### MINIMUM (45 rules) - Unique invoice identifier - Dates (issue, due date) - Party identifiers (SIRET/SIREN) - Total gross amount ### BASIC (102 rules) - All MINIMUM rules - Detailed invoice lines - Basic VAT calculations - Payment methods - References (order, contract) ### EN16931 (178 rules) - All BASIC rules - **European rules (BR-xx)**: 81 business rules - **French rules (FR-xx)**: 12 France-specific rules - **Advanced calculations (CR-xx)**: 32 calculation rules - **Standardized codes (CL-xx)**: 52 code lists ### EXTENDED (210+ rules) - All EN16931 rules - Logistics information - Advanced accounting data - Multiple external references ## Checks performed ### 1. Syntax validation - Correct XML parsing (UTF-8, well-formed) - UN/CEFACT namespaces present - Hierarchical structure respected ### 2. Business rules (BR-xx) Examples: - `BR-1`: Invoice total must equal sum of line totals + document-level amounts - `BR-CO-10`: Sum of VAT base amounts must equal invoice net total - `BR-16`: Invoice currency code must be in ISO 4217 list ### 3. French rules (FR-xx) Examples: - `FR-1`: Supplier SIRET must have 14 digits - `FR-2`: Customer SIRET must have 14 digits (if present) - `FR-5`: Intra-EU VAT number must be in format FRxx999999999 ### 4. Calculation rules (CR-xx) - Net + VAT = Gross amounts - Sum of lines = Document total - Discounts and surcharges correctly applied - Compliant rounding (2 decimals for amounts) ### 5. Standardized codes (CL-xx) - ISO 3166-1 alpha-2 country codes - ISO 4217 currency codes - UN/ECE Rec 20 measurement units - VAT codes (types, categories, exemptions) - SchemeID for identifiers (0002=SIREN, 0009=SIRET, etc.) ## Validation process 1. **XSLT loading**: Schematron file converted to XSLT (Saxon-HE) 2. **Transformation**: Rules applied to XML 3. **Results analysis**: Extraction of errors (`failed-assert`) and warnings (`successful-report`) 4. **Report**: Structured list of non-conformities ## Responses **200 OK**: Compliant XML ```json { \"message\": \"XML is compliant with EN16931 profile\" } ``` **400 Bad Request**: Non-compliant XML ```json { \"detail\": [ \"[BR-1] Invoice total (120.00) does not match calculated sum (100.00 + 20.00)\", \"[FR-1] Supplier SIRET must contain exactly 14 digits\" ] } ``` ## Use cases - **Pre-validation**: Verify XML before PDF/A integration - **Debugging**: Precisely identify generation errors - **Testing**: Validate test or example XMLs - **Compliance**: Ensure European and French rules are met - **Development**: Quick testing without PDF generation ## Processing time - MINIMUM profile: ~0.5 second - EN16931 profile: ~1-2 seconds - EXTENDED profile: ~2-3 seconds
|
|
175
|
+
|
|
176
|
+
### Examples
|
|
177
|
+
|
|
178
|
+
```ruby
|
|
179
|
+
require 'time'
|
|
180
|
+
require 'factpulse'
|
|
181
|
+
# setup authorization
|
|
182
|
+
FactPulse.configure do |config|
|
|
183
|
+
# Configure Bearer authorization: HTTPBearer
|
|
184
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
api_instance = FactPulse::FacturXValidationApi.new
|
|
188
|
+
xml_file = File.new('/path/to/some/file') # File | Factur-X XML file to validate (.xml format).
|
|
189
|
+
opts = {
|
|
190
|
+
profile: FactPulse::APIProfile::MINIMUM, # APIProfile | Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).
|
|
191
|
+
skip_br_fr: true # Boolean |
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
begin
|
|
195
|
+
# Validate an existing Factur-X XML
|
|
196
|
+
result = api_instance.validate_xml_api_v1_processing_validate_xml_post(xml_file, opts)
|
|
197
|
+
p result
|
|
198
|
+
rescue FactPulse::ApiError => e
|
|
199
|
+
puts "Error when calling FacturXValidationApi->validate_xml_api_v1_processing_validate_xml_post: #{e}"
|
|
200
|
+
end
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
#### Using the validate_xml_api_v1_processing_validate_xml_post_with_http_info variant
|
|
204
|
+
|
|
205
|
+
This returns an Array which contains the response data, status code and headers.
|
|
206
|
+
|
|
207
|
+
> <Array(<ValidationSuccessResponse>, Integer, Hash)> validate_xml_api_v1_processing_validate_xml_post_with_http_info(xml_file, opts)
|
|
208
|
+
|
|
209
|
+
```ruby
|
|
210
|
+
begin
|
|
211
|
+
# Validate an existing Factur-X XML
|
|
212
|
+
data, status_code, headers = api_instance.validate_xml_api_v1_processing_validate_xml_post_with_http_info(xml_file, opts)
|
|
213
|
+
p status_code # => 2xx
|
|
214
|
+
p headers # => { ... }
|
|
215
|
+
p data # => <ValidationSuccessResponse>
|
|
216
|
+
rescue FactPulse::ApiError => e
|
|
217
|
+
puts "Error when calling FacturXValidationApi->validate_xml_api_v1_processing_validate_xml_post_with_http_info: #{e}"
|
|
218
|
+
end
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Parameters
|
|
222
|
+
|
|
223
|
+
| Name | Type | Description | Notes |
|
|
224
|
+
| ---- | ---- | ----------- | ----- |
|
|
225
|
+
| **xml_file** | **File** | Factur-X XML file to validate (.xml format). | |
|
|
226
|
+
| **profile** | [**APIProfile**](APIProfile.md) | Validation profile (MINIMUM, BASIC, EN16931, EXTENDED). | [optional] |
|
|
227
|
+
| **skip_br_fr** | **Boolean** | | [optional] |
|
|
228
|
+
|
|
229
|
+
### Return type
|
|
230
|
+
|
|
231
|
+
[**ValidationSuccessResponse**](ValidationSuccessResponse.md)
|
|
232
|
+
|
|
233
|
+
### Authorization
|
|
234
|
+
|
|
235
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
236
|
+
|
|
237
|
+
### HTTP request headers
|
|
238
|
+
|
|
239
|
+
- **Content-Type**: multipart/form-data
|
|
240
|
+
- **Accept**: application/json
|
|
241
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# FactPulse::FactureElectroniqueRestApiSchemasChorusProChorusProCredentials
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **piste_client_id** | **String** | PISTE Client ID (government API portal) | |
|
|
8
|
+
| **piste_client_secret** | **String** | PISTE Client Secret | |
|
|
9
|
+
| **chorus_pro_login** | **String** | Chorus Pro login | |
|
|
10
|
+
| **chorus_pro_password** | **String** | Chorus Pro password | |
|
|
11
|
+
| **sandbox** | **Boolean** | Use sandbox environment (true) or production (false) | [optional][default to true] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'factpulse'
|
|
17
|
+
|
|
18
|
+
instance = FactPulse::FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.new(
|
|
19
|
+
piste_client_id: null,
|
|
20
|
+
piste_client_secret: null,
|
|
21
|
+
chorus_pro_login: null,
|
|
22
|
+
chorus_pro_password: null,
|
|
23
|
+
sandbox: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|