Class: FactPulse::EReportingApi

Inherits:
Object
  • Object
show all
Defined in:
lib/factpulse/api/e_reporting_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ EReportingApi

Returns a new instance of EReportingApi.



19
20
21
# File 'lib/factpulse/api/e_reporting_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_client ⇒ Object

Returns the value of attribute api_client.



17
18
19
# File 'lib/factpulse/api/e_reporting_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post(create_aggregated_report_request, opts = {}) ⇒ GenerateAggregatedReportResponse

Generate aggregated e-reporting XML (PPF-compliant) Generate a PPF-compliant aggregated e-reporting XML containing multiple flux types in a single file. This endpoint creates a Report XML that can contain: - TransactionsReport: Invoice (10.1) AND/OR Transactions (10.3) - PaymentsReport: Invoice payments (10.2) AND/OR Transaction payments (10.4) The AFNOR FlowType is automatically determined based on content: - Single type → Specific FlowType (e.g., AggregatedCustomerTransactionReport) - Multiple types → MultiFlowReport CategoryCode (TT-81) must use PPF-compliant values: - TLB1: Goods deliveries - TPS1: Service provisions - TNT1: Non-taxed transactions - TMA1: Mixed transactions

Parameters:

Returns:



27
28
29
30
# File 'lib/factpulse/api/e_reporting_api.rb', line 27

def generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post(create_aggregated_report_request, opts = {})
  data, _status_code, _headers = generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post_with_http_info(create_aggregated_report_request, opts)
  data
end

#generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post_with_http_info(create_aggregated_report_request, opts = {}) ⇒ Array<(GenerateAggregatedReportResponse, Integer, Hash)>

Generate aggregated e-reporting XML (PPF-compliant) Generate a PPF-compliant aggregated e-reporting XML containing multiple flux types in a single file. This endpoint creates a Report XML that can contain: - TransactionsReport: Invoice (10.1) AND/OR Transactions (10.3) - PaymentsReport: Invoice payments (10.2) AND/OR Transaction payments (10.4) The AFNOR FlowType is automatically determined based on content: - Single type → Specific FlowType (e.g., AggregatedCustomerTransactionReport) - Multiple types → MultiFlowReport CategoryCode (TT-81) must use PPF-compliant values: - TLB1: Goods deliveries - TPS1: Service provisions - TNT1: Non-taxed transactions - TMA1: Mixed transactions

Parameters:

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/factpulse/api/e_reporting_api.rb', line 37

def generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post_with_http_info(create_aggregated_report_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post ...'
  end
  # verify the required parameter 'create_aggregated_report_request' is set
  if @api_client.config.client_side_validation && create_aggregated_report_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_aggregated_report_request' when calling EReportingApi.generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post"
  end
  # resource path
  local_var_path = '/api/v1/ereporting/generate-aggregated'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_aggregated_report_request)

  # return_type
  return_type = opts[:debug_return_type] || 'GenerateAggregatedReportResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"EReportingApi.generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#generate_aggregated_ereporting_api_v1_ereporting_generate_aggregated_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#generate_ereporting_api_v1_ereporting_generate_post(create_e_reporting_request, opts = {}) ⇒ GenerateEReportingResponse

Generate e-reporting XML Generate e-reporting XML (FRR format) from structured data. Supports all four flow types: - 10.1: Unitary B2B international transactions (use invoices field) - 10.2: Payments for B2B international invoices (use invoicePayments field) - 10.3: Aggregated B2C transactions (use transactions field) - 10.4: Aggregated B2C payments (use aggregatedPayments field) The generated XML is compliant with DGFIP specifications and ready for submission to a PA (Plateforme Agréée).

Parameters:

Returns:



95
96
97
98
# File 'lib/factpulse/api/e_reporting_api.rb', line 95

def generate_ereporting_api_v1_ereporting_generate_post(create_e_reporting_request, opts = {})
  data, _status_code, _headers = generate_ereporting_api_v1_ereporting_generate_post_with_http_info(create_e_reporting_request, opts)
  data
end

#generate_ereporting_api_v1_ereporting_generate_post_with_http_info(create_e_reporting_request, opts = {}) ⇒ Array<(GenerateEReportingResponse, Integer, Hash)>

