ultracart_api 3.10.25 → 3.10.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/docs/ConversationApi.md +99 -0
- data/docs/ConversationWebchatQueueStatus.md +18 -0
- data/docs/ConversationWebchatQueueStatusAgent.md +12 -0
- data/docs/ConversationWebchatQueueStatusQueueEntry.md +11 -0
- data/docs/ConversationWebchatQueueStatusUpdateRequest.md +8 -0
- data/docs/ConversationWebchatQueueStatusesResponse.md +12 -0
- data/docs/ConversationWebsocketMessage.md +1 -0
- data/lib/ultracart_api/api/conversation_api.rb +109 -0
- data/lib/ultracart_api/models/conversation_webchat_queue_status.rb +279 -0
- data/lib/ultracart_api/models/conversation_webchat_queue_status_agent.rb +221 -0
- data/lib/ultracart_api/models/conversation_webchat_queue_status_queue_entry.rb +212 -0
- data/lib/ultracart_api/models/conversation_webchat_queue_status_update_request.rb +184 -0
- data/lib/ultracart_api/models/conversation_webchat_queue_statuses_response.rb +223 -0
- data/lib/ultracart_api/models/conversation_websocket_message.rb +12 -3
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -0
- metadata +12 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '080a1090cb029f3ee4489f4fe2c6b2d95a7b1fae616073ed1fab7834d7dc5361'
|
|
4
|
+
data.tar.gz: 8e7eb7f63d3089381afb6e57ef59983d1989b2855f3b54b8236d37c4ccda81ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94b7bb58f35e426e164631c5767b0b54caf91c9d21d6b25fbfec6e0e48fead239ba2e9cd14d657ebe8bd1f751fd4507f589e4478caaa88669ee47600c4658905
|
|
7
|
+
data.tar.gz: a845367dfdd240afa7de6cfa764fde437e2b212694d189ec8ace5580ff95bd098e62893db9c31ba02687430ef1a85f65e18388f1e776f9ae30eb227e98260841
|
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.26
|
|
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.26.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.26.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.26'
|
|
36
36
|
|
|
37
37
|
### Install from Git
|
|
38
38
|
|
|
@@ -128,10 +128,12 @@ Class | Method | HTTP request | Description
|
|
|
128
128
|
*UltracartClient::ConversationApi* | [**get_agent_websocket_authorization**](docs/ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization
|
|
129
129
|
*UltracartClient::ConversationApi* | [**get_conversation**](docs/ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
|
|
130
130
|
*UltracartClient::ConversationApi* | [**get_conversation_multimedia_upload_url**](docs/ConversationApi.md#get_conversation_multimedia_upload_url) | **GET** /conversation/upload_url/{extension} | Get a presigned conersation multimedia upload URL
|
|
131
|
+
*UltracartClient::ConversationApi* | [**get_conversation_webchat_queue_statuses**](docs/ConversationApi.md#get_conversation_webchat_queue_statuses) | **GET** /conversation/conversations/queues/statuses | Retrieve a conversation webchat queue statuses
|
|
131
132
|
*UltracartClient::ConversationApi* | [**get_conversations**](docs/ConversationApi.md#get_conversations) | **GET** /conversation/conversations | Retrieve a list of conversation summaries newest to oldest
|
|
132
133
|
*UltracartClient::ConversationApi* | [**join_conversation**](docs/ConversationApi.md#join_conversation) | **PUT** /conversation/conversations/{conversation_uuid}/join | Join a conversation
|
|
133
134
|
*UltracartClient::ConversationApi* | [**leave_conversation**](docs/ConversationApi.md#leave_conversation) | **DELETE** /conversation/conversations/{conversation_uuid}/leave | Leave a conversation
|
|
134
135
|
*UltracartClient::ConversationApi* | [**start_conversation**](docs/ConversationApi.md#start_conversation) | **PUT** /conversation/conversations | Start a conversation
|
|
136
|
+
*UltracartClient::ConversationApi* | [**update_conversation_webchat_queue_status**](docs/ConversationApi.md#update_conversation_webchat_queue_status) | **PUT** /conversation/conversations/queues/{queue_name}/status | Update status within the queue
|
|
135
137
|
*UltracartClient::CouponApi* | [**delete_coupon**](docs/CouponApi.md#delete_coupon) | **DELETE** /coupon/coupons/{coupon_oid} | Delete a coupon
|
|
136
138
|
*UltracartClient::CouponApi* | [**delete_coupons_by_code**](docs/CouponApi.md#delete_coupons_by_code) | **DELETE** /coupon/coupons/by_code | Deletes multiple coupons
|
|
137
139
|
*UltracartClient::CouponApi* | [**delete_coupons_by_oid**](docs/CouponApi.md#delete_coupons_by_oid) | **DELETE** /coupon/coupons/by_oid | Deletes multiple coupons
|
|
@@ -569,6 +571,11 @@ Class | Method | HTTP request | Description
|
|
|
569
571
|
- [UltracartClient::ConversationStartRequest](docs/ConversationStartRequest.md)
|
|
570
572
|
- [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
|
|
571
573
|
- [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
|
|
574
|
+
- [UltracartClient::ConversationWebchatQueueStatus](docs/ConversationWebchatQueueStatus.md)
|
|
575
|
+
- [UltracartClient::ConversationWebchatQueueStatusAgent](docs/ConversationWebchatQueueStatusAgent.md)
|
|
576
|
+
- [UltracartClient::ConversationWebchatQueueStatusQueueEntry](docs/ConversationWebchatQueueStatusQueueEntry.md)
|
|
577
|
+
- [UltracartClient::ConversationWebchatQueueStatusUpdateRequest](docs/ConversationWebchatQueueStatusUpdateRequest.md)
|
|
578
|
+
- [UltracartClient::ConversationWebchatQueueStatusesResponse](docs/ConversationWebchatQueueStatusesResponse.md)
|
|
572
579
|
- [UltracartClient::ConversationWebsocketMessage](docs/ConversationWebsocketMessage.md)
|
|
573
580
|
- [UltracartClient::ConversationsResponse](docs/ConversationsResponse.md)
|
|
574
581
|
- [UltracartClient::CountriesResponse](docs/CountriesResponse.md)
|
|
@@ -1159,6 +1166,7 @@ Not every change is committed to every SDK.
|
|
|
1159
1166
|
|
|
1160
1167
|
| Version | Date | Comments |
|
|
1161
1168
|
| --: | :-: | --- |
|
|
1169
|
+
| 3.10.26 | 07/26/2022 | conversations - queue statistics |
|
|
1162
1170
|
| 3.10.25 | 07/25/2022 | conversation development |
|
|
1163
1171
|
| 3.10.24 | 07/25/2022 | conversations bug fixes |
|
|
1164
1172
|
| 3.10.23 | 07/25/2022 | conversations - add a websocket message model |
|
data/docs/ConversationApi.md
CHANGED
|
@@ -7,10 +7,12 @@ Method | HTTP request | Description
|
|
|
7
7
|
[**get_agent_websocket_authorization**](ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization
|
|
8
8
|
[**get_conversation**](ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
|
|
9
9
|
[**get_conversation_multimedia_upload_url**](ConversationApi.md#get_conversation_multimedia_upload_url) | **GET** /conversation/upload_url/{extension} | Get a presigned conersation multimedia upload URL
|
|
10
|
+
[**get_conversation_webchat_queue_statuses**](ConversationApi.md#get_conversation_webchat_queue_statuses) | **GET** /conversation/conversations/queues/statuses | Retrieve a conversation webchat queue statuses
|
|
10
11
|
[**get_conversations**](ConversationApi.md#get_conversations) | **GET** /conversation/conversations | Retrieve a list of conversation summaries newest to oldest
|
|
11
12
|
[**join_conversation**](ConversationApi.md#join_conversation) | **PUT** /conversation/conversations/{conversation_uuid}/join | Join a conversation
|
|
12
13
|
[**leave_conversation**](ConversationApi.md#leave_conversation) | **DELETE** /conversation/conversations/{conversation_uuid}/leave | Leave a conversation
|
|
13
14
|
[**start_conversation**](ConversationApi.md#start_conversation) | **PUT** /conversation/conversations | Start a conversation
|
|
15
|
+
[**update_conversation_webchat_queue_status**](ConversationApi.md#update_conversation_webchat_queue_status) | **PUT** /conversation/conversations/queues/{queue_name}/status | Update status within the queue
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
# **get_agent_websocket_authorization**
|
|
@@ -158,6 +160,51 @@ Name | Type | Description | Notes
|
|
|
158
160
|
|
|
159
161
|
|
|
160
162
|
|
|
163
|
+
# **get_conversation_webchat_queue_statuses**
|
|
164
|
+
> ConversationWebchatQueueStatusesResponse get_conversation_webchat_queue_statuses
|
|
165
|
+
|
|
166
|
+
Retrieve a conversation webchat queue statuses
|
|
167
|
+
|
|
168
|
+
Retrieve a conversation webchat queue statuses including agent status and queue entries
|
|
169
|
+
|
|
170
|
+
### Example
|
|
171
|
+
```ruby
|
|
172
|
+
# load the gem
|
|
173
|
+
require 'ultracart_api'
|
|
174
|
+
|
|
175
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
|
176
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
|
177
|
+
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
begin
|
|
182
|
+
#Retrieve a conversation webchat queue statuses
|
|
183
|
+
result = api_instance.get_conversation_webchat_queue_statuses
|
|
184
|
+
p result
|
|
185
|
+
rescue UltracartClient::ApiError => e
|
|
186
|
+
puts "Exception when calling ConversationApi->get_conversation_webchat_queue_statuses: #{e}"
|
|
187
|
+
end
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Parameters
|
|
191
|
+
This endpoint does not need any parameter.
|
|
192
|
+
|
|
193
|
+
### Return type
|
|
194
|
+
|
|
195
|
+
[**ConversationWebchatQueueStatusesResponse**](ConversationWebchatQueueStatusesResponse.md)
|
|
196
|
+
|
|
197
|
+
### Authorization
|
|
198
|
+
|
|
199
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
200
|
+
|
|
201
|
+
### HTTP request headers
|
|
202
|
+
|
|
203
|
+
- **Content-Type**: application/json
|
|
204
|
+
- **Accept**: application/json
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
161
208
|
# **get_conversations**
|
|
162
209
|
> ConversationsResponse get_conversations(opts)
|
|
163
210
|
|
|
@@ -359,3 +406,55 @@ Name | Type | Description | Notes
|
|
|
359
406
|
|
|
360
407
|
|
|
361
408
|
|
|
409
|
+
# **update_conversation_webchat_queue_status**
|
|
410
|
+
> update_conversation_webchat_queue_status(queue_name, status_request)
|
|
411
|
+
|
|
412
|
+
Update status within the queue
|
|
413
|
+
|
|
414
|
+
Update status within the queue
|
|
415
|
+
|
|
416
|
+
### Example
|
|
417
|
+
```ruby
|
|
418
|
+
# load the gem
|
|
419
|
+
require 'ultracart_api'
|
|
420
|
+
|
|
421
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
|
422
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
|
423
|
+
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
queue_name = 'queue_name_example' # String |
|
|
427
|
+
|
|
428
|
+
status_request = UltracartClient::ConversationWebchatQueueStatusUpdateRequest.new # ConversationWebchatQueueStatusUpdateRequest | Status request
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
begin
|
|
432
|
+
#Update status within the queue
|
|
433
|
+
api_instance.update_conversation_webchat_queue_status(queue_name, status_request)
|
|
434
|
+
rescue UltracartClient::ApiError => e
|
|
435
|
+
puts "Exception when calling ConversationApi->update_conversation_webchat_queue_status: #{e}"
|
|
436
|
+
end
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Parameters
|
|
440
|
+
|
|
441
|
+
Name | Type | Description | Notes
|
|
442
|
+
------------- | ------------- | ------------- | -------------
|
|
443
|
+
**queue_name** | **String**| |
|
|
444
|
+
**status_request** | [**ConversationWebchatQueueStatusUpdateRequest**](ConversationWebchatQueueStatusUpdateRequest.md)| Status request |
|
|
445
|
+
|
|
446
|
+
### Return type
|
|
447
|
+
|
|
448
|
+
nil (empty response body)
|
|
449
|
+
|
|
450
|
+
### Authorization
|
|
451
|
+
|
|
452
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
453
|
+
|
|
454
|
+
### HTTP request headers
|
|
455
|
+
|
|
456
|
+
- **Content-Type**: application/json
|
|
457
|
+
- **Accept**: application/json
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# UltracartClient::ConversationWebchatQueueStatus
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**agent_available_count** | **Integer** | | [optional]
|
|
7
|
+
**agent_busy_count** | **Integer** | | [optional]
|
|
8
|
+
**agent_count** | **Integer** | | [optional]
|
|
9
|
+
**agent_unavailable_count** | **Integer** | | [optional]
|
|
10
|
+
**agents** | [**Array<ConversationWebchatQueueStatusAgent>**](ConversationWebchatQueueStatusAgent.md) | | [optional]
|
|
11
|
+
**customer_abandon_count** | **Integer** | | [optional]
|
|
12
|
+
**customer_active_count** | **Integer** | | [optional]
|
|
13
|
+
**customer_waiting_count** | **Integer** | | [optional]
|
|
14
|
+
**customer_waiting_join_dts** | **String** | Date/time that the oldest person joined the queue | [optional]
|
|
15
|
+
**queue_entries** | [**Array<ConversationWebchatQueueStatusQueueEntry>**](ConversationWebchatQueueStatusQueueEntry.md) | | [optional]
|
|
16
|
+
**queue_name** | **String** | | [optional]
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# UltracartClient::ConversationWebchatQueueStatusAgent
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**agent_status** | **String** | | [optional]
|
|
7
|
+
**conversation_participant_arn** | **String** | | [optional]
|
|
8
|
+
**conversation_participant_name** | **String** | | [optional]
|
|
9
|
+
**last_chat_dts** | **String** | Date/time that this agent took their last chat | [optional]
|
|
10
|
+
**next_round_robin** | **BOOLEAN** | | [optional]
|
|
11
|
+
|
|
12
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# UltracartClient::ConversationWebchatQueueStatusQueueEntry
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**conversation_participant_arn** | **String** | | [optional]
|
|
7
|
+
**conversation_participant_name** | **String** | | [optional]
|
|
8
|
+
**conversation_webchat_queue_uuid** | **String** | | [optional]
|
|
9
|
+
**join_dts** | **String** | Date/time the customer joined the queue | [optional]
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# UltracartClient::ConversationWebchatQueueStatusesResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**error** | [**Error**](Error.md) | | [optional]
|
|
7
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
|
8
|
+
**queue_statuses** | [**Array<ConversationWebchatQueueStatus>**](ConversationWebchatQueueStatus.md) | | [optional]
|
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
|
11
|
+
|
|
12
|
+
|
|
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**event_new_conversation** | [**ConversationSummary**](ConversationSummary.md) | | [optional]
|
|
9
9
|
**event_new_message** | [**ConversationSummary**](ConversationSummary.md) | | [optional]
|
|
10
10
|
**event_queue_position** | [**ConversationEventQueuePosition**](ConversationEventQueuePosition.md) | | [optional]
|
|
11
|
+
**event_queue_status_update** | [**ConversationWebchatQueueStatus**](ConversationWebchatQueueStatus.md) | | [optional]
|
|
11
12
|
**event_type** | **String** | Type of event | [optional]
|
|
12
13
|
**event_updated_message** | [**ConversationMessage**](ConversationMessage.md) | | [optional]
|
|
13
14
|
**message** | [**ConversationMessage**](ConversationMessage.md) | | [optional]
|
|
@@ -191,6 +191,55 @@ module UltracartClient
|
|
|
191
191
|
end
|
|
192
192
|
return data, status_code, headers
|
|
193
193
|
end
|
|
194
|
+
# Retrieve a conversation webchat queue statuses
|
|
195
|
+
# Retrieve a conversation webchat queue statuses including agent status and queue entries
|
|
196
|
+
# @param [Hash] opts the optional parameters
|
|
197
|
+
# @return [ConversationWebchatQueueStatusesResponse]
|
|
198
|
+
def get_conversation_webchat_queue_statuses(opts = {})
|
|
199
|
+
data, _status_code, _headers = get_conversation_webchat_queue_statuses_with_http_info(opts)
|
|
200
|
+
data
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Retrieve a conversation webchat queue statuses
|
|
204
|
+
# Retrieve a conversation webchat queue statuses including agent status and queue entries
|
|
205
|
+
# @param [Hash] opts the optional parameters
|
|
206
|
+
# @return [Array<(ConversationWebchatQueueStatusesResponse, Fixnum, Hash)>] ConversationWebchatQueueStatusesResponse data, response status code and response headers
|
|
207
|
+
def get_conversation_webchat_queue_statuses_with_http_info(opts = {})
|
|
208
|
+
if @api_client.config.debugging
|
|
209
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_webchat_queue_statuses ...'
|
|
210
|
+
end
|
|
211
|
+
# resource path
|
|
212
|
+
local_var_path = '/conversation/conversations/queues/statuses'
|
|
213
|
+
|
|
214
|
+
# query parameters
|
|
215
|
+
query_params = {}
|
|
216
|
+
|
|
217
|
+
# header parameters
|
|
218
|
+
header_params = {}
|
|
219
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
220
|
+
# HTTP header 'Accept' (if needed)
|
|
221
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
222
|
+
# HTTP header 'Content-Type'
|
|
223
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
224
|
+
|
|
225
|
+
# form parameters
|
|
226
|
+
form_params = {}
|
|
227
|
+
|
|
228
|
+
# http body (model)
|
|
229
|
+
post_body = nil
|
|
230
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
231
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
232
|
+
:header_params => header_params,
|
|
233
|
+
:query_params => query_params,
|
|
234
|
+
:form_params => form_params,
|
|
235
|
+
:body => post_body,
|
|
236
|
+
:auth_names => auth_names,
|
|
237
|
+
:return_type => 'ConversationWebchatQueueStatusesResponse')
|
|
238
|
+
if @api_client.config.debugging
|
|
239
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_conversation_webchat_queue_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
240
|
+
end
|
|
241
|
+
return data, status_code, headers
|
|
242
|
+
end
|
|
194
243
|
# Retrieve a list of conversation summaries newest to oldest
|
|
195
244
|
# Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
|
|
196
245
|
# @param [Hash] opts the optional parameters
|
|
@@ -409,5 +458,65 @@ module UltracartClient
|
|
|
409
458
|
end
|
|
410
459
|
return data, status_code, headers
|
|
411
460
|
end
|
|
461
|
+
# Update status within the queue
|
|
462
|
+
# Update status within the queue
|
|
463
|
+
# @param queue_name
|
|
464
|
+
# @param status_request Status request
|
|
465
|
+
# @param [Hash] opts the optional parameters
|
|
466
|
+
# @return [nil]
|
|
467
|
+
def update_conversation_webchat_queue_status(queue_name, status_request, opts = {})
|
|
468
|
+
update_conversation_webchat_queue_status_with_http_info(queue_name, status_request, opts)
|
|
469
|
+
nil
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
# Update status within the queue
|
|
473
|
+
# Update status within the queue
|
|
474
|
+
# @param queue_name
|
|
475
|
+
# @param status_request Status request
|
|
476
|
+
# @param [Hash] opts the optional parameters
|
|
477
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
478
|
+
def update_conversation_webchat_queue_status_with_http_info(queue_name, status_request, opts = {})
|
|
479
|
+
if @api_client.config.debugging
|
|
480
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.update_conversation_webchat_queue_status ...'
|
|
481
|
+
end
|
|
482
|
+
# verify the required parameter 'queue_name' is set
|
|
483
|
+
if @api_client.config.client_side_validation && queue_name.nil?
|
|
484
|
+
fail ArgumentError, "Missing the required parameter 'queue_name' when calling ConversationApi.update_conversation_webchat_queue_status"
|
|
485
|
+
end
|
|
486
|
+
# verify the required parameter 'status_request' is set
|
|
487
|
+
if @api_client.config.client_side_validation && status_request.nil?
|
|
488
|
+
fail ArgumentError, "Missing the required parameter 'status_request' when calling ConversationApi.update_conversation_webchat_queue_status"
|
|
489
|
+
end
|
|
490
|
+
# resource path
|
|
491
|
+
local_var_path = '/conversation/conversations/queues/{queue_name}/status'.sub('{' + 'queue_name' + '}', queue_name.to_s)
|
|
492
|
+
|
|
493
|
+
# query parameters
|
|
494
|
+
query_params = {}
|
|
495
|
+
|
|
496
|
+
# header parameters
|
|
497
|
+
header_params = {}
|
|
498
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
499
|
+
# HTTP header 'Accept' (if needed)
|
|
500
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
501
|
+
# HTTP header 'Content-Type'
|
|
502
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
503
|
+
|
|
504
|
+
# form parameters
|
|
505
|
+
form_params = {}
|
|
506
|
+
|
|
507
|
+
# http body (model)
|
|
508
|
+
post_body = @api_client.object_to_http_body(status_request)
|
|
509
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
510
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
511
|
+
:header_params => header_params,
|
|
512
|
+
:query_params => query_params,
|
|
513
|
+
:form_params => form_params,
|
|
514
|
+
:body => post_body,
|
|
515
|
+
:auth_names => auth_names)
|
|
516
|
+
if @api_client.config.debugging
|
|
517
|
+
@api_client.config.logger.debug "API called: ConversationApi#update_conversation_webchat_queue_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
518
|
+
end
|
|
519
|
+
return data, status_code, headers
|
|
520
|
+
end
|
|
412
521
|
end
|
|
413
522
|
end
|
|
@@ -0,0 +1,279 @@
|
|
|
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 ConversationWebchatQueueStatus
|
|
17
|
+
attr_accessor :agent_available_count
|
|
18
|
+
|
|
19
|
+
attr_accessor :agent_busy_count
|
|
20
|
+
|
|
21
|
+
attr_accessor :agent_count
|
|
22
|
+
|
|
23
|
+
attr_accessor :agent_unavailable_count
|
|
24
|
+
|
|
25
|
+
attr_accessor :agents
|
|
26
|
+
|
|
27
|
+
attr_accessor :customer_abandon_count
|
|
28
|
+
|
|
29
|
+
attr_accessor :customer_active_count
|
|
30
|
+
|
|
31
|
+
attr_accessor :customer_waiting_count
|
|
32
|
+
|
|
33
|
+
# Date/time that the oldest person joined the queue
|
|
34
|
+
attr_accessor :customer_waiting_join_dts
|
|
35
|
+
|
|
36
|
+
attr_accessor :queue_entries
|
|
37
|
+
|
|
38
|
+
attr_accessor :queue_name
|
|
39
|
+
|
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
|
+
def self.attribute_map
|
|
42
|
+
{
|
|
43
|
+
:'agent_available_count' => :'agent_available_count',
|
|
44
|
+
:'agent_busy_count' => :'agent_busy_count',
|
|
45
|
+
:'agent_count' => :'agent_count',
|
|
46
|
+
:'agent_unavailable_count' => :'agent_unavailable_count',
|
|
47
|
+
:'agents' => :'agents',
|
|
48
|
+
:'customer_abandon_count' => :'customer_abandon_count',
|
|
49
|
+
:'customer_active_count' => :'customer_active_count',
|
|
50
|
+
:'customer_waiting_count' => :'customer_waiting_count',
|
|
51
|
+
:'customer_waiting_join_dts' => :'customer_waiting_join_dts',
|
|
52
|
+
:'queue_entries' => :'queue_entries',
|
|
53
|
+
:'queue_name' => :'queue_name'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
def self.swagger_types
|
|
59
|
+
{
|
|
60
|
+
:'agent_available_count' => :'Integer',
|
|
61
|
+
:'agent_busy_count' => :'Integer',
|
|
62
|
+
:'agent_count' => :'Integer',
|
|
63
|
+
:'agent_unavailable_count' => :'Integer',
|
|
64
|
+
:'agents' => :'Array<ConversationWebchatQueueStatusAgent>',
|
|
65
|
+
:'customer_abandon_count' => :'Integer',
|
|
66
|
+
:'customer_active_count' => :'Integer',
|
|
67
|
+
:'customer_waiting_count' => :'Integer',
|
|
68
|
+
:'customer_waiting_join_dts' => :'String',
|
|
69
|
+
:'queue_entries' => :'Array<ConversationWebchatQueueStatusQueueEntry>',
|
|
70
|
+
:'queue_name' => :'String'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Initializes the object
|
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
76
|
+
def initialize(attributes = {})
|
|
77
|
+
return unless attributes.is_a?(Hash)
|
|
78
|
+
|
|
79
|
+
# convert string to symbol for hash key
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
81
|
+
|
|
82
|
+
if attributes.has_key?(:'agent_available_count')
|
|
83
|
+
self.agent_available_count = attributes[:'agent_available_count']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.has_key?(:'agent_busy_count')
|
|
87
|
+
self.agent_busy_count = attributes[:'agent_busy_count']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.has_key?(:'agent_count')
|
|
91
|
+
self.agent_count = attributes[:'agent_count']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.has_key?(:'agent_unavailable_count')
|
|
95
|
+
self.agent_unavailable_count = attributes[:'agent_unavailable_count']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.has_key?(:'agents')
|
|
99
|
+
if (value = attributes[:'agents']).is_a?(Array)
|
|
100
|
+
self.agents = value
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.has_key?(:'customer_abandon_count')
|
|
105
|
+
self.customer_abandon_count = attributes[:'customer_abandon_count']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.has_key?(:'customer_active_count')
|
|
109
|
+
self.customer_active_count = attributes[:'customer_active_count']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.has_key?(:'customer_waiting_count')
|
|
113
|
+
self.customer_waiting_count = attributes[:'customer_waiting_count']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.has_key?(:'customer_waiting_join_dts')
|
|
117
|
+
self.customer_waiting_join_dts = attributes[:'customer_waiting_join_dts']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.has_key?(:'queue_entries')
|
|
121
|
+
if (value = attributes[:'queue_entries']).is_a?(Array)
|
|
122
|
+
self.queue_entries = value
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.has_key?(:'queue_name')
|
|
127
|
+
self.queue_name = attributes[:'queue_name']
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
132
|
+
# @return Array for valid properties with the reasons
|
|
133
|
+
def list_invalid_properties
|
|
134
|
+
invalid_properties = Array.new
|
|
135
|
+
invalid_properties
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Check to see if the all the properties in the model are valid
|
|
139
|
+
# @return true if the model is valid
|
|
140
|
+
def valid?
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Checks equality by comparing each attribute.
|
|
145
|
+
# @param [Object] Object to be compared
|
|
146
|
+
def ==(o)
|
|
147
|
+
return true if self.equal?(o)
|
|
148
|
+
self.class == o.class &&
|
|
149
|
+
agent_available_count == o.agent_available_count &&
|
|
150
|
+
agent_busy_count == o.agent_busy_count &&
|
|
151
|
+
agent_count == o.agent_count &&
|
|
152
|
+
agent_unavailable_count == o.agent_unavailable_count &&
|
|
153
|
+
agents == o.agents &&
|
|
154
|
+
customer_abandon_count == o.customer_abandon_count &&
|
|
155
|
+
customer_active_count == o.customer_active_count &&
|
|
156
|
+
customer_waiting_count == o.customer_waiting_count &&
|
|
157
|
+
customer_waiting_join_dts == o.customer_waiting_join_dts &&
|
|
158
|
+
queue_entries == o.queue_entries &&
|
|
159
|
+
queue_name == o.queue_name
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# @see the `==` method
|
|
163
|
+
# @param [Object] Object to be compared
|
|
164
|
+
def eql?(o)
|
|
165
|
+
self == o
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Calculates hash code according to all attributes.
|
|
169
|
+
# @return [Fixnum] Hash code
|
|
170
|
+
def hash
|
|
171
|
+
[agent_available_count, agent_busy_count, agent_count, agent_unavailable_count, agents, customer_abandon_count, customer_active_count, customer_waiting_count, customer_waiting_join_dts, queue_entries, queue_name].hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Builds the object from hash
|
|
175
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
176
|
+
# @return [Object] Returns the model itself
|
|
177
|
+
def build_from_hash(attributes)
|
|
178
|
+
return nil unless attributes.is_a?(Hash)
|
|
179
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
180
|
+
if type =~ /\AArray<(.*)>/i
|
|
181
|
+
# check to ensure the input is an array given that the attribute
|
|
182
|
+
# is documented as an array but the input is not
|
|
183
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
184
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
185
|
+
end
|
|
186
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
187
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
188
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
self
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Deserializes the data based on type
|
|
195
|
+
# @param string type Data type
|
|
196
|
+
# @param string value Value to be deserialized
|
|
197
|
+
# @return [Object] Deserialized data
|
|
198
|
+
def _deserialize(type, value)
|
|
199
|
+
case type.to_sym
|
|
200
|
+
when :DateTime
|
|
201
|
+
DateTime.parse(value)
|
|
202
|
+
when :Date
|
|
203
|
+
Date.parse(value)
|
|
204
|
+
when :String
|
|
205
|
+
value.to_s
|
|
206
|
+
when :Integer
|
|
207
|
+
value.to_i
|
|
208
|
+
when :Float
|
|
209
|
+
value.to_f
|
|
210
|
+
when :BOOLEAN
|
|
211
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
212
|
+
true
|
|
213
|
+
else
|
|
214
|
+
false
|
|
215
|
+
end
|
|
216
|
+
when :Object
|
|
217
|
+
# generic object (usually a Hash), return directly
|
|
218
|
+
value
|
|
219
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
220
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
221
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
222
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
223
|
+
k_type = Regexp.last_match[:k_type]
|
|
224
|
+
v_type = Regexp.last_match[:v_type]
|
|
225
|
+
{}.tap do |hash|
|
|
226
|
+
value.each do |k, v|
|
|
227
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
else # model
|
|
231
|
+
temp_model = UltracartClient.const_get(type).new
|
|
232
|
+
temp_model.build_from_hash(value)
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Returns the string representation of the object
|
|
237
|
+
# @return [String] String presentation of the object
|
|
238
|
+
def to_s
|
|
239
|
+
to_hash.to_s
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
243
|
+
# @return [Hash] Returns the object in the form of hash
|
|
244
|
+
def to_body
|
|
245
|
+
to_hash
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Returns the object in the form of hash
|
|
249
|
+
# @return [Hash] Returns the object in the form of hash
|
|
250
|
+
def to_hash
|
|
251
|
+
hash = {}
|
|
252
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
253
|
+
value = self.send(attr)
|
|
254
|
+
next if value.nil?
|
|
255
|
+
hash[param] = _to_hash(value)
|
|
256
|
+
end
|
|
257
|
+
hash
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Outputs non-array value in the form of hash
|
|
261
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
262
|
+
# @param [Object] value Any valid value
|
|
263
|
+
# @return [Hash] Returns the value in the form of hash
|
|
264
|
+
def _to_hash(value)
|
|
265
|
+
if value.is_a?(Array)
|
|
266
|
+
value.compact.map { |v| _to_hash(v) }
|
|
267
|
+
elsif value.is_a?(Hash)
|
|
268
|
+
{}.tap do |hash|
|
|
269
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
270
|
+
end
|
|
271
|
+
elsif value.respond_to? :to_hash
|
|
272
|
+
value.to_hash
|
|
273
|
+
else
|
|
274
|
+
value
|
|
275
|
+
end
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
end
|
|
279
|
+
end
|