Class: Nfe::Services::Dispatch::ConsSitNFe
- Inherits:
-
Object
- Object
- Nfe::Services::Dispatch::ConsSitNFe
- Extended by:
- Enumerize
- Includes:
- ActiveModel::Model
- Defined in:
- lib/nfe/services/dispatch/consSitNFe.rb
Instance Attribute Summary collapse
-
#chNFe ⇒ Object
Returns the value of attribute chNFe.
-
#uf ⇒ Object
Returns the value of attribute uf.
-
#versao ⇒ Object
Returns the value of attribute versao.
Instance Method Summary collapse
-
#initialize(environment, uf, versao, chNFe) ⇒ ConsSitNFe
constructor
A new instance of ConsSitNFe.
- #to_xml ⇒ Object
Constructor Details
#initialize(environment, uf, versao, chNFe) ⇒ ConsSitNFe
Returns a new instance of ConsSitNFe.
22 23 24 25 26 27 |
# File 'lib/nfe/services/dispatch/consSitNFe.rb', line 22 def initialize(environment, uf, versao, chNFe) @tpAmb = environment @uf = uf @versao = versao @chNFe = chNFe end |
Instance Attribute Details
#chNFe ⇒ Object
Returns the value of attribute chNFe.
7 8 9 |
# File 'lib/nfe/services/dispatch/consSitNFe.rb', line 7 def chNFe @chNFe end |
#uf ⇒ Object
Returns the value of attribute uf.
7 8 9 |
# File 'lib/nfe/services/dispatch/consSitNFe.rb', line 7 def uf @uf end |
#versao ⇒ Object
Returns the value of attribute versao.
7 8 9 |
# File 'lib/nfe/services/dispatch/consSitNFe.rb', line 7 def versao @versao end |
Instance Method Details
#to_xml ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/nfe/services/dispatch/consSitNFe.rb', line 29 def to_xml xml = Builder::XmlMarkup.new xml.consSitNFe(xmlns: Models::NFe.namespace, versao: versao ) do |cons| cons.tpAmb tpAmb_value cons.xServ "CONSULTAR" cons.chNFe @chNFe end xml.target! end |