Class: DocuSign_eSign::WorkspacesApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = WorkspacesApi.default) ⇒ WorkspacesApi

Returns a new instance of WorkspacesApi.


81
82
83
# File 'lib/docusign_esign/api/workspaces_api.rb', line 81

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client


79
80
81
# File 'lib/docusign_esign/api/workspaces_api.rb', line 79

def api_client
  @api_client
end

Instance Method Details

#create_workspace(account_id, workspace) ⇒ Workspace

Create a Workspace Creates a new workspace.

Parameters:

  • account_id

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

  • workspace (optional parameter)

Returns:


90
91
92
93
# File 'lib/docusign_esign/api/workspaces_api.rb', line 90

def create_workspace(, workspace)
  data, _status_code, _headers = create_workspace_with_http_info(,  workspace)
  return data
end

#create_workspace_file(account_id, folder_id, workspace_id) ⇒ WorkspaceItem

Creates a workspace file.

Parameters:

  • account_id

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

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

Returns:


142
143
144
145
# File 'lib/docusign_esign/api/workspaces_api.rb', line 142

def create_workspace_file(, folder_id, workspace_id)
  data, _status_code, _headers = create_workspace_file_with_http_info(, folder_id, workspace_id)
  return data
end

#create_workspace_file_with_http_info(account_id, folder_id, workspace_id) ⇒ Array<(WorkspaceItem, Fixnum, Hash)>

Creates a workspace file.

Parameters:

  • account_id

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

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

Returns:

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

    WorkspaceItem data, response status code and response headers


153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/docusign_esign/api/workspaces_api.rb', line 153

def create_workspace_file_with_http_info(, folder_id, workspace_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkspacesApi.create_workspace_file ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkspacesApi.create_workspace_file" if .nil?
  # verify the required parameter 'folder_id' is set
  fail ArgumentError, "Missing the required parameter 'folder_id' when calling WorkspacesApi.create_workspace_file" if folder_id.nil?
  # verify the required parameter 'workspace_id' is set
  fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.create_workspace_file" if workspace_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'folderId' + '}', folder_id.to_s).sub('{' + 'workspaceId' + '}', workspace_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 = nil
  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 => 'WorkspaceItem')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#create_workspace_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_workspace_with_http_info(account_id, workspace) ⇒ Array<(Workspace, Fixnum, Hash)>

Create a Workspace Creates a new workspace.

Parameters:

  • account_id

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

  • workspace (optional parameter)

Returns:

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

    Workspace data, response status code and response headers


100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/docusign_esign/api/workspaces_api.rb', line 100

def create_workspace_with_http_info(, workspace)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkspacesApi.create_workspace ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkspacesApi.create_workspace" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/workspaces".sub('{format}','json').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'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(workspace)
  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 => 'Workspace')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#create_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_workspace(account_id, workspace_id) ⇒ Workspace

Delete Workspace Deletes an existing workspace (logically).

Parameters:

  • account_id

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

  • workspace_id

    Specifies the workspace ID GUID.

Returns:


198
199
200
201
# File 'lib/docusign_esign/api/workspaces_api.rb', line 198

def delete_workspace(, workspace_id)
  data, _status_code, _headers = delete_workspace_with_http_info(, workspace_id)
  return data
end

#delete_workspace_folder_items(account_id, folder_id, workspace_id, workspace_item_list) ⇒ nil

Deletes workspace one or more specific files/folders from the given folder or root.

Parameters:

  • account_id

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

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

  • workspace_item_list (optional parameter)

Returns:

  • (nil)

253
254
255
256
# File 'lib/docusign_esign/api/workspaces_api.rb', line 253

def delete_workspace_folder_items(, folder_id, workspace_id, workspace_item_list)
  delete_workspace_folder_items_with_http_info(, folder_id, workspace_id,  workspace_item_list)
  return nil
end

#delete_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, workspace_item_list) ⇒ Array<(nil, Fixnum, Hash)>

Deletes workspace one or more specific files/folders from the given folder or root.

Parameters:

  • account_id

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

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

  • workspace_item_list (optional parameter)

Returns:

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

    nil, response status code and response headers


265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/docusign_esign/api/workspaces_api.rb', line 265

