Class: NfeReader::Fiscal
- Inherits:
-
Object
- Object
- NfeReader::Fiscal
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/fiscal.rb
Overview
Identificação do Fisco Emitente da NF-e
Constant Summary
Constants included from AttributeHelper
Instance Attribute Summary collapse
-
#agency ⇒ Object
readonly
Returns the value of attribute agency.
-
#cnpj ⇒ Object
readonly
Returns the value of attribute cnpj.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#paid_date ⇒ Object
readonly
Returns the value of attribute paid_date.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#repartition ⇒ Object
readonly
Returns the value of attribute repartition.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Fiscal
constructor
A new instance of Fiscal.
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
#agency ⇒ Object (readonly)
Returns the value of attribute agency.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def agency @agency end |
#cnpj ⇒ Object (readonly)
Returns the value of attribute cnpj.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def cnpj @cnpj end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def code @code end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def date @date end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def name @name end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def number @number end |
#paid_date ⇒ Object (readonly)
Returns the value of attribute paid_date.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def paid_date @paid_date end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def phone @phone end |
#repartition ⇒ Object (readonly)
Returns the value of attribute repartition.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def repartition @repartition end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def state @state end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/nfe_reader/fiscal.rb', line 7 def value @value end |