factpulse 2.0.42 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -3
  3. data/Gemfile.lock +3 -3
  4. data/README.md +91 -91
  5. data/docs/{CredentialsAFNOR.md → AFNORCredentials.md} +2 -2
  6. data/docs/{DestinationAFNOR.md → AFNORDestination.md} +4 -4
  7. data/docs/AFNORHealthCheckResponse.md +22 -0
  8. data/docs/AFNORPDPPAApi.md +25 -25
  9. data/docs/AFNORPDPPADirectoryServiceApi.md +19 -19
  10. data/docs/AFNORPDPPAFlowServiceApi.md +16 -16
  11. data/docs/{ResultatAFNOR.md → AFNORResult.md} +5 -5
  12. data/docs/APIError.md +2 -2
  13. data/docs/{MontantTva.md → APIProfile.md} +2 -2
  14. data/docs/{CodeCadreFacturation.md → AcknowledgmentStatus.md} +2 -2
  15. data/docs/{CodeRaisonReduction.md → AllowanceReasonCode.md} +2 -2
  16. data/docs/{ModeDepot.md → AmountDue.md} +2 -2
  17. data/docs/BoundingBoxSchema.md +7 -7
  18. data/docs/{CategorieTVA.md → CeleryStatus.md} +2 -2
  19. data/docs/CertificateInfoResponse.md +20 -20
  20. data/docs/ChorusProApi.md +123 -123
  21. data/docs/ChorusProDestination.md +20 -0
  22. data/docs/ChorusProResult.md +22 -0
  23. data/docs/Destination.md +7 -7
  24. data/docs/{ModePaiement.md → DocumentType.md} +2 -2
  25. data/docs/{AdresseElectronique.md → ElectronicAddress.md} +4 -4
  26. data/docs/EnrichedInvoiceInfo.md +32 -0
  27. data/docs/FacturXPDFInfo.md +22 -0
  28. data/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +26 -0
  29. data/docs/{CredentialsChorusPro.md → FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md} +4 -4
  30. data/docs/FactureFacturX.md +30 -30
  31. data/docs/FieldStatus.md +15 -0
  32. data/docs/{DirectionFlux.md → FlowDirection.md} +2 -2
  33. data/docs/FlowProfile.md +15 -0
  34. data/docs/FlowSummary.md +32 -0
  35. data/docs/{ProfilFlux.md → FlowSyntax.md} +2 -2
  36. data/docs/{TypeTVA.md → FlowType.md} +2 -2
  37. data/docs/GenerateCertificateRequest.md +19 -19
  38. data/docs/GenerateCertificateResponse.md +8 -8
  39. data/docs/GetChorusProIdRequest.md +22 -0
  40. data/docs/GetChorusProIdResponse.md +24 -0
  41. data/docs/GetInvoiceRequest.md +20 -0
  42. data/docs/GetInvoiceResponse.md +34 -0
  43. data/docs/GetStructureRequest.md +22 -0
  44. data/docs/GetStructureResponse.md +34 -0
  45. data/docs/GlobalAllowanceAmount.md +15 -0
  46. data/docs/{SantApi.md → HealthApi.md} +23 -23
  47. data/docs/IncomingInvoice.md +54 -0
  48. data/docs/IncomingSupplier.md +32 -0
  49. data/docs/{FormatFacture.md → InvoiceFormat.md} +2 -2
  50. data/docs/InvoiceLine.md +46 -0
  51. data/docs/InvoiceLineAllowanceAmount.md +15 -0
  52. data/docs/InvoiceNote.md +20 -0
  53. data/docs/InvoiceProcessingApi.md +831 -0
  54. data/docs/InvoiceReferences.md +32 -0
  55. data/docs/{StatutFacture.md → InvoiceStatus.md} +5 -5
  56. data/docs/InvoiceTotals.md +30 -0
  57. data/docs/InvoiceTotalsPrepayment.md +15 -0
  58. data/docs/InvoiceTypeCode.md +15 -0
  59. data/docs/InvoicingFramework.md +24 -0
  60. data/docs/InvoicingFrameworkCode.md +15 -0
  61. data/docs/LineNetAmount.md +15 -0
  62. data/docs/MandatoryNoteSchema.md +30 -0
  63. data/docs/ManualRate.md +15 -0
  64. data/docs/ManualVatRate.md +15 -0
  65. data/docs/OperationNature.md +15 -0
  66. data/docs/{FormatSortie.md → OutputFormat.md} +2 -2
  67. data/docs/PDFValidationResultAPI.md +62 -0
  68. data/docs/PDFXMLVerificationApi.md +435 -0
  69. data/docs/PDPCredentials.md +4 -4
  70. data/docs/PageDimensionsSchema.md +20 -0
  71. data/docs/{Beneficiaire.md → Payee.md} +5 -5
  72. data/docs/PaymentMeans.md +15 -0
  73. data/docs/PostalAddress.md +26 -0
  74. data/docs/ProcessingOptions.md +24 -0
  75. data/docs/{Quantite.md → Quantity.md} +2 -2
  76. data/docs/Recipient.md +28 -0
  77. data/docs/SearchFlowRequest.md +34 -0
  78. data/docs/SearchFlowResponse.md +24 -0
  79. data/docs/SearchServicesResponse.md +24 -0
  80. data/docs/SearchStructureRequest.md +26 -0
  81. data/docs/SearchStructureResponse.md +24 -0
  82. data/docs/SignatureInfo.md +2 -2
  83. data/docs/SignatureInfoAPI.md +28 -0
  84. data/docs/SignatureParameters.md +34 -0
  85. data/docs/SimplifiedInvoiceData.md +34 -0
  86. data/docs/StructureInfo.md +10 -10
  87. data/docs/StructureParameters.md +22 -0
  88. data/docs/StructureService.md +24 -0
  89. data/docs/SubmissionMode.md +15 -0
  90. data/docs/SubmitCompleteInvoiceRequest.md +26 -0
  91. data/docs/SubmitCompleteInvoiceResponse.md +34 -0
  92. data/docs/SubmitFlowRequest.md +28 -0
  93. data/docs/SubmitFlowResponse.md +30 -0
  94. data/docs/SubmitInvoiceRequest.md +46 -0
  95. data/docs/SubmitInvoiceResponse.md +24 -0
  96. data/docs/SupplementaryAttachment.md +26 -0
  97. data/docs/Supplier.md +36 -0
  98. data/docs/TaskResponse.md +18 -0
  99. data/docs/TaskStatus.md +22 -0
  100. data/docs/TaxableAmount.md +15 -0
  101. data/docs/TotalGrossAmount.md +15 -0
  102. data/docs/TotalNetAmount.md +15 -0
  103. data/docs/TotalVATAmount.md +15 -0
  104. data/docs/UnitNetPrice.md +15 -0
  105. data/docs/UnitOfMeasure.md +15 -0
  106. data/docs/UserApi.md +74 -0
  107. data/docs/VATAccountingCode.md +15 -0
  108. data/docs/{ProfilAPI.md → VATAmount.md} +2 -2
  109. data/docs/VATCategory.md +15 -0
  110. data/docs/VATLine.md +30 -0
  111. data/docs/ValidationErrorDetail.md +3 -3
  112. data/docs/ValidationErrorResponse.md +18 -0
  113. data/docs/ValidationSuccessResponse.md +18 -0
  114. data/docs/{TypeFlux.md → VatAmount.md} +2 -2
  115. data/docs/VerificationSuccessResponse.md +36 -0
  116. data/docs/VerifiedFieldSchema.md +34 -0
  117. data/factpulse.gemspec +4 -4
  118. data/lib/factpulse/api/afnorpdppa_api.rb +25 -25
  119. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +40 -40
  120. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +16 -16
  121. data/lib/factpulse/api/chorus_pro_api.rb +127 -127
  122. data/lib/factpulse/api/health_api.rb +136 -0
  123. data/lib/factpulse/api/invoice_processing_api.rb +835 -0
  124. data/lib/factpulse/api/pdfxml_verification_api.rb +430 -0
  125. data/lib/factpulse/api/user_api.rb +79 -0
  126. data/lib/factpulse/api_client.rb +2 -2
  127. data/lib/factpulse/api_error.rb +2 -2
  128. data/lib/factpulse/api_model_base.rb +2 -2
  129. data/lib/factpulse/configuration.rb +2 -2
  130. data/lib/factpulse/helpers/client.rb +182 -182
  131. data/lib/factpulse/helpers/exceptions.rb +2 -2
  132. data/lib/factpulse/helpers/helpers.rb +5 -5
  133. data/lib/factpulse/models/acknowledgment_status.rb +41 -0
  134. data/lib/factpulse/models/afnor_credentials.rb +169 -0
  135. data/lib/factpulse/models/{destination_afnor.rb → afnor_destination.rb} +10 -10
  136. data/lib/factpulse/models/{reponse_healthcheck_afnor.rb → afnor_health_check_response.rb} +9 -9
  137. data/lib/factpulse/models/{resultat_afnor.rb → afnor_result.rb} +13 -13
  138. data/lib/factpulse/models/allowance_reason_code.rb +45 -0
  139. data/lib/factpulse/models/amount_due.rb +104 -0
  140. data/lib/factpulse/models/api_error.rb +5 -5
  141. data/lib/factpulse/models/api_profile.rb +42 -0
  142. data/lib/factpulse/models/bounding_box_schema.rb +10 -10
  143. data/lib/factpulse/models/celery_status.rb +43 -0
  144. data/lib/factpulse/models/certificate_info_response.rb +164 -164
  145. data/lib/factpulse/models/{destination_chorus_pro.rb → chorus_pro_destination.rb} +7 -7
  146. data/lib/factpulse/models/chorus_pro_result.rb +186 -0
  147. data/lib/factpulse/models/destination.rb +7 -7
  148. data/lib/factpulse/models/document_type.rb +43 -0
  149. data/lib/factpulse/models/electronic_address.rb +196 -0
  150. data/lib/factpulse/models/enriched_invoice_info.rb +348 -0
  151. data/lib/factpulse/models/error_level.rb +2 -2
  152. data/lib/factpulse/models/error_source.rb +2 -2
  153. data/lib/factpulse/models/factur_xpdf_info.rb +205 -0
  154. data/lib/factpulse/models/{chorus_pro_credentials.rb → facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb} +11 -11
  155. data/lib/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb +191 -0
  156. data/lib/factpulse/models/facture_factur_x.rb +160 -160
  157. data/lib/factpulse/models/field_status.rb +43 -0
  158. data/lib/factpulse/models/flow_direction.rb +40 -0
  159. data/lib/factpulse/models/flow_profile.rb +41 -0
  160. data/lib/factpulse/models/flow_summary.rb +251 -0
  161. data/lib/factpulse/models/flow_syntax.rb +43 -0
  162. data/lib/factpulse/models/flow_type.rb +43 -0
  163. data/lib/factpulse/models/generate_certificate_request.rb +106 -106
  164. data/lib/factpulse/models/generate_certificate_response.rb +47 -47
  165. data/lib/factpulse/models/get_chorus_pro_id_request.rb +188 -0
  166. data/lib/factpulse/models/get_chorus_pro_id_response.rb +230 -0
  167. data/lib/factpulse/models/get_invoice_request.rb +176 -0
  168. data/lib/factpulse/models/get_invoice_response.rb +261 -0
  169. data/lib/factpulse/models/get_structure_request.rb +188 -0
  170. data/lib/factpulse/models/get_structure_response.rb +261 -0
  171. data/lib/factpulse/models/global_allowance_amount.rb +104 -0
  172. data/lib/factpulse/models/http_validation_error.rb +2 -2
  173. data/lib/factpulse/models/incoming_invoice.rb +522 -0
  174. data/lib/factpulse/models/incoming_supplier.rb +236 -0
  175. data/lib/factpulse/models/invoice_format.rb +41 -0
  176. data/lib/factpulse/models/invoice_line.rb +389 -0
  177. data/lib/factpulse/models/invoice_line_allowance_amount.rb +104 -0
  178. data/lib/factpulse/models/invoice_note.rb +175 -0
  179. data/lib/factpulse/models/invoice_references.rb +290 -0
  180. data/lib/factpulse/models/invoice_status.rb +203 -0
  181. data/lib/factpulse/models/invoice_totals.rb +272 -0
  182. data/lib/factpulse/models/invoice_totals_prepayment.rb +104 -0
  183. data/lib/factpulse/models/invoice_type_code.rb +70 -0
  184. data/lib/factpulse/models/invoicing_framework.rb +217 -0
  185. data/lib/factpulse/models/invoicing_framework_code.rb +46 -0
  186. data/lib/factpulse/models/line_net_amount.rb +104 -0
  187. data/lib/factpulse/models/mandatory_note_schema.rb +265 -0
  188. data/lib/factpulse/models/manual_rate.rb +104 -0
  189. data/lib/factpulse/models/manual_vat_rate.rb +104 -0
  190. data/lib/factpulse/models/operation_nature.rb +52 -0
  191. data/lib/factpulse/models/output_format.rb +40 -0
  192. data/lib/factpulse/models/page_dimensions_schema.rb +193 -0
  193. data/lib/factpulse/models/{beneficiaire.rb → payee.rb} +15 -15
  194. data/lib/factpulse/models/payment_means.rb +50 -0
  195. data/lib/factpulse/models/pdf_validation_result_api.rb +523 -0
  196. data/lib/factpulse/models/pdp_credentials.rb +7 -7
  197. data/lib/factpulse/models/postal_address.rb +189 -0
  198. data/lib/factpulse/models/processing_options.rb +207 -0
  199. data/lib/factpulse/models/quantity.rb +104 -0
  200. data/lib/factpulse/models/recipient.rb +201 -0
  201. data/lib/factpulse/models/scheme_id.rb +2 -2
  202. data/lib/factpulse/models/search_flow_request.rb +306 -0
  203. data/lib/factpulse/models/search_flow_response.rb +249 -0
  204. data/lib/factpulse/models/search_services_response.rb +214 -0
  205. data/lib/factpulse/models/search_structure_request.rb +191 -0
  206. data/lib/factpulse/models/search_structure_response.rb +216 -0
  207. data/lib/factpulse/models/signature_info.rb +20 -20
  208. data/lib/factpulse/models/signature_info_api.rb +216 -0
  209. data/lib/factpulse/models/signature_parameters.rb +235 -0
  210. data/lib/factpulse/models/simplified_invoice_data.rb +342 -0
  211. data/lib/factpulse/models/structure_info.rb +84 -84
  212. data/lib/factpulse/models/structure_parameters.rb +175 -0
  213. data/lib/factpulse/models/structure_service.rb +247 -0
  214. data/lib/factpulse/models/submission_mode.rb +44 -0
  215. data/lib/factpulse/models/submit_complete_invoice_request.rb +239 -0
  216. data/lib/factpulse/models/submit_complete_invoice_response.rb +355 -0
  217. data/lib/factpulse/models/submit_flow_request.rb +238 -0
  218. data/lib/factpulse/models/submit_flow_response.rb +294 -0
  219. data/lib/factpulse/models/submit_invoice_request.rb +388 -0
  220. data/lib/factpulse/models/submit_invoice_response.rb +213 -0
  221. data/lib/factpulse/models/supplementary_attachment.rb +269 -0
  222. data/lib/factpulse/models/supplier.rb +257 -0
  223. data/lib/factpulse/models/task_response.rb +166 -0
  224. data/lib/factpulse/models/task_status.rb +227 -0
  225. data/lib/factpulse/models/taxable_amount.rb +104 -0
  226. data/lib/factpulse/models/total_gross_amount.rb +104 -0
  227. data/lib/factpulse/models/total_net_amount.rb +104 -0
  228. data/lib/factpulse/models/total_vat_amount.rb +104 -0
  229. data/lib/factpulse/models/unit_net_price.rb +104 -0
  230. data/lib/factpulse/models/unit_of_measure.rb +50 -0
  231. data/lib/factpulse/models/validation_error.rb +2 -2
  232. data/lib/factpulse/models/validation_error_detail.rb +6 -6
  233. data/lib/factpulse/models/validation_error_loc_inner.rb +2 -2
  234. data/lib/factpulse/models/validation_error_response.rb +168 -0
  235. data/lib/factpulse/models/validation_success_response.rb +166 -0
  236. data/lib/factpulse/models/vat_accounting_code.rb +46 -0
  237. data/lib/factpulse/models/vat_amount.rb +104 -0
  238. data/lib/factpulse/models/vat_category.rb +47 -0
  239. data/lib/factpulse/models/vat_line.rb +262 -0
  240. data/lib/factpulse/models/verification_success_response.rb +343 -0
  241. data/lib/factpulse/models/verified_field_schema.rb +334 -0
  242. data/lib/factpulse/version.rb +3 -3
  243. data/lib/factpulse.rb +99 -99
  244. metadata +250 -257
  245. data/docs/AdressePostale.md +0 -26
  246. data/docs/CadreDeFacturation.md +0 -24
  247. data/docs/ChampVerifieSchema.md +0 -34
  248. data/docs/ChorusProCredentials.md +0 -26
  249. data/docs/ConsulterFactureRequest.md +0 -20
  250. data/docs/ConsulterFactureResponse.md +0 -34
  251. data/docs/ConsulterStructureRequest.md +0 -22
  252. data/docs/ConsulterStructureResponse.md +0 -34
  253. data/docs/Destinataire.md +0 -28
  254. data/docs/DestinationChorusPro.md +0 -20
  255. data/docs/DimensionPageSchema.md +0 -20
  256. data/docs/DonneesFactureSimplifiees.md +0 -34
  257. data/docs/FactureEnrichieInfo.md +0 -32
  258. data/docs/FactureEntrante.md +0 -54
  259. data/docs/FluxResume.md +0 -32
  260. data/docs/Fournisseur.md +0 -36
  261. data/docs/FournisseurEntrant.md +0 -32
  262. data/docs/InformationSignatureAPI.md +0 -28
  263. data/docs/LigneDePoste.md +0 -46
  264. data/docs/LigneDePosteMontantRemiseHt.md +0 -15
  265. data/docs/LigneDePosteTauxTvaManuel.md +0 -15
  266. data/docs/LigneDeTVA.md +0 -30
  267. data/docs/MontantAPayer.md +0 -15
  268. data/docs/MontantBaseHt.md +0 -15
  269. data/docs/MontantHtTotal.md +0 -15
  270. data/docs/MontantRemiseGlobaleTtc.md +0 -15
  271. data/docs/MontantTotal.md +0 -30
  272. data/docs/MontantTotalAcompte.md +0 -15
  273. data/docs/MontantTotalLigneHt.md +0 -15
  274. data/docs/MontantTtcTotal.md +0 -15
  275. data/docs/MontantTvaLigne.md +0 -15
  276. data/docs/MontantTvaTotal.md +0 -15
  277. data/docs/MontantUnitaireHt.md +0 -15
  278. data/docs/NatureOperation.md +0 -15
  279. data/docs/Note.md +0 -20
  280. data/docs/NoteObligatoireSchema.md +0 -30
  281. data/docs/ObtenirIdChorusProRequest.md +0 -22
  282. data/docs/ObtenirIdChorusProResponse.md +0 -24
  283. data/docs/OptionsProcessing.md +0 -24
  284. data/docs/PDFFacturXInfo.md +0 -22
  285. data/docs/ParametresSignature.md +0 -34
  286. data/docs/ParametresStructure.md +0 -22
  287. data/docs/PieceJointeComplementaire.md +0 -26
  288. data/docs/RechercherServicesResponse.md +0 -24
  289. data/docs/RechercherStructureRequest.md +0 -26
  290. data/docs/RechercherStructureResponse.md +0 -24
  291. data/docs/References.md +0 -32
  292. data/docs/ReponseHealthcheckAFNOR.md +0 -22
  293. data/docs/ReponseRechercheFlux.md +0 -24
  294. data/docs/ReponseSoumissionFlux.md +0 -30
  295. data/docs/ReponseTache.md +0 -18
  296. data/docs/ReponseValidationErreur.md +0 -18
  297. data/docs/ReponseValidationSucces.md +0 -18
  298. data/docs/ReponseVerificationSucces.md +0 -36
  299. data/docs/RequeteRechercheFlux.md +0 -34
  300. data/docs/RequeteSoumissionFlux.md +0 -28
  301. data/docs/ResultatChorusPro.md +0 -22
  302. data/docs/ResultatValidationPDFAPI.md +0 -62
  303. data/docs/ServiceStructure.md +0 -24
  304. data/docs/SoumettreFactureCompleteRequest.md +0 -26
  305. data/docs/SoumettreFactureCompleteResponse.md +0 -34
  306. data/docs/SoumettreFactureRequest.md +0 -46
  307. data/docs/SoumettreFactureResponse.md +0 -24
  308. data/docs/StatutAcquittement.md +0 -15
  309. data/docs/StatutCelery.md +0 -15
  310. data/docs/StatutChampAPI.md +0 -15
  311. data/docs/StatutTache.md +0 -22
  312. data/docs/SyntaxeFlux.md +0 -15
  313. data/docs/Tauxmanuel.md +0 -15
  314. data/docs/TraitementFactureApi.md +0 -831
  315. data/docs/TypeDocument.md +0 -15
  316. data/docs/TypeFacture.md +0 -15
  317. data/docs/Unite.md +0 -15
  318. data/docs/UtilisateurApi.md +0 -74
  319. data/docs/VrificationPDFXMLApi.md +0 -435
  320. data/lib/factpulse/api/sant_api.rb +0 -136
  321. data/lib/factpulse/api/traitement_facture_api.rb +0 -835
  322. data/lib/factpulse/api/utilisateur_api.rb +0 -79
  323. data/lib/factpulse/api/vrification_pdfxml_api.rb +0 -430
  324. data/lib/factpulse/models/adresse_electronique.rb +0 -196
  325. data/lib/factpulse/models/adresse_postale.rb +0 -189
  326. data/lib/factpulse/models/cadre_de_facturation.rb +0 -217
  327. data/lib/factpulse/models/categorie_tva.rb +0 -47
  328. data/lib/factpulse/models/champ_verifie_schema.rb +0 -334
  329. data/lib/factpulse/models/code_cadre_facturation.rb +0 -42
  330. data/lib/factpulse/models/code_raison_reduction.rb +0 -45
  331. data/lib/factpulse/models/consulter_facture_request.rb +0 -176
  332. data/lib/factpulse/models/consulter_facture_response.rb +0 -261
  333. data/lib/factpulse/models/consulter_structure_request.rb +0 -188
  334. data/lib/factpulse/models/consulter_structure_response.rb +0 -261
  335. data/lib/factpulse/models/credentials_afnor.rb +0 -169
  336. data/lib/factpulse/models/credentials_chorus_pro.rb +0 -191
  337. data/lib/factpulse/models/destinataire.rb +0 -201
  338. data/lib/factpulse/models/dimension_page_schema.rb +0 -193
  339. data/lib/factpulse/models/direction_flux.rb +0 -40
  340. data/lib/factpulse/models/donnees_facture_simplifiees.rb +0 -342
  341. data/lib/factpulse/models/facture_enrichie_info.rb +0 -348
  342. data/lib/factpulse/models/facture_entrante.rb +0 -522
  343. data/lib/factpulse/models/flux_resume.rb +0 -251
  344. data/lib/factpulse/models/format_facture.rb +0 -41
  345. data/lib/factpulse/models/format_sortie.rb +0 -40
  346. data/lib/factpulse/models/fournisseur.rb +0 -257
  347. data/lib/factpulse/models/fournisseur_entrant.rb +0 -236
  348. data/lib/factpulse/models/information_signature_api.rb +0 -216
  349. data/lib/factpulse/models/ligne_de_poste.rb +0 -390
  350. data/lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb +0 -104
  351. data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +0 -104
  352. data/lib/factpulse/models/ligne_de_tva.rb +0 -262
  353. data/lib/factpulse/models/mode_depot.rb +0 -41
  354. data/lib/factpulse/models/mode_paiement.rb +0 -44
  355. data/lib/factpulse/models/montant_a_payer.rb +0 -104
  356. data/lib/factpulse/models/montant_base_ht.rb +0 -104
  357. data/lib/factpulse/models/montant_ht_total.rb +0 -104
  358. data/lib/factpulse/models/montant_remise_globale_ttc.rb +0 -104
  359. data/lib/factpulse/models/montant_total.rb +0 -272
  360. data/lib/factpulse/models/montant_total_acompte.rb +0 -104
  361. data/lib/factpulse/models/montant_total_ligne_ht.rb +0 -104
  362. data/lib/factpulse/models/montant_ttc_total.rb +0 -104
  363. data/lib/factpulse/models/montant_tva.rb +0 -104
  364. data/lib/factpulse/models/montant_tva_ligne.rb +0 -104
  365. data/lib/factpulse/models/montant_tva_total.rb +0 -104
  366. data/lib/factpulse/models/montant_unitaire_ht.rb +0 -104
  367. data/lib/factpulse/models/nature_operation.rb +0 -52
  368. data/lib/factpulse/models/note.rb +0 -175
  369. data/lib/factpulse/models/note_obligatoire_schema.rb +0 -265
  370. data/lib/factpulse/models/obtenir_id_chorus_pro_request.rb +0 -188
  371. data/lib/factpulse/models/obtenir_id_chorus_pro_response.rb +0 -230
  372. data/lib/factpulse/models/options_processing.rb +0 -207
  373. data/lib/factpulse/models/parametres_signature.rb +0 -235
  374. data/lib/factpulse/models/parametres_structure.rb +0 -175
  375. data/lib/factpulse/models/pdf_factur_x_info.rb +0 -205
  376. data/lib/factpulse/models/piece_jointe_complementaire.rb +0 -269
  377. data/lib/factpulse/models/profil_api.rb +0 -42
  378. data/lib/factpulse/models/profil_flux.rb +0 -41
  379. data/lib/factpulse/models/quantite.rb +0 -104
  380. data/lib/factpulse/models/rechercher_services_response.rb +0 -214
  381. data/lib/factpulse/models/rechercher_structure_request.rb +0 -191
  382. data/lib/factpulse/models/rechercher_structure_response.rb +0 -216
  383. data/lib/factpulse/models/references.rb +0 -290
  384. data/lib/factpulse/models/reponse_recherche_flux.rb +0 -249
  385. data/lib/factpulse/models/reponse_soumission_flux.rb +0 -294
  386. data/lib/factpulse/models/reponse_tache.rb +0 -165
  387. data/lib/factpulse/models/reponse_validation_erreur.rb +0 -167
  388. data/lib/factpulse/models/reponse_validation_succes.rb +0 -165
  389. data/lib/factpulse/models/reponse_verification_succes.rb +0 -343
  390. data/lib/factpulse/models/requete_recherche_flux.rb +0 -306
  391. data/lib/factpulse/models/requete_soumission_flux.rb +0 -238
  392. data/lib/factpulse/models/resultat_chorus_pro.rb +0 -186
  393. data/lib/factpulse/models/resultat_validation_pdfapi.rb +0 -523
  394. data/lib/factpulse/models/service_structure.rb +0 -247
  395. data/lib/factpulse/models/soumettre_facture_complete_request.rb +0 -239
  396. data/lib/factpulse/models/soumettre_facture_complete_response.rb +0 -355
  397. data/lib/factpulse/models/soumettre_facture_request.rb +0 -388
  398. data/lib/factpulse/models/soumettre_facture_response.rb +0 -213
  399. data/lib/factpulse/models/statut_acquittement.rb +0 -41
  400. data/lib/factpulse/models/statut_celery.rb +0 -43
  401. data/lib/factpulse/models/statut_champ_api.rb +0 -43
  402. data/lib/factpulse/models/statut_facture.rb +0 -203
  403. data/lib/factpulse/models/statut_tache.rb +0 -226
  404. data/lib/factpulse/models/syntaxe_flux.rb +0 -43
  405. data/lib/factpulse/models/tauxmanuel.rb +0 -104
  406. data/lib/factpulse/models/type_document.rb +0 -43
  407. data/lib/factpulse/models/type_facture.rb +0 -54
  408. data/lib/factpulse/models/type_flux.rb +0 -43
  409. data/lib/factpulse/models/type_tva.rb +0 -42
  410. data/lib/factpulse/models/unite.rb +0 -44
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #API REST FactPulse
2
+ #FactPulse REST API
3
3
 
