Class: NfeReader::Vehicle
- Inherits:
-
Object
- Object
- NfeReader::Vehicle
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/product/vehicle.rb
Constant Summary
Constants included from AttributeHelper
Instance Attribute Summary collapse
-
#capacity ⇒ Object
readonly
Returns the value of attribute capacity.
-
#chassi ⇒ Object
readonly
Returns the value of attribute chassi.
-
#cmt ⇒ Object
readonly
Returns the value of attribute cmt.
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#color_code ⇒ Object
readonly
Returns the value of attribute color_code.
-
#color_name ⇒ Object
readonly
Returns the value of attribute color_name.
-
#condiction ⇒ Object
readonly
Returns the value of attribute condiction.
-
#engine_capacities ⇒ Object
readonly
Returns the value of attribute engine_capacities.
-
#engine_number ⇒ Object
readonly
Returns the value of attribute engine_number.
-
#engine_power ⇒ Object
readonly
Returns the value of attribute engine_power.
-
#fabrication_year ⇒ Object
readonly
Returns the value of attribute fabrication_year.
-
#fuel_kind ⇒ Object
readonly
Returns the value of attribute fuel_kind.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#paint_kind ⇒ Object
readonly
Returns the value of attribute paint_kind.
-
#restriction ⇒ Object
readonly
Returns the value of attribute restriction.
-
#serie ⇒ Object
readonly
Returns the value of attribute serie.
-
#vehicle_kind ⇒ Object
readonly
Returns the value of attribute vehicle_kind.
-
#vin ⇒ Object
readonly
Returns the value of attribute vin.
-
#weight_gross ⇒ Object
readonly
Returns the value of attribute weight_gross.
-
#weight_net ⇒ Object
readonly
Returns the value of attribute weight_net.
-
#wheelbase ⇒ Object
readonly
Returns the value of attribute wheelbase.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Vehicle
constructor
Fields Values.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
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;
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 116 117 |
# File 'lib/nfe_reader/product/vehicle.rb', line 68 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.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def capacity @capacity end |
#chassi ⇒ Object (readonly)
Returns the value of attribute chassi.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def chassi @chassi end |
#cmt ⇒ Object (readonly)
Returns the value of attribute cmt.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def cmt @cmt end |
#color ⇒ Object (readonly)
Returns the value of attribute color.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def color @color end |
#color_code ⇒ Object (readonly)
Returns the value of attribute color_code.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def color_code @color_code end |
#color_name ⇒ Object (readonly)
Returns the value of attribute color_name.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def color_name @color_name end |
#condiction ⇒ Object (readonly)
Returns the value of attribute condiction.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def condiction @condiction end |
#engine_capacities ⇒ Object (readonly)
Returns the value of attribute engine_capacities.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def engine_capacities @engine_capacities end |
#engine_number ⇒ Object (readonly)
Returns the value of attribute engine_number.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def engine_number @engine_number end |
#engine_power ⇒ Object (readonly)
Returns the value of attribute engine_power.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def engine_power @engine_power end |
#fabrication_year ⇒ Object (readonly)
Returns the value of attribute fabrication_year.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def fabrication_year @fabrication_year end |
#fuel_kind ⇒ Object (readonly)
Returns the value of attribute fuel_kind.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def fuel_kind @fuel_kind end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def kind @kind end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def model @model end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def operation @operation end |
#paint_kind ⇒ Object (readonly)
Returns the value of attribute paint_kind.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def paint_kind @paint_kind end |
#restriction ⇒ Object (readonly)
Returns the value of attribute restriction.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def restriction @restriction end |
#serie ⇒ Object (readonly)
Returns the value of attribute serie.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def serie @serie end |
#vehicle_kind ⇒ Object (readonly)
Returns the value of attribute vehicle_kind.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def vehicle_kind @vehicle_kind end |
#vin ⇒ Object (readonly)
Returns the value of attribute vin.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def vin @vin end |
#weight_gross ⇒ Object (readonly)
Returns the value of attribute weight_gross.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def weight_gross @weight_gross end |
#weight_net ⇒ Object (readonly)
Returns the value of attribute weight_net.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def weight_net @weight_net end |
#wheelbase ⇒ Object (readonly)
Returns the value of attribute wheelbase.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def wheelbase @wheelbase end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
6 7 8 |
# File 'lib/nfe_reader/product/vehicle.rb', line 6 def year @year end |