factpulse 2.0.42 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -3
- data/Gemfile.lock +3 -3
- data/README.md +91 -91
- data/docs/{CredentialsAFNOR.md → AFNORCredentials.md} +2 -2
- data/docs/{DestinationAFNOR.md → AFNORDestination.md} +4 -4
- data/docs/AFNORHealthCheckResponse.md +22 -0
- data/docs/AFNORPDPPAApi.md +25 -25
- data/docs/AFNORPDPPADirectoryServiceApi.md +19 -19
- data/docs/AFNORPDPPAFlowServiceApi.md +16 -16
- data/docs/{ResultatAFNOR.md → AFNORResult.md} +5 -5
- data/docs/APIError.md +2 -2
- data/docs/{MontantTva.md → APIProfile.md} +2 -2
- data/docs/{CodeCadreFacturation.md → AcknowledgmentStatus.md} +2 -2
- data/docs/{CodeRaisonReduction.md → AllowanceReasonCode.md} +2 -2
- data/docs/{ModeDepot.md → AmountDue.md} +2 -2
- data/docs/BoundingBoxSchema.md +7 -7
- data/docs/{CategorieTVA.md → CeleryStatus.md} +2 -2
- data/docs/CertificateInfoResponse.md +20 -20
- data/docs/ChorusProApi.md +123 -123
- data/docs/ChorusProDestination.md +20 -0
- data/docs/ChorusProResult.md +22 -0
- data/docs/Destination.md +7 -7
- data/docs/{ModePaiement.md → DocumentType.md} +2 -2
- data/docs/{AdresseElectronique.md → ElectronicAddress.md} +4 -4
- data/docs/EnrichedInvoiceInfo.md +32 -0
- data/docs/FacturXPDFInfo.md +22 -0
- data/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +26 -0
- data/docs/{CredentialsChorusPro.md → FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md} +4 -4
- data/docs/FactureFacturX.md +30 -30
- data/docs/FieldStatus.md +15 -0
- data/docs/{DirectionFlux.md → FlowDirection.md} +2 -2
- data/docs/FlowProfile.md +15 -0
- data/docs/FlowSummary.md +32 -0
- data/docs/{ProfilFlux.md → FlowSyntax.md} +2 -2
- data/docs/{TypeTVA.md → FlowType.md} +2 -2
- data/docs/GenerateCertificateRequest.md +19 -19
- data/docs/GenerateCertificateResponse.md +8 -8
- data/docs/GetChorusProIdRequest.md +22 -0
- data/docs/GetChorusProIdResponse.md +24 -0
- data/docs/GetInvoiceRequest.md +20 -0
- data/docs/GetInvoiceResponse.md +34 -0
- data/docs/GetStructureRequest.md +22 -0
- data/docs/GetStructureResponse.md +34 -0
- data/docs/GlobalAllowanceAmount.md +15 -0
- data/docs/{SantApi.md → HealthApi.md} +23 -23
- data/docs/IncomingInvoice.md +54 -0
- data/docs/IncomingSupplier.md +32 -0
- data/docs/{FormatFacture.md → InvoiceFormat.md} +2 -2
- data/docs/InvoiceLine.md +46 -0
- data/docs/InvoiceLineAllowanceAmount.md +15 -0
- data/docs/InvoiceNote.md +20 -0
- data/docs/InvoiceProcessingApi.md +831 -0
- data/docs/InvoiceReferences.md +32 -0
- data/docs/{StatutFacture.md → InvoiceStatus.md} +5 -5
- data/docs/InvoiceTotals.md +30 -0
- data/docs/InvoiceTotalsPrepayment.md +15 -0
- data/docs/InvoiceTypeCode.md +15 -0
- data/docs/InvoicingFramework.md +24 -0
- data/docs/InvoicingFrameworkCode.md +15 -0
- data/docs/LineNetAmount.md +15 -0
- data/docs/MandatoryNoteSchema.md +30 -0
- data/docs/ManualRate.md +15 -0
- data/docs/ManualVatRate.md +15 -0
- data/docs/OperationNature.md +15 -0
- data/docs/{FormatSortie.md → OutputFormat.md} +2 -2
- data/docs/PDFValidationResultAPI.md +62 -0
- data/docs/PDFXMLVerificationApi.md +435 -0
- data/docs/PDPCredentials.md +4 -4
- data/docs/PageDimensionsSchema.md +20 -0
- data/docs/{Beneficiaire.md → Payee.md} +5 -5
- data/docs/PaymentMeans.md +15 -0
- data/docs/PostalAddress.md +26 -0
- data/docs/ProcessingOptions.md +24 -0
- data/docs/{Quantite.md → Quantity.md} +2 -2
- data/docs/Recipient.md +28 -0
- data/docs/SearchFlowRequest.md +34 -0
- data/docs/SearchFlowResponse.md +24 -0
- data/docs/SearchServicesResponse.md +24 -0
- data/docs/SearchStructureRequest.md +26 -0
- data/docs/SearchStructureResponse.md +24 -0
- data/docs/SignatureInfo.md +2 -2
- data/docs/SignatureInfoAPI.md +28 -0
- data/docs/SignatureParameters.md +34 -0
- data/docs/SimplifiedInvoiceData.md +34 -0
- data/docs/StructureInfo.md +10 -10
- data/docs/StructureParameters.md +22 -0
- data/docs/StructureService.md +24 -0
- data/docs/SubmissionMode.md +15 -0
- data/docs/SubmitCompleteInvoiceRequest.md +26 -0
- data/docs/SubmitCompleteInvoiceResponse.md +34 -0
- data/docs/SubmitFlowRequest.md +28 -0
- data/docs/SubmitFlowResponse.md +30 -0
- data/docs/SubmitInvoiceRequest.md +46 -0
- data/docs/SubmitInvoiceResponse.md +24 -0
- data/docs/SupplementaryAttachment.md +26 -0
- data/docs/Supplier.md +36 -0
- data/docs/TaskResponse.md +18 -0
- data/docs/TaskStatus.md +22 -0
- data/docs/TaxableAmount.md +15 -0
- data/docs/TotalGrossAmount.md +15 -0
- data/docs/TotalNetAmount.md +15 -0
- data/docs/TotalVATAmount.md +15 -0
- data/docs/UnitNetPrice.md +15 -0
- data/docs/UnitOfMeasure.md +15 -0
- data/docs/UserApi.md +74 -0
- data/docs/VATAccountingCode.md +15 -0
- data/docs/{ProfilAPI.md → VATAmount.md} +2 -2
- data/docs/VATCategory.md +15 -0
- data/docs/VATLine.md +30 -0
- data/docs/ValidationErrorDetail.md +3 -3
- data/docs/ValidationErrorResponse.md +18 -0
- data/docs/ValidationSuccessResponse.md +18 -0
- data/docs/{TypeFlux.md → VatAmount.md} +2 -2
- data/docs/VerificationSuccessResponse.md +36 -0
- data/docs/VerifiedFieldSchema.md +34 -0
- data/factpulse.gemspec +4 -4
- data/lib/factpulse/api/afnorpdppa_api.rb +25 -25
- data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +40 -40
- data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +16 -16
- data/lib/factpulse/api/chorus_pro_api.rb +127 -127
- data/lib/factpulse/api/health_api.rb +136 -0
- data/lib/factpulse/api/invoice_processing_api.rb +835 -0
- data/lib/factpulse/api/pdfxml_verification_api.rb +430 -0
- data/lib/factpulse/api/user_api.rb +79 -0
- data/lib/factpulse/api_client.rb +2 -2
- data/lib/factpulse/api_error.rb +2 -2
- data/lib/factpulse/api_model_base.rb +2 -2
- data/lib/factpulse/configuration.rb +2 -2
- data/lib/factpulse/helpers/client.rb +182 -182
- data/lib/factpulse/helpers/exceptions.rb +2 -2
- data/lib/factpulse/helpers/helpers.rb +5 -5
- data/lib/factpulse/models/acknowledgment_status.rb +41 -0
- data/lib/factpulse/models/afnor_credentials.rb +169 -0
- data/lib/factpulse/models/{destination_afnor.rb → afnor_destination.rb} +10 -10
- data/lib/factpulse/models/{reponse_healthcheck_afnor.rb → afnor_health_check_response.rb} +9 -9
- data/lib/factpulse/models/{resultat_afnor.rb → afnor_result.rb} +13 -13
- data/lib/factpulse/models/allowance_reason_code.rb +45 -0
- data/lib/factpulse/models/amount_due.rb +104 -0
- data/lib/factpulse/models/api_error.rb +5 -5
- data/lib/factpulse/models/api_profile.rb +42 -0
- data/lib/factpulse/models/bounding_box_schema.rb +10 -10
- data/lib/factpulse/models/celery_status.rb +43 -0
- data/lib/factpulse/models/certificate_info_response.rb +164 -164
- data/lib/factpulse/models/{destination_chorus_pro.rb → chorus_pro_destination.rb} +7 -7
- data/lib/factpulse/models/chorus_pro_result.rb +186 -0
- data/lib/factpulse/models/destination.rb +7 -7
- data/lib/factpulse/models/document_type.rb +43 -0
- data/lib/factpulse/models/electronic_address.rb +196 -0
- data/lib/factpulse/models/enriched_invoice_info.rb +348 -0
- data/lib/factpulse/models/error_level.rb +2 -2
- data/lib/factpulse/models/error_source.rb +2 -2
- data/lib/factpulse/models/factur_xpdf_info.rb +205 -0
- data/lib/factpulse/models/{chorus_pro_credentials.rb → facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb} +11 -11
- data/lib/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb +191 -0
- data/lib/factpulse/models/facture_factur_x.rb +160 -160
- data/lib/factpulse/models/field_status.rb +43 -0
- data/lib/factpulse/models/flow_direction.rb +40 -0
- data/lib/factpulse/models/flow_profile.rb +41 -0
- data/lib/factpulse/models/flow_summary.rb +251 -0
- data/lib/factpulse/models/flow_syntax.rb +43 -0
- data/lib/factpulse/models/flow_type.rb +43 -0
- data/lib/factpulse/models/generate_certificate_request.rb +106 -106
- data/lib/factpulse/models/generate_certificate_response.rb +47 -47
- data/lib/factpulse/models/get_chorus_pro_id_request.rb +188 -0
- data/lib/factpulse/models/get_chorus_pro_id_response.rb +230 -0
- data/lib/factpulse/models/get_invoice_request.rb +176 -0
- data/lib/factpulse/models/get_invoice_response.rb +261 -0
- data/lib/factpulse/models/get_structure_request.rb +188 -0
- data/lib/factpulse/models/get_structure_response.rb +261 -0
- data/lib/factpulse/models/global_allowance_amount.rb +104 -0
- data/lib/factpulse/models/http_validation_error.rb +2 -2
- data/lib/factpulse/models/incoming_invoice.rb +522 -0
- data/lib/factpulse/models/incoming_supplier.rb +236 -0
- data/lib/factpulse/models/invoice_format.rb +41 -0
- data/lib/factpulse/models/invoice_line.rb +389 -0
- data/lib/factpulse/models/invoice_line_allowance_amount.rb +104 -0
- data/lib/factpulse/models/invoice_note.rb +175 -0
- data/lib/factpulse/models/invoice_references.rb +290 -0
- data/lib/factpulse/models/invoice_status.rb +203 -0
- data/lib/factpulse/models/invoice_totals.rb +272 -0
- data/lib/factpulse/models/invoice_totals_prepayment.rb +104 -0
- data/lib/factpulse/models/invoice_type_code.rb +70 -0
- data/lib/factpulse/models/invoicing_framework.rb +217 -0
- data/lib/factpulse/models/invoicing_framework_code.rb +46 -0
- data/lib/factpulse/models/line_net_amount.rb +104 -0
- data/lib/factpulse/models/mandatory_note_schema.rb +265 -0
- data/lib/factpulse/models/manual_rate.rb +104 -0
- data/lib/factpulse/models/manual_vat_rate.rb +104 -0
- data/lib/factpulse/models/operation_nature.rb +52 -0
- data/lib/factpulse/models/output_format.rb +40 -0
- data/lib/factpulse/models/page_dimensions_schema.rb +193 -0
- data/lib/factpulse/models/{beneficiaire.rb → payee.rb} +15 -15
- data/lib/factpulse/models/payment_means.rb +50 -0
- data/lib/factpulse/models/pdf_validation_result_api.rb +523 -0
- data/lib/factpulse/models/pdp_credentials.rb +7 -7
- data/lib/factpulse/models/postal_address.rb +189 -0
- data/lib/factpulse/models/processing_options.rb +207 -0
- data/lib/factpulse/models/quantity.rb +104 -0
- data/lib/factpulse/models/recipient.rb +201 -0
- data/lib/factpulse/models/scheme_id.rb +2 -2
- data/lib/factpulse/models/search_flow_request.rb +306 -0
- data/lib/factpulse/models/search_flow_response.rb +249 -0
- data/lib/factpulse/models/search_services_response.rb +214 -0
- data/lib/factpulse/models/search_structure_request.rb +191 -0
- data/lib/factpulse/models/search_structure_response.rb +216 -0
- data/lib/factpulse/models/signature_info.rb +20 -20
- data/lib/factpulse/models/signature_info_api.rb +216 -0
- data/lib/factpulse/models/signature_parameters.rb +235 -0
- data/lib/factpulse/models/simplified_invoice_data.rb +342 -0
- data/lib/factpulse/models/structure_info.rb +84 -84
- data/lib/factpulse/models/structure_parameters.rb +175 -0
- data/lib/factpulse/models/structure_service.rb +247 -0
- data/lib/factpulse/models/submission_mode.rb +44 -0
- data/lib/factpulse/models/submit_complete_invoice_request.rb +239 -0
- data/lib/factpulse/models/submit_complete_invoice_response.rb +355 -0
- data/lib/factpulse/models/submit_flow_request.rb +238 -0
- data/lib/factpulse/models/submit_flow_response.rb +294 -0
- data/lib/factpulse/models/submit_invoice_request.rb +388 -0
- data/lib/factpulse/models/submit_invoice_response.rb +213 -0
- data/lib/factpulse/models/supplementary_attachment.rb +269 -0
- data/lib/factpulse/models/supplier.rb +257 -0
- data/lib/factpulse/models/task_response.rb +166 -0
- data/lib/factpulse/models/task_status.rb +227 -0
- data/lib/factpulse/models/taxable_amount.rb +104 -0
- data/lib/factpulse/models/total_gross_amount.rb +104 -0
- data/lib/factpulse/models/total_net_amount.rb +104 -0
- data/lib/factpulse/models/total_vat_amount.rb +104 -0
- data/lib/factpulse/models/unit_net_price.rb +104 -0
- data/lib/factpulse/models/unit_of_measure.rb +50 -0
- data/lib/factpulse/models/validation_error.rb +2 -2
- data/lib/factpulse/models/validation_error_detail.rb +6 -6
- data/lib/factpulse/models/validation_error_loc_inner.rb +2 -2
- data/lib/factpulse/models/validation_error_response.rb +168 -0
- data/lib/factpulse/models/validation_success_response.rb +166 -0
- data/lib/factpulse/models/vat_accounting_code.rb +46 -0
- data/lib/factpulse/models/vat_amount.rb +104 -0
- data/lib/factpulse/models/vat_category.rb +47 -0
- data/lib/factpulse/models/vat_line.rb +262 -0
- data/lib/factpulse/models/verification_success_response.rb +343 -0
- data/lib/factpulse/models/verified_field_schema.rb +334 -0
- data/lib/factpulse/version.rb +3 -3
- data/lib/factpulse.rb +99 -99
- metadata +250 -257
- data/docs/AdressePostale.md +0 -26
- data/docs/CadreDeFacturation.md +0 -24
- data/docs/ChampVerifieSchema.md +0 -34
- data/docs/ChorusProCredentials.md +0 -26
- data/docs/ConsulterFactureRequest.md +0 -20
- data/docs/ConsulterFactureResponse.md +0 -34
- data/docs/ConsulterStructureRequest.md +0 -22
- data/docs/ConsulterStructureResponse.md +0 -34
- data/docs/Destinataire.md +0 -28
- data/docs/DestinationChorusPro.md +0 -20
- data/docs/DimensionPageSchema.md +0 -20
- data/docs/DonneesFactureSimplifiees.md +0 -34
- data/docs/FactureEnrichieInfo.md +0 -32
- data/docs/FactureEntrante.md +0 -54
- data/docs/FluxResume.md +0 -32
- data/docs/Fournisseur.md +0 -36
- data/docs/FournisseurEntrant.md +0 -32
- data/docs/InformationSignatureAPI.md +0 -28
- data/docs/LigneDePoste.md +0 -46
- data/docs/LigneDePosteMontantRemiseHt.md +0 -15
- data/docs/LigneDePosteTauxTvaManuel.md +0 -15
- data/docs/LigneDeTVA.md +0 -30
- data/docs/MontantAPayer.md +0 -15
- data/docs/MontantBaseHt.md +0 -15
- data/docs/MontantHtTotal.md +0 -15
- data/docs/MontantRemiseGlobaleTtc.md +0 -15
- data/docs/MontantTotal.md +0 -30
- data/docs/MontantTotalAcompte.md +0 -15
- data/docs/MontantTotalLigneHt.md +0 -15
- data/docs/MontantTtcTotal.md +0 -15
- data/docs/MontantTvaLigne.md +0 -15
- data/docs/MontantTvaTotal.md +0 -15
- data/docs/MontantUnitaireHt.md +0 -15
- data/docs/NatureOperation.md +0 -15
- data/docs/Note.md +0 -20
- data/docs/NoteObligatoireSchema.md +0 -30
- data/docs/ObtenirIdChorusProRequest.md +0 -22
- data/docs/ObtenirIdChorusProResponse.md +0 -24
- data/docs/OptionsProcessing.md +0 -24
- data/docs/PDFFacturXInfo.md +0 -22
- data/docs/ParametresSignature.md +0 -34
- data/docs/ParametresStructure.md +0 -22
- data/docs/PieceJointeComplementaire.md +0 -26
- data/docs/RechercherServicesResponse.md +0 -24
- data/docs/RechercherStructureRequest.md +0 -26
- data/docs/RechercherStructureResponse.md +0 -24
- data/docs/References.md +0 -32
- data/docs/ReponseHealthcheckAFNOR.md +0 -22
- data/docs/ReponseRechercheFlux.md +0 -24
- data/docs/ReponseSoumissionFlux.md +0 -30
- data/docs/ReponseTache.md +0 -18
- data/docs/ReponseValidationErreur.md +0 -18
- data/docs/ReponseValidationSucces.md +0 -18
- data/docs/ReponseVerificationSucces.md +0 -36
- data/docs/RequeteRechercheFlux.md +0 -34
- data/docs/RequeteSoumissionFlux.md +0 -28
- data/docs/ResultatChorusPro.md +0 -22
- data/docs/ResultatValidationPDFAPI.md +0 -62
- data/docs/ServiceStructure.md +0 -24
- data/docs/SoumettreFactureCompleteRequest.md +0 -26
- data/docs/SoumettreFactureCompleteResponse.md +0 -34
- data/docs/SoumettreFactureRequest.md +0 -46
- data/docs/SoumettreFactureResponse.md +0 -24
- data/docs/StatutAcquittement.md +0 -15
- data/docs/StatutCelery.md +0 -15
- data/docs/StatutChampAPI.md +0 -15
- data/docs/StatutTache.md +0 -22
- data/docs/SyntaxeFlux.md +0 -15
- data/docs/Tauxmanuel.md +0 -15
- data/docs/TraitementFactureApi.md +0 -831
- data/docs/TypeDocument.md +0 -15
- data/docs/TypeFacture.md +0 -15
- data/docs/Unite.md +0 -15
- data/docs/UtilisateurApi.md +0 -74
- data/docs/VrificationPDFXMLApi.md +0 -435
- data/lib/factpulse/api/sant_api.rb +0 -136
- data/lib/factpulse/api/traitement_facture_api.rb +0 -835
- data/lib/factpulse/api/utilisateur_api.rb +0 -79
- data/lib/factpulse/api/vrification_pdfxml_api.rb +0 -430
- data/lib/factpulse/models/adresse_electronique.rb +0 -196
- data/lib/factpulse/models/adresse_postale.rb +0 -189
- data/lib/factpulse/models/cadre_de_facturation.rb +0 -217
- data/lib/factpulse/models/categorie_tva.rb +0 -47
- data/lib/factpulse/models/champ_verifie_schema.rb +0 -334
- data/lib/factpulse/models/code_cadre_facturation.rb +0 -42
- data/lib/factpulse/models/code_raison_reduction.rb +0 -45
- data/lib/factpulse/models/consulter_facture_request.rb +0 -176
- data/lib/factpulse/models/consulter_facture_response.rb +0 -261
- data/lib/factpulse/models/consulter_structure_request.rb +0 -188
- data/lib/factpulse/models/consulter_structure_response.rb +0 -261
- data/lib/factpulse/models/credentials_afnor.rb +0 -169
- data/lib/factpulse/models/credentials_chorus_pro.rb +0 -191
- data/lib/factpulse/models/destinataire.rb +0 -201
- data/lib/factpulse/models/dimension_page_schema.rb +0 -193
- data/lib/factpulse/models/direction_flux.rb +0 -40
- data/lib/factpulse/models/donnees_facture_simplifiees.rb +0 -342
- data/lib/factpulse/models/facture_enrichie_info.rb +0 -348
- data/lib/factpulse/models/facture_entrante.rb +0 -522
- data/lib/factpulse/models/flux_resume.rb +0 -251
- data/lib/factpulse/models/format_facture.rb +0 -41
- data/lib/factpulse/models/format_sortie.rb +0 -40
- data/lib/factpulse/models/fournisseur.rb +0 -257
- data/lib/factpulse/models/fournisseur_entrant.rb +0 -236
- data/lib/factpulse/models/information_signature_api.rb +0 -216
- data/lib/factpulse/models/ligne_de_poste.rb +0 -390
- data/lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb +0 -104
- data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +0 -104
- data/lib/factpulse/models/ligne_de_tva.rb +0 -262
- data/lib/factpulse/models/mode_depot.rb +0 -41
- data/lib/factpulse/models/mode_paiement.rb +0 -44
- data/lib/factpulse/models/montant_a_payer.rb +0 -104
- data/lib/factpulse/models/montant_base_ht.rb +0 -104
- data/lib/factpulse/models/montant_ht_total.rb +0 -104
- data/lib/factpulse/models/montant_remise_globale_ttc.rb +0 -104
- data/lib/factpulse/models/montant_total.rb +0 -272
- data/lib/factpulse/models/montant_total_acompte.rb +0 -104
- data/lib/factpulse/models/montant_total_ligne_ht.rb +0 -104
- data/lib/factpulse/models/montant_ttc_total.rb +0 -104
- data/lib/factpulse/models/montant_tva.rb +0 -104
- data/lib/factpulse/models/montant_tva_ligne.rb +0 -104
- data/lib/factpulse/models/montant_tva_total.rb +0 -104
- data/lib/factpulse/models/montant_unitaire_ht.rb +0 -104
- data/lib/factpulse/models/nature_operation.rb +0 -52
- data/lib/factpulse/models/note.rb +0 -175
- data/lib/factpulse/models/note_obligatoire_schema.rb +0 -265
- data/lib/factpulse/models/obtenir_id_chorus_pro_request.rb +0 -188
- data/lib/factpulse/models/obtenir_id_chorus_pro_response.rb +0 -230
- data/lib/factpulse/models/options_processing.rb +0 -207
- data/lib/factpulse/models/parametres_signature.rb +0 -235
- data/lib/factpulse/models/parametres_structure.rb +0 -175
- data/lib/factpulse/models/pdf_factur_x_info.rb +0 -205
- data/lib/factpulse/models/piece_jointe_complementaire.rb +0 -269
- data/lib/factpulse/models/profil_api.rb +0 -42
- data/lib/factpulse/models/profil_flux.rb +0 -41
- data/lib/factpulse/models/quantite.rb +0 -104
- data/lib/factpulse/models/rechercher_services_response.rb +0 -214
- data/lib/factpulse/models/rechercher_structure_request.rb +0 -191
- data/lib/factpulse/models/rechercher_structure_response.rb +0 -216
- data/lib/factpulse/models/references.rb +0 -290
- data/lib/factpulse/models/reponse_recherche_flux.rb +0 -249
- data/lib/factpulse/models/reponse_soumission_flux.rb +0 -294
- data/lib/factpulse/models/reponse_tache.rb +0 -165
- data/lib/factpulse/models/reponse_validation_erreur.rb +0 -167
- data/lib/factpulse/models/reponse_validation_succes.rb +0 -165
- data/lib/factpulse/models/reponse_verification_succes.rb +0 -343
- data/lib/factpulse/models/requete_recherche_flux.rb +0 -306
- data/lib/factpulse/models/requete_soumission_flux.rb +0 -238
- data/lib/factpulse/models/resultat_chorus_pro.rb +0 -186
- data/lib/factpulse/models/resultat_validation_pdfapi.rb +0 -523
- data/lib/factpulse/models/service_structure.rb +0 -247
- data/lib/factpulse/models/soumettre_facture_complete_request.rb +0 -239
- data/lib/factpulse/models/soumettre_facture_complete_response.rb +0 -355
- data/lib/factpulse/models/soumettre_facture_request.rb +0 -388
- data/lib/factpulse/models/soumettre_facture_response.rb +0 -213
- data/lib/factpulse/models/statut_acquittement.rb +0 -41
- data/lib/factpulse/models/statut_celery.rb +0 -43
- data/lib/factpulse/models/statut_champ_api.rb +0 -43
- data/lib/factpulse/models/statut_facture.rb +0 -203
- data/lib/factpulse/models/statut_tache.rb +0 -226
- data/lib/factpulse/models/syntaxe_flux.rb +0 -43
- data/lib/factpulse/models/tauxmanuel.rb +0 -104
- data/lib/factpulse/models/type_document.rb +0 -43
- data/lib/factpulse/models/type_facture.rb +0 -54
- data/lib/factpulse/models/type_flux.rb +0 -43
- data/lib/factpulse/models/type_tva.rb +0 -42
- data/lib/factpulse/models/unite.rb +0 -44
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#API REST FactPulse
|
|
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/
|
|
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
|
-
# Montant unitaire Hors Taxes de l'article.
|
|
18
|
-
module MontantUnitaireHt
|
|
19
|
-
class << self
|
|
20
|
-
# List of class defined in anyOf (OpenAPI v3)
|
|
21
|
-
def openapi_any_of
|
|
22
|
-
[
|
|
23
|
-
:'Float',
|
|
24
|
-
:'String'
|
|
25
|
-
]
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# Builds the object
|
|
29
|
-
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
30
|
-
# @return [Object] Returns the model or the data itself
|
|
31
|
-
def build(data)
|
|
32
|
-
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
33
|
-
# Note:
|
|
34
|
-
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
35
|
-
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
36
|
-
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
37
|
-
# - TODO: logging when debugging is set.
|
|
38
|
-
openapi_any_of.each do |klass|
|
|
39
|
-
begin
|
|
40
|
-
next if klass == :AnyType # "nullable: true"
|
|
41
|
-
return find_and_cast_into_type(klass, data)
|
|
42
|
-
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
openapi_any_of.include?(:AnyType) ? data : nil
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
private
|
|
50
|
-
|
|
51
|
-
SchemaMismatchError = Class.new(StandardError)
|
|
52
|
-
|
|
53
|
-
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
54
|
-
def find_and_cast_into_type(klass, data)
|
|
55
|
-
return if data.nil?
|
|
56
|
-
|
|
57
|
-
case klass.to_s
|
|
58
|
-
when 'Boolean'
|
|
59
|
-
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
60
|
-
when 'Float'
|
|
61
|
-
return data if data.instance_of?(Float)
|
|
62
|
-
when 'Integer'
|
|
63
|
-
return data if data.instance_of?(Integer)
|
|
64
|
-
when 'Time'
|
|
65
|
-
return Time.parse(data)
|
|
66
|
-
when 'Date'
|
|
67
|
-
return Date.iso8601(data)
|
|
68
|
-
when 'String'
|
|
69
|
-
return data if data.instance_of?(String)
|
|
70
|
-
when 'Object' # "type: object"
|
|
71
|
-
return data if data.instance_of?(Hash)
|
|
72
|
-
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
73
|
-
if data.instance_of?(Array)
|
|
74
|
-
sub_type = Regexp.last_match[:sub_type]
|
|
75
|
-
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
76
|
-
end
|
|
77
|
-
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
78
|
-
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
79
|
-
sub_type = Regexp.last_match[:sub_type]
|
|
80
|
-
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
81
|
-
end
|
|
82
|
-
else # model
|
|
83
|
-
const = FactPulse.const_get(klass)
|
|
84
|
-
if const
|
|
85
|
-
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
86
|
-
model = const.build(data)
|
|
87
|
-
return model if model
|
|
88
|
-
else
|
|
89
|
-
# raise if data contains keys that are not known to the model
|
|
90
|
-
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
91
|
-
model = const.build_from_hash(data)
|
|
92
|
-
return model if model
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
raise # if no match by now, raise
|
|
98
|
-
rescue
|
|
99
|
-
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
end
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#API REST FactPulse
|
|
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/
|
|
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
|
-
class NatureOperation
|
|
18
|
-
B1 = "B1".freeze
|
|
19
|
-
S1 = "S1".freeze
|
|
20
|
-
M1 = "M1".freeze
|
|
21
|
-
B2 = "B2".freeze
|
|
22
|
-
S2 = "S2".freeze
|
|
23
|
-
M2 = "M2".freeze
|
|
24
|
-
B4 = "B4".freeze
|
|
25
|
-
S4 = "S4".freeze
|
|
26
|
-
M4 = "M4".freeze
|
|
27
|
-
S3 = "S3".freeze
|
|
28
|
-
S5 = "S5".freeze
|
|
29
|
-
S6 = "S6".freeze
|
|
30
|
-
B7 = "B7".freeze
|
|
31
|
-
S7 = "S7".freeze
|
|
32
|
-
|
|
33
|
-
def self.all_vars
|
|
34
|
-
@all_vars ||= [B1, S1, M1, B2, S2, M2, B4, S4, M4, S3, S5, S6, B7, S7].freeze
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Builds the enum from string
|
|
38
|
-
# @param [String] The enum value in the form of the string
|
|
39
|
-
# @return [String] The enum value
|
|
40
|
-
def self.build_from_hash(value)
|
|
41
|
-
new.build_from_hash(value)
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# Builds the enum from string
|
|
45
|
-
# @param [String] The enum value in the form of the string
|
|
46
|
-
# @return [String] The enum value
|
|
47
|
-
def build_from_hash(value)
|
|
48
|
-
return value if NatureOperation.all_vars.include?(value)
|
|
49
|
-
raise "Invalid ENUM value #{value} for class #NatureOperation"
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#API REST FactPulse
|
|
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/
|
|
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
|
-
# Note de facture (IncludedNote en Factur-X). Les notes obligatoires pour BR-FR-05 sont : - PMT : Indemnité forfaitaire pour frais de recouvrement - PMD : Pénalités de retard - AAB : Escompte pour paiement anticipé
|
|
18
|
-
class Note < ApiModelBase
|
|
19
|
-
attr_accessor :code_sujet
|
|
20
|
-
|
|
21
|
-
attr_accessor :contenu
|
|
22
|
-
|
|
23
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
-
def self.attribute_map
|
|
25
|
-
{
|
|
26
|
-
:'code_sujet' => :'codeSujet',
|
|
27
|
-
:'contenu' => :'contenu'
|
|
28
|
-
}
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Returns attribute mapping this model knows about
|
|
32
|
-
def self.acceptable_attribute_map
|
|
33
|
-
attribute_map
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Returns all the JSON keys this model knows about
|
|
37
|
-
def self.acceptable_attributes
|
|
38
|
-
acceptable_attribute_map.values
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# Attribute type mapping.
|
|
42
|
-
def self.openapi_types
|
|
43
|
-
{
|
|
44
|
-
:'code_sujet' => :'String',
|
|
45
|
-
:'contenu' => :'String'
|
|
46
|
-
}
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# List of attributes with nullable: true
|
|
50
|
-
def self.openapi_nullable
|
|
51
|
-
Set.new([
|
|
52
|
-
:'code_sujet',
|
|
53
|
-
])
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# Initializes the object
|
|
57
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
-
def initialize(attributes = {})
|
|
59
|
-
if (!attributes.is_a?(Hash))
|
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::Note` initialize method"
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::Note`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
-
end
|
|
69
|
-
h[k.to_sym] = v
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if attributes.key?(:'code_sujet')
|
|
73
|
-
self.code_sujet = attributes[:'code_sujet']
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
if attributes.key?(:'contenu')
|
|
77
|
-
self.contenu = attributes[:'contenu']
|
|
78
|
-
else
|
|
79
|
-
self.contenu = nil
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
-
# @return Array for valid properties with the reasons
|
|
85
|
-
def list_invalid_properties
|
|
86
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
-
invalid_properties = Array.new
|
|
88
|
-
if @contenu.nil?
|
|
89
|
-
invalid_properties.push('invalid value for "contenu", contenu cannot be nil.')
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
invalid_properties
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# Check to see if the all the properties in the model are valid
|
|
96
|
-
# @return true if the model is valid
|
|
97
|
-
def valid?
|
|
98
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
99
|
-
return false if @contenu.nil?
|
|
100
|
-
true
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
# Custom attribute writer method with validation
|
|
104
|
-
# @param [Object] contenu Value to be assigned
|
|
105
|
-
def contenu=(contenu)
|
|
106
|
-
if contenu.nil?
|
|
107
|
-
fail ArgumentError, 'contenu cannot be nil'
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
@contenu = contenu
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
# Checks equality by comparing each attribute.
|
|
114
|
-
# @param [Object] Object to be compared
|
|
115
|
-
def ==(o)
|
|
116
|
-
return true if self.equal?(o)
|
|
117
|
-
self.class == o.class &&
|
|
118
|
-
code_sujet == o.code_sujet &&
|
|
119
|
-
contenu == o.contenu
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
# @see the `==` method
|
|
123
|
-
# @param [Object] Object to be compared
|
|
124
|
-
def eql?(o)
|
|
125
|
-
self == o
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
# Calculates hash code according to all attributes.
|
|
129
|
-
# @return [Integer] Hash code
|
|
130
|
-
def hash
|
|
131
|
-
[code_sujet, contenu].hash
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
# Builds the object from hash
|
|
135
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
136
|
-
# @return [Object] Returns the model itself
|
|
137
|
-
def self.build_from_hash(attributes)
|
|
138
|
-
return nil unless attributes.is_a?(Hash)
|
|
139
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
140
|
-
transformed_hash = {}
|
|
141
|
-
openapi_types.each_pair do |key, type|
|
|
142
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
143
|
-
transformed_hash["#{key}"] = nil
|
|
144
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
145
|
-
# check to ensure the input is an array given that the attribute
|
|
146
|
-
# is documented as an array but the input is not
|
|
147
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
148
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
149
|
-
end
|
|
150
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
151
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
152
|
-
end
|
|
153
|
-
end
|
|
154
|
-
new(transformed_hash)
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
# Returns the object in the form of hash
|
|
158
|
-
# @return [Hash] Returns the object in the form of hash
|
|
159
|
-
def to_hash
|
|
160
|
-
hash = {}
|
|
161
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
162
|
-
value = self.send(attr)
|
|
163
|
-
if value.nil?
|
|
164
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
165
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
hash[param] = _to_hash(value)
|
|
169
|
-
end
|
|
170
|
-
hash
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
end
|
|
174
|
-
|
|
175
|
-
end
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#API REST FactPulse
|
|
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/
|
|
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
|
-
# Note obligatoire détectée avec localisation et comparaison XML/PDF.
|
|
18
|
-
class NoteObligatoireSchema < ApiModelBase
|
|
19
|
-
# Code sujet (PMT, PMD, AAB)
|
|
20
|
-
attr_accessor :code_sujet
|
|
21
|
-
|
|
22
|
-
# Libellé (ex: Indemnité recouvrement)
|
|
23
|
-
attr_accessor :label
|
|
24
|
-
|
|
25
|
-
attr_accessor :valeur_pdf
|
|
26
|
-
|
|
27
|
-
attr_accessor :valeur_xml
|
|
28
|
-
|
|
29
|
-
# Statut de conformité (CONFORME si XML trouvé dans PDF)
|
|
30
|
-
attr_accessor :statut
|
|
31
|
-
|
|
32
|
-
attr_accessor :message
|
|
33
|
-
|
|
34
|
-
attr_accessor :bbox
|
|
35
|
-
|
|
36
|
-
class EnumAttributeValidator
|
|
37
|
-
attr_reader :datatype
|
|
38
|
-
attr_reader :allowable_values
|
|
39
|
-
|
|
40
|
-
def initialize(datatype, allowable_values)
|
|
41
|
-
@allowable_values = allowable_values.map do |value|
|
|
42
|
-
case datatype.to_s
|
|
43
|
-
when /Integer/i
|
|
44
|
-
value.to_i
|
|
45
|
-
when /Float/i
|
|
46
|
-
value.to_f
|
|
47
|
-
else
|
|
48
|
-
value
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def valid?(value)
|
|
54
|
-
!value || allowable_values.include?(value)
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
59
|
-
def self.attribute_map
|
|
60
|
-
{
|
|
61
|
-
:'code_sujet' => :'code_sujet',
|
|
62
|
-
:'label' => :'label',
|
|
63
|
-
:'valeur_pdf' => :'valeur_pdf',
|
|
64
|
-
:'valeur_xml' => :'valeur_xml',
|
|
65
|
-
:'statut' => :'statut',
|
|
66
|
-
:'message' => :'message',
|
|
67
|
-
:'bbox' => :'bbox'
|
|
68
|
-
}
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Returns attribute mapping this model knows about
|
|
72
|
-
def self.acceptable_attribute_map
|
|
73
|
-
attribute_map
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
# Returns all the JSON keys this model knows about
|
|
77
|
-
def self.acceptable_attributes
|
|
78
|
-
acceptable_attribute_map.values
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# Attribute type mapping.
|
|
82
|
-
def self.openapi_types
|
|
83
|
-
{
|
|
84
|
-
:'code_sujet' => :'String',
|
|
85
|
-
:'label' => :'String',
|
|
86
|
-
:'valeur_pdf' => :'String',
|
|
87
|
-
:'valeur_xml' => :'String',
|
|
88
|
-
:'statut' => :'StatutChampAPI',
|
|
89
|
-
:'message' => :'String',
|
|
90
|
-
:'bbox' => :'BoundingBoxSchema'
|
|
91
|
-
}
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# List of attributes with nullable: true
|
|
95
|
-
def self.openapi_nullable
|
|
96
|
-
Set.new([
|
|
97
|
-
:'valeur_pdf',
|
|
98
|
-
:'valeur_xml',
|
|
99
|
-
:'message',
|
|
100
|
-
:'bbox'
|
|
101
|
-
])
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
# Initializes the object
|
|
105
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
-
def initialize(attributes = {})
|
|
107
|
-
if (!attributes.is_a?(Hash))
|
|
108
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::NoteObligatoireSchema` initialize method"
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
112
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
113
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
114
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
115
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::NoteObligatoireSchema`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
116
|
-
end
|
|
117
|
-
h[k.to_sym] = v
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
if attributes.key?(:'code_sujet')
|
|
121
|
-
self.code_sujet = attributes[:'code_sujet']
|
|
122
|
-
else
|
|
123
|
-
self.code_sujet = nil
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
if attributes.key?(:'label')
|
|
127
|
-
self.label = attributes[:'label']
|
|
128
|
-
else
|
|
129
|
-
self.label = nil
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
if attributes.key?(:'valeur_pdf')
|
|
133
|
-
self.valeur_pdf = attributes[:'valeur_pdf']
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
if attributes.key?(:'valeur_xml')
|
|
137
|
-
self.valeur_xml = attributes[:'valeur_xml']
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
if attributes.key?(:'statut')
|
|
141
|
-
self.statut = attributes[:'statut']
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
if attributes.key?(:'message')
|
|
145
|
-
self.message = attributes[:'message']
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
if attributes.key?(:'bbox')
|
|
149
|
-
self.bbox = attributes[:'bbox']
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
154
|
-
# @return Array for valid properties with the reasons
|
|
155
|
-
def list_invalid_properties
|
|
156
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
157
|
-
invalid_properties = Array.new
|
|
158
|
-
if @code_sujet.nil?
|
|
159
|
-
invalid_properties.push('invalid value for "code_sujet", code_sujet cannot be nil.')
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
if @label.nil?
|
|
163
|
-
invalid_properties.push('invalid value for "label", label cannot be nil.')
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
invalid_properties
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
# Check to see if the all the properties in the model are valid
|
|
170
|
-
# @return true if the model is valid
|
|
171
|
-
def valid?
|
|
172
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
173
|
-
return false if @code_sujet.nil?
|
|
174
|
-
return false if @label.nil?
|
|
175
|
-
true
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
# Custom attribute writer method with validation
|
|
179
|
-
# @param [Object] code_sujet Value to be assigned
|
|
180
|
-
def code_sujet=(code_sujet)
|
|
181
|
-
if code_sujet.nil?
|
|
182
|
-
fail ArgumentError, 'code_sujet cannot be nil'
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
@code_sujet = code_sujet
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
# Custom attribute writer method with validation
|
|
189
|
-
# @param [Object] label Value to be assigned
|
|
190
|
-
def label=(label)
|
|
191
|
-
if label.nil?
|
|
192
|
-
fail ArgumentError, 'label cannot be nil'
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
@label = label
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
# Checks equality by comparing each attribute.
|
|
199
|
-
# @param [Object] Object to be compared
|
|
200
|
-
def ==(o)
|
|
201
|
-
return true if self.equal?(o)
|
|
202
|
-
self.class == o.class &&
|
|
203
|
-
code_sujet == o.code_sujet &&
|
|
204
|
-
label == o.label &&
|
|
205
|
-
valeur_pdf == o.valeur_pdf &&
|
|
206
|
-
valeur_xml == o.valeur_xml &&
|
|
207
|
-
statut == o.statut &&
|
|
208
|
-
message == o.message &&
|
|
209
|
-
bbox == o.bbox
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
# @see the `==` method
|
|
213
|
-
# @param [Object] Object to be compared
|
|
214
|
-
def eql?(o)
|
|
215
|
-
self == o
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
# Calculates hash code according to all attributes.
|
|
219
|
-
# @return [Integer] Hash code
|
|
220
|
-
def hash
|
|
221
|
-
[code_sujet, label, valeur_pdf, valeur_xml, statut, message, bbox].hash
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
# Builds the object from hash
|
|
225
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
226
|
-
# @return [Object] Returns the model itself
|
|
227
|
-
def self.build_from_hash(attributes)
|
|
228
|
-
return nil unless attributes.is_a?(Hash)
|
|
229
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
230
|
-
transformed_hash = {}
|
|
231
|
-
openapi_types.each_pair do |key, type|
|
|
232
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
233
|
-
transformed_hash["#{key}"] = nil
|
|
234
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
235
|
-
# check to ensure the input is an array given that the attribute
|
|
236
|
-
# is documented as an array but the input is not
|
|
237
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
238
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
239
|
-
end
|
|
240
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
241
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
242
|
-
end
|
|
243
|
-
end
|
|
244
|
-
new(transformed_hash)
|
|
245
|
-
end
|
|
246
|
-
|
|
247
|
-
# Returns the object in the form of hash
|
|
248
|
-
# @return [Hash] Returns the object in the form of hash
|
|
249
|
-
def to_hash
|
|
250
|
-
hash = {}
|
|
251
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
252
|
-
value = self.send(attr)
|
|
253
|
-
if value.nil?
|
|
254
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
255
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
256
|
-
end
|
|
257
|
-
|
|
258
|
-
hash[param] = _to_hash(value)
|
|
259
|
-
end
|
|
260
|
-
hash
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
end
|
|
264
|
-
|
|
265
|
-
end
|