Method: TecDoc::VehicleModel.all
- Defined in:
- lib/tec_doc/vehicle_model.rb
.all(options) ⇒ Array<TecDoc::VehicleManufacturer>
Get all vehicle models
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/tec_doc/vehicle_model.rb', line 17 def self.all() = { :car_type => 1, :countries_car_selection => TecDoc.client.country, :country_group_flag => false, :eval_favor => false, :lang => I18n.locale.to_s }.merge() response = TecDoc.client.request(:get_vehicle_models3, ) response.map do |attributes| model = new model.scope = model.id = attributes[:model_id].to_i model.name = attributes[:modelname].to_s model.date_of_construction_from = DateParser.new(attributes[:year_of_constr_from]).to_date model.date_of_construction_to = DateParser.new(attributes[:year_of_constr_to]).to_date model end end |