Class: DocuSign_eSign::FoldersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/api/folders_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = FoldersApi.default) ⇒ FoldersApi

Returns a new instance of FoldersApi.



107
108
109
# File 'lib/docusign_esign/api/folders_api.rb', line 107

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



105
106
107
# File 'lib/docusign_esign/api/folders_api.rb', line 105

def api_client
  @api_client
end

Instance Method Details

#list(account_id, options = DocuSign_eSign::ListOptions.default) ⇒ FoldersResponse

Gets a list of the folders for the account. Retrieves a list of the folders for the account, including the folder hierarchy. You can specify whether to return just the template folder or template folder and normal folders by setting the ‘template` query string parameter.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListOptions

    Options for modifying the behavior of the function.

Returns:



116
117
118
119
# File 'lib/docusign_esign/api/folders_api.rb', line 116

def list(, options = DocuSign_eSign::ListOptions.default)
  data, _status_code, _headers = list_with_http_info(, options)
  return data
end

#list_items(account_id, folder_id, options = DocuSign_eSign::ListItemsOptions.default) ⇒ FolderItemsResponse

Gets a list of the envelopes in the specified folder. Retrieves a list of the envelopes in the specified folder. You can narrow the query by specifying search criteria in the query string parameters.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • folder_id

    The ID of the folder being accessed.

  • DocuSign_eSign::ListItemsOptions

    Options for modifying the behavior of the function.

Returns:



175
176
177
178
# File 'lib/docusign_esign/api/folders_api.rb', line 175

def list_items(, folder_id, options = DocuSign_eSign::ListItemsOptions.default)
  data, _status_code, _headers = list_items_with_http_info(, folder_id, options)
  return data
end

#list_items_with_http_info(account_id, folder_id, options = DocuSign_eSign::ListItemsOptions.default) ⇒ Array<(FolderItemsResponse, Fixnum, Hash)>

Gets a list of the envelopes in the specified folder. Retrieves a list of the envelopes in the specified folder. You can narrow the query by specifying search criteria in the query string parameters.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • folder_id

    The ID of the folder being accessed.

  • DocuSign_eSign::ListItemsOptions

    Options for modifying the behavior of the function.

Returns:

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

    FolderItemsResponse data, response status code and response headers



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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/docusign_esign/api/folders_api.rb', line 186

def list_items_with_http_info(, folder_id, options = DocuSign_eSign::ListItemsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: FoldersApi.list_items ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling FoldersApi.list_items" if .nil?
  # verify the required parameter 'folder_id' is set
  fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.list_items" if folder_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/folders/{folderId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'folderId' + '}', folder_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'from_date'] = options.from_date if !options.from_date.nil?
  query_params[:'include_items'] = options.include_items if !options.include_items.nil?
  query_params[:'owner_email'] = options.owner_email if !options.owner_email.nil?
  query_params[:'owner_name'] = options.owner_name if !options.owner_name.nil?
  query_params[:'search_text'] = options.search_text if !options.search_text.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?
  query_params[:'status'] = options.status if !options.status.nil?
  query_params[:'to_date'] = options.to_date if !options.to_date.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['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 => 'FolderItemsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FoldersApi#list_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_with_http_info(account_id, options = DocuSign_eSign::ListOptions.default) ⇒ Array<(FoldersResponse, Fixnum, Hash)>

Gets a list of the folders for the account. Retrieves a list of the folders for the account, including the folder hierarchy. You can specify whether to return just the template folder or template folder and normal folders by setting the &#x60;template&#x60; query string parameter.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListOptions

    Options for modifying the behavior of the function.

Returns:

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

    FoldersResponse data, response status code and response headers



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
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/docusign_esign/api/folders_api.rb', line 126

def list_with_http_info(, options = DocuSign_eSign::ListOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: FoldersApi.list ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling FoldersApi.list" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/folders".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'count'] = options.count if !options.count.nil?
  query_params[:'include'] = options.include if !options.include.nil?
  query_params[:'include_items'] = options.include_items if !options.include_items.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?
  query_params[:'sub_folder_depth'] = options.sub_folder_depth if !options.sub_folder_depth.nil?
  query_params[:'template'] = options.template if !options.template.nil?
  query_params[:'user_filter'] = options.user_filter if !options.user_filter.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['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 => 'FoldersResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FoldersApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#move_envelopes(account_id, folder_id, folders_request) ⇒ FoldersResponse

Moves an envelope from its current folder to the specified folder. Moves envelopes to the specified folder.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • folder_id

    The ID of the folder being accessed.

  • folders_request (optional parameter)

Returns:



238
239
240
241
# File 'lib/docusign_esign/api/folders_api.rb', line 238

def move_envelopes(, folder_id, folders_request)
  data, _status_code, _headers = move_envelopes_with_http_info(, folder_id,  folders_request)
  return data
end

#move_envelopes_with_http_info(account_id, folder_id, folders_request) ⇒ Array<(FoldersResponse, Fixnum, Hash)>

Moves an envelope from its current folder to the specified folder. Moves envelopes to the specified folder.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • folder_id

    The ID of the folder being accessed.

  • folders_request (optional parameter)

Returns:

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

    FoldersResponse data, response status code and response headers



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/docusign_esign/api/folders_api.rb', line 249

def move_envelopes_with_http_info(, folder_id, folders_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: FoldersApi.move_envelopes ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling FoldersApi.move_envelopes" if .nil?
  # verify the required parameter 'folder_id' is set
  fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.move_envelopes" if folder_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/folders/{folderId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'folderId' + '}', folder_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'])

  # form parameters
  form_params = {}

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

#search(account_id, search_folder_id, options = DocuSign_eSign::SearchOptions.default) ⇒ FolderItemResponse

Gets a list of envelopes in folders matching the specified criteria. Retrieves a list of envelopes that match the criteria specified in the query. If the user ID of the user making the call is the same as the user ID for any returned recipient, then the userId property is added to the returned information for those recipients.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • search_folder_id

    Specifies the envelope group that is searched by the request. These are logical groupings, not actual folder names. Valid values are: drafts, awaiting_my_signature, completed, out_for_signature.

  • DocuSign_eSign::SearchOptions

    Options for modifying the behavior of the function.

Returns:



293
294
295
296
# File 'lib/docusign_esign/api/folders_api.rb', line 293

def search(, search_folder_id, options = DocuSign_eSign::SearchOptions.default)
  data, _status_code, _headers = search_with_http_info(, search_folder_id, options)
  return data
end

#search_with_http_info(account_id, search_folder_id, options = DocuSign_eSign::SearchOptions.default) ⇒ Array<(FolderItemResponse, Fixnum, Hash)>

Gets a list of envelopes in folders matching the specified criteria. Retrieves a list of envelopes that match the criteria specified in the query. If the user ID of the user making the call is the same as the user ID for any returned recipient, then the userId property is added to the returned information for those recipients.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • search_folder_id

    Specifies the envelope group that is searched by the request. These are logical groupings, not actual folder names. Valid values are: drafts, awaiting_my_signature, completed, out_for_signature.

  • DocuSign_eSign::SearchOptions

    Options for modifying the behavior of the function.

Returns:

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

    FolderItemResponse data, response status code and response headers



304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/docusign_esign/api/folders_api.rb', line 304

def search_with_http_info(, search_folder_id, options = DocuSign_eSign::SearchOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: FoldersApi.search ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling FoldersApi.search" if .nil?
  # verify the required parameter 'search_folder_id' is set
  fail ArgumentError, "Missing the required parameter 'search_folder_id' when calling FoldersApi.search" if search_folder_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/search_folders/{searchFolderId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'searchFolderId' + '}', search_folder_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'all'] = options.all if !options.all.nil?
  query_params[:'count'] = options.count if !options.count.nil?
  query_params[:'from_date'] = options.from_date if !options.from_date.nil?
  query_params[:'include_recipients'] = options.include_recipients if !options.include_recipients.nil?
  query_params[:'order'] = options.order if !options.order.nil?
  query_params[:'order_by'] = options.order_by if !options.order_by.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?
  query_params[:'to_date'] = options.to_date if !options.to_date.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['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 => 'FolderItemResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FoldersApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end