Class: Nfe::Models::ProcEventoNFe
- Inherits:
-
Object
- Object
- Nfe::Models::ProcEventoNFe
- Includes:
- ActiveModel::Model, Helpers::XmlModel::NfeModel
- Defined in:
- lib/nfe/models/procEventoNFe.rb
Instance Attribute Summary collapse
-
#evento ⇒ Object
readonly
Returns the value of attribute evento.
-
#retEvento ⇒ Object
readonly
Returns the value of attribute retEvento.
Instance Method Summary collapse
-
#initialize(evento, retEvento) ⇒ ProcEventoNFe
constructor
A new instance of ProcEventoNFe.
- #to_xml ⇒ Object
Methods included from Helpers::XmlModel::NfeModel
#add_elements, #check_present, included, #parse!, #parse_elements, #present?, #validate_optional_attributes, #validate_required_attributes
Constructor Details
#initialize(evento, retEvento) ⇒ ProcEventoNFe
9 10 11 12 |
# File 'lib/nfe/models/procEventoNFe.rb', line 9 def initialize(evento, retEvento) @evento = evento @retEvento = retEvento end |
Instance Attribute Details
#evento ⇒ Object (readonly)
Returns the value of attribute evento.
7 8 9 |
# File 'lib/nfe/models/procEventoNFe.rb', line 7 def evento @evento end |
#retEvento ⇒ Object (readonly)
Returns the value of attribute retEvento.
7 8 9 |
# File 'lib/nfe/models/procEventoNFe.rb', line 7 def retEvento @retEvento end |
Instance Method Details
#to_xml ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/nfe/models/procEventoNFe.rb', line 14 def to_xml xml = Builder::XmlMarkup.new xml.procEventoNFe(xmlns: Models::NFe.namespace, versao: evento.versao) do |node| node << @evento.to_xml node << @retEvento.to_xml end xml.target! end |