def request(opts = {})
      method = opts.delete(:_method)
      path = opts.delete(:_path)
      headers = opts.delete(:_headers)
      opts.delete_if { |key, _| key.to_s =~ /^_/ } # Remove all internal parameters
      if method == :options
        # Faraday doesn't support the OPTIONS verb because of a name collision with an internal options method
        # so we need to call run_request directly.
        request.headers.merge!(headers) if headers
        response = @connection.run_request method, path, opts, headers
      else
        response = @connection.send method do |request|
          request.headers.merge!(headers) if headers
          if method == :get
            # For GET requests, treat additional parameters as querystring data
            request.url path, opts
          else
            # For POST, PUT and DELETE requests, treat additional parameters as request body
            request.url path
            request.body = opts
          end
        end
      end
      { :parsed_data => response.env[:body], :response => response }
    end
def request(opts = {})
      method = opts.delete(:_method)
      path = opts.delete(:_path)
      headers = opts.delete(:_headers)
      opts.delete_if { |key, _| key.to_s =~ /^_/ } # Remove all internal parameters
      if method == :options
        # Faraday doesn't support the OPTIONS verb because of a name collision with an internal options method
        # so we need to call run_request directly.
        request.headers.merge!(headers) if headers
        response = @connection.run_request method, path, opts, headers
      else
        response = @connection.send method do |request|
          request.headers.merge!(headers) if headers
          if method == :get
            # For GET requests, treat additional parameters as querystring data
            request.url path, opts
          else
            # For POST, PUT and DELETE requests, treat additional parameters as request body
            request.url path
            request.body = opts
          end
        end
      end
      { :parsed_data => response.env[:body], :response => response }
    end
Define a custom parsing procedure. The procedure is passed the response object and is
 expected to return a hash with three keys: a main data Hash, an errors Hash
 and a metadata Hash.

 @private