Class: Carbon::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/carbon_ruby_sdk/api/users_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UsersApi

Returns a new instance of UsersApi.



15
16
17
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 15

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



13
14
15
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#delete(customer_ids:, extra: {}) ⇒ Object

Delete Users

Parameters:

  • customer_ids (Array<String>)
  • body (DeleteUsersInput)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



24
25
26
27
28
29
30
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 24

def delete(customer_ids:, extra: {})
  _body = {}
  _body[:customer_ids] = customer_ids if customer_ids != SENTINEL
  delete_users_input = _body
  api_response = delete_with_http_info_impl(delete_users_input, extra)
  api_response.data
end

#delete_with_http_info(customer_ids:, extra: {}) ⇒ Object

Delete Users

Parameters:

  • customer_ids (Array<String>)
  • body (DeleteUsersInput)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



37
38
39
40
41
42
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 37

def delete_with_http_info(customer_ids:, extra: {})
  _body = {}
  _body[:customer_ids] = customer_ids if customer_ids != SENTINEL
  delete_users_input = _body
  delete_with_http_info_impl(delete_users_input, extra)
end

#get(customer_id:, extra: {}) ⇒ Object

User Endpoint

Parameters:

  • customer_id (String)
  • body (UserRequestContent)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



116
117
118
119
120
121
122
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 116

def get(customer_id:, extra: {})
  _body = {}
  _body[:customer_id] = customer_id if customer_id != SENTINEL
  user_request_content = _body
  api_response = get_with_http_info_impl(user_request_content, extra)
  api_response.data
end

#get_with_http_info(customer_id:, extra: {}) ⇒ Object

User Endpoint

Parameters:

  • customer_id (String)
  • body (UserRequestContent)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



129
130
131
132
133
134
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 129

def get_with_http_info(customer_id:, extra: {})
  _body = {}
  _body[:customer_id] = customer_id if customer_id != SENTINEL
  user_request_content = _body
  get_with_http_info_impl(user_request_content, extra)
end

#list(pagination: SENTINEL, filters: SENTINEL, order_by: SENTINEL, order_dir: SENTINEL, include_count: false, extra: {}) ⇒ Object

List Users Endpoint

List users within an organization

Parameters:

  • pagination (Pagination) (defaults to: SENTINEL)
  • filters (ListUsersFilters) (defaults to: SENTINEL)
  • order_by (ListUsersOrderByTypes) (defaults to: SENTINEL)
  • order_dir (OrderDirV2) (defaults to: SENTINEL)
  • include_count (Boolean) (defaults to: false)
  • body (ListUsersRequest)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



214
215
216
217
218
219
220
221
222
223
224
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 214

def list(pagination: SENTINEL, filters: SENTINEL, order_by: SENTINEL, order_dir: SENTINEL, include_count: false, extra: {})
  _body = {}
  _body[:pagination] = pagination if pagination != SENTINEL
  _body[:filters] = filters if filters != SENTINEL
  _body[:order_by] = order_by if order_by != SENTINEL
  _body[:order_dir] = order_dir if order_dir != SENTINEL
  _body[:include_count] = include_count if include_count != SENTINEL
  list_users_request = _body
  api_response = list_with_http_info_impl(list_users_request, extra)
  api_response.data
end

#list_with_http_info(pagination: SENTINEL, filters: SENTINEL, order_by: SENTINEL, order_dir: SENTINEL, include_count: false, extra: {}) ⇒ Object

List Users Endpoint

List users within an organization

Parameters:

  • pagination (Pagination) (defaults to: SENTINEL)
  • filters (ListUsersFilters) (defaults to: SENTINEL)
  • order_by (ListUsersOrderByTypes) (defaults to: SENTINEL)
  • order_dir (OrderDirV2) (defaults to: SENTINEL)
  • include_count (Boolean) (defaults to: false)
  • body (ListUsersRequest)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



237
238
239
240
241
242
243
244
245
246
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 237

