mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 09:10:43 -04:00
Update vehicle.rb
This commit is contained in:
1 parent
7a6e35adff
commit
9e2f9f5a7a
1 file changed
+1
@@ -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