ultracart_api 4.0.181 → 4.0.182

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -4
  3. data/docs/WorkflowApi.md +603 -0
  4. data/docs/WorkflowAttachment.md +26 -0
  5. data/docs/WorkflowAttachmentUploadUrl.md +20 -0
  6. data/docs/WorkflowAttachmentUploadUrlResponse.md +26 -0
  7. data/docs/WorkflowGroup.md +20 -0
  8. data/docs/WorkflowGroupsResponse.md +26 -0
  9. data/docs/WorkflowNote.md +28 -0
  10. data/docs/WorkflowTask.md +60 -0
  11. data/docs/WorkflowTaskHistory.md +24 -0
  12. data/docs/WorkflowTaskResponse.md +26 -0
  13. data/docs/WorkflowTasksRequest.md +48 -0
  14. data/docs/WorkflowTasksResponse.md +26 -0
  15. data/docs/WorkflowUser.md +22 -0
  16. data/docs/WorkflowUsersResponse.md +26 -0
  17. data/lib/ultracart_api/api/workflow_api.rb +583 -0
  18. data/lib/ultracart_api/models/workflow_attachment.rb +260 -0
  19. data/lib/ultracart_api/models/workflow_attachment_upload_url.rb +228 -0
  20. data/lib/ultracart_api/models/workflow_attachment_upload_url_response.rb +256 -0
  21. data/lib/ultracart_api/models/workflow_group.rb +230 -0
  22. data/lib/ultracart_api/models/workflow_groups_response.rb +259 -0
  23. data/lib/ultracart_api/models/workflow_note.rb +271 -0
  24. data/lib/ultracart_api/models/workflow_task.rb +493 -0
  25. data/lib/ultracart_api/models/workflow_task_history.rb +249 -0
  26. data/lib/ultracart_api/models/workflow_task_response.rb +256 -0
  27. data/lib/ultracart_api/models/workflow_tasks_request.rb +427 -0
  28. data/lib/ultracart_api/models/workflow_tasks_response.rb +259 -0
  29. data/lib/ultracart_api/models/workflow_user.rb +240 -0
  30. data/lib/ultracart_api/models/workflow_users_response.rb +259 -0
  31. data/lib/ultracart_api/version.rb +1 -1
  32. data/lib/ultracart_api.rb +14 -0
  33. metadata +29 -1
