Class: Nfe::Reader::Delivery

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

Overview

Identificação do Local de Entrega

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AttributeHelper

#attributes, #attributes_to_hash

Constructor Details

#initialize(attrs = {}) ⇒ Delivery

Returns a new instance of Delivery.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/nfe_reader/delivery.rb', line 11

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

#addressObject (readonly)

Returns the value of attribute address.



8
9
10
# File 'lib/nfe_reader/delivery.rb', line 8

def address
  @address
end

#cityObject (readonly)

Returns the value of attribute city.



8
9
10
# File 'lib/nfe_reader/delivery.rb', line 8

def city
  @city
end

#city_codeObject (readonly)

Returns the value of attribute city_code.



8
9
10
# File 'lib/nfe_reader/delivery.rb', line 8

def city_code
  @city_code
end

#cnpjObject (readonly)

Returns the value of attribute cnpj.



8
9
10
# File 'lib/nfe_reader/delivery.rb', line 8

def cnpj
  @cnpj
end

#complementObject (readonly)

Returns the value of attribute complement.



8
9
10
# File 'lib/nfe_reader/delivery.rb', line 8

def complement
  @complement
end

#cpfObject (readonly)

Returns the value of attribute cpf.



8
9
10
# File 'lib/nfe_reader/delivery.rb', line 8

def cpf
  @cpf
end

#neighborhoodObject (readonly)

Returns the value of attribute neighborhood.



8
9
10
# File 'lib/nfe_reader/delivery.rb', line 8

def neighborhood
  @neighborhood
end

#numberObject (readonly)

Returns the value of attribute number.



8
9
10
# File 'lib/nfe_reader/delivery.rb', line 8

def number
  @number
end

#stateObject (readonly)

Returns the value of attribute state.



8
9
10
# File 'lib/nfe_reader/delivery.rb', line 8

def state
  @state
end