factpulse 4.1.2 → 4.4.0
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 +9 -4
- data/Gemfile.lock +12 -10
- data/README.md +7 -1
- data/docs/AFNORContainsOrStartWithOperator.md +15 -0
- data/docs/{AFNORFacilityNature.md → AFNORContainsOrStrictOperator.md} +2 -2
- data/docs/AFNORContainsOrStrictOrStartWithOperator.md +15 -0
- data/docs/AFNORCoreFlowInfo.md +26 -0
- data/docs/{AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCode.md → AFNORDirectoryLinePayloadLegalUnitFacilityRoutingCode.md} +9 -5
- data/docs/AFNORDirectoryLinePayloadStatusLegalUnitFacilityRoutingCode.md +36 -0
- data/docs/AFNORDirectoryLineSearchPost200Response.md +2 -2
- data/docs/{AFNORContainsOperator.md → AFNORDirectoryLineStatus.md} +2 -2
- data/docs/AFNORError.md +4 -4
- data/docs/AFNORFacilityPayloadHistory.md +3 -3
- data/docs/AFNORFacilityPayloadIncluded.md +2 -2
- data/docs/AFNORFlow.md +18 -16
- data/docs/AFNORFlowExtension.md +26 -0
- data/docs/AFNORFlowInfo.md +3 -3
- data/docs/AFNORFlowInfoExtension.md +18 -0
- data/docs/AFNORFullFlowInfo.md +8 -8
- data/docs/AFNORFullFlowInfoExtension.md +20 -0
- data/docs/AFNORLegalUnitPayloadHistory.md +3 -1
- data/docs/AFNORLegalUnitPayloadIncluded.md +3 -1
- data/docs/AFNORPDPPADirectoryServiceApi.md +4 -648
- data/docs/AFNORPDPPAFlowServiceApi.md +190 -1
- data/docs/AFNORRoutingCodeSearch.md +3 -3
- data/docs/AFNORRoutingCodeSearchFiltersRoutingCodeName.md +1 -1
- data/docs/AFNORRoutingCodeSearchFiltersRoutingIdentifier.md +1 -1
- data/docs/AFNORRoutingCodeSearchPost200Response.md +1 -1
- data/docs/AFNORSearchDirectoryLine.md +5 -3
- data/docs/AFNORSearchDirectoryLineFiltersAddressingIdentifier.md +1 -1
- data/docs/AFNORSearchDirectoryLineFiltersAddressingSuffix.md +1 -1
- data/docs/AFNORSearchDirectoryLineSortingInner.md +2 -2
- data/docs/AFNORSearchFlowContent.md +3 -1
- data/docs/AFNORSearchFlowFilters.md +1 -1
- data/docs/AFNORSearchFlowParams.md +3 -1
- data/docs/AFNORSearchSiren.md +2 -2
- data/docs/AFNORSearchSirenFiltersBusinessName.md +1 -1
- data/docs/AFNORSearchSirenFiltersSiren.md +1 -1
- data/docs/AFNORSearchSirenSortingInner.md +2 -2
- data/docs/AFNORSearchSiret.md +3 -3
- data/docs/AFNORSearchSiretFiltersAddressLines.md +1 -1
- data/docs/AFNORSearchSiretFiltersCountrySubdivision.md +1 -1
- data/docs/AFNORSearchSiretFiltersFacilityType.md +1 -1
- data/docs/AFNORSearchSiretFiltersLocality.md +1 -1
- data/docs/AFNORSearchSiretFiltersName.md +1 -1
- data/docs/AFNORSearchSiretFiltersPostalCode.md +1 -1
- data/docs/AFNORSearchSiretFiltersSiret.md +1 -1
- data/docs/AFNORSearchSiretSortingInner.md +2 -2
- data/docs/AFNORSirenInstructions.md +18 -0
- data/docs/AFNORSirenSearchPost200Response.md +1 -1
- data/docs/AFNORSiretInstructions.md +18 -0
- data/docs/AFNORSiretSearchPost200Response.md +1 -1
- data/docs/{AFNORDiffusionStatus.md → AFNORStrictOrStartWithOperator.md} +2 -2
- data/docs/AFNORUniqueDirectoryLineStatus.md +15 -0
- data/docs/AFNORWebhook.md +30 -0
- data/docs/AFNORWebhookIdParam.md +22 -0
- data/docs/AFNORWebhookParams.md +24 -0
- data/docs/AllowanceCharge.md +1 -1
- data/docs/{AFNORAlgorithm.md → Amounteur.md} +2 -2
- data/docs/ClientManagementApi.md +231 -0
- data/docs/CreateCDARRequest.md +3 -1
- data/docs/DeliveryParty.md +2 -2
- data/docs/ElectronicAddressInput.md +20 -0
- data/docs/ElectronicAddressOutput.md +20 -0
- data/docs/EncaisseeRequest.md +3 -1
- data/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +24 -0
- data/docs/Flux10EReportingApi.md +18 -8
- data/docs/Flux6InvoiceLifecycleCDARApi.md +39 -19
- data/docs/IncomingSupplier.md +4 -2
- data/docs/InvoiceGenerationApi.md +14 -8
- data/docs/InvoiceInput.md +4 -0
- data/docs/Invoicedata.md +49 -0
- data/docs/LifecycleEvent.md +2 -0
- data/docs/Payee.md +2 -2
- data/docs/PaymentAmountByRate.md +4 -2
- data/docs/PostalAddressInput.md +30 -0
- data/docs/PostalAddressOutput.md +30 -0
- data/docs/ProcessingOptions.md +1 -1
- data/docs/Recipient.md +3 -3
- data/docs/ReportSender.md +2 -0
- data/docs/SimplifiedInvoiceData.md +2 -2
- data/docs/SubmitCDARRequest.md +2 -0
- data/docs/SubmitCompleteInvoiceRequest.md +1 -1
- data/docs/SuperPDPConnectURLResponse.md +18 -0
- data/docs/SuperPDPDisconnectResponse.md +20 -0
- data/docs/SuperPDPStatusResponse.md +26 -0
- data/docs/Supplier.md +5 -3
- data/docs/TaxBreakdownInput.md +7 -1
- data/docs/TaxRepresentative.md +1 -1
- data/docs/{AFNORPlatformStatus.md → Taxamounteur.md} +2 -2
- data/docs/ValidateCDARResponse.md +2 -2
- data/docs/ValidationErrorResponse.md +2 -8
- data/factpulse.gemspec +1 -1
- data/lib/factpulse/api/afnorpdppa_api.rb +1 -1
- data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +4 -622
- data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +178 -1
- data/lib/factpulse/api/async_tasks_api.rb +1 -1
- data/lib/factpulse/api/chorus_pro_api.rb +1 -1
- data/lib/factpulse/api/client_management_api.rb +196 -1
- data/lib/factpulse/api/downloads_api.rb +1 -1
- data/lib/factpulse/api/electronic_signature_api.rb +1 -1
- data/lib/factpulse/api/factur_x_conversion_api.rb +1 -1
- data/lib/factpulse/api/factur_x_validation_api.rb +1 -1
- data/lib/factpulse/api/factur_xpdfxml_verification_api.rb +1 -1
- data/lib/factpulse/api/flux10_e_reporting_api.rb +10 -1
- data/lib/factpulse/api/flux6_invoice_lifecycle_cdar_api.rb +25 -3
- data/lib/factpulse/api/health_api.rb +1 -1
- data/lib/factpulse/api/invoice_generation_api.rb +9 -3
- data/lib/factpulse/api/parse_api.rb +1 -1
- data/lib/factpulse/api/references_api.rb +1 -1
- data/lib/factpulse/api/validation_api.rb +1 -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/helpers/client.rb +42 -5
- 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_read.rb +1 -1
- data/lib/factpulse/models/{afnor_diffusion_status.rb → afnor_contains_or_start_with_operator.rb} +7 -7
- data/lib/factpulse/models/{afnor_contains_operator.rb → afnor_contains_or_strict_operator.rb} +6 -5
- data/lib/factpulse/models/afnor_contains_or_strict_or_start_with_operator.rb +41 -0
- data/lib/factpulse/models/{afnor_routing_code_post201_response.rb → afnor_core_flow_info.rb} +104 -62
- data/lib/factpulse/models/afnor_credentials.rb +1 -1
- data/lib/factpulse/models/afnor_destination.rb +1 -1
- data/lib/factpulse/models/afnor_directory_line_field.rb +2 -3
- 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_payload_history_legal_unit_facility_routing_code.rb → afnor_directory_line_payload_legal_unit_facility_routing_code.rb} +86 -15
- data/lib/factpulse/models/{afnor_create_directory_line_body_addressing_information.rb → afnor_directory_line_payload_status_legal_unit_facility_routing_code.rb} +106 -17
- data/lib/factpulse/models/afnor_directory_line_search_post200_response.rb +5 -3
- data/lib/factpulse/models/afnor_directory_line_status.rb +41 -0
- data/lib/factpulse/models/afnor_entity_type.rb +1 -1
- data/lib/factpulse/models/afnor_error.rb +31 -40
- data/lib/factpulse/models/afnor_error_detail.rb +1 -1
- data/lib/factpulse/models/afnor_facility_administrative_status.rb +1 -1
- data/lib/factpulse/models/afnor_facility_payload_history.rb +12 -12
- data/lib/factpulse/models/afnor_facility_payload_history_ule_b2g_additional_data.rb +1 -1
- data/lib/factpulse/models/afnor_facility_payload_included.rb +11 -11
- data/lib/factpulse/models/afnor_facility_type.rb +1 -1
- data/lib/factpulse/models/afnor_flow.rb +257 -62
- 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_update_patch_routing_code_body.rb → afnor_flow_extension.rb} +104 -67
- data/lib/factpulse/models/afnor_flow_info.rb +26 -10
- data/lib/factpulse/models/{afnor_create_directory_line_body_period.rb → afnor_flow_info_extension.rb} +27 -32
- data/lib/factpulse/models/afnor_flow_profile.rb +3 -2
- data/lib/factpulse/models/afnor_flow_syntax.rb +1 -1
- data/lib/factpulse/models/afnor_flow_type.rb +9 -3
- data/lib/factpulse/models/afnor_full_flow_info.rb +85 -52
- data/lib/factpulse/models/afnor_full_flow_info_extension.rb +202 -0
- 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 +14 -5
- data/lib/factpulse/models/afnor_legal_unit_payload_included.rb +14 -5
- data/lib/factpulse/models/afnor_processing_rule.rb +6 -2
- 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 +2 -3
- data/lib/factpulse/models/afnor_routing_code_payload_history_legal_unit_facility.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 +2 -2
- data/lib/factpulse/models/afnor_routing_code_search_filters_routing_identifier.rb +2 -2
- data/lib/factpulse/models/afnor_routing_code_search_post200_response.rb +4 -2
- data/lib/factpulse/models/afnor_routing_code_search_sorting_inner.rb +1 -1
- data/lib/factpulse/models/afnor_search_directory_line.rb +35 -2
- data/lib/factpulse/models/afnor_search_directory_line_filters.rb +1 -1
- data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_identifier.rb +2 -2
- data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_suffix.rb +2 -2
- data/lib/factpulse/models/afnor_search_directory_line_sorting_inner.rb +8 -8
- data/lib/factpulse/models/afnor_search_flow_content.rb +34 -2
- data/lib/factpulse/models/afnor_search_flow_filters.rb +7 -6
- data/lib/factpulse/models/afnor_search_flow_params.rb +13 -3
- 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 +2 -2
- data/lib/factpulse/models/afnor_search_siren_filters_entity_type.rb +1 -1
- data/lib/factpulse/models/afnor_search_siren_filters_siren.rb +2 -2
- data/lib/factpulse/models/afnor_search_siren_sorting_inner.rb +8 -8
- 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 +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters_administrative_status.rb +1 -1
- data/lib/factpulse/models/afnor_search_siret_filters_country_subdivision.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters_facility_type.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters_locality.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters_name.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters_postal_code.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters_siret.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_sorting_inner.rb +8 -8
- data/lib/factpulse/models/afnor_siren_field.rb +3 -3
- data/lib/factpulse/models/{afnor_update_patch_directory_line_body.rb → afnor_siren_instructions.rb} +13 -12
- data/lib/factpulse/models/afnor_siren_search_post200_response.rb +4 -2
- data/lib/factpulse/models/afnor_siret_field.rb +4 -5
- data/lib/factpulse/models/{afnor_webhook_callback_content.rb → afnor_siret_instructions.rb} +13 -12
- data/lib/factpulse/models/afnor_siret_search_post200_response.rb +4 -2
- 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_facility_nature.rb → afnor_strict_or_start_with_operator.rb} +7 -7
- data/lib/factpulse/models/{afnor_platform_status.rb → afnor_unique_directory_line_status.rb} +4 -4
- data/lib/factpulse/models/afnor_webhook.rb +250 -0
- data/lib/factpulse/models/{afnor_create_directory_line_body.rb → afnor_webhook_id_param.rb} +26 -17
- data/lib/factpulse/models/{afnor_legal_unit_payload_included_no_siren.rb → afnor_webhook_params.rb} +44 -36
- 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 +2 -2
- 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 +2 -2
- data/lib/factpulse/models/amount1.rb +2 -2
- data/lib/factpulse/models/amount2.rb +2 -2
- data/lib/factpulse/models/amount_due.rb +1 -1
- data/lib/factpulse/models/amounteur.rb +104 -0
- 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 +1 -1
- 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 +1 -1
- data/lib/factpulse/models/chorus_pro_destination.rb +1 -1
- 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/conversion_error_result.rb +1 -1
- data/lib/factpulse/models/conversion_extraction_info.rb +1 -1
- data/lib/factpulse/models/conversion_pending_input_result.rb +1 -1
- data/lib/factpulse/models/conversion_success_task_result.rb +1 -1
- data/lib/factpulse/models/conversion_task_status.rb +1 -1
- data/lib/factpulse/models/conversion_task_status_result.rb +1 -1
- data/lib/factpulse/models/conversion_validation_failed_result.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 +1 -1
- data/lib/factpulse/models/create_cdar_request.rb +18 -6
- data/lib/factpulse/models/create_e_reporting_request.rb +1 -1
- data/lib/factpulse/models/currency.rb +1 -1
- data/lib/factpulse/models/currency_code.rb +1 -1
- data/lib/factpulse/models/delivery_party.rb +3 -3
- 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 +2 -2
- data/lib/factpulse/models/{afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.rb → electronic_address_input.rb} +37 -17
- data/lib/factpulse/models/electronic_address_output.rb +198 -0
- data/lib/factpulse/models/encaisseamount.rb +1 -1
- data/lib/factpulse/models/encaisseamount1.rb +1 -1
- data/lib/factpulse/models/encaissee_request.rb +15 -3
- 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 +1 -1
- data/lib/factpulse/models/extraction_info.rb +1 -1
- data/lib/factpulse/models/factur_x_invoice.rb +1 -1
- data/lib/factpulse/models/factur_xpdf_info.rb +1 -1
- data/lib/factpulse/models/facture_electronique_models_invoice_type_code.rb +1 -1
- data/lib/factpulse/models/{afnor_directory_line_post201_response.rb → facture_electronique_rest_api_schemas_cdar_validation_error_response.rb} +64 -36
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.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 +3 -2
- 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 +9 -3
- 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/generation_success_result.rb +1 -1
- data/lib/factpulse/models/generation_task_status.rb +1 -1
- data/lib/factpulse/models/generation_task_status_result.rb +1 -1
- data/lib/factpulse/models/get_chorus_pro_id_request.rb +1 -1
- data/lib/factpulse/models/get_chorus_pro_id_response.rb +1 -1
- data/lib/factpulse/models/get_invoice_request.rb +1 -1
- data/lib/factpulse/models/get_invoice_response.rb +1 -1
- data/lib/factpulse/models/get_structure_request.rb +1 -1
- 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 +14 -4
- data/lib/factpulse/models/invoice_format.rb +1 -1
- data/lib/factpulse/models/invoice_input.rb +22 -2
- data/lib/factpulse/models/invoice_lifecycle.rb +1 -1
- 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/invoicedata.rb +105 -0
- 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 +1 -1
- data/lib/factpulse/models/key_rotation_request.rb +1 -1
- data/lib/factpulse/models/key_rotation_response.rb +1 -1
- data/lib/factpulse/models/lifecycle_event.rb +12 -2
- data/lib/factpulse/models/lifecycle_response.rb +1 -1
- 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/parse_factur_x_response.rb +1 -1
- data/lib/factpulse/models/payee.rb +3 -3
- data/lib/factpulse/models/payment_amount_by_rate.rb +15 -5
- 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 +7 -7
- data/lib/factpulse/models/postal_address_input.rb +209 -0
- data/lib/factpulse/models/postal_address_output.rb +209 -0
- 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 +2 -2
- data/lib/factpulse/models/processing_rule.rb +6 -2
- 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 +4 -4
- data/lib/factpulse/models/recipient_input.rb +1 -1
- data/lib/factpulse/models/refusee_request.rb +1 -1
- data/lib/factpulse/models/report_issuer.rb +1 -1
- data/lib/factpulse/models/report_period.rb +1 -1
- data/lib/factpulse/models/report_sender.rb +12 -2
- 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 +1 -1
- 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 +1 -1
- 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/signature_success_result.rb +1 -1
- data/lib/factpulse/models/signature_task_status.rb +1 -1
- data/lib/factpulse/models/signature_task_status_result.rb +1 -1
- data/lib/factpulse/models/simplified_cdar_response.rb +1 -1
- data/lib/factpulse/models/simplified_invoice_data.rb +4 -4
- 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 +14 -2
- 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 +2 -3
- 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 +1 -1
- 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/{facture_electronique_rest_api_schemas_validation_validation_error_response.rb → super_pdp_connect_url_response.rb} +22 -24
- data/lib/factpulse/models/super_pdp_disconnect_response.rb +193 -0
- data/lib/factpulse/models/super_pdp_status_response.rb +208 -0
- data/lib/factpulse/models/supplementary_attachment.rb +1 -1
- data/lib/factpulse/models/supplier.rb +15 -5
- data/lib/factpulse/models/task_error_result.rb +1 -1
- data/lib/factpulse/models/task_response.rb +1 -1
- data/lib/factpulse/models/tax_breakdown_input.rb +35 -5
- data/lib/factpulse/models/tax_due_date_type.rb +1 -1
- data/lib/factpulse/models/tax_representative.rb +2 -2
- 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/{afnor_algorithm.rb → taxamounteur.rb} +84 -23
- 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 +3 -3
- 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 +21 -68
- data/lib/factpulse/models/validation_info.rb +1 -1
- data/lib/factpulse/models/validation_success_response.rb +1 -1
- data/lib/factpulse/models/validation_success_task_result.rb +1 -1
- data/lib/factpulse/models/validation_task_status.rb +1 -1
- data/lib/factpulse/models/validation_task_status_result.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/vatex_code_info.rb +1 -1
- data/lib/factpulse/models/vatex_codes_response.rb +1 -1
- data/lib/factpulse/models/verification_success_response.rb +1 -1
- data/lib/factpulse/models/verification_success_task_result.rb +1 -1
- data/lib/factpulse/models/verification_typed_task_status.rb +1 -1
- data/lib/factpulse/models/verification_typed_task_status_result.rb +1 -1
- data/lib/factpulse/models/verified_field_schema.rb +1 -1
- data/lib/factpulse/models/webhook_secret_delete_response.rb +1 -1
- data/lib/factpulse/models/webhook_secret_generate_response.rb +1 -1
- data/lib/factpulse/models/webhook_secret_status_response.rb +1 -1
- data/lib/factpulse/version.rb +2 -2
- data/lib/factpulse.rb +29 -23
- metadata +58 -46
- data/docs/AFNORAddressEdit.md +0 -30
- data/docs/AFNORAddressPatch.md +0 -30
- data/docs/AFNORAddressPut.md +0 -30
- data/docs/AFNORCreateDirectoryLineBody.md +0 -20
- data/docs/AFNORCreateDirectoryLineBodyAddressingInformation.md +0 -24
- data/docs/AFNORCreateDirectoryLineBodyPeriod.md +0 -20
- data/docs/AFNORCreateRoutingCodeBody.md +0 -32
- data/docs/AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCodePlatform.md +0 -20
- data/docs/AFNORDirectoryLinePost201Response.md +0 -22
- data/docs/AFNORLegalUnitPayloadIncludedNoSiren.md +0 -22
- data/docs/AFNORRoutingCodePost201Response.md +0 -22
- data/docs/AFNORUpdatePatchDirectoryLineBody.md +0 -18
- data/docs/AFNORUpdatePatchRoutingCodeBody.md +0 -24
- data/docs/AFNORUpdatePutRoutingCodeBody.md +0 -24
- data/docs/AFNORWebhookCallbackContent.md +0 -18
- data/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +0 -18
- data/lib/factpulse/models/afnor_address_edit.rb +0 -353
- data/lib/factpulse/models/afnor_address_patch.rb +0 -386
- data/lib/factpulse/models/afnor_address_put.rb +0 -435
- data/lib/factpulse/models/afnor_create_routing_code_body.rb +0 -412
- data/lib/factpulse/models/afnor_update_put_routing_code_body.rb +0 -289
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: contact@factpulse.fr
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.21.0
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -145,14 +145,16 @@ module FactPulse
|
|
|
145
145
|
end
|
|
146
146
|
|
|
147
147
|
# [Simplified] Get lifecycle events for invoices
|
|
148
|
-
# Returns lifecycle events (CDAR) grouped by invoice reference. **How it works (AFNOR XP Z12-013 compliant):** 1. Searches lifecycle flows on the PDP by flowType + flowDirection + date range 2. Downloads and parses each CDAR XML to extract the invoice reference 3. Groups events by invoice, sorted chronologically **Parameters:** - `days`: Number of days to look back (default: 7) - `invoiceId`: Optional filter on a specific invoice reference **Authentication:** JWT Bearer (recommended) or PDP credentials as query parameters.
|
|
148
|
+
# Returns lifecycle events (CDAR) grouped by invoice reference. **How it works (AFNOR XP Z12-013 compliant):** 1. Searches lifecycle flows on the PDP by flowType + flowDirection + date range 2. Downloads and parses each CDAR XML to extract the invoice reference 3. Groups events by invoice, sorted chronologically **Parameters:** - `days`: Number of days to look back (default: 7) - `invoiceId`: Optional filter on a specific invoice reference - `flowDirection`: `All` (default), `In` (statuses received from the counterparty) or `Out` (statuses issued by you or your PA, e.g. 202/203) **Authentication:** JWT Bearer (recommended) or PDP credentials as query parameters.
|
|
149
149
|
# @param [Hash] opts the optional parameters
|
|
150
150
|
# @option opts [Integer] :days Number of days to look back (default to 7)
|
|
151
151
|
# @option opts [String] :invoice_id Filter by invoice reference
|
|
152
|
+
# @option opts [String] :flow_direction All (default), In (received statuses) or Out (issued statuses) (default to 'All')
|
|
152
153
|
# @option opts [String] :pdp_flow_service_url PDP Flow Service URL
|
|
153
154
|
# @option opts [String] :pdp_token_url PDP OAuth token URL
|
|
154
155
|
# @option opts [String] :pdp_client_id PDP Client ID
|
|
155
156
|
# @option opts [String] :pdp_client_secret PDP Client Secret
|
|
157
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
156
158
|
# @return [LifecycleResponse]
|
|
157
159
|
def get_lifecycle_api_v1_cdar_lifecycle_get(opts = {})
|
|
158
160
|
data, _status_code, _headers = get_lifecycle_api_v1_cdar_lifecycle_get_with_http_info(opts)
|
|
@@ -160,14 +162,16 @@ module FactPulse
|
|
|
160
162
|
end
|
|
161
163
|
|
|
162
164
|
# [Simplified] Get lifecycle events for invoices
|
|
163
|
-
# Returns lifecycle events (CDAR) grouped by invoice reference. **How it works (AFNOR XP Z12-013 compliant):** 1. Searches lifecycle flows on the PDP by flowType + flowDirection + date range 2. Downloads and parses each CDAR XML to extract the invoice reference 3. Groups events by invoice, sorted chronologically **Parameters:** - `days`: Number of days to look back (default: 7) - `invoiceId`: Optional filter on a specific invoice reference **Authentication:** JWT Bearer (recommended) or PDP credentials as query parameters.
|
|
165
|
+
# Returns lifecycle events (CDAR) grouped by invoice reference. **How it works (AFNOR XP Z12-013 compliant):** 1. Searches lifecycle flows on the PDP by flowType + flowDirection + date range 2. Downloads and parses each CDAR XML to extract the invoice reference 3. Groups events by invoice, sorted chronologically **Parameters:** - `days`: Number of days to look back (default: 7) - `invoiceId`: Optional filter on a specific invoice reference - `flowDirection`: `All` (default), `In` (statuses received from the counterparty) or `Out` (statuses issued by you or your PA, e.g. 202/203) **Authentication:** JWT Bearer (recommended) or PDP credentials as query parameters.
|
|
164
166
|
# @param [Hash] opts the optional parameters
|
|
165
167
|
# @option opts [Integer] :days Number of days to look back (default to 7)
|
|
166
168
|
# @option opts [String] :invoice_id Filter by invoice reference
|
|
169
|
+
# @option opts [String] :flow_direction All (default), In (received statuses) or Out (issued statuses) (default to 'All')
|
|
167
170
|
# @option opts [String] :pdp_flow_service_url PDP Flow Service URL
|
|
168
171
|
# @option opts [String] :pdp_token_url PDP OAuth token URL
|
|
169
172
|
# @option opts [String] :pdp_client_id PDP Client ID
|
|
170
173
|
# @option opts [String] :pdp_client_secret PDP Client Secret
|
|
174
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
171
175
|
# @return [Array<(LifecycleResponse, Integer, Hash)>] LifecycleResponse data, response status code and response headers
|
|
172
176
|
def get_lifecycle_api_v1_cdar_lifecycle_get_with_http_info(opts = {})
|
|
173
177
|
if @api_client.config.debugging
|
|
@@ -181,6 +185,10 @@ module FactPulse
|
|
|
181
185
|
fail ArgumentError, 'invalid value for "opts[:"days"]" when calling Flux6InvoiceLifecycleCDARApi.get_lifecycle_api_v1_cdar_lifecycle_get, must be greater than or equal to 1.'
|
|
182
186
|
end
|
|
183
187
|
|
|
188
|
+
allowable_values = ["In", "Out", "All"]
|
|
189
|
+
if @api_client.config.client_side_validation && opts[:'flow_direction'] && !allowable_values.include?(opts[:'flow_direction'])
|
|
190
|
+
fail ArgumentError, "invalid value for \"flow_direction\", must be one of #{allowable_values}"
|
|
191
|
+
end
|
|
184
192
|
# resource path
|
|
185
193
|
local_var_path = '/api/v1/cdar/lifecycle'
|
|
186
194
|
|
|
@@ -188,6 +196,7 @@ module FactPulse
|
|
|
188
196
|
query_params = opts[:query_params] || {}
|
|
189
197
|
query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil?
|
|
190
198
|
query_params[:'invoiceId'] = opts[:'invoice_id'] if !opts[:'invoice_id'].nil?
|
|
199
|
+
query_params[:'flowDirection'] = opts[:'flow_direction'] if !opts[:'flow_direction'].nil?
|
|
191
200
|
query_params[:'pdpFlowServiceUrl'] = opts[:'pdp_flow_service_url'] if !opts[:'pdp_flow_service_url'].nil?
|
|
192
201
|
query_params[:'pdpTokenUrl'] = opts[:'pdp_token_url'] if !opts[:'pdp_token_url'].nil?
|
|
193
202
|
query_params[:'pdpClientId'] = opts[:'pdp_client_id'] if !opts[:'pdp_client_id'].nil?
|
|
@@ -197,6 +206,7 @@ module FactPulse
|
|
|
197
206
|
header_params = opts[:header_params] || {}
|
|
198
207
|
# HTTP header 'Accept' (if needed)
|
|
199
208
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
209
|
+
header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
|
|
200
210
|
|
|
201
211
|
# form parameters
|
|
202
212
|
form_params = opts[:form_params] || {}
|
|
@@ -345,6 +355,7 @@ module FactPulse
|
|
|
345
355
|
# Generate a CDAR message and submit it to the PA/PDP platform. **Authentication strategies:** 1. **JWT with client_uid** (recommended): PDP credentials retrieved from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in the request **Flow types (flowType):** - `CustomerInvoiceLC`: Client-side lifecycle (buyer) - `SupplierInvoiceLC`: Supplier-side lifecycle (seller)
|
|
346
356
|
# @param submit_cdar_request [SubmitCDARRequest]
|
|
347
357
|
# @param [Hash] opts the optional parameters
|
|
358
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
348
359
|
# @return [SubmitCDARResponse]
|
|
349
360
|
def submit_cdar_api_v1_cdar_submit_post(submit_cdar_request, opts = {})
|
|
350
361
|
data, _status_code, _headers = submit_cdar_api_v1_cdar_submit_post_with_http_info(submit_cdar_request, opts)
|
|
@@ -355,6 +366,7 @@ module FactPulse
|
|
|
355
366
|
# Generate a CDAR message and submit it to the PA/PDP platform. **Authentication strategies:** 1. **JWT with client_uid** (recommended): PDP credentials retrieved from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in the request **Flow types (flowType):** - `CustomerInvoiceLC`: Client-side lifecycle (buyer) - `SupplierInvoiceLC`: Supplier-side lifecycle (seller)
|
|
356
367
|
# @param submit_cdar_request [SubmitCDARRequest]
|
|
357
368
|
# @param [Hash] opts the optional parameters
|
|
369
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
358
370
|
# @return [Array<(SubmitCDARResponse, Integer, Hash)>] SubmitCDARResponse data, response status code and response headers
|
|
359
371
|
def submit_cdar_api_v1_cdar_submit_post_with_http_info(submit_cdar_request, opts = {})
|
|
360
372
|
if @api_client.config.debugging
|
|
@@ -379,6 +391,7 @@ module FactPulse
|
|
|
379
391
|
if !content_type.nil?
|
|
380
392
|
header_params['Content-Type'] = content_type
|
|
381
393
|
end
|
|
394
|
+
header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
|
|
382
395
|
|
|
383
396
|
# form parameters
|
|
384
397
|
form_params = opts[:form_params] || {}
|
|
@@ -413,6 +426,7 @@ module FactPulse
|
|
|
413
426
|
# Submit a pre-generated CDAR XML message to the PA/PDP platform. Useful for submitting XML generated by other systems. **Validation:** The XML is validated against XSD and Schematron BR-FR-CDV rules BEFORE submission. Invalid XML will be rejected with detailed error messages. **Authentication strategies:** 1. **JWT with client_uid** (recommended): PDP credentials retrieved from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in the request
|
|
414
427
|
# @param submit_cdarxml_request [SubmitCDARXMLRequest]
|
|
415
428
|
# @param [Hash] opts the optional parameters
|
|
429
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
416
430
|
# @return [SubmitCDARResponse]
|
|
417
431
|
def submit_cdar_xml_api_v1_cdar_submit_xml_post(submit_cdarxml_request, opts = {})
|
|
418
432
|
data, _status_code, _headers = submit_cdar_xml_api_v1_cdar_submit_xml_post_with_http_info(submit_cdarxml_request, opts)
|
|
@@ -423,6 +437,7 @@ module FactPulse
|
|
|
423
437
|
# Submit a pre-generated CDAR XML message to the PA/PDP platform. Useful for submitting XML generated by other systems. **Validation:** The XML is validated against XSD and Schematron BR-FR-CDV rules BEFORE submission. Invalid XML will be rejected with detailed error messages. **Authentication strategies:** 1. **JWT with client_uid** (recommended): PDP credentials retrieved from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in the request
|
|
424
438
|
# @param submit_cdarxml_request [SubmitCDARXMLRequest]
|
|
425
439
|
# @param [Hash] opts the optional parameters
|
|
440
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
426
441
|
# @return [Array<(SubmitCDARResponse, Integer, Hash)>] SubmitCDARResponse data, response status code and response headers
|
|
427
442
|
def submit_cdar_xml_api_v1_cdar_submit_xml_post_with_http_info(submit_cdarxml_request, opts = {})
|
|
428
443
|
if @api_client.config.debugging
|
|
@@ -447,6 +462,7 @@ module FactPulse
|
|
|
447
462
|
if !content_type.nil?
|
|
448
463
|
header_params['Content-Type'] = content_type
|
|
449
464
|
end
|
|
465
|
+
header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
|
|
450
466
|
|
|
451
467
|
# form parameters
|
|
452
468
|
form_params = opts[:form_params] || {}
|
|
@@ -481,6 +497,7 @@ module FactPulse
|
|
|
481
497
|
# **Simplified endpoint for OD** - Submit a PAID status (212) for an **ISSUED** invoice. This status is **mandatory for PPF** (BR-FR-CDV-14 requires the paid amount). **Use case:** The **seller** confirms payment receipt for an invoice they issued. **Who issues this status?** - **Issuer (IssuerTradeParty):** The seller (SE = Seller) who received payment - **Recipient (RecipientTradeParty):** The buyer (BY = Buyer) who paid **Reference:** XP Z12-014 Annex B, example UC1_F202500003_07-CDV-212_Encaissee.xml **Authentication:** JWT Bearer (recommended) or PDP credentials in request.
|
|
482
498
|
# @param encaissee_request [EncaisseeRequest]
|
|
483
499
|
# @param [Hash] opts the optional parameters
|
|
500
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
484
501
|
# @return [SimplifiedCDARResponse]
|
|
485
502
|
def submit_encaissee_api_v1_cdar_encaissee_post(encaissee_request, opts = {})
|
|
486
503
|
data, _status_code, _headers = submit_encaissee_api_v1_cdar_encaissee_post_with_http_info(encaissee_request, opts)
|
|
@@ -491,6 +508,7 @@ module FactPulse
|
|
|
491
508
|
# **Simplified endpoint for OD** - Submit a PAID status (212) for an **ISSUED** invoice. This status is **mandatory for PPF** (BR-FR-CDV-14 requires the paid amount). **Use case:** The **seller** confirms payment receipt for an invoice they issued. **Who issues this status?** - **Issuer (IssuerTradeParty):** The seller (SE = Seller) who received payment - **Recipient (RecipientTradeParty):** The buyer (BY = Buyer) who paid **Reference:** XP Z12-014 Annex B, example UC1_F202500003_07-CDV-212_Encaissee.xml **Authentication:** JWT Bearer (recommended) or PDP credentials in request.
|
|
492
509
|
# @param encaissee_request [EncaisseeRequest]
|
|
493
510
|
# @param [Hash] opts the optional parameters
|
|
511
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
494
512
|
# @return [Array<(SimplifiedCDARResponse, Integer, Hash)>] SimplifiedCDARResponse data, response status code and response headers
|
|
495
513
|
def submit_encaissee_api_v1_cdar_encaissee_post_with_http_info(encaissee_request, opts = {})
|
|
496
514
|
if @api_client.config.debugging
|
|
@@ -515,6 +533,7 @@ module FactPulse
|
|
|
515
533
|
if !content_type.nil?
|
|
516
534
|
header_params['Content-Type'] = content_type
|
|
517
535
|
end
|
|
536
|
+
header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
|
|
518
537
|
|
|
519
538
|
# form parameters
|
|
520
539
|
form_params = opts[:form_params] || {}
|
|
@@ -549,6 +568,7 @@ module FactPulse
|
|
|
549
568
|
# **Simplified endpoint for OD** - Submit a REFUSED status (210) for a **RECEIVED** invoice. This status is **mandatory for PPF** (BR-FR-CDV-15 requires a reason code). **Use case:** The **buyer** refuses an invoice they received. **Who issues this status?** - **Issuer (IssuerTradeParty):** The buyer (BY = Buyer) refusing the invoice - **Recipient (RecipientTradeParty):** The seller (SE = Seller) who issued the invoice **Reference:** XP Z12-014 Annex B, example UC3_F202500005_04-CDV-210_Refusee.xml **Allowed reason codes (BR-FR-CDV-CL-09):** - `TX_TVA_ERR`: Incorrect VAT rate - `MONTANTTOTAL_ERR`: Incorrect total amount - `CALCUL_ERR`: Calculation error - `NON_CONFORME`: Non-compliant - `DOUBLON`: Duplicate - `DEST_ERR`: Wrong recipient - `TRANSAC_INC`: Incomplete transaction - `EMMET_INC`: Unknown issuer - `CONTRAT_TERM`: Contract terminated - `DOUBLE_FACT`: Double billing - `CMD_ERR`: Order error - `ADR_ERR`: Address error - `REF_CT_ABSENT`: Missing contract reference **Authentication:** JWT Bearer (recommended) or PDP credentials in request.
|
|
550
569
|
# @param refusee_request [RefuseeRequest]
|
|
551
570
|
# @param [Hash] opts the optional parameters
|
|
571
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
552
572
|
# @return [SimplifiedCDARResponse]
|
|
553
573
|
def submit_refusee_api_v1_cdar_refusee_post(refusee_request, opts = {})
|
|
554
574
|
data, _status_code, _headers = submit_refusee_api_v1_cdar_refusee_post_with_http_info(refusee_request, opts)
|
|
@@ -559,6 +579,7 @@ module FactPulse
|
|
|
559
579
|
# **Simplified endpoint for OD** - Submit a REFUSED status (210) for a **RECEIVED** invoice. This status is **mandatory for PPF** (BR-FR-CDV-15 requires a reason code). **Use case:** The **buyer** refuses an invoice they received. **Who issues this status?** - **Issuer (IssuerTradeParty):** The buyer (BY = Buyer) refusing the invoice - **Recipient (RecipientTradeParty):** The seller (SE = Seller) who issued the invoice **Reference:** XP Z12-014 Annex B, example UC3_F202500005_04-CDV-210_Refusee.xml **Allowed reason codes (BR-FR-CDV-CL-09):** - `TX_TVA_ERR`: Incorrect VAT rate - `MONTANTTOTAL_ERR`: Incorrect total amount - `CALCUL_ERR`: Calculation error - `NON_CONFORME`: Non-compliant - `DOUBLON`: Duplicate - `DEST_ERR`: Wrong recipient - `TRANSAC_INC`: Incomplete transaction - `EMMET_INC`: Unknown issuer - `CONTRAT_TERM`: Contract terminated - `DOUBLE_FACT`: Double billing - `CMD_ERR`: Order error - `ADR_ERR`: Address error - `REF_CT_ABSENT`: Missing contract reference **Authentication:** JWT Bearer (recommended) or PDP credentials in request.
|
|
560
580
|
# @param refusee_request [RefuseeRequest]
|
|
561
581
|
# @param [Hash] opts the optional parameters
|
|
582
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
562
583
|
# @return [Array<(SimplifiedCDARResponse, Integer, Hash)>] SimplifiedCDARResponse data, response status code and response headers
|
|
563
584
|
def submit_refusee_api_v1_cdar_refusee_post_with_http_info(refusee_request, opts = {})
|
|
564
585
|
if @api_client.config.debugging
|
|
@@ -583,6 +604,7 @@ module FactPulse
|
|
|
583
604
|
if !content_type.nil?
|
|
584
605
|
header_params['Content-Type'] = content_type
|
|
585
606
|
end
|
|
607
|
+
header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
|
|
586
608
|
|
|
587
609
|
# form parameters
|
|
588
610
|
form_params = opts[:form_params] || {}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: contact@factpulse.fr
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.21.0
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -110,9 +110,10 @@ module FactPulse
|
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
# Submit a complete invoice (generation + signature + submission)
|
|
113
|
-
# 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`)
|
|
113
|
+
# 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) **Two accepted `invoiceData` formats, detected automatically** (same rule as `/generate-invoice`): - **Simplified format** (`number` + `lines`): totals, VAT and dates are computed. Any field of the complete model may be added on top (`deliveryDate` BT-72, `deliveryParty` BG-15, `paymentReference` BT-83, `supplier.bic` BT-86, ...). - **Complete format** (`invoiceLines` present): full `FacturXInvoice` structure, used as provided. A non-compliant invoice is **not submitted**: the Schematron errors are returned as a 400 `SCHEMATRON_VALIDATION_FAILED`, rather than a 200 followed by an asynchronous rejection by the PA. This includes the empty-element rule (PEPPOL-EN16931-R008), which the PAs apply as blocking. **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`)
|
|
114
114
|
# @param submit_complete_invoice_request [SubmitCompleteInvoiceRequest]
|
|
115
115
|
# @param [Hash] opts the optional parameters
|
|
116
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
116
117
|
# @return [SubmitCompleteInvoiceResponse]
|
|
117
118
|
def submit_complete_invoice_api_v1_processing_invoices_submit_complete_post(submit_complete_invoice_request, opts = {})
|
|
118
119
|
data, _status_code, _headers = submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request, opts)
|
|
@@ -120,9 +121,10 @@ module FactPulse
|
|
|
120
121
|
end
|
|
121
122
|
|
|
122
123
|
# Submit a complete invoice (generation + signature + submission)
|
|
123
|
-
# 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`)
|
|
124
|
+
# 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) **Two accepted `invoiceData` formats, detected automatically** (same rule as `/generate-invoice`): - **Simplified format** (`number` + `lines`): totals, VAT and dates are computed. Any field of the complete model may be added on top (`deliveryDate` BT-72, `deliveryParty` BG-15, `paymentReference` BT-83, `supplier.bic` BT-86, ...). - **Complete format** (`invoiceLines` present): full `FacturXInvoice` structure, used as provided. A non-compliant invoice is **not submitted**: the Schematron errors are returned as a 400 `SCHEMATRON_VALIDATION_FAILED`, rather than a 200 followed by an asynchronous rejection by the PA. This includes the empty-element rule (PEPPOL-EN16931-R008), which the PAs apply as blocking. **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`)
|
|
124
125
|
# @param submit_complete_invoice_request [SubmitCompleteInvoiceRequest]
|
|
125
126
|
# @param [Hash] opts the optional parameters
|
|
127
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
126
128
|
# @return [Array<(SubmitCompleteInvoiceResponse, Integer, Hash)>] SubmitCompleteInvoiceResponse data, response status code and response headers
|
|
127
129
|
def submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request, opts = {})
|
|
128
130
|
if @api_client.config.debugging
|
|
@@ -147,6 +149,7 @@ module FactPulse
|
|
|
147
149
|
if !content_type.nil?
|
|
148
150
|
header_params['Content-Type'] = content_type
|
|
149
151
|
end
|
|
152
|
+
header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
|
|
150
153
|
|
|
151
154
|
# form parameters
|
|
152
155
|
form_params = opts[:form_params] || {}
|
|
@@ -183,6 +186,7 @@ module FactPulse
|
|
|
183
186
|
# @param [Hash] opts the optional parameters
|
|
184
187
|
# @option opts [String] :callback_url Webhook URL for async notification when submission completes.
|
|
185
188
|
# @option opts [String] :webhook_mode Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL) (default to 'inline')
|
|
189
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
186
190
|
# @return [TaskResponse]
|
|
187
191
|
def submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post(submit_complete_invoice_request, opts = {})
|
|
188
192
|
data, _status_code, _headers = submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request, opts)
|
|
@@ -195,6 +199,7 @@ module FactPulse
|
|
|
195
199
|
# @param [Hash] opts the optional parameters
|
|
196
200
|
# @option opts [String] :callback_url Webhook URL for async notification when submission completes.
|
|
197
201
|
# @option opts [String] :webhook_mode Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL) (default to 'inline')
|
|
202
|
+
# @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
|
|
198
203
|
# @return [Array<(TaskResponse, Integer, Hash)>] TaskResponse data, response status code and response headers
|
|
199
204
|
def submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request, opts = {})
|
|
200
205
|
if @api_client.config.debugging
|
|
@@ -221,6 +226,7 @@ module FactPulse
|
|
|
221
226
|
if !content_type.nil?
|
|
222
227
|
header_params['Content-Type'] = content_type
|
|
223
228
|
end
|
|
229
|
+
header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
|
|
224
230
|
|
|
225
231
|
# form parameters
|
|
226
232
|
form_params = opts[:form_params] || {}
|
data/lib/factpulse/api_client.rb
CHANGED
data/lib/factpulse/api_error.rb
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
# FactPulse SDK - Thin HTTP wrapper with auto-polling.
|
|
4
4
|
#
|
|
5
5
|
# Usage:
|
|
6
|
-
# client =
|
|
6
|
+
# client = FactPulse::Client.new(email: 'email', password: 'password', client_uid: 'client_uid')
|
|
7
|
+
# # or with a pre-obtained JWT (e.g. dashboard test token):
|
|
8
|
+
# client = FactPulse::Client.new(token: 'eyJ...')
|
|
9
|
+
# # positional form (backward compatible):
|
|
10
|
+
# client = FactPulse::Client.new('email', 'password', 'client_uid')
|
|
7
11
|
#
|
|
8
12
|
# # POST /api/v1/processing/invoices/submit-complete-async
|
|
9
13
|
# result = client.post('processing/invoices/submit-complete-async',
|
|
@@ -31,15 +35,38 @@ module FactPulse
|
|
|
31
35
|
class Client
|
|
32
36
|
DEFAULT_API_URL = 'https://factpulse.fr'
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
# Create a client.
|
|
39
|
+
#
|
|
40
|
+
# Keyword form (recommended):
|
|
41
|
+
# FactPulse::Client.new(email: '...', password: '...', client_uid: '...')
|
|
42
|
+
# FactPulse::Client.new(token: 'eyJ...') # pre-obtained JWT (e.g. dashboard test token)
|
|
43
|
+
#
|
|
44
|
+
# Positional form (backward compatible with <= 4.3.0):
|
|
45
|
+
# FactPulse::Client.new('email', 'password', 'client_uid')
|
|
46
|
+
def initialize(*args, email: nil, password: nil, client_uid: nil, token: nil,
|
|
47
|
+
api_url: DEFAULT_API_URL, timeout: 60, polling_timeout: 120)
|
|
48
|
+
unless args.empty?
|
|
49
|
+
if email || password || client_uid || token
|
|
50
|
+
raise ArgumentError, 'use either positional (email, password, client_uid) or keyword arguments, not both'
|
|
51
|
+
end
|
|
52
|
+
unless (2..3).cover?(args.length)
|
|
53
|
+
raise ArgumentError, "wrong number of arguments (given #{args.length}, expected 3)"
|
|
54
|
+
end
|
|
55
|
+
email, password, client_uid = args
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
if token.nil? && (email.nil? || password.nil?)
|
|
59
|
+
raise ArgumentError, 'provide email: and password: (or token: with a pre-obtained JWT)'
|
|
60
|
+
end
|
|
61
|
+
|
|
35
62
|
@email = email
|
|
36
63
|
@password = password
|
|
37
64
|
@client_uid = client_uid
|
|
38
65
|
@api_url = api_url.chomp('/')
|
|
39
66
|
@timeout = timeout
|
|
40
67
|
@polling_timeout = polling_timeout
|
|
41
|
-
@token =
|
|
42
|
-
@token_expires_at = 0
|
|
68
|
+
@token = token
|
|
69
|
+
@token_expires_at = token ? Float::INFINITY : 0
|
|
43
70
|
@token_mutex = Mutex.new
|
|
44
71
|
end
|
|
45
72
|
|
|
@@ -243,6 +270,14 @@ module FactPulse
|
|
|
243
270
|
end
|
|
244
271
|
|
|
245
272
|
def refresh_token
|
|
273
|
+
if @email.nil? || @password.nil?
|
|
274
|
+
raise Error.new(
|
|
275
|
+
'Access token expired or rejected, and no email/password available to refresh it. ' \
|
|
276
|
+
'Provide email: and password:, or create a new client with a fresh token:.',
|
|
277
|
+
status_code: 401
|
|
278
|
+
)
|
|
279
|
+
end
|
|
280
|
+
|
|
246
281
|
uri = URI("#{@api_url}/api/token/")
|
|
247
282
|
http = Net::HTTP.new(uri.host, uri.port)
|
|
248
283
|
http.use_ssl = uri.scheme == 'https'
|
|
@@ -250,7 +285,9 @@ module FactPulse
|
|
|
250
285
|
|
|
251
286
|
req = Net::HTTP::Post.new(uri)
|
|
252
287
|
req['Content-Type'] = 'application/json'
|
|
253
|
-
|
|
288
|
+
payload = { username: @email, password: @password }
|
|
289
|
+
payload[:client_uid] = @client_uid if @client_uid
|
|
290
|
+
req.body = JSON.generate(payload)
|
|
254
291
|
|
|
255
292
|
response = http.request(req)
|
|
256
293
|
|
data/lib/factpulse/models/{afnor_diffusion_status.rb → afnor_contains_or_start_with_operator.rb}
RENAMED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: contact@factpulse.fr
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.21.0
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,12 +14,12 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
class AFNORContainsOrStartWithOperator
|
|
18
|
+
CONTAINS = "contains".freeze
|
|
19
|
+
START_WITH = "startWith".freeze
|
|
20
20
|
|
|
21
21
|
def self.all_vars
|
|
22
|
-
@all_vars ||= [
|
|
22
|
+
@all_vars ||= [CONTAINS, START_WITH].freeze
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
# Builds the enum from string
|
|
@@ -33,8 +33,8 @@ module FactPulse
|
|
|
33
33
|
# @param [String] The enum value in the form of the string
|
|
34
34
|
# @return [String] The enum value
|
|
35
35
|
def build_from_hash(value)
|
|
36
|
-
return value if
|
|
37
|
-
raise "Invalid ENUM value #{value} for class #
|
|
36
|
+
return value if AFNORContainsOrStartWithOperator.all_vars.include?(value)
|
|
37
|
+
raise "Invalid ENUM value #{value} for class #AFNORContainsOrStartWithOperator"
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
end
|
data/lib/factpulse/models/{afnor_contains_operator.rb → afnor_contains_or_strict_operator.rb}
RENAMED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: contact@factpulse.fr
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.21.0
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,11 +14,12 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
|
-
class
|
|
17
|
+
class AFNORContainsOrStrictOperator
|
|
18
18
|
CONTAINS = "contains".freeze
|
|
19
|
+
STRICT = "strict".freeze
|
|
19
20
|
|
|
20
21
|
def self.all_vars
|
|
21
|
-
@all_vars ||= [CONTAINS].freeze
|
|
22
|
+
@all_vars ||= [CONTAINS, STRICT].freeze
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
# Builds the enum from string
|
|
@@ -32,8 +33,8 @@ module FactPulse
|
|
|
32
33
|
# @param [String] The enum value in the form of the string
|
|
33
34
|
# @return [String] The enum value
|
|
34
35
|
def build_from_hash(value)
|
|
35
|
-
return value if
|
|
36
|
-
raise "Invalid ENUM value #{value} for class #
|
|
36
|
+
return value if AFNORContainsOrStrictOperator.all_vars.include?(value)
|
|
37
|
+
raise "Invalid ENUM value #{value} for class #AFNORContainsOrStrictOperator"
|
|
37
38
|
end
|
|
38
39
|
end
|
|
39
40
|
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#FactPulse REST API
|
|
3
|
+
|
|
4
|
+
# REST API for electronic invoicing in France: Factur-X (CII), UBL 2.1, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Invoice Generation - **Formats**: CII XML, UBL 2.1 XML, or Factur-X PDF/A-3 - **Profiles** (CII/PDF): MINIMUM, BASIC, EN16931, EXTENDED - **UBL**: Always EN16931 compliant - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT), UBL 2.1 (OASIS) - **Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Factur-X - Validation - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) ### ✍️ Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification ### 📋 Flux 6 - Invoice Lifecycle (CDAR) - **CDAR Messages**: Acknowledgements, invoice statuses - **PPF Statuses**: REFUSED (210), PAID (212) ### 📊 Flux 10 - E-Reporting - **Tax Declarations**: International B2B, B2C - **Flow Types**: 10.1 (B2B transactions), 10.2 (B2B payments), 10.3 (B2C transactions), 10.4 (B2C payments) ### 📡 AFNOR PDP/PA (XP Z12-013) - **Flow Service**: Submit and search flows to PDPs - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user ### 🏛️ Chorus Pro - **Public Sector Invoicing**: Complete API for Chorus Pro ### ⏳ Async Tasks - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **Webhooks**: Automatic notifications when tasks complete ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://factpulse.fr/api/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://factpulse.fr/documentation-api/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: contact@factpulse.fr
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module FactPulse
|
|
17
|
+
class AFNORContainsOrStrictOrStartWithOperator
|
|
18
|
+
CONTAINS = "contains".freeze
|
|
19
|
+
STRICT = "strict".freeze
|
|
20
|
+
START_WITH = "startWith".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [CONTAINS, STRICT, START_WITH].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
new.build_from_hash(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
return value if AFNORContainsOrStrictOrStartWithOperator.all_vars.include?(value)
|
|
38
|
+
raise "Invalid ENUM value #{value} for class #AFNORContainsOrStrictOrStartWithOperator"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|