4
- # API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` Le `client_uid` sera inclus dans le JWT et permettra à l'API d'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l'accès - ✅ Intégration facile dans n'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l'automatisation ### 📚 Documentation complète Pour plus d'informations sur l'authentification et l'utilisation de l'API : https://www.factpulse.fr/documentation-api/
4
+ # REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice 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) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF 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 - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 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://www.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://www.factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://www.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://www.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://www.factpulse.fr/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://www.factpulse.fr/documentation-api/
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -14,53 +14,53 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Requête pour générer un certificat X.509 auto-signé de test. ⚠️ ATTENTION : Ce certificat est destiné uniquement aux TESTS. NE PAS utiliser en production ! Niveau eIDAS : SES (Simple Electronic Signature)
17
+ # Request to generate a self-signed X.509 test certificate. WARNING: This certificate is intended for TESTING only. DO NOT use in production! eIDAS level: SES (Simple Electronic Signature)
18
18
  class GenerateCertificateRequest < ApiModelBase
19
- # Common Name (CN) - Nom du certificat
19
+ # Common Name (CN) - Certificate name
20
20
  attr_accessor :cn
21
21
 
22
- # Organisation (O)
23
- attr_accessor :organisation
22
+ # Organization (O)
23
+ attr_accessor :organization
24
24
 
