Class: Nfe::Fiscal

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

Overview

Identificação do Fisco Emitente da NF-e

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Fiscal

Returns a new instance of Fiscal.



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

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.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def agency
  @agency
end

#cnpjObject (readonly)

Returns the value of attribute cnpj.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def cnpj
  @cnpj
end

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def code
  @code
end

#dateObject (readonly)

Returns the value of attribute date.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def date
  @date
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def name
  @name
end

#numberObject (readonly)

Returns the value of attribute number.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def number
  @number
end

Returns the value of attribute paid_date.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def paid_date
  @paid_date
end

#phoneObject (readonly)

Returns the value of attribute phone.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def phone
  @phone
end

#repartitionObject (readonly)

Returns the value of attribute repartition.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def repartition
  @repartition
end

#stateObject (readonly)

Returns the value of attribute state.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def state
  @state
end

#valueObject (readonly)

Returns the value of attribute value.



5
6
7
# File 'lib/nfe_reader/fiscal.rb', line 5

def value
  @value
end