Method: Nfe::Fiscal#initialize
- Defined in:
- lib/nfe_reader/fiscal.rb
#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 |