Class: NfeReader::Removal

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

Overview

Identificação do Local de Retirada

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

Returns a new instance of Removal.



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

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.



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

def address
  @address
end

#cityObject (readonly)

Returns the value of attribute city.



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

def city
  @city
end

#city_codeObject (readonly)

Returns the value of attribute city_code.



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

def city_code
  @city_code
end

#cnpjObject (readonly)

Returns the value of attribute cnpj.



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

def cnpj
  @cnpj
end

#complementObject (readonly)

Returns the value of attribute complement.



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

def complement
  @complement
end

#cpfObject (readonly)

Returns the value of attribute cpf.



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

def cpf
  @cpf
end

#neighborhoodObject (readonly)

Returns the value of attribute neighborhood.



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

def neighborhood
  @neighborhood
end

#numberObject (readonly)

Returns the value of attribute number.



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

def number
  @number
end

#stateObject (readonly)

Returns the value of attribute state.



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

def state
  @state
end