def delete_workspace_folder_items_with_http_info(, folder_id, workspace_id, workspace_item_list)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkspacesApi.delete_workspace_folder_items ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkspacesApi.delete_workspace_folder_items" if .nil?
  # verify the required parameter 'folder_id' is set
  fail ArgumentError, "Missing the required parameter 'folder_id' when calling WorkspacesApi.delete_workspace_folder_items" if folder_id.nil?
  # verify the required parameter 'workspace_id' is set
  fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.delete_workspace_folder_items" if workspace_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'folderId' + '}', folder_id.to_s).sub('{' + 'workspaceId' + '}', workspace_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(workspace_item_list)
  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: WorkspacesApi#delete_workspace_folder_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_workspace_with_http_info(account_id, workspace_id) ⇒ Array<(Workspace, Fixnum, Hash)>

Delete Workspace Deletes an existing workspace (logically).

Parameters:

  • account_id

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

  • workspace_id

    Specifies the workspace ID GUID.

Returns:

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

    Workspace data, response status code and response headers


208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/docusign_esign/api/workspaces_api.rb', line 208

def delete_workspace_with_http_info(, workspace_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkspacesApi.delete_workspace ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkspacesApi.delete_workspace" if .nil?
  # verify the required parameter 'workspace_id' is set
  fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.delete_workspace" if workspace_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/workspaces/{workspaceId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'workspaceId' + '}', workspace_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 = 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,
    :return_type => 'Workspace')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#delete_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workspace(account_id, workspace_id) ⇒ Workspace

Get Workspace Retrives properties about a workspace given a unique workspaceId.

Parameters:

  • account_id

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

  • workspace_id

    Specifies the workspace ID GUID.

Returns:


309
310
311
312
# File 'lib/docusign_esign/api/workspaces_api.rb', line 309

def get_workspace(, workspace_id)
  data, _status_code, _headers = get_workspace_with_http_info(, workspace_id)
  return data
end

#get_workspace_file(account_id, file_id, folder_id, workspace_id, options = DocuSign_eSign::GetWorkspaceFileOptions.default) ⇒ nil

Get Workspace File Retrieves a workspace file (the binary).

Parameters:

  • account_id

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

  • file_id

    Specifies the room file ID GUID.

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

  • DocuSign_eSign::GetWorkspaceFileOptions

    Options for modifying the behavior of the function.

Returns:

  • (nil)

365
366
367
368
# File 'lib/docusign_esign/api/workspaces_api.rb', line 365

def get_workspace_file(, file_id, folder_id, workspace_id, options = DocuSign_eSign::GetWorkspaceFileOptions.default)
  get_workspace_file_with_http_info(, file_id, folder_id, workspace_id, options)
  return nil
end

#get_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id, options = DocuSign_eSign::GetWorkspaceFileOptions.default) ⇒ Array<(nil, Fixnum, Hash)>

Get Workspace File Retrieves a workspace file (the binary).

Parameters:

  • account_id

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

  • file_id

    Specifies the room file ID GUID.

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

  • DocuSign_eSign::GetWorkspaceFileOptions

    Options for modifying the behavior of the function.

Returns:

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

    nil, response status code and response headers


378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/docusign_esign/api/workspaces_api.rb', line 378

