Method: Nfe::Exportation#initialize

Defined in:
lib/nfe_reader/product/exportation.rb

#initialize(attrs = {}) ⇒ Exportation

Returns a new instance of Exportation.



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/nfe_reader/product/exportation.rb', line 6

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