factpulse 4.0.3 → 4.3.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 +5 -5
- data/Gemfile.lock +3 -3
- data/docs/AFNORBasicAuthentication.md +20 -0
- data/docs/AFNORCallbackAuthentication.md +49 -0
- data/docs/AFNORCallbackHeader.md +20 -0
- data/docs/AFNORCallbackParameters.md +24 -0
- data/docs/AFNORCallbackSignature.md +20 -0
- data/docs/{AFNORFacilityNature.md → AFNORContainsOrStrictOperator.md} +2 -2
- data/docs/AFNORCoreFlowInfo.md +26 -0
- data/docs/{AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCode.md → AFNORDirectoryLinePayloadLegalUnitFacilityRoutingCode.md} +5 -5
- data/docs/AFNORDirectoryLinePayloadStatusLegalUnitFacilityRoutingCode.md +34 -0
- data/docs/AFNORDirectoryLineSearchPost200Response.md +1 -1
- data/docs/{AFNORDiffusionStatus.md → AFNORDirectoryLineStatus.md} +2 -2
- data/docs/AFNORError.md +4 -4
- data/docs/AFNORErrorDetail.md +26 -0
- data/docs/AFNORFacilityPayloadHistory.md +3 -3
- data/docs/AFNORFacilityPayloadIncluded.md +0 -2
- data/docs/AFNORFlow.md +16 -14
- 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/AFNOROAuth2Authentication.md +22 -0
- data/docs/AFNORPDPPADirectoryServiceApi.md +4 -648
- data/docs/AFNORPDPPAFlowServiceApi.md +320 -1
- data/docs/AFNORRoutingCodeSearch.md +1 -1
- data/docs/AFNORRoutingCodeSearchFiltersRoutingCodeName.md +1 -1
- data/docs/AFNORRoutingCodeSearchFiltersRoutingIdentifier.md +1 -1
- data/docs/AFNORSearchDirectoryLine.md +2 -2
- data/docs/AFNORSearchDirectoryLineFiltersAddressingIdentifier.md +1 -1
- data/docs/AFNORSearchDirectoryLineFiltersAddressingSuffix.md +1 -1
- data/docs/AFNORSearchFlowFilters.md +1 -1
- data/docs/AFNORSearchSiren.md +1 -1
- data/docs/AFNORSearchSirenFiltersBusinessName.md +1 -1
- data/docs/AFNORSearchSirenFiltersSiren.md +1 -1
- data/docs/AFNORSearchSiret.md +2 -2
- 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/AFNORSirenInstructions.md +18 -0
- data/docs/AFNORSiretInstructions.md +18 -0
- data/docs/{AFNORPlatformStatus.md → AFNORStrictOrStartWithOperator.md} +2 -2
- data/docs/AFNORWebhook.md +22 -0
- data/docs/AFNORWebhookIdParam.md +18 -0
- data/docs/AFNORWebhookMetadata.md +24 -0
- data/docs/AFNORWebhookParams.md +20 -0
- data/docs/AFNORWebhookPatchPayload.md +22 -0
- data/docs/AsyncTasksApi.md +225 -0
- data/docs/ChorusProCredentials.md +8 -8
- data/docs/ChorusProDestination.md +1 -1
- data/docs/ClientManagementApi.md +20 -20
- data/docs/ConversionErrorResult.md +30 -0
- data/docs/ConversionExtractionInfo.md +20 -0
- data/docs/ConversionPendingInputResult.md +30 -0
- data/docs/ConversionSuccessTaskResult.md +36 -0
- data/docs/ConversionTaskStatus.md +22 -0
- data/docs/ConversionTaskStatusResult.md +85 -0
- data/docs/ConversionValidationFailedResult.md +34 -0
- data/docs/DownloadsApi.md +4 -4
- data/docs/FacturXConversionApi.md +75 -0
- data/docs/FacturXInvoice.md +1 -1
- data/docs/FacturXPDFXMLVerificationApi.md +75 -0
- data/docs/FacturXValidationApi.md +0 -81
- data/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +24 -0
- data/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +26 -0
- data/docs/Flux6InvoiceLifecycleCDARApi.md +82 -0
- data/docs/GenerationSuccessResult.md +24 -0
- data/docs/GenerationTaskStatus.md +22 -0
- data/docs/GenerationTaskStatusResult.md +79 -0
- data/docs/GetChorusProIdRequest.md +1 -1
- data/docs/GetInvoiceRequest.md +1 -1
- data/docs/GetStructureRequest.md +1 -1
- data/docs/HealthApi.md +0 -124
- data/docs/{FacturXGenerationApi.md → InvoiceGenerationApi.md} +21 -21
- data/docs/InvoiceLifecycle.md +24 -0
- data/docs/InvoicingFramework.md +1 -1
- data/docs/LifecycleEvent.md +38 -0
- data/docs/LifecycleResponse.md +22 -0
- data/docs/ParseApi.md +161 -0
- data/docs/ParseFacturXResponse.md +26 -0
- data/docs/ReferencesApi.md +74 -0
- data/docs/SearchStructureRequest.md +1 -1
- data/docs/SignatureSuccessResult.md +34 -0
- data/docs/SignatureTaskStatus.md +22 -0
- data/docs/SignatureTaskStatusResult.md +79 -0
- data/docs/SubmitCompleteInvoiceResponse.md +3 -1
- data/docs/SubmitInvoiceRequest.md +1 -1
- data/docs/Supplier.md +1 -1
- data/docs/TaskErrorResult.md +26 -0
- data/docs/VATEXCodeInfo.md +24 -0
- data/docs/VATEXCodesResponse.md +22 -0
- data/docs/ValidateCDARResponse.md +2 -2
- data/docs/ValidationApi.md +88 -0
- data/docs/ValidationErrorResponse.md +2 -8
- data/docs/ValidationSuccessTaskResult.md +20 -0
- data/docs/ValidationTaskStatus.md +22 -0
- data/docs/ValidationTaskStatusResult.md +79 -0
- data/docs/VerificationSuccessTaskResult.md +20 -0
- data/docs/VerificationTypedTaskStatus.md +22 -0
- data/docs/VerificationTypedTaskStatusResult.md +79 -0
- data/factpulse.gemspec +3 -3
- data/lib/factpulse/api/afnorpdppa_api.rb +2 -2
- data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +5 -623
- data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +305 -2
- data/lib/factpulse/api/async_tasks_api.rb +191 -2
- data/lib/factpulse/api/chorus_pro_api.rb +2 -2
- data/lib/factpulse/api/client_management_api.rb +22 -22
- data/lib/factpulse/api/downloads_api.rb +6 -6
- data/lib/factpulse/api/electronic_signature_api.rb +2 -2
- data/lib/factpulse/api/factur_x_conversion_api.rb +65 -2
- data/lib/factpulse/api/factur_x_validation_api.rb +2 -77
- data/lib/factpulse/api/factur_xpdfxml_verification_api.rb +65 -2
- data/lib/factpulse/api/flux10_e_reporting_api.rb +2 -2
- data/lib/factpulse/api/flux6_invoice_lifecycle_cdar_api.rb +85 -2
- data/lib/factpulse/api/health_api.rb +2 -116
- data/lib/factpulse/api/{factur_x_generation_api.rb → invoice_generation_api.rb} +23 -23
- data/lib/factpulse/api/parse_api.rb +163 -0
- data/lib/factpulse/api/references_api.rb +82 -0
- data/lib/factpulse/api/validation_api.rb +97 -0
- data/lib/factpulse/api_client.rb +2 -2
- data/lib/factpulse/api_error.rb +2 -2
- data/lib/factpulse/api_model_base.rb +2 -2
- data/lib/factpulse/configuration.rb +2 -2
- data/lib/factpulse/models/acknowledgment_status.rb +2 -2
- data/lib/factpulse/models/action_code_info.rb +2 -2
- data/lib/factpulse/models/action_codes_response.rb +2 -2
- data/lib/factpulse/models/additional_document.rb +2 -2
- data/lib/factpulse/models/afnor_acknowledgement.rb +2 -2
- data/lib/factpulse/models/afnor_acknowledgement_detail.rb +2 -2
- data/lib/factpulse/models/afnor_address_read.rb +2 -2
- data/lib/factpulse/models/afnor_algorithm.rb +6 -5
- data/lib/factpulse/models/afnor_basic_authentication.rb +190 -0
- data/lib/factpulse/models/afnor_callback_authentication.rb +105 -0
- data/lib/factpulse/models/afnor_callback_header.rb +190 -0
- data/lib/factpulse/models/afnor_callback_parameters.rb +193 -0
- data/lib/factpulse/models/afnor_callback_signature.rb +213 -0
- data/lib/factpulse/models/afnor_contains_operator.rb +2 -2
- data/lib/factpulse/models/afnor_contains_or_strict_operator.rb +40 -0
- data/lib/factpulse/models/afnor_core_flow_info.rb +270 -0
- data/lib/factpulse/models/afnor_credentials.rb +2 -2
- data/lib/factpulse/models/afnor_destination.rb +2 -2
- data/lib/factpulse/models/afnor_directory_line_field.rb +3 -4
- data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.rb +2 -2
- 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} +38 -16
- data/lib/factpulse/models/afnor_directory_line_payload_status_legal_unit_facility_routing_code.rb +343 -0
- data/lib/factpulse/models/afnor_directory_line_search_post200_response.rb +3 -3
- data/lib/factpulse/models/afnor_directory_line_status.rb +41 -0
- data/lib/factpulse/models/afnor_entity_type.rb +2 -2
- data/lib/factpulse/models/afnor_error.rb +32 -41
- data/lib/factpulse/models/afnor_error_detail.rb +237 -0
- data/lib/factpulse/models/afnor_facility_administrative_status.rb +2 -2
- data/lib/factpulse/models/afnor_facility_payload_history.rb +13 -13
- data/lib/factpulse/models/afnor_facility_payload_history_ule_b2g_additional_data.rb +2 -2
- data/lib/factpulse/models/afnor_facility_payload_included.rb +3 -12
- data/lib/factpulse/models/afnor_facility_type.rb +2 -2
- data/lib/factpulse/models/afnor_flow.rb +220 -59
- data/lib/factpulse/models/afnor_flow_ack_status.rb +2 -2
- data/lib/factpulse/models/afnor_flow_direction.rb +2 -2
- data/lib/factpulse/models/afnor_flow_extension.rb +295 -0
- data/lib/factpulse/models/afnor_flow_info.rb +22 -6
- data/lib/factpulse/models/afnor_flow_info_extension.rb +170 -0
- data/lib/factpulse/models/afnor_flow_profile.rb +2 -2
- data/lib/factpulse/models/afnor_flow_syntax.rb +2 -2
- data/lib/factpulse/models/afnor_flow_type.rb +2 -2
- data/lib/factpulse/models/afnor_full_flow_info.rb +81 -48
- data/lib/factpulse/models/afnor_full_flow_info_extension.rb +202 -0
- data/lib/factpulse/models/afnor_health_check_response.rb +2 -2
- data/lib/factpulse/models/afnor_legal_unit_administrative_status.rb +2 -2
- data/lib/factpulse/models/afnor_legal_unit_payload_history.rb +15 -6
- data/lib/factpulse/models/afnor_legal_unit_payload_included.rb +2 -2
- data/lib/factpulse/models/afnor_processing_rule.rb +6 -3
- data/lib/factpulse/models/afnor_reason_code.rb +2 -2
- data/lib/factpulse/models/afnor_reason_code_enum.rb +2 -2
- data/lib/factpulse/models/afnor_recipient_platform_type.rb +2 -2
- data/lib/factpulse/models/afnor_result.rb +2 -2
- data/lib/factpulse/models/afnor_routing_code_administrative_status.rb +2 -2
- data/lib/factpulse/models/afnor_routing_code_field.rb +3 -4
- data/lib/factpulse/models/afnor_routing_code_payload_history_legal_unit_facility.rb +2 -2
- data/lib/factpulse/models/afnor_routing_code_search.rb +2 -2
- data/lib/factpulse/models/afnor_routing_code_search_filters.rb +2 -2
- data/lib/factpulse/models/afnor_routing_code_search_filters_administrative_status.rb +2 -2
- data/lib/factpulse/models/afnor_routing_code_search_filters_routing_code_name.rb +3 -3
- data/lib/factpulse/models/afnor_routing_code_search_filters_routing_identifier.rb +3 -3
- data/lib/factpulse/models/afnor_routing_code_search_post200_response.rb +2 -2
- data/lib/factpulse/models/afnor_routing_code_search_sorting_inner.rb +2 -2
- data/lib/factpulse/models/afnor_search_directory_line.rb +2 -2
- data/lib/factpulse/models/afnor_search_directory_line_filters.rb +2 -2
- data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_identifier.rb +3 -3
- data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_suffix.rb +3 -3
- data/lib/factpulse/models/afnor_search_directory_line_sorting_inner.rb +2 -2
- data/lib/factpulse/models/afnor_search_flow_content.rb +2 -2
- data/lib/factpulse/models/afnor_search_flow_filters.rb +3 -2
- data/lib/factpulse/models/afnor_search_flow_params.rb +2 -2
- data/lib/factpulse/models/afnor_search_siren.rb +2 -2
- data/lib/factpulse/models/afnor_search_siren_filters.rb +2 -2
- data/lib/factpulse/models/afnor_search_siren_filters_administrative_status.rb +2 -2
- data/lib/factpulse/models/afnor_search_siren_filters_business_name.rb +3 -3
- data/lib/factpulse/models/afnor_search_siren_filters_entity_type.rb +2 -2
- data/lib/factpulse/models/afnor_search_siren_filters_siren.rb +3 -3
- data/lib/factpulse/models/afnor_search_siren_sorting_inner.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters_address_lines.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters_administrative_status.rb +2 -2
- data/lib/factpulse/models/afnor_search_siret_filters_country_subdivision.rb +3 -3
- data/lib/factpulse/models/afnor_search_siret_filters_facility_type.rb +3 -3
- data/lib/factpulse/models/afnor_search_siret_filters_locality.rb +3 -3
- data/lib/factpulse/models/afnor_search_siret_filters_name.rb +3 -3
- data/lib/factpulse/models/afnor_search_siret_filters_postal_code.rb +3 -3
- data/lib/factpulse/models/afnor_search_siret_filters_siret.rb +3 -3
- data/lib/factpulse/models/afnor_search_siret_sorting_inner.rb +2 -2
- data/lib/factpulse/models/afnor_siren_field.rb +4 -4
- data/lib/factpulse/models/afnor_siren_instructions.rb +149 -0
- data/lib/factpulse/models/afnor_siren_search_post200_response.rb +2 -2
- data/lib/factpulse/models/afnor_siret_field.rb +5 -6
- data/lib/factpulse/models/afnor_siret_instructions.rb +149 -0
- data/lib/factpulse/models/afnor_siret_search_post200_response.rb +2 -2
- data/lib/factpulse/models/afnor_sorting_order.rb +2 -2
- data/lib/factpulse/models/afnor_strict_operator.rb +2 -2
- data/lib/factpulse/models/afnor_strict_or_start_with_operator.rb +40 -0
- data/lib/factpulse/models/afnor_webhook.rb +207 -0
- data/lib/factpulse/models/afnor_webhook_id_param.rb +147 -0
- data/lib/factpulse/models/afnor_webhook_metadata.rb +230 -0
- data/lib/factpulse/models/afnor_webhook_params.rb +190 -0
- data/lib/factpulse/models/afnor_webhook_patch_payload.rb +167 -0
- data/lib/factpulse/models/afnoro_auth2_authentication.rb +216 -0
- data/lib/factpulse/models/aggregated_payment_input.rb +2 -2
- data/lib/factpulse/models/aggregated_transaction_input.rb +2 -2
- data/lib/factpulse/models/allowance_charge.rb +2 -2
- data/lib/factpulse/models/allowance_charge_reason_code.rb +2 -2
- data/lib/factpulse/models/allowance_reason_code.rb +2 -2
- data/lib/factpulse/models/allowance_total_amount.rb +2 -2
- 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 +2 -2
- data/lib/factpulse/models/api_error.rb +2 -2
- data/lib/factpulse/models/api_profile.rb +2 -2
- data/lib/factpulse/models/async_task_status.rb +2 -2
- data/lib/factpulse/models/base_amount.rb +2 -2
- data/lib/factpulse/models/bounding_box_schema.rb +2 -2
- data/lib/factpulse/models/buyercountry.rb +2 -2
- data/lib/factpulse/models/celery_status.rb +2 -2
- data/lib/factpulse/models/certificate_info_response.rb +2 -2
- data/lib/factpulse/models/charge_total_amount.rb +2 -2
- data/lib/factpulse/models/chorus_pro_credentials.rb +96 -28
- data/lib/factpulse/models/chorus_pro_destination.rb +3 -3
- data/lib/factpulse/models/chorus_pro_result.rb +2 -2
- data/lib/factpulse/models/client_activate_response.rb +2 -2
- data/lib/factpulse/models/client_create_request.rb +2 -2
- data/lib/factpulse/models/client_detail.rb +2 -2
- data/lib/factpulse/models/client_list_response.rb +2 -2
- data/lib/factpulse/models/client_summary.rb +2 -2
- data/lib/factpulse/models/client_update_request.rb +2 -2
- data/lib/factpulse/models/contact.rb +2 -2
- data/lib/factpulse/models/conversion_error_result.rb +277 -0
- data/lib/factpulse/models/conversion_extraction_info.rb +176 -0
- data/lib/factpulse/models/conversion_pending_input_result.rb +344 -0
- data/lib/factpulse/models/conversion_success_task_result.rb +355 -0
- data/lib/factpulse/models/conversion_task_status.rb +223 -0
- data/lib/factpulse/models/conversion_task_status_result.rb +59 -0
- data/lib/factpulse/models/conversion_validation_failed_result.rb +348 -0
- data/lib/factpulse/models/convert_resume_request.rb +2 -2
- data/lib/factpulse/models/convert_success_response.rb +2 -2
- data/lib/factpulse/models/convert_validation_failed_response.rb +2 -2
- data/lib/factpulse/models/country_code.rb +2 -2
- data/lib/factpulse/models/create_aggregated_report_request.rb +2 -2
- data/lib/factpulse/models/create_cdar_request.rb +2 -2
- data/lib/factpulse/models/create_e_reporting_request.rb +2 -2
- data/lib/factpulse/models/currency.rb +2 -2
- data/lib/factpulse/models/currency_code.rb +2 -2
- data/lib/factpulse/models/delivery_party.rb +2 -2
- data/lib/factpulse/models/destination.rb +2 -2
- data/lib/factpulse/models/doc_type.rb +2 -2
- data/lib/factpulse/models/document_type_info.rb +2 -2
- data/lib/factpulse/models/e_reporting_flow_type.rb +2 -2
- data/lib/factpulse/models/e_reporting_validation_error.rb +2 -2
- data/lib/factpulse/models/electronic_address.rb +2 -2
- data/lib/factpulse/models/encaisseamount.rb +2 -2
- data/lib/factpulse/models/encaisseamount1.rb +2 -2
- data/lib/factpulse/models/encaissee_request.rb +2 -2
- data/lib/factpulse/models/enriched_invoice_info.rb +2 -2
- data/lib/factpulse/models/error_level.rb +2 -2
- data/lib/factpulse/models/error_source.rb +2 -2
- data/lib/factpulse/models/extraction_info.rb +2 -2
- data/lib/factpulse/models/factur_x_invoice.rb +3 -19
- data/lib/factpulse/models/factur_xpdf_info.rb +2 -2
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_cdar_validation_error_response.rb +215 -0
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb +2 -2
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb +191 -0
- data/lib/factpulse/models/field_status.rb +2 -2
- data/lib/factpulse/models/file_info.rb +2 -2
- data/lib/factpulse/models/files_info.rb +2 -2
- data/lib/factpulse/models/flow_direction.rb +2 -2
- data/lib/factpulse/models/flow_profile.rb +2 -2
- data/lib/factpulse/models/flow_summary.rb +2 -2
- data/lib/factpulse/models/flow_syntax.rb +2 -2
- data/lib/factpulse/models/flow_type.rb +2 -2
- data/lib/factpulse/models/generate_aggregated_report_response.rb +2 -2
- data/lib/factpulse/models/generate_cdar_response.rb +2 -2
- data/lib/factpulse/models/generate_certificate_request.rb +2 -2
- data/lib/factpulse/models/generate_certificate_response.rb +2 -2
- data/lib/factpulse/models/generate_e_reporting_response.rb +2 -2
- data/lib/factpulse/models/generation_success_result.rb +230 -0
- data/lib/factpulse/models/generation_task_status.rb +223 -0
- data/lib/factpulse/models/generation_task_status_result.rb +55 -0
- data/lib/factpulse/models/get_chorus_pro_id_request.rb +3 -3
- data/lib/factpulse/models/get_chorus_pro_id_response.rb +2 -2
- data/lib/factpulse/models/get_invoice_request.rb +3 -3
- data/lib/factpulse/models/get_invoice_response.rb +2 -2
- data/lib/factpulse/models/get_structure_request.rb +3 -3
- data/lib/factpulse/models/get_structure_response.rb +2 -2
- data/lib/factpulse/models/global_allowance_amount.rb +2 -2
- data/lib/factpulse/models/gross_unit_price.rb +2 -2
- data/lib/factpulse/models/http_validation_error.rb +2 -2
- data/lib/factpulse/models/incoming_invoice.rb +2 -2
- data/lib/factpulse/models/incoming_supplier.rb +2 -2
- data/lib/factpulse/models/invoice_format.rb +2 -2
- data/lib/factpulse/models/invoice_input.rb +2 -2
- data/lib/factpulse/models/invoice_lifecycle.rb +215 -0
- data/lib/factpulse/models/invoice_line.rb +2 -2
- data/lib/factpulse/models/invoice_line_allowance_amount.rb +2 -2
- data/lib/factpulse/models/invoice_note.rb +2 -2
- data/lib/factpulse/models/invoice_payment_input.rb +2 -2
- data/lib/factpulse/models/invoice_references.rb +2 -2
- data/lib/factpulse/models/invoice_status.rb +2 -2
- data/lib/factpulse/models/invoice_totals.rb +2 -2
- data/lib/factpulse/models/invoice_totals_prepayment.rb +2 -2
- data/lib/factpulse/models/invoice_type_code.rb +2 -2
- data/lib/factpulse/models/invoice_type_code_output.rb +2 -2
- data/lib/factpulse/models/invoicing_framework.rb +3 -20
- data/lib/factpulse/models/invoicing_framework_code.rb +2 -2
- data/lib/factpulse/models/issuer_role_code.rb +2 -2
- data/lib/factpulse/models/key_rotation_request.rb +2 -2
- data/lib/factpulse/models/key_rotation_response.rb +2 -2
- data/lib/factpulse/models/lifecycle_event.rb +300 -0
- data/lib/factpulse/models/lifecycle_response.rb +205 -0
- data/lib/factpulse/models/line_net_amount.rb +2 -2
- data/lib/factpulse/models/line_sub_type.rb +2 -2
- data/lib/factpulse/models/line_total_amount.rb +2 -2
- data/lib/factpulse/models/location_inner.rb +2 -2
- data/lib/factpulse/models/mandatory_note_schema.rb +2 -2
- data/lib/factpulse/models/manual_rate.rb +2 -2
- data/lib/factpulse/models/manual_vat_rate.rb +2 -2
- data/lib/factpulse/models/missing_field.rb +2 -2
- data/lib/factpulse/models/operation_nature.rb +2 -2
- data/lib/factpulse/models/output_format.rb +5 -3
- data/lib/factpulse/models/page_dimensions_schema.rb +2 -2
- data/lib/factpulse/models/parse_factur_x_response.rb +249 -0
- data/lib/factpulse/models/payee.rb +2 -2
- data/lib/factpulse/models/payment_amount_by_rate.rb +2 -2
- data/lib/factpulse/models/payment_card.rb +2 -2
- data/lib/factpulse/models/payment_means.rb +2 -2
- data/lib/factpulse/models/pdf_validation_result_api.rb +2 -2
- data/lib/factpulse/models/pdp_config_response.rb +2 -2
- data/lib/factpulse/models/pdp_config_update_request.rb +2 -2
- data/lib/factpulse/models/pdp_credentials.rb +2 -2
- data/lib/factpulse/models/percentage.rb +2 -2
- data/lib/factpulse/models/postal_address.rb +2 -2
- data/lib/factpulse/models/price_allowance_amount.rb +2 -2
- data/lib/factpulse/models/price_basis_quantity.rb +2 -2
- data/lib/factpulse/models/processing_options.rb +2 -2
- data/lib/factpulse/models/processing_rule.rb +6 -3
- data/lib/factpulse/models/product_characteristic.rb +2 -2
- data/lib/factpulse/models/product_classification.rb +2 -2
- data/lib/factpulse/models/quantity.rb +2 -2
- data/lib/factpulse/models/rate.rb +2 -2
- data/lib/factpulse/models/rate1.rb +2 -2
- data/lib/factpulse/models/reason_code_info.rb +2 -2
- data/lib/factpulse/models/reason_codes_response.rb +2 -2
- data/lib/factpulse/models/recipient.rb +2 -2
- data/lib/factpulse/models/recipient_input.rb +2 -2
- data/lib/factpulse/models/refusee_request.rb +2 -2
- data/lib/factpulse/models/report_issuer.rb +2 -2
- data/lib/factpulse/models/report_period.rb +2 -2
- data/lib/factpulse/models/report_sender.rb +2 -2
- data/lib/factpulse/models/rounding_amount.rb +2 -2
- data/lib/factpulse/models/schematron_validation_error.rb +2 -2
- data/lib/factpulse/models/scheme_id.rb +2 -2
- data/lib/factpulse/models/search_flow_request.rb +2 -2
- data/lib/factpulse/models/search_flow_response.rb +2 -2
- data/lib/factpulse/models/search_services_response.rb +2 -2
- data/lib/factpulse/models/search_structure_request.rb +3 -3
- data/lib/factpulse/models/search_structure_response.rb +2 -2
- data/lib/factpulse/models/secret_status.rb +2 -2
- data/lib/factpulse/models/sellercountry.rb +2 -2
- data/lib/factpulse/models/signature_info.rb +2 -2
- data/lib/factpulse/models/signature_info_api.rb +2 -2
- data/lib/factpulse/models/signature_parameters.rb +2 -2
- data/lib/factpulse/models/signature_success_result.rb +394 -0
- data/lib/factpulse/models/signature_task_status.rb +223 -0
- data/lib/factpulse/models/signature_task_status_result.rb +55 -0
- data/lib/factpulse/models/simplified_cdar_response.rb +2 -2
- data/lib/factpulse/models/simplified_invoice_data.rb +2 -2
- data/lib/factpulse/models/status_code_info.rb +2 -2
- data/lib/factpulse/models/status_codes_response.rb +2 -2
- data/lib/factpulse/models/structure_info.rb +2 -2
- data/lib/factpulse/models/structure_parameters.rb +2 -2
- data/lib/factpulse/models/structure_service.rb +2 -2
- data/lib/factpulse/models/submission_mode.rb +2 -2
- data/lib/factpulse/models/submit_aggregated_report_request.rb +2 -2
- data/lib/factpulse/models/submit_cdar_request.rb +2 -2
- data/lib/factpulse/models/submit_cdar_response.rb +2 -2
- data/lib/factpulse/models/submit_cdarxml_request.rb +2 -2
- data/lib/factpulse/models/submit_complete_invoice_request.rb +2 -2
- data/lib/factpulse/models/submit_complete_invoice_response.rb +33 -4
- data/lib/factpulse/models/submit_e_reporting_request.rb +2 -2
- data/lib/factpulse/models/submit_e_reporting_response.rb +2 -2
- data/lib/factpulse/models/submit_flow_request.rb +2 -2
- data/lib/factpulse/models/submit_flow_response.rb +2 -2
- data/lib/factpulse/models/submit_gross_amount.rb +2 -2
- data/lib/factpulse/models/submit_invoice_request.rb +3 -3
- data/lib/factpulse/models/submit_invoice_response.rb +2 -2
- data/lib/factpulse/models/submit_net_amount.rb +2 -2
- data/lib/factpulse/models/submit_vat_amount.rb +2 -2
- data/lib/factpulse/models/supplementary_attachment.rb +2 -2
- data/lib/factpulse/models/supplier.rb +4 -18
- data/lib/factpulse/models/task_error_result.rb +257 -0
- data/lib/factpulse/models/task_response.rb +2 -2
- data/lib/factpulse/models/tax_breakdown_input.rb +2 -2
- data/lib/factpulse/models/tax_due_date_type.rb +2 -2
- data/lib/factpulse/models/tax_representative.rb +2 -2
- data/lib/factpulse/models/taxable_amount.rb +2 -2
- data/lib/factpulse/models/taxableamount.rb +2 -2
- data/lib/factpulse/models/taxamount.rb +2 -2
- data/lib/factpulse/models/taxamount1.rb +2 -2
- data/lib/factpulse/models/taxamount2.rb +2 -2
- data/lib/factpulse/models/taxexclusiveamount.rb +2 -2
- data/lib/factpulse/models/taxexclusiveamount1.rb +2 -2
- data/lib/factpulse/models/total_gross_amount.rb +2 -2
- data/lib/factpulse/models/total_net_amount.rb +2 -2
- data/lib/factpulse/models/total_vat_amount.rb +2 -2
- data/lib/factpulse/models/transaction_category.rb +2 -2
- data/lib/factpulse/models/transmission_type_code.rb +2 -2
- data/lib/factpulse/models/unit_net_price.rb +2 -2
- data/lib/factpulse/models/unit_of_measure.rb +17 -3
- data/lib/factpulse/models/validate_cdar_request.rb +2 -2
- data/lib/factpulse/models/validate_cdar_response.rb +4 -4
- data/lib/factpulse/models/validate_e_reporting_request.rb +2 -2
- data/lib/factpulse/models/validate_e_reporting_response.rb +2 -2
- data/lib/factpulse/models/validation_error.rb +2 -2
- data/lib/factpulse/models/validation_error_detail.rb +2 -2
- data/lib/factpulse/models/validation_error_response.rb +22 -69
- data/lib/factpulse/models/validation_info.rb +2 -2
- data/lib/factpulse/models/validation_success_response.rb +2 -2
- data/lib/factpulse/models/validation_success_task_result.rb +210 -0
- data/lib/factpulse/models/validation_task_status.rb +223 -0
- data/lib/factpulse/models/validation_task_status_result.rb +55 -0
- data/lib/factpulse/models/vat_accounting_code.rb +2 -2
- data/lib/factpulse/models/vat_amount.rb +2 -2
- data/lib/factpulse/models/vat_category.rb +2 -2
- data/lib/factpulse/models/vat_line.rb +2 -2
- data/lib/factpulse/models/vat_point_date_code.rb +2 -2
- data/lib/factpulse/models/vat_rate.rb +2 -2
- data/lib/factpulse/models/vatex_code_info.rb +247 -0
- data/lib/factpulse/models/vatex_codes_response.rb +204 -0
- data/lib/factpulse/models/verification_success_response.rb +2 -2
- data/lib/factpulse/models/verification_success_task_result.rb +210 -0
- data/lib/factpulse/models/verification_typed_task_status.rb +223 -0
- data/lib/factpulse/models/verification_typed_task_status_result.rb +55 -0
- data/lib/factpulse/models/verified_field_schema.rb +2 -2
- data/lib/factpulse/models/webhook_secret_delete_response.rb +2 -2
- data/lib/factpulse/models/webhook_secret_generate_response.rb +2 -2
- data/lib/factpulse/models/webhook_secret_status_response.rb +2 -2
- data/lib/factpulse/version.rb +3 -3
- data/lib/factpulse.rb +57 -24
- metadata +167 -101
- 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/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -26
- 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_directory_line_body.rb +0 -156
- data/lib/factpulse/models/afnor_create_directory_line_body_addressing_information.rb +0 -294
- data/lib/factpulse/models/afnor_create_directory_line_body_period.rb +0 -175
- data/lib/factpulse/models/afnor_create_routing_code_body.rb +0 -412
- data/lib/factpulse/models/afnor_diffusion_status.rb +0 -40
- data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.rb +0 -178
- data/lib/factpulse/models/afnor_directory_line_post201_response.rb +0 -187
- data/lib/factpulse/models/afnor_facility_nature.rb +0 -40
- data/lib/factpulse/models/afnor_legal_unit_payload_included_no_siren.rb +0 -207
- data/lib/factpulse/models/afnor_platform_status.rb +0 -40
- data/lib/factpulse/models/afnor_routing_code_post201_response.rb +0 -228
- data/lib/factpulse/models/afnor_update_patch_directory_line_body.rb +0 -148
- data/lib/factpulse/models/afnor_update_patch_routing_code_body.rb +0 -258
- data/lib/factpulse/models/afnor_update_put_routing_code_body.rb +0 -289
- data/lib/factpulse/models/afnor_webhook_callback_content.rb +0 -148
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb +0 -259
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_validation_validation_error_response.rb +0 -168
|
@@ -0,0 +1,355 @@
|
|
|
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-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module FactPulse
|
|
17
|
+
# Successful result from task_convert_document.
|
|
18
|
+
class ConversionSuccessTaskResult < ApiModelBase
|
|
19
|
+
attr_accessor :status
|
|
20
|
+
|
|
21
|
+
attr_accessor :conversion_id
|
|
22
|
+
|
|
23
|
+
attr_accessor :document_type_code
|
|
24
|
+
|
|
25
|
+
attr_accessor :profile
|
|
26
|
+
|
|
27
|
+
attr_accessor :extraction
|
|
28
|
+
|
|
29
|
+
attr_accessor :processing_time_ms
|
|
30
|
+
|
|
31
|
+
attr_accessor :pdf_regenerated
|
|
32
|
+
|
|
33
|
+
attr_accessor :pdf_regenerated_reason
|
|
34
|
+
|
|
35
|
+
attr_accessor :content_b64
|
|
36
|
+
|
|
37
|
+
attr_accessor :xml_content
|
|
38
|
+
|
|
39
|
+
class EnumAttributeValidator
|
|
40
|
+
attr_reader :datatype
|
|
41
|
+
attr_reader :allowable_values
|
|
42
|
+
|
|
43
|
+
def initialize(datatype, allowable_values)
|
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
|
45
|
+
case datatype.to_s
|
|
46
|
+
when /Integer/i
|
|
47
|
+
value.to_i
|
|
48
|
+
when /Float/i
|
|
49
|
+
value.to_f
|
|
50
|
+
else
|
|
51
|
+
value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def valid?(value)
|
|
57
|
+
!value || allowable_values.include?(value)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
62
|
+
def self.attribute_map
|
|
63
|
+
{
|
|
64
|
+
:'status' => :'status',
|
|
65
|
+
:'conversion_id' => :'conversion_id',
|
|
66
|
+
:'document_type_code' => :'document_type_code',
|
|
67
|
+
:'profile' => :'profile',
|
|
68
|
+
:'extraction' => :'extraction',
|
|
69
|
+
:'processing_time_ms' => :'processing_time_ms',
|
|
70
|
+
:'pdf_regenerated' => :'pdf_regenerated',
|
|
71
|
+
:'pdf_regenerated_reason' => :'pdf_regenerated_reason',
|
|
72
|
+
:'content_b64' => :'content_b64',
|
|
73
|
+
:'xml_content' => :'xml_content'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns attribute mapping this model knows about
|
|
78
|
+
def self.acceptable_attribute_map
|
|
79
|
+
attribute_map
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Returns all the JSON keys this model knows about
|
|
83
|
+
def self.acceptable_attributes
|
|
84
|
+
acceptable_attribute_map.values
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Attribute type mapping.
|
|
88
|
+
def self.openapi_types
|
|
89
|
+
{
|
|
90
|
+
:'status' => :'String',
|
|
91
|
+
:'conversion_id' => :'String',
|
|
92
|
+
:'document_type_code' => :'Integer',
|
|
93
|
+
:'profile' => :'String',
|
|
94
|
+
:'extraction' => :'ConversionExtractionInfo',
|
|
95
|
+
:'processing_time_ms' => :'Integer',
|
|
96
|
+
:'pdf_regenerated' => :'Boolean',
|
|
97
|
+
:'pdf_regenerated_reason' => :'String',
|
|
98
|
+
:'content_b64' => :'String',
|
|
99
|
+
:'xml_content' => :'String'
|
|
100
|
+
}
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# List of attributes with nullable: true
|
|
104
|
+
def self.openapi_nullable
|
|
105
|
+
Set.new([
|
|
106
|
+
:'pdf_regenerated_reason',
|
|
107
|
+
:'content_b64',
|
|
108
|
+
:'xml_content'
|
|
109
|
+
])
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Initializes the object
|
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
114
|
+
def initialize(attributes = {})
|
|
115
|
+
if (!attributes.is_a?(Hash))
|
|
116
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ConversionSuccessTaskResult` initialize method"
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
120
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
121
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
122
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
123
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ConversionSuccessTaskResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
124
|
+
end
|
|
125
|
+
h[k.to_sym] = v
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'status')
|
|
129
|
+
self.status = attributes[:'status']
|
|
130
|
+
else
|
|
131
|
+
self.status = 'SUCCESS'
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'conversion_id')
|
|
135
|
+
self.conversion_id = attributes[:'conversion_id']
|
|
136
|
+
else
|
|
137
|
+
self.conversion_id = nil
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'document_type_code')
|
|
141
|
+
self.document_type_code = attributes[:'document_type_code']
|
|
142
|
+
else
|
|
143
|
+
self.document_type_code = nil
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'profile')
|
|
147
|
+
self.profile = attributes[:'profile']
|
|
148
|
+
else
|
|
149
|
+
self.profile = nil
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'extraction')
|
|
153
|
+
self.extraction = attributes[:'extraction']
|
|
154
|
+
else
|
|
155
|
+
self.extraction = nil
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'processing_time_ms')
|
|
159
|
+
self.processing_time_ms = attributes[:'processing_time_ms']
|
|
160
|
+
else
|
|
161
|
+
self.processing_time_ms = nil
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'pdf_regenerated')
|
|
165
|
+
self.pdf_regenerated = attributes[:'pdf_regenerated']
|
|
166
|
+
else
|
|
167
|
+
self.pdf_regenerated = false
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'pdf_regenerated_reason')
|
|
171
|
+
self.pdf_regenerated_reason = attributes[:'pdf_regenerated_reason']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'content_b64')
|
|
175
|
+
self.content_b64 = attributes[:'content_b64']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'xml_content')
|
|
179
|
+
self.xml_content = attributes[:'xml_content']
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
184
|
+
# @return Array for valid properties with the reasons
|
|
185
|
+
def list_invalid_properties
|
|
186
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
187
|
+
invalid_properties = Array.new
|
|
188
|
+
if @conversion_id.nil?
|
|
189
|
+
invalid_properties.push('invalid value for "conversion_id", conversion_id cannot be nil.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if @document_type_code.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "document_type_code", document_type_code cannot be nil.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if @profile.nil?
|
|
197
|
+
invalid_properties.push('invalid value for "profile", profile cannot be nil.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @extraction.nil?
|
|
201
|
+
invalid_properties.push('invalid value for "extraction", extraction cannot be nil.')
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if @processing_time_ms.nil?
|
|
205
|
+
invalid_properties.push('invalid value for "processing_time_ms", processing_time_ms cannot be nil.')
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
invalid_properties
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Check to see if the all the properties in the model are valid
|
|
212
|
+
# @return true if the model is valid
|
|
213
|
+
def valid?
|
|
214
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
215
|
+
status_validator = EnumAttributeValidator.new('String', ["SUCCESS"])
|
|
216
|
+
return false unless status_validator.valid?(@status)
|
|
217
|
+
return false if @conversion_id.nil?
|
|
218
|
+
return false if @document_type_code.nil?
|
|
219
|
+
return false if @profile.nil?
|
|
220
|
+
return false if @extraction.nil?
|
|
221
|
+
return false if @processing_time_ms.nil?
|
|
222
|
+
true
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
226
|
+
# @param [Object] status Object to be assigned
|
|
227
|
+
def status=(status)
|
|
228
|
+
validator = EnumAttributeValidator.new('String', ["SUCCESS"])
|
|
229
|
+
unless validator.valid?(status)
|
|
230
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
231
|
+
end
|
|
232
|
+
@status = status
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Custom attribute writer method with validation
|
|
236
|
+
# @param [Object] conversion_id Value to be assigned
|
|
237
|
+
def conversion_id=(conversion_id)
|
|
238
|
+
if conversion_id.nil?
|
|
239
|
+
fail ArgumentError, 'conversion_id cannot be nil'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
@conversion_id = conversion_id
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Custom attribute writer method with validation
|
|
246
|
+
# @param [Object] document_type_code Value to be assigned
|
|
247
|
+
def document_type_code=(document_type_code)
|
|
248
|
+
if document_type_code.nil?
|
|
249
|
+
fail ArgumentError, 'document_type_code cannot be nil'
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
@document_type_code = document_type_code
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Custom attribute writer method with validation
|
|
256
|
+
# @param [Object] profile Value to be assigned
|
|
257
|
+
def profile=(profile)
|
|
258
|
+
if profile.nil?
|
|
259
|
+
fail ArgumentError, 'profile cannot be nil'
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
@profile = profile
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Custom attribute writer method with validation
|
|
266
|
+
# @param [Object] extraction Value to be assigned
|
|
267
|
+
def extraction=(extraction)
|
|
268
|
+
if extraction.nil?
|
|
269
|
+
fail ArgumentError, 'extraction cannot be nil'
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
@extraction = extraction
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Custom attribute writer method with validation
|
|
276
|
+
# @param [Object] processing_time_ms Value to be assigned
|
|
277
|
+
def processing_time_ms=(processing_time_ms)
|
|
278
|
+
if processing_time_ms.nil?
|
|
279
|
+
fail ArgumentError, 'processing_time_ms cannot be nil'
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
@processing_time_ms = processing_time_ms
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Checks equality by comparing each attribute.
|
|
286
|
+
# @param [Object] Object to be compared
|
|
287
|
+
def ==(o)
|
|
288
|
+
return true if self.equal?(o)
|
|
289
|
+
self.class == o.class &&
|
|
290
|
+
status == o.status &&
|
|
291
|
+
conversion_id == o.conversion_id &&
|
|
292
|
+
document_type_code == o.document_type_code &&
|
|
293
|
+
profile == o.profile &&
|
|
294
|
+
extraction == o.extraction &&
|
|
295
|
+
processing_time_ms == o.processing_time_ms &&
|
|
296
|
+
pdf_regenerated == o.pdf_regenerated &&
|
|
297
|
+
pdf_regenerated_reason == o.pdf_regenerated_reason &&
|
|
298
|
+
content_b64 == o.content_b64 &&
|
|
299
|
+
xml_content == o.xml_content
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# @see the `==` method
|
|
303
|
+
# @param [Object] Object to be compared
|
|
304
|
+
def eql?(o)
|
|
305
|
+
self == o
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Calculates hash code according to all attributes.
|
|
309
|
+
# @return [Integer] Hash code
|
|
310
|
+
def hash
|
|
311
|
+
[status, conversion_id, document_type_code, profile, extraction, processing_time_ms, pdf_regenerated, pdf_regenerated_reason, content_b64, xml_content].hash
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Builds the object from hash
|
|
315
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
316
|
+
# @return [Object] Returns the model itself
|
|
317
|
+
def self.build_from_hash(attributes)
|
|
318
|
+
return nil unless attributes.is_a?(Hash)
|
|
319
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
320
|
+
transformed_hash = {}
|
|
321
|
+
openapi_types.each_pair do |key, type|
|
|
322
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
323
|
+
transformed_hash["#{key}"] = nil
|
|
324
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
325
|
+
# check to ensure the input is an array given that the attribute
|
|
326
|
+
# is documented as an array but the input is not
|
|
327
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
328
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
329
|
+
end
|
|
330
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
331
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
new(transformed_hash)
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Returns the object in the form of hash
|
|
338
|
+
# @return [Hash] Returns the object in the form of hash
|
|
339
|
+
def to_hash
|
|
340
|
+
hash = {}
|
|
341
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
342
|
+
value = self.send(attr)
|
|
343
|
+
if value.nil?
|
|
344
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
345
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
hash[param] = _to_hash(value)
|
|
349
|
+
end
|
|
350
|
+
hash
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
end
|
|
@@ -0,0 +1,223 @@
|
|
|
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-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module FactPulse
|
|
17
|
+
# Typed task status for document conversion.
|
|
18
|
+
class ConversionTaskStatus < ApiModelBase
|
|
19
|
+
attr_accessor :task_id
|
|
20
|
+
|
|
21
|
+
attr_accessor :status
|
|
22
|
+
|
|
23
|
+
attr_accessor :result
|
|
24
|
+
|
|
25
|
+
class EnumAttributeValidator
|
|
26
|
+
attr_reader :datatype
|
|
27
|
+
attr_reader :allowable_values
|
|
28
|
+
|
|
29
|
+
def initialize(datatype, allowable_values)
|
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
|
31
|
+
case datatype.to_s
|
|
32
|
+
when /Integer/i
|
|
33
|
+
value.to_i
|
|
34
|
+
when /Float/i
|
|
35
|
+
value.to_f
|
|
36
|
+
else
|
|
37
|
+
value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def valid?(value)
|
|
43
|
+
!value || allowable_values.include?(value)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'task_id' => :'taskId',
|
|
51
|
+
:'status' => :'status',
|
|
52
|
+
:'result' => :'result'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns attribute mapping this model knows about
|
|
57
|
+
def self.acceptable_attribute_map
|
|
58
|
+
attribute_map
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns all the JSON keys this model knows about
|
|
62
|
+
def self.acceptable_attributes
|
|
63
|
+
acceptable_attribute_map.values
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute type mapping.
|
|
67
|
+
def self.openapi_types
|
|
68
|
+
{
|
|
69
|
+
:'task_id' => :'String',
|
|
70
|
+
:'status' => :'CeleryStatus',
|
|
71
|
+
:'result' => :'ConversionTaskStatusResult'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
:'result'
|
|
79
|
+
])
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Initializes the object
|
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
84
|
+
def initialize(attributes = {})
|
|
85
|
+
if (!attributes.is_a?(Hash))
|
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ConversionTaskStatus` initialize method"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
90
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
92
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ConversionTaskStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
94
|
+
end
|
|
95
|
+
h[k.to_sym] = v
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'task_id')
|
|
99
|
+
self.task_id = attributes[:'task_id']
|
|
100
|
+
else
|
|
101
|
+
self.task_id = nil
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'status')
|
|
105
|
+
self.status = attributes[:'status']
|
|
106
|
+
else
|
|
107
|
+
self.status = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'result')
|
|
111
|
+
self.result = attributes[:'result']
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
116
|
+
# @return Array for valid properties with the reasons
|
|
117
|
+
def list_invalid_properties
|
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
|
+
invalid_properties = Array.new
|
|
120
|
+
if @task_id.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "task_id", task_id cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @status.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
invalid_properties
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Check to see if the all the properties in the model are valid
|
|
132
|
+
# @return true if the model is valid
|
|
133
|
+
def valid?
|
|
134
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
135
|
+
return false if @task_id.nil?
|
|
136
|
+
return false if @status.nil?
|
|
137
|
+
true
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Custom attribute writer method with validation
|
|
141
|
+
# @param [Object] task_id Value to be assigned
|
|
142
|
+
def task_id=(task_id)
|
|
143
|
+
if task_id.nil?
|
|
144
|
+
fail ArgumentError, 'task_id cannot be nil'
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
@task_id = task_id
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Custom attribute writer method with validation
|
|
151
|
+
# @param [Object] status Value to be assigned
|
|
152
|
+
def status=(status)
|
|
153
|
+
if status.nil?
|
|
154
|
+
fail ArgumentError, 'status cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
@status = status
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Checks equality by comparing each attribute.
|
|
161
|
+
# @param [Object] Object to be compared
|
|
162
|
+
def ==(o)
|
|
163
|
+
return true if self.equal?(o)
|
|
164
|
+
self.class == o.class &&
|
|
165
|
+
task_id == o.task_id &&
|
|
166
|
+
status == o.status &&
|
|
167
|
+
result == o.result
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @see the `==` method
|
|
171
|
+
# @param [Object] Object to be compared
|
|
172
|
+
def eql?(o)
|
|
173
|
+
self == o
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Calculates hash code according to all attributes.
|
|
177
|
+
# @return [Integer] Hash code
|
|
178
|
+
def hash
|
|
179
|
+
[task_id, status, result].hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Builds the object from hash
|
|
183
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
184
|
+
# @return [Object] Returns the model itself
|
|
185
|
+
def self.build_from_hash(attributes)
|
|
186
|
+
return nil unless attributes.is_a?(Hash)
|
|
187
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
188
|
+
transformed_hash = {}
|
|
189
|
+
openapi_types.each_pair do |key, type|
|
|
190
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
191
|
+
transformed_hash["#{key}"] = nil
|
|
192
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
193
|
+
# check to ensure the input is an array given that the attribute
|
|
194
|
+
# is documented as an array but the input is not
|
|
195
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
196
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
197
|
+
end
|
|
198
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
199
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
new(transformed_hash)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Returns the object in the form of hash
|
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
|
207
|
+
def to_hash
|
|
208
|
+
hash = {}
|
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
210
|
+
value = self.send(attr)
|
|
211
|
+
if value.nil?
|
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
hash[param] = _to_hash(value)
|
|
217
|
+
end
|
|
218
|
+
hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
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-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module FactPulse
|
|
17
|
+
module ConversionTaskStatusResult
|
|
18
|
+
class << self
|
|
19
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
20
|
+
def openapi_one_of
|
|
21
|
+
[
|
|
22
|
+
:'ConversionErrorResult',
|
|
23
|
+
:'ConversionPendingInputResult',
|
|
24
|
+
:'ConversionSuccessTaskResult',
|
|
25
|
+
:'ConversionValidationFailedResult'
|
|
26
|
+
]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Discriminator's property name (OpenAPI v3)
|
|
30
|
+
def openapi_discriminator_name
|
|
31
|
+
:'status'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Discriminator's mapping (OpenAPI v3)
|
|
35
|
+
def openapi_discriminator_mapping
|
|
36
|
+
{
|
|
37
|
+
:'ERROR' => :'ConversionErrorResult',
|
|
38
|
+
:'PENDING_INPUT' => :'ConversionPendingInputResult',
|
|
39
|
+
:'SUCCESS' => :'ConversionSuccessTaskResult',
|
|
40
|
+
:'VALIDATION_FAILED' => :'ConversionValidationFailedResult'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Builds the object
|
|
45
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
46
|
+
# @return [Object] Returns the model or the data itself
|
|
47
|
+
def build(data)
|
|
48
|
+
discriminator_value = data[openapi_discriminator_name]
|
|
49
|
+
return nil if discriminator_value.nil?
|
|
50
|
+
|
|
51
|
+
klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
|
|
52
|
+
return nil unless klass
|
|
53
|
+
|
|
54
|
+
FactPulse.const_get(klass).build_from_hash(data)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|