Class: DocuSign_Maestro::WorkflowManagementApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_maestro/api/workflow_management_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = WorkflowManagementApi.default) ⇒ WorkflowManagementApi

Returns a new instance of WorkflowManagementApi.



38
39
40
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 38

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



36
37
38
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 36

def api_client
  @api_client
end

Instance Method Details

#create_workflow_definition(account_id, body) ⇒ NewOrUpdatedWorkflowDefinitionResponse

Creates a new workflow definition. Creates a new workflow definition.

Parameters:

  • account_id

    Account ID

  • body

    Request Body to create a new workflow definition.

Returns:



47
48
49
50
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 47

def create_workflow_definition(, body)
  data, _status_code, _headers = create_workflow_definition_with_http_info(,  body)
  return data
end

#create_workflow_definition_with_http_info(account_id, body) ⇒ Array<(NewOrUpdatedWorkflowDefinitionResponse, Fixnum, Hash)>

Creates a new workflow definition. Creates a new workflow definition.

Parameters:

  • account_id

    Account ID

  • body

    Request Body to create a new workflow definition.

Returns:



57
58
59
60
61
62
63
64
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
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 57

def create_workflow_definition_with_http_info(, body)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowManagementApi.create_workflow_definition ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowManagementApi.create_workflow_definition" if .nil?
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WorkflowManagementApi.create_workflow_definition" if body.nil?
  # resource path
  local_var_path = "aow-manage/v1.0/management/accounts/{accountId}/workflowDefinitions".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'])
  # 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(body)
  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 => 'NewOrUpdatedWorkflowDefinitionResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowManagementApi#create_workflow_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_workflow_definition(account_id, workflow_definition_id) ⇒ WorkflowDeleteResponse

Deletes a workflow definition. Deletes a workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

Returns:



102
103
104
105
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 102

def delete_workflow_definition(, workflow_definition_id)
  data, _status_code, _headers = delete_workflow_definition_with_http_info(, workflow_definition_id)
  return data
end

#delete_workflow_definition_with_http_info(account_id, workflow_definition_id) ⇒ Array<(WorkflowDeleteResponse, Fixnum, Hash)>

Deletes a workflow definition. Deletes a workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

Returns:

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

    WorkflowDeleteResponse data, response status code and response headers



112
113
114
115
116
117
118
119
120
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
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 112

