Class: RubyXmlNfe::Ipi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ Ipi

Returns a new instance of Ipi.



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

def initialize(xml, params)
  @xml = xml
  @cEnq = params[:cEnq]
  @ipi_int_params = params[:IPINT]
end

Instance Attribute Details

#cEnqObject (readonly)

Returns the value of attribute cEnq.



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

def cEnq
  @cEnq
end

#ipi_int_paramsObject (readonly)

Returns the value of attribute ipi_int_params.



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

def ipi_int_params
  @ipi_int_params
end

#xmlObject (readonly)

Returns the value of attribute xml.



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

def xml
  @xml
end

Instance Method Details

#buildObject



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

def build
  xml.IPI do
    xml.cEnq cEnq
    ipi_int = RubyXmlNfe::IpiInt.new(xml, ipi_int_params)
    ipi_int.build
  end
end