module Nylas::ApiOperations::Put

Performs a PUT call to the Nylas API.

Protected Instance Methods

put(path:, query_params: {}, request_body: nil, headers: {}) click to toggle source

Performs a PUT call to the Nylas API.

@param path [String] Destination path for the call. @param query_params [Hash, {}] Query params to pass to the call. @param request_body [Hash, nil] Request body to pass to the call. @param headers [Hash, {}] Additional HTTP headers to include in the payload. @return Nylas data object and API Request ID.

# File lib/nylas/handler/api_operations.rb, line 94
def put(path:, query_params: {}, request_body: nil, headers: {})
  response = execute(
    method: :put,
    path: path,
    query: query_params,
    payload: request_body,
    headers: headers,
    api_key: api_key,
    timeout: timeout
  )

  [response[:data], response[:request_id]]
end