25
- # Code pays ISO 2 lettres (C)
26
- attr_accessor :pays
25
+ # ISO 2-letter country code (C)
26
+ attr_accessor :country
27
27
 
28
- # Ville (L)
29
- attr_accessor :ville
28
+ # City (L)
29
+ attr_accessor :city
30
30
 
31
- # Province/État (ST)
32
- attr_accessor :province
31
+ # State/Province (ST)
32
+ attr_accessor :state
33
33
 
34
34
  attr_accessor :email
35
35
 
36
- # Durée de validité en jours
37
- attr_accessor :duree_jours
36
+ # Validity duration in days
37
+ attr_accessor :validity_days
38
38
 
39
- # Taille de la clé RSA en bits
40
- attr_accessor :taille_cle
39
+ # RSA key size in bits
40
+ attr_accessor :key_size
41
41
 
42
- attr_accessor :passphrase_cle
42
+ attr_accessor :key_passphrase
43
43
 
44
- # Générer aussi un fichier PKCS#12 (.p12)
45
- attr_accessor :generer_p12
44
+ # Also generate a PKCS#12 (.p12) file
45
+ attr_accessor :generate_p12
46
46
 
47
- # Passphrase pour le fichier PKCS#12
48
- attr_accessor :passphrase_p12
47
+ # Passphrase for PKCS#12 file
48
+ attr_accessor :p12_passphrase
49
49
 
