Class: NuvemfiscalSdkRuby::NfeSefazIde
- Inherits:
-
Object
- Object
- NuvemfiscalSdkRuby::NfeSefazIde
- Defined in:
- lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb
Overview
identificação da NF-e.
Instance Attribute Summary collapse
-
#c_dv ⇒ Object
Digito Verificador da Chave de Acesso da NF-e.
-
#c_mun_fg ⇒ Object
Código do Município de Ocorrência do Fato Gerador (utilizar a tabela do IBGE).
-
#c_nf ⇒ Object
Código numérico que compõe a Chave de Acesso.
-
#c_uf ⇒ Object
Código da UF do emitente do Documento Fiscal.
-
#dh_cont ⇒ Object
Informar a data e hora de entrada em contingência contingência no formato (AAAA-MM-DDThh:mm:ssTZD) ex.: 2012-09-01T13:00:00-03:00.
-
#dh_emi ⇒ Object
Data e Hora de emissão do Documento Fiscal (AAAA-MM-DDThh:mm:ssTZD) ex.: 2012-09-01T13:00:00-03:00.
-
#dh_sai_ent ⇒ Object
Data e Hora da saída ou de entrada da mercadoria / produto (AAAA-MM-DDTHH:mm:ssTZD).
-
#fin_nfe ⇒ Object
Finalidade da emissão da NF-e: * 1 - NFe normal * 2 - NFe complementar * 3 - NFe de ajuste * 4 - Devolução/Retorno.
-
#id_dest ⇒ Object
Identificador de Local de destino da operação: * 1 - Interna * 2 - Interestadual * 3 - Exterior.
-
#ind_final ⇒ Object
Indica operação com consumidor final: * 0 - Não * 1 - Consumidor Final.
-
#ind_intermed ⇒ Object
Indicador de intermediador/marketplace * 0 - Operação sem intermediador (em site ou plataforma própria) * 1 - Operação em site ou plataforma de terceiros (intermediadores/marketplace).
-
#ind_pres ⇒ Object
Indicador de presença do comprador no estabelecimento comercial no momento da operação: * 0 - Não se aplica (ex.: Nota Fiscal complementar ou de ajuste) * 1 - Operação presencial * 2 - Não presencial, internet * 3 - Não presencial, teleatendimento * 4 - NFC-e entrega em domicílio * 5 - Operação presencial, fora do estabelecimento * 9 - Não presencial, outros.
-
#mod ⇒ Object
Código do modelo do Documento Fiscal: * 55 - NF-e * 65 - NFC-e.
-
#n_fref ⇒ Object
Returns the value of attribute n_fref.
-
#n_nf ⇒ Object
Número do Documento Fiscal.
-
#nat_op ⇒ Object
Descrição da Natureza da Operação.
-
#proc_emi ⇒ Object
Processo de emissão utilizado com a seguinte codificação: * 0 - emissão de NF-e com aplicativo do contribuinte * 1 - emissão de NF-e avulsa pelo Fisco * 2 - emissão de NF-e avulsa, pelo contribuinte com seu certificado digital, através do site do Fisco * 3 - emissão de NF-e pelo contribuinte com aplicativo fornecido pelo Fisco.
-
#serie ⇒ Object
Série do Documento Fiscal: * Série normal 0-889 * Avulsa Fisco 890-899 * SCAN 900-999.
-
#tp_amb ⇒ Object
Identificação do Ambiente: * 1 - Produção * 2 - Homologação.
-
#tp_emis ⇒ Object
Forma de emissão da NF-e * 1 - Normal * 2 - Contingência FS * 3 - Regime Especial NFF (NT 2021.002) * 4 - Contingência DPEC * 5 - Contingência FSDA * 6 - Contingência SVC - AN * 7 - Contingência SVC - RS * 9 - Contingência off-line NFC-e.
-
#tp_imp ⇒ Object
Formato de impressão do DANFE: * 0 - Sem DANFE * 1 - DANFe Retrato * 2 - DANFe Paisagem * 3 - DANFe Simplificado * 4 - DANFe NFC-e * 5 - DANFe NFC-e em mensagem eletrônica.
-
#tp_nf ⇒ Object
Tipo do Documento Fiscal: * 0 - Entrada * 1 - Saída.
-
#ver_proc ⇒ Object
versão do aplicativo utilizado no processo de emissão.
-
#x_just ⇒ Object
Informar a Justificativa da entrada.
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 = {}) ⇒ NfeSefazIde
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 = {}) ⇒ NfeSefazIde
Initializes the object
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 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 186 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NuvemfiscalSdkRuby::NfeSefazIde` 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::NfeSefazIde`. 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?(:'c_nf') self.c_nf = attributes[:'c_nf'] end if attributes.key?(:'nat_op') self.nat_op = attributes[:'nat_op'] else self.nat_op = nil 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_nf') self.n_nf = attributes[:'n_nf'] else self.n_nf = nil end if attributes.key?(:'dh_emi') self.dh_emi = attributes[:'dh_emi'] else self.dh_emi = nil end if attributes.key?(:'dh_sai_ent') self.dh_sai_ent = attributes[:'dh_sai_ent'] end if attributes.key?(:'tp_nf') self.tp_nf = attributes[:'tp_nf'] else self.tp_nf = nil end if attributes.key?(:'id_dest') self.id_dest = attributes[:'id_dest'] else self.id_dest = nil end if attributes.key?(:'c_mun_fg') self.c_mun_fg = attributes[:'c_mun_fg'] else self.c_mun_fg = nil end if attributes.key?(:'tp_imp') self.tp_imp = attributes[:'tp_imp'] else self.tp_imp = nil end if attributes.key?(:'tp_emis') self.tp_emis = attributes[:'tp_emis'] else self.tp_emis = nil end if attributes.key?(:'c_dv') self.c_dv = attributes[:'c_dv'] end if attributes.key?(:'tp_amb') self.tp_amb = attributes[:'tp_amb'] end if attributes.key?(:'fin_nfe') self.fin_nfe = attributes[:'fin_nfe'] else self.fin_nfe = nil end if attributes.key?(:'ind_final') self.ind_final = attributes[:'ind_final'] else self.ind_final = nil end if attributes.key?(:'ind_pres') self.ind_pres = attributes[:'ind_pres'] else self.ind_pres = nil end if attributes.key?(:'ind_intermed') self.ind_intermed = attributes[:'ind_intermed'] 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?(:'dh_cont') self.dh_cont = attributes[:'dh_cont'] end if attributes.key?(:'x_just') self.x_just = attributes[:'x_just'] end if attributes.key?(:'n_fref') if (value = attributes[:'n_fref']).is_a?(Array) self.n_fref = value end end end |
Instance Attribute Details
#c_dv ⇒ Object
Digito Verificador da Chave de Acesso da NF-e. *Geramos automaticamente quando nenhum valor é informado.*
59 60 61 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 59 def c_dv @c_dv end |
#c_mun_fg ⇒ Object
Código do Município de Ocorrência do Fato Gerador (utilizar a tabela do IBGE).
50 51 52 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 50 def c_mun_fg @c_mun_fg end |
#c_nf ⇒ Object
Código numérico que compõe a Chave de Acesso. Número aleatório gerado pelo emitente para cada NF-e. *Geramos automaticamente quando nenhum valor é informado.*
23 24 25 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 23 def c_nf @c_nf end |
#c_uf ⇒ Object
Código da UF do emitente do Documento Fiscal. Utilizar a Tabela do IBGE.
20 21 22 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 20 def c_uf @c_uf end |
#dh_cont ⇒ Object
Informar a data e hora de entrada em contingência contingência no formato (AAAA-MM-DDThh:mm:ssTZD) ex.: 2012-09-01T13:00:00-03:00.
83 84 85 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 83 def dh_cont @dh_cont end |
#dh_emi ⇒ Object
Data e Hora de emissão do Documento Fiscal (AAAA-MM-DDThh:mm:ssTZD) ex.: 2012-09-01T13:00:00-03:00.
38 39 40 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 38 def dh_emi @dh_emi end |
#dh_sai_ent ⇒ Object
Data e Hora da saída ou de entrada da mercadoria / produto (AAAA-MM-DDTHH:mm:ssTZD).
41 42 43 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 41 def dh_sai_ent @dh_sai_ent end |
#fin_nfe ⇒ Object
Finalidade da emissão da NF-e: * 1 - NFe normal * 2 - NFe complementar * 3 - NFe de ajuste * 4 - Devolução/Retorno
65 66 67 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 65 def fin_nfe @fin_nfe end |
#id_dest ⇒ Object
Identificador de Local de destino da operação: * 1 - Interna * 2 - Interestadual * 3 - Exterior
47 48 49 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 47 def id_dest @id_dest end |
#ind_final ⇒ Object
Indica operação com consumidor final: * 0 - Não * 1 - Consumidor Final
68 69 70 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 68 def ind_final @ind_final end |
#ind_intermed ⇒ Object
Indicador de intermediador/marketplace * 0 - Operação sem intermediador (em site ou plataforma própria) * 1 - Operação em site ou plataforma de terceiros (intermediadores/marketplace)
74 75 76 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 74 def ind_intermed @ind_intermed end |
#ind_pres ⇒ Object
Indicador de presença do comprador no estabelecimento comercial no momento da operação: * 0 - Não se aplica (ex.: Nota Fiscal complementar ou de ajuste) * 1 - Operação presencial * 2 - Não presencial, internet * 3 - Não presencial, teleatendimento * 4 - NFC-e entrega em domicílio * 5 - Operação presencial, fora do estabelecimento * 9 - Não presencial, outros
71 72 73 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 71 def ind_pres @ind_pres end |
#mod ⇒ Object
Código do modelo do Documento Fiscal: * 55 - NF-e * 65 - NFC-e
29 30 31 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 29 def mod @mod end |
#n_fref ⇒ Object
Returns the value of attribute n_fref.
88 89 90 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 88 def n_fref @n_fref end |
#n_nf ⇒ Object
Número do Documento Fiscal.
35 36 37 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 35 def n_nf @n_nf end |
#nat_op ⇒ Object
Descrição da Natureza da Operação.
26 27 28 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 26 def nat_op @nat_op end |
#proc_emi ⇒ Object
Processo de emissão utilizado com a seguinte codificação: * 0 - emissão de NF-e com aplicativo do contribuinte * 1 - emissão de NF-e avulsa pelo Fisco * 2 - emissão de NF-e avulsa, pelo contribuinte com seu certificado digital, através do site do Fisco * 3 - emissão de NF-e pelo contribuinte com aplicativo fornecido pelo Fisco
77 78 79 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 77 def proc_emi @proc_emi end |
#serie ⇒ Object
Série do Documento Fiscal: * Série normal 0-889 * Avulsa Fisco 890-899 * SCAN 900-999
32 33 34 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 32 def serie @serie end |
#tp_amb ⇒ Object
Identificação do Ambiente: * 1 - Produção * 2 - Homologação
62 63 64 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 62 def tp_amb @tp_amb end |
#tp_emis ⇒ Object
Forma de emissão da NF-e * 1 - Normal * 2 - Contingência FS * 3 - Regime Especial NFF (NT 2021.002) * 4 - Contingência DPEC * 5 - Contingência FSDA * 6 - Contingência SVC - AN * 7 - Contingência SVC - RS * 9 - Contingência off-line NFC-e
56 57 58 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 56 def tp_emis @tp_emis end |
#tp_imp ⇒ Object
Formato de impressão do DANFE: * 0 - Sem DANFE * 1 - DANFe Retrato * 2 - DANFe Paisagem * 3 - DANFe Simplificado * 4 - DANFe NFC-e * 5 - DANFe NFC-e em mensagem eletrônica
53 54 55 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 53 def tp_imp @tp_imp end |
#tp_nf ⇒ Object
Tipo do Documento Fiscal: * 0 - Entrada * 1 - Saída
44 45 46 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 44 def tp_nf @tp_nf end |
#ver_proc ⇒ Object
versão do aplicativo utilizado no processo de emissão.
80 81 82 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 80 def ver_proc @ver_proc end |
#x_just ⇒ Object
Informar a Justificativa da entrada.
86 87 88 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 86 def x_just @x_just end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 576 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
121 122 123 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 121 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
91 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 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 91 def self.attribute_map { :'c_uf' => :'cUF', :'c_nf' => :'cNF', :'nat_op' => :'natOp', :'mod' => :'mod', :'serie' => :'serie', :'n_nf' => :'nNF', :'dh_emi' => :'dhEmi', :'dh_sai_ent' => :'dhSaiEnt', :'tp_nf' => :'tpNF', :'id_dest' => :'idDest', :'c_mun_fg' => :'cMunFG', :'tp_imp' => :'tpImp', :'tp_emis' => :'tpEmis', :'c_dv' => :'cDV', :'tp_amb' => :'tpAmb', :'fin_nfe' => :'finNFe', :'ind_final' => :'indFinal', :'ind_pres' => :'indPres', :'ind_intermed' => :'indIntermed', :'proc_emi' => :'procEmi', :'ver_proc' => :'verProc', :'dh_cont' => :'dhCont', :'x_just' => :'xJust', :'n_fref' => :'NFref' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 552 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
156 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 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 156 def self.openapi_nullable Set.new([ :'c_uf', :'c_nf', :'nat_op', :'mod', :'serie', :'n_nf', :'dh_emi', :'dh_sai_ent', :'tp_nf', :'id_dest', :'c_mun_fg', :'tp_imp', :'tp_emis', :'c_dv', :'tp_amb', :'fin_nfe', :'ind_final', :'ind_pres', :'ind_intermed', :'proc_emi', :'ver_proc', :'dh_cont', :'x_just', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 126 def self.openapi_types { :'c_uf' => :'Integer', :'c_nf' => :'String', :'nat_op' => :'String', :'mod' => :'Integer', :'serie' => :'Integer', :'n_nf' => :'Integer', :'dh_emi' => :'Time', :'dh_sai_ent' => :'Time', :'tp_nf' => :'Integer', :'id_dest' => :'Integer', :'c_mun_fg' => :'String', :'tp_imp' => :'Integer', :'tp_emis' => :'Integer', :'c_dv' => :'Integer', :'tp_amb' => :'Integer', :'fin_nfe' => :'Integer', :'ind_final' => :'Integer', :'ind_pres' => :'Integer', :'ind_intermed' => :'Integer', :'proc_emi' => :'Integer', :'ver_proc' => :'String', :'dh_cont' => :'Time', :'x_just' => :'String', :'n_fref' => :'Array<NfeSefazNFref>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 508 def ==(o) return true if self.equal?(o) self.class == o.class && c_uf == o.c_uf && c_nf == o.c_nf && nat_op == o.nat_op && mod == o.mod && serie == o.serie && n_nf == o.n_nf && dh_emi == o.dh_emi && dh_sai_ent == o.dh_sai_ent && tp_nf == o.tp_nf && id_dest == o.id_dest && c_mun_fg == o.c_mun_fg && tp_imp == o.tp_imp && tp_emis == o.tp_emis && c_dv == o.c_dv && tp_amb == o.tp_amb && fin_nfe == o.fin_nfe && ind_final == o.ind_final && ind_pres == o.ind_pres && ind_intermed == o.ind_intermed && proc_emi == o.proc_emi && ver_proc == o.ver_proc && dh_cont == o.dh_cont && x_just == o.x_just && n_fref == o.n_fref end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
647 648 649 650 651 652 653 654 655 656 657 658 659 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 647 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
539 540 541 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 539 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
545 546 547 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 545 def hash [c_uf, c_nf, nat_op, mod, serie, n_nf, dh_emi, dh_sai_ent, tp_nf, id_dest, c_mun_fg, tp_imp, tp_emis, c_dv, tp_amb, fin_nfe, ind_final, ind_pres, ind_intermed, proc_emi, ver_proc, dh_cont, x_just, n_fref].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 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 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 330 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @nat_op.to_s.length > 60 invalid_properties.push('invalid value for "nat_op", the character length must be smaller than or equal to 60.') end if @nat_op.to_s.length < 1 invalid_properties.push('invalid value for "nat_op", the character length must be great than or equal to 1.') end 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_nf > 999999999 invalid_properties.push('invalid value for "n_nf", must be smaller than or equal to 999999999.') end if @n_nf < 1 invalid_properties.push('invalid value for "n_nf", 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 !@x_just.nil? && @x_just.to_s.length > 256 invalid_properties.push('invalid value for "x_just", the character length must be smaller than or equal to 256.') end if !@x_just.nil? && @x_just.to_s.length < 15 invalid_properties.push('invalid value for "x_just", the character length must be great than or equal to 15.') end if !@n_fref.nil? && @n_fref.length > 999 invalid_properties.push('invalid value for "n_fref", number of items must be less than or equal to 999.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
623 624 625 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 623 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
629 630 631 632 633 634 635 636 637 638 639 640 641 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 629 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
617 618 619 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 617 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/nuvemfiscal_sdk_ruby/models/nfe_sefaz_ide.rb', line 390 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @nat_op.to_s.length > 60 return false if @nat_op.to_s.length < 1 return false if @serie > 999 return false if @serie < 0 return false if @n_nf > 999999999 return false if @n_nf < 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 !@x_just.nil? && @x_just.to_s.length > 256 return false if !@x_just.nil? && @x_just.to_s.length < 15 return false if !@n_fref.nil? && @n_fref.length > 999 true end |