Class: Nfe::Reader::Exportation
- Inherits:
-
Object
- Object
- Nfe::Reader::Exportation
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/product/exportation.rb
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.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/nfe_reader/product/exportation.rb', line 9 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.
7 8 9 |
# File 'lib/nfe_reader/product/exportation.rb', line 7 def amount @amount end |
#drawnback ⇒ Object (readonly)
Returns the value of attribute drawnback.
7 8 9 |
# File 'lib/nfe_reader/product/exportation.rb', line 7 def drawnback @drawnback end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
7 8 9 |
# File 'lib/nfe_reader/product/exportation.rb', line 7 def key @key end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
7 8 9 |
# File 'lib/nfe_reader/product/exportation.rb', line 7 def number @number end |