50
50
  # Attribute mapping from ruby-style variable name to JSON key.
51
51
  def self.attribute_map
52
52
  {
53
53
  :'cn' => :'cn',
54
- :'organisation' => :'organisation',
55
- :'pays' => :'pays',
56
- :'ville' => :'ville',
57
- :'province' => :'province',
54
+ :'organization' => :'organization',
55
+ :'country' => :'country',
56
+ :'city' => :'city',
57
+ :'state' => :'state',
58
58
  :'email' => :'email',
59
- :'duree_jours' => :'duree_jours',
60
- :'taille_cle' => :'taille_cle',
61
- :'passphrase_cle' => :'passphrase_cle',
62
- :'generer_p12' => :'generer_p12',
63
- :'passphrase_p12' => :'passphrase_p12'
59
+ :'validity_days' => :'validity_days',
60
+ :'key_size' => :'key_size',
61
+ :'key_passphrase' => :'key_passphrase',
62
+ :'generate_p12' => :'generate_p12',
63
+ :'p12_passphrase' => :'p12_passphrase'
64
64
  }
65
65
  end
66
66
 
@@ -78,16 +78,16 @@ module FactPulse
78
78
  def self.openapi_types
79
79
  {
80
80
  :'cn' => :'String',
81
- :'organisation' => :'String',
82
- :'pays' => :'String',
83
- :'ville' => :'String',
84
- :'province' => :'String',
81
+ :'organization' => :'String',
82
+ :'country' => :'String',
83
+ :'city' => :'String',
84
+ :'state' => :'String',
85
85
  :'email' => :'String',
86
- :'duree_jours' => :'Integer',
87
- :'taille_cle' => :'Integer',
88
- :'passphrase_cle' => :'String',
89
- :'generer_p12' => :'Boolean',
90
- :'passphrase_p12' => :'String'
86
+ :'validity_days' => :'Integer',
87
+ :'key_size' => :'Integer',
88
+ :'key_passphrase' => :'String',
89
+ :'generate_p12' => :'Boolean',
90
+ :'p12_passphrase' => :'String'
91
91
  }
