Class: Nylas::Grants
- Includes:
 - ApiOperations::Delete, ApiOperations::Get, ApiOperations::Patch, ApiOperations::Put
 
- Defined in:
 - lib/nylas/resources/grants.rb
 
Overview
Grants
Instance Method Summary collapse
- 
  
    
      #destroy(grant_id:)  ⇒ Array(TrueClass, String) 
    
    
  
  
  
  
  
  
  
  
  
    
Delete a grant.
 - 
  
    
      #find(grant_id:)  ⇒ Array(Hash, String) 
    
    
  
  
  
  
  
  
  
  
  
    
Return a grant.
 - 
  
    
      #list(query_params: nil)  ⇒ Array(Array(Hash), String) 
    
    
  
  
  
  
  
  
  
  
  
    
Return all grants.
 - 
  
    
      #update(grant_id:, request_body:)  ⇒ Array(Hash, String) 
    
    
  
  
  
  
  
  
  
  
  
    
Update a grant.
 
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Nylas::Resource
Instance Method Details
#destroy(grant_id:) ⇒ Array(TrueClass, String)
Delete a grant.
      51 52 53 54 55 56 57  | 
    
      # 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:) ⇒ Array(Hash, String)
Return a grant.
      29 30 31 32 33  | 
    
      # 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) ⇒ Array(Array(Hash), String)
Return all grants.
      18 19 20 21 22 23  | 
    
      # 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:) ⇒ Array(Hash, String)
Update a grant.
      40 41 42 43 44 45  | 
    
      # 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  |