Class: NuvemfiscalSdkRuby::MdfeSefazIde
- Inherits:
-
Object
- Object
- NuvemfiscalSdkRuby::MdfeSefazIde
- Defined in:
- lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb
Overview
Identificação do MDF-e.
Instance Attribute Summary collapse
-
#c_dv ⇒ Object
Digito verificador da chave de acesso do Manifesto.
-
#c_mdf ⇒ Object
Código numérico que compõe a Chave de Acesso.
-
#c_uf ⇒ Object
Código da UF do emitente do MDF-e.
-
#dh_emi ⇒ Object
Data e hora de emissão do Manifesto.
-
#dh_ini_viagem ⇒ Object
Data e hora previstos de inicio da viagem.
-
#ind_canal_verde ⇒ Object
Indicador de participação do Canal Verde.
-
#ind_carrega_posterior ⇒ Object
Indicador de MDF-e com inclusão da Carga posterior a emissão por evento de inclusão de DF-e.
-
#inf_mun_carrega ⇒ Object
Returns the value of attribute inf_mun_carrega.
-
#inf_percurso ⇒ Object
Returns the value of attribute inf_percurso.
-
#mod ⇒ Object
Modelo do Manifesto Eletrônico.
-
#modal ⇒ Object
Modalidade de transporte.
-
#n_mdf ⇒ Object
Número do Manifesto.
-
#proc_emi ⇒ Object
Identificação do processo de emissão do Manifesto.
-
#serie ⇒ Object
Série do Manifesto.
-
#tp_amb ⇒ Object
Tipo do Ambiente.
-
#tp_emis ⇒ Object
Forma de emissão do Manifesto.
-
#tp_emit ⇒ Object
Tipo do Emitente.
-
#tp_transp ⇒ Object
Tipo do Transportador.
-
#uf_fim ⇒ Object
Sigla da UF do Descarregamento.
-
#uf_ini ⇒ Object
Sigla da UF do Carregamento.
-
#ver_proc ⇒ Object
Versão do processo de emissão.
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 = {}) ⇒ MdfeSefazIde
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 = {}) ⇒ MdfeSefazIde
Initializes the object
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 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 166 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NuvemfiscalSdkRuby::MdfeSefazIde` 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::MdfeSefazIde`. 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?(:'c_uf') self.c_uf = attributes[:'c_uf'] else self.c_uf = nil end if attributes.key?(:'tp_amb') self.tp_amb = attributes[:'tp_amb'] end if attributes.key?(:'tp_emit') self.tp_emit = attributes[:'tp_emit'] else self.tp_emit = nil end if attributes.key?(:'tp_transp') self.tp_transp = attributes[:'tp_transp'] end if attributes.key?(:'mod') self.mod = attributes[:'mod'] end if attributes.key?(:'serie') self.serie = attributes[:'serie'] else self.serie = nil end if attributes.key?(:'n_mdf') self.n_mdf = attributes[:'n_mdf'] else self.n_mdf = nil end if attributes.key?(:'c_mdf') self.c_mdf = attributes[:'c_mdf'] end if attributes.key?(:'c_dv') self.c_dv = attributes[:'c_dv'] end if attributes.key?(:'modal') self.modal = attributes[:'modal'] else self.modal = nil end if attributes.key?(:'dh_emi') self.dh_emi = attributes[:'dh_emi'] else self.dh_emi = nil end if attributes.key?(:'tp_emis') self.tp_emis = attributes[:'tp_emis'] else self.tp_emis = nil end if attributes.key?(:'proc_emi') self.proc_emi = attributes[:'proc_emi'] else self.proc_emi = nil end if attributes.key?(:'ver_proc') self.ver_proc = attributes[:'ver_proc'] else self.ver_proc = nil end if attributes.key?(:'uf_ini') self.uf_ini = attributes[:'uf_ini'] else self.uf_ini = nil end if attributes.key?(:'uf_fim') self.uf_fim = attributes[:'uf_fim'] else self.uf_fim = nil end if attributes.key?(:'inf_mun_carrega') if (value = attributes[:'inf_mun_carrega']).is_a?(Array) self.inf_mun_carrega = value end else self.inf_mun_carrega = nil end if attributes.key?(:'inf_percurso') if (value = attributes[:'inf_percurso']).is_a?(Array) self.inf_percurso = value end end if attributes.key?(:'dh_ini_viagem') self.dh_ini_viagem = attributes[:'dh_ini_viagem'] end if attributes.key?(:'ind_canal_verde') self.ind_canal_verde = attributes[:'ind_canal_verde'] end if attributes.key?(:'ind_carrega_posterior') self.ind_carrega_posterior = attributes[:'ind_carrega_posterior'] end end |
Instance Attribute Details
#c_dv ⇒ Object
Digito verificador da chave de acesso do Manifesto. Informar o dígito de controle da chave de acesso do MDF-e, que deve ser calculado com a aplicação do algoritmo módulo 11 (base 2,9) da chave de acesso. *Geramos automaticamente quando nenhum valor é informado.*
44 45 46 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 44 def c_dv @c_dv end |
#c_mdf ⇒ Object
Código numérico que compõe a Chave de Acesso. Código aleatório gerado pelo emitente, com o objetivo de evitar acessos indevidos ao documento. *Geramos automaticamente quando nenhum valor é informado.*
41 42 43 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 41 def c_mdf @c_mdf end |
#c_uf ⇒ Object
Código da UF do emitente do MDF-e. Código da UF do emitente do Documento Fiscal. Utilizar a Tabela do IBGE de código de unidades da federação.
20 21 22 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 20 def c_uf @c_uf end |
#dh_emi ⇒ Object
Data e hora de emissão do Manifesto. Formato AAAA-MM-DDTHH:MM:DD TZD.
50 51 52 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 50 def dh_emi @dh_emi end |
#dh_ini_viagem ⇒ Object
Data e hora previstos de inicio da viagem. Formato AAAA-MM-DDTHH:MM:DD TZD.
72 73 74 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 72 def dh_ini_viagem @dh_ini_viagem end |
#ind_canal_verde ⇒ Object
Indicador de participação do Canal Verde.
75 76 77 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 75 def ind_canal_verde @ind_canal_verde end |
#ind_carrega_posterior ⇒ Object
Indicador de MDF-e com inclusão da Carga posterior a emissão por evento de inclusão de DF-e.
78 79 80 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 78 def ind_carrega_posterior @ind_carrega_posterior end |
#inf_mun_carrega ⇒ Object
Returns the value of attribute inf_mun_carrega.
67 68 69 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 67 def inf_mun_carrega @inf_mun_carrega end |
#inf_percurso ⇒ Object
Returns the value of attribute inf_percurso.
69 70 71 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 69 def inf_percurso @inf_percurso end |
#mod ⇒ Object
Modelo do Manifesto Eletrônico. Utilizar o código 58 para identificação do MDF-e.
32 33 34 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 32 def mod @mod end |
#modal ⇒ Object
Modalidade de transporte. * 1 - Rodoviário * 2 - Aéreo * 3 - Aquaviário * 4 - Ferroviário
47 48 49 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 47 def modal @modal end |
#n_mdf ⇒ Object
Número do Manifesto. Número que identifica o Manifesto. 1 a 999999999.
38 39 40 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 38 def n_mdf @n_mdf end |
#proc_emi ⇒ Object
Identificação do processo de emissão do Manifesto. * 0 - emissão de MDF-e com aplicativo do contribuinte
56 57 58 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 56 def proc_emi @proc_emi end |
#serie ⇒ Object
Série do Manifesto. Informar a série do documento fiscal (informar zero se inexistente). Série na faixa [920-969]: Reservada para emissão por contribuinte pessoa física com inscrição estadual.
35 36 37 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 35 def serie @serie end |
#tp_amb ⇒ Object
Tipo do Ambiente. * 1 - Produção * 2 - Homologação
23 24 25 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 23 def tp_amb @tp_amb end |
#tp_emis ⇒ Object
Forma de emissão do Manifesto. * 1 - Normal * 2 - Contingência * 3 - Regime Especial NFF
53 54 55 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 53 def tp_emis @tp_emis end |
#tp_emit ⇒ Object
Tipo do Emitente. * 1 - Prestador de serviço de transporte * 2 - Transportador de Carga Própria 3 - Prestador de serviço de transporte que emitirá CT-e Globalizado OBS: Deve ser preenchido com 2 para emitentes de NF-e e pelas transportadoras quando estiverem fazendo transporte de carga própria. Deve ser preenchido com 3 para transportador de carga que emitirá à posteriori CT-e Globalizado relacionando as NF-e.
26 27 28 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 26 def tp_emit @tp_emit end |
#tp_transp ⇒ Object
Tipo do Transportador. * 1 - ETC * 2 - TAC * 3 - CTC
29 30 31 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 29 def tp_transp @tp_transp end |
#uf_fim ⇒ Object
Sigla da UF do Descarregamento. Utilizar a Tabela do IBGE de código de unidades da federação. Informar ‘EX’ para operações com o exterior.
65 66 67 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 65 def uf_fim @uf_fim end |
#uf_ini ⇒ Object
Sigla da UF do Carregamento. Utilizar a Tabela do IBGE de código de unidades da federação. Informar ‘EX’ para operações com o exterior.
62 63 64 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 62 def uf_ini @uf_ini end |
#ver_proc ⇒ Object
Versão do processo de emissão. Informar a versão do aplicativo emissor de MDF-e.
59 60 61 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 59 def ver_proc @ver_proc end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 522 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
108 109 110 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 108 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 81 def self.attribute_map { :'c_uf' => :'cUF', :'tp_amb' => :'tpAmb', :'tp_emit' => :'tpEmit', :'tp_transp' => :'tpTransp', :'mod' => :'mod', :'serie' => :'serie', :'n_mdf' => :'nMDF', :'c_mdf' => :'cMDF', :'c_dv' => :'cDV', :'modal' => :'modal', :'dh_emi' => :'dhEmi', :'tp_emis' => :'tpEmis', :'proc_emi' => :'procEmi', :'ver_proc' => :'verProc', :'uf_ini' => :'UFIni', :'uf_fim' => :'UFFim', :'inf_mun_carrega' => :'infMunCarrega', :'inf_percurso' => :'infPercurso', :'dh_ini_viagem' => :'dhIniViagem', :'ind_canal_verde' => :'indCanalVerde', :'ind_carrega_posterior' => :'indCarregaPosterior' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 498 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
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 140 def self.openapi_nullable Set.new([ :'c_uf', :'tp_amb', :'tp_emit', :'tp_transp', :'mod', :'serie', :'n_mdf', :'c_mdf', :'c_dv', :'modal', :'dh_emi', :'tp_emis', :'proc_emi', :'ver_proc', :'uf_ini', :'uf_fim', :'dh_ini_viagem', :'ind_canal_verde', :'ind_carrega_posterior' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 113 def self.openapi_types { :'c_uf' => :'Integer', :'tp_amb' => :'Integer', :'tp_emit' => :'Integer', :'tp_transp' => :'Integer', :'mod' => :'Integer', :'serie' => :'Integer', :'n_mdf' => :'Integer', :'c_mdf' => :'String', :'c_dv' => :'Integer', :'modal' => :'Integer', :'dh_emi' => :'Time', :'tp_emis' => :'Integer', :'proc_emi' => :'String', :'ver_proc' => :'String', :'uf_ini' => :'String', :'uf_fim' => :'String', :'inf_mun_carrega' => :'Array<MdfeSefazInfMunCarrega>', :'inf_percurso' => :'Array<MdfeSefazInfPercurso>', :'dh_ini_viagem' => :'Time', :'ind_canal_verde' => :'Integer', :'ind_carrega_posterior' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 457 def ==(o) return true if self.equal?(o) self.class == o.class && c_uf == o.c_uf && tp_amb == o.tp_amb && tp_emit == o.tp_emit && tp_transp == o.tp_transp && mod == o.mod && serie == o.serie && n_mdf == o.n_mdf && c_mdf == o.c_mdf && c_dv == o.c_dv && modal == o.modal && dh_emi == o.dh_emi && tp_emis == o.tp_emis && proc_emi == o.proc_emi && ver_proc == o.ver_proc && uf_ini == o.uf_ini && uf_fim == o.uf_fim && inf_mun_carrega == o.inf_mun_carrega && inf_percurso == o.inf_percurso && dh_ini_viagem == o.dh_ini_viagem && ind_canal_verde == o.ind_canal_verde && ind_carrega_posterior == o.ind_carrega_posterior end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
593 594 595 596 597 598 599 600 601 602 603 604 605 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 593 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
485 486 487 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 485 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
491 492 493 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 491 def hash [c_uf, tp_amb, tp_emit, tp_transp, mod, serie, n_mdf, c_mdf, c_dv, modal, dh_emi, tp_emis, proc_emi, ver_proc, uf_ini, uf_fim, inf_mun_carrega, inf_percurso, dh_ini_viagem, ind_canal_verde, ind_carrega_posterior].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 345 346 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 294 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @serie > 999 invalid_properties.push('invalid value for "serie", must be smaller than or equal to 999.') end if @serie < 0 invalid_properties.push('invalid value for "serie", must be greater than or equal to 0.') end if @n_mdf > 999999999 invalid_properties.push('invalid value for "n_mdf", must be smaller than or equal to 999999999.') end if @n_mdf < 1 invalid_properties.push('invalid value for "n_mdf", must be greater than or equal to 1.') end if !@c_dv.nil? && @c_dv > 9 invalid_properties.push('invalid value for "c_dv", must be smaller than or equal to 9.') end if !@c_dv.nil? && @c_dv < 0 invalid_properties.push('invalid value for "c_dv", must be greater than or equal to 0.') end if @ver_proc.to_s.length > 20 invalid_properties.push('invalid value for "ver_proc", the character length must be smaller than or equal to 20.') end if @ver_proc.to_s.length < 1 invalid_properties.push('invalid value for "ver_proc", the character length must be great than or equal to 1.') end if @inf_mun_carrega.nil? invalid_properties.push('invalid value for "inf_mun_carrega", inf_mun_carrega cannot be nil.') end if @inf_mun_carrega.length > 50 invalid_properties.push('invalid value for "inf_mun_carrega", number of items must be less than or equal to 50.') end if @inf_mun_carrega.length < 1 invalid_properties.push('invalid value for "inf_mun_carrega", number of items must be greater than or equal to 1.') end if !@inf_percurso.nil? && @inf_percurso.length > 25 invalid_properties.push('invalid value for "inf_percurso", number of items must be less than or equal to 25.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
569 570 571 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 569 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 575 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
563 564 565 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 563 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/nuvemfiscal_sdk_ruby/models/mdfe_sefaz_ide.rb', line 350 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @serie > 999 return false if @serie < 0 return false if @n_mdf > 999999999 return false if @n_mdf < 1 return false if !@c_dv.nil? && @c_dv > 9 return false if !@c_dv.nil? && @c_dv < 0 return false if @ver_proc.to_s.length > 20 return false if @ver_proc.to_s.length < 1 return false if @inf_mun_carrega.nil? return false if @inf_mun_carrega.length > 50 return false if @inf_mun_carrega.length < 1 return false if !@inf_percurso.nil? && @inf_percurso.length > 25 true end |