ultracart_api 3.10.175 → 3.10.178
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/docs/WebhookEventSubscription.md +1 -0
- data/docs/WorkflowApi.md +46 -0
- data/docs/WorkflowTask.md +1 -0
- data/docs/WorkflowTasksResponse.md +1 -0
- data/docs/WorkflowUserResponse.md +12 -0
- data/lib/ultracart_api/api/workflow_api.rb +49 -0
- data/lib/ultracart_api/models/webhook_event_subscription.rb +11 -1
- data/lib/ultracart_api/models/workflow_task.rb +13 -3
- data/lib/ultracart_api/models/workflow_tasks_response.rb +11 -1
- data/lib/ultracart_api/models/workflow_user_response.rb +221 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b524385bb0691e45d2c970d7efaffe9c1f8c5ad160f973ed1c4c3ff69c257416
|
4
|
+
data.tar.gz: d3d413ab77a535e600bba948cd3e84ed6c691a98438043d53793ad87b59f762e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa1aed5d0fa41da8ca7aca043d1b074630b7aeb15ac7d4ea101072e84bbfcc95e837890f08a606cbe341f63dff343530ccaee9cf0d5b945fe44968c1e092bfd7
|
7
|
+
data.tar.gz: 10250cef183253c441d27bb2af940202d3d76ce88c7fc856192dfff1fd275fc67b1c43a2bc3e9e7c6181da43dd1c9cd01be7fc2b032cd8c3967f5878cabb07b3
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 3.10.
|
10
|
+
- Package version: 3.10.178
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-3.10.
|
27
|
+
gem install ./ultracart_api-3.10.178.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.178.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'ultracart_api', '~> 3.10.
|
35
|
+
gem 'ultracart_api', '~> 3.10.178'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -514,6 +514,7 @@ Class | Method | HTTP request | Description
|
|
514
514
|
*UltracartClient::WebhookApi* | [**update_webhook**](docs/WebhookApi.md#update_webhook) | **PUT** /webhook/webhooks/{webhookOid} | Update a webhook
|
515
515
|
*UltracartClient::WorkflowApi* | [**get_workflow_assignment_groups**](docs/WorkflowApi.md#get_workflow_assignment_groups) | **GET** /workflow/assignment_groups | Retrieve a list of groups that workflow tasks can be assigned to
|
516
516
|
*UltracartClient::WorkflowApi* | [**get_workflow_assignment_users**](docs/WorkflowApi.md#get_workflow_assignment_users) | **GET** /workflow/assignment_users | Retrieve a list of users that workflow tasks can be assigned to
|
517
|
+
*UltracartClient::WorkflowApi* | [**get_workflow_me**](docs/WorkflowApi.md#get_workflow_me) | **GET** /workflow/me | Retrieve a user object for myself
|
517
518
|
*UltracartClient::WorkflowApi* | [**get_workflow_task**](docs/WorkflowApi.md#get_workflow_task) | **GET** /workflow/tasks/{task_uuid} | Retrieve a workflow task
|
518
519
|
*UltracartClient::WorkflowApi* | [**get_workflow_task_attachment_upload_url**](docs/WorkflowApi.md#get_workflow_task_attachment_upload_url) | **GET** /workflow/tasks/attachments/{extension} | Get a presigned workflow task attachment upload URL
|
519
520
|
*UltracartClient::WorkflowApi* | [**get_workflow_task_by_object_type**](docs/WorkflowApi.md#get_workflow_task_by_object_type) | **GET** /workflow/tasks/by/{object_type}/{object_id} | Retrieve a workflow task by object type and id
|
@@ -1323,6 +1324,7 @@ Class | Method | HTTP request | Description
|
|
1323
1324
|
- [UltracartClient::WorkflowTasksRequest](docs/WorkflowTasksRequest.md)
|
1324
1325
|
- [UltracartClient::WorkflowTasksResponse](docs/WorkflowTasksResponse.md)
|
1325
1326
|
- [UltracartClient::WorkflowUser](docs/WorkflowUser.md)
|
1327
|
+
- [UltracartClient::WorkflowUserResponse](docs/WorkflowUserResponse.md)
|
1326
1328
|
- [UltracartClient::WorkflowUsersResponse](docs/WorkflowUsersResponse.md)
|
1327
1329
|
|
1328
1330
|
|
@@ -1396,6 +1398,9 @@ Not every change is committed to every SDK.
|
|
1396
1398
|
|
1397
1399
|
| Version | Date | Comments |
|
1398
1400
|
| --: | :-: | --- |
|
1401
|
+
| 3.10.178 | 01/03/2024 | workflow - add task_context field to task obj |
|
1402
|
+
| 3.10.177 | 12/15/2023 | bug fix on bad docs breaking yaml schema |
|
1403
|
+
| 3.10.176 | 12/12/2023 | webhook - added event ruler property |
|
1399
1404
|
| 3.10.175 | 11/21/2023 | coupons - addl support on tiered amount/percent off items |
|
1400
1405
|
| 3.10.174 | 11/20/2023 | coupon - add item tag support to percent off items and free shipping |
|
1401
1406
|
| 3.10.173 | 11/20/2023 | item.google_product_search.color bugfix for bad length validation: 20 to 100 |
|
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
8
8
|
**discontinued_flag** | **BOOLEAN** | True if the event is discontinued. See the API change log for details on migration details. | [optional]
|
9
9
|
**event_description** | **String** | Description of the event | [optional]
|
10
10
|
**event_name** | **String** | Event name | [optional]
|
11
|
+
**event_ruler** | **String** | Optional - Event ruler expression to filter events to. Only events that match this Ruler expression will be transmitted to the webhook. | [optional]
|
11
12
|
**expansion** | **String** | The expand string for the notification object. See the individual resource _expand documentation for valid values. | [optional]
|
12
13
|
**subscribed** | **BOOLEAN** | True if this is event is subscribed to | [optional]
|
13
14
|
**supports_reflow** | **BOOLEAN** | True if the event can be triggered to reflow existing records | [optional]
|
data/docs/WorkflowApi.md
CHANGED
@@ -6,6 +6,7 @@ Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
7
7
|
[**get_workflow_assignment_groups**](WorkflowApi.md#get_workflow_assignment_groups) | **GET** /workflow/assignment_groups | Retrieve a list of groups that workflow tasks can be assigned to
|
8
8
|
[**get_workflow_assignment_users**](WorkflowApi.md#get_workflow_assignment_users) | **GET** /workflow/assignment_users | Retrieve a list of users that workflow tasks can be assigned to
|
9
|
+
[**get_workflow_me**](WorkflowApi.md#get_workflow_me) | **GET** /workflow/me | Retrieve a user object for myself
|
9
10
|
[**get_workflow_task**](WorkflowApi.md#get_workflow_task) | **GET** /workflow/tasks/{task_uuid} | Retrieve a workflow task
|
10
11
|
[**get_workflow_task_attachment_upload_url**](WorkflowApi.md#get_workflow_task_attachment_upload_url) | **GET** /workflow/tasks/attachments/{extension} | Get a presigned workflow task attachment upload URL
|
11
12
|
[**get_workflow_task_by_object_type**](WorkflowApi.md#get_workflow_task_by_object_type) | **GET** /workflow/tasks/by/{object_type}/{object_id} | Retrieve a workflow task by object type and id
|
@@ -120,6 +121,51 @@ Name | Type | Description | Notes
|
|
120
121
|
|
121
122
|
|
122
123
|
|
124
|
+
# **get_workflow_me**
|
125
|
+
> WorkflowUserResponse get_workflow_me
|
126
|
+
|
127
|
+
Retrieve a user object for myself
|
128
|
+
|
129
|
+
Retrieve a user object for myself
|
130
|
+
|
131
|
+
### Example
|
132
|
+
```ruby
|
133
|
+
# load the gem
|
134
|
+
require 'ultracart_api'
|
135
|
+
|
136
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
137
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
138
|
+
api_instance = UltracartClient::WorkflowApi.new_using_api_key(simple_key, false, false)
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
begin
|
143
|
+
#Retrieve a user object for myself
|
144
|
+
result = api_instance.get_workflow_me
|
145
|
+
p result
|
146
|
+
rescue UltracartClient::ApiError => e
|
147
|
+
puts "Exception when calling WorkflowApi->get_workflow_me: #{e}"
|
148
|
+
end
|
149
|
+
```
|
150
|
+
|
151
|
+
### Parameters
|
152
|
+
This endpoint does not need any parameter.
|
153
|
+
|
154
|
+
### Return type
|
155
|
+
|
156
|
+
[**WorkflowUserResponse**](WorkflowUserResponse.md)
|
157
|
+
|
158
|
+
### Authorization
|
159
|
+
|
160
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
161
|
+
|
162
|
+
### HTTP request headers
|
163
|
+
|
164
|
+
- **Content-Type**: application/json
|
165
|
+
- **Accept**: application/json
|
166
|
+
|
167
|
+
|
168
|
+
|
123
169
|
# **get_workflow_task**
|
124
170
|
> WorkflowTaskResponse get_workflow_task(task_uuid)
|
125
171
|
|
data/docs/WorkflowTask.md
CHANGED
@@ -22,6 +22,7 @@ Name | Type | Description | Notes
|
|
22
22
|
**object_url** | **String** | Object URL | [optional]
|
23
23
|
**priority** | **String** | Priority | [optional]
|
24
24
|
**status** | **String** | Status of the workflow task | [optional]
|
25
|
+
**task_context** | **String** | User friendly string of the task context | [optional]
|
25
26
|
**task_details** | **String** | Task Details | [optional]
|
26
27
|
**task_name** | **String** | Task Name | [optional]
|
27
28
|
**workflow_task_uuid** | **String** | Workflow Task UUID | [optional]
|
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
**error** | [**Error**](Error.md) | | [optional]
|
7
7
|
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
8
8
|
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
9
|
+
**task_context** | **String** | User friendly string of the task context if querying for a specific object type/id | [optional]
|
9
10
|
**tasks** | [**Array<WorkflowTask>**](WorkflowTask.md) | tasks | [optional]
|
10
11
|
**warning** | [**Warning**](Warning.md) | | [optional]
|
11
12
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::WorkflowUserResponse
|
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
|
+
**user** | [**WorkflowUser**](WorkflowUser.md) | | [optional]
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
11
|
+
|
12
|
+
|
@@ -142,6 +142,55 @@ module UltracartClient
|
|
142
142
|
end
|
143
143
|
return data, status_code, headers
|
144
144
|
end
|
145
|
+
# Retrieve a user object for myself
|
146
|
+
# Retrieve a user object for myself
|
147
|
+
# @param [Hash] opts the optional parameters
|
148
|
+
# @return [WorkflowUserResponse]
|
149
|
+
def get_workflow_me(opts = {})
|
150
|
+
data, _status_code, _headers = get_workflow_me_with_http_info(opts)
|
151
|
+
data
|
152
|
+
end
|
153
|
+
|
154
|
+
# Retrieve a user object for myself
|
155
|
+
# Retrieve a user object for myself
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [Array<(WorkflowUserResponse, Fixnum, Hash)>] WorkflowUserResponse data, response status code and response headers
|
158
|
+
def get_workflow_me_with_http_info(opts = {})
|
159
|
+
if @api_client.config.debugging
|
160
|
+
@api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_me ...'
|
161
|
+
end
|
162
|
+
# resource path
|
163
|
+
local_var_path = '/workflow/me'
|
164
|
+
|
165
|
+
# query parameters
|
166
|
+
query_params = {}
|
167
|
+
|
168
|
+
# header parameters
|
169
|
+
header_params = {}
|
170
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
171
|
+
# HTTP header 'Accept' (if needed)
|
172
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
173
|
+
# HTTP header 'Content-Type'
|
174
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
175
|
+
|
176
|
+
# form parameters
|
177
|
+
form_params = {}
|
178
|
+
|
179
|
+
# http body (model)
|
180
|
+
post_body = nil
|
181
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
182
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
183
|
+
:header_params => header_params,
|
184
|
+
:query_params => query_params,
|
185
|
+
:form_params => form_params,
|
186
|
+
:body => post_body,
|
187
|
+
:auth_names => auth_names,
|
188
|
+
:return_type => 'WorkflowUserResponse')
|
189
|
+
if @api_client.config.debugging
|
190
|
+
@api_client.config.logger.debug "API called: WorkflowApi#get_workflow_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
191
|
+
end
|
192
|
+
return data, status_code, headers
|
193
|
+
end
|
145
194
|
# Retrieve a workflow task
|
146
195
|
# Retrieve a workflow task
|
147
196
|
# @param task_uuid
|
@@ -29,6 +29,9 @@ module UltracartClient
|
|
29
29
|
# Event name
|
30
30
|
attr_accessor :event_name
|
31
31
|
|
32
|
+
# Optional - Event ruler expression to filter events to. Only events that match this Ruler expression will be transmitted to the webhook.
|
33
|
+
attr_accessor :event_ruler
|
34
|
+
|
32
35
|
# The expand string for the notification object. See the individual resource _expand documentation for valid values.
|
33
36
|
attr_accessor :expansion
|
34
37
|
|
@@ -49,6 +52,7 @@ module UltracartClient
|
|
49
52
|
:'discontinued_flag' => :'discontinued_flag',
|
50
53
|
:'event_description' => :'event_description',
|
51
54
|
:'event_name' => :'event_name',
|
55
|
+
:'event_ruler' => :'event_ruler',
|
52
56
|
:'expansion' => :'expansion',
|
53
57
|
:'subscribed' => :'subscribed',
|
54
58
|
:'supports_reflow' => :'supports_reflow',
|
@@ -64,6 +68,7 @@ module UltracartClient
|
|
64
68
|
:'discontinued_flag' => :'BOOLEAN',
|
65
69
|
:'event_description' => :'String',
|
66
70
|
:'event_name' => :'String',
|
71
|
+
:'event_ruler' => :'String',
|
67
72
|
:'expansion' => :'String',
|
68
73
|
:'subscribed' => :'BOOLEAN',
|
69
74
|
:'supports_reflow' => :'BOOLEAN',
|
@@ -99,6 +104,10 @@ module UltracartClient
|
|
99
104
|
self.event_name = attributes[:'event_name']
|
100
105
|
end
|
101
106
|
|
107
|
+
if attributes.has_key?(:'event_ruler')
|
108
|
+
self.event_ruler = attributes[:'event_ruler']
|
109
|
+
end
|
110
|
+
|
102
111
|
if attributes.has_key?(:'expansion')
|
103
112
|
self.expansion = attributes[:'expansion']
|
104
113
|
end
|
@@ -139,6 +148,7 @@ module UltracartClient
|
|
139
148
|
discontinued_flag == o.discontinued_flag &&
|
140
149
|
event_description == o.event_description &&
|
141
150
|
event_name == o.event_name &&
|
151
|
+
event_ruler == o.event_ruler &&
|
142
152
|
expansion == o.expansion &&
|
143
153
|
subscribed == o.subscribed &&
|
144
154
|
supports_reflow == o.supports_reflow &&
|
@@ -154,7 +164,7 @@ module UltracartClient
|
|
154
164
|
# Calculates hash code according to all attributes.
|
155
165
|
# @return [Fixnum] Hash code
|
156
166
|
def hash
|
157
|
-
[comments, deprecated_flag, discontinued_flag, event_description, event_name, expansion, subscribed, supports_reflow, webhook_event_oid].hash
|
167
|
+
[comments, deprecated_flag, discontinued_flag, event_description, event_name, event_ruler, expansion, subscribed, supports_reflow, webhook_event_oid].hash
|
158
168
|
end
|
159
169
|
|
160
170
|
# Builds the object from hash
|
@@ -70,6 +70,9 @@ module UltracartClient
|
|
70
70
|
# Status of the workflow task
|
71
71
|
attr_accessor :status
|
72
72
|
|
73
|
+
# User friendly string of the task context
|
74
|
+
attr_accessor :task_context
|
75
|
+
|
73
76
|
# Task Details
|
74
77
|
attr_accessor :task_details
|
75
78
|
|
@@ -123,6 +126,7 @@ module UltracartClient
|
|
123
126
|
:'object_url' => :'object_url',
|
124
127
|
:'priority' => :'priority',
|
125
128
|
:'status' => :'status',
|
129
|
+
:'task_context' => :'task_context',
|
126
130
|
:'task_details' => :'task_details',
|
127
131
|
:'task_name' => :'task_name',
|
128
132
|
:'workflow_task_uuid' => :'workflow_task_uuid'
|
@@ -151,6 +155,7 @@ module UltracartClient
|
|
151
155
|
:'object_url' => :'String',
|
152
156
|
:'priority' => :'String',
|
153
157
|
:'status' => :'String',
|
158
|
+
:'task_context' => :'String',
|
154
159
|
:'task_details' => :'String',
|
155
160
|
:'task_name' => :'String',
|
156
161
|
:'workflow_task_uuid' => :'String'
|
@@ -247,6 +252,10 @@ module UltracartClient
|
|
247
252
|
self.status = attributes[:'status']
|
248
253
|
end
|
249
254
|
|
255
|
+
if attributes.has_key?(:'task_context')
|
256
|
+
self.task_context = attributes[:'task_context']
|
257
|
+
end
|
258
|
+
|
250
259
|
if attributes.has_key?(:'task_details')
|
251
260
|
self.task_details = attributes[:'task_details']
|
252
261
|
end
|
@@ -270,7 +279,7 @@ module UltracartClient
|
|
270
279
|
# Check to see if the all the properties in the model are valid
|
271
280
|
# @return true if the model is valid
|
272
281
|
def valid?
|
273
|
-
object_type_validator = EnumAttributeValidator.new('String', ['order', 'auto order', 'item', 'customer profile'])
|
282
|
+
object_type_validator = EnumAttributeValidator.new('String', ['order', 'auto order', 'item', 'customer profile', 'storefront'])
|
274
283
|
return false unless object_type_validator.valid?(@object_type)
|
275
284
|
priority_validator = EnumAttributeValidator.new('String', ['1 - low', '2 - medium', '3 - high', '4 - critical'])
|
276
285
|
return false unless priority_validator.valid?(@priority)
|
@@ -282,7 +291,7 @@ module UltracartClient
|
|
282
291
|
# Custom attribute writer method checking allowed values (enum).
|
283
292
|
# @param [Object] object_type Object to be assigned
|
284
293
|
def object_type=(object_type)
|
285
|
-
validator = EnumAttributeValidator.new('String', ['order', 'auto order', 'item', 'customer profile'])
|
294
|
+
validator = EnumAttributeValidator.new('String', ['order', 'auto order', 'item', 'customer profile', 'storefront'])
|
286
295
|
unless validator.valid?(object_type)
|
287
296
|
fail ArgumentError, 'invalid value for "object_type", must be one of #{validator.allowable_values}.'
|
288
297
|
end
|
@@ -333,6 +342,7 @@ module UltracartClient
|
|
333
342
|
object_url == o.object_url &&
|
334
343
|
priority == o.priority &&
|
335
344
|
status == o.status &&
|
345
|
+
task_context == o.task_context &&
|
336
346
|
task_details == o.task_details &&
|
337
347
|
task_name == o.task_name &&
|
338
348
|
workflow_task_uuid == o.workflow_task_uuid
|
@@ -347,7 +357,7 @@ module UltracartClient
|
|
347
357
|
# Calculates hash code according to all attributes.
|
348
358
|
# @return [Fixnum] Hash code
|
349
359
|
def hash
|
350
|
-
[assigned_to_group, assigned_to_group_id, assigned_to_user, assigned_to_user_id, attachments, created_by, created_dts, delay_until_dts, due_dts, histories, last_update_dts, merchant_id, notes, object_email, object_id, object_type, object_url, priority, status, task_details, task_name, workflow_task_uuid].hash
|
360
|
+
[assigned_to_group, assigned_to_group_id, assigned_to_user, assigned_to_user_id, attachments, created_by, created_dts, delay_until_dts, due_dts, histories, last_update_dts, merchant_id, notes, object_email, object_id, object_type, object_url, priority, status, task_context, task_details, task_name, workflow_task_uuid].hash
|
351
361
|
end
|
352
362
|
|
353
363
|
# Builds the object from hash
|
@@ -21,6 +21,9 @@ module UltracartClient
|
|
21
21
|
# Indicates if API call was successful
|
22
22
|
attr_accessor :success
|
23
23
|
|
24
|
+
# User friendly string of the task context if querying for a specific object type/id
|
25
|
+
attr_accessor :task_context
|
26
|
+
|
24
27
|
# tasks
|
25
28
|
attr_accessor :tasks
|
26
29
|
|
@@ -32,6 +35,7 @@ module UltracartClient
|
|
32
35
|
:'error' => :'error',
|
33
36
|
:'metadata' => :'metadata',
|
34
37
|
:'success' => :'success',
|
38
|
+
:'task_context' => :'task_context',
|
35
39
|
:'tasks' => :'tasks',
|
36
40
|
:'warning' => :'warning'
|
37
41
|
}
|
@@ -43,6 +47,7 @@ module UltracartClient
|
|
43
47
|
:'error' => :'Error',
|
44
48
|
:'metadata' => :'ResponseMetadata',
|
45
49
|
:'success' => :'BOOLEAN',
|
50
|
+
:'task_context' => :'String',
|
46
51
|
:'tasks' => :'Array<WorkflowTask>',
|
47
52
|
:'warning' => :'Warning'
|
48
53
|
}
|
@@ -68,6 +73,10 @@ module UltracartClient
|
|
68
73
|
self.success = attributes[:'success']
|
69
74
|
end
|
70
75
|
|
76
|
+
if attributes.has_key?(:'task_context')
|
77
|
+
self.task_context = attributes[:'task_context']
|
78
|
+
end
|
79
|
+
|
71
80
|
if attributes.has_key?(:'tasks')
|
72
81
|
if (value = attributes[:'tasks']).is_a?(Array)
|
73
82
|
self.tasks = value
|
@@ -100,6 +109,7 @@ module UltracartClient
|
|
100
109
|
error == o.error &&
|
101
110
|
metadata == o.metadata &&
|
102
111
|
success == o.success &&
|
112
|
+
task_context == o.task_context &&
|
103
113
|
tasks == o.tasks &&
|
104
114
|
warning == o.warning
|
105
115
|
end
|
@@ -113,7 +123,7 @@ module UltracartClient
|
|
113
123
|
# Calculates hash code according to all attributes.
|
114
124
|
# @return [Fixnum] Hash code
|
115
125
|
def hash
|
116
|
-
[error, metadata, success, tasks, warning].hash
|
126
|
+
[error, metadata, success, task_context, tasks, warning].hash
|
117
127
|
end
|
118
128
|
|
119
129
|
# Builds the object from hash
|
@@ -0,0 +1,221 @@
|
|
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 'date'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class WorkflowUserResponse
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
attr_accessor :metadata
|
20
|
+
|
21
|
+
# Indicates if API call was successful
|
22
|
+
attr_accessor :success
|
23
|
+
|
24
|
+
attr_accessor :user
|
25
|
+
|
26
|
+
attr_accessor :warning
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'error' => :'error',
|
32
|
+
:'metadata' => :'metadata',
|
33
|
+
:'success' => :'success',
|
34
|
+
:'user' => :'user',
|
35
|
+
:'warning' => :'warning'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'error' => :'Error',
|
43
|
+
:'metadata' => :'ResponseMetadata',
|
44
|
+
:'success' => :'BOOLEAN',
|
45
|
+
:'user' => :'WorkflowUser',
|
46
|
+
:'warning' => :'Warning'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
return unless attributes.is_a?(Hash)
|
54
|
+
|
55
|
+
# convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
57
|
+
|
58
|
+
if attributes.has_key?(:'error')
|
59
|
+
self.error = attributes[:'error']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'metadata')
|
63
|
+
self.metadata = attributes[:'metadata']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'success')
|
67
|
+
self.success = attributes[:'success']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'user')
|
71
|
+
self.user = attributes[:'user']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.has_key?(:'warning')
|
75
|
+
self.warning = attributes[:'warning']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
80
|
+
# @return Array for valid properties with the reasons
|
81
|
+
def list_invalid_properties
|
82
|
+
invalid_properties = Array.new
|
83
|
+
invalid_properties
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
def valid?
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Checks equality by comparing each attribute.
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
error == o.error &&
|
98
|
+
metadata == o.metadata &&
|
99
|
+
success == o.success &&
|
100
|
+
user == o.user &&
|
101
|
+
warning == o.warning
|
102
|
+
end
|
103
|
+
|
104
|
+
# @see the `==` method
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def eql?(o)
|
107
|
+
self == o
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Fixnum] Hash code
|
112
|
+
def hash
|
113
|
+
[error, metadata, success, user, warning].hash
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
self.class.swagger_types.each_pair do |key, type|
|
122
|
+
if type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :DateTime
|
143
|
+
DateTime.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :BOOLEAN
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
temp_model = UltracartClient.const_get(type).new
|
174
|
+
temp_model.build_from_hash(value)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the string representation of the object
|
179
|
+
# @return [String] String presentation of the object
|
180
|
+
def to_s
|
181
|
+
to_hash.to_s
|
182
|
+
end
|
183
|
+
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_body
|
187
|
+
to_hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the object in the form of hash
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_hash
|
193
|
+
hash = {}
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
195
|
+
value = self.send(attr)
|
196
|
+
next if value.nil?
|
197
|
+
hash[param] = _to_hash(value)
|
198
|
+
end
|
199
|
+
hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Outputs non-array value in the form of hash
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
204
|
+
# @param [Object] value Any valid value
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
206
|
+
def _to_hash(value)
|
207
|
+
if value.is_a?(Array)
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
209
|
+
elsif value.is_a?(Hash)
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
212
|
+
end
|
213
|
+
elsif value.respond_to? :to_hash
|
214
|
+
value.to_hash
|
215
|
+
else
|
216
|
+
value
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -816,6 +816,7 @@ require 'ultracart_api/models/workflow_task_response'
|
|
816
816
|
require 'ultracart_api/models/workflow_tasks_request'
|
817
817
|
require 'ultracart_api/models/workflow_tasks_response'
|
818
818
|
require 'ultracart_api/models/workflow_user'
|
819
|
+
require 'ultracart_api/models/workflow_user_response'
|
819
820
|
require 'ultracart_api/models/workflow_users_response'
|
820
821
|
|
821
822
|
# APIs
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.10.
|
4
|
+
version: 3.10.178
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -1041,6 +1041,7 @@ files:
|
|
1041
1041
|
- docs/WorkflowTasksRequest.md
|
1042
1042
|
- docs/WorkflowTasksResponse.md
|
1043
1043
|
- docs/WorkflowUser.md
|
1044
|
+
- docs/WorkflowUserResponse.md
|
1044
1045
|
- docs/WorkflowUsersResponse.md
|
1045
1046
|
- git_push.sh
|
1046
1047
|
- lib/ultracart_api.rb
|
@@ -1867,6 +1868,7 @@ files:
|
|
1867
1868
|
- lib/ultracart_api/models/workflow_tasks_request.rb
|
1868
1869
|
- lib/ultracart_api/models/workflow_tasks_response.rb
|
1869
1870
|
- lib/ultracart_api/models/workflow_user.rb
|
1871
|
+
- lib/ultracart_api/models/workflow_user_response.rb
|
1870
1872
|
- lib/ultracart_api/models/workflow_users_response.rb
|
1871
1873
|
- lib/ultracart_api/version.rb
|
1872
1874
|
- spec/api_client_spec.rb
|