ultracart_api 4.0.192 → 4.0.195

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f75a4023c4896f85b9fab94780bc01965ff7ded9785f45ed26f579f62830e944
4
- data.tar.gz: 622da61ea02f6f4f500a44f408945f24333825b2f9049996b4c7ba47ec4e4a3f
3
+ metadata.gz: f26b248b637505cfa791a06bf2a401e79b85c9796f99bb47811a67b49365e495
4
+ data.tar.gz: 3e73d0cdb28a68ea701909dcd2e9870ed11668707d9a500b10cd01803592d8bb
5
5
  SHA512:
6
- metadata.gz: 4349dadeec282b50e2be29c393d1d7fb5c0e4ab76eba841a7efdfa8df064552672cb75f8a64c8838129ecfbd50adc12152888bf27255718a0073584fb97e4ee4
7
- data.tar.gz: f2619af246d6b4c947f2c147d756b09b0092268f91aae768e805d75761e0a5b976c4c63fb0acf29afe54309206291ab23699ff73cbdc35d54de5082e90b9492a
6
+ metadata.gz: 798a5f9345a487a413d2d4765b0d69f37fd1255d7fcca8b269b43718f3c8fcd3e3d5f79dde6fd19ef8b7cb91afca66eb9284c645cd2173b4dfb18d65992a6a2a
7
+ data.tar.gz: 41b57f1f36756676abc90ee4a37fa188ba648473bed1ea47afb13884896f1cb1ee5afd8446ddd0a8050974c174502b73b69261ee7cfe883c025dc6e15e0250f1
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.192
10
+ - Package version: 4.0.195
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.192.gem
27
+ gem install ./ultracart_api-4.0.195.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.192.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.195.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.192'
36
+ gem 'ultracart_api', '~> 4.0.195'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -520,6 +520,7 @@ Class | Method | HTTP request | Description
520
520
  *UltracartClient::WebhookApi* | [**update_webhook**](docs/WebhookApi.md#update_webhook) | **PUT** /webhook/webhooks/{webhookOid} | Update a webhook
521
521
  *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
522
522
  *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
523
+ *UltracartClient::WorkflowApi* | [**get_workflow_me**](docs/WorkflowApi.md#get_workflow_me) | **GET** /workflow/me | Retrieve a user object for myself
523
524
  *UltracartClient::WorkflowApi* | [**get_workflow_task**](docs/WorkflowApi.md#get_workflow_task) | **GET** /workflow/tasks/{task_uuid} | Retrieve a workflow task
524
525
  *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
525
526
  *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
@@ -1328,6 +1329,7 @@ Class | Method | HTTP request | Description
1328
1329
  - [UltracartClient::WorkflowTasksRequest](docs/WorkflowTasksRequest.md)
1329
1330
  - [UltracartClient::WorkflowTasksResponse](docs/WorkflowTasksResponse.md)
1330
1331
  - [UltracartClient::WorkflowUser](docs/WorkflowUser.md)
1332
+ - [UltracartClient::WorkflowUserResponse](docs/WorkflowUserResponse.md)
1331
1333
  - [UltracartClient::WorkflowUsersResponse](docs/WorkflowUsersResponse.md)
1332
1334
 
1333
1335
 
@@ -1404,6 +1406,9 @@ Not every change is committed to every SDK.
1404
1406
 
1405
1407
  | Version | Date | Comments |
1406
1408
  | --: | :-: | --- |
1409
+ | 4.0.195 | 01/03/2024 | workflow - add task_context field to task obj |
1410
+ | 4.0.194 | 12/15/2023 | bug fix on bad docs breaking yaml schema |
1411
+ | 4.0.193 | 12/12/2023 | webhook - added event ruler property |
1407
1412
  | 4.0.192 | 11/21/2023 | coupons - addl support on tiered amount/percent off items |
1408
1413
  | 4.0.191 | 11/20/2023 | coupon - add item tag support to percent off items and free shipping |
1409
1414
  | 4.0.190 | 11/20/2023 | item.google_product_search.color bugfix for bad length validation: 20 to 100 |
@@ -9,6 +9,7 @@
9
9
  | **discontinued_flag** | **Boolean** | True if the event is discontinued. See the API change log for details on migration details. | [optional] |
10
10
  | **event_description** | **String** | Description of the event | [optional] |
11
11
  | **event_name** | **String** | Event name | [optional] |
12
+ | **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] |
12
13
  | **expansion** | **String** | The expand string for the notification object. See the individual resource _expand documentation for valid values. | [optional] |
13
14
  | **subscribed** | **Boolean** | True if this is event is subscribed to | [optional] |
14
15
  | **supports_reflow** | **Boolean** | True if the event can be triggered to reflow existing records | [optional] |
@@ -25,6 +26,7 @@ instance = UltracartClient::WebhookEventSubscription.new(
25
26
  discontinued_flag: null,
26
27
  event_description: null,
27
28
  event_name: null,
29
+ event_ruler: null,
28
30
  expansion: null,
29
31
  subscribed: null,
30
32
  supports_reflow: null,
data/docs/WorkflowApi.md CHANGED
@@ -6,6 +6,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
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 |
@@ -164,6 +165,74 @@ end
164
165
  - **Accept**: application/json
165
166
 
166
167
 
168
+ ## get_workflow_me
169
+
170
+ > <WorkflowUserResponse> get_workflow_me
171
+
172
+ Retrieve a user object for myself
173
+
174
+ Retrieve a user object for myself
175
+
176
+ ### Examples
177
+
178
+ ```ruby
179
+ require 'time'
180
+ require 'ultracart_api'
181
+ require 'json'
182
+ require 'yaml'
183
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
184
+
185
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
186
+ # As such, this might not be the best way to use this object.
187
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
188
+
189
+ api = UltracartClient::WorkflowApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
190
+
191
+ begin
192
+ # Retrieve a user object for myself
193
+ result = api_instance.get_workflow_me
194
+ p result
195
+ rescue UltracartClient::ApiError => e
196
+ puts "Error when calling WorkflowApi->get_workflow_me: #{e}"
197
+ end
198
+ ```
199
+
200
+ #### Using the get_workflow_me_with_http_info variant
201
+
202
+ This returns an Array which contains the response data, status code and headers.
203
+
204
+ > <Array(<WorkflowUserResponse>, Integer, Hash)> get_workflow_me_with_http_info
205
+
206
+ ```ruby
207
+ begin
208
+ # Retrieve a user object for myself
209
+ data, status_code, headers = api_instance.get_workflow_me_with_http_info
210
+ p status_code # => 2xx
211
+ p headers # => { ... }
212
+ p data # => <WorkflowUserResponse>
213
+ rescue UltracartClient::ApiError => e
214
+ puts "Error when calling WorkflowApi->get_workflow_me_with_http_info: #{e}"
215
+ end
216
+ ```
217
+
218
+ ### Parameters
219
+
220
+ This endpoint does not need any parameter.
221
+
222
+ ### Return type
223
+
224
+ [**WorkflowUserResponse**](WorkflowUserResponse.md)
225
+
226
+ ### Authorization
227
+
228
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
229
+
230
+ ### HTTP request headers
231
+
232
+ - **Content-Type**: Not defined
233
+ - **Accept**: application/json
234
+
235
+
167
236
  ## get_workflow_task
168
237
 
169
238
  > <WorkflowTaskResponse> get_workflow_task(task_uuid)
data/docs/WorkflowTask.md CHANGED
@@ -23,6 +23,7 @@
23
23
  | **object_url** | **String** | Object URL | [optional] |
24
24
  | **priority** | **String** | Priority | [optional] |
25
25
  | **status** | **String** | Status of the workflow task | [optional] |
26
+ | **task_context** | **String** | User friendly string of the task context | [optional] |
26
27
  | **task_details** | **String** | Task Details | [optional] |
27
28
  | **task_name** | **String** | Task Name | [optional] |
28
29
  | **workflow_task_uuid** | **String** | Workflow Task UUID | [optional] |
@@ -52,6 +53,7 @@ instance = UltracartClient::WorkflowTask.new(
52
53
  object_url: null,
53
54
  priority: null,
54
55
  status: null,
56
+ task_context: null,
55
57
  task_details: null,
56
58
  task_name: null,
57
59
  workflow_task_uuid: null
@@ -7,6 +7,7 @@
7
7
  | **error** | [**Error**](Error.md) | | [optional] |
8
8
  | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
9
9
  | **success** | **Boolean** | Indicates if API call was successful | [optional] |
10
+ | **task_context** | **String** | User friendly string of the task context if querying for a specific object type/id | [optional] |
10
11
  | **tasks** | [**Array&lt;WorkflowTask&gt;**](WorkflowTask.md) | tasks | [optional] |
11
12
  | **warning** | [**Warning**](Warning.md) | | [optional] |
12
13
 
@@ -19,6 +20,7 @@ instance = UltracartClient::WorkflowTasksResponse.new(
19
20
  error: null,
20
21
  metadata: null,
21
22
  success: null,
23
+ task_context: null,
22
24
  tasks: null,
23
25
  warning: null
24
26
  )
@@ -0,0 +1,26 @@
1
+ # UltracartClient::WorkflowUserResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | [**Error**](Error.md) | | [optional] |
8
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
9
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
10
+ | **user** | [**WorkflowUser**](WorkflowUser.md) | | [optional] |
11
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::WorkflowUserResponse.new(
19
+ error: null,
20
+ metadata: null,
21
+ success: null,
22
+ user: null,
23
+ warning: null
24
+ )
25
+ ```
26
+
@@ -160,6 +160,64 @@ module UltracartClient
160
160
  return data, status_code, headers
161
161
  end
162
162
 
163
+ # Retrieve a user object for myself
164
+ # Retrieve a user object for myself
165
+ # @param [Hash] opts the optional parameters
166
+ # @return [WorkflowUserResponse]
167
+ def get_workflow_me(opts = {})
168
+ data, _status_code, _headers = get_workflow_me_with_http_info(opts)
169
+ data
170
+ end
171
+
172
+ # Retrieve a user object for myself
173
+ # Retrieve a user object for myself
174
+ # @param [Hash] opts the optional parameters
175
+ # @return [Array<(WorkflowUserResponse, Integer, Hash)>] WorkflowUserResponse data, response status code and response headers
176
+ def get_workflow_me_with_http_info(opts = {})
177
+ if @api_client.config.debugging
178
+ @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_me ...'
179
+ end
180
+ # resource path
181
+ local_var_path = '/workflow/me'
182
+
183
+ # query parameters
184
+ query_params = opts[:query_params] || {}
185
+
186
+ # header parameters
187
+ header_params = opts[:header_params] || {}
188
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
191
+
192
+ # form parameters
193
+ form_params = opts[:form_params] || {}
194
+
195
+ # http body (model)
196
+ post_body = opts[:debug_body]
197
+
198
+ # return_type
199
+ return_type = opts[:debug_return_type] || 'WorkflowUserResponse'
200
+
201
+ # auth_names
202
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
203
+
204
+ new_options = opts.merge(
205
+ :operation => :"WorkflowApi.get_workflow_me",
206
+ :header_params => header_params,
207
+ :query_params => query_params,
208
+ :form_params => form_params,
209
+ :body => post_body,
210
+ :auth_names => auth_names,
211
+ :return_type => return_type
212
+ )
213
+
214
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: WorkflowApi#get_workflow_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+
163
221
  # Retrieve a workflow task
164
222
  # Retrieve a workflow task
165
223
  # @param task_uuid [String]
@@ -30,6 +30,9 @@ module UltracartClient
30
30
  # Event name
31
31
  attr_accessor :event_name
32
32
 
33
+ # Optional - Event ruler expression to filter events to. Only events that match this Ruler expression will be transmitted to the webhook.
34
+ attr_accessor :event_ruler
35
+
33
36
  # The expand string for the notification object. See the individual resource _expand documentation for valid values.
34
37
  attr_accessor :expansion
35
38
 
@@ -50,6 +53,7 @@ module UltracartClient
50
53
  :'discontinued_flag' => :'discontinued_flag',
51
54
  :'event_description' => :'event_description',
52
55
  :'event_name' => :'event_name',
56
+ :'event_ruler' => :'event_ruler',
53
57
  :'expansion' => :'expansion',
54
58
  :'subscribed' => :'subscribed',
55
59
  :'supports_reflow' => :'supports_reflow',
@@ -70,6 +74,7 @@ module UltracartClient
70
74
  :'discontinued_flag' => :'Boolean',
71
75
  :'event_description' => :'String',
72
76
  :'event_name' => :'String',
77
+ :'event_ruler' => :'String',
73
78
  :'expansion' => :'String',
74
79
  :'subscribed' => :'Boolean',
75
80
  :'supports_reflow' => :'Boolean',
@@ -118,6 +123,10 @@ module UltracartClient
118
123
  self.event_name = attributes[:'event_name']
119
124
  end
120
125
 
126
+ if attributes.key?(:'event_ruler')
127
+ self.event_ruler = attributes[:'event_ruler']
128
+ end
129
+
121
130
  if attributes.key?(:'expansion')
122
131
  self.expansion = attributes[:'expansion']
123
132
  end
@@ -158,6 +167,7 @@ module UltracartClient
158
167
  discontinued_flag == o.discontinued_flag &&
159
168
  event_description == o.event_description &&
160
169
  event_name == o.event_name &&
170
+ event_ruler == o.event_ruler &&
161
171
  expansion == o.expansion &&
162
172
  subscribed == o.subscribed &&
163
173
  supports_reflow == o.supports_reflow &&
@@ -173,7 +183,7 @@ module UltracartClient
173
183
  # Calculates hash code according to all attributes.
174
184
  # @return [Integer] Hash code
175
185
  def hash
176
- [comments, deprecated_flag, discontinued_flag, event_description, event_name, expansion, subscribed, supports_reflow, webhook_event_oid].hash
186
+ [comments, deprecated_flag, discontinued_flag, event_description, event_name, event_ruler, expansion, subscribed, supports_reflow, webhook_event_oid].hash
177
187
  end
178
188
 
179
189
  # Builds the object from hash
@@ -71,6 +71,9 @@ module UltracartClient
71
71
  # Status of the workflow task
72
72
  attr_accessor :status
73
73
 
74
+ # User friendly string of the task context
75
+ attr_accessor :task_context
76
+
74
77
  # Task Details
75
78
  attr_accessor :task_details
76
79
 
@@ -124,6 +127,7 @@ module UltracartClient
124
127
  :'object_url' => :'object_url',
125
128
  :'priority' => :'priority',
126
129
  :'status' => :'status',
130
+ :'task_context' => :'task_context',
127
131
  :'task_details' => :'task_details',
128
132
  :'task_name' => :'task_name',
129
133
  :'workflow_task_uuid' => :'workflow_task_uuid'
@@ -157,6 +161,7 @@ module UltracartClient
157
161
  :'object_url' => :'String',
158
162
  :'priority' => :'String',
159
163
  :'status' => :'String',
164
+ :'task_context' => :'String',
160
165
  :'task_details' => :'String',
161
166
  :'task_name' => :'String',
162
167
  :'workflow_task_uuid' => :'String'
@@ -266,6 +271,10 @@ module UltracartClient
266
271
  self.status = attributes[:'status']
267
272
  end
268
273
 
274
+ if attributes.key?(:'task_context')
275
+ self.task_context = attributes[:'task_context']
276
+ end
277
+
269
278
  if attributes.key?(:'task_details')
270
279
  self.task_details = attributes[:'task_details']
271
280
  end
@@ -289,7 +298,7 @@ module UltracartClient
289
298
  # Check to see if the all the properties in the model are valid
290
299
  # @return true if the model is valid
291
300
  def valid?
292
- object_type_validator = EnumAttributeValidator.new('String', ["order", "auto order", "item", "customer profile"])
301
+ object_type_validator = EnumAttributeValidator.new('String', ["order", "auto order", "item", "customer profile", "storefront"])
293
302
  return false unless object_type_validator.valid?(@object_type)
294
303
  priority_validator = EnumAttributeValidator.new('String', ["1 - low", "2 - medium", "3 - high", "4 - critical"])
295
304
  return false unless priority_validator.valid?(@priority)
@@ -301,7 +310,7 @@ module UltracartClient
301
310
  # Custom attribute writer method checking allowed values (enum).
302
311
  # @param [Object] object_type Object to be assigned
303
312
  def object_type=(object_type)
304
- validator = EnumAttributeValidator.new('String', ["order", "auto order", "item", "customer profile"])
313
+ validator = EnumAttributeValidator.new('String', ["order", "auto order", "item", "customer profile", "storefront"])
305
314
  unless validator.valid?(object_type)
306
315
  fail ArgumentError, "invalid value for \"object_type\", must be one of #{validator.allowable_values}."
307
316
  end
@@ -352,6 +361,7 @@ module UltracartClient
352
361
  object_url == o.object_url &&
353
362
  priority == o.priority &&
354
363
  status == o.status &&
364
+ task_context == o.task_context &&
355
365
  task_details == o.task_details &&
356
366
  task_name == o.task_name &&
357
367
  workflow_task_uuid == o.workflow_task_uuid
@@ -366,7 +376,7 @@ module UltracartClient
366
376
  # Calculates hash code according to all attributes.
367
377
  # @return [Integer] Hash code
368
378
  def hash
369
- [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
379
+ [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
370
380
  end
371
381
 
372
382
  # Builds the object from hash
@@ -22,6 +22,9 @@ module UltracartClient
22
22
  # Indicates if API call was successful
23
23
  attr_accessor :success
24
24
 
25
+ # User friendly string of the task context if querying for a specific object type/id
26
+ attr_accessor :task_context
27
+
25
28
  # tasks
26
29
  attr_accessor :tasks
27
30
 
@@ -33,6 +36,7 @@ module UltracartClient
33
36
  :'error' => :'error',
34
37
  :'metadata' => :'metadata',
35
38
  :'success' => :'success',
39
+ :'task_context' => :'task_context',
36
40
  :'tasks' => :'tasks',
37
41
  :'warning' => :'warning'
38
42
  }
@@ -49,6 +53,7 @@ module UltracartClient
49
53
  :'error' => :'Error',
50
54
  :'metadata' => :'ResponseMetadata',
51
55
  :'success' => :'Boolean',
56
+ :'task_context' => :'String',
52
57
  :'tasks' => :'Array<WorkflowTask>',
53
58
  :'warning' => :'Warning'
54
59
  }
@@ -87,6 +92,10 @@ module UltracartClient
87
92
  self.success = attributes[:'success']
88
93
  end
89
94
 
95
+ if attributes.key?(:'task_context')
96
+ self.task_context = attributes[:'task_context']
97
+ end
98
+
90
99
  if attributes.key?(:'tasks')
91
100
  if (value = attributes[:'tasks']).is_a?(Array)
92
101
  self.tasks = value
@@ -119,6 +128,7 @@ module UltracartClient
119
128
  error == o.error &&
120
129
  metadata == o.metadata &&
121
130
  success == o.success &&
131
+ task_context == o.task_context &&
122
132
  tasks == o.tasks &&
123
133
  warning == o.warning
124
134
  end
@@ -132,7 +142,7 @@ module UltracartClient
132
142
  # Calculates hash code according to all attributes.
133
143
  # @return [Integer] Hash code
134
144
  def hash
135
- [error, metadata, success, tasks, warning].hash
145
+ [error, metadata, success, task_context, tasks, warning].hash
136
146
  end
137
147
 
138
148
  # Builds the object from hash
@@ -0,0 +1,256 @@
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 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class WorkflowUserResponse
18
+ attr_accessor :error
19
+
20
+ attr_accessor :metadata
21
+
22
+ # Indicates if API call was successful
23
+ attr_accessor :success
24
+
25
+ attr_accessor :user
26
+
27
+ attr_accessor :warning
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'error' => :'error',
33
+ :'metadata' => :'metadata',
34
+ :'success' => :'success',
35
+ :'user' => :'user',
36
+ :'warning' => :'warning'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'error' => :'Error',
49
+ :'metadata' => :'ResponseMetadata',
50
+ :'success' => :'Boolean',
51
+ :'user' => :'WorkflowUser',
52
+ :'warning' => :'Warning'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::WorkflowUserResponse` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::WorkflowUserResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'error')
78
+ self.error = attributes[:'error']
79
+ end
80
+
81
+ if attributes.key?(:'metadata')
82
+ self.metadata = attributes[:'metadata']
83
+ end
84
+
85
+ if attributes.key?(:'success')
86
+ self.success = attributes[:'success']
87
+ end
88
+
89
+ if attributes.key?(:'user')
90
+ self.user = attributes[:'user']
91
+ end
92
+
93
+ if attributes.key?(:'warning')
94
+ self.warning = attributes[:'warning']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ error == o.error &&
117
+ metadata == o.metadata &&
118
+ success == o.success &&
119
+ user == o.user &&
120
+ warning == o.warning
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [error, metadata, success, user, warning].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ new.build_from_hash(attributes)
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ self.class.openapi_types.each_pair do |key, type|
149
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
150
+ self.send("#{key}=", nil)
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
155
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
156
+ end
157
+ elsif !attributes[self.class.attribute_map[key]].nil?
158
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
159
+ end
160
+ end
161
+
162
+ self
163
+ end
164
+
165
+ # Deserializes the data based on type
166
+ # @param string type Data type
167
+ # @param string value Value to be deserialized
168
+ # @return [Object] Deserialized data
169
+ def _deserialize(type, value)
170
+ case type.to_sym
171
+ when :Time
172
+ Time.parse(value)
173
+ when :Date
174
+ Date.parse(value)
175
+ when :String
176
+ value.to_s
177
+ when :Integer
178
+ value.to_i
179
+ when :Float
180
+ value.to_f
181
+ when :Boolean
182
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
+ true
184
+ else
185
+ false
186
+ end
187
+ when :Object
188
+ # generic object (usually a Hash), return directly
189
+ value
190
+ when /\AArray<(?<inner_type>.+)>\z/
191
+ inner_type = Regexp.last_match[:inner_type]
192
+ value.map { |v| _deserialize(inner_type, v) }
193
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
+ k_type = Regexp.last_match[:k_type]
195
+ v_type = Regexp.last_match[:v_type]
196
+ {}.tap do |hash|
197
+ value.each do |k, v|
198
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
+ end
200
+ end
201
+ else # model
202
+ # models (e.g. Pet) or oneOf
203
+ klass = UltracartClient.const_get(type)
204
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
205
+ end
206
+ end
207
+
208
+ # Returns the string representation of the object
209
+ # @return [String] String presentation of the object
210
+ def to_s
211
+ to_hash.to_s
212
+ end
213
+
214
+ # to_body is an alias to to_hash (backward compatibility)
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_body
217
+ to_hash
218
+ end
219
+
220
+ # Returns the object in the form of hash
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_hash
223
+ hash = {}
224
+ self.class.attribute_map.each_pair do |attr, param|
225
+ value = self.send(attr)
226
+ if value.nil?
227
+ is_nullable = self.class.openapi_nullable.include?(attr)
228
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
229
+ end
230
+
231
+ hash[param] = _to_hash(value)
232
+ end
233
+ hash
234
+ end
235
+
236
+ # Outputs non-array value in the form of hash
237
+ # For object, use to_hash. Otherwise, just return the value
238
+ # @param [Object] value Any valid value
239
+ # @return [Hash] Returns the value in the form of hash
240
+ def _to_hash(value)
241
+ if value.is_a?(Array)
242
+ value.compact.map { |v| _to_hash(v) }
243
+ elsif value.is_a?(Hash)
244
+ {}.tap do |hash|
245
+ value.each { |k, v| hash[k] = _to_hash(v) }
246
+ end
247
+ elsif value.respond_to? :to_hash
248
+ value.to_hash
249
+ else
250
+ value
251
+ end
252
+ end
253
+
254
+ end
255
+
256
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.192'
14
+ VERSION = '4.0.195'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -815,6 +815,7 @@ require 'ultracart_api/models/workflow_task_response'
815
815
  require 'ultracart_api/models/workflow_tasks_request'
816
816
  require 'ultracart_api/models/workflow_tasks_response'
817
817
  require 'ultracart_api/models/workflow_user'
818
+ require 'ultracart_api/models/workflow_user_response'
818
819
  require 'ultracart_api/models/workflow_users_response'
819
820
 
820
821
  # 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: 4.0.192
4
+ version: 4.0.195
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-21 00:00:00.000000000 Z
11
+ date: 2024-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -880,6 +880,7 @@ files:
880
880
  - docs/WorkflowTasksRequest.md
881
881
  - docs/WorkflowTasksResponse.md
882
882
  - docs/WorkflowUser.md
883
+ - docs/WorkflowUserResponse.md
883
884
  - docs/WorkflowUsersResponse.md
884
885
  - git_push.sh
885
886
  - lib/ultracart_api.rb
@@ -1705,6 +1706,7 @@ files:
1705
1706
  - lib/ultracart_api/models/workflow_tasks_request.rb
1706
1707
  - lib/ultracart_api/models/workflow_tasks_response.rb
1707
1708
  - lib/ultracart_api/models/workflow_user.rb
1709
+ - lib/ultracart_api/models/workflow_user_response.rb
1708
1710
  - lib/ultracart_api/models/workflow_users_response.rb
1709
1711
  - lib/ultracart_api/version.rb
1710
1712
  - spec/api_client_spec.rb