Class: FactPulse::VrificationPDFXMLApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ VrificationPDFXMLApi

Returns a new instance of VrificationPDFXMLApi.



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

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



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

def api_client
  @api_client
end

Instance Method Details

#obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get(id_tache, opts = {}) ⇒ StatutTache

Obtenir le statut d’une vérification asynchrone Récupère le statut et le résultat d’une tâche de vérification asynchrone. **Statuts possibles:** - ‘PENDING`: Tâche en attente dans la file - `STARTED`: Tâche en cours d’exécution - ‘SUCCESS`: Tâche terminée avec succès (voir `resultat`) - `FAILURE`: Erreur système (exception non gérée) Note: Le champ `resultat.statut` peut être "SUCCES" ou "ERREUR" indépendamment du statut Celery (qui sera toujours SUCCESS si la tâche s’est exécutée).

Parameters:

  • id_tache (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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

def obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get(id_tache, opts = {})
  data, _status_code, _headers = obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_with_http_info(id_tache, opts)
  data
end

#obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_0(id_tache, opts = {}) ⇒ StatutTache

Obtenir le statut d’une vérification asynchrone Récupère le statut et le résultat d’une tâche de vérification asynchrone. **Statuts possibles:** - ‘PENDING`: Tâche en attente dans la file - `STARTED`: Tâche en cours d’exécution - ‘SUCCESS`: Tâche terminée avec succès (voir `resultat`) - `FAILURE`: Erreur système (exception non gérée) Note: Le champ `resultat.statut` peut être "SUCCES" ou "ERREUR" indépendamment du statut Celery (qui sera toujours SUCCESS si la tâche s’est exécutée).

Parameters:

  • id_tache (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



90
91
92
93
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 90

def obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_0(id_tache, opts = {})
  data, _status_code, _headers = obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_0_with_http_info(id_tache, opts)
  data
end

#obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_0_with_http_info(id_tache, opts = {}) ⇒ Array<(StatutTache, Integer, Hash)>

Obtenir le statut d&#39;une vérification asynchrone Récupère le statut et le résultat d&#39;une tâche de vérification asynchrone. **Statuts possibles:** - &#x60;PENDING&#x60;: Tâche en attente dans la file - &#x60;STARTED&#x60;: Tâche en cours d&#39;exécution - &#x60;SUCCESS&#x60;: Tâche terminée avec succès (voir &#x60;resultat&#x60;) - &#x60;FAILURE&#x60;: Erreur système (exception non gérée) Note: Le champ &#x60;resultat.statut&#x60; peut être &quot;SUCCES&quot; ou &quot;ERREUR&quot; indépendamment du statut Celery (qui sera toujours SUCCESS si la tâche s&#39;est exécutée).

Parameters:

  • id_tache (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(StatutTache, Integer, Hash)>)

    StatutTache data, response status code and response headers



100
101
102
103
104
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
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 100

def obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_0_with_http_info(id_tache, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VrificationPDFXMLApi.obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_0 ...'
  end
  # verify the required parameter 'id_tache' is set
  if @api_client.config.client_side_validation && id_tache.nil?
    fail ArgumentError, "Missing the required parameter 'id_tache' when calling VrificationPDFXMLApi.obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_0"
  end
  # resource path
  local_var_path = '/api/v1/verification/verifier-async/{id_tache}/statut'.sub('{' + 'id_tache' + '}', CGI.escape(id_tache.to_s))

  # 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] || 'StatutTache'

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

  new_options = opts.merge(
    :operation => :"VrificationPDFXMLApi.obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_0",
    :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: VrificationPDFXMLApi#obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_with_http_info(id_tache, opts = {}) ⇒ Array<(StatutTache, Integer, Hash)>

Obtenir le statut d&#39;une vérification asynchrone Récupère le statut et le résultat d&#39;une tâche de vérification asynchrone. **Statuts possibles:** - &#x60;PENDING&#x60;: Tâche en attente dans la file - &#x60;STARTED&#x60;: Tâche en cours d&#39;exécution - &#x60;SUCCESS&#x60;: Tâche terminée avec succès (voir &#x60;resultat&#x60;) - &#x60;FAILURE&#x60;: Erreur système (exception non gérée) Note: Le champ &#x60;resultat.statut&#x60; peut être &quot;SUCCES&quot; ou &quot;ERREUR&quot; indépendamment du statut Celery (qui sera toujours SUCCESS si la tâche s&#39;est exécutée).

Parameters:

  • id_tache (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(StatutTache, Integer, Hash)>)

    StatutTache data, response status code and response headers



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
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 37

def obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get_with_http_info(id_tache, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VrificationPDFXMLApi.obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get ...'
  end
  # verify the required parameter 'id_tache' is set
  if @api_client.config.client_side_validation && id_tache.nil?
    fail ArgumentError, "Missing the required parameter 'id_tache' when calling VrificationPDFXMLApi.obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get"
  end
  # resource path
  local_var_path = '/api/v1/verification/verifier-async/{id_tache}/statut'.sub('{' + 'id_tache' + '}', CGI.escape(id_tache.to_s))

  # 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] || 'StatutTache'

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

  new_options = opts.merge(
    :operation => :"VrificationPDFXMLApi.obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_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: VrificationPDFXMLApi#obtenir_statut_verification_api_v1_verification_verifier_async_id_tache_statut_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#verifier_pdf_async_api_v1_verification_verifier_async_post(fichier_pdf, opts = {}) ⇒ ReponseTache

Vérifier la conformité PDF/XML Factur-X (asynchrone) Vérifie la conformité PDF/XML Factur-X de manière asynchrone. IMPORTANT: Seuls les PDF Factur-X (avec XML embarqué) sont acceptés. Les PDF sans XML Factur-X retourneront une erreur ‘NOT_FACTURX` dans le résultat. Cette version utilise une tâche Celery et peut faire appel au service OCR si le PDF est une image ou si `forcer_ocr=true`. **Retourne immédiatement** un ID de tâche. Utilisez `/verifier-async/id_tache/statut` pour récupérer le résultat. **Principe de vérification (Factur-X 1.08):** - Principe n°2: Le XML ne peut contenir que des infos présentes dans le PDF - Principe n°4: Toute info XML doit être présente et conforme dans le PDF **Champs vérifiés:** - Identification: BT-1 (n° facture), BT-2 (date), BT-3 (type), BT-5 (devise), BT-23 (cadre) - Vendeur: BT-27 (nom), BT-29 (SIRET), BT-30 (SIREN), BT-31 (TVA) - Acheteur: BT-44 (nom), BT-46 (SIRET), BT-47 (SIREN), BT-48 (TVA) - Montants: BT-109 (HT), BT-110 (TVA), BT-112 (TTC), BT-115 (à payer) - Ventilation TVA: BT-116, BT-117, BT-118, BT-119 - Lignes de facture: BT-153, BT-129, BT-146, BT-131 - Notes obligatoires: PMT, PMD, AAB - Règle BR-FR-09: cohérence SIRET/SIREN **Avantages par rapport à la version synchrone:** - Support OCR pour les PDF images (via service DocTR) - Timeout plus long pour les gros documents - Ne bloque pas le serveur

Parameters:

  • fichier_pdf (File)

    Fichier PDF Factur-X à vérifier

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

    the optional parameters

Options Hash (opts):

  • :forcer_ocr (Boolean)

    Forcer l&#39;utilisation de l&#39;OCR même si le PDF contient du texte natif (default to false)

Returns:



154
155
156
157
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 154

def verifier_pdf_async_api_v1_verification_verifier_async_post(fichier_pdf, opts = {})
  data, _status_code, _headers = verifier_pdf_async_api_v1_verification_verifier_async_post_with_http_info(fichier_pdf, opts)
  data
end

#verifier_pdf_async_api_v1_verification_verifier_async_post_0(fichier_pdf, opts = {}) ⇒ ReponseTache

Vérifier la conformité PDF/XML Factur-X (asynchrone) Vérifie la conformité PDF/XML Factur-X de manière asynchrone. IMPORTANT: Seuls les PDF Factur-X (avec XML embarqué) sont acceptés. Les PDF sans XML Factur-X retourneront une erreur ‘NOT_FACTURX` dans le résultat. Cette version utilise une tâche Celery et peut faire appel au service OCR si le PDF est une image ou si `forcer_ocr=true`. **Retourne immédiatement** un ID de tâche. Utilisez `/verifier-async/id_tache/statut` pour récupérer le résultat. **Principe de vérification (Factur-X 1.08):** - Principe n°2: Le XML ne peut contenir que des infos présentes dans le PDF - Principe n°4: Toute info XML doit être présente et conforme dans le PDF **Champs vérifiés:** - Identification: BT-1 (n° facture), BT-2 (date), BT-3 (type), BT-5 (devise), BT-23 (cadre) - Vendeur: BT-27 (nom), BT-29 (SIRET), BT-30 (SIREN), BT-31 (TVA) - Acheteur: BT-44 (nom), BT-46 (SIRET), BT-47 (SIREN), BT-48 (TVA) - Montants: BT-109 (HT), BT-110 (TVA), BT-112 (TTC), BT-115 (à payer) - Ventilation TVA: BT-116, BT-117, BT-118, BT-119 - Lignes de facture: BT-153, BT-129, BT-146, BT-131 - Notes obligatoires: PMT, PMD, AAB - Règle BR-FR-09: cohérence SIRET/SIREN **Avantages par rapport à la version synchrone:** - Support OCR pour les PDF images (via service DocTR) - Timeout plus long pour les gros documents - Ne bloque pas le serveur

Parameters:

  • fichier_pdf (File)

    Fichier PDF Factur-X à vérifier

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

    the optional parameters

Options Hash (opts):

  • :forcer_ocr (Boolean)

    Forcer l&#39;utilisation de l&#39;OCR même si le PDF contient du texte natif (default to false)

Returns:



226
227
228
229
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 226

def verifier_pdf_async_api_v1_verification_verifier_async_post_0(fichier_pdf, opts = {})
  data, _status_code, _headers = verifier_pdf_async_api_v1_verification_verifier_async_post_0_with_http_info(fichier_pdf, opts)
  data
end

#verifier_pdf_async_api_v1_verification_verifier_async_post_0_with_http_info(fichier_pdf, opts = {}) ⇒ Array<(ReponseTache, Integer, Hash)>

Vérifier la conformité PDF/XML Factur-X (asynchrone) Vérifie la conformité PDF/XML Factur-X de manière asynchrone. IMPORTANT: Seuls les PDF Factur-X (avec XML embarqué) sont acceptés. Les PDF sans XML Factur-X retourneront une erreur &#x60;NOT_FACTURX&#x60; dans le résultat. Cette version utilise une tâche Celery et peut faire appel au service OCR si le PDF est une image ou si &#x60;forcer_ocr&#x3D;true&#x60;. **Retourne immédiatement** un ID de tâche. Utilisez &#x60;/verifier-async/id_tache/statut&#x60; pour récupérer le résultat. **Principe de vérification (Factur-X 1.08):** - Principe n°2: Le XML ne peut contenir que des infos présentes dans le PDF - Principe n°4: Toute info XML doit être présente et conforme dans le PDF **Champs vérifiés:** - Identification: BT-1 (n° facture), BT-2 (date), BT-3 (type), BT-5 (devise), BT-23 (cadre) - Vendeur: BT-27 (nom), BT-29 (SIRET), BT-30 (SIREN), BT-31 (TVA) - Acheteur: BT-44 (nom), BT-46 (SIRET), BT-47 (SIREN), BT-48 (TVA) - Montants: BT-109 (HT), BT-110 (TVA), BT-112 (TTC), BT-115 (à payer) - Ventilation TVA: BT-116, BT-117, BT-118, BT-119 - Lignes de facture: BT-153, BT-129, BT-146, BT-131 - Notes obligatoires: PMT, PMD, AAB - Règle BR-FR-09: cohérence SIRET/SIREN **Avantages par rapport à la version synchrone:** - Support OCR pour les PDF images (via service DocTR) - Timeout plus long pour les gros documents - Ne bloque pas le serveur

Parameters:

  • fichier_pdf (File)

    Fichier PDF Factur-X à vérifier

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

    the optional parameters

Options Hash (opts):

  • :forcer_ocr (Boolean)

    Forcer l&#39;utilisation de l&#39;OCR même si le PDF contient du texte natif (default to false)

Returns:

  • (Array<(ReponseTache, Integer, Hash)>)

    ReponseTache data, response status code and response headers



237
238
239
240
241
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
285
286
287
288
289
290
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 237

def verifier_pdf_async_api_v1_verification_verifier_async_post_0_with_http_info(fichier_pdf, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VrificationPDFXMLApi.verifier_pdf_async_api_v1_verification_verifier_async_post_0 ...'
  end
  # verify the required parameter 'fichier_pdf' is set
  if @api_client.config.client_side_validation && fichier_pdf.nil?
    fail ArgumentError, "Missing the required parameter 'fichier_pdf' when calling VrificationPDFXMLApi.verifier_pdf_async_api_v1_verification_verifier_async_post_0"
  end
  # resource path
  local_var_path = '/api/v1/verification/verifier-async'

  # 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['fichier_pdf'] = fichier_pdf
  form_params['forcer_ocr'] = opts[:'forcer_ocr'] if !opts[:'forcer_ocr'].nil?

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

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

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

  new_options = opts.merge(
    :operation => :"VrificationPDFXMLApi.verifier_pdf_async_api_v1_verification_verifier_async_post_0",
    :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: VrificationPDFXMLApi#verifier_pdf_async_api_v1_verification_verifier_async_post_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#verifier_pdf_async_api_v1_verification_verifier_async_post_with_http_info(fichier_pdf, opts = {}) ⇒ Array<(ReponseTache, Integer, Hash)>

Vérifier la conformité PDF/XML Factur-X (asynchrone) Vérifie la conformité PDF/XML Factur-X de manière asynchrone. IMPORTANT: Seuls les PDF Factur-X (avec XML embarqué) sont acceptés. Les PDF sans XML Factur-X retourneront une erreur &#x60;NOT_FACTURX&#x60; dans le résultat. Cette version utilise une tâche Celery et peut faire appel au service OCR si le PDF est une image ou si &#x60;forcer_ocr&#x3D;true&#x60;. **Retourne immédiatement** un ID de tâche. Utilisez &#x60;/verifier-async/id_tache/statut&#x60; pour récupérer le résultat. **Principe de vérification (Factur-X 1.08):** - Principe n°2: Le XML ne peut contenir que des infos présentes dans le PDF - Principe n°4: Toute info XML doit être présente et conforme dans le PDF **Champs vérifiés:** - Identification: BT-1 (n° facture), BT-2 (date), BT-3 (type), BT-5 (devise), BT-23 (cadre) - Vendeur: BT-27 (nom), BT-29 (SIRET), BT-30 (SIREN), BT-31 (TVA) - Acheteur: BT-44 (nom), BT-46 (SIRET), BT-47 (SIREN), BT-48 (TVA) - Montants: BT-109 (HT), BT-110 (TVA), BT-112 (TTC), BT-115 (à payer) - Ventilation TVA: BT-116, BT-117, BT-118, BT-119 - Lignes de facture: BT-153, BT-129, BT-146, BT-131 - Notes obligatoires: PMT, PMD, AAB - Règle BR-FR-09: cohérence SIRET/SIREN **Avantages par rapport à la version synchrone:** - Support OCR pour les PDF images (via service DocTR) - Timeout plus long pour les gros documents - Ne bloque pas le serveur

Parameters:

  • fichier_pdf (File)

    Fichier PDF Factur-X à vérifier

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

    the optional parameters

Options Hash (opts):

  • :forcer_ocr (Boolean)

    Forcer l&#39;utilisation de l&#39;OCR même si le PDF contient du texte natif (default to false)

Returns:

  • (Array<(ReponseTache, Integer, Hash)>)

    ReponseTache data, response status code and response headers



165
166
167
168
169
170
171
172
173
174
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
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 165

def verifier_pdf_async_api_v1_verification_verifier_async_post_with_http_info(fichier_pdf, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VrificationPDFXMLApi.verifier_pdf_async_api_v1_verification_verifier_async_post ...'
  end
  # verify the required parameter 'fichier_pdf' is set
  if @api_client.config.client_side_validation && fichier_pdf.nil?
    fail ArgumentError, "Missing the required parameter 'fichier_pdf' when calling VrificationPDFXMLApi.verifier_pdf_async_api_v1_verification_verifier_async_post"
  end
  # resource path
  local_var_path = '/api/v1/verification/verifier-async'

  # 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['fichier_pdf'] = fichier_pdf
  form_params['forcer_ocr'] = opts[:'forcer_ocr'] if !opts[:'forcer_ocr'].nil?

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

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

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

  new_options = opts.merge(
    :operation => :"VrificationPDFXMLApi.verifier_pdf_async_api_v1_verification_verifier_async_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: VrificationPDFXMLApi#verifier_pdf_async_api_v1_verification_verifier_async_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#verifier_pdf_sync_api_v1_verification_verifier_post(fichier_pdf, opts = {}) ⇒ ReponseVerificationSucces

Vérifier la conformité PDF/XML Factur-X (synchrone) Vérifie la conformité entre le PDF et son XML Factur-X embarqué. IMPORTANT: Seuls les PDF Factur-X (avec XML embarqué) sont acceptés. Les PDF sans XML Factur-X seront rejetés avec une erreur 400. Cette version synchrone utilise uniquement l’extraction PDF native (pdfplumber). Pour les PDF images nécessitant de l’OCR, utilisez l’endpoint ‘/verifier-async`. **Principe de vérification (Factur-X 1.08):** - Principe n°2: Le XML ne peut contenir que des infos présentes dans le PDF - Principe n°4: Toute info XML doit être présente et conforme dans le PDF **Champs vérifiés:** - Identification: BT-1 (n° facture), BT-2 (date), BT-3 (type), BT-5 (devise), BT-23 (cadre) - Vendeur: BT-27 (nom), BT-29 (SIRET), BT-30 (SIREN), BT-31 (TVA) - Acheteur: BT-44 (nom), BT-46 (SIRET), BT-47 (SIREN), BT-48 (TVA) - Montants: BT-109 (HT), BT-110 (TVA), BT-112 (TTC), BT-115 (à payer) - Ventilation TVA: BT-116, BT-117, BT-118, BT-119 - Lignes de facture: BT-153, BT-129, BT-146, BT-131 - Notes obligatoires: PMT, PMD, AAB - Règle BR-FR-09: cohérence SIRET/SIREN

Parameters:

  • fichier_pdf (File)

    Fichier PDF Factur-X à vérifier

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

    the optional parameters

Returns:



297
298
299
300
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 297

def verifier_pdf_sync_api_v1_verification_verifier_post(fichier_pdf, opts = {})
  data, _status_code, _headers = verifier_pdf_sync_api_v1_verification_verifier_post_with_http_info(fichier_pdf, opts)
  data
end

#verifier_pdf_sync_api_v1_verification_verifier_post_0(fichier_pdf, opts = {}) ⇒ ReponseVerificationSucces

Vérifier la conformité PDF/XML Factur-X (synchrone) Vérifie la conformité entre le PDF et son XML Factur-X embarqué. IMPORTANT: Seuls les PDF Factur-X (avec XML embarqué) sont acceptés. Les PDF sans XML Factur-X seront rejetés avec une erreur 400. Cette version synchrone utilise uniquement l’extraction PDF native (pdfplumber). Pour les PDF images nécessitant de l’OCR, utilisez l’endpoint ‘/verifier-async`. **Principe de vérification (Factur-X 1.08):** - Principe n°2: Le XML ne peut contenir que des infos présentes dans le PDF - Principe n°4: Toute info XML doit être présente et conforme dans le PDF **Champs vérifiés:** - Identification: BT-1 (n° facture), BT-2 (date), BT-3 (type), BT-5 (devise), BT-23 (cadre) - Vendeur: BT-27 (nom), BT-29 (SIRET), BT-30 (SIREN), BT-31 (TVA) - Acheteur: BT-44 (nom), BT-46 (SIRET), BT-47 (SIREN), BT-48 (TVA) - Montants: BT-109 (HT), BT-110 (TVA), BT-112 (TTC), BT-115 (à payer) - Ventilation TVA: BT-116, BT-117, BT-118, BT-119 - Lignes de facture: BT-153, BT-129, BT-146, BT-131 - Notes obligatoires: PMT, PMD, AAB - Règle BR-FR-09: cohérence SIRET/SIREN

Parameters:

  • fichier_pdf (File)

    Fichier PDF Factur-X à vérifier

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

    the optional parameters

Returns:



366
367
368
369
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 366

def verifier_pdf_sync_api_v1_verification_verifier_post_0(fichier_pdf, opts = {})
  data, _status_code, _headers = verifier_pdf_sync_api_v1_verification_verifier_post_0_with_http_info(fichier_pdf, opts)
  data
end

#verifier_pdf_sync_api_v1_verification_verifier_post_0_with_http_info(fichier_pdf, opts = {}) ⇒ Array<(ReponseVerificationSucces, Integer, Hash)>

Vérifier la conformité PDF/XML Factur-X (synchrone) Vérifie la conformité entre le PDF et son XML Factur-X embarqué. IMPORTANT: Seuls les PDF Factur-X (avec XML embarqué) sont acceptés. Les PDF sans XML Factur-X seront rejetés avec une erreur 400. Cette version synchrone utilise uniquement l&#39;extraction PDF native (pdfplumber). Pour les PDF images nécessitant de l&#39;OCR, utilisez l&#39;endpoint &#x60;/verifier-async&#x60;. **Principe de vérification (Factur-X 1.08):** - Principe n°2: Le XML ne peut contenir que des infos présentes dans le PDF - Principe n°4: Toute info XML doit être présente et conforme dans le PDF **Champs vérifiés:** - Identification: BT-1 (n° facture), BT-2 (date), BT-3 (type), BT-5 (devise), BT-23 (cadre) - Vendeur: BT-27 (nom), BT-29 (SIRET), BT-30 (SIREN), BT-31 (TVA) - Acheteur: BT-44 (nom), BT-46 (SIRET), BT-47 (SIREN), BT-48 (TVA) - Montants: BT-109 (HT), BT-110 (TVA), BT-112 (TTC), BT-115 (à payer) - Ventilation TVA: BT-116, BT-117, BT-118, BT-119 - Lignes de facture: BT-153, BT-129, BT-146, BT-131 - Notes obligatoires: PMT, PMD, AAB - Règle BR-FR-09: cohérence SIRET/SIREN

Parameters:

  • fichier_pdf (File)

    Fichier PDF Factur-X à vérifier

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

    the optional parameters

Returns:

  • (Array<(ReponseVerificationSucces, Integer, Hash)>)

    ReponseVerificationSucces data, response status code and response headers



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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 376

def verifier_pdf_sync_api_v1_verification_verifier_post_0_with_http_info(fichier_pdf, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VrificationPDFXMLApi.verifier_pdf_sync_api_v1_verification_verifier_post_0 ...'
  end
  # verify the required parameter 'fichier_pdf' is set
  if @api_client.config.client_side_validation && fichier_pdf.nil?
    fail ArgumentError, "Missing the required parameter 'fichier_pdf' when calling VrificationPDFXMLApi.verifier_pdf_sync_api_v1_verification_verifier_post_0"
  end
  # resource path
  local_var_path = '/api/v1/verification/verifier'

  # 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['fichier_pdf'] = fichier_pdf

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

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

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

  new_options = opts.merge(
    :operation => :"VrificationPDFXMLApi.verifier_pdf_sync_api_v1_verification_verifier_post_0",
    :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: VrificationPDFXMLApi#verifier_pdf_sync_api_v1_verification_verifier_post_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#verifier_pdf_sync_api_v1_verification_verifier_post_with_http_info(fichier_pdf, opts = {}) ⇒ Array<(ReponseVerificationSucces, Integer, Hash)>

Vérifier la conformité PDF/XML Factur-X (synchrone) Vérifie la conformité entre le PDF et son XML Factur-X embarqué. IMPORTANT: Seuls les PDF Factur-X (avec XML embarqué) sont acceptés. Les PDF sans XML Factur-X seront rejetés avec une erreur 400. Cette version synchrone utilise uniquement l&#39;extraction PDF native (pdfplumber). Pour les PDF images nécessitant de l&#39;OCR, utilisez l&#39;endpoint &#x60;/verifier-async&#x60;. **Principe de vérification (Factur-X 1.08):** - Principe n°2: Le XML ne peut contenir que des infos présentes dans le PDF - Principe n°4: Toute info XML doit être présente et conforme dans le PDF **Champs vérifiés:** - Identification: BT-1 (n° facture), BT-2 (date), BT-3 (type), BT-5 (devise), BT-23 (cadre) - Vendeur: BT-27 (nom), BT-29 (SIRET), BT-30 (SIREN), BT-31 (TVA) - Acheteur: BT-44 (nom), BT-46 (SIRET), BT-47 (SIREN), BT-48 (TVA) - Montants: BT-109 (HT), BT-110 (TVA), BT-112 (TTC), BT-115 (à payer) - Ventilation TVA: BT-116, BT-117, BT-118, BT-119 - Lignes de facture: BT-153, BT-129, BT-146, BT-131 - Notes obligatoires: PMT, PMD, AAB - Règle BR-FR-09: cohérence SIRET/SIREN

Parameters:

  • fichier_pdf (File)

    Fichier PDF Factur-X à vérifier

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

    the optional parameters

Returns:

  • (Array<(ReponseVerificationSucces, Integer, Hash)>)

    ReponseVerificationSucces data, response status code and response headers



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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/factpulse/api/vrification_pdfxml_api.rb', line 307

def verifier_pdf_sync_api_v1_verification_verifier_post_with_http_info(fichier_pdf, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VrificationPDFXMLApi.verifier_pdf_sync_api_v1_verification_verifier_post ...'
  end
  # verify the required parameter 'fichier_pdf' is set
  if @api_client.config.client_side_validation && fichier_pdf.nil?
    fail ArgumentError, "Missing the required parameter 'fichier_pdf' when calling VrificationPDFXMLApi.verifier_pdf_sync_api_v1_verification_verifier_post"
  end
  # resource path
  local_var_path = '/api/v1/verification/verifier'

  # 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['fichier_pdf'] = fichier_pdf

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

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

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

  new_options = opts.merge(
    :operation => :"VrificationPDFXMLApi.verifier_pdf_sync_api_v1_verification_verifier_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: VrificationPDFXMLApi#verifier_pdf_sync_api_v1_verification_verifier_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end