92
92
  end
93
93
 
@@ -95,7 +95,7 @@ module FactPulse
95
95
  def self.openapi_nullable
96
96
  Set.new([
97
97
  :'email',
98
- :'passphrase_cle',
98
+ :'key_passphrase',
99
99
  ])
100
100
  end
101
101
 
@@ -121,60 +121,60 @@ module FactPulse
121
121
  self.cn = 'Test Signature FactPulse'
122
122
  end
123
123
 
124
- if attributes.key?(:'organisation')
125
- self.organisation = attributes[:'organisation']
124
+ if attributes.key?(:'organization')
125
+ self.organization = attributes[:'organization']
126
126
  else
127
- self.organisation = 'FactPulse Test'
127
+ self.organization = 'FactPulse Test'
128
128
  end
129
129
 
130
- if attributes.key?(:'pays')
131
- self.pays = attributes[:'pays']
130
+ if attributes.key?(:'country')
131
+ self.country = attributes[:'country']
132
132
  else
133
- self.pays = 'FR'
133
+ self.country = 'FR'
134
134
  end
135
135
 
136
- if attributes.key?(:'ville')
137
- self.ville = attributes[:'ville']
136
+ if attributes.key?(:'city')
137
+ self.city = attributes[:'city']
138
138
  else
139
- self.ville = 'Paris'
139
+ self.city = 'Paris'
140
140
  end