Generate e-reporting XML Generate e-reporting XML (FRR format) from structured data. Supports all four flow types: - 10.1: Unitary B2B international transactions (use `invoices` field) - 10.2: Payments for B2B international invoices (use `invoicePayments` field) - 10.3: Aggregated B2C transactions (use `transactions` field) - 10.4: Aggregated B2C payments (use `aggregatedPayments` field) The generated XML is compliant with DGFIP specifications and ready for submission to a PA (Plateforme Agréée).

Parameters:

Returns:

  • (Array<(GenerateEReportingResponse, Integer, Hash)>) —

    GenerateEReportingResponse data, response status code and response headers



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/factpulse/api/e_reporting_api.rb', line 105

def generate_ereporting_api_v1_ereporting_generate_post_with_http_info(create_e_reporting_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.generate_ereporting_api_v1_ereporting_generate_post ...'
  end
  # verify the required parameter 'create_e_reporting_request' is set
  if @api_client.config.client_side_validation && create_e_reporting_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_e_reporting_request' when calling EReportingApi.generate_ereporting_api_v1_ereporting_generate_post"
  end
  # resource path
  local_var_path = '/api/v1/ereporting/generate'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_e_reporting_request)

  # return_type
  return_type = opts[:debug_return_type] || 'GenerateEReportingResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"EReportingApi.generate_ereporting_api_v1_ereporting_generate_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#generate_ereporting_api_v1_ereporting_generate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#generate_ereporting_download_api_v1_ereporting_generate_download_post(create_e_reporting_request, opts = {}) ⇒ nil

Generate and download e-reporting XML Generate e-reporting XML and return as downloadable file.

Parameters:

Options Hash (opts):

  • :filename (String) —

    Output filename (default: ereporting_reportId.xml)

Returns:

  • (nil)


164
165
166
167
# File 'lib/factpulse/api/e_reporting_api.rb', line 164

def generate_ereporting_download_api_v1_ereporting_generate_download_post(create_e_reporting_request, opts = {})
  generate_ereporting_download_api_v1_ereporting_generate_download_post_with_http_info(create_e_reporting_request, opts)
  nil
end

#generate_ereporting_download_api_v1_ereporting_generate_download_post_with_http_info(create_e_reporting_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Generate and download e-reporting XML Generate e-reporting XML and return as downloadable file.

Parameters:

Options Hash (opts):

  • :filename (String) —

    Output filename (default: ereporting_reportId.xml)

Returns:

  • (Array<(nil, Integer, Hash)>) —

    nil, response status code and response headers



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/factpulse/api/e_reporting_api.rb', line 175

def generate_ereporting_download_api_v1_ereporting_generate_download_post_with_http_info(create_e_reporting_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.generate_ereporting_download_api_v1_ereporting_generate_download_post ...'
  end
  # verify the required parameter 'create_e_reporting_request' is set
  if @api_client.config.client_side_validation && create_e_reporting_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_e_reporting_request' when calling EReportingApi.generate_ereporting_download_api_v1_ereporting_generate_download_post"
  end
  # resource path
  local_var_path = '/api/v1/ereporting/generate/download'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_e_reporting_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"EReportingApi.generate_ereporting_download_api_v1_ereporting_generate_download_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#generate_ereporting_download_api_v1_ereporting_generate_download_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_category_codes_api_v1_ereporting_category_codes_get(opts = {}) ⇒ Hash<String, Object>

List PPF-compliant category codes Returns the list of valid CategoryCode values (TT-81) for e-reporting transactions. Source: Annexe 6 - Format sémantique FE e-reporting v1.9

Parameters:

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Returns:

  • (Hash<String, Object>)


233
234
235
236
# File 'lib/factpulse/api/e_reporting_api.rb', line 233

def list_category_codes_api_v1_ereporting_category_codes_get(opts = {})
  data, _status_code, _headers = list_category_codes_api_v1_ereporting_category_codes_get_with_http_info(opts)
  data
end

#list_category_codes_api_v1_ereporting_category_codes_get_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

List PPF-compliant category codes Returns the list of valid CategoryCode values (TT-81) for e-reporting transactions. Source: Annexe 6 - Format sémantique FE e-reporting v1.9

Parameters:

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>) —

    Hash<String, Object> data, response status code and response headers



