Class: UltracartClient::WorkflowApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/api/workflow_api.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ WorkflowApi

Returns a new instance of WorkflowApi.



19
20
21
# File 'lib/ultracart_api/api/workflow_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ultracart_api/api/workflow_api.rb', line 17

def api_client
  @api_client
end

Class Method Details

.new_using_api_key(simple_key, verify_ssl = true, debugging = false) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ultracart_api/api/workflow_api.rb', line 23

def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
  api_config = Configuration.new
  api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
  api_config.api_version = '2017-03-01'
  api_config.verify_ssl = verify_ssl

  api_client = ApiClient.new(api_config)
  api_client.config.debugging = debugging

  UltracartClient::WorkflowApi.new(api_client)
end

Instance Method Details

#get_workflow_agent_websocket_authorization(opts = {}) ⇒ WorkflowAgentAuthResponse

Get agent websocket authorization Retrieve a JWT to authorize an agent to make a websocket connection.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



39
40
41
42
# File 'lib/ultracart_api/api/workflow_api.rb', line 39

def get_workflow_agent_websocket_authorization(opts = {})
  data, _status_code, _headers = get_workflow_agent_websocket_authorization_with_http_info(opts)
  data
end

#get_workflow_agent_websocket_authorization_with_http_info(opts = {}) ⇒ Array<(WorkflowAgentAuthResponse, Integer, Hash)>

Get agent websocket authorization Retrieve a JWT to authorize an agent to make a websocket connection.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WorkflowAgentAuthResponse, Integer, Hash)>)

    WorkflowAgentAuthResponse data, response status code and response headers



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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/ultracart_api/api/workflow_api.rb', line 48

def get_workflow_agent_websocket_authorization_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_agent_websocket_authorization ...'
  end
  # resource path
  local_var_path = '/workflow/agent/auth'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowAgentAuthResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_agent_websocket_authorization",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_agent_websocket_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_assignment_groups(opts = {}) ⇒ WorkflowGroupsResponse

Retrieve a list of groups that workflow tasks can be assigned to Retrieve a list of groups that workflow tasks can be assigned to

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Max 200) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

Returns:



99
100
101
102
# File 'lib/ultracart_api/api/workflow_api.rb', line 99

def get_workflow_assignment_groups(opts = {})
  data, _status_code, _headers = get_workflow_assignment_groups_with_http_info(opts)
  data
end

#get_workflow_assignment_groups_with_http_info(opts = {}) ⇒ Array<(WorkflowGroupsResponse, Integer, Hash)>

Retrieve a list of groups that workflow tasks can be assigned to Retrieve a list of groups that workflow tasks can be assigned to

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Max 200) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

Returns:

  • (Array<(WorkflowGroupsResponse, Integer, Hash)>)

    WorkflowGroupsResponse data, response status code and response headers



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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/ultracart_api/api/workflow_api.rb', line 110

def get_workflow_assignment_groups_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_assignment_groups ...'
  end
  # resource path
  local_var_path = '/workflow/assignment_groups'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
  query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowGroupsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_assignment_groups",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_assignment_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_assignment_users(opts = {}) ⇒ WorkflowUsersResponse

Retrieve a list of users that workflow tasks can be assigned to Retrieve a list of users that workflow tasks can be assigned to

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Max 200) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

Returns:



163
164
165
166
# File 'lib/ultracart_api/api/workflow_api.rb', line 163

def get_workflow_assignment_users(opts = {})
  data, _status_code, _headers = get_workflow_assignment_users_with_http_info(opts)
  data
end

#get_workflow_assignment_users_with_http_info(opts = {}) ⇒ Array<(WorkflowUsersResponse, Integer, Hash)>

Retrieve a list of users that workflow tasks can be assigned to Retrieve a list of users that workflow tasks can be assigned to

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Max 200) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

Returns:

  • (Array<(WorkflowUsersResponse, Integer, Hash)>)

    WorkflowUsersResponse data, response status code and response headers



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
212
213
214
215
216
217
218
219
# File 'lib/ultracart_api/api/workflow_api.rb', line 174

def get_workflow_assignment_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_assignment_users ...'
  end
  # resource path
  local_var_path = '/workflow/assignment_users'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
  query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowUsersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_assignment_users",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_assignment_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_me(opts = {}) ⇒ WorkflowUserResponse

