Module: DevinApi::Endpoints::Enterprise

Defined in:
lib/devin_api/endpoints/enterprise.rb

Overview

Enterprise endpoints for the Devin API

Instance Method Summary collapse

Instance Method Details

#enterprise(options = {}) ⇒ DevinApi::Collection

Get enterprise collection

Parameters:

  • options (Hash) (defaults to: {}) —

    Query parameters

Returns:



11
12
13
# File 'lib/devin_api/endpoints/enterprise.rb', line 11

def enterprise(options = {})
  Collection.new(self, DevinApi::Resources::Enterprise, options)
end

#get_enterprise_consumption(params = {}) ⇒ Hash

Get enterprise consumption data

Parameters:

  • params (Hash) (defaults to: {}) —

    Query parameters

Options Hash (params):

  • :period (String) —

    Period for consumption data (e.g., 'current_month', 'previous_month')

  • :start_date (String) —

    Start date for custom period (ISO 8601 format)

  • :end_date (String) —

    End date for custom period (ISO 8601 format)

Returns:

  • (Hash) —

    Response body with consumption data

See Also:



35
36
37
# File 'lib/devin_api/endpoints/enterprise.rb', line 35

def get_enterprise_consumption(params = {})
  get('/v1/enterprise/consumption', params)
end

#list_audit_logs(params = {}) ⇒ Hash

List all audit logs

Parameters:

  • params (Hash) (defaults to: {}) —

    Query parameters

Options Hash (params):

  • :limit (Integer) —

    Maximum number of logs to return (default: 100, min: 1)

  • :before (String) —

    Filter logs before a specific timestamp

  • :after (String) —

    Filter logs after a specific timestamp

Returns:

  • (Hash) —

    Response body with audit logs

See Also:



23
24
25
# File 'lib/devin_api/endpoints/enterprise.rb', line 23

def list_audit_logs(params = {})
  get('/v1/enterprise/audit-logs', params)
end