Class: DocuSign_Admin::AccountsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_admin/api/accounts_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = AccountsApi.default) ⇒ AccountsApi

Returns a new instance of AccountsApi.



44
45
46
# File 'lib/docusign_admin/api/accounts_api.rb', line 44

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



42
43
44
# File 'lib/docusign_admin/api/accounts_api.rb', line 42

def api_client
  @api_client
end

Instance Method Details

#get_groups(organization_id, account_id, options = DocuSign_Admin::GetGroupsOptions.default) ⇒ MemberGroupsResponse

Returns the list of groups in an account. Required scopes: group_read

Parameters:

  • organization_id

    The organization ID Guid

  • account_id

    The account ID Guid

  • DocuSign_Admin::GetGroupsOptions

    Options for modifying the behavior of the function.

Returns:



54
55
56
57
# File 'lib/docusign_admin/api/accounts_api.rb', line 54

def get_groups(organization_id, , options = DocuSign_Admin::GetGroupsOptions.default)
  data, _status_code, _headers = get_groups_with_http_info(organization_id, , options)
  return data
end

#get_groups_with_http_info(organization_id, account_id, options = DocuSign_Admin::GetGroupsOptions.default) ⇒ Array<(MemberGroupsResponse, Fixnum, Hash)>

Returns the list of groups in an account. Required scopes: group_read

Parameters:

  • organization_id

    The organization ID Guid

  • account_id

    The account ID Guid

  • DocuSign_Admin::GetGroupsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(MemberGroupsResponse, Fixnum, Hash)>)

    MemberGroupsResponse data, response status code and response headers



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/docusign_admin/api/accounts_api.rb', line 65

def get_groups_with_http_info(organization_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 .nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/accounts/{accountId}/groups".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', .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) ⇒ OrganizationsResponse

Returns the list of organizations of which the authenticated user is a member. Required scopes: organization_read

Parameters:

  • DocuSign_Admin::GetOrganizationsOptions

    Options for modifying the behavior of the function.

Returns:



112
113
114
115
# 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) ⇒ Array<(OrganizationsResponse, Fixnum, Hash)>

Returns the list of organizations of which the authenticated user is a member. Required scopes: organization_read

Parameters:

  • DocuSign_Admin::GetOrganizationsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(OrganizationsResponse, Fixnum, Hash)>)

    OrganizationsResponse data, response status code and response headers



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# 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) ⇒ PermissionsResponse

Returns the list of permission profiles in an account. Required scopes: permission_read

Parameters:

  • organization_id

    The organization ID Guid

  • account_id

    The account ID Guid

Returns:



163
164
165
166
# File 'lib/docusign_admin/api/accounts_api.rb', line 163

def get_permissions(organization_id, )
  data, _status_code, _headers = get_permissions_with_http_info(organization_id, )
  return data
end

#get_permissions_with_http_info(organization_id, account_id) ⇒ Array<(PermissionsResponse, Fixnum, Hash)>

Returns the list of permission profiles in an account. Required scopes: permission_read

Parameters:

  • organization_id

    The organization ID Guid

  • account_id

    The account ID Guid

Returns:

  • (Array<(PermissionsResponse, Fixnum, Hash)>)

    PermissionsResponse data, response status code and response headers



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/docusign_admin/api/accounts_api.rb', line 173

def get_permissions_with_http_info(organization_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 .nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/accounts/{accountId}/permissions".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', .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