def list_with_http_info(pagination: SENTINEL, filters: SENTINEL, order_by: SENTINEL, order_dir: SENTINEL, include_count: false, extra: {})
  _body = {}
  _body[:pagination] = pagination if pagination != SENTINEL
  _body[:filters] = filters if filters != SENTINEL
  _body[:order_by] = order_by if order_by != SENTINEL
  _body[:order_dir] = order_dir if order_dir != SENTINEL
  _body[:include_count] = include_count if include_count != SENTINEL
  list_users_request = _body
  list_with_http_info_impl(list_users_request, extra)
end

#toggle_user_features(configuration_key_name:, value:, extra: {}) ⇒ Object

Toggle User Features

Parameters:



323
324
325
326
327
328
329
330
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 323

def toggle_user_features(configuration_key_name:, value:, extra: {})
  _body = {}
  _body[:configuration_key_name] = configuration_key_name if configuration_key_name != SENTINEL
  _body[:value] = value if value != SENTINEL
  modify_user_configuration_input = _body
  api_response = toggle_user_features_with_http_info_impl(modify_user_configuration_input, extra)
  api_response.data
end

#toggle_user_features_with_http_info(configuration_key_name:, value:, extra: {}) ⇒ Object

Toggle User Features

Parameters:



338
339
340
341
342
343
344
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 338

def toggle_user_features_with_http_info(configuration_key_name:, value:, extra: {})
  _body = {}
  _body[:configuration_key_name] = configuration_key_name if configuration_key_name != SENTINEL
  _body[:value] = value if value != SENTINEL
  modify_user_configuration_input = _body
  toggle_user_features_with_http_info_impl(modify_user_configuration_input, extra)
end

#update_users(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, max_characters: SENTINEL, max_characters_per_file: SENTINEL, max_characters_per_upload: SENTINEL, auto_sync_interval: SENTINEL, extra: {}) ⇒ Object

Update Users

Parameters:

  • customer_ids (Array<String>)

    List of organization supplied user IDs

  • auto_sync_enabled_sources (AutoSyncEnabledSourcesProperty) (defaults to: SENTINEL)
  • max_files (Integer) (defaults to: SENTINEL)

    Custom file upload limit for the user over all user’s files across all uploads. If set, then the user will not be allowed to upload more files than this limit. If not set, or if set to -1, then the user will have no limit.

  • max_files_per_upload (Integer) (defaults to: SENTINEL)

    Custom file upload limit for the user across a single upload. If set, then the user will not be allowed to upload more files than this limit in a single upload. If not set, or if set to -1, then the user will have no limit.

  • max_characters (Integer) (defaults to: SENTINEL)

    Custom character upload limit for the user over all user’s files across all uploads. If set, then the user will not be allowed to upload more characters than this limit. If not set, or if set to -1, then the user will have no limit.

  • max_characters_per_file (Integer) (defaults to: SENTINEL)

    A single file upload from the user can not exceed this character limit. If set, then the file will not be synced if it exceeds this limit. If not set, or if set to -1, then the user will have no limit.

  • max_characters_per_upload (Integer) (defaults to: SENTINEL)

    Custom character upload limit for the user across a single upload. If set, then the user won’t be able to sync more than this many characters in one upload. If not set, or if set to -1, then the user will have no limit.

  • auto_sync_interval (Integer) (defaults to: SENTINEL)

    The interval in hours at which the user’s data sources should be synced. If not set or set to -1, the user will be synced at the organization level interval or default interval if that is also not set. Must be one of [3, 6, 12, 24]

  • body (UpdateUsersInput)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



425
426
427
428
429
430
431
432
433
434
435
436
437
438
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 425

def update_users(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, max_characters: SENTINEL, max_characters_per_file: SENTINEL, max_characters_per_upload: SENTINEL, auto_sync_interval: SENTINEL, extra: {})
  _body = {}
  _body[:auto_sync_enabled_sources] = auto_sync_enabled_sources if auto_sync_enabled_sources != SENTINEL
  _body[:max_files] = max_files if max_files != SENTINEL
  _body[:max_files_per_upload] = max_files_per_upload if max_files_per_upload != SENTINEL
  _body[:max_characters] = max_characters if max_characters != SENTINEL
  _body[:max_characters_per_file] = max_characters_per_file if max_characters_per_file != SENTINEL
  _body[:max_characters_per_upload] = max_characters_per_upload if max_characters_per_upload != SENTINEL
  _body[:auto_sync_interval] = auto_sync_interval if auto_sync_interval != SENTINEL
  _body[:customer_ids] = customer_ids if customer_ids != SENTINEL
  update_users_input = _body
  api_response = update_users_with_http_info_impl(update_users_input, extra)
  api_response.data