141
141
 
142
- if attributes.key?(:'province')
143
- self.province = attributes[:'province']
142
+ if attributes.key?(:'state')
143
+ self.state = attributes[:'state']
144
144
  else
145
- self.province = 'Ile-de-France'
145
+ self.state = 'Ile-de-France'
146
146
  end
147
147
 
148
148
  if attributes.key?(:'email')
149
149
  self.email = attributes[:'email']
150
150
  end
151
151
 
152
- if attributes.key?(:'duree_jours')
153
- self.duree_jours = attributes[:'duree_jours']
152
+ if attributes.key?(:'validity_days')
153
+ self.validity_days = attributes[:'validity_days']
154
154
  else
155
- self.duree_jours = 365
155
+ self.validity_days = 365
156
156
  end
157
157
 
158
- if attributes.key?(:'taille_cle')
159
- self.taille_cle = attributes[:'taille_cle']
158
+ if attributes.key?(:'key_size')
159
+ self.key_size = attributes[:'key_size']
160
160
  else
161
- self.taille_cle = 2048
161
+ self.key_size = 2048
162
162
  end
163
163
 
164
- if attributes.key?(:'passphrase_cle')
165
- self.passphrase_cle = attributes[:'passphrase_cle']
164
+ if attributes.key?(:'key_passphrase')
165
+ self.key_passphrase = attributes[:'key_passphrase']
166
166
  end
167
167
 
168
- if attributes.key?(:'generer_p12')
169
- self.generer_p12 = attributes[:'generer_p12']
168
+ if attributes.key?(:'generate_p12')
169
+ self.generate_p12 = attributes[:'generate_p12']
170
170
  else
171
- self.generer_p12 = false
171
+ self.generate_p12 = false
172
172
  end
173
173
 
174
- if attributes.key?(:'passphrase_p12')
175
- self.passphrase_p12 = attributes[:'passphrase_p12']
174
+ if attributes.key?(:'p12_passphrase')
175
+ self.p12_passphrase = attributes[:'p12_passphrase']
176
176
  else
177
- self.passphrase_p12 = 'changeme'
177
+ self.p12_passphrase = 'changeme'
178
178
  end
179
179
  end
180
180
 
@@ -183,20 +183,20 @@ module FactPulse
183
183
  def list_invalid_properties
184
184
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
185
185
  invalid_properties = Array.new
186
- if !@pays.nil? && @pays.to_s.length > 2
187
- invalid_properties.push('invalid value for "pays", the character length must be smaller than or equal to 2.')
186
+ if !@country.nil? && @country.to_s.length > 2
187
+ invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.')
188
188
  end
189
189
 
190
- if !@pays.nil? && @pays.to_s.length < 2
191
- invalid_properties.push('invalid value for "pays", the character length must be greater than or equal to 2.')
190
+ if !@country.nil? && @country.to_s.length < 2
191
+ invalid_properties.push('invalid value for "country", the character length must be greater than or equal to 2.')
192
192
  end
193
193
 
194
- if !@duree_jours.nil? && @duree_jours > 3650
195
- invalid_properties.push('invalid value for "duree_jours", must be smaller than or equal to 3650.')
194
+ if !@validity_days.nil? && @validity_days > 3650
195
+ invalid_properties.push('invalid value for "validity_days", must be smaller than or equal to 3650.')
196
196
  end
197
197
 
198
- if !@duree_jours.nil? && @duree_jours < 1
199
- invalid_properties.push('invalid value for "duree_jours", must be greater than or equal to 1.')
198
+ if !@validity_days.nil? && @validity_days < 1
199
+ invalid_properties.push('invalid value for "validity_days", must be greater than or equal to 1.')
200
200
  end
201
201
 
202
202
  invalid_properties
@@ -206,47 +206,47 @@ module FactPulse
206
206
  # @return true if the model is valid
207
207
  def valid?
208
208
  warn '[DEPRECATED] the `valid?` method is obsolete'
