Class: RubyXmlNfe::Ide

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_xml_nfe/ide.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ Ide

Returns a new instance of Ide.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/ruby_xml_nfe/ide.rb', line 8

def initialize(xml, params)
  @xml = xml
  @cUF = params[:cUF]
  @cNF = params[:cNF]
  @natOp = params[:natOp]
  @mod = params[:mod]
  @serie = params[:serie]
  @nNF = params[:nNF]
  @dhEmi = params[:dhEmi]
  @dhSaiEnt = params[:dhSaiEnt]
  @tpNF = params[:tpNF]
  @idDest = params[:idDest]
  @cMunFG = params[:cMunFG]
  @tpImp = params[:tpImp]
  @tpEmis = params[:tpEmis]
  @cDV = params[:cDV]
  @tpAmb = params[:tpAmb]
  @finNFe = params[:finNFe]
  @indFinal = params[:indFinal]
  @indPres = params[:indPres]
  @procEmi = params[:procEmi]
  @verProc = params[:verProc]
end

Instance Attribute Details

#cDVObject (readonly)

Returns the value of attribute cDV.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def cDV
  @cDV
end

#cMunFGObject (readonly)

Returns the value of attribute cMunFG.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def cMunFG
  @cMunFG
end

#cNFObject (readonly)

Returns the value of attribute cNF.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def cNF
  @cNF
end

#cUFObject (readonly)

Returns the value of attribute cUF.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def cUF
  @cUF
end

#dhEmiObject (readonly)

Returns the value of attribute dhEmi.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def dhEmi
  @dhEmi
end

#dhSaiEntObject (readonly)

Returns the value of attribute dhSaiEnt.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def dhSaiEnt
  @dhSaiEnt
end

#finNFeObject (readonly)

Returns the value of attribute finNFe.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def finNFe
  @finNFe
end

#idDestObject (readonly)

Returns the value of attribute idDest.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def idDest
  @idDest
end

#indFinalObject (readonly)

Returns the value of attribute indFinal.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def indFinal
  @indFinal
end

#indPresObject (readonly)

Returns the value of attribute indPres.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def indPres
  @indPres
end

#modObject (readonly)

Returns the value of attribute mod.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def mod
  @mod
end

#natOpObject (readonly)

Returns the value of attribute natOp.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def natOp
  @natOp
end

#nNFObject (readonly)

Returns the value of attribute nNF.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def nNF
  @nNF
end

#procEmiObject (readonly)

Returns the value of attribute procEmi.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def procEmi
  @procEmi
end

#serieObject (readonly)

Returns the value of attribute serie.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def serie
  @serie
end

#tpAmbObject (readonly)

Returns the value of attribute tpAmb.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def tpAmb
  @tpAmb
end

#tpEmisObject (readonly)

Returns the value of attribute tpEmis.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def tpEmis
  @tpEmis
end

#tpImpObject (readonly)

Returns the value of attribute tpImp.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def tpImp
  @tpImp
end

#tpNFObject (readonly)

Returns the value of attribute tpNF.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def tpNF
  @tpNF
end

#verProcObject (readonly)

Returns the value of attribute verProc.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def verProc
  @verProc
end

#xmlObject (readonly)

Returns the value of attribute xml.



5
6
7
# File 'lib/ruby_xml_nfe/ide.rb', line 5

def xml
  @xml
end

Instance Method Details

#buildObject



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/ruby_xml_nfe/ide.rb', line 32

def build
  xml.ide do
    xml.cUF cUF
    xml.cNF cNF
    xml.natOp natOp
    xml.mod mod
    xml.serie serie
    xml.nNF nNF
    xml.dhEmi dhEmi
    xml.dhSaiEnt dhSaiEnt if dhSaiEnt
    xml.tpNF tpNF
    xml.idDest idDest
    xml.cMunFG cMunFG
    xml.tpImp tpImp
    xml.tpEmis tpEmis
    xml.cDV cDV
    xml.tpAmb tpAmb
    xml.finNFe finNFe
    xml.indFinal indFinal
    xml.indPres indPres
    xml.procEmi procEmi
    xml.verProc verProc
  end
end