Class: RubyXmlNfe::Total

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ Total

Returns a new instance of Total.



7
8
9
10
# File 'lib/ruby_xml_nfe/total.rb', line 7

def initialize(xml, params)
  @xml = xml
  @icms_tot_params = params[:ICMSTot]
end

Instance Attribute Details

#icms_tot_paramsObject (readonly)

Returns the value of attribute icms_tot_params.



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

def icms_tot_params
  @icms_tot_params
end

#xmlObject (readonly)

Returns the value of attribute xml.



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

def xml
  @xml
end

Instance Method Details

#buildObject



12
13
14
15
16
17
# File 'lib/ruby_xml_nfe/total.rb', line 12

def build
  xml.total do
    ipi_int = RubyXmlNfe::IcmsTot.new(xml, icms_tot_params)
    ipi_int.build
  end
end