Class: Nfe::Services::Dispatch::DetEventoCancel

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model, Helpers::XmlModel::NfeModel
Defined in:
lib/nfe/services/dispatch/detEventoCancel.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

#versaoObject

Returns the value of attribute versao.



12
13
14
# File 'lib/nfe/services/dispatch/detEventoCancel.rb', line 12

def versao
  @versao
end

Instance Method Details

#kindObject



23
24
25
# File 'lib/nfe/services/dispatch/detEventoCancel.rb', line 23

def kind
  :nfe_cancel
end

#to_xmlObject



31
32
33
34
35
36
37
# File 'lib/nfe/services/dispatch/detEventoCancel.rb', line 31

def to_xml
  xml = Builder::XmlMarkup.new

  xml.detEvento(versao: versao) { |node| add_elements node }

  xml.target!
end

#tpEventObject



27
28
29
# File 'lib/nfe/services/dispatch/detEventoCancel.rb', line 27

def tpEvent
  110111
end