@@ -0,0 +1,583 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module UltracartClient
16
+ class WorkflowApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
24
+ api_config = Configuration.new
25
+ api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
26
+ api_config.api_version = '2017-03-01'
27
+ api_config.verify_ssl = verify_ssl
28
+
29
+ api_client = ApiClient.new(api_config)
30
+ api_client.config.debugging = debugging
31
+
32
+ UltracartClient::WorkflowApi.new(api_client)
33
+ end
34
+
35
+ # Retrieve a list of groups that workflow tasks can be assigned to
36
+ # Retrieve a list of groups that workflow tasks can be assigned to
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
39
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
40
+ # @return [WorkflowGroupsResponse]
41
+ def get_workflow_assignment_groups(opts = {})
42
+ data, _status_code, _headers = get_workflow_assignment_groups_with_http_info(opts)
43
+ data
44
+ end
45
+
46
+ # Retrieve a list of groups that workflow tasks can be assigned to
47
+ # Retrieve a list of groups that workflow tasks can be assigned to
48
+ # @param [Hash] opts the optional parameters
49
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
50
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
51
+ # @return [Array<(WorkflowGroupsResponse, Integer, Hash)>] WorkflowGroupsResponse data, response status code and response headers
52
+ def get_workflow_assignment_groups_with_http_info(opts = {})
53
+ if @api_client.config.debugging
54
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_assignment_groups ...'
55
+ end
56
+ # resource path
57
+ local_var_path = '/workflow/assignment_groups'
58
+
59
+ # query parameters
60
+ query_params = opts[:query_params] || {}
61
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
62
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
63
+
64
+ # header parameters
65
+ header_params = opts[:header_params] || {}
66
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
69
+
70
+ # form parameters
71
+ form_params = opts[:form_params] || {}
72
+
73
+ # http body (model)
74
+ post_body = opts[:debug_body]
75
+
76
+ # return_type
77
+ return_type = opts[:debug_return_type] || 'WorkflowGroupsResponse'
78
+
79
+ # auth_names
80
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
81
+
82
+ new_options = opts.merge(
83
+ :operation => :"WorkflowApi.get_workflow_assignment_groups",
84
+ :header_params => header_params,
85
+ :query_params => query_params,
86
+ :form_params => form_params,
87
+ :body => post_body,
88
+ :auth_names => auth_names,
89
+ :return_type => return_type
90
+ )
91
+
92
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_assignment_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
99
+ # Retrieve a list of users that workflow tasks can be assigned to
100
+ # Retrieve a list of users that workflow tasks can be assigned to
101
+ # @param [Hash] opts the optional parameters
102
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
103
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
104
+ # @return [WorkflowUsersResponse]
105
+ def get_workflow_assignment_users(opts = {})
106
+ data, _status_code, _headers = get_workflow_assignment_users_with_http_info(opts)
107
+ data
108
+ end
109
+
110
+ # Retrieve a list of users that workflow tasks can be assigned to
111
+ # Retrieve a list of users that workflow tasks can be assigned to
112
+ # @param [Hash] opts the optional parameters
113
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
114
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
115
+ # @return [Array<(WorkflowUsersResponse, Integer, Hash)>] WorkflowUsersResponse data, response status code and response headers
116
+ def get_workflow_assignment_users_with_http_info(opts = {})
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_assignment_users ...'
119
+ end
120
+ # resource path
121
+ local_var_path = '/workflow/assignment_users'
122
+
123
+ # query parameters
124
+ query_params = opts[:query_params] || {}
125
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
126
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
127
+
128
+ # header parameters
129
+ header_params = opts[:header_params] || {}
130
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
131
+ # HTTP header 'Accept' (if needed)
132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
133
+
134
+ # form parameters
135
+ form_params = opts[:form_params] || {}
136
+
137
+ # http body (model)
138
+ post_body = opts[:debug_body]
139
+
140
+ # return_type
141
+ return_type = opts[:debug_return_type] || 'WorkflowUsersResponse'
142
+
143
+ # auth_names
144
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
145
+
146
+ new_options = opts.merge(
147
+ :operation => :"WorkflowApi.get_workflow_assignment_users",
148
+ :header_params => header_params,
149
+ :query_params => query_params,
150
+ :form_params => form_params,
151
+ :body => post_body,
152
+ :auth_names => auth_names,
153
+ :return_type => return_type
154
+ )
155
+
156
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_assignment_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
159
+ end
160
+ return data, status_code, headers
161
+ end
162
+
163
+ # Retrieve a workflow task
164
+ # Retrieve a workflow task
165
+ # @param task_uuid [String]
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [WorkflowTaskResponse]
168
+ def get_workflow_task(task_uuid, opts = {})
169
+ data, _status_code, _headers = get_workflow_task_with_http_info(task_uuid, opts)
170
+ data
171
+ end
172
+
173
+ # Retrieve a workflow task
174
+ # Retrieve a workflow task
175
+ # @param task_uuid [String]
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [Array<(WorkflowTaskResponse, Integer, Hash)>] WorkflowTaskResponse data, response status code and response headers
178
+ def get_workflow_task_with_http_info(task_uuid, opts = {})
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task ...'
181
+ end
182
+ # verify the required parameter 'task_uuid' is set
183
+ if @api_client.config.client_side_validation && task_uuid.nil?
184
+ fail ArgumentError, "Missing the required parameter 'task_uuid' when calling WorkflowApi.get_workflow_task"
185
+ end
186
+ # resource path
187
+ local_var_path = '/workflow/tasks/{task_uuid}'.sub('{' + 'task_uuid' + '}', CGI.escape(task_uuid.to_s))
188
+
189
+ # query parameters
190
+ query_params = opts[:query_params] || {}
191
+
192
+ # header parameters
193
+ header_params = opts[:header_params] || {}
194
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
195
+ # HTTP header 'Accept' (if needed)
196
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
197
+
198
+ # form parameters
199
+ form_params = opts[:form_params] || {}
200
+
201
+ # http body (model)
202
+ post_body = opts[:debug_body]
203
+
204
+ # return_type
205
+ return_type = opts[:debug_return_type] || 'WorkflowTaskResponse'
206
+
207
+ # auth_names
208
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
209
+
210
+ new_options = opts.merge(
211
+ :operation => :"WorkflowApi.get_workflow_task",
212
+ :header_params => header_params,
213
+ :query_params => query_params,
214
+ :form_params => form_params,
215
+ :body => post_body,
216
+ :auth_names => auth_names,
217
+ :return_type => return_type
218
+ )
219
+
220
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
+ end
224
+ return data, status_code, headers
225
+ end
226
+
227
+ # Get a presigned workflow task attachment upload URL
228
+ # Get a presigned workflow task attachment upload URL
229
+ # @param extension [String]
230
+ # @param [Hash] opts the optional parameters
231
+ # @return [WorkflowAttachmentUploadUrlResponse]
232
+ def get_workflow_task_attachment_upload_url(extension, opts = {})
233
+ data, _status_code, _headers = get_workflow_task_attachment_upload_url_with_http_info(extension, opts)
234
+ data
235
+ end
236
+
237
+ # Get a presigned workflow task attachment upload URL
238
+ # Get a presigned workflow task attachment upload URL
239
+ # @param extension [String]
240
+ # @param [Hash] opts the optional parameters
241
+ # @return [Array<(WorkflowAttachmentUploadUrlResponse, Integer, Hash)>] WorkflowAttachmentUploadUrlResponse data, response status code and response headers
242
+ def get_workflow_task_attachment_upload_url_with_http_info(extension, opts = {})
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task_attachment_upload_url ...'
245
+ end
246
+ # verify the required parameter 'extension' is set
247
+ if @api_client.config.client_side_validation && extension.nil?
248
+ fail ArgumentError, "Missing the required parameter 'extension' when calling WorkflowApi.get_workflow_task_attachment_upload_url"
249
+ end
250
+ # resource path
251
+ local_var_path = '/workflow/tasks/attachments/{extension}'.sub('{' + 'extension' + '}', CGI.escape(extension.to_s))
252
+
253
+ # query parameters
254
+ query_params = opts[:query_params] || {}
255
+
256
+ # header parameters
257
+ header_params = opts[:header_params] || {}
258
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
259
+ # HTTP header 'Accept' (if needed)
260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
261
+
262
+ # form parameters
263
+ form_params = opts[:form_params] || {}
264
+
265
+ # http body (model)
266
+ post_body = opts[:debug_body]
267
+
268
+ # return_type
269
+ return_type = opts[:debug_return_type] || 'WorkflowAttachmentUploadUrlResponse'
270
+
271
+ # auth_names
272
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
273
+
274
+ new_options = opts.merge(
275
+ :operation => :"WorkflowApi.get_workflow_task_attachment_upload_url",
276
+ :header_params => header_params,
277
+ :query_params => query_params,
278
+ :form_params => form_params,
279
+ :body => post_body,
280
+ :auth_names => auth_names,
281
+ :return_type => return_type
282
+ )
283
+
284
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
285
+ if @api_client.config.debugging
286
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task_attachment_upload_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
+ end
288
+ return data, status_code, headers
289
+ end
290
+
291
+ # Retrieve a workflow task by object type and id
292
+ # Retrieve a workflow task by object type and id
293
+ # @param object_type [String]
294
+ # @param object_id [String]
295
+ # @param [Hash] opts the optional parameters
296
+ # @return [WorkflowTaskResponse]
297
+ def get_workflow_task_by_object_type(object_type, object_id, opts = {})
298
+ data, _status_code, _headers = get_workflow_task_by_object_type_with_http_info(object_type, object_id, opts)
299
+ data
300
+ end
301
+
302
+ # Retrieve a workflow task by object type and id
303
+ # Retrieve a workflow task by object type and id
304
+ # @param object_type [String]
305
+ # @param object_id [String]
306
+ # @param [Hash] opts the optional parameters
307
+ # @return [Array<(WorkflowTaskResponse, Integer, Hash)>] WorkflowTaskResponse data, response status code and response headers
308
+ def get_workflow_task_by_object_type_with_http_info(object_type, object_id, opts = {})
309
+ if @api_client.config.debugging
310
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task_by_object_type ...'
311
+ end
312
+ # verify the required parameter 'object_type' is set
313
+ if @api_client.config.client_side_validation && object_type.nil?
314
+ fail ArgumentError, "Missing the required parameter 'object_type' when calling WorkflowApi.get_workflow_task_by_object_type"
315
+ end
316
+ # verify the required parameter 'object_id' is set
317
+ if @api_client.config.client_side_validation && object_id.nil?
318
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling WorkflowApi.get_workflow_task_by_object_type"
319
+ end
320
+ # resource path
321
+ 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))
322
+
323
+ # query parameters
324
+ query_params = opts[:query_params] || {}
325
+
326
+ # header parameters
327
+ header_params = opts[:header_params] || {}
328
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
329
+ # HTTP header 'Accept' (if needed)
330
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
331
+
332
+ # form parameters
333
+ form_params = opts[:form_params] || {}
334
+
335
+ # http body (model)
336
+ post_body = opts[:debug_body]
337
+
338
+ # return_type
339
+ return_type = opts[:debug_return_type] || 'WorkflowTaskResponse'
340
+
341
+ # auth_names
342
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
343
+
344
+ new_options = opts.merge(
345
+ :operation => :"WorkflowApi.get_workflow_task_by_object_type",
346
+ :header_params => header_params,
347
+ :query_params => query_params,
348
+ :form_params => form_params,
349
+ :body => post_body,
350
+ :auth_names => auth_names,
351
+ :return_type => return_type
352
+ )
353
+
354
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task_by_object_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
357
+ end
358
+ return data, status_code, headers
359
+ end
360
+
361
+ # Search workflow tasks
362
+ # Retrieves a set of workflow tasks from the account based on a query object.
363
+ # @param workflow_tasks_query [WorkflowTasksRequest] Workflow tasks query
364
+ # @param [Hash] opts the optional parameters
365
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500) (default to 100)
366
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
367
+ # @option opts [String] :_sort The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
368
+ # @return [WorkflowTasksResponse]
369
+ def get_workflow_tasks(workflow_tasks_query, opts = {})
370
+ data, _status_code, _headers = get_workflow_tasks_with_http_info(workflow_tasks_query, opts)
371
+ data
372
+ end
373
+
374
+ # Search workflow tasks
375
+ # Retrieves a set of workflow tasks from the account based on a query object.
376
+ # @param workflow_tasks_query [WorkflowTasksRequest] Workflow tasks query
377
+ # @param [Hash] opts the optional parameters
378
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500) (default to 100)
379
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
380
+ # @option opts [String] :_sort The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
381
+ # @return [Array<(WorkflowTasksResponse, Integer, Hash)>] WorkflowTasksResponse data, response status code and response headers
382
+ def get_workflow_tasks_with_http_info(workflow_tasks_query, opts = {})
383
+ if @api_client.config.debugging
384
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_tasks ...'
385
+ end
386
+ # verify the required parameter 'workflow_tasks_query' is set
387
+ if @api_client.config.client_side_validation && workflow_tasks_query.nil?
388
+ fail ArgumentError, "Missing the required parameter 'workflow_tasks_query' when calling WorkflowApi.get_workflow_tasks"
389
+ end
390
+ # resource path
391
+ local_var_path = '/workflow/tasks/search'
392
+
393
+ # query parameters
394
+ query_params = opts[:query_params] || {}
395
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
396
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
397
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
398
+
399
+ # header parameters
400
+ header_params = opts[:header_params] || {}
401
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
402
+ # HTTP header 'Accept' (if needed)
403
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
404
+ # HTTP header 'Content-Type'
405
+ content_type = @api_client.select_header_content_type(['application/json'])
406
+ if !content_type.nil?
407
+ header_params['Content-Type'] = content_type
408
+ end
409
+
410
+ # form parameters
411
+ form_params = opts[:form_params] || {}
412
+
413
+ # http body (model)
414
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_tasks_query)
415
+
416
+ # return_type
417
+ return_type = opts[:debug_return_type] || 'WorkflowTasksResponse'
418
+
419
+ # auth_names
420
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
421
+
422
+ new_options = opts.merge(
423
+ :operation => :"WorkflowApi.get_workflow_tasks",
424
+ :header_params => header_params,
425
+ :query_params => query_params,
426
+ :form_params => form_params,
427
+ :body => post_body,
428
+ :auth_names => auth_names,
429
+ :return_type => return_type
430
+ )
431
+
432
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
433
+ if @api_client.config.debugging
434
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
435
+ end
436
+ return data, status_code, headers
437
+ end
438
+
439
+ # Insert a workflow task
440
+ # Insert a workflow task
441
+ # @param workflow_task [WorkflowTask] workflow task
442
+ # @param [Hash] opts the optional parameters
443
+ # @return [WorkflowTaskResponse]
444
+ def insert_workflow_task(workflow_task, opts = {})
445
+ data, _status_code, _headers = insert_workflow_task_with_http_info(workflow_task, opts)
446
+ data
447
+ end
448
+
449
+ # Insert a workflow task
450
+ # Insert a workflow task
451
+ # @param workflow_task [WorkflowTask] workflow task
452
+ # @param [Hash] opts the optional parameters
453
+ # @return [Array<(WorkflowTaskResponse, Integer, Hash)>] WorkflowTaskResponse data, response status code and response headers
454
+ def insert_workflow_task_with_http_info(workflow_task, opts = {})
455
+ if @api_client.config.debugging
456
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.insert_workflow_task ...'
457
+ end
458
+ # verify the required parameter 'workflow_task' is set
459
+ if @api_client.config.client_side_validation && workflow_task.nil?
460
+ fail ArgumentError, "Missing the required parameter 'workflow_task' when calling WorkflowApi.insert_workflow_task"
461
+ end
462
+ # resource path
463
+ local_var_path = '/workflow/tasks'
464
+
465
+ # query parameters
466
+ query_params = opts[:query_params] || {}
467
+
468
+ # header parameters
469
+ header_params = opts[:header_params] || {}
470
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
471
+ # HTTP header 'Accept' (if needed)
472
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
473
+ # HTTP header 'Content-Type'
474
+ content_type = @api_client.select_header_content_type(['application/json'])
475
+ if !content_type.nil?
476
+ header_params['Content-Type'] = content_type
477
+ end
478
+
479
+ # form parameters
480
+ form_params = opts[:form_params] || {}
481
+
482
+ # http body (model)
483
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_task)
484
+
485
+ # return_type
486
+ return_type = opts[:debug_return_type] || 'WorkflowTaskResponse'
487
+
488
+ # auth_names
489
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
490
+
491
+ new_options = opts.merge(
492
+ :operation => :"WorkflowApi.insert_workflow_task",
493
+ :header_params => header_params,
494
+ :query_params => query_params,
495
+ :form_params => form_params,
496
+ :body => post_body,
497
+ :auth_names => auth_names,
498
+ :return_type => return_type
499
+ )
500
+
501
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
502
+ if @api_client.config.debugging
503
+ @api_client.config.logger.debug "API called: WorkflowApi#insert_workflow_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
504
+ end
505
+ return data, status_code, headers
506
+ end
507
+
508
+ # Update a workflow task
509
+ # Update a workflow task
510
+ # @param task_uuid [String]
511
+ # @param workflow_task [WorkflowTask] Workflow task
512
+ # @param [Hash] opts the optional parameters
513
+ # @return [WorkflowTaskResponse]
514
+ def update_workflow_task(task_uuid, workflow_task, opts = {})
515
+ data, _status_code, _headers = update_workflow_task_with_http_info(task_uuid, workflow_task, opts)
516
+ data
517
+ end
518
+
519
+ # Update a workflow task
520
+ # Update a workflow task
521
+ # @param task_uuid [String]
522
+ # @param workflow_task [WorkflowTask] Workflow task
523
+ # @param [Hash] opts the optional parameters
524
+ # @return [Array<(WorkflowTaskResponse, Integer, Hash)>] WorkflowTaskResponse data, response status code and response headers
525
+ def update_workflow_task_with_http_info(task_uuid, workflow_task, opts = {})
526
+ if @api_client.config.debugging
527
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.update_workflow_task ...'
528
+ end
529
+ # verify the required parameter 'task_uuid' is set
530
+ if @api_client.config.client_side_validation && task_uuid.nil?
531
+ fail ArgumentError, "Missing the required parameter 'task_uuid' when calling WorkflowApi.update_workflow_task"
532
+ end
533
+ # verify the required parameter 'workflow_task' is set
534
+ if @api_client.config.client_side_validation && workflow_task.nil?
535
+ fail ArgumentError, "Missing the required parameter 'workflow_task' when calling WorkflowApi.update_workflow_task"
536
+ end
537
+ # resource path
538
+ local_var_path = '/workflow/tasks/{task_uuid}'.sub('{' + 'task_uuid' + '}', CGI.escape(task_uuid.to_s))
539
+
540
+ # query parameters
541
+ query_params = opts[:query_params] || {}
542
+
543
+ # header parameters
544
+ header_params = opts[:header_params] || {}
545
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
546
+ # HTTP header 'Accept' (if needed)
547
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
548
+ # HTTP header 'Content-Type'
549
+ content_type = @api_client.select_header_content_type(['application/json'])
550
+ if !content_type.nil?
551
+ header_params['Content-Type'] = content_type
552
+ end
553
+
554
+ # form parameters
555
+ form_params = opts[:form_params] || {}
556
+
557
+ # http body (model)
558
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_task)
559
+
560
+ # return_type
561
+ return_type = opts[:debug_return_type] || 'WorkflowTaskResponse'
562
+
563
+ # auth_names
564
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
565
+
566
+ new_options = opts.merge(
567
+ :operation => :"WorkflowApi.update_workflow_task",
568
+ :header_params => header_params,
569
+ :query_params => query_params,
570
+ :form_params => form_params,
571
+ :body => post_body,
572
+ :auth_names => auth_names,
573
+ :return_type => return_type
574
+ )
575
+
576
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
577
+ if @api_client.config.debugging
578
+ @api_client.config.logger.debug "API called: WorkflowApi#update_workflow_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
579
+ end
580
+ return data, status_code, headers
581
+ end
582
+ end
583
+ end