class Nylas::Sessions

Nylas Messages API

Public Instance Methods

create(request_body:) click to toggle source

Create a session for a configuration. @param request_body [Hash] The values to create a configuration sessions. @return [Array(Hash, String)] The created configuration and API Request ID.

# File lib/nylas/resources/sessions.rb, line 15
def create(request_body:)
  post(
    path: "#{api_uri}/v3/scheduling/sessions",
    request_body: request_body
  )
end
destroy(session_id:) click to toggle source

Delete a session for a configuration. @param session_id [String] The id of the session to delete. @return [Array(TrueClass, String)] True and the API Request ID for the delete operation.

# File lib/nylas/resources/sessions.rb, line 25
def destroy(session_id:)
  _, request_id = delete(
    path: "#{api_uri}/v3/scheduling/sessions/#{session_id}"
  )

  [true, request_id]
end