Class: NfeReader::Fiscal

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

Overview

Identificação do Fisco Emitente da NF-e

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 = {}) ⇒ Fiscal

Returns a new instance of Fiscal.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/nfe_reader/fiscal.rb', line 10

def initialize(attrs = {})
  # CNPJ emitente
  @cnpj = attrs[:CNPJ]
  # Órgão emitente
  @agency = attrs[:xOrgao]
  # Matrícula do agente do Fisco
  @code = attrs[:matr]
  # Nome do agente do Fisco
  @name = attrs[:xAgente]
  # Telefone do agente do Fisco
  @phone = attrs[:fone]
  # Estado
  @state = attrs[:UF]
  # Número do DAR(Documento de Arrecadação de Receita)
  @number = attrs[:nDAR]
  # Data
  @date = attrs[:dEmi]
  # Valor do DAR
  @value = attrs[:vDAR]
  # Repartição Fiscal emitente
  @repartition = attrs[:repEmi]
  # Data do Pagamento
  @paid_date = attrs[:dPag]
end

Instance Attribute Details

#agencyObject (readonly)

Returns the value of attribute agency.



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

def agency
  @agency
end

#cnpjObject (readonly)

Returns the value of attribute cnpj.



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

def cnpj
  @cnpj
end

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#dateObject (readonly)

Returns the value of attribute date.



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

def date
  @date
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#numberObject (readonly)

Returns the value of attribute number.



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

def number
  @number
end

Returns the value of attribute paid_date.



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

def paid_date
  @paid_date
end

#phoneObject (readonly)

Returns the value of attribute phone.



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

def phone
  @phone
end

#repartitionObject (readonly)

Returns the value of attribute repartition.



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

def repartition
  @repartition
end

#stateObject (readonly)

Returns the value of attribute state.



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

def state
  @state
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end