Bulk Correction In Ruby

In Ruby bulk Correction API can be accessed by using following Code ,

Code Sample

require 'net/http'
require 'json'
uri =URI('http://fixaddress.com/SACAPI/bulkFromCode')
req =Net::HTTP::Post.new(uri, initheader = {'Content-Type'=>'application/json'})
req.body = {'address':[['Case1','564 HELIGAN LN #1q','','LIVERMORE','CA','94551']],'count':'1','jobs':'1', 'data':'USPS','log':'Enable'}.to_json
res = Net::HTTP.start(uri.hostname, uri.port) do |http|
res = http.request(req)
puts res.body
end