Class: Nfe::Carrier

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Carrier

Returns a new instance of Carrier.


6
7
8
9
10
11
12
13
14
# File 'lib/nfe_reader/carrier.rb', line 6

def initialize(attrs = {})
  @cnpj = attrs[:CNPJ]
  @cpf = attrs[:CPF]
  @name = attrs[:xNome]
  @ie = attrs[:IE]
  @address = attrs[:xEnder]
  @city = attrs[:xMun]
  @state = attrs[:UF]
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.


4
5
6
# File 'lib/nfe_reader/carrier.rb', line 4

def address
  @address
end

#cityObject (readonly)

Returns the value of attribute city.


4
5
6
# File 'lib/nfe_reader/carrier.rb', line 4

def city
  @city
end

#cnpjObject (readonly)

Returns the value of attribute cnpj.


4
5
6
# File 'lib/nfe_reader/carrier.rb', line 4

def cnpj
  @cnpj
end

#cpfObject (readonly)

Returns the value of attribute cpf.


4
5
6
# File 'lib/nfe_reader/carrier.rb', line 4

def cpf
  @cpf
end

#ieObject (readonly)

Returns the value of attribute ie.


4
5
6
# File 'lib/nfe_reader/carrier.rb', line 4

def ie
  @ie
end

#nameObject (readonly)

Returns the value of attribute name.


4
5
6
# File 'lib/nfe_reader/carrier.rb', line 4

def name
  @name
end

#stateObject (readonly)

Returns the value of attribute state.


4
5
6
# File 'lib/nfe_reader/carrier.rb', line 4

def state
  @state
end