mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update vehicle.rb
This commit is contained in:
@@ -26,6 +26,7 @@ class Vehicle < ActiveRecord::Base
|
||||
|
||||
def decode_vin
|
||||
if self.vin?
|
||||
#TODO API Code via Settings
|
||||
decoder = Edmunds::Vin.new('2dheutzvhxs28dzukx5tgu47')
|
||||
vehicle = JSON.parse decoder.full(self.vin)
|
||||
self.year = vehicle['years'][0]['year']
|
||||
|
||||
Reference in New Issue
Block a user