Class: Nfe::Services::Dispatch::ConsCad

Inherits:
Object
  • Object
show all
Extended by:
Enumerize
Includes:
ActiveModel::Model, Helpers::XmlModel::NfeModel
Defined in:
lib/nfe/services/dispatch/consCad.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::XmlModel::NfeModel

#add_elements, #check_present, included, #parse!, #parse_elements, #present?, #validate_optional_attributes, #validate_required_attributes

Instance Attribute Details

#infConsEntradaObject

Returns the value of attribute infConsEntrada.



13
14
15
# File 'lib/nfe/services/dispatch/consCad.rb', line 13

def infConsEntrada
  @infConsEntrada
end

#versaoObject

Returns the value of attribute versao.



13
14
15
# File 'lib/nfe/services/dispatch/consCad.rb', line 13

def versao
  @versao
end

Instance Method Details

#to_xmlObject



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/nfe/services/dispatch/consCad.rb', line 42

def to_xml
  xml = Builder::XmlMarkup.new

  xml.ConsCad(xmlns: Nfe::Models::NFe.namespace, versao: versao ) do |env|
    xml.infCons do |node|
      node.xServ "CONS-CAD"
      add_elements node
    end
  end

  xml.target!
end