end

#update_users_with_http_info(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, max_characters: SENTINEL, max_characters_per_file: SENTINEL, max_characters_per_upload: SENTINEL, auto_sync_interval: SENTINEL, extra: {}) ⇒ Object

Update Users

Parameters:

  • customer_ids (Array<String>)

    List of organization supplied user IDs

  • auto_sync_enabled_sources (AutoSyncEnabledSourcesProperty) (defaults to: SENTINEL)
  • max_files (Integer) (defaults to: SENTINEL)

    Custom file upload limit for the user over all user’s files across all uploads. If set, then the user will not be allowed to upload more files than this limit. If not set, or if set to -1, then the user will have no limit.

  • max_files_per_upload (Integer) (defaults to: SENTINEL)

    Custom file upload limit for the user across a single upload. If set, then the user will not be allowed to upload more files than this limit in a single upload. If not set, or if set to -1, then the user will have no limit.

  • max_characters (Integer) (defaults to: SENTINEL)

    Custom character upload limit for the user over all user’s files across all uploads. If set, then the user will not be allowed to upload more characters than this limit. If not set, or if set to -1, then the user will have no limit.

  • max_characters_per_file (Integer) (defaults to: SENTINEL)

    A single file upload from the user can not exceed this character limit. If set, then the file will not be synced if it exceeds this limit. If not set, or if set to -1, then the user will have no limit.

  • max_characters_per_upload (Integer) (defaults to: SENTINEL)

    Custom character upload limit for the user across a single upload. If set, then the user won’t be able to sync more than this many characters in one upload. If not set, or if set to -1, then the user will have no limit.

  • auto_sync_interval (Integer) (defaults to: SENTINEL)

    The interval in hours at which the user’s data sources should be synced. If not set or set to -1, the user will be synced at the organization level interval or default interval if that is also not set. Must be one of [3, 6, 12, 24]

  • body (UpdateUsersInput)
  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



452
453
454
455
456
457
458
459
460
461
462
463
464
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 452

def update_users_with_http_info(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, max_characters: SENTINEL, max_characters_per_file: SENTINEL, max_characters_per_upload: SENTINEL, auto_sync_interval: SENTINEL, extra: {})
  _body = {}
  _body[:auto_sync_enabled_sources] = auto_sync_enabled_sources if auto_sync_enabled_sources != SENTINEL
  _body[:max_files] = max_files if max_files != SENTINEL
  _body[:max_files_per_upload] = max_files_per_upload if max_files_per_upload != SENTINEL
  _body[:max_characters] = max_characters if max_characters != SENTINEL
  _body[:max_characters_per_file] = max_characters_per_file if max_characters_per_file != SENTINEL
  _body[:max_characters_per_upload] = max_characters_per_upload if max_characters_per_upload != SENTINEL
  _body[:auto_sync_interval] = auto_sync_interval if auto_sync_interval != SENTINEL
  _body[:customer_ids] = customer_ids if customer_ids != SENTINEL
  update_users_input = _body
  update_users_with_http_info_impl(update_users_input, extra)
end

#who_am_i(extra: {}) ⇒ Object

Me Endpoint

Parameters:

  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



536
537
538
539
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 536

def who_am_i(extra: {})
  api_response = who_am_i_with_http_info_impl(extra)
  api_response.data
end

#who_am_i_with_http_info(extra: {}) ⇒ Object

Me Endpoint

Parameters:

  • extra (Hash) (defaults to: {})

    additional parameters to pass along through :header_params, :query_params, or parameter name



544
545
546
# File 'lib/carbon_ruby_sdk/api/users_api.rb', line 544

def who_am_i_with_http_info(extra: {})
  who_am_i_with_http_info_impl(extra)
end