Class: Nfe::Vehicle

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Vehicle

Fields Values

pOp: 1 - Venda concessionária, 2 - Faturamento direto para consumidor final 3 - Venda direta para grandes consumidores (frotista, governo, ...) 0 - Outros

tpComb: 01-Álcool 02-Gasolina 03-Diesel (...) - Tabela Renavam 2.0

tpVeic: Utilizar Tabela RENAVAM 06-AUTOMÓVEL 14-CAMINHÃO 13-CAMINHONETA ...

espVeic: Utilizar Tabela RENAVAM 1 - PASSAGEIRO 2 - CARGA 3 - MISTO 4 - CORRIDA 5 - TRAÇÃO 6 - ESPECIAL

VIN: R - Remarcado N - Normal

condVeic: 1 - Acabado; 2 - Inacabado; 3 - Semi-acabado

cCorDEN: 01 - AMARELO 02 - AZUL 03 - BEGE 04 - BRANCA 05 - CINZA 06 - DOURADA 07 - GRENA 08 - LARANJA 09 - MARROM 10 - PRATA 11 - PRETA 12 - ROSA 13 - ROXA 14 - VERDE 15 - VERMELHA 16 - FANTASIA

tpRest: 0 - Não há; 1 - Alienação Fiduciária; 2 - Arrendamento Mercantil; 3 - Reserva de Domínio; 4 - Penhor de Veículos;



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/nfe_reader/product/vehicle.rb', line 66

def initialize(attrs = {})
  # Tipo da operação
  @operation = attrs[:pOp]
  # Numero do Chassi
  @chassi = attrs[:chassi]
  # Cor do Fabricante
  @color = attrs[:cCor]
  # Nome da Cor do Fabricante
  @color_name = attrs[:xCor]
  # Potencia do Motor em CV
  @engine_power = attrs[:pot]
  # Potencia do Motor em CC
  @engine_capacities = attrs[:cilin]
  # Peso Liquido
  @weight_net = attrs[:pesoL]
  # Peso Bruto
  @weight_gross = attrs[:pesoB]
  # Numero serie
  @serie = attrs[:nSerie]
  # Tipo de Combustivel
  @fuel_kind = attrs[:tpComb]
  # Numeracao do Motor
  @engine_number = attrs[:nMotor]
  # CMT: Capacidade Maxima de Tração
  @cmt = attrs[:CMT]
  # Distancia entre os Eixos
  @wheelbase = attrs[:dist]
  # Ano do Modelo
  @year = attrs[:anoMod]
  # Ano de Fabricacao
  @fabrication_year = attrs[:anoFab]
  # Tipo de Pintura
  @paint_kind = attrs[:tpPint]
  # Tipo de Veiculo
  @kind = attrs[:tpVeic]
  # Especie do veiculo
  @vehicle_kind = attrs[:espVeic]
  # Condição do VIN
  @vin = attrs[:VIN]
  # Condições do Veiculo
  @condiction = attrs[:condVeic]
  # Modelo
  @model = attrs[:cMod]
  # Codigo da Cor
  @color_code = attrs[:cCorDEN]
  # Capacidade
  @capacity = attrs[:lota]
  # Restrição
  @restriction = attrs[:tpRest]
end

Instance Attribute Details

#capacity ⇒ Object (readonly)

Returns the value of attribute capacity.



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

def capacity
  @capacity
end

#chassi ⇒ Object (readonly)

Returns the value of attribute chassi.



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

def chassi
  @chassi
end

#cmt ⇒ Object (readonly)

Returns the value of attribute cmt.



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

def cmt
  @cmt
end

#color ⇒ Object (readonly)

Returns the value of attribute color.



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

def color
  @color
end

#color_code ⇒ Object (readonly)

Returns the value of attribute color_code.



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

def color_code
  @color_code
end

#color_name ⇒ Object (readonly)

Returns the value of attribute color_name.



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

def color_name
  @color_name
end

#condiction ⇒ Object (readonly)

Returns the value of attribute condiction.



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

def condiction
  @condiction
end

#engine_capacities ⇒ Object (readonly)

Returns the value of attribute engine_capacities.



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

def engine_capacities
  @engine_capacities
end

#engine_number ⇒ Object (readonly)

Returns the value of attribute engine_number.



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

def engine_number
  @engine_number
end

#engine_power ⇒ Object (readonly)

Returns the value of attribute engine_power.



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

def engine_power
  @engine_power
end

#fabrication_year ⇒ Object (readonly)

Returns the value of attribute fabrication_year.



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

def fabrication_year
  @fabrication_year
end

#fuel_kind ⇒ Object (readonly)

Returns the value of attribute fuel_kind.



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

def fuel_kind
  @fuel_kind
end

#kind ⇒ Object (readonly)

Returns the value of attribute kind.



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

def kind
  @kind
end

#model ⇒ Object (readonly)

Returns the value of attribute model.



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

def model
  @model
end

#operation ⇒ Object (readonly)

Returns the value of attribute operation.



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

def operation
  @operation
end

#paint_kind ⇒ Object (readonly)

Returns the value of attribute paint_kind.



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

def paint_kind
  @paint_kind
end

#restriction ⇒ Object (readonly)

Returns the value of attribute restriction.



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

def restriction
  @restriction
end

#serie ⇒ Object (readonly)

Returns the value of attribute serie.



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

def serie
  @serie
end

#vehicle_kind ⇒ Object (readonly)

Returns the value of attribute vehicle_kind.



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

def vehicle_kind
  @vehicle_kind
end

#vin ⇒ Object (readonly)

Returns the value of attribute vin.



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

def vin
  @vin
end

#weight_gross ⇒ Object (readonly)

Returns the value of attribute weight_gross.



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

def weight_gross
  @weight_gross
end

#weight_net ⇒ Object (readonly)

Returns the value of attribute weight_net.



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

def weight_net
  @weight_net
end

#wheelbase ⇒ Object (readonly)

Returns the value of attribute wheelbase.



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

def wheelbase
  @wheelbase
end

#year ⇒ Object (readonly)

Returns the value of attribute year.



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

def year
  @year
end