Class: DocuSign_Maestro::WorkflowInstanceManagementApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = WorkflowInstanceManagementApi.default) ⇒ WorkflowInstanceManagementApi

Returns a new instance of WorkflowInstanceManagementApi.



20
21
22
# File 'lib/docusign_maestro/api/workflow_instance_management_api.rb', line 20

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



18
19
20
# File 'lib/docusign_maestro/api/workflow_instance_management_api.rb', line 18

def api_client
  @api_client
end

Instance Method Details

#cancel_workflow_instance(account_id, instance_id) ⇒ CancelResponse

Cancels a running workflow instance. Cancels a running workflow instance.

Parameters:

  • account_id

    Account ID

  • instance_id

    DS Workflow Instance Id (dacId)

Returns:



29
30
31
32
# File 'lib/docusign_maestro/api/workflow_instance_management_api.rb', line 29

def cancel_workflow_instance(, instance_id)
  data, _status_code, _headers = cancel_workflow_instance_with_http_info(, instance_id)
  return data
end

#cancel_workflow_instance_with_http_info(account_id, instance_id) ⇒ Array<(CancelResponse, Fixnum, Hash)>

Cancels a running workflow instance. Cancels a running workflow instance.

Parameters:

  • account_id

    Account ID

  • instance_id

    DS Workflow Instance Id (dacId)

Returns:

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

    CancelResponse data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/docusign_maestro/api/workflow_instance_management_api.rb', line 39

def cancel_workflow_instance_with_http_info(, instance_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowInstanceManagementApi.cancel_workflow_instance ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowInstanceManagementApi.cancel_workflow_instance" if .nil?
  # verify the required parameter 'instance_id' is set
  fail ArgumentError, "Missing the required parameter 'instance_id' when calling WorkflowInstanceManagementApi.cancel_workflow_instance" if instance_id.nil?
  # resource path
  local_var_path = "aow-manage/v1.0/management/accounts/{accountId}/instances/{instanceId}/cancel".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'instanceId' + '}', instance_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(: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 => 'CancelResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowInstanceManagementApi#cancel_workflow_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_history(account_id, instance_id) ⇒ Array<WorkflowStepHistory>

Get List of Step Histories Returns a list of step history for a workflow instance

Parameters:

  • account_id

    Account ID

  • instance_id

    DS Workflow Instance Id (dacId)

Returns:



84
85
86
87
# File 'lib/docusign_maestro/api/workflow_instance_management_api.rb', line 84

def get_workflow_history(, instance_id)
  data, _status_code, _headers = get_workflow_history_with_http_info(, instance_id)
  return data
end

#get_workflow_history_with_http_info(account_id, instance_id) ⇒ Array<(Array<WorkflowStepHistory>, Fixnum, Hash)>

Get List of Step Histories Returns a list of step history for a workflow instance

Parameters:

  • account_id

    Account ID

  • instance_id

    DS Workflow Instance Id (dacId)

Returns:

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

    Array<WorkflowStepHistory> data, response status code and response headers



94
95
96
97
98
99
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
# File 'lib/docusign_maestro/api/workflow_instance_management_api.rb', line 94

def get_workflow_history_with_http_info(, instance_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowInstanceManagementApi.get_workflow_history ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowInstanceManagementApi.get_workflow_history" if .nil?
  # verify the required parameter 'instance_id' is set
  fail ArgumentError, "Missing the required parameter 'instance_id' when calling WorkflowInstanceManagementApi.get_workflow_history" if instance_id.nil?
  # resource path
  local_var_path = "aow-manage/v1.0/management/accounts/{accountId}/instances/{instanceId}/history".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'instanceId' + '}', instance_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 => 'Array<WorkflowStepHistory>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowInstanceManagementApi#get_workflow_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_instance(account_id, workflow_definition_id, instance_id) ⇒ WorkflowInstance

Get Workflow Instance Details Returns the details for a specific instance for a deployed workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

  • instance_id

    DS Workflow Instance Id (dacId)

Returns:



140
141
142
143
# File 'lib/docusign_maestro/api/workflow_instance_management_api.rb', line 140

def get_workflow_instance(, workflow_definition_id, instance_id)
  data, _status_code, _headers = get_workflow_instance_with_http_info(, workflow_definition_id, instance_id)
  return data
end

#get_workflow_instance_with_http_info(account_id, workflow_definition_id, instance_id) ⇒ Array<(WorkflowInstance, Fixnum, Hash)>

Get Workflow Instance Details Returns the details for a specific instance for a deployed workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

  • instance_id

    DS Workflow Instance Id (dacId)

Returns:

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

    WorkflowInstance data, response status code and response headers



151
152
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_maestro/api/workflow_instance_management_api.rb', line 151

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

#get_workflow_instances(account_id, workflow_definition_id) ⇒ Array<WorkflowInstance>

Get List of Workflow Instances Returns the list of instances for a deployed workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

Returns:



198
199
200
201
# File 'lib/docusign_maestro/api/workflow_instance_management_api.rb', line 198

def get_workflow_instances(, workflow_definition_id)
  data, _status_code, _headers = get_workflow_instances_with_http_info(, workflow_definition_id)
  return data
end

#get_workflow_instances_with_http_info(account_id, workflow_definition_id) ⇒ Array<(Array<WorkflowInstance>, Fixnum, Hash)>

Get List of Workflow Instances Returns the list of instances for a deployed workflow definition.

Parameters:

  • account_id

    Account ID

  • workflow_definition_id

    Workflow Definition ID

Returns:

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

    Array<WorkflowInstance> 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
245
246
# File 'lib/docusign_maestro/api/workflow_instance_management_api.rb', line 208

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