def get_workspace_file_with_http_info(, file_id, folder_id, workspace_id, options = DocuSign_eSign::GetWorkspaceFileOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkspacesApi.get_workspace_file ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkspacesApi.get_workspace_file" if .nil?
  # verify the required parameter 'file_id' is set
  fail ArgumentError, "Missing the required parameter 'file_id' when calling WorkspacesApi.get_workspace_file" if file_id.nil?
  # verify the required parameter 'folder_id' is set
  fail ArgumentError, "Missing the required parameter 'folder_id' when calling WorkspacesApi.get_workspace_file" if folder_id.nil?
  # verify the required parameter 'workspace_id' is set
  fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.get_workspace_file" if workspace_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'fileId' + '}', file_id.to_s).sub('{' + 'folderId' + '}', folder_id.to_s).sub('{' + 'workspaceId' + '}', workspace_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'is_download'] = options.is_download if !options.is_download.nil?
  query_params[:'pdf_version'] = options.pdf_version if !options.pdf_version.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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#get_workspace_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workspace_with_http_info(account_id, workspace_id) ⇒ Array<(Workspace, Fixnum, Hash)>

Get Workspace Retrives properties about a workspace given a unique workspaceId.

Parameters:

  • account_id

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

  • workspace_id

    Specifies the workspace ID GUID.

Returns:

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

    Workspace data, response status code and response headers


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
349
350
351
352
353
354
355
# File 'lib/docusign_esign/api/workspaces_api.rb', line 319

def get_workspace_with_http_info(, workspace_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkspacesApi.get_workspace ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkspacesApi.get_workspace" if .nil?
  # verify the required parameter 'workspace_id' is set
  fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.get_workspace" if workspace_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/workspaces/{workspaceId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'workspaceId' + '}', workspace_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 = 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 => 'Workspace')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#get_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_workspace_file_pages(account_id, file_id, folder_id, workspace_id, options = DocuSign_eSign::ListWorkspaceFilePagesOptions.default) ⇒ PageImages

List File Pages Retrieves a workspace file as rasterized pages.

Parameters:

  • account_id

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

  • file_id

    Specifies the room file ID GUID.

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

  • DocuSign_eSign::ListWorkspaceFilePagesOptions

    Options for modifying the behavior of the function.

Returns:


429
430
431
432
# File 'lib/docusign_esign/api/workspaces_api.rb', line 429

def list_workspace_file_pages(, file_id, folder_id, workspace_id, options = DocuSign_eSign::ListWorkspaceFilePagesOptions.default)
  data, _status_code, _headers = list_workspace_file_pages_with_http_info(, file_id, folder_id, workspace_id, options)
  return data
end

#list_workspace_file_pages_with_http_info(account_id, file_id, folder_id, workspace_id, options = DocuSign_eSign::ListWorkspaceFilePagesOptions.default) ⇒ Array<(PageImages, Fixnum, Hash)>

List File Pages Retrieves a workspace file as rasterized pages.

Parameters:

  • account_id

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

  • file_id

    Specifies the room file ID GUID.

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

  • DocuSign_eSign::ListWorkspaceFilePagesOptions

    Options for modifying the behavior of the function.

Returns:

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

    PageImages data, response status code and response headers


442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/docusign_esign/api/workspaces_api.rb', line 442

def list_workspace_file_pages_with_http_info(, file_id, folder_id, workspace_id, options = DocuSign_eSign::ListWorkspaceFilePagesOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkspacesApi.list_workspace_file_pages ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkspacesApi.list_workspace_file_pages" if .nil?
  # verify the required parameter 'file_id' is set
  fail ArgumentError, "Missing the required parameter 'file_id' when calling WorkspacesApi.list_workspace_file_pages" if file_id.nil?
  # verify the required parameter 'folder_id' is set
  fail ArgumentError, "Missing the required parameter 'folder_id' when calling WorkspacesApi.list_workspace_file_pages" if folder_id.nil?
  # verify the required parameter 'workspace_id' is set
  fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.list_workspace_file_pages" if workspace_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}/pages".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'fileId' + '}', file_id.to_s).sub('{' + 'folderId' + '}', folder_id.to_s).sub('{' + 'workspaceId' + '}', workspace_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'count'] = options.count if !options.count.nil?
  query_params[:'dpi'] = options.dpi if !options.dpi.nil?
  query_params[:'max_height'] = options.max_height if !options.max_height.nil?
  query_params[:'max_width'] = options.max_width if !options.max_width.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.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 => 'PageImages')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#list_workspace_file_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_workspace_folder_items(account_id, folder_id, workspace_id, options = DocuSign_eSign::ListWorkspaceFolderItemsOptions.default) ⇒ WorkspaceFolderContents

List Workspace Folder Contents Retrieves workspace folder contents, which can include sub folders and files.

Parameters:

  • account_id

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

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

  • DocuSign_eSign::ListWorkspaceFolderItemsOptions

    Options for modifying the behavior of the function.

Returns:


496
497
498
499
# File 'lib/docusign_esign/api/workspaces_api.rb', line 496

def list_workspace_folder_items(, folder_id, workspace_id, options = DocuSign_eSign::ListWorkspaceFolderItemsOptions.default)
  data, _status_code, _headers = list_workspace_folder_items_with_http_info(, folder_id, workspace_id, options)
  return data
end

#list_workspace_folder_items_with_http_info(account_id, folder_id, workspace_id, options = DocuSign_eSign::ListWorkspaceFolderItemsOptions.default) ⇒ Array<(WorkspaceFolderContents, Fixnum, Hash)>

List Workspace Folder Contents Retrieves workspace folder contents, which can include sub folders and files.

Parameters:

  • account_id

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

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

  • DocuSign_eSign::ListWorkspaceFolderItemsOptions

    Options for modifying the behavior of the function.

Returns:

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

    WorkspaceFolderContents data, response status code and response headers


508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
# File 'lib/docusign_esign/api/workspaces_api.rb', line 508

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

  # query parameters
  query_params = {}
  query_params[:'count'] = options.count if !options.count.nil?
  query_params[:'include_files'] = options.include_files if !options.include_files.nil?
  query_params[:'include_sub_folders'] = options.include_sub_folders if !options.include_sub_folders.nil?
  query_params[:'include_thumbnails'] = options.include_thumbnails if !options.include_thumbnails.nil?
  query_params[:'include_user_detail'] = options.include_user_detail if !options.include_user_detail.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?
  query_params[:'workspace_user_id'] = options.workspace_user_id if !options.workspace_user_id.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 => 'WorkspaceFolderContents')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#list_workspace_folder_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_workspaces(account_id) ⇒ WorkspaceList

List Workspaces Gets information about the Workspaces that have been created.

Parameters:

  • account_id

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

Returns:


559
560
561
562
# File 'lib/docusign_esign/api/workspaces_api.rb', line 559

def list_workspaces()
  data, _status_code, _headers = list_workspaces_with_http_info()
  return data
end

#list_workspaces_with_http_info(account_id) ⇒ Array<(WorkspaceList, Fixnum, Hash)>

List Workspaces Gets information about the Workspaces that have been created.

Parameters:

  • account_id

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

Returns:

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

    WorkspaceList data, response status code and response headers


568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
# File 'lib/docusign_esign/api/workspaces_api.rb', line 568

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

  # 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 => 'WorkspaceList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#list_workspaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_workspace(account_id, workspace_id, workspace) ⇒ Workspace

Update Workspace Updates information about a specific workspace.

Parameters:

  • account_id

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

  • workspace_id

    Specifies the workspace ID GUID.

  • workspace (optional parameter)

Returns:


610
611
612
613
# File 'lib/docusign_esign/api/workspaces_api.rb', line 610

def update_workspace(, workspace_id, workspace)
  data, _status_code, _headers = update_workspace_with_http_info(, workspace_id,  workspace)
  return data
end

#update_workspace_file(account_id, file_id, folder_id, workspace_id) ⇒ WorkspaceItem

Update Workspace File Metadata Updates workspace item metadata for one or more specific files/folders.

Parameters:

  • account_id

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

  • file_id

    Specifies the room file ID GUID.

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

Returns:


666
667
668
669
# File 'lib/docusign_esign/api/workspaces_api.rb', line 666

def update_workspace_file(, file_id, folder_id, workspace_id)
  data, _status_code, _headers = update_workspace_file_with_http_info(, file_id, folder_id, workspace_id)
  return data
end

#update_workspace_file_with_http_info(account_id, file_id, folder_id, workspace_id) ⇒ Array<(WorkspaceItem, Fixnum, Hash)>

Update Workspace File Metadata Updates workspace item metadata for one or more specific files/folders.

Parameters:

  • account_id

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

  • file_id

    Specifies the room file ID GUID.

  • folder_id

    The ID of the folder being accessed.

  • workspace_id

    Specifies the workspace ID GUID.

Returns:

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

    WorkspaceItem data, response status code and response headers


678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
# File 'lib/docusign_esign/api/workspaces_api.rb', line 678

def update_workspace_file_with_http_info(, file_id, folder_id, workspace_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkspacesApi.update_workspace_file ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkspacesApi.update_workspace_file" if .nil?
  # verify the required parameter 'file_id' is set
  fail ArgumentError, "Missing the required parameter 'file_id' when calling WorkspacesApi.update_workspace_file" if file_id.nil?
  # verify the required parameter 'folder_id' is set
  fail ArgumentError, "Missing the required parameter 'folder_id' when calling WorkspacesApi.update_workspace_file" if folder_id.nil?
  # verify the required parameter 'workspace_id' is set
  fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.update_workspace_file" if workspace_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files/{fileId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'fileId' + '}', file_id.to_s).sub('{' + 'folderId' + '}', folder_id.to_s).sub('{' + 'workspaceId' + '}', workspace_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 = nil
  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 => 'WorkspaceItem')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#update_workspace_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_workspace_with_http_info(account_id, workspace_id, workspace) ⇒ Array<(Workspace, Fixnum, Hash)>

Update Workspace Updates information about a specific workspace.

Parameters:

  • account_id

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

  • workspace_id

    Specifies the workspace ID GUID.

  • workspace (optional parameter)

Returns:

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

    Workspace data, response status code and response headers


621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
# File 'lib/docusign_esign/api/workspaces_api.rb', line 621

def update_workspace_with_http_info(, workspace_id, workspace)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkspacesApi.update_workspace ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkspacesApi.update_workspace" if .nil?
  # verify the required parameter 'workspace_id' is set
  fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.update_workspace" if workspace_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/workspaces/{workspaceId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'workspaceId' + '}', workspace_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(workspace)
  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 => 'Workspace')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkspacesApi#update_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end