Class: ChromeData::Vehicle

Inherits:
BaseRequest show all
Defined in:
lib/chrome_data/vehicle.rb

Defined Under Namespace

Classes: Engine

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from BaseRequest

build_request, client, endpoint_uri, find_elements, make_request, request, wsdl_body

Instance Attribute Details

#divisionObject

Returns the value of attribute division.



5
6
7
# File 'lib/chrome_data/vehicle.rb', line 5

def division
  @division
end

#enginesObject

Returns the value of attribute engines.



5
6
7
# File 'lib/chrome_data/vehicle.rb', line 5

def engines
  @engines
end

#modelObject

Returns the value of attribute model.



5
6
7
# File 'lib/chrome_data/vehicle.rb', line 5

def model
  @model
end

#model_yearObject

Returns the value of attribute model_year.



5
6
7
# File 'lib/chrome_data/vehicle.rb', line 5

def model_year
  @model_year
end

#standardObject

Returns the value of attribute standard.



5
6
7
# File 'lib/chrome_data/vehicle.rb', line 5

def standard
  @standard
end

#stylesObject

Returns the value of attribute styles.



5
6
7
# File 'lib/chrome_data/vehicle.rb', line 5

def styles
  @styles
end

Class Method Details

.find_by_vin(vin) ⇒ Object



11
12
13
# File 'lib/chrome_data/vehicle.rb', line 11

def self.find_by_vin(vin)
  request 'vin' => vin
end

.parse_response(response) ⇒ Object



15
16
17
18
# File 'lib/chrome_data/vehicle.rb', line 15

def self.parse_response(response)
  return unless find_elements('vinDescription', response).first
  self.new response
end

.request_nameObject



7
8
9
# File 'lib/chrome_data/vehicle.rb', line 7

def self.request_name
  "describeVehicle"
end