Class: Nfe::Models::NFeProc
- Inherits:
-
Object
- Object
- Nfe::Models::NFeProc
- Includes:
- ActiveModel::Model, Helpers::XmlModel::NfeModel
- Defined in:
- lib/nfe/models/nfeProc.rb
Instance Attribute Summary collapse
-
#nfe ⇒ Object
readonly
Returns the value of attribute nfe.
-
#protNFe ⇒ Object
readonly
Returns the value of attribute protNFe.
Instance Method Summary collapse
-
#initialize(nfe, protNFe) ⇒ NFeProc
constructor
A new instance of NFeProc.
- #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(nfe, protNFe) ⇒ NFeProc
Returns a new instance of NFeProc.
9 10 11 12 |
# File 'lib/nfe/models/nfeProc.rb', line 9 def initialize(nfe, protNFe) @nfe = nfe @protNFe = protNFe end |
Instance Attribute Details
#nfe ⇒ Object (readonly)
Returns the value of attribute nfe.
7 8 9 |
# File 'lib/nfe/models/nfeProc.rb', line 7 def nfe @nfe end |
#protNFe ⇒ Object (readonly)
Returns the value of attribute protNFe.
7 8 9 |
# File 'lib/nfe/models/nfeProc.rb', line 7 def protNFe @protNFe end |
Instance Method Details
#to_xml ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/nfe/models/nfeProc.rb', line 14 def to_xml xml = Builder::XmlMarkup.new xml.nfeProc(xmlns: Models::NFe.namespace, versao: nfe.infNFe.versao) do |node| node << @nfe.to_xml node << @protNFe.to_xml end xml.target! end |