ultracart_api 3.10.163 → 3.10.165

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -5
  3. data/docs/ConversationApi.md +4 -4
  4. data/docs/WorkflowApi.md +436 -0
  5. data/docs/WorkflowAttachment.md +12 -0
  6. data/docs/WorkflowAttachmentUploadUrl.md +9 -0
  7. data/docs/WorkflowAttachmentUploadUrlResponse.md +12 -0
  8. data/docs/WorkflowGroup.md +9 -0
  9. data/docs/WorkflowGroupsResponse.md +12 -0
  10. data/docs/WorkflowNote.md +13 -0
  11. data/docs/WorkflowTask.md +29 -0
  12. data/docs/WorkflowTaskHistory.md +11 -0
  13. data/docs/WorkflowTaskResponse.md +12 -0
  14. data/docs/WorkflowTasksRequest.md +23 -0
  15. data/docs/WorkflowTasksResponse.md +12 -0
  16. data/docs/WorkflowUser.md +10 -0
  17. data/docs/WorkflowUsersResponse.md +12 -0
  18. data/lib/ultracart_api/api/conversation_api.rb +4 -4
  19. data/lib/ultracart_api/api/workflow_api.rb +497 -0
  20. data/lib/ultracart_api/models/workflow_attachment.rb +225 -0
  21. data/lib/ultracart_api/models/workflow_attachment_upload_url.rb +193 -0
  22. data/lib/ultracart_api/models/workflow_attachment_upload_url_response.rb +221 -0
  23. data/lib/ultracart_api/models/workflow_group.rb +195 -0
  24. data/lib/ultracart_api/models/workflow_groups_response.rb +224 -0
  25. data/lib/ultracart_api/models/workflow_note.rb +236 -0
  26. data/lib/ultracart_api/models/workflow_task.rb +458 -0
  27. data/lib/ultracart_api/models/workflow_task_history.rb +214 -0
  28. data/lib/ultracart_api/models/workflow_task_response.rb +221 -0
  29. data/lib/ultracart_api/models/workflow_tasks_request.rb +392 -0
  30. data/lib/ultracart_api/models/workflow_tasks_response.rb +224 -0
  31. data/lib/ultracart_api/models/workflow_user.rb +205 -0
  32. data/lib/ultracart_api/models/workflow_users_response.rb +224 -0
  33. data/lib/ultracart_api/version.rb +1 -1
  34. data/lib/ultracart_api.rb +14 -0
  35. metadata +30 -2
@@ -0,0 +1,11 @@
1
+ # UltracartClient::WorkflowTaskHistory
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **activity_dts** | **String** | Date/time that the workflow task history record was created | [optional]
7
+ **description** | **String** | Description of the activity | [optional]
8
+ **ip_address** | **String** | IP Address that originated the activity | [optional]
9
+ **user** | [**WorkflowUser**](WorkflowUser.md) | | [optional]
10
+
11
+
@@ -0,0 +1,12 @@
1
+ # UltracartClient::WorkflowTaskResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error** | [**Error**](Error.md) | | [optional]
7
+ **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
8
+ **success** | **BOOLEAN** | Indicates if API call was successful | [optional]
9
+ **task** | [**WorkflowTask**](WorkflowTask.md) | | [optional]
10
+ **warning** | [**Warning**](Warning.md) | | [optional]
11
+
12
+
@@ -0,0 +1,23 @@
1
+ # UltracartClient::WorkflowTasksRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **assigned_to_group_id** | **Integer** | Assigned to group ID | [optional]
7
+ **assigned_to_me** | **BOOLEAN** | Tasks are assigned to me either by direct user id or a group that the user is a member of | [optional]
8
+ **assigned_to_user_id** | **Integer** | Assigned to user ID | [optional]
9
+ **created_by** | [**WorkflowUser**](WorkflowUser.md) | | [optional]
10
+ **created_dts_begin** | **String** | Date/time that the workflow task was created | [optional]
11
+ **created_dts_end** | **String** | Date/time that the workflow task was created | [optional]
12
+ **delay_until_dts** | **String** | Date/time that the workflow task should delay until | [optional]
13
+ **due_dts_begin** | **String** | Date/time that the workflow task is due | [optional]
14
+ **due_dts_end** | **String** | Date/time that the workflow task is due | [optional]
15
+ **last_update_dts_begin** | **String** | Date/time that the workflow task was last updated | [optional]
16
+ **last_update_dts_end** | **String** | Date/time that the workflow task was last updated | [optional]
17
+ **object_email** | **String** | Object is associated with customer email | [optional]
18
+ **object_type** | **String** | Object Type | [optional]
19
+ **priority** | **String** | Priority | [optional]
20
+ **status** | **String** | Status of the workflow task | [optional]
21
+ **unassigned** | **BOOLEAN** | Tasks that are unassigned to a user or group | [optional]
22
+
23
+
@@ -0,0 +1,12 @@
1
+ # UltracartClient::WorkflowTasksResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error** | [**Error**](Error.md) | | [optional]
7
+ **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
8
+ **success** | **BOOLEAN** | Indicates if API call was successful | [optional]
9
+ **tasks** | [**Array<WorkflowTask>**](WorkflowTask.md) | tasks | [optional]
10
+ **warning** | [**Warning**](Warning.md) | | [optional]
11
+
12
+
@@ -0,0 +1,10 @@
1
+ # UltracartClient::WorkflowUser
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **user** | **String** | The user | [optional]
7
+ **user_icon_url** | **String** | The user icon URL if available | [optional]
8
+ **user_id** | **Integer** | User ID | [optional]
9
+
10
+
@@ -0,0 +1,12 @@
1
+ # UltracartClient::WorkflowUsersResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error** | [**Error**](Error.md) | | [optional]
7
+ **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
8
+ **success** | **BOOLEAN** | Indicates if API call was successful | [optional]
9
+ **users** | [**Array<WorkflowUser>**](WorkflowUser.md) | users | [optional]
10
+ **warning** | [**Warning**](Warning.md) | | [optional]
11
+
12
+
@@ -768,8 +768,8 @@ module UltracartClient
768
768
  end
