Class: NfeReader::Exportation
- Inherits:
-
Object
- Object
- NfeReader::Exportation
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/product/exportation.rb
Constant Summary
Constants included from AttributeHelper
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#drawnback ⇒ Object
readonly
Returns the value of attribute drawnback.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Exportation
constructor
A new instance of Exportation.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Exportation
Returns a new instance of Exportation.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/nfe_reader/product/exportation.rb', line 8 def initialize(attrs = {}) # Número do ato concessório de Drawback @drawnback = attrs[:nDraw] if attrs[:exportInd] # Número do Registro de Exportação @number = attrs[:exportInd][:nRE] # Chave de Acesso da NF-e recebida para exportação @key = attrs[:exportInd][:chNFe] # Quantidade do item realmente exportado @amount= attrs[:exportInd][:qExport] end end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
6 7 8 |
# File 'lib/nfe_reader/product/exportation.rb', line 6 def amount @amount end |
#drawnback ⇒ Object (readonly)
Returns the value of attribute drawnback.
6 7 8 |
# File 'lib/nfe_reader/product/exportation.rb', line 6 def drawnback @drawnback end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/nfe_reader/product/exportation.rb', line 6 def key @key end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
6 7 8 |
# File 'lib/nfe_reader/product/exportation.rb', line 6 def number @number end |