def delete_workflow_definition_with_http_info(, workflow_definition_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowManagementApi.delete_workflow_definition ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowManagementApi.delete_workflow_definition" if .nil?
  # verify the required parameter 'workflow_definition_id' is set
  fail ArgumentError, "Missing the required parameter 'workflow_definition_id' when calling WorkflowManagementApi.delete_workflow_definition" if workflow_definition_id.nil?
  # resource path
  local_var_path = "aow-manage/v1.0/management/accounts/{accountId}/workflowDefinitions/{workflowDefinitionId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'workflowDefinitionId' + '}', workflow_definition_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,
    :return_type => 'WorkflowDeleteResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowManagementApi#delete_workflow_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_definition(account_id, workflow_definition_id, options = DocuSign_Maestro::GetWorkflowDefinitionOptions.default) ⇒ WorkflowDefinitionWithId

Get Workflow Definition Returns a workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

  • DocuSign_Maestro::GetWorkflowDefinitionOptions

    Options for modifying the behavior of the function.

Returns:



158
159
160
161
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 158

def get_workflow_definition(, workflow_definition_id, options = DocuSign_Maestro::GetWorkflowDefinitionOptions.default)
  data, _status_code, _headers = get_workflow_definition_with_http_info(, workflow_definition_id, options)
  return data
end

#get_workflow_definition_config_instances(account_id, workflow_definition_id) ⇒ GetConfigurationInstancesResponse

Gets configuration instances Returns a list of configuration instances for a workflow definition

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

Returns:



215
216
217
218
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 215

def get_workflow_definition_config_instances(, workflow_definition_id)
  data, _status_code, _headers = get_workflow_definition_config_instances_with_http_info(, workflow_definition_id)
  return data
end

#get_workflow_definition_config_instances_with_http_info(account_id, workflow_definition_id) ⇒ Array<(GetConfigurationInstancesResponse, Fixnum, Hash)>

Gets configuration instances Returns a list of configuration instances for a workflow definition

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

Returns:



225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 225

def get_workflow_definition_config_instances_with_http_info(, workflow_definition_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowManagementApi.get_workflow_definition_config_instances ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowManagementApi.get_workflow_definition_config_instances" if .nil?
  # verify the required parameter 'workflow_definition_id' is set
  fail ArgumentError, "Missing the required parameter 'workflow_definition_id' when calling WorkflowManagementApi.get_workflow_definition_config_instances" if workflow_definition_id.nil?
  # resource path
  local_var_path = "aow-manage/v1.0/management/accounts/{accountId}/workflowDefinitions/{workflowDefinitionId}/configInstances".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'workflowDefinitionId' + '}', workflow_definition_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 => 'GetConfigurationInstancesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowManagementApi#get_workflow_definition_config_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_definition_with_http_info(account_id, workflow_definition_id, options = DocuSign_Maestro::GetWorkflowDefinitionOptions.default) ⇒ Array<(WorkflowDefinitionWithId, Fixnum, Hash)>

Get Workflow Definition Returns a workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

  • DocuSign_Maestro::GetWorkflowDefinitionOptions

    Options for modifying the behavior of the function.

Returns:

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

    WorkflowDefinitionWithId data, response status code and response headers



169
170
171
172
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
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 169

def get_workflow_definition_with_http_info(, workflow_definition_id, options = DocuSign_Maestro::GetWorkflowDefinitionOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowManagementApi.get_workflow_definition ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowManagementApi.get_workflow_definition" if .nil?
  # verify the required parameter 'workflow_definition_id' is set
  fail ArgumentError, "Missing the required parameter 'workflow_definition_id' when calling WorkflowManagementApi.get_workflow_definition" if workflow_definition_id.nil?
  # resource path
  local_var_path = "aow-manage/v1.0/management/accounts/{accountId}/workflowDefinitions/{workflowDefinitionId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'workflowDefinitionId' + '}', workflow_definition_id.to_s)

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

#get_workflow_definitions(account_id, options = DocuSign_Maestro::GetWorkflowDefinitionsOptions.default) ⇒ WorkflowDefinitionList

Get Workflow Definitions metadata Returns a list of workflow definitions’ metadata.

Parameters:

  • account_id

    Account ID

  • DocuSign_Maestro::GetWorkflowDefinitionsOptions

    Options for modifying the behavior of the function.

Returns:



270
271
272
273
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 270

def get_workflow_definitions(, options = DocuSign_Maestro::GetWorkflowDefinitionsOptions.default)
  data, _status_code, _headers = get_workflow_definitions_with_http_info(, options)
  return data
end

#get_workflow_definitions_with_http_info(account_id, options = DocuSign_Maestro::GetWorkflowDefinitionsOptions.default) ⇒ Array<(WorkflowDefinitionList, Fixnum, Hash)>

Get Workflow Definitions metadata Returns a list of workflow definitions&#39; metadata.

Parameters:

  • account_id

    Account ID

  • DocuSign_Maestro::GetWorkflowDefinitionsOptions

    Options for modifying the behavior of the function.

Returns:

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

    WorkflowDefinitionList data, response status code and response headers



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 280

def get_workflow_definitions_with_http_info(, options = DocuSign_Maestro::GetWorkflowDefinitionsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowManagementApi.get_workflow_definitions ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowManagementApi.get_workflow_definitions" if .nil?
  if options.status && !['active', 'inactive', 'publishing', 'unpublishing', 'archived', 'archiving'].include?(options.status)
    fail ArgumentError, 'invalid value for "status", must be one of active, inactive, publishing, unpublishing, archived, archiving'
  end
  # resource path
  local_var_path = "aow-manage/v1.0/management/accounts/{accountId}/workflowDefinitions".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

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

#publish_or_un_publish_workflow_definition(account_id, workflow_definition_id, body) ⇒ DeployResponse

Publishes or unpublishes a workflow definition. Publishes or unpublishes a workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

  • body

    Request Body to publish or unpublish a workflow definition.

Returns:



328
329
330
331
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 328

def publish_or_un_publish_workflow_definition(, workflow_definition_id, body)
  data, _status_code, _headers = publish_or_un_publish_workflow_definition_with_http_info(, workflow_definition_id,  body)
  return data
end

#publish_or_un_publish_workflow_definition_with_http_info(account_id, workflow_definition_id, body) ⇒ Array<(DeployResponse, Fixnum, Hash)>

Publishes or unpublishes a workflow definition. Publishes or unpublishes a workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

  • body

    Request Body to publish or unpublish a workflow definition.

Returns:

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

    DeployResponse data, response status code and response headers



339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 339

def publish_or_un_publish_workflow_definition_with_http_info(, workflow_definition_id, body)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowManagementApi.publish_or_un_publish_workflow_definition ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowManagementApi.publish_or_un_publish_workflow_definition" if .nil?
  # verify the required parameter 'workflow_definition_id' is set
  fail ArgumentError, "Missing the required parameter 'workflow_definition_id' when calling WorkflowManagementApi.publish_or_un_publish_workflow_definition" if workflow_definition_id.nil?
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WorkflowManagementApi.publish_or_un_publish_workflow_definition" if body.nil?
  # resource path
  local_var_path = "aow-manage/v1.0/management/accounts/{accountId}/workflowDefinitions/{workflowDefinitionId}/publish".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'workflowDefinitionId' + '}', workflow_definition_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(body)
  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 => 'DeployResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowManagementApi#publish_or_un_publish_workflow_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_workflow_definition(account_id, workflow_definition_id, body) ⇒ NewOrUpdatedWorkflowDefinitionResponse

Updates a workflow definition. Updates a workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

  • body

    Request Body to update a workflow definition.

Returns:



387
388
389
390
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 387

def update_workflow_definition(, workflow_definition_id, body)
  data, _status_code, _headers = update_workflow_definition_with_http_info(, workflow_definition_id,  body)
  return data
end

#update_workflow_definition_with_http_info(account_id, workflow_definition_id, body) ⇒ Array<(NewOrUpdatedWorkflowDefinitionResponse, Fixnum, Hash)>

Updates a workflow definition. Updates a workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

  • body

    Request Body to update a workflow definition.

Returns:



398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
# File 'lib/docusign_maestro/api/workflow_management_api.rb', line 398

def update_workflow_definition_with_http_info(, workflow_definition_id, body)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowManagementApi.update_workflow_definition ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowManagementApi.update_workflow_definition" if .nil?
  # verify the required parameter 'workflow_definition_id' is set
  fail ArgumentError, "Missing the required parameter 'workflow_definition_id' when calling WorkflowManagementApi.update_workflow_definition" if workflow_definition_id.nil?
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WorkflowManagementApi.update_workflow_definition" if body.nil?
  # resource path
  local_var_path = "aow-manage/v1.0/management/accounts/{accountId}/workflowDefinitions/{workflowDefinitionId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'workflowDefinitionId' + '}', workflow_definition_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(body)
  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 => 'NewOrUpdatedWorkflowDefinitionResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowManagementApi#update_workflow_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end