Class: NfeReader::Customer

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

Overview

Identificação do Destinatário da Nota Fiscal eletrônica

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

Fields Values

indIEDest: 1 - Contribuinte ICMS (informar a IE do destinatário),

2 - Contribuinte isento de Inscrição no cadastro de Contribuintes do ICMS,
9 - Não Contribuinte, que pode ou não possuir Inscrição Estadual


15
16
17
18
19
20
21
22
# File 'lib/nfe_reader/customer.rb', line 15

def initialize(attrs = {})
  @person = Person.new(attrs)

  # Address
  if attrs[:enderDest]
    @address = Address.new(attrs[:enderDest])
  end
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



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

def address
  @address
end

#personObject (readonly)

Returns the value of attribute person.



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

def person
  @person
end