Class: Nylas::Configurations
- Includes:
- ApiOperations::Delete, ApiOperations::Get, ApiOperations::Post, ApiOperations::Put
- Defined in:
- lib/nylas/resources/configurations.rb
Overview
Nylas Scheduler Configurations API
Instance Method Summary collapse
-
#create(identifier:, request_body:) ⇒ Array(Hash, String)
Create a configuration.
-
#destroy(identifier:, configuration_id:) ⇒ Array(TrueClass, String)
Delete a configuration.
-
#find(identifier:, configuration_id:) ⇒ Array(Hash, String)
Return a Configuration.
-
#list(identifier:, query_params: nil) ⇒ Array(Array(Hash), String, String)
Return all Scheduler Configurations.
-
#update(identifier:, configuration_id:, request_body:) ⇒ Array(Hash, String)
Update a configuration.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Nylas::Resource
Instance Method Details
#create(identifier:, request_body:) ⇒ Array(Hash, String)
Create a configuration.
43 44 45 46 47 48 |
# File 'lib/nylas/resources/configurations.rb', line 43 def create(identifier:, request_body:) post( path: "#{api_uri}/v3/grants/#{identifier}/scheduling/configurations", request_body: request_body ) end |
#destroy(identifier:, configuration_id:) ⇒ Array(TrueClass, String)
Delete a configuration.
68 69 70 71 72 73 74 |
# File 'lib/nylas/resources/configurations.rb', line 68 def destroy(identifier:, configuration_id:) _, request_id = delete( path: "#{api_uri}/v3/grants/#{identifier}/scheduling/configurations/#{configuration_id}" ) [true, request_id] end |
#find(identifier:, configuration_id:) ⇒ Array(Hash, String)
Return a Configuration.
32 33 34 35 36 |
# File 'lib/nylas/resources/configurations.rb', line 32 def find(identifier:, configuration_id:) get( path: "#{api_uri}/v3/grants/#{identifier}/scheduling/configurations/#{configuration_id}" ) end |
#list(identifier:, query_params: nil) ⇒ Array(Array(Hash), String, String)
Return all Scheduler Configurations.
and next cursor.
20 21 22 23 24 25 |
# File 'lib/nylas/resources/configurations.rb', line 20 def list(identifier:, query_params: nil) get_list( path: "#{api_uri}/v3/grants/#{identifier}/scheduling/configurations", query_params: query_params ) end |
#update(identifier:, configuration_id:, request_body:) ⇒ Array(Hash, String)
Update a configuration.
56 57 58 59 60 61 |
# File 'lib/nylas/resources/configurations.rb', line 56 def update(identifier:, configuration_id:, request_body:) put( path: "#{api_uri}/v3/grants/#{identifier}/scheduling/configurations/#{configuration_id}", request_body: request_body ) end |