class Nylas::Grants
Public Instance Methods
destroy(grant_id:)
click to toggle source
Delete a grant.
@param grant_id [String] The id of the grant to delete. @return [Array(TrueClass, String)] True and the API Request ID for the delete operation.
# File lib/nylas/resources/grants.rb, line 51 def destroy(grant_id:) _, request_id = delete( path: "#{api_uri}/v3/grants/#{grant_id}" ) [true, request_id] end
find(grant_id:)
click to toggle source
Return a grant.
@param grant_id [String] The id of the grant to return. @return [Array(Hash, String)] The grant and API request ID.
# File lib/nylas/resources/grants.rb, line 29 def find(grant_id:) get( path: "#{api_uri}/v3/grants/#{grant_id}" ) end
list(query_params: nil)
click to toggle source
Return all grants.
@param query_params [Hash, nil] Query params to pass to the request. @return [Array(Array(Hash), String)] The list of grants and API Request ID.
# File lib/nylas/resources/grants.rb, line 18 def list(query_params: nil) get( path: "#{api_uri}/v3/grants", query_params: query_params ) end
update(grant_id:, request_body:)
click to toggle source
Update a grant.
@param grant_id [String] The id of the grant to update. @param request_body [Hash] The values to update the grant with @return [Array(Hash, String)] The updated grant and API Request ID.
# File lib/nylas/resources/grants.rb, line 40 def update(grant_id:, request_body:) patch( path: "#{api_uri}/v3/grants/#{grant_id}", request_body: request_body ) end