209
- return false if !@pays.nil? && @pays.to_s.length > 2
210
- return false if !@pays.nil? && @pays.to_s.length < 2
211
- return false if !@duree_jours.nil? && @duree_jours > 3650
212
- return false if !@duree_jours.nil? && @duree_jours < 1
209
+ return false if !@country.nil? && @country.to_s.length > 2
210
+ return false if !@country.nil? && @country.to_s.length < 2
211
+ return false if !@validity_days.nil? && @validity_days > 3650
212
+ return false if !@validity_days.nil? && @validity_days < 1
213
213
  true
214
214
  end
215
215
 
216
216
  # Custom attribute writer method with validation
217
- # @param [Object] pays Value to be assigned
218
- def pays=(pays)
219
- if pays.nil?
220
- fail ArgumentError, 'pays cannot be nil'
217
+ # @param [Object] country Value to be assigned
218
+ def country=(country)
219
+ if country.nil?
220
+ fail ArgumentError, 'country cannot be nil'
221
221
  end
222
222
 
223
- if pays.to_s.length > 2
224
- fail ArgumentError, 'invalid value for "pays", the character length must be smaller than or equal to 2.'
223
+ if country.to_s.length > 2
224
+ fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.'
225
225
  end
226
226
 
227
- if pays.to_s.length < 2
228
- fail ArgumentError, 'invalid value for "pays", the character length must be greater than or equal to 2.'
227
+ if country.to_s.length < 2
228
+ fail ArgumentError, 'invalid value for "country", the character length must be greater than or equal to 2.'
229
229
  end
230
230
 
231
- @pays = pays
231
+ @country = country
232
232
  end
233
233
 
234
234
  # Custom attribute writer method with validation
235
- # @param [Object] duree_jours Value to be assigned
236
- def duree_jours=(duree_jours)
237
- if duree_jours.nil?
238
- fail ArgumentError, 'duree_jours cannot be nil'
235
+ # @param [Object] validity_days Value to be assigned
236
+ def validity_days=(validity_days)
237
+ if validity_days.nil?
238
+ fail ArgumentError, 'validity_days cannot be nil'
239
239
  end
240
240
 
241
- if duree_jours > 3650
242
- fail ArgumentError, 'invalid value for "duree_jours", must be smaller than or equal to 3650.'
241
+ if validity_days > 3650
242
+ fail ArgumentError, 'invalid value for "validity_days", must be smaller than or equal to 3650.'
243
243
  end
244
244
 
245
- if duree_jours < 1
246
- fail ArgumentError, 'invalid value for "duree_jours", must be greater than or equal to 1.'
245
+ if validity_days < 1
246
+ fail ArgumentError, 'invalid value for "validity_days", must be greater than or equal to 1.'
247
247
  end
248
248
 
249
- @duree_jours = duree_jours
249
+ @validity_days = validity_days
250
250
  end
251
251
 
252
252
  # Checks equality by comparing each attribute.
@@ -255,16 +255,16 @@ module FactPulse
255
255
  return true if self.equal?(o)
256
256
  self.class == o.class &&
257
257
  cn == o.cn &&
258
- organisation == o.organisation &&
259
- pays == o.pays &&
260
- ville == o.ville &&
261
- province == o.province &&
258
+ organization == o.organization &&
259
+ country == o.country &&
260
+ city == o.city &&
261
+ state == o.state &&
262
262
  email == o.email &&
263
- duree_jours == o.duree_jours &&
264
- taille_cle == o.taille_cle &&
265
- passphrase_cle == o.passphrase_cle &&
266
- generer_p12 == o.generer_p12 &&
267
- passphrase_p12 == o.passphrase_p12
263
+ validity_days == o.validity_days &&
264
+ key_size == o.key_size &&
265
+ key_passphrase == o.key_passphrase &&
266
+ generate_p12 == o.generate_p12 &&
267
+ p12_passphrase == o.p12_passphrase
268
268
  end
269
269
 
270
270
  # @see the `==` method
@@ -276,7 +276,7 @@ module FactPulse
276
276
  # Calculates hash code according to all attributes.
277
277
  # @return [Integer] Hash code
278
278
  def hash
279
- [cn, organisation, pays, ville, province, email, duree_jours, taille_cle, passphrase_cle, generer_p12, passphrase_p12].hash
279
+ [cn, organization, country, city, state, email, validity_days, key_size, key_passphrase, generate_p12, p12_passphrase].hash
280
280
  end
281
281
 
282
282
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #API REST FactPulse
2
+ #FactPulse REST API
3
3
 
4
- # API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` Le `client_uid` sera inclus dans le JWT et permettra à l'API d'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l'accès - ✅ Intégration facile dans n'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l'automatisation ### 📚 Documentation complète Pour plus d'informations sur l'authentification et l'utilisation de l'API : https://www.factpulse.fr/documentation-api/
4
+ # REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice 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) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF 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 - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 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://www.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://www.factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://www.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://www.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://www.factpulse.fr/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://www.factpulse.fr/documentation-api/
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -14,34 +14,34 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Réponse après génération d'un certificat de test. Contient le certificat PEM, la clé privée PEM, et optionnellement le PKCS#12.
17
+ # Response after generating a test certificate. Contains certificate PEM, private key PEM, and optionally PKCS#12.
18
18
  class GenerateCertificateResponse < ApiModelBase
19
- # Statut de l'opération
19
+ # Operation status
20
20
  attr_accessor :status
21
21
 
22
- # Certificat X.509 au format PEM
23
- attr_accessor :certificat_pem
22
+ # X.509 certificate in PEM format
23
+ attr_accessor :certificate_pem
24
24
 
25
- # Clé privée RSA au format PEM
26
- attr_accessor :cle_privee_pem
25
+ # RSA private key in PEM format
26
+ attr_accessor :private_key_pem
27
27
 
28
28
  attr_accessor :pkcs12_base64
29
29
 
30
- # Informations sur le certificat généré
30
+ # Generated certificate information
31
31
  attr_accessor :info
32
32
 
33
- # Avertissement sur l'utilisation du certificat
34
- attr_accessor :avertissement
33
+ # Warning about certificate usage
34
+ attr_accessor :warning
35
35
 
36
36
  # Attribute mapping from ruby-style variable name to JSON key.
37
37
  def self.attribute_map
