Class: NuvemfiscalSdkRuby::NfeSefazVeicProd
- Inherits:
-
Object
- Object
- NuvemfiscalSdkRuby::NfeSefazVeicProd
- Defined in:
- lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb
Overview
Veículos novos.
Instance Attribute Summary collapse
-
#ano_fab ⇒ Object
Ano de Fabricação.
-
#ano_mod ⇒ Object
Ano Modelo de Fabricação.
-
#c_cor ⇒ Object
Cor do veículo (código de cada montadora).
-
#c_cor_denatran ⇒ Object
Código da Cor Segundo as regras de pré-cadastro do DENATRAN: 01-AMARELO * 02 - AZUL * 03 - BEGE * 04 - BRANCA * 05 - CINZA * 06 - DOURADA * 07 - GRENA * 08 - LARANJA * 09 - MARROM * 10 - PRATA * 11 - PRETA * 12 - ROSA * 13 - ROXA * 14 - VERDE * 15 - VERMELHA * 16 - FANTASIA.
-
#c_mod ⇒ Object
Código Marca Modelo (utilizar tabela RENAVAM).
-
#chassi ⇒ Object
Chassi do veículo - VIN (código-identificação-veículo).
-
#cilin ⇒ Object
Capacidade voluntária do motor expressa em centímetros cúbicos (CC).
-
#cmt ⇒ Object
CMT-Capacidade Máxima de Tração - em Toneladas 4 casas decimais.
-
#cond_veic ⇒ Object
Condição do veículo (1 - acabado; 2 - inacabado; 3 - semi-acabado).
-
#dist ⇒ Object
Distância entre eixos.
-
#esp_veic ⇒ Object
Espécie de veículo (utilizar tabela RENAVAM).
-
#lota ⇒ Object
Quantidade máxima de permitida de passageiros sentados, inclusive motorista.
-
#n_motor ⇒ Object
Número do motor.
-
#n_serie ⇒ Object
Serial (série).
-
#peso_b ⇒ Object
Peso bruto.
-
#peso_l ⇒ Object
Peso líquido.
-
#pot ⇒ Object
Potência máxima do motor do veículo em cavalo vapor (CV).
-
#tp_comb ⇒ Object
Tipo de combustível-Tabela RENAVAM: 01-Álcool * 02 - Gasolina * 03 - Diesel * 16 - Álcool/Gas * 17 - Gas./Álcool/GNV * 18 - Gasolina/Elétrico.
-
#tp_op ⇒ Object
Tipo da Operação (1 - Venda concessionária; 2 - Faturamento direto; 3 - Venda direta; 0 - Outros).
-
#tp_pint ⇒ Object
Tipo de pintura.
-
#tp_rest ⇒ Object
Restrição * 0 - Não há * 1 - Alienação Fiduciária * 2 - Arrendamento Mercantil * 3 - Reserva de Domínio * 4 - Penhor de Veículos * 9 - outras.
-
#tp_veic ⇒ Object
Tipo de veículo (utilizar tabela RENAVAM).
-
#vin ⇒ Object
Informa-se o veículo tem VIN (chassi) remarcado.
-
#x_cor ⇒ Object
Descrição da cor.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.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.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ NfeSefazVeicProd
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ NfeSefazVeicProd
Initializes the object
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 304 305 306 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 344 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 188 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NuvemfiscalSdkRuby::NfeSefazVeicProd` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `NuvemfiscalSdkRuby::NfeSefazVeicProd`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'tp_op') self.tp_op = attributes[:'tp_op'] else self.tp_op = nil end if attributes.key?(:'chassi') self.chassi = attributes[:'chassi'] else self.chassi = nil end if attributes.key?(:'c_cor') self.c_cor = attributes[:'c_cor'] else self.c_cor = nil end if attributes.key?(:'x_cor') self.x_cor = attributes[:'x_cor'] else self.x_cor = nil end if attributes.key?(:'pot') self.pot = attributes[:'pot'] else self.pot = nil end if attributes.key?(:'cilin') self.cilin = attributes[:'cilin'] else self.cilin = nil end if attributes.key?(:'peso_l') self.peso_l = attributes[:'peso_l'] else self.peso_l = nil end if attributes.key?(:'peso_b') self.peso_b = attributes[:'peso_b'] else self.peso_b = nil end if attributes.key?(:'n_serie') self.n_serie = attributes[:'n_serie'] else self.n_serie = nil end if attributes.key?(:'tp_comb') self.tp_comb = attributes[:'tp_comb'] else self.tp_comb = nil end if attributes.key?(:'n_motor') self.n_motor = attributes[:'n_motor'] else self.n_motor = nil end if attributes.key?(:'cmt') self.cmt = attributes[:'cmt'] else self.cmt = nil end if attributes.key?(:'dist') self.dist = attributes[:'dist'] else self.dist = nil end if attributes.key?(:'ano_mod') self.ano_mod = attributes[:'ano_mod'] else self.ano_mod = nil end if attributes.key?(:'ano_fab') self.ano_fab = attributes[:'ano_fab'] else self.ano_fab = nil end if attributes.key?(:'tp_pint') self.tp_pint = attributes[:'tp_pint'] else self.tp_pint = nil end if attributes.key?(:'tp_veic') self.tp_veic = attributes[:'tp_veic'] else self.tp_veic = nil end if attributes.key?(:'esp_veic') self.esp_veic = attributes[:'esp_veic'] else self.esp_veic = nil end if attributes.key?(:'vin') self.vin = attributes[:'vin'] else self.vin = nil end if attributes.key?(:'cond_veic') self.cond_veic = attributes[:'cond_veic'] else self.cond_veic = nil end if attributes.key?(:'c_mod') self.c_mod = attributes[:'c_mod'] else self.c_mod = nil end if attributes.key?(:'c_cor_denatran') self.c_cor_denatran = attributes[:'c_cor_denatran'] else self.c_cor_denatran = nil end if attributes.key?(:'lota') self.lota = attributes[:'lota'] else self.lota = nil end if attributes.key?(:'tp_rest') self.tp_rest = attributes[:'tp_rest'] else self.tp_rest = nil end end |
Instance Attribute Details
#ano_fab ⇒ Object
Ano de Fabricação.
62 63 64 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 62 def ano_fab @ano_fab end |
#ano_mod ⇒ Object
Ano Modelo de Fabricação.
59 60 61 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 59 def ano_mod @ano_mod end |
#c_cor ⇒ Object
Cor do veículo (código de cada montadora).
26 27 28 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 26 def c_cor @c_cor end |
#c_cor_denatran ⇒ Object
Código da Cor Segundo as regras de pré-cadastro do DENATRAN: 01-AMARELO * 02 - AZUL * 03 - BEGE * 04 - BRANCA * 05 - CINZA * 06 - DOURADA * 07 - GRENA * 08 - LARANJA * 09 - MARROM * 10 - PRATA * 11 - PRETA * 12 - ROSA * 13 - ROXA * 14 - VERDE * 15 - VERMELHA * 16 - FANTASIA
83 84 85 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 83 def c_cor_denatran @c_cor_denatran end |
#c_mod ⇒ Object
Código Marca Modelo (utilizar tabela RENAVAM).
80 81 82 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 80 def c_mod @c_mod end |
#chassi ⇒ Object
Chassi do veículo - VIN (código-identificação-veículo).
23 24 25 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 23 def chassi @chassi end |
#cilin ⇒ Object
Capacidade voluntária do motor expressa em centímetros cúbicos (CC). (cilindradas).
35 36 37 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 35 def cilin @cilin end |
#cmt ⇒ Object
CMT-Capacidade Máxima de Tração - em Toneladas 4 casas decimais.
53 54 55 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 53 def cmt @cmt end |
#cond_veic ⇒ Object
Condição do veículo (1 - acabado; 2 - inacabado; 3 - semi-acabado).
77 78 79 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 77 def cond_veic @cond_veic end |
#dist ⇒ Object
Distância entre eixos.
56 57 58 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 56 def dist @dist end |
#esp_veic ⇒ Object
Espécie de veículo (utilizar tabela RENAVAM).
71 72 73 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 71 def esp_veic @esp_veic end |
#lota ⇒ Object
Quantidade máxima de permitida de passageiros sentados, inclusive motorista.
86 87 88 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 86 def lota @lota end |
#n_motor ⇒ Object
Número do motor.
50 51 52 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 50 def n_motor @n_motor end |
#n_serie ⇒ Object
Serial (série).
44 45 46 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 44 def n_serie @n_serie end |
#peso_b ⇒ Object
Peso bruto.
41 42 43 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 41 def peso_b @peso_b end |
#peso_l ⇒ Object
Peso líquido.
38 39 40 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 38 def peso_l @peso_l end |
#pot ⇒ Object
Potência máxima do motor do veículo em cavalo vapor (CV). (potência-veículo).
32 33 34 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 32 def pot @pot end |
#tp_comb ⇒ Object
Tipo de combustível-Tabela RENAVAM: 01-Álcool * 02 - Gasolina * 03 - Diesel * 16 - Álcool/Gas * 17 - Gas./Álcool/GNV * 18 - Gasolina/Elétrico
47 48 49 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 47 def tp_comb @tp_comb end |
#tp_op ⇒ Object
Tipo da Operação (1 - Venda concessionária; 2 - Faturamento direto; 3 - Venda direta; 0 - Outros).
20 21 22 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 20 def tp_op @tp_op end |
#tp_pint ⇒ Object
Tipo de pintura.
65 66 67 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 65 def tp_pint @tp_pint end |
#tp_rest ⇒ Object
Restrição * 0 - Não há * 1 - Alienação Fiduciária * 2 - Arrendamento Mercantil * 3 - Reserva de Domínio * 4 - Penhor de Veículos * 9 - outras
89 90 91 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 89 def tp_rest @tp_rest end |
#tp_veic ⇒ Object
Tipo de veículo (utilizar tabela RENAVAM).
68 69 70 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 68 def tp_veic @tp_veic end |
#vin ⇒ Object
Informa-se o veículo tem VIN (chassi) remarcado. * R-Remarcado * N-NormalVIN
74 75 76 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 74 def vin @vin end |
#x_cor ⇒ Object
Descrição da cor.
29 30 31 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 29 def x_cor @x_cor end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 884 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = NuvemfiscalSdkRuby.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
122 123 124 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 122 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 92 def self.attribute_map { :'tp_op' => :'tpOp', :'chassi' => :'chassi', :'c_cor' => :'cCor', :'x_cor' => :'xCor', :'pot' => :'pot', :'cilin' => :'cilin', :'peso_l' => :'pesoL', :'peso_b' => :'pesoB', :'n_serie' => :'nSerie', :'tp_comb' => :'tpComb', :'n_motor' => :'nMotor', :'cmt' => :'CMT', :'dist' => :'dist', :'ano_mod' => :'anoMod', :'ano_fab' => :'anoFab', :'tp_pint' => :'tpPint', :'tp_veic' => :'tpVeic', :'esp_veic' => :'espVeic', :'vin' => :'VIN', :'cond_veic' => :'condVeic', :'c_mod' => :'cMod', :'c_cor_denatran' => :'cCorDENATRAN', :'lota' => :'lota', :'tp_rest' => :'tpRest' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 860 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
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 157 def self.openapi_nullable Set.new([ :'tp_op', :'chassi', :'c_cor', :'x_cor', :'pot', :'cilin', :'peso_l', :'peso_b', :'n_serie', :'tp_comb', :'n_motor', :'cmt', :'dist', :'ano_mod', :'ano_fab', :'tp_pint', :'tp_veic', :'esp_veic', :'vin', :'cond_veic', :'c_mod', :'c_cor_denatran', :'lota', :'tp_rest' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 127 def self.openapi_types { :'tp_op' => :'Integer', :'chassi' => :'String', :'c_cor' => :'String', :'x_cor' => :'String', :'pot' => :'String', :'cilin' => :'String', :'peso_l' => :'String', :'peso_b' => :'String', :'n_serie' => :'String', :'tp_comb' => :'String', :'n_motor' => :'String', :'cmt' => :'String', :'dist' => :'String', :'ano_mod' => :'Integer', :'ano_fab' => :'Integer', :'tp_pint' => :'String', :'tp_veic' => :'Integer', :'esp_veic' => :'Integer', :'vin' => :'String', :'cond_veic' => :'Integer', :'c_mod' => :'String', :'c_cor_denatran' => :'String', :'lota' => :'Integer', :'tp_rest' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 816 def ==(o) return true if self.equal?(o) self.class == o.class && tp_op == o.tp_op && chassi == o.chassi && c_cor == o.c_cor && x_cor == o.x_cor && pot == o.pot && cilin == o.cilin && peso_l == o.peso_l && peso_b == o.peso_b && n_serie == o.n_serie && tp_comb == o.tp_comb && n_motor == o.n_motor && cmt == o.cmt && dist == o.dist && ano_mod == o.ano_mod && ano_fab == o.ano_fab && tp_pint == o.tp_pint && tp_veic == o.tp_veic && esp_veic == o.esp_veic && vin == o.vin && cond_veic == o.cond_veic && c_mod == o.c_mod && c_cor_denatran == o.c_cor_denatran && lota == o.lota && tp_rest == o.tp_rest end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
955 956 957 958 959 960 961 962 963 964 965 966 967 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 955 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
847 848 849 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 847 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
853 854 855 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 853 def hash [tp_op, chassi, c_cor, x_cor, pot, cilin, peso_l, peso_b, n_serie, tp_comb, n_motor, cmt, dist, ano_mod, ano_fab, tp_pint, tp_veic, esp_veic, vin, cond_veic, c_mod, c_cor_denatran, lota, tp_rest].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 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 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 348 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @chassi.to_s.length > 17 invalid_properties.push('invalid value for "chassi", the character length must be smaller than or equal to 17.') end if @c_cor.to_s.length > 4 invalid_properties.push('invalid value for "c_cor", the character length must be smaller than or equal to 4.') end if @c_cor.to_s.length < 1 invalid_properties.push('invalid value for "c_cor", the character length must be great than or equal to 1.') end if @x_cor.to_s.length > 40 invalid_properties.push('invalid value for "x_cor", the character length must be smaller than or equal to 40.') end if @x_cor.to_s.length < 1 invalid_properties.push('invalid value for "x_cor", the character length must be great than or equal to 1.') end if @pot.to_s.length > 4 invalid_properties.push('invalid value for "pot", the character length must be smaller than or equal to 4.') end if @pot.to_s.length < 1 invalid_properties.push('invalid value for "pot", the character length must be great than or equal to 1.') end if @cilin.to_s.length > 4 invalid_properties.push('invalid value for "cilin", the character length must be smaller than or equal to 4.') end if @cilin.to_s.length < 1 invalid_properties.push('invalid value for "cilin", the character length must be great than or equal to 1.') end if @peso_l.to_s.length > 9 invalid_properties.push('invalid value for "peso_l", the character length must be smaller than or equal to 9.') end if @peso_l.to_s.length < 1 invalid_properties.push('invalid value for "peso_l", the character length must be great than or equal to 1.') end if @peso_b.to_s.length > 9 invalid_properties.push('invalid value for "peso_b", the character length must be smaller than or equal to 9.') end if @peso_b.to_s.length < 1 invalid_properties.push('invalid value for "peso_b", the character length must be great than or equal to 1.') end if @n_serie.to_s.length > 9 invalid_properties.push('invalid value for "n_serie", the character length must be smaller than or equal to 9.') end if @n_serie.to_s.length < 1 invalid_properties.push('invalid value for "n_serie", the character length must be great than or equal to 1.') end if @tp_comb.to_s.length > 2 invalid_properties.push('invalid value for "tp_comb", the character length must be smaller than or equal to 2.') end if @tp_comb.to_s.length < 1 invalid_properties.push('invalid value for "tp_comb", the character length must be great than or equal to 1.') end if @n_motor.to_s.length > 21 invalid_properties.push('invalid value for "n_motor", the character length must be smaller than or equal to 21.') end if @n_motor.to_s.length < 1 invalid_properties.push('invalid value for "n_motor", the character length must be great than or equal to 1.') end if @cmt.to_s.length > 9 invalid_properties.push('invalid value for "cmt", the character length must be smaller than or equal to 9.') end if @cmt.to_s.length < 1 invalid_properties.push('invalid value for "cmt", the character length must be great than or equal to 1.') end if @dist.to_s.length > 4 invalid_properties.push('invalid value for "dist", the character length must be smaller than or equal to 4.') end if @dist.to_s.length < 1 invalid_properties.push('invalid value for "dist", the character length must be great than or equal to 1.') end if @ano_mod > 9999 invalid_properties.push('invalid value for "ano_mod", must be smaller than or equal to 9999.') end if @ano_mod < 0 invalid_properties.push('invalid value for "ano_mod", must be greater than or equal to 0.') end if @ano_fab > 9999 invalid_properties.push('invalid value for "ano_fab", must be smaller than or equal to 9999.') end if @ano_fab < 0 invalid_properties.push('invalid value for "ano_fab", must be greater than or equal to 0.') end if @tp_pint.to_s.length > 1 invalid_properties.push('invalid value for "tp_pint", the character length must be smaller than or equal to 1.') end if @tp_veic > 99 invalid_properties.push('invalid value for "tp_veic", must be smaller than or equal to 99.') end if @tp_veic < 0 invalid_properties.push('invalid value for "tp_veic", must be greater than or equal to 0.') end if @esp_veic > 9 invalid_properties.push('invalid value for "esp_veic", must be smaller than or equal to 9.') end if @esp_veic < 0 invalid_properties.push('invalid value for "esp_veic", must be greater than or equal to 0.') end if @vin.to_s.length > 1 invalid_properties.push('invalid value for "vin", the character length must be smaller than or equal to 1.') end if @c_cor_denatran.to_s.length > 2 invalid_properties.push('invalid value for "c_cor_denatran", the character length must be smaller than or equal to 2.') end if @c_cor_denatran.to_s.length < 1 invalid_properties.push('invalid value for "c_cor_denatran", the character length must be great than or equal to 1.') end if @lota > 999 invalid_properties.push('invalid value for "lota", must be smaller than or equal to 999.') end if @lota < 0 invalid_properties.push('invalid value for "lota", must be greater than or equal to 0.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
931 932 933 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 931 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
937 938 939 940 941 942 943 944 945 946 947 948 949 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 937 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 |
#to_s ⇒ String
Returns the string representation of the object
925 926 927 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 925 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_veic_prod.rb', line 504 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @chassi.to_s.length > 17 return false if @c_cor.to_s.length > 4 return false if @c_cor.to_s.length < 1 return false if @x_cor.to_s.length > 40 return false if @x_cor.to_s.length < 1 return false if @pot.to_s.length > 4 return false if @pot.to_s.length < 1 return false if @cilin.to_s.length > 4 return false if @cilin.to_s.length < 1 return false if @peso_l.to_s.length > 9 return false if @peso_l.to_s.length < 1 return false if @peso_b.to_s.length > 9 return false if @peso_b.to_s.length < 1 return false if @n_serie.to_s.length > 9 return false if @n_serie.to_s.length < 1 return false if @tp_comb.to_s.length > 2 return false if @tp_comb.to_s.length < 1 return false if @n_motor.to_s.length > 21 return false if @n_motor.to_s.length < 1 return false if @cmt.to_s.length > 9 return false if @cmt.to_s.length < 1 return false if @dist.to_s.length > 4 return false if @dist.to_s.length < 1 return false if @ano_mod > 9999 return false if @ano_mod < 0 return false if @ano_fab > 9999 return false if @ano_fab < 0 return false if @tp_pint.to_s.length > 1 return false if @tp_veic > 99 return false if @tp_veic < 0 return false if @esp_veic > 9 return false if @esp_veic < 0 return false if @vin.to_s.length > 1 return false if @c_cor_denatran.to_s.length > 2 return false if @c_cor_denatran.to_s.length < 1 return false if @lota > 999 return false if @lota < 0 true end |