Class: Nylas::Sessions
- Includes:
- ApiOperations::Delete, ApiOperations::Post
- Defined in:
- lib/nylas/resources/sessions.rb
Overview
Nylas Messages API
Instance Method Summary collapse
-
#create(request_body:) ⇒ Array(Hash, String)
Create a session for a configuration.
-
#destroy(session_id:) ⇒ Array(TrueClass, String)
Delete a session for a configuration.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Nylas::Resource
Instance Method Details
#create(request_body:) ⇒ Array(Hash, String)
Create a session for a configuration.
15 16 17 18 19 20 |
# 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:) ⇒ Array(TrueClass, String)
Delete a session for a configuration.
25 26 27 28 29 30 31 |
# 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 |