Class: FipExtractor::ModelThroughYear
- Defined in:
- lib/fipextractor/model_through_year.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.
-
#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:, year:, fuel: nil) ⇒ ModelThroughYear
constructor
A new instance of ModelThroughYear.
- #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:, year:, fuel: nil) ⇒ ModelThroughYear
Returns a new instance of ModelThroughYear.
8 9 10 11 12 13 14 |
# File 'lib/fipextractor/model_through_year.rb', line 8 def initialize(vehicle_type:, reference_table_id:, brand_id:, year:, fuel: nil) @vehicle_type = vehicle_type @reference_table_id = reference_table_id @brand_id = brand_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/model_through_year.rb', line 6 def brand_id @brand_id end |
#fuel ⇒ Object (readonly)
Returns the value of attribute fuel.
6 7 8 |
# File 'lib/fipextractor/model_through_year.rb', line 6 def fuel @fuel end |
#reference_table_id ⇒ Object (readonly)
Returns the value of attribute reference_table_id.
6 7 8 |
# File 'lib/fipextractor/model_through_year.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/model_through_year.rb', line 6 def vehicle_type @vehicle_type end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
6 7 8 |
# File 'lib/fipextractor/model_through_year.rb', line 6 def year @year end |
Instance Method Details
#params ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/fipextractor/model_through_year.rb', line 20 def params { codigoTipoVeiculo: vehicle_type_id, codigoTabelaReferencia: reference_table_id, codigoMarca: brand_id, anoModelo: year, codigoTipoCombustivel: fuel } end |
#route ⇒ Object
16 17 18 |
# File 'lib/fipextractor/model_through_year.rb', line 16 def route 'ConsultarModelosAtravesDoAno' end |