Retrieve a user object for myself Retrieve a user object for myself

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



225
226
227
228
# File 'lib/ultracart_api/api/workflow_api.rb', line 225

def get_workflow_me(opts = {})
  data, _status_code, _headers = get_workflow_me_with_http_info(opts)
  data
end

#get_workflow_me_with_http_info(opts = {}) ⇒ Array<(WorkflowUserResponse, Integer, Hash)>

Retrieve a user object for myself Retrieve a user object for myself

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WorkflowUserResponse, Integer, Hash)>)

    WorkflowUserResponse data, response status code and response headers



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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/ultracart_api/api/workflow_api.rb', line 234

def get_workflow_me_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_me ...'
  end
  # resource path
  local_var_path = '/workflow/me'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowUserResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_me",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_task(task_uuid, opts = {}) ⇒ WorkflowTaskResponse

Retrieve a workflow task Retrieve a workflow task

Parameters:

  • task_uuid (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



284
285
286
287
# File 'lib/ultracart_api/api/workflow_api.rb', line 284

def get_workflow_task(task_uuid, opts = {})
  data, _status_code, _headers = get_workflow_task_with_http_info(task_uuid, opts)
  data
end

#get_workflow_task_attachment_upload_url(extension, opts = {}) ⇒ WorkflowAttachmentUploadUrlResponse

Get a presigned workflow task attachment upload URL Get a presigned workflow task attachment upload URL

Parameters:

  • extension (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



348
349
350
351
# File 'lib/ultracart_api/api/workflow_api.rb', line 348

def get_workflow_task_attachment_upload_url(extension, opts = {})
  data, _status_code, _headers = get_workflow_task_attachment_upload_url_with_http_info(extension, opts)
  data
end

#get_workflow_task_attachment_upload_url_with_http_info(extension, opts = {}) ⇒ Array<(WorkflowAttachmentUploadUrlResponse, Integer, Hash)>

Get a presigned workflow task attachment upload URL Get a presigned workflow task attachment upload URL

Parameters:

  • extension (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
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
# File 'lib/ultracart_api/api/workflow_api.rb', line 358

def get_workflow_task_attachment_upload_url_with_http_info(extension, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task_attachment_upload_url ...'
  end
  # verify the required parameter 'extension' is set
  if @api_client.config.client_side_validation && extension.nil?
    fail ArgumentError, "Missing the required parameter 'extension' when calling WorkflowApi.get_workflow_task_attachment_upload_url"
  end
  # resource path
  local_var_path = '/workflow/tasks/attachments/{extension}'.sub('{' + 'extension' + '}', CGI.escape(extension.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowAttachmentUploadUrlResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_task_attachment_upload_url",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task_attachment_upload_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_task_by_object_type(object_type, object_id, opts = {}) ⇒ WorkflowTasksResponse

Retrieve a workflow task by object type and id Retrieve a workflow task by object type and id

Parameters:

  • object_type (String)
  • object_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



413
414
415
416
# File 'lib/ultracart_api/api/workflow_api.rb', line 413

def get_workflow_task_by_object_type(object_type, object_id, opts = {})
  data, _status_code, _headers = get_workflow_task_by_object_type_with_http_info(object_type, object_id, opts)
  data
end

#get_workflow_task_by_object_type_with_http_info(object_type, object_id, opts = {}) ⇒ Array<(WorkflowTasksResponse, Integer, Hash)>

Retrieve a workflow task by object type and id Retrieve a workflow task by object type and id

Parameters:

  • object_type (String)
  • object_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WorkflowTasksResponse, Integer, Hash)>)

    WorkflowTasksResponse data, response status code and response headers



424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
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
# File 'lib/ultracart_api/api/workflow_api.rb', line 424

def get_workflow_task_by_object_type_with_http_info(object_type, object_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task_by_object_type ...'
  end
  # verify the required parameter 'object_type' is set
  if @api_client.config.client_side_validation && object_type.nil?
    fail ArgumentError, "Missing the required parameter 'object_type' when calling WorkflowApi.get_workflow_task_by_object_type"
  end
  # verify the required parameter 'object_id' is set
  if @api_client.config.client_side_validation && object_id.nil?
    fail ArgumentError, "Missing the required parameter 'object_id' when calling WorkflowApi.get_workflow_task_by_object_type"
  end
  # resource path
  local_var_path = '/workflow/tasks/by/{object_type}/{object_id}'.sub('{' + 'object_type' + '}', CGI.escape(object_type.to_s)).sub('{' + 'object_id' + '}', CGI.escape(object_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowTasksResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_task_by_object_type",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task_by_object_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_task_open_count(opts = {}) ⇒ WorkflowTaskOpenCountResponse

Retrieve workflow task open count Retrieve workflow task open count

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



481
482
483
484
# File 'lib/ultracart_api/api/workflow_api.rb', line 481

def get_workflow_task_open_count(opts = {})
  data, _status_code, _headers = get_workflow_task_open_count_with_http_info(opts)
  data
end

#get_workflow_task_open_count_with_http_info(opts = {}) ⇒ Array<(WorkflowTaskOpenCountResponse, Integer, Hash)>

Retrieve workflow task open count Retrieve workflow task open count

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
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
# File 'lib/ultracart_api/api/workflow_api.rb', line 490

def get_workflow_task_open_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task_open_count ...'
  end
  # resource path
  local_var_path = '/workflow/tasks/open_count'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowTaskOpenCountResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_task_open_count",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task_open_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_task_tags(opts = {}) ⇒ WorkflowTaskTagsResponse

Get a list of existing workflow task tags Retrieves a unique list of all the existing workflow task tags.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



539
540
541
542
# File 'lib/ultracart_api/api/workflow_api.rb', line 539

def get_workflow_task_tags(opts = {})
  data, _status_code, _headers = get_workflow_task_tags_with_http_info(opts)
  data
end

#get_workflow_task_tags_with_http_info(opts = {}) ⇒ Array<(WorkflowTaskTagsResponse, Integer, Hash)>

Get a list of existing workflow task tags Retrieves a unique list of all the existing workflow task tags.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WorkflowTaskTagsResponse, Integer, Hash)>)

    WorkflowTaskTagsResponse data, response status code and response headers



548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/ultracart_api/api/workflow_api.rb', line 548

def get_workflow_task_tags_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task_tags ...'
  end
  # resource path
  local_var_path = '/workflow/tasks/tags'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowTaskTagsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_task_tags",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_task_with_http_info(task_uuid, opts = {}) ⇒ Array<(WorkflowTaskResponse, Integer, Hash)>

Retrieve a workflow task Retrieve a workflow task

Parameters:

  • task_uuid (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WorkflowTaskResponse, Integer, Hash)>)

    WorkflowTaskResponse data, response status code and response headers



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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/ultracart_api/api/workflow_api.rb', line 294

def get_workflow_task_with_http_info(task_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task ...'
  end
  # verify the required parameter 'task_uuid' is set
  if @api_client.config.client_side_validation && task_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'task_uuid' when calling WorkflowApi.get_workflow_task"
  end
  # resource path
  local_var_path = '/workflow/tasks/{task_uuid}'.sub('{' + 'task_uuid' + '}', CGI.escape(task_uuid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowTaskResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_workflow_tasks(workflow_tasks_query, opts = {}) ⇒ WorkflowTasksResponse

Search workflow tasks Retrieves a set of workflow tasks from the account based on a query object.

Parameters:

  • workflow_tasks_query (WorkflowTasksRequest)

    Workflow tasks query

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Default 100, Max 500) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

  • :_sort (String)

    The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.

Returns:



601
602
603
604
# File 'lib/ultracart_api/api/workflow_api.rb', line 601

def get_workflow_tasks(workflow_tasks_query, opts = {})
  data, _status_code, _headers = get_workflow_tasks_with_http_info(workflow_tasks_query, opts)
  data
end

#get_workflow_tasks_with_http_info(workflow_tasks_query, opts = {}) ⇒ Array<(WorkflowTasksResponse, Integer, Hash)>

Search workflow tasks Retrieves a set of workflow tasks from the account based on a query object.

Parameters:

  • workflow_tasks_query (WorkflowTasksRequest)

    Workflow tasks query

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_limit (Integer)

    The maximum number of records to return on this one API call. (Default 100, Max 500) (default to 100)

  • :_offset (Integer)

    Pagination of the record set. Offset is a zero based index. (default to 0)

  • :_sort (String)

    The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.

Returns:

  • (Array<(WorkflowTasksResponse, Integer, Hash)>)

    WorkflowTasksResponse data, response status code and response headers



614
615
616
617
618
619
620
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
658
659
660
661
662
663
664
665
666
667
668
669
# File 'lib/ultracart_api/api/workflow_api.rb', line 614

def get_workflow_tasks_with_http_info(workflow_tasks_query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_tasks ...'
  end
  # verify the required parameter 'workflow_tasks_query' is set
  if @api_client.config.client_side_validation && workflow_tasks_query.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_tasks_query' when calling WorkflowApi.get_workflow_tasks"
  end
  # resource path
  local_var_path = '/workflow/tasks/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
  query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
  query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_tasks_query)

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowTasksResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.get_workflow_tasks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#insert_workflow_task(workflow_task, opts = {}) ⇒ WorkflowTaskResponse

Insert a workflow task Insert a workflow task

Parameters:

  • workflow_task (WorkflowTask)

    workflow task

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



676
677
678
679
# File 'lib/ultracart_api/api/workflow_api.rb', line 676

def insert_workflow_task(workflow_task, opts = {})
  data, _status_code, _headers = insert_workflow_task_with_http_info(workflow_task, opts)
  data
end

#insert_workflow_task_with_http_info(workflow_task, opts = {}) ⇒ Array<(WorkflowTaskResponse, Integer, Hash)>

Insert a workflow task Insert a workflow task

Parameters:

  • workflow_task (WorkflowTask)

    workflow task

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WorkflowTaskResponse, Integer, Hash)>)

    WorkflowTaskResponse data, response status code and response headers



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
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
# File 'lib/ultracart_api/api/workflow_api.rb', line 686

def insert_workflow_task_with_http_info(workflow_task, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.insert_workflow_task ...'
  end
  # verify the required parameter 'workflow_task' is set
  if @api_client.config.client_side_validation && workflow_task.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_task' when calling WorkflowApi.insert_workflow_task"
  end
  # resource path
  local_var_path = '/workflow/tasks'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_task)

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowTaskResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.insert_workflow_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#insert_workflow_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_workflow_task(task_uuid, workflow_task, opts = {}) ⇒ WorkflowTaskResponse

Update a workflow task Update a workflow task

Parameters:

  • task_uuid (String)
  • workflow_task (WorkflowTask)

    Workflow task

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



746
747
748
749
# File 'lib/ultracart_api/api/workflow_api.rb', line 746

def update_workflow_task(task_uuid, workflow_task, opts = {})
  data, _status_code, _headers = update_workflow_task_with_http_info(task_uuid, workflow_task, opts)
  data
end

#update_workflow_task_with_http_info(task_uuid, workflow_task, opts = {}) ⇒ Array<(WorkflowTaskResponse, Integer, Hash)>

Update a workflow task Update a workflow task

Parameters:

  • task_uuid (String)
  • workflow_task (WorkflowTask)

    Workflow task

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WorkflowTaskResponse, Integer, Hash)>)

    WorkflowTaskResponse data, response status code and response headers



757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/ultracart_api/api/workflow_api.rb', line 757

def update_workflow_task_with_http_info(task_uuid, workflow_task, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowApi.update_workflow_task ...'
  end
  # verify the required parameter 'task_uuid' is set
  if @api_client.config.client_side_validation && task_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'task_uuid' when calling WorkflowApi.update_workflow_task"
  end
  # verify the required parameter 'workflow_task' is set
  if @api_client.config.client_side_validation && workflow_task.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_task' when calling WorkflowApi.update_workflow_task"
  end
  # resource path
  local_var_path = '/workflow/tasks/{task_uuid}'.sub('{' + 'task_uuid' + '}', CGI.escape(task_uuid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_task)

  # return_type
  return_type = opts[:debug_return_type] || 'WorkflowTaskResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"WorkflowApi.update_workflow_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowApi#update_workflow_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end