Class: Nfe::Medicament

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Medicament

Returns a new instance of Medicament.



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

def initialize(attrs = {})
  # Numero de Lote
  @lot_number = attrs[:nLote]
  # Quantidade de Lotes
  @lot_amount = attrs[:qLote]
  # Data de Fabricação
  @fabrication = attrs[:dFab]
  # Data de Validade
  @validity = attrs[:dVal]
  # Preço maximo venda para Consumidor Final
  @ceiling_price = attrs[:vPMC]
end

Instance Attribute Details

#ceiling_priceObject (readonly)

Returns the value of attribute ceiling_price.



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

def ceiling_price
  @ceiling_price
end

#fabricationObject (readonly)

Returns the value of attribute fabrication.



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

def fabrication
  @fabrication
end

#lot_amountObject (readonly)

Returns the value of attribute lot_amount.



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

def lot_amount
  @lot_amount
end

#lot_numberObject (readonly)

Returns the value of attribute lot_number.



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

def lot_number
  @lot_number
end

#validityObject (readonly)

Returns the value of attribute validity.



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

def validity
  @validity
end