Class: Nfe::Reader::Cofins

Inherits:
Object
  • Object
show all
Includes:
AttributeHelper
Defined in:
lib/nfe_reader/taxation/cofins.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AttributeHelper

#attributes, #attributes_to_hash

Constructor Details

#initialize(attrs = {}) ⇒ Cofins

Fieds Values

cst:

COFINSAliq:
  01 - Opera


31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/nfe_reader/taxation/cofins.rb', line 31

def initialize(attrs = {})
  # Cst COFINS
  @cst = attrs[:CST]
  # Base COFINS
  @base = attrs[:vBC]
  # % COFINS
  @percentage = attrs[:pCOFINS]
  # Valor COFINS
  @value = attrs[:vCOFINS]
  # Quantidade Vendida
  @amount = attrs[:qBCProd]
  # Alíquota do COFINS
  @aliquot = attrs[:vAliqProd]
end

Instance Attribute Details

#aliquotObject (readonly)

Returns the value of attribute aliquot.



7
8
9
# File 'lib/nfe_reader/taxation/cofins.rb', line 7

def aliquot
  @aliquot
end

#amountObject (readonly)

Returns the value of attribute amount.



7
8
9
# File 'lib/nfe_reader/taxation/cofins.rb', line 7

def amount
  @amount
end

#baseObject (readonly)

Returns the value of attribute base.



7
8
9
# File 'lib/nfe_reader/taxation/cofins.rb', line 7

def base
  @base
end

#cstObject (readonly)

Returns the value of attribute cst.



7
8
9
# File 'lib/nfe_reader/taxation/cofins.rb', line 7

def cst
  @cst
end

#percentageObject (readonly)

Returns the value of attribute percentage.



7
8
9
# File 'lib/nfe_reader/taxation/cofins.rb', line 7

def percentage
  @percentage
end

#valueObject (readonly)

Returns the value of attribute value.



7
8
9
# File 'lib/nfe_reader/taxation/cofins.rb', line 7

def value
  @value
end