Class: FipExtractor::Vehicle
- Defined in:
- lib/fipextractor/vehicle.rb
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#brand_id ⇒ Object
readonly
Returns the value of attribute brand_id.
-
#fuel ⇒ Object
readonly
Returns the value of attribute fuel.
-
#model_id ⇒ Object
readonly
Returns the value of attribute model_id.
-
#reference_table_id ⇒ Object
readonly
Returns the value of attribute reference_table_id.
-
#vehicle_type ⇒ Object
readonly
Returns the value of attribute vehicle_type.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(vehicle_type:, reference_table_id:, brand_id:, model_id:, year:, fuel:) ⇒ Vehicle
constructor
A new instance of Vehicle.
- #params ⇒ Object
- #route ⇒ Object
Methods inherited from Resource
Methods inherited from Request
#base_url, #call, #request, #resource, #response_class
Constructor Details
#initialize(vehicle_type:, reference_table_id:, brand_id:, model_id:, year:, fuel:) ⇒ Vehicle
Returns a new instance of Vehicle.
8 9 10 11 12 13 14 15 |
# File 'lib/fipextractor/vehicle.rb', line 8 def initialize(vehicle_type:, reference_table_id:, brand_id:, model_id:, year:, fuel:) @vehicle_type = vehicle_type @reference_table_id = reference_table_id @brand_id = brand_id @model_id = model_id @year = year @fuel = fuel end |
Instance Attribute Details
#brand_id ⇒ Object (readonly)
Returns the value of attribute brand_id.
6 7 8 |
# File 'lib/fipextractor/vehicle.rb', line 6 def brand_id @brand_id end |
#fuel ⇒ Object (readonly)
Returns the value of attribute fuel.
6 7 8 |
# File 'lib/fipextractor/vehicle.rb', line 6 def fuel @fuel end |
#model_id ⇒ Object (readonly)
Returns the value of attribute model_id.
6 7 8 |
# File 'lib/fipextractor/vehicle.rb', line 6 def model_id @model_id end |
#reference_table_id ⇒ Object (readonly)
Returns the value of attribute reference_table_id.
6 7 8 |
# File 'lib/fipextractor/vehicle.rb', line 6 def reference_table_id @reference_table_id end |
#vehicle_type ⇒ Object (readonly)
Returns the value of attribute vehicle_type.
6 7 8 |
# File 'lib/fipextractor/vehicle.rb', line 6 def vehicle_type @vehicle_type end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
6 7 8 |
# File 'lib/fipextractor/vehicle.rb', line 6 def year @year end |
Instance Method Details
#params ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fipextractor/vehicle.rb', line 21 def params { codigoTipoVeiculo: vehicle_type_id, codigoTabelaReferencia: reference_table_id, codigoModelo: model_id, codigoMarca: brand_id, anoModelo: year, codigoTipoCombustivel: fuel, tipoConsulta: search_type } end |
#route ⇒ Object
17 18 19 |
# File 'lib/fipextractor/vehicle.rb', line 17 def route 'ConsultarValorComTodosParametros' end |