class DocuSign_Admin::AccountsApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

get_groups(organization_id, account_id, options = DocuSign_Admin::GetGroupsOptions.default) click to toggle source

Returns the list of groups in an account. Required scopes: group_read @param organization_id The organization ID Guid @param account_id The account ID Guid @param DocuSign_Admin::GetGroupsOptions Options for modifying the behavior of the function. @return [MemberGroupsResponse]

# File lib/docusign_admin/api/accounts_api.rb, line 54
def get_groups(organization_id, account_id, options = DocuSign_Admin::GetGroupsOptions.default)
  data, _status_code, _headers = get_groups_with_http_info(organization_id, account_id, options)
  return data
end
get_groups_with_http_info(organization_id, account_id, options = DocuSign_Admin::GetGroupsOptions.default) click to toggle source

Returns the list of groups in an account. Required scopes: group_read @param organization_id The organization ID Guid @param account_id The account ID Guid @param DocuSign_Admin::GetGroupsOptions Options for modifying the behavior of the function. @return [Array<(MemberGroupsResponse, Fixnum, Hash)>] MemberGroupsResponse data, response status code and response headers

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

  # query parameters
  query_params = {}
  query_params[:'start'] = options.start if !options.start.nil?
  query_params[:'take'] = options.take if !options.take.nil?
  query_params[:'end'] = options._end if !options._end.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 => 'MemberGroupsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountsApi#get_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_organizations(options = DocuSign_Admin::GetOrganizationsOptions.default) click to toggle source

Returns the list of organizations of which the authenticated user is a member. Required scopes: organization_read @param DocuSign_Admin::GetOrganizationsOptions Options for modifying the behavior of the function. @return [OrganizationsResponse]

# File lib/docusign_admin/api/accounts_api.rb, line 112
def get_organizations(options = DocuSign_Admin::GetOrganizationsOptions.default)
  data, _status_code, _headers = get_organizations_with_http_info(options)
  return data
end
get_organizations_with_http_info(options = DocuSign_Admin::GetOrganizationsOptions.default) click to toggle source

Returns the list of organizations of which the authenticated user is a member. Required scopes: organization_read @param DocuSign_Admin::GetOrganizationsOptions Options for modifying the behavior of the function. @return [Array<(OrganizationsResponse, Fixnum, Hash)>] OrganizationsResponse data, response status code and response headers

# File lib/docusign_admin/api/accounts_api.rb, line 121
def get_organizations_with_http_info(options = DocuSign_Admin::GetOrganizationsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AccountsApi.get_organizations ..."
  end
  # resource path
  local_var_path = "/v2/organizations".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'mode'] = options.mode if !options.mode.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 => 'OrganizationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountsApi#get_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_permissions(organization_id, account_id) click to toggle source

Returns the list of permission profiles in an account. Required scopes: permission_read @param organization_id The organization ID Guid @param account_id The account ID Guid @return [PermissionsResponse]

# File lib/docusign_admin/api/accounts_api.rb, line 163
def get_permissions(organization_id, account_id)
  data, _status_code, _headers = get_permissions_with_http_info(organization_id, account_id)
  return data
end
get_permissions_with_http_info(organization_id, account_id) click to toggle source

Returns the list of permission profiles in an account. Required scopes: permission_read @param organization_id The organization ID Guid @param account_id The account ID Guid @return [Array<(PermissionsResponse, Fixnum, Hash)>] PermissionsResponse data, response status code and response headers

# File lib/docusign_admin/api/accounts_api.rb, line 173
def get_permissions_with_http_info(organization_id, account_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AccountsApi.get_permissions ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling AccountsApi.get_permissions" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_permissions" if account_id.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/accounts/{accountId}/permissions".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 = 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 => 'PermissionsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountsApi#get_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end