769
769
  return data, status_code, headers
770
770
  end
771
- # Get a presigned conersation multimedia upload URL
772
- # Get a presigned conersation multimedia upload URL
771
+ # Get a presigned conversation multimedia upload URL
772
+ # Get a presigned conversation multimedia upload URL
773
773
  # @param extension
774
774
  # @param [Hash] opts the optional parameters
775
775
  # @return [ConversationMultimediaUploadUrlResponse]
@@ -778,8 +778,8 @@ module UltracartClient
778
778
  data
779
779
  end
780
780
 
781
- # Get a presigned conersation multimedia upload URL
782
- # Get a presigned conersation multimedia upload URL
781
+ # Get a presigned conversation multimedia upload URL
782
+ # Get a presigned conversation multimedia upload URL
783
783
  # @param extension
784
784
  # @param [Hash] opts the optional parameters
785
785
  # @return [Array<(ConversationMultimediaUploadUrlResponse, Fixnum, Hash)>] ConversationMultimediaUploadUrlResponse data, response status code and response headers
@@ -0,0 +1,497 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'addressable/uri'
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)
50
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
51
+ # @return [Array<(WorkflowGroupsResponse, Fixnum, 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 = {}
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 = {}
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
+ # HTTP header 'Content-Type'
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = nil
77
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
78
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'WorkflowGroupsResponse')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_assignment_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+ # Retrieve a list of users that workflow tasks can be assigned to
91
+ # Retrieve a list of users that workflow tasks can be assigned to
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
94
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
95
+ # @return [WorkflowUsersResponse]
96
+ def get_workflow_assignment_users(opts = {})
97
+ data, _status_code, _headers = get_workflow_assignment_users_with_http_info(opts)
98
+ data
99
+ end
100
+
101
+ # Retrieve a list of users that workflow tasks can be assigned to
102
+ # Retrieve a list of users that workflow tasks can be assigned to
103
+ # @param [Hash] opts the optional parameters
104
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200)
105
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
106
+ # @return [Array<(WorkflowUsersResponse, Fixnum, Hash)>] WorkflowUsersResponse data, response status code and response headers
107
+ def get_workflow_assignment_users_with_http_info(opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_assignment_users ...'
110
+ end
111
+ # resource path
112
+ local_var_path = '/workflow/assignment_users'
113
+
114
+ # query parameters
115
+ query_params = {}
116
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
117
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
118
+
119
+ # header parameters
120
+ header_params = {}
121
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
122
+ # HTTP header 'Accept' (if needed)
123
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
124
+ # HTTP header 'Content-Type'
125
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
126
+
127
+ # form parameters
128
+ form_params = {}
129
+
130
+ # http body (model)
131
+ post_body = nil
132
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
133
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => 'WorkflowUsersResponse')
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_assignment_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+ # Retrieve a workflow task
146
+ # Retrieve a workflow task
147
+ # @param task_uuid
148
+ # @param [Hash] opts the optional parameters
149
+ # @return [WorkflowTaskResponse]
150
+ def get_workflow_task(task_uuid, opts = {})
151
+ data, _status_code, _headers = get_workflow_task_with_http_info(task_uuid, opts)
152
+ data
153
+ end
154
+
155
+ # Retrieve a workflow task
156
+ # Retrieve a workflow task
157
+ # @param task_uuid
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [Array<(WorkflowTaskResponse, Fixnum, Hash)>] WorkflowTaskResponse data, response status code and response headers
160
+ def get_workflow_task_with_http_info(task_uuid, opts = {})
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task ...'
163
+ end
164
+ # verify the required parameter 'task_uuid' is set
165
+ if @api_client.config.client_side_validation && task_uuid.nil?
166
+ fail ArgumentError, "Missing the required parameter 'task_uuid' when calling WorkflowApi.get_workflow_task"
167
+ end
168
+ # resource path
169
+ local_var_path = '/workflow/tasks/{task_uuid}'.sub('{' + 'task_uuid' + '}', task_uuid.to_s)
170
+
171
+ # query parameters
172
+ query_params = {}
173
+
174
+ # header parameters
175
+ header_params = {}
176
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
177
+ # HTTP header 'Accept' (if needed)
178
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
+ # HTTP header 'Content-Type'
180
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
181
+
182
+ # form parameters
183
+ form_params = {}
184
+
185
+ # http body (model)
186
+ post_body = nil
187
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
188
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
189
+ :header_params => header_params,
190
+ :query_params => query_params,
191
+ :form_params => form_params,
192
+ :body => post_body,
193
+ :auth_names => auth_names,
194
+ :return_type => 'WorkflowTaskResponse')
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+ # Get a presigned workflow task attachment upload URL
201
+ # Get a presigned workflow task attachment upload URL
202
+ # @param extension
203
+ # @param [Hash] opts the optional parameters
204
+ # @return [WorkflowAttachmentUploadUrlResponse]
205
+ def get_workflow_task_attachment_upload_url(extension, opts = {})
206
+ data, _status_code, _headers = get_workflow_task_attachment_upload_url_with_http_info(extension, opts)
207
+ data
208
+ end
209
+
210
+ # Get a presigned workflow task attachment upload URL
211
+ # Get a presigned workflow task attachment upload URL
212
+ # @param extension
213
+ # @param [Hash] opts the optional parameters
214
+ # @return [Array<(WorkflowAttachmentUploadUrlResponse, Fixnum, Hash)>] WorkflowAttachmentUploadUrlResponse data, response status code and response headers
215
+ def get_workflow_task_attachment_upload_url_with_http_info(extension, opts = {})
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task_attachment_upload_url ...'
218
+ end
219
+ # verify the required parameter 'extension' is set
220
+ if @api_client.config.client_side_validation && extension.nil?
221
+ fail ArgumentError, "Missing the required parameter 'extension' when calling WorkflowApi.get_workflow_task_attachment_upload_url"
222
+ end
223
+ # resource path
224
+ local_var_path = '/workflow/tasks/attachments/{extension}'.sub('{' + 'extension' + '}', extension.to_s)
225
+
226
+ # query parameters
227
+ query_params = {}
228
+
229
+ # header parameters
230
+ header_params = {}
231
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
232
+ # HTTP header 'Accept' (if needed)
233
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
234
+ # HTTP header 'Content-Type'
235
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
236
+
237
+ # form parameters
238
+ form_params = {}
239
+
240
+ # http body (model)
241
+ post_body = nil
242
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
243
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
244
+ :header_params => header_params,
245
+ :query_params => query_params,
246
+ :form_params => form_params,
247
+ :body => post_body,
248
+ :auth_names => auth_names,
249
+ :return_type => 'WorkflowAttachmentUploadUrlResponse')
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task_attachment_upload_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
252
+ end
253
+ return data, status_code, headers
254
+ end
255
+ # Retrieve a workflow task by object type and id
256
+ # Retrieve a workflow task by object type and id
257
+ # @param object_type
258
+ # @param object_id
259
+ # @param [Hash] opts the optional parameters
260
+ # @return [WorkflowTaskResponse]
261
+ def get_workflow_task_by_object_type(object_type, object_id, opts = {})
262
+ data, _status_code, _headers = get_workflow_task_by_object_type_with_http_info(object_type, object_id, opts)
263
+ data
264
+ end
265
+
266
+ # Retrieve a workflow task by object type and id
267
+ # Retrieve a workflow task by object type and id
268
+ # @param object_type
269
+ # @param object_id
270
+ # @param [Hash] opts the optional parameters
271
+ # @return [Array<(WorkflowTaskResponse, Fixnum, Hash)>] WorkflowTaskResponse data, response status code and response headers
272
+ def get_workflow_task_by_object_type_with_http_info(object_type, object_id, opts = {})
273
+ if @api_client.config.debugging
274
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_task_by_object_type ...'
275
+ end
276
+ # verify the required parameter 'object_type' is set
277
+ if @api_client.config.client_side_validation && object_type.nil?
278
+ fail ArgumentError, "Missing the required parameter 'object_type' when calling WorkflowApi.get_workflow_task_by_object_type"
279
+ end
280
+ # verify the required parameter 'object_id' is set
281
+ if @api_client.config.client_side_validation && object_id.nil?
282
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling WorkflowApi.get_workflow_task_by_object_type"
283
+ end
284
+ # resource path
285
+ local_var_path = '/workflow/tasks/by/{object_type}/{object_id}'.sub('{' + 'object_type' + '}', object_type.to_s).sub('{' + 'object_id' + '}', object_id.to_s)
286
+
287
+ # query parameters
288
+ query_params = {}
289
+
290
+ # header parameters
291
+ header_params = {}
292
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
293
+ # HTTP header 'Accept' (if needed)
294
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
295
+ # HTTP header 'Content-Type'
296
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
297
+
298
+ # form parameters
299
+ form_params = {}
300
+
301
+ # http body (model)
302
+ post_body = nil
303
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
304
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
305
+ :header_params => header_params,
306
+ :query_params => query_params,
307
+ :form_params => form_params,
308
+ :body => post_body,
309
+ :auth_names => auth_names,
310
+ :return_type => 'WorkflowTaskResponse')
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_task_by_object_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
313
+ end
314
+ return data, status_code, headers
315
+ end
316
+ # Search workflow tasks
317
+ # Retrieves a set of workflow tasks from the account based on a query object.
318
+ # @param workflow_tasks_query Workflow tasks query
319
+ # @param [Hash] opts the optional parameters
320
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500) (default to 100)
321
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
322
+ # @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.
323
+ # @return [WorkflowTasksResponse]
324
+ def get_workflow_tasks(workflow_tasks_query, opts = {})
325
+ data, _status_code, _headers = get_workflow_tasks_with_http_info(workflow_tasks_query, opts)
326
+ data
327
+ end
328
+
329
+ # Search workflow tasks
330
+ # Retrieves a set of workflow tasks from the account based on a query object.
331
+ # @param workflow_tasks_query Workflow tasks query
332
+ # @param [Hash] opts the optional parameters
333
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500)
334
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
335
+ # @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.
336
+ # @return [Array<(WorkflowTasksResponse, Fixnum, Hash)>] WorkflowTasksResponse data, response status code and response headers
337
+ def get_workflow_tasks_with_http_info(workflow_tasks_query, opts = {})
338
+ if @api_client.config.debugging
339
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_tasks ...'
340
+ end
341
+ # verify the required parameter 'workflow_tasks_query' is set
342
+ if @api_client.config.client_side_validation && workflow_tasks_query.nil?
343
+ fail ArgumentError, "Missing the required parameter 'workflow_tasks_query' when calling WorkflowApi.get_workflow_tasks"
344
+ end
345
+ # resource path
346
+ local_var_path = '/workflow/tasks/search'
347
+
348
+ # query parameters
349
+ query_params = {}
350
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
351
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
352
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
353
+
354
+ # header parameters
355
+ header_params = {}
356
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
357
+ # HTTP header 'Accept' (if needed)
358
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
359
+ # HTTP header 'Content-Type'
360
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
361
+
362
+ # form parameters
363
+ form_params = {}
364
+
365
+ # http body (model)
366
+ post_body = @api_client.object_to_http_body(workflow_tasks_query)
367
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
368
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
369
+ :header_params => header_params,
370
+ :query_params => query_params,
371
+ :form_params => form_params,
372
+ :body => post_body,
373
+ :auth_names => auth_names,
374
+ :return_type => 'WorkflowTasksResponse')
375
+ if @api_client.config.debugging
376
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
377
+ end
378
+ return data, status_code, headers
379
+ end
380
+ # Insert a workflow task
381
+ # Insert a workflow task
382
+ # @param workflow_task workflow task
383
+ # @param [Hash] opts the optional parameters
384
+ # @return [WorkflowTaskResponse]
385
+ def insert_workflow_task(workflow_task, opts = {})
386
+ data, _status_code, _headers = insert_workflow_task_with_http_info(workflow_task, opts)
387
+ data
388
+ end
389
+
390
+ # Insert a workflow task
391
+ # Insert a workflow task
392
+ # @param workflow_task workflow task
393
+ # @param [Hash] opts the optional parameters
394
+ # @return [Array<(WorkflowTaskResponse, Fixnum, Hash)>] WorkflowTaskResponse data, response status code and response headers
395
+ def insert_workflow_task_with_http_info(workflow_task, opts = {})
396
+ if @api_client.config.debugging
397
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.insert_workflow_task ...'
398
+ end
399
+ # verify the required parameter 'workflow_task' is set
400
+ if @api_client.config.client_side_validation && workflow_task.nil?
401
+ fail ArgumentError, "Missing the required parameter 'workflow_task' when calling WorkflowApi.insert_workflow_task"
402
+ end
403
+ # resource path
404
+ local_var_path = '/workflow/tasks'
405
+
406
+ # query parameters
407
+ query_params = {}
408
+
409
+ # header parameters
410
+ header_params = {}
411
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
412
+ # HTTP header 'Accept' (if needed)
413
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
414
+ # HTTP header 'Content-Type'
415
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
416
+
417
+ # form parameters
418
+ form_params = {}
419
+
420
+ # http body (model)
421
+ post_body = @api_client.object_to_http_body(workflow_task)
422
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
423
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
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 => 'WorkflowTaskResponse')
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug "API called: WorkflowApi#insert_workflow_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
432
+ end
433
+ return data, status_code, headers
434
+ end
435
+ # Update a workflow task
436
+ # Update a workflow task
437
+ # @param task_uuid
438
+ # @param workflow_task Workflow task
439
+ # @param [Hash] opts the optional parameters
440
+ # @return [WorkflowTaskResponse]
441
+ def update_workflow_task(task_uuid, workflow_task, opts = {})
442
+ data, _status_code, _headers = update_workflow_task_with_http_info(task_uuid, workflow_task, opts)
443
+ data
444
+ end
445
+
446
+ # Update a workflow task
447
+ # Update a workflow task
448
+ # @param task_uuid
449
+ # @param workflow_task Workflow task
450
+ # @param [Hash] opts the optional parameters
451
+ # @return [Array<(WorkflowTaskResponse, Fixnum, Hash)>] WorkflowTaskResponse data, response status code and response headers
452
+ def update_workflow_task_with_http_info(task_uuid, workflow_task, opts = {})
453
+ if @api_client.config.debugging
454
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.update_workflow_task ...'
455
+ end
456
+ # verify the required parameter 'task_uuid' is set
457
+ if @api_client.config.client_side_validation && task_uuid.nil?
458
+ fail ArgumentError, "Missing the required parameter 'task_uuid' when calling WorkflowApi.update_workflow_task"
459
+ end
460
+ # verify the required parameter 'workflow_task' is set
461
+ if @api_client.config.client_side_validation && workflow_task.nil?
462
+ fail ArgumentError, "Missing the required parameter 'workflow_task' when calling WorkflowApi.update_workflow_task"
463
+ end
464
+ # resource path
465
+ local_var_path = '/workflow/tasks/{task_uuid}'.sub('{' + 'task_uuid' + '}', task_uuid.to_s)
466
+
467
+ # query parameters
468
+ query_params = {}
469
+
470
+ # header parameters
471
+ header_params = {}
472
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
473
+ # HTTP header 'Accept' (if needed)
474
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
475
+ # HTTP header 'Content-Type'
476
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
477
+
478
+ # form parameters
479
+ form_params = {}
480
+
481
+ # http body (model)
482
+ post_body = @api_client.object_to_http_body(workflow_task)
483
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
484
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
485
+ :header_params => header_params,
486
+ :query_params => query_params,
487
+ :form_params => form_params,
488
+ :body => post_body,
489
+ :auth_names => auth_names,
490
+ :return_type => 'WorkflowTaskResponse')
491
+ if @api_client.config.debugging
492
+ @api_client.config.logger.debug "API called: WorkflowApi#update_workflow_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
493
+ end
494
+ return data, status_code, headers
495
+ end
496
+ end
497
+ end