242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/factpulse/api/e_reporting_api.rb', line 242

def list_category_codes_api_v1_ereporting_category_codes_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.list_category_codes_api_v1_ereporting_category_codes_get ...'
  end
  # resource path
  local_var_path = '/api/v1/ereporting/category-codes'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"EReportingApi.list_category_codes_api_v1_ereporting_category_codes_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#list_category_codes_api_v1_ereporting_category_codes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_flow_types_api_v1_ereporting_flow_types_get(opts = {}) ⇒ Hash<String, Object>

List available flow types Returns the list of supported e-reporting flow types with descriptions.

Parameters:

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Returns:

  • (Hash<String, Object>)


290
291
292
293
# File 'lib/factpulse/api/e_reporting_api.rb', line 290

def list_flow_types_api_v1_ereporting_flow_types_get(opts = {})
  data, _status_code, _headers = list_flow_types_api_v1_ereporting_flow_types_get_with_http_info(opts)
  data
end

#list_flow_types_api_v1_ereporting_flow_types_get_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

List available flow types Returns the list of supported e-reporting flow types with descriptions.

Parameters:

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>) —

    Hash<String, Object> data, response status code and response headers



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/factpulse/api/e_reporting_api.rb', line 299

def list_flow_types_api_v1_ereporting_flow_types_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.list_flow_types_api_v1_ereporting_flow_types_get ...'
  end
  # resource path
  local_var_path = '/api/v1/ereporting/flow-types'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"EReportingApi.list_flow_types_api_v1_ereporting_flow_types_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#list_flow_types_api_v1_ereporting_flow_types_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post(submit_aggregated_report_request, opts = {}) ⇒ SubmitEReportingResponse

Submit aggregated e-reporting to PA/PDP Generate and submit a PPF-compliant aggregated e-reporting to a PA/PDP. Combines generation and submission in a single call. Automatically determines the AFNOR FlowType based on content.

Parameters:

Returns:



348
349
350
351
# File 'lib/factpulse/api/e_reporting_api.rb', line 348

def submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post(submit_aggregated_report_request, opts = {})
  data, _status_code, _headers = submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_with_http_info(submit_aggregated_report_request, opts)
  data
end

#submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_with_http_info(submit_aggregated_report_request, opts = {}) ⇒ Array<(SubmitEReportingResponse, Integer, Hash)>

Submit aggregated e-reporting to PA/PDP Generate and submit a PPF-compliant aggregated e-reporting to a PA/PDP. Combines generation and submission in a single call. Automatically determines the AFNOR FlowType based on content.

Parameters:

Returns:

  • (Array<(SubmitEReportingResponse, Integer, Hash)>) —

    SubmitEReportingResponse data, response status code and response headers



358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/factpulse/api/e_reporting_api.rb', line 358

def submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_with_http_info(submit_aggregated_report_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post ...'
  end
  # verify the required parameter 'submit_aggregated_report_request' is set
  if @api_client.config.client_side_validation && submit_aggregated_report_request.nil?
    fail ArgumentError, "Missing the required parameter 'submit_aggregated_report_request' when calling EReportingApi.submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post"
  end
  # resource path
  local_var_path = '/api/v1/ereporting/submit-aggregated'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(submit_aggregated_report_request)

  # return_type
  return_type = opts[:debug_return_type] || 'SubmitEReportingResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"EReportingApi.submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_ereporting_api_v1_ereporting_submit_post(submit_e_reporting_request, opts = {}) ⇒ SubmitEReportingResponse

Submit e-reporting to PA/PDP Generate and submit e-reporting to a PA (Plateforme Agréée). Authentication strategies (same as invoices): 1. JWT with client_uid (recommended): PDP credentials fetched from backend 2. Zero-storage: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in request The e-reporting is submitted using the AFNOR Flow Service API with syntax=FRR (FRench Reporting).

Parameters:

Returns:



416
417
418
419
# File 'lib/factpulse/api/e_reporting_api.rb', line 416

def submit_ereporting_api_v1_ereporting_submit_post(submit_e_reporting_request, opts = {})
  data, _status_code, _headers = submit_ereporting_api_v1_ereporting_submit_post_with_http_info(submit_e_reporting_request, opts)
  data
end

#submit_ereporting_api_v1_ereporting_submit_post_with_http_info(submit_e_reporting_request, opts = {}) ⇒ Array<(SubmitEReportingResponse, Integer, Hash)>

Submit e-reporting to PA/PDP Generate and submit e-reporting to a PA (Plateforme Agréée). Authentication strategies (same as invoices): 1. JWT with client_uid (recommended): PDP credentials fetched from backend 2. Zero-storage: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in request The e-reporting is submitted using the AFNOR Flow Service API with syntax=FRR (FRench Reporting).

Parameters:

Returns:

  • (Array<(SubmitEReportingResponse, Integer, Hash)>) —

    SubmitEReportingResponse data, response status code and response headers



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/factpulse/api/e_reporting_api.rb', line 426

def submit_ereporting_api_v1_ereporting_submit_post_with_http_info(submit_e_reporting_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.submit_ereporting_api_v1_ereporting_submit_post ...'
  end
  # verify the required parameter 'submit_e_reporting_request' is set
  if @api_client.config.client_side_validation && submit_e_reporting_request.nil?
    fail ArgumentError, "Missing the required parameter 'submit_e_reporting_request' when calling EReportingApi.submit_ereporting_api_v1_ereporting_submit_post"
  end
  # resource path
  local_var_path = '/api/v1/ereporting/submit'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(submit_e_reporting_request)

  # return_type
  return_type = opts[:debug_return_type] || 'SubmitEReportingResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"EReportingApi.submit_ereporting_api_v1_ereporting_submit_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#submit_ereporting_api_v1_ereporting_submit_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_xml_ereporting_api_v1_ereporting_submit_xml_post(xml_file, opts = {}) ⇒ SubmitEReportingResponse

Submit pre-generated e-reporting XML Submit a pre-generated e-reporting XML file directly to a PA/PDP. This endpoint is designed for clients who generate their own PPF-compliant XML and only need FactPulse for the PDP submission. Process: 1. Validates the XML against PPF XSD schemas 2. Determines the appropriate AFNOR FlowType 3. Submits to the configured PDP/PA 4. Returns the flowId for tracking Authentication: Same strategies as /submit endpoint (JWT or zero-storage credentials).

Parameters:

  • xml_file (File) —

    E-reporting XML file

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Options Hash (opts):

  • :tracking_id (String)
  • :skip_validation (Boolean) —

    Skip XSD validation (default to false)

  • :pdp_flow_service_url (String)
  • :pdp_token_url (String)
  • :pdp_client_id (String)
  • :pdp_client_secret (String)

Returns:



490
491
492
493
# File 'lib/factpulse/api/e_reporting_api.rb', line 490

def submit_xml_ereporting_api_v1_ereporting_submit_xml_post(xml_file, opts = {})
  data, _status_code, _headers = submit_xml_ereporting_api_v1_ereporting_submit_xml_post_with_http_info(xml_file, opts)
  data
end

#submit_xml_ereporting_api_v1_ereporting_submit_xml_post_with_http_info(xml_file, opts = {}) ⇒ Array<(SubmitEReportingResponse, Integer, Hash)>

Submit pre-generated e-reporting XML Submit a pre-generated e-reporting XML file directly to a PA/PDP. This endpoint is designed for clients who generate their own PPF-compliant XML and only need FactPulse for the PDP submission. Process: 1. Validates the XML against PPF XSD schemas 2. Determines the appropriate AFNOR FlowType 3. Submits to the configured PDP/PA 4. Returns the flowId for tracking Authentication: Same strategies as /submit endpoint (JWT or zero-storage credentials).

Parameters:

  • xml_file (File) —

    E-reporting XML file

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Options Hash (opts):

  • :tracking_id (String)
  • :skip_validation (Boolean) —

    Skip XSD validation (default to false)

  • :pdp_flow_service_url (String)
  • :pdp_token_url (String)
  • :pdp_client_id (String)
  • :pdp_client_secret (String)

Returns:

  • (Array<(SubmitEReportingResponse, Integer, Hash)>) —

    SubmitEReportingResponse data, response status code and response headers



506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
# File 'lib/factpulse/api/e_reporting_api.rb', line 506

def submit_xml_ereporting_api_v1_ereporting_submit_xml_post_with_http_info(xml_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.submit_xml_ereporting_api_v1_ereporting_submit_xml_post ...'
  end
  # verify the required parameter 'xml_file' is set
  if @api_client.config.client_side_validation && xml_file.nil?
    fail ArgumentError, "Missing the required parameter 'xml_file' when calling EReportingApi.submit_xml_ereporting_api_v1_ereporting_submit_xml_post"
  end
  # resource path
  local_var_path = '/api/v1/ereporting/submit-xml'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['xml_file'] = xml_file
  form_params['tracking_id'] = opts[:'tracking_id'] if !opts[:'tracking_id'].nil?
  form_params['skip_validation'] = opts[:'skip_validation'] if !opts[:'skip_validation'].nil?
  form_params['pdp_flow_service_url'] = opts[:'pdp_flow_service_url'] if !opts[:'pdp_flow_service_url'].nil?
  form_params['pdp_token_url'] = opts[:'pdp_token_url'] if !opts[:'pdp_token_url'].nil?
  form_params['pdp_client_id'] = opts[:'pdp_client_id'] if !opts[:'pdp_client_id'].nil?
  form_params['pdp_client_secret'] = opts[:'pdp_client_secret'] if !opts[:'pdp_client_secret'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SubmitEReportingResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"EReportingApi.submit_xml_ereporting_api_v1_ereporting_submit_xml_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#submit_xml_ereporting_api_v1_ereporting_submit_xml_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post(create_aggregated_report_request, opts = {}) ⇒ Hash<String, Object>

Validate aggregated e-reporting data Validates aggregated e-reporting data without generating XML.

Parameters:

Returns:

  • (Hash<String, Object>)


571
572
573
574
# File 'lib/factpulse/api/e_reporting_api.rb', line 571

def validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post(create_aggregated_report_request, opts = {})
  data, _status_code, _headers = validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post_with_http_info(create_aggregated_report_request, opts)
  data
end

#validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post_with_http_info(create_aggregated_report_request, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Validate aggregated e-reporting data Validates aggregated e-reporting data without generating XML.

Parameters:

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>) —

    Hash<String, Object> data, response status code and response headers



581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
# File 'lib/factpulse/api/e_reporting_api.rb', line 581

def validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post_with_http_info(create_aggregated_report_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post ...'
  end
  # verify the required parameter 'create_aggregated_report_request' is set
  if @api_client.config.client_side_validation && create_aggregated_report_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_aggregated_report_request' when calling EReportingApi.validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post"
  end
  # resource path
  local_var_path = '/api/v1/ereporting/validate-aggregated'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_aggregated_report_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"EReportingApi.validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#validate_aggregated_ereporting_api_v1_ereporting_validate_aggregated_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_ereporting_api_v1_ereporting_validate_post(validate_e_reporting_request, opts = {}) ⇒ ValidateEReportingResponse

Validate e-reporting data Validate e-reporting data without generating or submitting. Performs: - Schema validation - Business rule validation (correct flux type vs data) - Data consistency checks (tax totals, dates, etc.) Returns validation errors and warnings.

Parameters:

Returns:



639
640
641
642
# File 'lib/factpulse/api/e_reporting_api.rb', line 639

def validate_ereporting_api_v1_ereporting_validate_post(validate_e_reporting_request, opts = {})
  data, _status_code, _headers = validate_ereporting_api_v1_ereporting_validate_post_with_http_info(validate_e_reporting_request, opts)
  data
end

#validate_ereporting_api_v1_ereporting_validate_post_with_http_info(validate_e_reporting_request, opts = {}) ⇒ Array<(ValidateEReportingResponse, Integer, Hash)>

Validate e-reporting data Validate e-reporting data without generating or submitting. Performs: - Schema validation - Business rule validation (correct flux type vs data) - Data consistency checks (tax totals, dates, etc.) Returns validation errors and warnings.

Parameters:

Returns:

  • (Array<(ValidateEReportingResponse, Integer, Hash)>) —

    ValidateEReportingResponse data, response status code and response headers



649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
# File 'lib/factpulse/api/e_reporting_api.rb', line 649

def validate_ereporting_api_v1_ereporting_validate_post_with_http_info(validate_e_reporting_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.validate_ereporting_api_v1_ereporting_validate_post ...'
  end
  # verify the required parameter 'validate_e_reporting_request' is set
  if @api_client.config.client_side_validation && validate_e_reporting_request.nil?
    fail ArgumentError, "Missing the required parameter 'validate_e_reporting_request' when calling EReportingApi.validate_ereporting_api_v1_ereporting_validate_post"
  end
  # resource path
  local_var_path = '/api/v1/ereporting/validate'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(validate_e_reporting_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ValidateEReportingResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"EReportingApi.validate_ereporting_api_v1_ereporting_validate_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#validate_ereporting_api_v1_ereporting_validate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_xml_ereporting_api_v1_ereporting_validate_xml_post(xml_file, opts = {}) ⇒ Hash<String, Object>

Validate e-reporting XML against PPF XSD schemas and business rules Validates an e-reporting XML file against: 1. XSD schemas: Official PPF e-reporting XSD (structure, types, cardinality) 2. Business rules: ISO codes and enum validation - Currency codes (ISO 4217: EUR, USD, GBP, etc.) - Country codes (ISO 3166-1 alpha-2: FR, DE, US, etc.) - Scheme IDs (0009=SIRET, 0002=SIREN, etc.) - Role codes (UNCL 3035: SE=Seller, BY=Buyer, WK=Working party, etc.) Returns validation status and detailed error messages if invalid.

Parameters:

  • xml_file (File) —

    E-reporting XML file to validate

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Options Hash (opts):

  • :validate_business_rules (Boolean) —

    Also validate business rules (ISO codes, enums) (default to true)

Returns:

  • (Hash<String, Object>)


708
709
710
711
# File 'lib/factpulse/api/e_reporting_api.rb', line 708

def validate_xml_ereporting_api_v1_ereporting_validate_xml_post(xml_file, opts = {})
  data, _status_code, _headers = validate_xml_ereporting_api_v1_ereporting_validate_xml_post_with_http_info(xml_file, opts)
  data
end

#validate_xml_ereporting_api_v1_ereporting_validate_xml_post_with_http_info(xml_file, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Validate e-reporting XML against PPF XSD schemas and business rules Validates an e-reporting XML file against: 1. XSD schemas: Official PPF e-reporting XSD (structure, types, cardinality) 2. Business rules: ISO codes and enum validation - Currency codes (ISO 4217: EUR, USD, GBP, etc.) - Country codes (ISO 3166-1 alpha-2: FR, DE, US, etc.) - Scheme IDs (0009=SIRET, 0002=SIREN, etc.) - Role codes (UNCL 3035: SE=Seller, BY=Buyer, WK=Working party, etc.) Returns validation status and detailed error messages if invalid.

Parameters:

  • xml_file (File) —

    E-reporting XML file to validate

  • opts (Hash) (defaults to: {}) —

    the optional parameters

Options Hash (opts):

  • :validate_business_rules (Boolean) —

    Also validate business rules (ISO codes, enums) (default to true)

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>) —

    Hash<String, Object> data, response status code and response headers



719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
# File 'lib/factpulse/api/e_reporting_api.rb', line 719

def validate_xml_ereporting_api_v1_ereporting_validate_xml_post_with_http_info(xml_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EReportingApi.validate_xml_ereporting_api_v1_ereporting_validate_xml_post ...'
  end
  # verify the required parameter 'xml_file' is set
  if @api_client.config.client_side_validation && xml_file.nil?
    fail ArgumentError, "Missing the required parameter 'xml_file' when calling EReportingApi.validate_xml_ereporting_api_v1_ereporting_validate_xml_post"
  end
  # resource path
  local_var_path = '/api/v1/ereporting/validate-xml'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'validate_business_rules'] = opts[:'validate_business_rules'] if !opts[:'validate_business_rules'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['xml_file'] = xml_file

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"EReportingApi.validate_xml_ereporting_api_v1_ereporting_validate_xml_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EReportingApi#validate_xml_ereporting_api_v1_ereporting_validate_xml_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end