def execute(method:, path: nil, headers: {}, query: {}, payload: nil)
      timeout = ENDPOINT_TIMEOUTS.fetch(path, 230)
      request = build_request(
        method: method,
        path: path,
        headers: headers,
        query: query,
        payload: payload,
        timeout: timeout
      )
      rest_client_execute(**request) do |response, _request, result|
        response = parse_response(response)
        handle_failed_response(result: result, response: response)
        response
      end
    end
def execute(method:, path: nil, headers: {}, query: {}, payload: nil)
      timeout = ENDPOINT_TIMEOUTS.fetch(path, 230)
      request = build_request(
        method: method,
        path: path,
        headers: headers,
        query: query,
        payload: payload,
        timeout: timeout
      )
      rest_client_execute(**request) do |response, _request, result|
        response = parse_response(response)
        handle_failed_response(result: result, response: response)
        response
      end
    end
Sends a request to the Nylas API and rai
 @param method [Symbol] HTTP method for the API call. Either :get, :post, :delete, or :patch
 @param path [String] (Optional, defaults to nil) - Relative path from the API Base. Preferred way to
                      execute arbitrary or-not-yet-SDK-ified API commands.
 @param headers [Hash] (Optional, defaults to {}) - Additional HTTP headers to include in the payload.
 @param query [Hash] (Optional, defaults to {}) - Hash of names and values to include in the query
                      section of the URI fragment
 @param payload [String,Hash] (Optional, defaults to nil) - Body to send with the request.
 @return [Array Hash Stringn]
 rubocop:disable Metrics/MethodLength