Class: RubyXmlNfe::Icms00

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ Icms00

Returns a new instance of Icms00.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/ruby_xml_nfe/icms00.rb', line 5

def initialize(xml, params)
  @xml = xml
  @orig = params[:orig]
  @cst = params[:CST]
  @modBC = params[:modBC]
  @vBC = params[:vBC]
  @pICMS = params[:pICMS]
  @vICMS = params[:vICMS]
  @pFCP = params[:pFCP]
  @vFCP = params[:vFCP]
end

Instance Attribute Details

#cstObject (readonly)

Returns the value of attribute cst.



3
4
5
# File 'lib/ruby_xml_nfe/icms00.rb', line 3

def cst
  @cst
end

#modBCObject (readonly)

Returns the value of attribute modBC.



3
4
5
# File 'lib/ruby_xml_nfe/icms00.rb', line 3

def modBC
  @modBC
end

#origObject (readonly)

Returns the value of attribute orig.



3
4
5
# File 'lib/ruby_xml_nfe/icms00.rb', line 3

def orig
  @orig
end

#pFCPObject (readonly)

Returns the value of attribute pFCP.



3
4
5
# File 'lib/ruby_xml_nfe/icms00.rb', line 3

def pFCP
  @pFCP
end

#pICMSObject (readonly)

Returns the value of attribute pICMS.



3
4
5
# File 'lib/ruby_xml_nfe/icms00.rb', line 3

def pICMS
  @pICMS
end

#vBCObject (readonly)

Returns the value of attribute vBC.



3
4
5
# File 'lib/ruby_xml_nfe/icms00.rb', line 3

def vBC
  @vBC
end

#vFCPObject (readonly)

Returns the value of attribute vFCP.



3
4
5
# File 'lib/ruby_xml_nfe/icms00.rb', line 3

def vFCP
  @vFCP
end

#vICMSObject (readonly)

Returns the value of attribute vICMS.



3
4
5
# File 'lib/ruby_xml_nfe/icms00.rb', line 3

def vICMS
  @vICMS
end

#xmlObject (readonly)

Returns the value of attribute xml.



3
4
5
# File 'lib/ruby_xml_nfe/icms00.rb', line 3

def xml
  @xml
end

Instance Method Details

#buildObject



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/ruby_xml_nfe/icms00.rb', line 17

def build
  xml.ICMS00 do
    xml.orig orig
    xml.CST cst
    xml.modBC modBC
    xml.vBC vBC
    xml.pICMS pICMS
    xml.vICMS vICMS
    xml.pFCP pFCP if pFCP
    xml.vFCP vFCP if vFCP
  end
end