factpulse 4.0.2 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +12 -0
- data/docs/AFNORPDPPAApi.md +9 -2
- data/docs/AsyncTasksApi.md +6 -1
- data/docs/ChorusProApi.md +96 -16
- data/docs/ClientManagementApi.md +359 -13
- data/docs/ConvertResumeRequest.md +5 -1
- data/docs/DownloadsApi.md +12 -2
- data/docs/ElectronicSignatureApi.md +24 -4
- data/docs/FacturXConversionApi.md +101 -4
- data/docs/FacturXGenerationApi.md +18 -3
- data/docs/FacturXPDFXMLVerificationApi.md +18 -3
- data/docs/FacturXValidationApi.md +18 -3
- data/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +18 -0
- data/docs/Flux10EReportingApi.md +36 -6
- data/docs/Flux6InvoiceLifecycleCDARApi.md +18 -3
- data/docs/HealthApi.md +6 -1
- data/docs/KeyRotationRequest.md +20 -0
- data/docs/KeyRotationResponse.md +24 -0
- data/docs/PDPConfigResponse.md +2 -0
- data/docs/PDPConfigUpdateRequest.md +3 -1
- data/docs/SecretStatus.md +5 -1
- data/docs/ValidateCDARResponse.md +2 -2
- data/docs/ValidationErrorResponse.md +8 -2
- data/docs/WebhookSecretDeleteResponse.md +20 -0
- data/docs/WebhookSecretGenerateResponse.md +24 -0
- data/docs/WebhookSecretStatusResponse.md +20 -0
- data/lib/factpulse/api/afnorpdppa_api.rb +4 -1
- data/lib/factpulse/api/async_tasks_api.rb +1 -1
- data/lib/factpulse/api/chorus_pro_api.rb +16 -16
- data/lib/factpulse/api/client_management_api.rb +276 -10
- data/lib/factpulse/api/downloads_api.rb +2 -2
- data/lib/factpulse/api/electronic_signature_api.rb +4 -4
- data/lib/factpulse/api/factur_x_conversion_api.rb +78 -4
- data/lib/factpulse/api/factur_x_generation_api.rb +3 -3
- data/lib/factpulse/api/factur_x_validation_api.rb +3 -3
- data/lib/factpulse/api/factur_xpdfxml_verification_api.rb +3 -3
- data/lib/factpulse/api/flux10_e_reporting_api.rb +6 -6
- data/lib/factpulse/api/flux6_invoice_lifecycle_cdar_api.rb +3 -3
- data/lib/factpulse/api/health_api.rb +1 -1
- data/lib/factpulse/configuration.rb +7 -0
- data/lib/factpulse/models/convert_resume_request.rb +27 -5
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_validation_validation_error_response.rb +168 -0
- data/lib/factpulse/models/key_rotation_request.rb +211 -0
- data/lib/factpulse/models/key_rotation_response.rb +232 -0
- data/lib/factpulse/models/pdp_config_response.rb +11 -1
- data/lib/factpulse/models/pdp_config_update_request.rb +49 -5
- data/lib/factpulse/models/secret_status.rb +24 -4
- data/lib/factpulse/models/validate_cdar_response.rb +2 -2
- data/lib/factpulse/models/validation_error_response.rb +67 -20
- data/lib/factpulse/models/{facture_electronique_rest_api_schemas_cdar_validation_error_response.rb → webhook_secret_delete_response.rb} +25 -47
- data/lib/factpulse/models/webhook_secret_generate_response.rb +247 -0
- data/lib/factpulse/models/webhook_secret_status_response.rb +176 -0
- data/lib/factpulse/version.rb +1 -1
- data/lib/factpulse.rb +6 -1
- metadata +14 -4
- data/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +0 -24
|
@@ -63,7 +63,7 @@ module FactPulse
|
|
|
63
63
|
return_type = opts[:debug_return_type] || 'Object'
|
|
64
64
|
|
|
65
65
|
# auth_names
|
|
66
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
66
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
67
67
|
|
|
68
68
|
new_options = opts.merge(
|
|
69
69
|
:operation => :"DownloadsApi.check_file_api_v1_download_download_id_head",
|
|
@@ -129,7 +129,7 @@ module FactPulse
|
|
|
129
129
|
return_type = opts[:debug_return_type] || 'Object'
|
|
130
130
|
|
|
131
131
|
# auth_names
|
|
132
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
132
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
133
133
|
|
|
134
134
|
new_options = opts.merge(
|
|
135
135
|
:operation => :"DownloadsApi.download_file_api_v1_download_download_id_get",
|
|
@@ -68,7 +68,7 @@ module FactPulse
|
|
|
68
68
|
return_type = opts[:debug_return_type] || 'GenerateCertificateResponse'
|
|
69
69
|
|
|
70
70
|
# auth_names
|
|
71
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
72
72
|
|
|
73
73
|
new_options = opts.merge(
|
|
74
74
|
:operation => :"ElectronicSignatureApi.generate_test_certificate_api_v1_processing_generate_test_certificate_post",
|
|
@@ -155,7 +155,7 @@ module FactPulse
|
|
|
155
155
|
return_type = opts[:debug_return_type] || 'Object'
|
|
156
156
|
|
|
157
157
|
# auth_names
|
|
158
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
158
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
159
159
|
|
|
160
160
|
new_options = opts.merge(
|
|
161
161
|
:operation => :"ElectronicSignatureApi.sign_pdf_api_v1_processing_sign_pdf_post",
|
|
@@ -248,7 +248,7 @@ module FactPulse
|
|
|
248
248
|
return_type = opts[:debug_return_type] || 'Object'
|
|
249
249
|
|
|
250
250
|
# auth_names
|
|
251
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
251
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
252
252
|
|
|
253
253
|
new_options = opts.merge(
|
|
254
254
|
:operation => :"ElectronicSignatureApi.sign_pdf_async_api_v1_processing_sign_pdf_async_post",
|
|
@@ -317,7 +317,7 @@ module FactPulse
|
|
|
317
317
|
return_type = opts[:debug_return_type] || 'Object'
|
|
318
318
|
|
|
319
319
|
# auth_names
|
|
320
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
320
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
321
321
|
|
|
322
322
|
new_options = opts.merge(
|
|
323
323
|
:operation => :"ElectronicSignatureApi.validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post",
|
|
@@ -78,7 +78,7 @@ module FactPulse
|
|
|
78
78
|
return_type = opts[:debug_return_type] || 'Object'
|
|
79
79
|
|
|
80
80
|
# auth_names
|
|
81
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
81
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
82
82
|
|
|
83
83
|
new_options = opts.merge(
|
|
84
84
|
:operation => :"FacturXConversionApi.convert_document_async_api_v1_convert_async_post",
|
|
@@ -147,7 +147,7 @@ module FactPulse
|
|
|
147
147
|
return_type = opts[:debug_return_type] || 'Object'
|
|
148
148
|
|
|
149
149
|
# auth_names
|
|
150
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
150
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
151
151
|
|
|
152
152
|
new_options = opts.merge(
|
|
153
153
|
:operation => :"FacturXConversionApi.download_file_api_v1_convert_conversion_id_download_filename_get",
|
|
@@ -210,7 +210,7 @@ module FactPulse
|
|
|
210
210
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
211
211
|
|
|
212
212
|
# auth_names
|
|
213
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
213
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
214
214
|
|
|
215
215
|
new_options = opts.merge(
|
|
216
216
|
:operation => :"FacturXConversionApi.get_conversion_status_api_v1_convert_conversion_id_status_get",
|
|
@@ -284,7 +284,7 @@ module FactPulse
|
|
|
284
284
|
return_type = opts[:debug_return_type] || 'ConvertSuccessResponse'
|
|
285
285
|
|
|
286
286
|
# auth_names
|
|
287
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
287
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
288
288
|
|
|
289
289
|
new_options = opts.merge(
|
|
290
290
|
:operation => :"FacturXConversionApi.resume_conversion_api_v1_convert_conversion_id_resume_post",
|
|
@@ -302,5 +302,79 @@ module FactPulse
|
|
|
302
302
|
end
|
|
303
303
|
return data, status_code, headers
|
|
304
304
|
end
|
|
305
|
+
|
|
306
|
+
# Resume a conversion asynchronously
|
|
307
|
+
# Resume a conversion after completing missing data or correcting errors (async mode). The OCR extraction is preserved, data is updated with corrections, then processing is performed asynchronously via Celery. ## Workflow 1. **Submit corrections**: Corrections are validated and task is queued 2. **Celery Task**: Task processes corrections and generates Factur-X 3. **Callback**: Webhook notification on completion ## Possible responses - **202**: Task accepted, processing - **404**: Conversion not found or expired
|
|
308
|
+
# @param conversion_id [String] Conversion ID returned by POST /convert (UUID format)
|
|
309
|
+
# @param convert_resume_request [ConvertResumeRequest]
|
|
310
|
+
# @param [Hash] opts the optional parameters
|
|
311
|
+
# @return [Object]
|
|
312
|
+
def resume_conversion_async_api_v1_convert_conversion_id_resume_async_post(conversion_id, convert_resume_request, opts = {})
|
|
313
|
+
data, _status_code, _headers = resume_conversion_async_api_v1_convert_conversion_id_resume_async_post_with_http_info(conversion_id, convert_resume_request, opts)
|
|
314
|
+
data
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Resume a conversion asynchronously
|
|
318
|
+
# Resume a conversion after completing missing data or correcting errors (async mode). The OCR extraction is preserved, data is updated with corrections, then processing is performed asynchronously via Celery. ## Workflow 1. **Submit corrections**: Corrections are validated and task is queued 2. **Celery Task**: Task processes corrections and generates Factur-X 3. **Callback**: Webhook notification on completion ## Possible responses - **202**: Task accepted, processing - **404**: Conversion not found or expired
|
|
319
|
+
# @param conversion_id [String] Conversion ID returned by POST /convert (UUID format)
|
|
320
|
+
# @param convert_resume_request [ConvertResumeRequest]
|
|
321
|
+
# @param [Hash] opts the optional parameters
|
|
322
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
323
|
+
def resume_conversion_async_api_v1_convert_conversion_id_resume_async_post_with_http_info(conversion_id, convert_resume_request, opts = {})
|
|
324
|
+
if @api_client.config.debugging
|
|
325
|
+
@api_client.config.logger.debug 'Calling API: FacturXConversionApi.resume_conversion_async_api_v1_convert_conversion_id_resume_async_post ...'
|
|
326
|
+
end
|
|
327
|
+
# verify the required parameter 'conversion_id' is set
|
|
328
|
+
if @api_client.config.client_side_validation && conversion_id.nil?
|
|
329
|
+
fail ArgumentError, "Missing the required parameter 'conversion_id' when calling FacturXConversionApi.resume_conversion_async_api_v1_convert_conversion_id_resume_async_post"
|
|
330
|
+
end
|
|
331
|
+
# verify the required parameter 'convert_resume_request' is set
|
|
332
|
+
if @api_client.config.client_side_validation && convert_resume_request.nil?
|
|
333
|
+
fail ArgumentError, "Missing the required parameter 'convert_resume_request' when calling FacturXConversionApi.resume_conversion_async_api_v1_convert_conversion_id_resume_async_post"
|
|
334
|
+
end
|
|
335
|
+
# resource path
|
|
336
|
+
local_var_path = '/api/v1/convert/{conversion_id}/resume/async'.sub('{' + 'conversion_id' + '}', CGI.escape(conversion_id.to_s))
|
|
337
|
+
|
|
338
|
+
# query parameters
|
|
339
|
+
query_params = opts[:query_params] || {}
|
|
340
|
+
|
|
341
|
+
# header parameters
|
|
342
|
+
header_params = opts[:header_params] || {}
|
|
343
|
+
# HTTP header 'Accept' (if needed)
|
|
344
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
345
|
+
# HTTP header 'Content-Type'
|
|
346
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
347
|
+
if !content_type.nil?
|
|
348
|
+
header_params['Content-Type'] = content_type
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# form parameters
|
|
352
|
+
form_params = opts[:form_params] || {}
|
|
353
|
+
|
|
354
|
+
# http body (model)
|
|
355
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(convert_resume_request)
|
|
356
|
+
|
|
357
|
+
# return_type
|
|
358
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
359
|
+
|
|
360
|
+
# auth_names
|
|
361
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
362
|
+
|
|
363
|
+
new_options = opts.merge(
|
|
364
|
+
:operation => :"FacturXConversionApi.resume_conversion_async_api_v1_convert_conversion_id_resume_async_post",
|
|
365
|
+
:header_params => header_params,
|
|
366
|
+
:query_params => query_params,
|
|
367
|
+
:form_params => form_params,
|
|
368
|
+
:body => post_body,
|
|
369
|
+
:auth_names => auth_names,
|
|
370
|
+
:return_type => return_type
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
374
|
+
if @api_client.config.debugging
|
|
375
|
+
@api_client.config.logger.debug "API called: FacturXConversionApi#resume_conversion_async_api_v1_convert_conversion_id_resume_async_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
376
|
+
end
|
|
377
|
+
return data, status_code, headers
|
|
378
|
+
end
|
|
305
379
|
end
|
|
306
380
|
end
|
|
@@ -90,7 +90,7 @@ module FactPulse
|
|
|
90
90
|
return_type = opts[:debug_return_type] || 'TaskResponse'
|
|
91
91
|
|
|
92
92
|
# auth_names
|
|
93
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
93
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
94
94
|
|
|
95
95
|
new_options = opts.merge(
|
|
96
96
|
:operation => :"FacturXGenerationApi.generate_invoice_api_v1_processing_generate_invoice_post",
|
|
@@ -158,7 +158,7 @@ module FactPulse
|
|
|
158
158
|
return_type = opts[:debug_return_type] || 'SubmitCompleteInvoiceResponse'
|
|
159
159
|
|
|
160
160
|
# auth_names
|
|
161
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
161
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
162
162
|
|
|
163
163
|
new_options = opts.merge(
|
|
164
164
|
:operation => :"FacturXGenerationApi.submit_complete_invoice_api_v1_processing_invoices_submit_complete_post",
|
|
@@ -232,7 +232,7 @@ module FactPulse
|
|
|
232
232
|
return_type = opts[:debug_return_type] || 'TaskResponse'
|
|
233
233
|
|
|
234
234
|
# auth_names
|
|
235
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
235
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
236
236
|
|
|
237
237
|
new_options = opts.merge(
|
|
238
238
|
:operation => :"FacturXGenerationApi.submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post",
|
|
@@ -78,7 +78,7 @@ module FactPulse
|
|
|
78
78
|
return_type = opts[:debug_return_type] || 'PDFValidationResultAPI'
|
|
79
79
|
|
|
80
80
|
# auth_names
|
|
81
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
81
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
82
82
|
|
|
83
83
|
new_options = opts.merge(
|
|
84
84
|
:operation => :"FacturXValidationApi.validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post",
|
|
@@ -159,7 +159,7 @@ module FactPulse
|
|
|
159
159
|
return_type = opts[:debug_return_type] || 'TaskResponse'
|
|
160
160
|
|
|
161
161
|
# auth_names
|
|
162
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
162
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
163
163
|
|
|
164
164
|
new_options = opts.merge(
|
|
165
165
|
:operation => :"FacturXValidationApi.validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post",
|
|
@@ -234,7 +234,7 @@ module FactPulse
|
|
|
234
234
|
return_type = opts[:debug_return_type] || 'ValidationSuccessResponse'
|
|
235
235
|
|
|
236
236
|
# auth_names
|
|
237
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
237
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
238
238
|
|
|
239
239
|
new_options = opts.merge(
|
|
240
240
|
:operation => :"FacturXValidationApi.validate_xml_api_v1_processing_validate_xml_post",
|
|
@@ -63,7 +63,7 @@ module FactPulse
|
|
|
63
63
|
return_type = opts[:debug_return_type] || 'AsyncTaskStatus'
|
|
64
64
|
|
|
65
65
|
# auth_names
|
|
66
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
66
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
67
67
|
|
|
68
68
|
new_options = opts.merge(
|
|
69
69
|
:operation => :"FacturXPDFXMLVerificationApi.get_verification_status_api_v1_verification_verify_async_task_id_status_get",
|
|
@@ -141,7 +141,7 @@ module FactPulse
|
|
|
141
141
|
return_type = opts[:debug_return_type] || 'TaskResponse'
|
|
142
142
|
|
|
143
143
|
# auth_names
|
|
144
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
144
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
145
145
|
|
|
146
146
|
new_options = opts.merge(
|
|
147
147
|
:operation => :"FacturXPDFXMLVerificationApi.verify_pdf_async_api_v1_verification_verify_async_post",
|
|
@@ -210,7 +210,7 @@ module FactPulse
|
|
|
210
210
|
return_type = opts[:debug_return_type] || 'VerificationSuccessResponse'
|
|
211
211
|
|
|
212
212
|
# auth_names
|
|
213
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
213
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
214
214
|
|
|
215
215
|
new_options = opts.merge(
|
|
216
216
|
:operation => :"FacturXPDFXMLVerificationApi.verify_pdf_sync_api_v1_verification_verify_post",
|
|
@@ -68,7 +68,7 @@ module FactPulse
|
|
|
68
68
|
return_type = opts[:debug_return_type] || 'GenerateAggregatedReportResponse'
|
|
69
69
|
|
|
70
70
|
# auth_names
|
|
71
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
72
72
|
|
|
73
73
|
new_options = opts.merge(
|
|
74
74
|
:operation => :"Flux10EReportingApi.generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post",
|
|
@@ -136,7 +136,7 @@ module FactPulse
|
|
|
136
136
|
return_type = opts[:debug_return_type] || 'GenerateEReportingResponse'
|
|
137
137
|
|
|
138
138
|
# auth_names
|
|
139
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
139
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
140
140
|
|
|
141
141
|
new_options = opts.merge(
|
|
142
142
|
:operation => :"Flux10EReportingApi.generate_ereporting_api_v1_ereporting_generate_post",
|
|
@@ -207,7 +207,7 @@ module FactPulse
|
|
|
207
207
|
return_type = opts[:debug_return_type]
|
|
208
208
|
|
|
209
209
|
# auth_names
|
|
210
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
210
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
211
211
|
|
|
212
212
|
new_options = opts.merge(
|
|
213
213
|
:operation => :"Flux10EReportingApi.generate_ereporting_download_api_v1_ereporting_generate_download_post",
|
|
@@ -612,7 +612,7 @@ module FactPulse
|
|
|
612
612
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
613
613
|
|
|
614
614
|
# auth_names
|
|
615
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
615
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
616
616
|
|
|
617
617
|
new_options = opts.merge(
|
|
618
618
|
:operation => :"Flux10EReportingApi.validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post",
|
|
@@ -680,7 +680,7 @@ module FactPulse
|
|
|
680
680
|
return_type = opts[:debug_return_type] || 'ValidateEReportingResponse'
|
|
681
681
|
|
|
682
682
|
# auth_names
|
|
683
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
683
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
684
684
|
|
|
685
685
|
new_options = opts.merge(
|
|
686
686
|
:operation => :"Flux10EReportingApi.validate_ereporting_api_v1_ereporting_validate_post",
|
|
@@ -755,7 +755,7 @@ module FactPulse
|
|
|
755
755
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
756
756
|
|
|
757
757
|
# auth_names
|
|
758
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
758
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
759
759
|
|
|
760
760
|
new_options = opts.merge(
|
|
761
761
|
:operation => :"Flux10EReportingApi.validate_xml_ereporting_api_v1_ereporting_validate_xml_post",
|
|
@@ -68,7 +68,7 @@ module FactPulse
|
|
|
68
68
|
return_type = opts[:debug_return_type] || 'GenerateCDARResponse'
|
|
69
69
|
|
|
70
70
|
# auth_names
|
|
71
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
72
72
|
|
|
73
73
|
new_options = opts.merge(
|
|
74
74
|
:operation => :"Flux6InvoiceLifecycleCDARApi.generate_cdar_api_v1_cdar_generate_post",
|
|
@@ -579,7 +579,7 @@ module FactPulse
|
|
|
579
579
|
return_type = opts[:debug_return_type] || 'ValidateCDARResponse'
|
|
580
580
|
|
|
581
581
|
# auth_names
|
|
582
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
582
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
583
583
|
|
|
584
584
|
new_options = opts.merge(
|
|
585
585
|
:operation => :"Flux6InvoiceLifecycleCDARApi.validate_cdar_api_v1_cdar_validate_post",
|
|
@@ -648,7 +648,7 @@ module FactPulse
|
|
|
648
648
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
649
649
|
|
|
650
650
|
# auth_names
|
|
651
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
651
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
652
652
|
|
|
653
653
|
new_options = opts.merge(
|
|
654
654
|
:operation => :"Flux6InvoiceLifecycleCDARApi.validate_xml_cdar_api_v1_cdar_validate_xml_post",
|
|
@@ -57,7 +57,7 @@ module FactPulse
|
|
|
57
57
|
return_type = opts[:debug_return_type] || 'Object'
|
|
58
58
|
|
|
59
59
|
# auth_names
|
|
60
|
-
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
60
|
+
auth_names = opts[:debug_auth_names] || ['APIKeyHeader', 'HTTPBearer']
|
|
61
61
|
|
|
62
62
|
new_options = opts.merge(
|
|
63
63
|
:operation => :"HealthApi.get_user_info_api_v1_me_get",
|
|
@@ -251,6 +251,13 @@ module FactPulse
|
|
|
251
251
|
key: 'Authorization',
|
|
252
252
|
value: "Bearer #{access_token_with_refresh}"
|
|
253
253
|
},
|
|
254
|
+
'APIKeyHeader' =>
|
|
255
|
+
{
|
|
256
|
+
type: 'api_key',
|
|
257
|
+
in: 'header',
|
|
258
|
+
key: 'X-API-Key',
|
|
259
|
+
value: api_key_with_prefix('X-API-Key')
|
|
260
|
+
},
|
|
254
261
|
}
|
|
255
262
|
end
|
|
256
263
|
|
|
@@ -14,15 +14,22 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
|
-
# Requete de reprise de conversion avec corrections. Le champ `overrides` accepte n'importe quel sous-ensemble de FacturXInvoice. Seuls les champs fournis seront mis a jour (merge profond). Exemple: { \"overrides\": { \"supplier\": { \"name\": \"Ma Société\", \"siret\": \"12345678901234\" }, \"totals\": { \"total_net_amount\": 1000.00 } } }
|
|
17
|
+
# Requete de reprise de conversion avec corrections. Le champ `overrides` accepte n'importe quel sous-ensemble de FacturXInvoice. Seuls les champs fournis seront mis a jour (merge profond). Exemple: { \"overrides\": { \"supplier\": { \"name\": \"Ma Société\", \"siret\": \"12345678901234\" }, \"totals\": { \"total_net_amount\": 1000.00 } }, \"callback_url\": \"https://example.com/webhook\", \"webhook_mode\": \"inline\" }
|
|
18
18
|
class ConvertResumeRequest < ApiModelBase
|
|
19
19
|
# Sous-ensemble de FacturXInvoice a mettre a jour (merge profond)
|
|
20
20
|
attr_accessor :overrides
|
|
21
21
|
|
|
22
|
+
attr_accessor :callback_url
|
|
23
|
+
|
|
24
|
+
# Mode de livraison webhook: 'inline' ou 'download_url'
|
|
25
|
+
attr_accessor :webhook_mode
|
|
26
|
+
|
|
22
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
28
|
def self.attribute_map
|
|
24
29
|
{
|
|
25
|
-
:'overrides' => :'overrides'
|
|
30
|
+
:'overrides' => :'overrides',
|
|
31
|
+
:'callback_url' => :'callback_url',
|
|
32
|
+
:'webhook_mode' => :'webhook_mode'
|
|
26
33
|
}
|
|
27
34
|
end
|
|
28
35
|
|
|
@@ -39,13 +46,16 @@ module FactPulse
|
|
|
39
46
|
# Attribute type mapping.
|
|
40
47
|
def self.openapi_types
|
|
41
48
|
{
|
|
42
|
-
:'overrides' => :'Hash<String, Object>'
|
|
49
|
+
:'overrides' => :'Hash<String, Object>',
|
|
50
|
+
:'callback_url' => :'String',
|
|
51
|
+
:'webhook_mode' => :'String'
|
|
43
52
|
}
|
|
44
53
|
end
|
|
45
54
|
|
|
46
55
|
# List of attributes with nullable: true
|
|
47
56
|
def self.openapi_nullable
|
|
48
57
|
Set.new([
|
|
58
|
+
:'callback_url',
|
|
49
59
|
])
|
|
50
60
|
end
|
|
51
61
|
|
|
@@ -70,6 +80,16 @@ module FactPulse
|
|
|
70
80
|
self.overrides = value
|
|
71
81
|
end
|
|
72
82
|
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'callback_url')
|
|
85
|
+
self.callback_url = attributes[:'callback_url']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'webhook_mode')
|
|
89
|
+
self.webhook_mode = attributes[:'webhook_mode']
|
|
90
|
+
else
|
|
91
|
+
self.webhook_mode = 'inline'
|
|
92
|
+
end
|
|
73
93
|
end
|
|
74
94
|
|
|
75
95
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -92,7 +112,9 @@ module FactPulse
|
|
|
92
112
|
def ==(o)
|
|
93
113
|
return true if self.equal?(o)
|
|
94
114
|
self.class == o.class &&
|
|
95
|
-
overrides == o.overrides
|
|
115
|
+
overrides == o.overrides &&
|
|
116
|
+
callback_url == o.callback_url &&
|
|
117
|
+
webhook_mode == o.webhook_mode
|
|
96
118
|
end
|
|
97
119
|
|
|
98
120
|
# @see the `==` method
|
|
@@ -104,7 +126,7 @@ module FactPulse
|
|
|
104
126
|
# Calculates hash code according to all attributes.
|
|
105
127
|
# @return [Integer] Hash code
|
|
106
128
|
def hash
|
|
107
|
-
[overrides].hash
|
|
129
|
+
[overrides, callback_url, webhook_mode].hash
|
|
108
130
|
end
|
|
109
131
|
|
|
110
132
|
# Builds the object from hash
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#FactPulse REST API
|
|
3
|
+
|
|
4
|
+
# REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X - Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 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.20.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module FactPulse
|
|
17
|
+
# Response for validation errors.
|
|
18
|
+
class FactureElectroniqueRestApiSchemasValidationValidationErrorResponse < ApiModelBase
|
|
19
|
+
# List of detected validation errors.
|
|
20
|
+
attr_accessor :detail
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'detail' => :'detail'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Returns attribute mapping this model knows about
|
|
30
|
+
def self.acceptable_attribute_map
|
|
31
|
+
attribute_map
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns all the JSON keys this model knows about
|
|
35
|
+
def self.acceptable_attributes
|
|
36
|
+
acceptable_attribute_map.values
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.openapi_types
|
|
41
|
+
{
|
|
42
|
+
:'detail' => :'Array<String>'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::FactureElectroniqueRestApiSchemasValidationValidationErrorResponse` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::FactureElectroniqueRestApiSchemasValidationValidationErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'detail')
|
|
69
|
+
if (value = attributes[:'detail']).is_a?(Array)
|
|
70
|
+
self.detail = value
|
|
71
|
+
end
|
|
72
|
+
else
|
|
73
|
+
self.detail = nil
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
78
|
+
# @return Array for valid properties with the reasons
|
|
79
|
+
def list_invalid_properties
|
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
81
|
+
invalid_properties = Array.new
|
|
82
|
+
if @detail.nil?
|
|
83
|
+
invalid_properties.push('invalid value for "detail", detail cannot be nil.')
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
|
+
return false if @detail.nil?
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Custom attribute writer method with validation
|
|
98
|
+
# @param [Object] detail Value to be assigned
|
|
99
|
+
def detail=(detail)
|
|
100
|
+
if detail.nil?
|
|
101
|
+
fail ArgumentError, 'detail cannot be nil'
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
@detail = detail
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Checks equality by comparing each attribute.
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def ==(o)
|
|
110
|
+
return true if self.equal?(o)
|
|
111
|
+
self.class == o.class &&
|
|
112
|
+
detail == o.detail
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @see the `==` method
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def eql?(o)
|
|
118
|
+
self == o
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Calculates hash code according to all attributes.
|
|
122
|
+
# @return [Integer] Hash code
|
|
123
|
+
def hash
|
|
124
|
+
[detail].hash
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Builds the object from hash
|
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
129
|
+
# @return [Object] Returns the model itself
|
|
130
|
+
def self.build_from_hash(attributes)
|
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
133
|
+
transformed_hash = {}
|
|
134
|
+
openapi_types.each_pair do |key, type|
|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = nil
|
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
138
|
+
# check to ensure the input is an array given that the attribute
|
|
139
|
+
# is documented as an array but the input is not
|
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
142
|
+
end
|
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
new(transformed_hash)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Returns the object in the form of hash
|
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
|
152
|
+
def to_hash
|
|
153
|
+
hash = {}
|
|
154
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
155
|
+
value = self.send(attr)
|
|
156
|
+
if value.nil?
|
|
157
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
158
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
hash[param] = _to_hash(value)
|
|
162
|
+
end
|
|
163
|
+
hash
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
end
|