Class: Nfe::Delivery

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

Overview

Identificação do Local de Entrega

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Delivery

Returns a new instance of Delivery.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/nfe_reader/delivery.rb', line 8

def initialize(attrs = {})
  @cnpj = attrs[:CNPJ]
  @cpf = attrs[:CPF]
  @address = attrs[:xLgr]
  @number = attrs[:nro]
  @complement = attrs[:xCpl]
  @neighborhood = attrs[:xBairro]
  @city_code = attrs[:cMun]
  @city = attrs[:xMun]
  @state = attrs[:UF]
end

Instance Attribute Details

#address ⇒ Object (readonly)

Returns the value of attribute address.



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

def address
  @address
end

#city ⇒ Object (readonly)

Returns the value of attribute city.



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

def city
  @city
end

#city_code ⇒ Object (readonly)

Returns the value of attribute city_code.



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

def city_code
  @city_code
end

#cnpj ⇒ Object (readonly)

Returns the value of attribute cnpj.



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

def cnpj
  @cnpj
end

#complement ⇒ Object (readonly)

Returns the value of attribute complement.



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

def complement
  @complement
end

#cpf ⇒ Object (readonly)

Returns the value of attribute cpf.



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

def cpf
  @cpf
end

#neighborhood ⇒ Object (readonly)

Returns the value of attribute neighborhood.



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

def neighborhood
  @neighborhood
end

#number ⇒ Object (readonly)

Returns the value of attribute number.



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

def number
  @number
end

#state ⇒ Object (readonly)

Returns the value of attribute state.



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

def state
  @state
end