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
@@ -0,0 +1,355 @@
1
+ =begin
2
+ #FactPulse REST API
3
+
4
+ # REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X 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
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FactPulse
17
+ # Complete response after automated submission.
18
+ class SubmitCompleteInvoiceResponse < ApiModelBase
19
+ # Invoice was successfully submitted
20
+ attr_accessor :success
21
+
22
+ # Destination type
23
+ attr_accessor :destination_type
24
+
25
+ attr_accessor :chorus_result
26
+
27
+ attr_accessor :afnor_result
28
+
29
+ # Enriched invoice data
30
+ attr_accessor :enriched_invoice
31
+
32
+ # Generated PDF information
33
+ attr_accessor :facturx_pdf
34
+
35
+ attr_accessor :signature
36
+
37
+ # Generated Factur-X PDF (and signed if requested) base64-encoded
38
+ attr_accessor :pdf_base64
39
+
40
+ # Return message
41
+ attr_accessor :message
42
+
43
+ class EnumAttributeValidator
44
+ attr_reader :datatype
45
+ attr_reader :allowable_values
46
+
47
+ def initialize(datatype, allowable_values)
48
+ @allowable_values = allowable_values.map do |value|
49
+ case datatype.to_s
50
+ when /Integer/i
51
+ value.to_i
52
+ when /Float/i
53
+ value.to_f
54
+ else
55
+ value
56
+ end
57
+ end
58
+ end
59
+
60
+ def valid?(value)
61
+ !value || allowable_values.include?(value)
62
+ end
63
+ end
64
+
65
+ # Attribute mapping from ruby-style variable name to JSON key.
66
+ def self.attribute_map
67
+ {
68
+ :'success' => :'success',
69
+ :'destination_type' => :'destinationType',
70
+ :'chorus_result' => :'chorusResult',
71
+ :'afnor_result' => :'afnorResult',
72
+ :'enriched_invoice' => :'enrichedInvoice',
73
+ :'facturx_pdf' => :'facturxPdf',
74
+ :'signature' => :'signature',
75
+ :'pdf_base64' => :'pdfBase64',
76
+ :'message' => :'message'
77
+ }
78
+ end
79
+
80
+ # Returns attribute mapping this model knows about
81
+ def self.acceptable_attribute_map
82
+ attribute_map
83
+ end
84
+
85
+ # Returns all the JSON keys this model knows about
86
+ def self.acceptable_attributes
87
+ acceptable_attribute_map.values
88
+ end
89
+
90
+ # Attribute type mapping.
91
+ def self.openapi_types
92
+ {
93
+ :'success' => :'Boolean',
94
+ :'destination_type' => :'String',
95
+ :'chorus_result' => :'ChorusProResult',
96
+ :'afnor_result' => :'AFNORResult',
97
+ :'enriched_invoice' => :'EnrichedInvoiceInfo',
98
+ :'facturx_pdf' => :'FacturXPDFInfo',
99
+ :'signature' => :'SignatureInfo',
100
+ :'pdf_base64' => :'String',
101
+ :'message' => :'String'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ :'chorus_result',
109
+ :'afnor_result',
110
+ :'signature',
111
+ ])
112
+ end
113
+
114
+ # Initializes the object
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ def initialize(attributes = {})
117
+ if (!attributes.is_a?(Hash))
118
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::SubmitCompleteInvoiceResponse` initialize method"
119
+ end
120
+
121
+ # check to see if the attribute exists and convert string to symbol for hash key
122
+ acceptable_attribute_map = self.class.acceptable_attribute_map
123
+ attributes = attributes.each_with_object({}) { |(k, v), h|
124
+ if (!acceptable_attribute_map.key?(k.to_sym))
125
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::SubmitCompleteInvoiceResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
126
+ end
127
+ h[k.to_sym] = v
128
+ }
129
+
130
+ if attributes.key?(:'success')
131
+ self.success = attributes[:'success']
132
+ else
133
+ self.success = nil
134
+ end
135
+
136
+ if attributes.key?(:'destination_type')
137
+ self.destination_type = attributes[:'destination_type']
138
+ else
139
+ self.destination_type = nil
140
+ end
141
+
142
+ if attributes.key?(:'chorus_result')
143
+ self.chorus_result = attributes[:'chorus_result']
144
+ end
145
+
146
+ if attributes.key?(:'afnor_result')
147
+ self.afnor_result = attributes[:'afnor_result']
148
+ end
149
+
150
+ if attributes.key?(:'enriched_invoice')
151
+ self.enriched_invoice = attributes[:'enriched_invoice']
152
+ else
153
+ self.enriched_invoice = nil
154
+ end
155
+
156
+ if attributes.key?(:'facturx_pdf')
157
+ self.facturx_pdf = attributes[:'facturx_pdf']
158
+ else
159
+ self.facturx_pdf = nil
160
+ end
161
+
162
+ if attributes.key?(:'signature')
163
+ self.signature = attributes[:'signature']
164
+ end
165
+
166
+ if attributes.key?(:'pdf_base64')
167
+ self.pdf_base64 = attributes[:'pdf_base64']
168
+ else
169
+ self.pdf_base64 = nil
170
+ end
171
+
172
+ if attributes.key?(:'message')
173
+ self.message = attributes[:'message']
174
+ else
175
+ self.message = nil
176
+ end
177
+ end
178
+
179
+ # Show invalid properties with the reasons. Usually used together with valid?
180
+ # @return Array for valid properties with the reasons
181
+ def list_invalid_properties
182
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
183
+ invalid_properties = Array.new
184
+ if @success.nil?
185
+ invalid_properties.push('invalid value for "success", success cannot be nil.')
186
+ end
187
+
188
+ if @destination_type.nil?
189
+ invalid_properties.push('invalid value for "destination_type", destination_type cannot be nil.')
190
+ end
191
+
192
+ if @enriched_invoice.nil?
193
+ invalid_properties.push('invalid value for "enriched_invoice", enriched_invoice cannot be nil.')
194
+ end
195
+
196
+ if @facturx_pdf.nil?
197
+ invalid_properties.push('invalid value for "facturx_pdf", facturx_pdf cannot be nil.')
198
+ end
199
+
200
+ if @pdf_base64.nil?
201
+ invalid_properties.push('invalid value for "pdf_base64", pdf_base64 cannot be nil.')
202
+ end
203
+
204
+ if @message.nil?
205
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
206
+ end
207
+
208
+ invalid_properties
209
+ end
210
+
211
+ # Check to see if the all the properties in the model are valid
212
+ # @return true if the model is valid
213
+ def valid?
214
+ warn '[DEPRECATED] the `valid?` method is obsolete'
215
+ return false if @success.nil?
216
+ return false if @destination_type.nil?
217
+ destination_type_validator = EnumAttributeValidator.new('String', ["chorus_pro", "afnor"])
218
+ return false unless destination_type_validator.valid?(@destination_type)
219
+ return false if @enriched_invoice.nil?
220
+ return false if @facturx_pdf.nil?
221
+ return false if @pdf_base64.nil?
222
+ return false if @message.nil?
223
+ true
224
+ end
225
+
226
+ # Custom attribute writer method with validation
227
+ # @param [Object] success Value to be assigned
228
+ def success=(success)
229
+ if success.nil?
230
+ fail ArgumentError, 'success cannot be nil'
231
+ end
232
+
233
+ @success = success
234
+ end
235
+
236
+ # Custom attribute writer method checking allowed values (enum).
237
+ # @param [Object] destination_type Object to be assigned
238
+ def destination_type=(destination_type)
239
+ validator = EnumAttributeValidator.new('String', ["chorus_pro", "afnor"])
240
+ unless validator.valid?(destination_type)
241
+ fail ArgumentError, "invalid value for \"destination_type\", must be one of #{validator.allowable_values}."
242
+ end
243
+ @destination_type = destination_type
244
+ end
245
+
246
+ # Custom attribute writer method with validation
247
+ # @param [Object] enriched_invoice Value to be assigned
248
+ def enriched_invoice=(enriched_invoice)
249
+ if enriched_invoice.nil?
250
+ fail ArgumentError, 'enriched_invoice cannot be nil'
251
+ end
252
+
253
+ @enriched_invoice = enriched_invoice
254
+ end
255
+
256
+ # Custom attribute writer method with validation
257
+ # @param [Object] facturx_pdf Value to be assigned
258
+ def facturx_pdf=(facturx_pdf)
259
+ if facturx_pdf.nil?
260
+ fail ArgumentError, 'facturx_pdf cannot be nil'
261
+ end
262
+
263
+ @facturx_pdf = facturx_pdf
264
+ end
265
+
266
+ # Custom attribute writer method with validation
267
+ # @param [Object] pdf_base64 Value to be assigned
268
+ def pdf_base64=(pdf_base64)
269
+ if pdf_base64.nil?
270
+ fail ArgumentError, 'pdf_base64 cannot be nil'
271
+ end
272
+
273
+ @pdf_base64 = pdf_base64
274
+ end
275
+
276
+ # Custom attribute writer method with validation
277
+ # @param [Object] message Value to be assigned
278
+ def message=(message)
279
+ if message.nil?
280
+ fail ArgumentError, 'message cannot be nil'
281
+ end
282
+
283
+ @message = message
284
+ end
285
+
286
+ # Checks equality by comparing each attribute.
287
+ # @param [Object] Object to be compared
288
+ def ==(o)
289
+ return true if self.equal?(o)
290
+ self.class == o.class &&
291
+ success == o.success &&
292
+ destination_type == o.destination_type &&
293
+ chorus_result == o.chorus_result &&
294
+ afnor_result == o.afnor_result &&
295
+ enriched_invoice == o.enriched_invoice &&
296
+ facturx_pdf == o.facturx_pdf &&
297
+ signature == o.signature &&
298
+ pdf_base64 == o.pdf_base64 &&
299
+ message == o.message
300
+ end
301
+
302
+ # @see the `==` method
303
+ # @param [Object] Object to be compared
304
+ def eql?(o)
305
+ self == o
306
+ end
307
+
308
+ # Calculates hash code according to all attributes.
309
+ # @return [Integer] Hash code
310
+ def hash
311
+ [success, destination_type, chorus_result, afnor_result, enriched_invoice, facturx_pdf, signature, pdf_base64, message].hash
312
+ end
313
+
314
+ # Builds the object from hash
315
+ # @param [Hash] attributes Model attributes in the form of hash
316
+ # @return [Object] Returns the model itself
317
+ def self.build_from_hash(attributes)
318
+ return nil unless attributes.is_a?(Hash)
319
+ attributes = attributes.transform_keys(&:to_sym)
320
+ transformed_hash = {}
321
+ openapi_types.each_pair do |key, type|
322
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
323
+ transformed_hash["#{key}"] = nil
324
+ elsif type =~ /\AArray<(.*)>/i
325
+ # check to ensure the input is an array given that the attribute
326
+ # is documented as an array but the input is not
327
+ if attributes[attribute_map[key]].is_a?(Array)
328
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
329
+ end
330
+ elsif !attributes[attribute_map[key]].nil?
331
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
332
+ end
333
+ end
334
+ new(transformed_hash)
335
+ end
336
+
337
+ # Returns the object in the form of hash
338
+ # @return [Hash] Returns the object in the form of hash
339
+ def to_hash
340
+ hash = {}
341
+ self.class.attribute_map.each_pair do |attr, param|
342
+ value = self.send(attr)
343
+ if value.nil?
344
+ is_nullable = self.class.openapi_nullable.include?(attr)
345
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
346
+ end
347
+
348
+ hash[param] = _to_hash(value)
349
+ end
350
+ hash
351
+ end
352
+
353
+ end
354
+
355
+ end
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #FactPulse REST API
3
+
4
+ # REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X 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
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FactPulse
17
+ # Request to submit an invoice to a PDP/PA via AFNOR.
18
+ class SubmitFlowRequest < ApiModelBase
19
+ # Flow name (e.g., 'Invoice 2025-001')
20
+ attr_accessor :flow_name
21
+
22
+ # Flow syntax (CII for Factur-X)
23
+ attr_accessor :flow_syntax
24
+
25
+ attr_accessor :flow_profile
26
+
27
+ attr_accessor :tracking_id
28
+
29
+ attr_accessor :request_id
30
+
31
+ attr_accessor :pdp_credentials
32
+
33
+ class EnumAttributeValidator
34
+ attr_reader :datatype
35
+ attr_reader :allowable_values
36
+
37
+ def initialize(datatype, allowable_values)
38
+ @allowable_values = allowable_values.map do |value|
39
+ case datatype.to_s
40
+ when /Integer/i
41
+ value.to_i
42
+ when /Float/i
43
+ value.to_f
44
+ else
45
+ value
46
+ end
47
+ end
48
+ end
49
+
50
+ def valid?(value)
51
+ !value || allowable_values.include?(value)
52
+ end
53
+ end
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'flow_name' => :'flow_name',
59
+ :'flow_syntax' => :'flow_syntax',
60
+ :'flow_profile' => :'flow_profile',
61
+ :'tracking_id' => :'tracking_id',
62
+ :'request_id' => :'request_id',
63
+ :'pdp_credentials' => :'pdp_credentials'
64
+ }
65
+ end
66
+
67
+ # Returns attribute mapping this model knows about
68
+ def self.acceptable_attribute_map
69
+ attribute_map
70
+ end
71
+
72
+ # Returns all the JSON keys this model knows about
73
+ def self.acceptable_attributes
74
+ acceptable_attribute_map.values
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ def self.openapi_types
79
+ {
80
+ :'flow_name' => :'String',
81
+ :'flow_syntax' => :'FlowSyntax',
82
+ :'flow_profile' => :'FlowProfile',
83
+ :'tracking_id' => :'String',
84
+ :'request_id' => :'String',
85
+ :'pdp_credentials' => :'PDPCredentials'
86
+ }
87
+ end
88
+
89
+ # List of attributes with nullable: true
90
+ def self.openapi_nullable
91
+ Set.new([
92
+ :'flow_profile',
93
+ :'tracking_id',
94
+ :'request_id',
95
+ :'pdp_credentials'
96
+ ])
97
+ end
98
+
99
+ # Initializes the object
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ def initialize(attributes = {})
102
+ if (!attributes.is_a?(Hash))
103
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::SubmitFlowRequest` initialize method"
104
+ end
105
+
106
+ # check to see if the attribute exists and convert string to symbol for hash key
107
+ acceptable_attribute_map = self.class.acceptable_attribute_map
108
+ attributes = attributes.each_with_object({}) { |(k, v), h|
109
+ if (!acceptable_attribute_map.key?(k.to_sym))
110
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::SubmitFlowRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
111
+ end
112
+ h[k.to_sym] = v
113
+ }
114
+
115
+ if attributes.key?(:'flow_name')
116
+ self.flow_name = attributes[:'flow_name']
117
+ else
118
+ self.flow_name = nil
119
+ end
120
+
121
+ if attributes.key?(:'flow_syntax')
122
+ self.flow_syntax = attributes[:'flow_syntax']
123
+ end
124
+
125
+ if attributes.key?(:'flow_profile')
126
+ self.flow_profile = attributes[:'flow_profile']
127
+ end
128
+
129
+ if attributes.key?(:'tracking_id')
130
+ self.tracking_id = attributes[:'tracking_id']
131
+ end
132
+
133
+ if attributes.key?(:'request_id')
134
+ self.request_id = attributes[:'request_id']
135
+ end
136
+
137
+ if attributes.key?(:'pdp_credentials')
138
+ self.pdp_credentials = attributes[:'pdp_credentials']
139
+ end
140
+ end
141
+
142
+ # Show invalid properties with the reasons. Usually used together with valid?
143
+ # @return Array for valid properties with the reasons
144
+ def list_invalid_properties
145
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
146
+ invalid_properties = Array.new
147
+ if @flow_name.nil?
148
+ invalid_properties.push('invalid value for "flow_name", flow_name cannot be nil.')
149
+ end
150
+
151
+ invalid_properties
152
+ end
153
+
154
+ # Check to see if the all the properties in the model are valid
155
+ # @return true if the model is valid
156
+ def valid?
157
+ warn '[DEPRECATED] the `valid?` method is obsolete'
158
+ return false if @flow_name.nil?
159
+ true
160
+ end
161
+
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] flow_name Value to be assigned
164
+ def flow_name=(flow_name)
165
+ if flow_name.nil?
166
+ fail ArgumentError, 'flow_name cannot be nil'
167
+ end
168
+
169
+ @flow_name = flow_name
170
+ end
171
+
172
+ # Checks equality by comparing each attribute.
173
+ # @param [Object] Object to be compared
174
+ def ==(o)
175
+ return true if self.equal?(o)
176
+ self.class == o.class &&
177
+ flow_name == o.flow_name &&
178
+ flow_syntax == o.flow_syntax &&
179
+ flow_profile == o.flow_profile &&
180
+ tracking_id == o.tracking_id &&
181
+ request_id == o.request_id &&
182
+ pdp_credentials == o.pdp_credentials
183
+ end
184
+
185
+ # @see the `==` method
186
+ # @param [Object] Object to be compared
187
+ def eql?(o)
188
+ self == o
189
+ end
190
+
191
+ # Calculates hash code according to all attributes.
192
+ # @return [Integer] Hash code
193
+ def hash
194
+ [flow_name, flow_syntax, flow_profile, tracking_id, request_id, pdp_credentials].hash
195
+ end
196
+
197
+ # Builds the object from hash
198
+ # @param [Hash] attributes Model attributes in the form of hash
199
+ # @return [Object] Returns the model itself
200
+ def self.build_from_hash(attributes)
201
+ return nil unless attributes.is_a?(Hash)
202
+ attributes = attributes.transform_keys(&:to_sym)
203
+ transformed_hash = {}
204
+ openapi_types.each_pair do |key, type|
205
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
206
+ transformed_hash["#{key}"] = nil
207
+ elsif type =~ /\AArray<(.*)>/i
208
+ # check to ensure the input is an array given that the attribute
209
+ # is documented as an array but the input is not
210
+ if attributes[attribute_map[key]].is_a?(Array)
211
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
212
+ end
213
+ elsif !attributes[attribute_map[key]].nil?
214
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
215
+ end
216
+ end
217
+ new(transformed_hash)
218
+ end
219
+
220
+ # Returns the object in the form of hash
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_hash
223
+ hash = {}
224
+ self.class.attribute_map.each_pair do |attr, param|
225
+ value = self.send(attr)
226
+ if value.nil?
227
+ is_nullable = self.class.openapi_nullable.include?(attr)
228
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
229
+ end
230
+
231
+ hash[param] = _to_hash(value)
232
+ end
233
+ hash
234
+ end
235
+
236
+ end
237
+
238
+ end