38
38
  {
39
39
  :'status' => :'status',
40
- :'certificat_pem' => :'certificat_pem',
41
- :'cle_privee_pem' => :'cle_privee_pem',
42
- :'pkcs12_base64' => :'pkcs12_base64',
40
+ :'certificate_pem' => :'certificatePem',
41
+ :'private_key_pem' => :'privateKeyPem',
42
+ :'pkcs12_base64' => :'pkcs12Base64',
43
43
  :'info' => :'info',
44
- :'avertissement' => :'avertissement'
44
+ :'warning' => :'warning'
45
45
  }
46
46
  end
47
47
 
@@ -59,11 +59,11 @@ module FactPulse
59
59
  def self.openapi_types
60
60
  {
61
61
  :'status' => :'String',
62
- :'certificat_pem' => :'String',
63
- :'cle_privee_pem' => :'String',
62
+ :'certificate_pem' => :'String',
63
+ :'private_key_pem' => :'String',
64
64
  :'pkcs12_base64' => :'String',
65
65
  :'info' => :'CertificateInfoResponse',
66
- :'avertissement' => :'String'
66
+ :'warning' => :'String'
67
67
  }
68
68
  end
69
69
 
@@ -96,16 +96,16 @@ module FactPulse
96
96
  self.status = 'success'
97
97
  end
98
98
 
99
- if attributes.key?(:'certificat_pem')
100
- self.certificat_pem = attributes[:'certificat_pem']
99
+ if attributes.key?(:'certificate_pem')
100
+ self.certificate_pem = attributes[:'certificate_pem']
101
101
  else
102
- self.certificat_pem = nil
102
+ self.certificate_pem = nil
103
103
  end
104
104
 
105
- if attributes.key?(:'cle_privee_pem')
106
- self.cle_privee_pem = attributes[:'cle_privee_pem']
105
+ if attributes.key?(:'private_key_pem')
106
+ self.private_key_pem = attributes[:'private_key_pem']
107
107
  else
108
- self.cle_privee_pem = nil
108
+ self.private_key_pem = nil
109
109
  end
110
110
 
111
111
  if attributes.key?(:'pkcs12_base64')
@@ -118,10 +118,10 @@ module FactPulse
118
118
  self.info = nil
119
119
  end
120
120
 
121
- if attributes.key?(:'avertissement')
122
- self.avertissement = attributes[:'avertissement']
121
+ if attributes.key?(:'warning')
122
+ self.warning = attributes[:'warning']
123
123
  else
124
- self.avertissement = '⚠️ Ce certificat est AUTO-SIGNÉ et destiné uniquement aux TESTS. Ne PAS utiliser en production. Niveau eIDAS : SES (Simple Electronic Signature)'
124
+ self.warning = 'WARNING: This certificate is SELF-SIGNED and intended for TESTING only. DO NOT use in production. eIDAS level: SES (Simple Electronic Signature)'
125
125
  end
126
126
  end
127
127
 
@@ -130,12 +130,12 @@ module FactPulse
130
130
  def list_invalid_properties
131
131
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
132
132
  invalid_properties = Array.new
133
- if @certificat_pem.nil?
134
- invalid_properties.push('invalid value for "certificat_pem", certificat_pem cannot be nil.')
133
+ if @certificate_pem.nil?
134
+ invalid_properties.push('invalid value for "certificate_pem", certificate_pem cannot be nil.')
135
135
  end
136
136
 
137
- if @cle_privee_pem.nil?
138
- invalid_properties.push('invalid value for "cle_privee_pem", cle_privee_pem cannot be nil.')
137
+ if @private_key_pem.nil?
138
+ invalid_properties.push('invalid value for "private_key_pem", private_key_pem cannot be nil.')
139
139
  end
140
140
 
141
141
  if @info.nil?
@@ -149,30 +149,30 @@ module FactPulse
149
149
  # @return true if the model is valid
150
150
  def valid?
151
151
  warn '[DEPRECATED] the `valid?` method is obsolete'
152
- return false if @certificat_pem.nil?
153
- return false if @cle_privee_pem.nil?
152
+ return false if @certificate_pem.nil?
153
+ return false if @private_key_pem.nil?
154
154
  return false if @info.nil?
155
155
  true
156
156
  end
157
157
 
158
158
  # Custom attribute writer method with validation
159
- # @param [Object] certificat_pem Value to be assigned
160
- def certificat_pem=(certificat_pem)
161
- if certificat_pem.nil?
162
- fail ArgumentError, 'certificat_pem cannot be nil'
159
+ # @param [Object] certificate_pem Value to be assigned
160
+ def certificate_pem=(certificate_pem)
161
+ if certificate_pem.nil?
162
+ fail ArgumentError, 'certificate_pem cannot be nil'
163
163
  end
164
164
 
165
- @certificat_pem = certificat_pem
165
+ @certificate_pem = certificate_pem
166
166
  end
167
167
 
168
168
  # Custom attribute writer method with validation
169
- # @param [Object] cle_privee_pem Value to be assigned
170
- def cle_privee_pem=(cle_privee_pem)
171
- if cle_privee_pem.nil?
172
- fail ArgumentError, 'cle_privee_pem cannot be nil'
169
+ # @param [Object] private_key_pem Value to be assigned
170
+ def private_key_pem=(private_key_pem)
171
+ if private_key_pem.nil?
172
+ fail ArgumentError, 'private_key_pem cannot be nil'
173
173
  end
174
174
 
175
- @cle_privee_pem = cle_privee_pem
175
+ @private_key_pem = private_key_pem
176
176
  end
177
177
 
178
178
  # Custom attribute writer method with validation
@@ -191,11 +191,11 @@ module FactPulse
191
191
  return true if self.equal?(o)
192
192
  self.class == o.class &&
193
193
  status == o.status &&
194
- certificat_pem == o.certificat_pem &&
195
- cle_privee_pem == o.cle_privee_pem &&
194
+ certificate_pem == o.certificate_pem &&
195
+ private_key_pem == o.private_key_pem &&
196
196
  pkcs12_base64 == o.pkcs12_base64 &&
197
197
  info == o.info &&
198
- avertissement == o.avertissement
198
+ warning == o.warning
199
199
  end
200
200
 
201
201
  # @see the `==` method
@@ -207,7 +207,7 @@ module FactPulse
207
207
  # Calculates hash code according to all attributes.
208
208
  # @return [Integer] Hash code
209
209
  def hash
210
- [status, certificat_pem, cle_privee_pem, pkcs12_base64, info, avertissement].hash
210
+ [status, certificate_pem, private_key_pem, pkcs12_base64, info, warning].hash
211
211
  end
212
212
 
213
213
  # Builds the object from hash