Class: FactPulse::ReponseVerificationSucces
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- FactPulse::ReponseVerificationSucces
- Defined in:
- lib/factpulse/models/reponse_verification_succes.rb
Overview
Réponse de vérification réussie avec données unifiées.
Instance Attribute Summary collapse
-
#avertissements ⇒ Object
Avertissements non bloquants.
-
#champs ⇒ Object
Liste des champs vérifiés avec valeurs, statuts et coordonnées PDF.
-
#champs_conformes ⇒ Object
Nombre de champs conformes.
-
#champs_verifies ⇒ Object
Nombre de champs vérifiés.
-
#dimensions_pages ⇒ Object
Dimensions de chaque page du PDF (largeur, hauteur).
-
#est_conforme ⇒ Object
True si aucun écart critique.
-
#est_facturx ⇒ Object
True si le PDF contient du XML Factur-X.
-
#notes_obligatoires ⇒ Object
Notes obligatoires (PMT, PMD, AAB) avec localisation PDF.
-
#profil_facturx ⇒ Object
Returns the value of attribute profil_facturx.
-
#score_conformite ⇒ Object
Score de conformité (0-100%).
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 = {}) ⇒ ReponseVerificationSucces
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 = {}) ⇒ ReponseVerificationSucces
Initializes the object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 99 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ReponseVerificationSucces` 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::ReponseVerificationSucces`. 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?(:'score_conformite') self.score_conformite = attributes[:'score_conformite'] else self.score_conformite = nil end if attributes.key?(:'champs_verifies') self.champs_verifies = attributes[:'champs_verifies'] else self.champs_verifies = 0 end if attributes.key?(:'champs_conformes') self.champs_conformes = attributes[:'champs_conformes'] else self.champs_conformes = 0 end if attributes.key?(:'est_facturx') self.est_facturx = attributes[:'est_facturx'] else self.est_facturx = false end if attributes.key?(:'profil_facturx') self.profil_facturx = attributes[:'profil_facturx'] end if attributes.key?(:'champs') if (value = attributes[:'champs']).is_a?(Array) self.champs = value end end if attributes.key?(:'notes_obligatoires') if (value = attributes[:'notes_obligatoires']).is_a?(Array) self.notes_obligatoires = value end end if attributes.key?(:'dimensions_pages') if (value = attributes[:'dimensions_pages']).is_a?(Array) self.dimensions_pages = value end end if attributes.key?(:'avertissements') if (value = attributes[:'avertissements']).is_a?(Array) self.avertissements = value end end end |
Instance Attribute Details
#avertissements ⇒ Object
Avertissements non bloquants
46 47 48 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 46 def avertissements @avertissements end |
#champs ⇒ Object
Liste des champs vérifiés avec valeurs, statuts et coordonnées PDF
37 38 39 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 37 def champs @champs end |
#champs_conformes ⇒ Object
Nombre de champs conformes
29 30 31 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 29 def champs_conformes @champs_conformes end |
#champs_verifies ⇒ Object
Nombre de champs vérifiés
26 27 28 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 26 def champs_verifies @champs_verifies end |
#dimensions_pages ⇒ Object
Dimensions de chaque page du PDF (largeur, hauteur)
43 44 45 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 43 def dimensions_pages @dimensions_pages end |
#est_conforme ⇒ Object
True si aucun écart critique
20 21 22 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 20 def est_conforme @est_conforme end |
#est_facturx ⇒ Object
True si le PDF contient du XML Factur-X
32 33 34 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 32 def est_facturx @est_facturx end |
#notes_obligatoires ⇒ Object
Notes obligatoires (PMT, PMD, AAB) avec localisation PDF
40 41 42 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 40 def notes_obligatoires @notes_obligatoires end |
#profil_facturx ⇒ Object
Returns the value of attribute profil_facturx.
34 35 36 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 34 def profil_facturx @profil_facturx end |
#score_conformite ⇒ Object
Score de conformité (0-100%)
23 24 25 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 23 def score_conformite @score_conformite end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
65 66 67 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 65 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
70 71 72 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 70 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 49 def self.attribute_map { :'est_conforme' => :'est_conforme', :'score_conformite' => :'score_conformite', :'champs_verifies' => :'champs_verifies', :'champs_conformes' => :'champs_conformes', :'est_facturx' => :'est_facturx', :'profil_facturx' => :'profil_facturx', :'champs' => :'champs', :'notes_obligatoires' => :'notes_obligatoires', :'dimensions_pages' => :'dimensions_pages', :'avertissements' => :'avertissements' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 305 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
91 92 93 94 95 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 91 def self.openapi_nullable Set.new([ :'profil_facturx', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 75 def self.openapi_types { :'est_conforme' => :'Boolean', :'score_conformite' => :'Float', :'champs_verifies' => :'Integer', :'champs_conformes' => :'Integer', :'est_facturx' => :'Boolean', :'profil_facturx' => :'String', :'champs' => :'Array<ChampVerifieSchema>', :'notes_obligatoires' => :'Array<NoteObligatoireSchema>', :'dimensions_pages' => :'Array<DimensionPageSchema>', :'avertissements' => :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 275 def ==(o) return true if self.equal?(o) self.class == o.class && est_conforme == o.est_conforme && score_conformite == o.score_conformite && champs_verifies == o.champs_verifies && champs_conformes == o.champs_conformes && est_facturx == o.est_facturx && profil_facturx == o.profil_facturx && champs == o.champs && notes_obligatoires == o.notes_obligatoires && dimensions_pages == o.dimensions_pages && avertissements == o.avertissements end |
#eql?(o) ⇒ Boolean
292 293 294 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 292 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
298 299 300 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 298 def hash [est_conforme, score_conformite, champs_verifies, champs_conformes, est_facturx, profil_facturx, champs, notes_obligatoires, dimensions_pages, avertissements].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 174 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 @score_conformite.nil? invalid_properties.push('invalid value for "score_conformite", score_conformite cannot be nil.') end if @score_conformite > 100.0 invalid_properties.push('invalid value for "score_conformite", must be smaller than or equal to 100.0.') end if @score_conformite < 0.0 invalid_properties.push('invalid value for "score_conformite", must be greater than or equal to 0.0.') end if !@champs_verifies.nil? && @champs_verifies < 0 invalid_properties.push('invalid value for "champs_verifies", must be greater than or equal to 0.') end if !@champs_conformes.nil? && @champs_conformes < 0 invalid_properties.push('invalid value for "champs_conformes", must be greater than or equal to 0.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 327 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
206 207 208 209 210 211 212 213 214 215 |
# File 'lib/factpulse/models/reponse_verification_succes.rb', line 206 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @est_conforme.nil? return false if @score_conformite.nil? return false if @score_conformite > 100.0 return false if @score_conformite < 0.0 return false if !@champs_verifies.nil? && @champs_verifies < 0 return false if !@champs_conformes.nil? && @champs_conformes < 0 true end |