Created
October 28, 2011 15:49
VIN API - ignore checksum validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first without ignoring the checksum, you'll see that we get an error | |
>> VinApi.find("VIN WITH BAD CHECKSUM GOES HERE") | |
=> #<VinApi @prefix_options={}, @attributes={"error"=>"Vin did not pass checksum test"}> | |
# next ignoring the checksum, we get our data | |
>> VinApi.find("VIN WITH BAD CHECKSUM GOES HERE", :params => {:ignore_checksum => "true"}) | |
=> #<VinApi @prefix_options={}, @attributes={"body_style"=>"Coupe", "model"=>"ACCORD EX", "country"=>"USA", "world_region"=>"North America", "engine_type"=>"FWD", "vin"=>"VIN WITH BAD CHECKSUM GOES HERE", "transmission"=>"Automatic", "make"=>"Honda", "year"=>"2003"}> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment