Class: FactPulse::ResultatValidationPDFAPI
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- FactPulse::ResultatValidationPDFAPI
- Defined in:
- lib/factpulse/models/resultat_validation_pdfapi.rb
Overview
Résultat complet de la validation d’un PDF Factur-X.
Instance Attribute Summary collapse
-
#avertissements_pdfa ⇒ Object
Liste des avertissements PDF/A.
-
#erreurs_pdfa ⇒ Object
Liste des erreurs de conformité PDF/A.
-
#erreurs_signatures ⇒ Object
Liste des erreurs lors de l’analyse des signatures.
-
#erreurs_xml ⇒ Object
Liste des erreurs de validation XML.
-
#erreurs_xmp ⇒ Object
Liste des erreurs de métadonnées XMP.
-
#est_conforme ⇒ Object
True si le PDF est conforme à tous les critères (XML, PDF/A, XMP).
-
#est_signe ⇒ Object
True si le PDF contient au moins une signature.
-
#message_resume ⇒ Object
Message résumant le résultat de la validation.
-
#metadonnees_xmp ⇒ Object
Métadonnées XMP extraites du PDF.
-
#methode_validation_pdfa ⇒ Object
Méthode utilisée pour la validation PDF/A (metadata ou verapdf).
-
#nombre_signatures ⇒ Object
Nombre de signatures électroniques trouvées.
-
#pdfa_conforme ⇒ Object
True si le PDF est conforme PDF/A.
-
#profil_detecte ⇒ Object
Returns the value of attribute profil_detecte.
-
#profil_xmp ⇒ Object
Returns the value of attribute profil_xmp.
-
#regles_echouees ⇒ Object
Returns the value of attribute regles_echouees.
-
#regles_validees ⇒ Object
Returns the value of attribute regles_validees.
-
#signatures ⇒ Object
Liste des signatures trouvées avec leurs informations.
-
#version_pdfa ⇒ Object
Returns the value of attribute version_pdfa.
-
#version_xmp ⇒ Object
Returns the value of attribute version_xmp.
-
#xml_conforme ⇒ Object
True si le XML Factur-X est conforme aux règles Schematron.
-
#xml_present ⇒ Object
True si un XML Factur-X est embarqué dans le PDF.
-
#xmp_conforme_facturx ⇒ Object
True si les métadonnées XMP contiennent des informations Factur-X.
-
#xmp_present ⇒ Object
True si des métadonnées XMP sont présentes.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ResultatValidationPDFAPI
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ResultatValidationPDFAPI
Initializes the object
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 164 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ResultatValidationPDFAPI` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ResultatValidationPDFAPI`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'est_conforme') self.est_conforme = attributes[:'est_conforme'] else self.est_conforme = nil end if attributes.key?(:'xml_present') self.xml_present = attributes[:'xml_present'] else self.xml_present = nil end if attributes.key?(:'xml_conforme') self.xml_conforme = attributes[:'xml_conforme'] else self.xml_conforme = nil end if attributes.key?(:'profil_detecte') self.profil_detecte = attributes[:'profil_detecte'] end if attributes.key?(:'erreurs_xml') if (value = attributes[:'erreurs_xml']).is_a?(Array) self.erreurs_xml = value end end if attributes.key?(:'pdfa_conforme') self.pdfa_conforme = attributes[:'pdfa_conforme'] else self.pdfa_conforme = nil end if attributes.key?(:'version_pdfa') self.version_pdfa = attributes[:'version_pdfa'] end if attributes.key?(:'methode_validation_pdfa') self.methode_validation_pdfa = attributes[:'methode_validation_pdfa'] else self.methode_validation_pdfa = 'metadata' end if attributes.key?(:'regles_validees') self.regles_validees = attributes[:'regles_validees'] end if attributes.key?(:'regles_echouees') self.regles_echouees = attributes[:'regles_echouees'] end if attributes.key?(:'erreurs_pdfa') if (value = attributes[:'erreurs_pdfa']).is_a?(Array) self.erreurs_pdfa = value end end if attributes.key?(:'avertissements_pdfa') if (value = attributes[:'avertissements_pdfa']).is_a?(Array) self.avertissements_pdfa = value end end if attributes.key?(:'xmp_present') self.xmp_present = attributes[:'xmp_present'] else self.xmp_present = nil end if attributes.key?(:'xmp_conforme_facturx') self.xmp_conforme_facturx = attributes[:'xmp_conforme_facturx'] else self.xmp_conforme_facturx = nil end if attributes.key?(:'profil_xmp') self.profil_xmp = attributes[:'profil_xmp'] end if attributes.key?(:'version_xmp') self.version_xmp = attributes[:'version_xmp'] end if attributes.key?(:'erreurs_xmp') if (value = attributes[:'erreurs_xmp']).is_a?(Array) self.erreurs_xmp = value end end if attributes.key?(:'metadonnees_xmp') if (value = attributes[:'metadonnees_xmp']).is_a?(Hash) self. = value end end if attributes.key?(:'est_signe') self.est_signe = attributes[:'est_signe'] else self.est_signe = nil end if attributes.key?(:'nombre_signatures') self.nombre_signatures = attributes[:'nombre_signatures'] else self.nombre_signatures = 0 end if attributes.key?(:'signatures') if (value = attributes[:'signatures']).is_a?(Array) self.signatures = value end end if attributes.key?(:'erreurs_signatures') if (value = attributes[:'erreurs_signatures']).is_a?(Array) self.erreurs_signatures = value end end if attributes.key?(:'message_resume') self. = attributes[:'message_resume'] else self. = nil end end |
Instance Attribute Details
#avertissements_pdfa ⇒ Object
Liste des avertissements PDF/A
49 50 51 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 49 def avertissements_pdfa @avertissements_pdfa end |
#erreurs_pdfa ⇒ Object
Liste des erreurs de conformité PDF/A
46 47 48 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 46 def erreurs_pdfa @erreurs_pdfa end |
#erreurs_signatures ⇒ Object
Liste des erreurs lors de l’analyse des signatures
77 78 79 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 77 def erreurs_signatures @erreurs_signatures end |
#erreurs_xml ⇒ Object
Liste des erreurs de validation XML
31 32 33 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 31 def erreurs_xml @erreurs_xml end |
#erreurs_xmp ⇒ Object
Liste des erreurs de métadonnées XMP
62 63 64 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 62 def erreurs_xmp @erreurs_xmp end |
#est_conforme ⇒ Object
True si le PDF est conforme à tous les critères (XML, PDF/A, XMP)
20 21 22 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 20 def est_conforme @est_conforme end |
#est_signe ⇒ Object
True si le PDF contient au moins une signature
68 69 70 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 68 def est_signe @est_signe end |
#message_resume ⇒ Object
Message résumant le résultat de la validation
80 81 82 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 80 def @message_resume end |
#metadonnees_xmp ⇒ Object
Métadonnées XMP extraites du PDF
65 66 67 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 65 def @metadonnees_xmp end |
#methode_validation_pdfa ⇒ Object
Méthode utilisée pour la validation PDF/A (metadata ou verapdf)
39 40 41 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 39 def methode_validation_pdfa @methode_validation_pdfa end |
#nombre_signatures ⇒ Object
Nombre de signatures électroniques trouvées
71 72 73 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 71 def nombre_signatures @nombre_signatures end |
#pdfa_conforme ⇒ Object
True si le PDF est conforme PDF/A
34 35 36 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 34 def pdfa_conforme @pdfa_conforme end |
#profil_detecte ⇒ Object
Returns the value of attribute profil_detecte.
28 29 30 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 28 def profil_detecte @profil_detecte end |
#profil_xmp ⇒ Object
Returns the value of attribute profil_xmp.
57 58 59 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 57 def profil_xmp @profil_xmp end |
#regles_echouees ⇒ Object
Returns the value of attribute regles_echouees.
43 44 45 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 43 def regles_echouees @regles_echouees end |
#regles_validees ⇒ Object
Returns the value of attribute regles_validees.
41 42 43 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 41 def regles_validees @regles_validees end |
#signatures ⇒ Object
Liste des signatures trouvées avec leurs informations
74 75 76 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 74 def signatures @signatures end |
#version_pdfa ⇒ Object
Returns the value of attribute version_pdfa.
36 37 38 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 36 def version_pdfa @version_pdfa end |
#version_xmp ⇒ Object
Returns the value of attribute version_xmp.
59 60 61 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 59 def version_xmp @version_xmp end |
#xml_conforme ⇒ Object
True si le XML Factur-X est conforme aux règles Schematron
26 27 28 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 26 def xml_conforme @xml_conforme end |
#xml_present ⇒ Object
True si un XML Factur-X est embarqué dans le PDF
23 24 25 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 23 def xml_present @xml_present end |
#xmp_conforme_facturx ⇒ Object
True si les métadonnées XMP contiennent des informations Factur-X
55 56 57 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 55 def xmp_conforme_facturx @xmp_conforme_facturx end |
#xmp_present ⇒ Object
True si des métadonnées XMP sont présentes
52 53 54 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 52 def xmp_present @xmp_present end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
112 113 114 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 112 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
117 118 119 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 117 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 83 def self.attribute_map { :'est_conforme' => :'est_conforme', :'xml_present' => :'xml_present', :'xml_conforme' => :'xml_conforme', :'profil_detecte' => :'profil_detecte', :'erreurs_xml' => :'erreurs_xml', :'pdfa_conforme' => :'pdfa_conforme', :'version_pdfa' => :'version_pdfa', :'methode_validation_pdfa' => :'methode_validation_pdfa', :'regles_validees' => :'regles_validees', :'regles_echouees' => :'regles_echouees', :'erreurs_pdfa' => :'erreurs_pdfa', :'avertissements_pdfa' => :'avertissements_pdfa', :'xmp_present' => :'xmp_present', :'xmp_conforme_facturx' => :'xmp_conforme_facturx', :'profil_xmp' => :'profil_xmp', :'version_xmp' => :'version_xmp', :'erreurs_xmp' => :'erreurs_xmp', :'metadonnees_xmp' => :'metadonnees_xmp', :'est_signe' => :'est_signe', :'nombre_signatures' => :'nombre_signatures', :'signatures' => :'signatures', :'erreurs_signatures' => :'erreurs_signatures', :'message_resume' => :'message_resume' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 485 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
151 152 153 154 155 156 157 158 159 160 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 151 def self.openapi_nullable Set.new([ :'profil_detecte', :'version_pdfa', :'regles_validees', :'regles_echouees', :'profil_xmp', :'version_xmp', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 122 def self.openapi_types { :'est_conforme' => :'Boolean', :'xml_present' => :'Boolean', :'xml_conforme' => :'Boolean', :'profil_detecte' => :'String', :'erreurs_xml' => :'Array<String>', :'pdfa_conforme' => :'Boolean', :'version_pdfa' => :'String', :'methode_validation_pdfa' => :'String', :'regles_validees' => :'Integer', :'regles_echouees' => :'Integer', :'erreurs_pdfa' => :'Array<String>', :'avertissements_pdfa' => :'Array<String>', :'xmp_present' => :'Boolean', :'xmp_conforme_facturx' => :'Boolean', :'profil_xmp' => :'String', :'version_xmp' => :'String', :'erreurs_xmp' => :'Array<String>', :'metadonnees_xmp' => :'Hash<String, Object>', :'est_signe' => :'Boolean', :'nombre_signatures' => :'Integer', :'signatures' => :'Array<InformationSignatureAPI>', :'erreurs_signatures' => :'Array<String>', :'message_resume' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 442 def ==(o) return true if self.equal?(o) self.class == o.class && est_conforme == o.est_conforme && xml_present == o.xml_present && xml_conforme == o.xml_conforme && profil_detecte == o.profil_detecte && erreurs_xml == o.erreurs_xml && pdfa_conforme == o.pdfa_conforme && version_pdfa == o.version_pdfa && methode_validation_pdfa == o.methode_validation_pdfa && regles_validees == o.regles_validees && regles_echouees == o.regles_echouees && erreurs_pdfa == o.erreurs_pdfa && avertissements_pdfa == o.avertissements_pdfa && xmp_present == o.xmp_present && xmp_conforme_facturx == o.xmp_conforme_facturx && profil_xmp == o.profil_xmp && version_xmp == o.version_xmp && erreurs_xmp == o.erreurs_xmp && == o. && est_signe == o.est_signe && nombre_signatures == o.nombre_signatures && signatures == o.signatures && erreurs_signatures == o.erreurs_signatures && == o. end |
#eql?(o) ⇒ Boolean
472 473 474 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 472 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
478 479 480 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 478 def hash [est_conforme, xml_present, xml_conforme, profil_detecte, erreurs_xml, pdfa_conforme, version_pdfa, methode_validation_pdfa, regles_validees, regles_echouees, erreurs_pdfa, avertissements_pdfa, xmp_present, xmp_conforme_facturx, profil_xmp, version_xmp, erreurs_xmp, , est_signe, nombre_signatures, signatures, erreurs_signatures, ].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 307 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @est_conforme.nil? invalid_properties.push('invalid value for "est_conforme", est_conforme cannot be nil.') end if @xml_present.nil? invalid_properties.push('invalid value for "xml_present", xml_present cannot be nil.') end if @xml_conforme.nil? invalid_properties.push('invalid value for "xml_conforme", xml_conforme cannot be nil.') end if @pdfa_conforme.nil? invalid_properties.push('invalid value for "pdfa_conforme", pdfa_conforme cannot be nil.') end if @xmp_present.nil? invalid_properties.push('invalid value for "xmp_present", xmp_present cannot be nil.') end if @xmp_conforme_facturx.nil? invalid_properties.push('invalid value for "xmp_conforme_facturx", xmp_conforme_facturx cannot be nil.') end if @est_signe.nil? invalid_properties.push('invalid value for "est_signe", est_signe cannot be nil.') end if @message_resume.nil? invalid_properties.push('invalid value for "message_resume", message_resume cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
507 508 509 510 511 512 513 514 515 516 517 518 519 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 507 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/factpulse/models/resultat_validation_pdfapi.rb', line 347 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @est_conforme.nil? return false if @xml_present.nil? return false if @xml_conforme.nil? return false if @pdfa_conforme.nil? return false if @xmp_present.nil? return false if @xmp_conforme_facturx.nil? return false if @est_signe.nil? return false if @message_resume.nil? true end |