class DocuSign_Admin::DSGroupsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = DSGroupsApi.default) click to toggle source
# File lib/docusign_admin/api/ds_groups_api.rb, line 44
def initialize(api_client = DSGroupsApi.default)
  @api_client = api_client
end

Public Instance Methods

add_ds_group(organization_id, account_id, add_request) click to toggle source

Add a new DSGroup Required scopes: user_write @param organization_id The organization ID GUID @param account_id The account ID GUID @param add_request Add DSGroup request object @return [DSGroupResponse]

# File lib/docusign_admin/api/ds_groups_api.rb, line 54
def add_ds_group(organization_id, account_id, add_request)
  data, _status_code, _headers = add_ds_group_with_http_info(organization_id, account_id,  add_request)
  return data
end
add_ds_group_users(organization_id, account_id, ds_group_id, d_s_group_users_add_request) click to toggle source

Add list of users to a DSGroup Required scopes: user_write @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The DSGroup ID GUID @param d_s_group_users_add_request Add DSGroup users request object @return [AddDSGroupAndUsersResponse]

# File lib/docusign_admin/api/ds_groups_api.rb, line 114
def add_ds_group_users(organization_id, account_id, ds_group_id, d_s_group_users_add_request)
  data, _status_code, _headers = add_ds_group_users_with_http_info(organization_id, account_id, ds_group_id,  d_s_group_users_add_request)
  return data
end
add_ds_group_users_with_http_info(organization_id, account_id, ds_group_id, d_s_group_users_add_request) click to toggle source

Add list of users to a DSGroup Required scopes: user_write @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The DSGroup ID GUID @param d_s_group_users_add_request Add DSGroup users request object @return [Array<(AddDSGroupAndUsersResponse, Fixnum, Hash)>] AddDSGroupAndUsersResponse data, response status code and response headers

