Class: NfeReader::Medicament

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

Constant Summary

Constants included from AttributeHelper

AttributeHelper::WITHELIST

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AttributeHelper

#attributes, #attributes_to_hash

Constructor Details

#initialize(attrs = {}) ⇒ Medicament

Returns a new instance of Medicament.



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

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.



6
7
8
# File 'lib/nfe_reader/product/medicament.rb', line 6

def ceiling_price
  @ceiling_price
end

#fabricationObject (readonly)

Returns the value of attribute fabrication.



6
7
8
# File 'lib/nfe_reader/product/medicament.rb', line 6

def fabrication
  @fabrication
end

#lot_amountObject (readonly)

Returns the value of attribute lot_amount.



6
7
8
# File 'lib/nfe_reader/product/medicament.rb', line 6

def lot_amount
  @lot_amount
end

#lot_numberObject (readonly)

Returns the value of attribute lot_number.



6
7
8
# File 'lib/nfe_reader/product/medicament.rb', line 6

def lot_number
  @lot_number
end

#validityObject (readonly)

Returns the value of attribute validity.



6
7
8
# File 'lib/nfe_reader/product/medicament.rb', line 6

def validity
  @validity
end