ultracart_api 3.10.185 → 3.10.186
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/ConversationPbxQueue.md +2 -0
- data/docs/WorkflowAgentAuth.md +10 -0
- data/docs/WorkflowAgentAuthResponse.md +12 -0
- data/docs/WorkflowApi.md +46 -0
- data/lib/ultracart_api/api/workflow_api.rb +49 -0
- data/lib/ultracart_api/models/conversation_pbx_queue.rb +24 -4
- data/lib/ultracart_api/models/workflow_agent_auth.rb +202 -0
- data/lib/ultracart_api/models/workflow_agent_auth_response.rb +221 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5909f9761add65b9835d930b3e3a1b73b8539a0f29f8111990896670f7eee7bf
|
4
|
+
data.tar.gz: 939cfe3ad130345fb726accbe3aeb4a72329a9832fed83bb9ce3aa9c8d7d512d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 275c21d6f2303773ff1d94c3623c625c073fb536e7f5595a520b0e7244c0f1d601354173268e5d616ca93b0913c6842df755f327b32d9d68107d5bd4f05b0321
|
7
|
+
data.tar.gz: d59f6f1af8df53cebaefb52e3ef6e0a1aaf431136f48a0f11b29ab7942402a47a6b15c337bb858b1d5ab8da27c98fef2cd9a37eb0696b5bcde57946a2fd8eecb
|
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.186
|
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.186.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.186.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.186'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -556,6 +556,7 @@ Class | Method | HTTP request | Description
|
|
556
556
|
*UltracartClient::WebhookApi* | [**insert_webhook**](docs/WebhookApi.md#insert_webhook) | **POST** /webhook/webhooks | Add a webhook
|
557
557
|
*UltracartClient::WebhookApi* | [**resend_event**](docs/WebhookApi.md#resend_event) | **POST** /webhook/webhooks/{webhookOid}/reflow/{eventName} | Resend events to the webhook endpoint.
|
558
558
|
*UltracartClient::WebhookApi* | [**update_webhook**](docs/WebhookApi.md#update_webhook) | **PUT** /webhook/webhooks/{webhookOid} | Update a webhook
|
559
|
+
*UltracartClient::WorkflowApi* | [**get_workflow_agent_websocket_authorization**](docs/WorkflowApi.md#get_workflow_agent_websocket_authorization) | **PUT** /workflow/agent/auth | Get agent websocket authorization
|
559
560
|
*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
|
560
561
|
*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
|
561
562
|
*UltracartClient::WorkflowApi* | [**get_workflow_me**](docs/WorkflowApi.md#get_workflow_me) | **GET** /workflow/me | Retrieve a user object for myself
|
@@ -1393,6 +1394,8 @@ Class | Method | HTTP request | Description
|
|
1393
1394
|
- [UltracartClient::WebhookSampleRequestResponse](docs/WebhookSampleRequestResponse.md)
|
1394
1395
|
- [UltracartClient::WebhooksResponse](docs/WebhooksResponse.md)
|
1395
1396
|
- [UltracartClient::Weight](docs/Weight.md)
|
1397
|
+
- [UltracartClient::WorkflowAgentAuth](docs/WorkflowAgentAuth.md)
|
1398
|
+
- [UltracartClient::WorkflowAgentAuthResponse](docs/WorkflowAgentAuthResponse.md)
|
1396
1399
|
- [UltracartClient::WorkflowAttachment](docs/WorkflowAttachment.md)
|
1397
1400
|
- [UltracartClient::WorkflowAttachmentUploadUrl](docs/WorkflowAttachmentUploadUrl.md)
|
1398
1401
|
- [UltracartClient::WorkflowAttachmentUploadUrlResponse](docs/WorkflowAttachmentUploadUrlResponse.md)
|
@@ -1480,6 +1483,7 @@ Not every change is committed to every SDK.
|
|
1480
1483
|
|
1481
1484
|
| Version | Date | Comments |
|
1482
1485
|
| --: | :-: | --- |
|
1486
|
+
| 3.10.186 | 03/15/2024 | workflow - getWorkflowAgentWebsocketAuthorization method added |
|
1483
1487
|
| 3.10.185 | 03/08/2024 | added getWorkflowTaskTags method |
|
1484
1488
|
| 3.10.184 | 02/27/2024 | esp - sms statistic layer |
|
1485
1489
|
| 3.10.183 | 02/20/2024 | Add tag support to CouponAmountOffItems, CouponBuyOneGetOneLimit, CouponDiscountItemWithItemPurchase, CouponFreeItemWithItemPurchase, CouponPercentOffItemsWithItemsPurchase |
|
@@ -21,5 +21,7 @@ Name | Type | Description | Notes
|
|
21
21
|
**twilio_taskrouter_workflow_sid** | **String** | Twilio taskrouter workflow sid | [optional]
|
22
22
|
**twilio_workspace_queue_sid** | **String** | Twilio workspace queue sid | [optional]
|
23
23
|
**voicemail** | **BOOLEAN** | If true, this queue has a voicemail associated with it | [optional]
|
24
|
+
**wait_critical_seconds** | **Integer** | Wait time in seconds before critical | [optional]
|
25
|
+
**wait_warning_seconds** | **Integer** | Wait time in seconds before warning | [optional]
|
24
26
|
|
25
27
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# UltracartClient::WorkflowAgentAuth
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**jwt** | **String** | | [optional]
|
7
|
+
**merchant_id** | **String** | | [optional]
|
8
|
+
**websocket_url** | **String** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::WorkflowAgentAuthResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**agent_auth** | [**WorkflowAgentAuth**](WorkflowAgentAuth.md) | | [optional]
|
7
|
+
**error** | [**Error**](Error.md) | | [optional]
|
8
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
11
|
+
|
12
|
+
|
data/docs/WorkflowApi.md
CHANGED
@@ -4,6 +4,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
+
[**get_workflow_agent_websocket_authorization**](WorkflowApi.md#get_workflow_agent_websocket_authorization) | **PUT** /workflow/agent/auth | Get agent websocket authorization
|
7
8
|
[**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
9
|
[**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
10
|
[**get_workflow_me**](WorkflowApi.md#get_workflow_me) | **GET** /workflow/me | Retrieve a user object for myself
|
@@ -16,6 +17,51 @@ Method | HTTP request | Description
|
|
16
17
|
[**update_workflow_task**](WorkflowApi.md#update_workflow_task) | **PUT** /workflow/tasks/{task_uuid} | Update a workflow task
|
17
18
|
|
18
19
|
|
20
|
+
# **get_workflow_agent_websocket_authorization**
|
21
|
+
> WorkflowAgentAuthResponse get_workflow_agent_websocket_authorization
|
22
|
+
|
23
|
+
Get agent websocket authorization
|
24
|
+
|
25
|
+
Retrieve a JWT to authorize an agent to make a websocket connection.
|
26
|
+
|
27
|
+
### Example
|
28
|
+
```ruby
|
29
|
+
# load the gem
|
30
|
+
require 'ultracart_api'
|
31
|
+
|
32
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
33
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
34
|
+
api_instance = UltracartClient::WorkflowApi.new_using_api_key(simple_key, false, false)
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
begin
|
39
|
+
#Get agent websocket authorization
|
40
|
+
result = api_instance.get_workflow_agent_websocket_authorization
|
41
|
+
p result
|
42
|
+
rescue UltracartClient::ApiError => e
|
43
|
+
puts "Exception when calling WorkflowApi->get_workflow_agent_websocket_authorization: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
This endpoint does not need any parameter.
|
49
|
+
|
50
|
+
### Return type
|
51
|
+
|
52
|
+
[**WorkflowAgentAuthResponse**](WorkflowAgentAuthResponse.md)
|
53
|
+
|
54
|
+
### Authorization
|
55
|
+
|
56
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
57
|
+
|
58
|
+
### HTTP request headers
|
59
|
+
|
60
|
+
- **Content-Type**: application/json
|
61
|
+
- **Accept**: application/json
|
62
|
+
|
63
|
+
|
64
|
+
|
19
65
|
# **get_workflow_assignment_groups**
|
20
66
|
> WorkflowGroupsResponse get_workflow_assignment_groups(opts)
|
21
67
|
|
@@ -32,6 +32,55 @@ module UltracartClient
|
|
32
32
|
UltracartClient::WorkflowApi.new(api_client)
|
33
33
|
end
|
34
34
|
|
35
|
+
# Get agent websocket authorization
|
36
|
+
# Retrieve a JWT to authorize an agent to make a websocket connection.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [WorkflowAgentAuthResponse]
|
39
|
+
def get_workflow_agent_websocket_authorization(opts = {})
|
40
|
+
data, _status_code, _headers = get_workflow_agent_websocket_authorization_with_http_info(opts)
|
41
|
+
data
|
42
|
+
end
|
43
|
+
|
44
|
+
# Get agent websocket authorization
|
45
|
+
# Retrieve a JWT to authorize an agent to make a websocket connection.
|
46
|
+
# @param [Hash] opts the optional parameters
|
47
|
+
# @return [Array<(WorkflowAgentAuthResponse, Fixnum, Hash)>] WorkflowAgentAuthResponse data, response status code and response headers
|
48
|
+
def get_workflow_agent_websocket_authorization_with_http_info(opts = {})
|
49
|
+
if @api_client.config.debugging
|
50
|
+
@api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_agent_websocket_authorization ...'
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = '/workflow/agent/auth'
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = {}
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = {}
|
60
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
61
|
+
# HTTP header 'Accept' (if needed)
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
63
|
+
# HTTP header 'Content-Type'
|
64
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
65
|
+
|
66
|
+
# form parameters
|
67
|
+
form_params = {}
|
68
|
+
|
69
|
+
# http body (model)
|
70
|
+
post_body = nil
|
71
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
72
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
73
|
+
:header_params => header_params,
|
74
|
+
:query_params => query_params,
|
75
|
+
:form_params => form_params,
|
76
|
+
:body => post_body,
|
77
|
+
:auth_names => auth_names,
|
78
|
+
:return_type => 'WorkflowAgentAuthResponse')
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: WorkflowApi#get_workflow_agent_websocket_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
35
84
|
# Retrieve a list of groups that workflow tasks can be assigned to
|
36
85
|
# Retrieve a list of groups that workflow tasks can be assigned to
|
37
86
|
# @param [Hash] opts the optional parameters
|
@@ -67,6 +67,12 @@ module UltracartClient
|
|
67
67
|
# If true, this queue has a voicemail associated with it
|
68
68
|
attr_accessor :voicemail
|
69
69
|
|
70
|
+
# Wait time in seconds before critical
|
71
|
+
attr_accessor :wait_critical_seconds
|
72
|
+
|
73
|
+
# Wait time in seconds before warning
|
74
|
+
attr_accessor :wait_warning_seconds
|
75
|
+
|
70
76
|
# Attribute mapping from ruby-style variable name to JSON key.
|
71
77
|
def self.attribute_map
|
72
78
|
{
|
@@ -87,7 +93,9 @@ module UltracartClient
|
|
87
93
|
:'say_voice' => :'say_voice',
|
88
94
|
:'twilio_taskrouter_workflow_sid' => :'twilio_taskrouter_workflow_sid',
|
89
95
|
:'twilio_workspace_queue_sid' => :'twilio_workspace_queue_sid',
|
90
|
-
:'voicemail' => :'voicemail'
|
96
|
+
:'voicemail' => :'voicemail',
|
97
|
+
:'wait_critical_seconds' => :'wait_critical_seconds',
|
98
|
+
:'wait_warning_seconds' => :'wait_warning_seconds'
|
91
99
|
}
|
92
100
|
end
|
93
101
|
|
@@ -111,7 +119,9 @@ module UltracartClient
|
|
111
119
|
:'say_voice' => :'String',
|
112
120
|
:'twilio_taskrouter_workflow_sid' => :'String',
|
113
121
|
:'twilio_workspace_queue_sid' => :'String',
|
114
|
-
:'voicemail' => :'BOOLEAN'
|
122
|
+
:'voicemail' => :'BOOLEAN',
|
123
|
+
:'wait_critical_seconds' => :'Integer',
|
124
|
+
:'wait_warning_seconds' => :'Integer'
|
115
125
|
}
|
116
126
|
end
|
117
127
|
|
@@ -194,6 +204,14 @@ module UltracartClient
|
|
194
204
|
if attributes.has_key?(:'voicemail')
|
195
205
|
self.voicemail = attributes[:'voicemail']
|
196
206
|
end
|
207
|
+
|
208
|
+
if attributes.has_key?(:'wait_critical_seconds')
|
209
|
+
self.wait_critical_seconds = attributes[:'wait_critical_seconds']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.has_key?(:'wait_warning_seconds')
|
213
|
+
self.wait_warning_seconds = attributes[:'wait_warning_seconds']
|
214
|
+
end
|
197
215
|
end
|
198
216
|
|
199
217
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -381,7 +399,9 @@ module UltracartClient
|
|
381
399
|
say_voice == o.say_voice &&
|
382
400
|
twilio_taskrouter_workflow_sid == o.twilio_taskrouter_workflow_sid &&
|
383
401
|
twilio_workspace_queue_sid == o.twilio_workspace_queue_sid &&
|
384
|
-
voicemail == o.voicemail
|
402
|
+
voicemail == o.voicemail &&
|
403
|
+
wait_critical_seconds == o.wait_critical_seconds &&
|
404
|
+
wait_warning_seconds == o.wait_warning_seconds
|
385
405
|
end
|
386
406
|
|
387
407
|
# @see the `==` method
|
@@ -393,7 +413,7 @@ module UltracartClient
|
|
393
413
|
# Calculates hash code according to all attributes.
|
394
414
|
# @return [Fixnum] Hash code
|
395
415
|
def hash
|
396
|
-
[announce_queue_position, conversation_pbx_queue_uuid, conversation_voicemail_mailbox_uuid, hold_conversation_pbx_audio_uuid, max_hold_seconds, members, merchant_id, name, no_agent_available_play_audio_uuid, no_agent_available_say, no_agent_available_say_voice, play_audio_uuid, record_call, say, say_voice, twilio_taskrouter_workflow_sid, twilio_workspace_queue_sid, voicemail].hash
|
416
|
+
[announce_queue_position, conversation_pbx_queue_uuid, conversation_voicemail_mailbox_uuid, hold_conversation_pbx_audio_uuid, max_hold_seconds, members, merchant_id, name, no_agent_available_play_audio_uuid, no_agent_available_say, no_agent_available_say_voice, play_audio_uuid, record_call, say, say_voice, twilio_taskrouter_workflow_sid, twilio_workspace_queue_sid, voicemail, wait_critical_seconds, wait_warning_seconds].hash
|
397
417
|
end
|
398
418
|
|
399
419
|
# Builds the object from hash
|
@@ -0,0 +1,202 @@
|
|
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 WorkflowAgentAuth
|
17
|
+
attr_accessor :jwt
|
18
|
+
|
19
|
+
attr_accessor :merchant_id
|
20
|
+
|
21
|
+
attr_accessor :websocket_url
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'jwt' => :'jwt',
|
27
|
+
:'merchant_id' => :'merchant_id',
|
28
|
+
:'websocket_url' => :'websocket_url'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'jwt' => :'String',
|
36
|
+
:'merchant_id' => :'String',
|
37
|
+
:'websocket_url' => :'String'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
48
|
+
|
49
|
+
if attributes.has_key?(:'jwt')
|
50
|
+
self.jwt = attributes[:'jwt']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'merchant_id')
|
54
|
+
self.merchant_id = attributes[:'merchant_id']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'websocket_url')
|
58
|
+
self.websocket_url = attributes[:'websocket_url']
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
63
|
+
# @return Array for valid properties with the reasons
|
64
|
+
def list_invalid_properties
|
65
|
+
invalid_properties = Array.new
|
66
|
+
invalid_properties
|
67
|
+
end
|
68
|
+
|
69
|
+
# Check to see if the all the properties in the model are valid
|
70
|
+
# @return true if the model is valid
|
71
|
+
def valid?
|
72
|
+
true
|
73
|
+
end
|
74
|
+
|
75
|
+
# Checks equality by comparing each attribute.
|
76
|
+
# @param [Object] Object to be compared
|
77
|
+
def ==(o)
|
78
|
+
return true if self.equal?(o)
|
79
|
+
self.class == o.class &&
|
80
|
+
jwt == o.jwt &&
|
81
|
+
merchant_id == o.merchant_id &&
|
82
|
+
websocket_url == o.websocket_url
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Fixnum] Hash code
|
93
|
+
def hash
|
94
|
+
[jwt, merchant_id, websocket_url].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def build_from_hash(attributes)
|
101
|
+
return nil unless attributes.is_a?(Hash)
|
102
|
+
self.class.swagger_types.each_pair do |key, type|
|
103
|
+
if type =~ /\AArray<(.*)>/i
|
104
|
+
# check to ensure the input is an array given that the attribute
|
105
|
+
# is documented as an array but the input is not
|
106
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
107
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
108
|
+
end
|
109
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
110
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
111
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
112
|
+
end
|
113
|
+
|
114
|
+
self
|
115
|
+
end
|
116
|
+
|
117
|
+
# Deserializes the data based on type
|
118
|
+
# @param string type Data type
|
119
|
+
# @param string value Value to be deserialized
|
120
|
+
# @return [Object] Deserialized data
|
121
|
+
def _deserialize(type, value)
|
122
|
+
case type.to_sym
|
123
|
+
when :DateTime
|
124
|
+
DateTime.parse(value)
|
125
|
+
when :Date
|
126
|
+
Date.parse(value)
|
127
|
+
when :String
|
128
|
+
value.to_s
|
129
|
+
when :Integer
|
130
|
+
value.to_i
|
131
|
+
when :Float
|
132
|
+
value.to_f
|
133
|
+
when :BOOLEAN
|
134
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
135
|
+
true
|
136
|
+
else
|
137
|
+
false
|
138
|
+
end
|
139
|
+
when :Object
|
140
|
+
# generic object (usually a Hash), return directly
|
141
|
+
value
|
142
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
143
|
+
inner_type = Regexp.last_match[:inner_type]
|
144
|
+
value.map { |v| _deserialize(inner_type, v) }
|
145
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
146
|
+
k_type = Regexp.last_match[:k_type]
|
147
|
+
v_type = Regexp.last_match[:v_type]
|
148
|
+
{}.tap do |hash|
|
149
|
+
value.each do |k, v|
|
150
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
else # model
|
154
|
+
temp_model = UltracartClient.const_get(type).new
|
155
|
+
temp_model.build_from_hash(value)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the string representation of the object
|
160
|
+
# @return [String] String presentation of the object
|
161
|
+
def to_s
|
162
|
+
to_hash.to_s
|
163
|
+
end
|
164
|
+
|
165
|
+
# to_body is an alias to to_hash (backward compatibility)
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_body
|
168
|
+
to_hash
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the object in the form of hash
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_hash
|
174
|
+
hash = {}
|
175
|
+
self.class.attribute_map.each_pair do |attr, param|
|
176
|
+
value = self.send(attr)
|
177
|
+
next if value.nil?
|
178
|
+
hash[param] = _to_hash(value)
|
179
|
+
end
|
180
|
+
hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Outputs non-array value in the form of hash
|
184
|
+
# For object, use to_hash. Otherwise, just return the value
|
185
|
+
# @param [Object] value Any valid value
|
186
|
+
# @return [Hash] Returns the value in the form of hash
|
187
|
+
def _to_hash(value)
|
188
|
+
if value.is_a?(Array)
|
189
|
+
value.compact.map { |v| _to_hash(v) }
|
190
|
+
elsif value.is_a?(Hash)
|
191
|
+
{}.tap do |hash|
|
192
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
193
|
+
end
|
194
|
+
elsif value.respond_to? :to_hash
|
195
|
+
value.to_hash
|
196
|
+
else
|
197
|
+
value
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
end
|
202
|
+
end
|
@@ -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 WorkflowAgentAuthResponse
|
17
|
+
attr_accessor :agent_auth
|
18
|
+
|
19
|
+
attr_accessor :error
|
20
|
+
|
21
|
+
attr_accessor :metadata
|
22
|
+
|
23
|
+
# Indicates if API call was successful
|
24
|
+
attr_accessor :success
|
25
|
+
|
26
|
+
attr_accessor :warning
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'agent_auth' => :'agent_auth',
|
32
|
+
:'error' => :'error',
|
33
|
+
:'metadata' => :'metadata',
|
34
|
+
:'success' => :'success',
|
35
|
+
:'warning' => :'warning'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'agent_auth' => :'WorkflowAgentAuth',
|
43
|
+
:'error' => :'Error',
|
44
|
+
:'metadata' => :'ResponseMetadata',
|
45
|
+
:'success' => :'BOOLEAN',
|
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?(:'agent_auth')
|
59
|
+
self.agent_auth = attributes[:'agent_auth']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'error')
|
63
|
+
self.error = attributes[:'error']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'metadata')
|
67
|
+
self.metadata = attributes[:'metadata']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'success')
|
71
|
+
self.success = attributes[:'success']
|
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
|
+
agent_auth == o.agent_auth &&
|
98
|
+
error == o.error &&
|
99
|
+
metadata == o.metadata &&
|
100
|
+
success == o.success &&
|
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
|
+
[agent_auth, error, metadata, success, 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
@@ -840,6 +840,8 @@ require 'ultracart_api/models/webhook_sample_request'
|
|
840
840
|
require 'ultracart_api/models/webhook_sample_request_response'
|
841
841
|
require 'ultracart_api/models/webhooks_response'
|
842
842
|
require 'ultracart_api/models/weight'
|
843
|
+
require 'ultracart_api/models/workflow_agent_auth'
|
844
|
+
require 'ultracart_api/models/workflow_agent_auth_response'
|
843
845
|
require 'ultracart_api/models/workflow_attachment'
|
844
846
|
require 'ultracart_api/models/workflow_attachment_upload_url'
|
845
847
|
require 'ultracart_api/models/workflow_attachment_upload_url_response'
|
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.186
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -1064,6 +1064,8 @@ files:
|
|
1064
1064
|
- docs/WebhookSampleRequestResponse.md
|
1065
1065
|
- docs/WebhooksResponse.md
|
1066
1066
|
- docs/Weight.md
|
1067
|
+
- docs/WorkflowAgentAuth.md
|
1068
|
+
- docs/WorkflowAgentAuthResponse.md
|
1067
1069
|
- docs/WorkflowApi.md
|
1068
1070
|
- docs/WorkflowAttachment.md
|
1069
1071
|
- docs/WorkflowAttachmentUploadUrl.md
|
@@ -1929,6 +1931,8 @@ files:
|
|
1929
1931
|
- lib/ultracart_api/models/webhook_sample_request_response.rb
|
1930
1932
|
- lib/ultracart_api/models/webhooks_response.rb
|
1931
1933
|
- lib/ultracart_api/models/weight.rb
|
1934
|
+
- lib/ultracart_api/models/workflow_agent_auth.rb
|
1935
|
+
- lib/ultracart_api/models/workflow_agent_auth_response.rb
|
1932
1936
|
- lib/ultracart_api/models/workflow_attachment.rb
|
1933
1937
|
- lib/ultracart_api/models/workflow_attachment_upload_url.rb
|
1934
1938
|
- lib/ultracart_api/models/workflow_attachment_upload_url_response.rb
|