# File lib/docusign_admin/api/ds_groups_api.rb, line 126
def add_ds_group_users_with_http_info(organization_id, account_id, ds_group_id, d_s_group_users_add_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DSGroupsApi.add_ds_group_users ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling DSGroupsApi.add_ds_group_users" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling DSGroupsApi.add_ds_group_users" if account_id.nil?
  # verify the required parameter 'ds_group_id' is set
  fail ArgumentError, "Missing the required parameter 'ds_group_id' when calling DSGroupsApi.add_ds_group_users" if ds_group_id.nil?
  # verify the required parameter 'd_s_group_users_add_request' is set
  fail ArgumentError, "Missing the required parameter 'd_s_group_users_add_request' when calling DSGroupsApi.add_ds_group_users" if d_s_group_users_add_request.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/dsgroups/{dsGroupId}/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'dsGroupId' + '}', ds_group_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(d_s_group_users_add_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AddDSGroupAndUsersResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DSGroupsApi#add_ds_group_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
add_ds_group_with_http_info(organization_id, account_id, add_request) click to toggle source

Add a new DSGroup Required scopes: user_write @param organization_id The organization ID GUID @param account_id The account ID GUID @param add_request Add DSGroup request object @return [Array<(DSGroupResponse, Fixnum, Hash)>] DSGroupResponse data, response status code and response headers

# File lib/docusign_admin/api/ds_groups_api.rb, line 65
def add_ds_group_with_http_info(organization_id, account_id, add_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DSGroupsApi.add_ds_group ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling DSGroupsApi.add_ds_group" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling DSGroupsApi.add_ds_group" if account_id.nil?
  # verify the required parameter 'add_request' is set
  fail ArgumentError, "Missing the required parameter 'add_request' when calling DSGroupsApi.add_ds_group" if add_request.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/dsgroups".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(add_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DSGroupResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DSGroupsApi#add_ds_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_ds_group(organization_id, account_id, ds_group_id) click to toggle source

Delete a DSGroup Required scopes: user_write @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The DSGroup ID GUID @return [nil]

# File lib/docusign_admin/api/ds_groups_api.rb, line 176
def delete_ds_group(organization_id, account_id, ds_group_id)
  delete_ds_group_with_http_info(organization_id, account_id, ds_group_id)
  return nil
end
delete_ds_group_with_http_info(organization_id, account_id, ds_group_id) click to toggle source

Delete a DSGroup Required scopes: user_write @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The DSGroup ID GUID @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/docusign_admin/api/ds_groups_api.rb, line 187
def delete_ds_group_with_http_info(organization_id, account_id, ds_group_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DSGroupsApi.delete_ds_group ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling DSGroupsApi.delete_ds_group" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling DSGroupsApi.delete_ds_group" if account_id.nil?
  # verify the required parameter 'ds_group_id' is set
  fail ArgumentError, "Missing the required parameter 'ds_group_id' when calling DSGroupsApi.delete_ds_group" if ds_group_id.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/dsgroups/{dsGroupId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'dsGroupId' + '}', ds_group_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DSGroupsApi#delete_ds_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_ds_group(organization_id, account_id, ds_group_id) click to toggle source

Get list of DSGroup Required scopes: user_read @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The dsGroup ID GUID @return [DSGroupResponse]

# File lib/docusign_admin/api/ds_groups_api.rb, line 234
def get_ds_group(organization_id, account_id, ds_group_id)
  data, _status_code, _headers = get_ds_group_with_http_info(organization_id, account_id, ds_group_id)
  return data
end
get_ds_group_users(organization_id, account_id, ds_group_id, options = DocuSign_Admin::GetDSGroupUsersOptions.default) click to toggle source

Get list of users in a DSGroup Required scopes: user_read @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The DSGroup ID GUID @param DocuSign_Admin::GetDSGroupUsersOptions Options for modifying the behavior of the function. @return [DSGroupAndUsersResponse]

# File lib/docusign_admin/api/ds_groups_api.rb, line 294
def get_ds_group_users(organization_id, account_id, ds_group_id, options = DocuSign_Admin::GetDSGroupUsersOptions.default)
  data, _status_code, _headers = get_ds_group_users_with_http_info(organization_id, account_id, ds_group_id, options)
  return data
end
get_ds_group_users_with_http_info(organization_id, account_id, ds_group_id, options = DocuSign_Admin::GetDSGroupUsersOptions.default) click to toggle source

Get list of users in a DSGroup Required scopes: user_read @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The DSGroup ID GUID @param DocuSign_Admin::GetDSGroupUsersOptions Options for modifying the behavior of the function. @return [Array<(DSGroupAndUsersResponse, Fixnum, Hash)>] DSGroupAndUsersResponse data, response status code and response headers

# File lib/docusign_admin/api/ds_groups_api.rb, line 306
def get_ds_group_users_with_http_info(organization_id, account_id, ds_group_id, options = DocuSign_Admin::GetDSGroupUsersOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DSGroupsApi.get_ds_group_users ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling DSGroupsApi.get_ds_group_users" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling DSGroupsApi.get_ds_group_users" if account_id.nil?
  # verify the required parameter 'ds_group_id' is set
  fail ArgumentError, "Missing the required parameter 'ds_group_id' when calling DSGroupsApi.get_ds_group_users" if ds_group_id.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/dsgroups/{dsGroupId}/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'dsGroupId' + '}', ds_group_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'page'] = options.page if !options.page.nil?
  query_params[:'page_size'] = options.page_size if !options.page_size.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DSGroupAndUsersResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DSGroupsApi#get_ds_group_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_ds_group_with_http_info(organization_id, account_id, ds_group_id) click to toggle source

Get list of DSGroup Required scopes: user_read @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The dsGroup ID GUID @return [Array<(DSGroupResponse, Fixnum, Hash)>] DSGroupResponse data, response status code and response headers

# File lib/docusign_admin/api/ds_groups_api.rb, line 245
def get_ds_group_with_http_info(organization_id, account_id, ds_group_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DSGroupsApi.get_ds_group ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling DSGroupsApi.get_ds_group" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling DSGroupsApi.get_ds_group" if account_id.nil?
  # verify the required parameter 'ds_group_id' is set
  fail ArgumentError, "Missing the required parameter 'ds_group_id' when calling DSGroupsApi.get_ds_group" if ds_group_id.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/dsgroups/{dsGroupId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'dsGroupId' + '}', ds_group_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DSGroupResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DSGroupsApi#get_ds_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_ds_groups(organization_id, account_id, options = DocuSign_Admin::GetDSGroupsOptions.default) click to toggle source

Get list of DSGroups Required scopes: user_read @param organization_id The organization ID GUID @param account_id The account ID GUID @param DocuSign_Admin::GetDSGroupsOptions Options for modifying the behavior of the function. @return [DSGroupListResponse]

# File lib/docusign_admin/api/ds_groups_api.rb, line 356
def get_ds_groups(organization_id, account_id, options = DocuSign_Admin::GetDSGroupsOptions.default)
  data, _status_code, _headers = get_ds_groups_with_http_info(organization_id, account_id, options)
  return data
end
get_ds_groups_with_http_info(organization_id, account_id, options = DocuSign_Admin::GetDSGroupsOptions.default) click to toggle source

Get list of DSGroups Required scopes: user_read @param organization_id The organization ID GUID @param account_id The account ID GUID @param DocuSign_Admin::GetDSGroupsOptions Options for modifying the behavior of the function. @return [Array<(DSGroupListResponse, Fixnum, Hash)>] DSGroupListResponse data, response status code and response headers

# File lib/docusign_admin/api/ds_groups_api.rb, line 367
def get_ds_groups_with_http_info(organization_id, account_id, options = DocuSign_Admin::GetDSGroupsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DSGroupsApi.get_ds_groups ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling DSGroupsApi.get_ds_groups" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling DSGroupsApi.get_ds_groups" if account_id.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/dsgroups".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'page'] = options.page if !options.page.nil?
  query_params[:'page_size'] = options.page_size if !options.page_size.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DSGroupListResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DSGroupsApi#get_ds_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
remove_ds_group_users(organization_id, account_id, ds_group_id, d_s_group_users_remove_request) click to toggle source

Remove users from a DSGroup Required scopes: user_write @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The DSGroup ID GUID @param d_s_group_users_remove_request Remove DSGroup users request object @return [RemoveDSGroupUsersResponse]

# File lib/docusign_admin/api/ds_groups_api.rb, line 416
def remove_ds_group_users(organization_id, account_id, ds_group_id, d_s_group_users_remove_request)
  data, _status_code, _headers = remove_ds_group_users_with_http_info(organization_id, account_id, ds_group_id,  d_s_group_users_remove_request)
  return data
end
remove_ds_group_users_with_http_info(organization_id, account_id, ds_group_id, d_s_group_users_remove_request) click to toggle source

Remove users from a DSGroup Required scopes: user_write @param organization_id The organization ID GUID @param account_id The account ID GUID @param ds_group_id The DSGroup ID GUID @param d_s_group_users_remove_request Remove DSGroup users request object @return [Array<(RemoveDSGroupUsersResponse, Fixnum, Hash)>] RemoveDSGroupUsersResponse data, response status code and response headers

# File lib/docusign_admin/api/ds_groups_api.rb, line 428
def remove_ds_group_users_with_http_info(organization_id, account_id, ds_group_id, d_s_group_users_remove_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DSGroupsApi.remove_ds_group_users ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling DSGroupsApi.remove_ds_group_users" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling DSGroupsApi.remove_ds_group_users" if account_id.nil?
  # verify the required parameter 'ds_group_id' is set
  fail ArgumentError, "Missing the required parameter 'ds_group_id' when calling DSGroupsApi.remove_ds_group_users" if ds_group_id.nil?
  # verify the required parameter 'd_s_group_users_remove_request' is set
  fail ArgumentError, "Missing the required parameter 'd_s_group_users_remove_request' when calling DSGroupsApi.remove_ds_group_users" if d_s_group_users_remove_request.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/dsgroups/{dsGroupId}/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'dsGroupId' + '}', ds_group_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(d_s_group_users_remove_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RemoveDSGroupUsersResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DSGroupsApi#remove_ds_group_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end