def map_request(type, payload, options)
      verb, path = API_MAP[type]
      raise ArgumentError, "Unsupported request type: #{type}" if path.nil?
      actor, action = type.split("/")[1..-1]
      path, params, request_options = parameterize(actor, action, payload, path)
      if action == "query_tags"
        map_query_tags(verb, params, action, options.merge(request_options))
      else
        map_response(make_request(verb, path, params, action, options.merge(request_options)), path)
      end
    end
def map_request(type, payload, options)
      verb, path = API_MAP[type]
      raise ArgumentError, "Unsupported request type: #{type}" if path.nil?
      actor, action = type.split("/")[1..-1]
      path, params, request_options = parameterize(actor, action, payload, path)
      if action == "query_tags"
        map_query_tags(verb, params, action, options.merge(request_options))
      else
        map_response(make_request(verb, path, params, action, options.merge(request_options)), path)
      end
    end
Convert request to RightApi form and then make request via HTTP

 @param [String] type of request as path specifying actor and action
 @param [Hash, NilClass] payload for request

 @option options [String] :request_uuid uniquely identifying this request
 @option options [Numeric] :time_to_live seconds before request expires and is to be ignored

 @return [Object, NilClass] response from request

 @raise [Exceptions::Unauthorized] authorization failed
 @raise [Exceptions::ConnectivityFailure] cannot connect to server, lost connection
   to it, or it is too busy to respond
 @raise [Exceptions::RetryableError] request failed but if retried may succeed
 @raise [Exceptions::Terminating] closing client and terminating service
 @raise [Exceptions::InternalServerError] internal error in server being accessed