Class: NFe::Emitente

Inherits:
EntidadeNFe show all
Defined in:
lib/nfe/entidades/infNFe/emit/emitente.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from EntidadeNFe

nfe_attr, #nfe_attributes, nfe_attrs, #serialize, #to_nfe, #to_nfe_xml, #to_xml, xml_accessor, #xml_to_hash

Instance Attribute Details

#CNAEObject

Returns the value of attribute CNAE.



9
10
11
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 9

def CNAE
  @CNAE
end

#CNPJObject

Returns the value of attribute CNPJ.



4
5
6
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 4

def CNPJ
  @CNPJ
end

#CRTObject

Returns the value of attribute CRT.



10
11
12
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 10

def CRT
  @CRT
end

#endereco_emitenteObject

Returns the value of attribute endereco_emitente.



11
12
13
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 11

def endereco_emitente
  @endereco_emitente
end

#enderEmitObject

Returns the value of attribute enderEmit.



6
7
8
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 6

def enderEmit
  @enderEmit
end

#IEObject

Returns the value of attribute IE.



7
8
9
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 7

def IE
  @IE
end

#IMObject

Returns the value of attribute IM.



8
9
10
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 8

def IM
  @IM
end

#xNomeObject

Returns the value of attribute xNome.



5
6
7
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 5

def xNome
  @xNome
end

Instance Method Details

#attributesObject



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 17

def attributes
  @attributes = {
      "CNPJ" => CNPJ,
      "xNome" => xNome,
      "enderEmit" => enderEmit,
      "IE" => IE,
      "IM" => IM,
      "CNAE" => CNAE,
      "CRT" => CRT,
    }
  #@endereco_emitente = @endereco_emitente.serealize(enderEmit)
end

#attributes=(params) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 30

def attributes=(params)
  @attributes = {
      "CNPJ" => params["CNPJ"],
      "xNome" => params["xNome"],
      "enderEmit" => params["enderEmit"],
      "IE" => params["IE"],
      "IM" => params["IM"],
      "CNAE" => params["CNAE"],
      "CRT" => params["CRT"]
    }
end

#initializerObject



13
14
15
# File 'lib/nfe/entidades/infNFe/emit/emitente.rb', line 13

def initializer
  self.endereco_emitente = NFe::EnderecoEmitente.new
end