Class: Nfe::Exportation

Inherits:
Object
  • Object
show all
Defined in:
lib/nfe_reader/product/exportation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#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

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/nfe_reader/product/exportation.rb', line 4

def amount
  @amount
end

#drawnbackObject (readonly)

Returns the value of attribute drawnback.



4
5
6
# File 'lib/nfe_reader/product/exportation.rb', line 4

def drawnback
  @drawnback
end

#keyObject (readonly)

Returns the value of attribute key.



4
5
6
# File 'lib/nfe_reader/product/exportation.rb', line 4

def key
  @key
end

#numberObject (readonly)

Returns the value of attribute number.



4
5
6
# File 'lib/nfe_reader/product/exportation.rb', line 4

def number
  @number
end