def put_request(uri, body, token = nil, manage_errors = true)
      request = Net::HTTP::Put.new(uri.request_uri, initheader = build_headers(token))
      request.body = body.to_json
      return do_request(uri, request, manage_errors)    
    end
def put_request(uri, body, token = nil, manage_errors = true)
      request = Net::HTTP::Put.new(uri.request_uri, initheader = build_headers(token))
      request.body = body.to_json
      return do_request(uri, request, manage_errors)    
    end
Wrapper function for a put request, just provide a uri
 and a hash of the data to send, then it will return you a hash
 with the result data.
 For authenticated transactions a token can be provided.
 Implemented using the do_request method