Class: Nfe::Models::Ide
- Inherits:
-
Object
- Object
- Nfe::Models::Ide
- Extended by:
- Enumerize
- Includes:
- ActiveModel::Model, Helpers::XmlModel::NfeModel, Concerns::Ufable
- Defined in:
- lib/nfe/models/ide.rb
Instance Method Summary collapse
-
#initialize ⇒ Ide
constructor
A new instance of Ide.
- #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 ⇒ Ide
Returns a new instance of Ide.
108 109 110 |
# File 'lib/nfe/models/ide.rb', line 108 def initialize @NFref = [] end |
Instance Method Details
#to_xml ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/nfe/models/ide.rb', line 112 def to_xml xml = Builder::XmlMarkup.new add_elements xml, :cUF, :cNF, :natOp, :indPag xml.mod MODEL add_elements xml, :serie, :nNF, :dhEmi, :dhSaiEnt, :tpNF, :idDest, :cMunFG, :tpImp, :tpEmis, :cDV, :tpAmb, :finNFe xml.indFinal NOT_CONSUMER xml.indPres NOT_PRESENT xml.procEmi APP_TAX_PAYER add_elements xml, :verProc, :dhCont, :xJust, :NFref xml.target! end |