ultracart_api 4.0.63.rc → 4.0.64.rc
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/ConversationApi.md +154 -4
- data/docs/ConversationMessagesResponse.md +26 -0
- data/lib/ultracart_api/api/conversation_api.rb +134 -0
- data/lib/ultracart_api/models/conversation_messages_response.rb +258 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1ed1c97e3f263b06950618cb32dfc1ee9a59a5bd94a42b54c29b474be60adef
|
4
|
+
data.tar.gz: 84cc1f79eaaa7e85018ef417c020d639a0a7d4bc95668c6bd83a46e004d66a8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64acc6802ec8ded7e8c438358339e97119ac57d46879a43b7a0cb49f544e5d4661491c70a33824134c3068459ad32d5f696f2e82cc0410a2d91e5a153ae677f8
|
7
|
+
data.tar.gz: 0656ec27b524e46538da54766cb20a6fa26475c3e0c61898b95829102edb4b9f1040a9026acfae3e98081c2ef1efc4080c2f3536a2215dda1d2cfca5a6de2a9c
|
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.
|
10
|
+
- Package version: 4.0.64.rc
|
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.
|
27
|
+
gem install ./ultracart_api-4.0.64.rc.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.64.rc.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.
|
36
|
+
gem 'ultracart_api', '~> 4.0.64.rc'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -131,8 +131,10 @@ Class | Method | HTTP request | Description
|
|
131
131
|
*UltracartClient::CheckoutApi* | [**setup_browser_key**](docs/CheckoutApi.md#setup_browser_key) | **PUT** /checkout/browser_key | Setup Browser Application
|
132
132
|
*UltracartClient::CheckoutApi* | [**update_cart**](docs/CheckoutApi.md#update_cart) | **PUT** /checkout/cart | Update cart
|
133
133
|
*UltracartClient::CheckoutApi* | [**validate_cart**](docs/CheckoutApi.md#validate_cart) | **POST** /checkout/cart/validate | Validate
|
134
|
+
*UltracartClient::ConversationApi* | [**get_agent_keep_alive**](docs/ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive
|
134
135
|
*UltracartClient::ConversationApi* | [**get_agent_websocket_authorization**](docs/ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization
|
135
136
|
*UltracartClient::ConversationApi* | [**get_conversation**](docs/ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
|
137
|
+
*UltracartClient::ConversationApi* | [**get_conversation_messages**](docs/ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages
|
136
138
|
*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
|
137
139
|
*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
|
138
140
|
*UltracartClient::ConversationApi* | [**get_conversations**](docs/ConversationApi.md#get_conversations) | **GET** /conversation/conversations | Retrieve a list of conversation summaries newest to oldest
|
@@ -578,6 +580,7 @@ Class | Method | HTTP request | Description
|
|
578
580
|
- [UltracartClient::ConversationEventTyping](docs/ConversationEventTyping.md)
|
579
581
|
- [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
|
580
582
|
- [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
|
583
|
+
- [UltracartClient::ConversationMessagesResponse](docs/ConversationMessagesResponse.md)
|
581
584
|
- [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
|
582
585
|
- [UltracartClient::ConversationMultimediaUploadUrlResponse](docs/ConversationMultimediaUploadUrlResponse.md)
|
583
586
|
- [UltracartClient::ConversationParticipant](docs/ConversationParticipant.md)
|
@@ -1194,6 +1197,7 @@ Not every change is committed to every SDK.
|
|
1194
1197
|
|
1195
1198
|
| Version | Date | Comments |
|
1196
1199
|
| --: | :-: | --- |
|
1200
|
+
| 4.0.64-RC | 09/19/2022 | conversations pagination |
|
1197
1201
|
| 4.0.63-RC | 09/13/2022 | storefront comms - postcard tracking |
|
1198
1202
|
| 4.0.62-RC | 09/12/2022 | storefront comm - send back reviews.io configured flag on getEmailSettings |
|
1199
1203
|
| 4.0.61-RC | 09/07/2022 | sf comms - using aws event ruler for bigquery segmentation validation |
|
data/docs/ConversationApi.md
CHANGED
@@ -4,8 +4,10 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
+
| [**get_agent_keep_alive**](ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive |
|
7
8
|
| [**get_agent_websocket_authorization**](ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization |
|
8
9
|
| [**get_conversation**](ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation |
|
10
|
+
| [**get_conversation_messages**](ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages |
|
9
11
|
| [**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
12
|
| [**get_conversation_webchat_queue_statuses**](ConversationApi.md#get_conversation_webchat_queue_statuses) | **GET** /conversation/conversations/queues/statuses | Retrieve a conversation webchat queue statuses |
|
11
13
|
| [**get_conversations**](ConversationApi.md#get_conversations) | **GET** /conversation/conversations | Retrieve a list of conversation summaries newest to oldest |
|
@@ -15,6 +17,73 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
15
17
|
| [**update_conversation_webchat_queue_status**](ConversationApi.md#update_conversation_webchat_queue_status) | **PUT** /conversation/conversations/queues/{queue_name}/status | Update status within the queue |
|
16
18
|
|
17
19
|
|
20
|
+
## get_agent_keep_alive
|
21
|
+
|
22
|
+
> get_agent_keep_alive
|
23
|
+
|
24
|
+
Agent keep alive
|
25
|
+
|
26
|
+
Called periodically by the conversation API to keep the session alive.
|
27
|
+
|
28
|
+
### Examples
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
require 'time'
|
32
|
+
require 'ultracart_api'
|
33
|
+
require 'json'
|
34
|
+
require 'yaml'
|
35
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
36
|
+
|
37
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
38
|
+
# As such, this might not be the best way to use this object.
|
39
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
40
|
+
|
41
|
+
api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
42
|
+
|
43
|
+
begin
|
44
|
+
# Agent keep alive
|
45
|
+
api_instance.get_agent_keep_alive
|
46
|
+
rescue UltracartClient::ApiError => e
|
47
|
+
puts "Error when calling ConversationApi->get_agent_keep_alive: #{e}"
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
#### Using the get_agent_keep_alive_with_http_info variant
|
52
|
+
|
53
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
54
|
+
|
55
|
+
> <Array(nil, Integer, Hash)> get_agent_keep_alive_with_http_info
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
begin
|
59
|
+
# Agent keep alive
|
60
|
+
data, status_code, headers = api_instance.get_agent_keep_alive_with_http_info
|
61
|
+
p status_code # => 2xx
|
62
|
+
p headers # => { ... }
|
63
|
+
p data # => nil
|
64
|
+
rescue UltracartClient::ApiError => e
|
65
|
+
puts "Error when calling ConversationApi->get_agent_keep_alive_with_http_info: #{e}"
|
66
|
+
end
|
67
|
+
```
|
68
|
+
|
69
|
+
### Parameters
|
70
|
+
|
71
|
+
This endpoint does not need any parameter.
|
72
|
+
|
73
|
+
### Return type
|
74
|
+
|
75
|
+
nil (empty response body)
|
76
|
+
|
77
|
+
### Authorization
|
78
|
+
|
79
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
80
|
+
|
81
|
+
### HTTP request headers
|
82
|
+
|
83
|
+
- **Content-Type**: Not defined
|
84
|
+
- **Accept**: application/json
|
85
|
+
|
86
|
+
|
18
87
|
## get_agent_websocket_authorization
|
19
88
|
|
20
89
|
> <ConversationAgentAuthResponse> get_agent_websocket_authorization
|
@@ -85,7 +154,7 @@ This endpoint does not need any parameter.
|
|
85
154
|
|
86
155
|
## get_conversation
|
87
156
|
|
88
|
-
> <ConversationResponse> get_conversation(conversation_uuid)
|
157
|
+
> <ConversationResponse> get_conversation(conversation_uuid, opts)
|
89
158
|
|
90
159
|
Retrieve a conversation
|
91
160
|
|
@@ -106,10 +175,13 @@ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/
|
|
106
175
|
|
107
176
|
api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
108
177
|
conversation_uuid = 'conversation_uuid_example' # String |
|
178
|
+
opts = {
|
179
|
+
limit: 56 # Integer |
|
180
|
+
}
|
109
181
|
|
110
182
|
begin
|
111
183
|
# Retrieve a conversation
|
112
|
-
result = api_instance.get_conversation(conversation_uuid)
|
184
|
+
result = api_instance.get_conversation(conversation_uuid, opts)
|
113
185
|
p result
|
114
186
|
rescue UltracartClient::ApiError => e
|
115
187
|
puts "Error when calling ConversationApi->get_conversation: #{e}"
|
@@ -120,12 +192,12 @@ end
|
|
120
192
|
|
121
193
|
This returns an Array which contains the response data, status code and headers.
|
122
194
|
|
123
|
-
> <Array(<ConversationResponse>, Integer, Hash)> get_conversation_with_http_info(conversation_uuid)
|
195
|
+
> <Array(<ConversationResponse>, Integer, Hash)> get_conversation_with_http_info(conversation_uuid, opts)
|
124
196
|
|
125
197
|
```ruby
|
126
198
|
begin
|
127
199
|
# Retrieve a conversation
|
128
|
-
data, status_code, headers = api_instance.get_conversation_with_http_info(conversation_uuid)
|
200
|
+
data, status_code, headers = api_instance.get_conversation_with_http_info(conversation_uuid, opts)
|
129
201
|
p status_code # => 2xx
|
130
202
|
p headers # => { ... }
|
131
203
|
p data # => <ConversationResponse>
|
@@ -139,6 +211,7 @@ end
|
|
139
211
|
| Name | Type | Description | Notes |
|
140
212
|
| ---- | ---- | ----------- | ----- |
|
141
213
|
| **conversation_uuid** | **String** | | |
|
214
|
+
| **limit** | **Integer** | | [optional] |
|
142
215
|
|
143
216
|
### Return type
|
144
217
|
|
@@ -154,6 +227,83 @@ end
|
|
154
227
|
- **Accept**: application/json
|
155
228
|
|
156
229
|
|
230
|
+
## get_conversation_messages
|
231
|
+
|
232
|
+
> <ConversationMessagesResponse> get_conversation_messages(conversation_uuid, since, opts)
|
233
|
+
|
234
|
+
Retrieve conversation messages
|
235
|
+
|
236
|
+
Retrieve conversation messages since a particular time
|
237
|
+
|
238
|
+
### Examples
|
239
|
+
|
240
|
+
```ruby
|
241
|
+
require 'time'
|
242
|
+
require 'ultracart_api'
|
243
|
+
require 'json'
|
244
|
+
require 'yaml'
|
245
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
246
|
+
|
247
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
248
|
+
# As such, this might not be the best way to use this object.
|
249
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
250
|
+
|
251
|
+
api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
252
|
+
conversation_uuid = 'conversation_uuid_example' # String |
|
253
|
+
since = 789 # Integer |
|
254
|
+
opts = {
|
255
|
+
limit: 56 # Integer |
|
256
|
+
}
|
257
|
+
|
258
|
+
begin
|
259
|
+
# Retrieve conversation messages
|
260
|
+
result = api_instance.get_conversation_messages(conversation_uuid, since, opts)
|
261
|
+
p result
|
262
|
+
rescue UltracartClient::ApiError => e
|
263
|
+
puts "Error when calling ConversationApi->get_conversation_messages: #{e}"
|
264
|
+
end
|
265
|
+
```
|
266
|
+
|
267
|
+
#### Using the get_conversation_messages_with_http_info variant
|
268
|
+
|
269
|
+
This returns an Array which contains the response data, status code and headers.
|
270
|
+
|
271
|
+
> <Array(<ConversationMessagesResponse>, Integer, Hash)> get_conversation_messages_with_http_info(conversation_uuid, since, opts)
|
272
|
+
|
273
|
+
```ruby
|
274
|
+
begin
|
275
|
+
# Retrieve conversation messages
|
276
|
+
data, status_code, headers = api_instance.get_conversation_messages_with_http_info(conversation_uuid, since, opts)
|
277
|
+
p status_code # => 2xx
|
278
|
+
p headers # => { ... }
|
279
|
+
p data # => <ConversationMessagesResponse>
|
280
|
+
rescue UltracartClient::ApiError => e
|
281
|
+
puts "Error when calling ConversationApi->get_conversation_messages_with_http_info: #{e}"
|
282
|
+
end
|
283
|
+
```
|
284
|
+
|
285
|
+
### Parameters
|
286
|
+
|
287
|
+
| Name | Type | Description | Notes |
|
288
|
+
| ---- | ---- | ----------- | ----- |
|
289
|
+
| **conversation_uuid** | **String** | | |
|
290
|
+
| **since** | **Integer** | | |
|
291
|
+
| **limit** | **Integer** | | [optional] |
|
292
|
+
|
293
|
+
### Return type
|
294
|
+
|
295
|
+
[**ConversationMessagesResponse**](ConversationMessagesResponse.md)
|
296
|
+
|
297
|
+
### Authorization
|
298
|
+
|
299
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
300
|
+
|
301
|
+
### HTTP request headers
|
302
|
+
|
303
|
+
- **Content-Type**: Not defined
|
304
|
+
- **Accept**: application/json
|
305
|
+
|
306
|
+
|
157
307
|
## get_conversation_multimedia_upload_url
|
158
308
|
|
159
309
|
> <ConversationMultimediaUploadUrlResponse> get_conversation_multimedia_upload_url(extension)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# UltracartClient::ConversationMessagesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **conversation_messages** | [**Array<ConversationMessage>**](ConversationMessage.md) | | [optional] |
|
8
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
9
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'ultracart_api'
|
17
|
+
|
18
|
+
instance = UltracartClient::ConversationMessagesResponse.new(
|
19
|
+
conversation_messages: null,
|
20
|
+
error: null,
|
21
|
+
metadata: null,
|
22
|
+
success: null,
|
23
|
+
warning: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -32,6 +32,64 @@ module UltracartClient
|
|
32
32
|
UltracartClient::ConversationApi.new(api_client)
|
33
33
|
end
|
34
34
|
|
35
|
+
# Agent keep alive
|
36
|
+
# Called periodically by the conversation API to keep the session alive.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [nil]
|
39
|
+
def get_agent_keep_alive(opts = {})
|
40
|
+
get_agent_keep_alive_with_http_info(opts)
|
41
|
+
nil
|
42
|
+
end
|
43
|
+
|
44
|
+
# Agent keep alive
|
45
|
+
# Called periodically by the conversation API to keep the session alive.
|
46
|
+
# @param [Hash] opts the optional parameters
|
47
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
48
|
+
def get_agent_keep_alive_with_http_info(opts = {})
|
49
|
+
if @api_client.config.debugging
|
50
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_agent_keep_alive ...'
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = '/conversation/agent/keepalive'
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = opts[:query_params] || {}
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = opts[: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
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:debug_body]
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:debug_return_type]
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:operation => :"ConversationApi.get_agent_keep_alive",
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_agent_keep_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
|
35
93
|
# Get agent websocket authorization
|
36
94
|
# Retrieve a JWT to authorize an agent to make a websocket connection.
|
37
95
|
# @param [Hash] opts the optional parameters
|
@@ -94,6 +152,7 @@ module UltracartClient
|
|
94
152
|
# Retrieve a conversation including the participants and messages
|
95
153
|
# @param conversation_uuid [String]
|
96
154
|
# @param [Hash] opts the optional parameters
|
155
|
+
# @option opts [Integer] :limit
|
97
156
|
# @return [ConversationResponse]
|
98
157
|
def get_conversation(conversation_uuid, opts = {})
|
99
158
|
data, _status_code, _headers = get_conversation_with_http_info(conversation_uuid, opts)
|
@@ -104,6 +163,7 @@ module UltracartClient
|
|
104
163
|
# Retrieve a conversation including the participants and messages
|
105
164
|
# @param conversation_uuid [String]
|
106
165
|
# @param [Hash] opts the optional parameters
|
166
|
+
# @option opts [Integer] :limit
|
107
167
|
# @return [Array<(ConversationResponse, Integer, Hash)>] ConversationResponse data, response status code and response headers
|
108
168
|
def get_conversation_with_http_info(conversation_uuid, opts = {})
|
109
169
|
if @api_client.config.debugging
|
@@ -118,6 +178,7 @@ module UltracartClient
|
|
118
178
|
|
119
179
|
# query parameters
|
120
180
|
query_params = opts[:query_params] || {}
|
181
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
121
182
|
|
122
183
|
# header parameters
|
123
184
|
header_params = opts[:header_params] || {}
|
@@ -154,6 +215,79 @@ module UltracartClient
|
|
154
215
|
return data, status_code, headers
|
155
216
|
end
|
156
217
|
|
218
|
+
# Retrieve conversation messages
|
219
|
+
# Retrieve conversation messages since a particular time
|
220
|
+
# @param conversation_uuid [String]
|
221
|
+
# @param since [Integer]
|
222
|
+
# @param [Hash] opts the optional parameters
|
223
|
+
# @option opts [Integer] :limit
|
224
|
+
# @return [ConversationMessagesResponse]
|
225
|
+
def get_conversation_messages(conversation_uuid, since, opts = {})
|
226
|
+
data, _status_code, _headers = get_conversation_messages_with_http_info(conversation_uuid, since, opts)
|
227
|
+
data
|
228
|
+
end
|
229
|
+
|
230
|
+
# Retrieve conversation messages
|
231
|
+
# Retrieve conversation messages since a particular time
|
232
|
+
# @param conversation_uuid [String]
|
233
|
+
# @param since [Integer]
|
234
|
+
# @param [Hash] opts the optional parameters
|
235
|
+
# @option opts [Integer] :limit
|
236
|
+
# @return [Array<(ConversationMessagesResponse, Integer, Hash)>] ConversationMessagesResponse data, response status code and response headers
|
237
|
+
def get_conversation_messages_with_http_info(conversation_uuid, since, opts = {})
|
238
|
+
if @api_client.config.debugging
|
239
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_messages ...'
|
240
|
+
end
|
241
|
+
# verify the required parameter 'conversation_uuid' is set
|
242
|
+
if @api_client.config.client_side_validation && conversation_uuid.nil?
|
243
|
+
fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation_messages"
|
244
|
+
end
|
245
|
+
# verify the required parameter 'since' is set
|
246
|
+
if @api_client.config.client_side_validation && since.nil?
|
247
|
+
fail ArgumentError, "Missing the required parameter 'since' when calling ConversationApi.get_conversation_messages"
|
248
|
+
end
|
249
|
+
# resource path
|
250
|
+
local_var_path = '/conversation/conversations/{conversation_uuid}/messages/{since}'.sub('{' + 'conversation_uuid' + '}', CGI.escape(conversation_uuid.to_s)).sub('{' + 'since' + '}', CGI.escape(since.to_s))
|
251
|
+
|
252
|
+
# query parameters
|
253
|
+
query_params = opts[:query_params] || {}
|
254
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
255
|
+
|
256
|
+
# header parameters
|
257
|
+
header_params = opts[:header_params] || {}
|
258
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
259
|
+
# HTTP header 'Accept' (if needed)
|
260
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
261
|
+
|
262
|
+
# form parameters
|
263
|
+
form_params = opts[:form_params] || {}
|
264
|
+
|
265
|
+
# http body (model)
|
266
|
+
post_body = opts[:debug_body]
|
267
|
+
|
268
|
+
# return_type
|
269
|
+
return_type = opts[:debug_return_type] || 'ConversationMessagesResponse'
|
270
|
+
|
271
|
+
# auth_names
|
272
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
273
|
+
|
274
|
+
new_options = opts.merge(
|
275
|
+
:operation => :"ConversationApi.get_conversation_messages",
|
276
|
+
:header_params => header_params,
|
277
|
+
:query_params => query_params,
|
278
|
+
:form_params => form_params,
|
279
|
+
:body => post_body,
|
280
|
+
:auth_names => auth_names,
|
281
|
+
:return_type => return_type
|
282
|
+
)
|
283
|
+
|
284
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
285
|
+
if @api_client.config.debugging
|
286
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_conversation_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
287
|
+
end
|
288
|
+
return data, status_code, headers
|
289
|
+
end
|
290
|
+
|
157
291
|
# Get a presigned conersation multimedia upload URL
|
158
292
|
# Get a presigned conersation multimedia upload URL
|
159
293
|
# @param extension [String]
|
@@ -0,0 +1,258 @@
|
|
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 ConversationMessagesResponse
|
18
|
+
attr_accessor :conversation_messages
|
19
|
+
|
20
|
+
attr_accessor :error
|
21
|
+
|
22
|
+
attr_accessor :metadata
|
23
|
+
|
24
|
+
# Indicates if API call was successful
|
25
|
+
attr_accessor :success
|
26
|
+
|
27
|
+
attr_accessor :warning
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'conversation_messages' => :'conversation_messages',
|
33
|
+
:'error' => :'error',
|
34
|
+
:'metadata' => :'metadata',
|
35
|
+
:'success' => :'success',
|
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
|
+
:'conversation_messages' => :'Array<ConversationMessage>',
|
49
|
+
:'error' => :'Error',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
51
|
+
:'success' => :'Boolean',
|
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::ConversationMessagesResponse` 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::ConversationMessagesResponse`. 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?(:'conversation_messages')
|
78
|
+
if (value = attributes[:'conversation_messages']).is_a?(Array)
|
79
|
+
self.conversation_messages = value
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'error')
|
84
|
+
self.error = attributes[:'error']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.key?(:'metadata')
|
88
|
+
self.metadata = attributes[:'metadata']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.key?(:'success')
|
92
|
+
self.success = attributes[:'success']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'warning')
|
96
|
+
self.warning = attributes[:'warning']
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
101
|
+
# @return Array for valid properties with the reasons
|
102
|
+
def list_invalid_properties
|
103
|
+
invalid_properties = Array.new
|
104
|
+
invalid_properties
|
105
|
+
end
|
106
|
+
|
107
|
+
# Check to see if the all the properties in the model are valid
|
108
|
+
# @return true if the model is valid
|
109
|
+
def valid?
|
110
|
+
true
|
111
|
+
end
|
112
|
+
|
113
|
+
# Checks equality by comparing each attribute.
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def ==(o)
|
116
|
+
return true if self.equal?(o)
|
117
|
+
self.class == o.class &&
|
118
|
+
conversation_messages == o.conversation_messages &&
|
119
|
+
error == o.error &&
|
120
|
+
metadata == o.metadata &&
|
121
|
+
success == o.success &&
|
122
|
+
warning == o.warning
|
123
|
+
end
|
124
|
+
|
125
|
+
# @see the `==` method
|
126
|
+
# @param [Object] Object to be compared
|
127
|
+
def eql?(o)
|
128
|
+
self == o
|
129
|
+
end
|
130
|
+
|
131
|
+
# Calculates hash code according to all attributes.
|
132
|
+
# @return [Integer] Hash code
|
133
|
+
def hash
|
134
|
+
[conversation_messages, error, metadata, success, warning].hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def self.build_from_hash(attributes)
|
141
|
+
new.build_from_hash(attributes)
|
142
|
+
end
|
143
|
+
|
144
|
+
# Builds the object from hash
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
146
|
+
# @return [Object] Returns the model itself
|
147
|
+
def build_from_hash(attributes)
|
148
|
+
return nil unless attributes.is_a?(Hash)
|
149
|
+
attributes = attributes.transform_keys(&:to_sym)
|
150
|
+
self.class.openapi_types.each_pair do |key, type|
|
151
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
152
|
+
self.send("#{key}=", nil)
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
154
|
+
# check to ensure the input is an array given that the attribute
|
155
|
+
# is documented as an array but the input is not
|
156
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
157
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
158
|
+
end
|
159
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
160
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
self
|
165
|
+
end
|
166
|
+
|
167
|
+
# Deserializes the data based on type
|
168
|
+
# @param string type Data type
|
169
|
+
# @param string value Value to be deserialized
|
170
|
+
# @return [Object] Deserialized data
|
171
|
+
def _deserialize(type, value)
|
172
|
+
case type.to_sym
|
173
|
+
when :Time
|
174
|
+
Time.parse(value)
|
175
|
+
when :Date
|
176
|
+
Date.parse(value)
|
177
|
+
when :String
|
178
|
+
value.to_s
|
179
|
+
when :Integer
|
180
|
+
value.to_i
|
181
|
+
when :Float
|
182
|
+
value.to_f
|
183
|
+
when :Boolean
|
184
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
185
|
+
true
|
186
|
+
else
|
187
|
+
false
|
188
|
+
end
|
189
|
+
when :Object
|
190
|
+
# generic object (usually a Hash), return directly
|
191
|
+
value
|
192
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
193
|
+
inner_type = Regexp.last_match[:inner_type]
|
194
|
+
value.map { |v| _deserialize(inner_type, v) }
|
195
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
196
|
+
k_type = Regexp.last_match[:k_type]
|
197
|
+
v_type = Regexp.last_match[:v_type]
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each do |k, v|
|
200
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
else # model
|
204
|
+
# models (e.g. Pet) or oneOf
|
205
|
+
klass = UltracartClient.const_get(type)
|
206
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the string representation of the object
|
211
|
+
# @return [String] String presentation of the object
|
212
|
+
def to_s
|
213
|
+
to_hash.to_s
|
214
|
+
end
|
215
|
+
|
216
|
+
# to_body is an alias to to_hash (backward compatibility)
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
218
|
+
def to_body
|
219
|
+
to_hash
|
220
|
+
end
|
221
|
+
|
222
|
+
# Returns the object in the form of hash
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
224
|
+
def to_hash
|
225
|
+
hash = {}
|
226
|
+
self.class.attribute_map.each_pair do |attr, param|
|
227
|
+
value = self.send(attr)
|
228
|
+
if value.nil?
|
229
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
230
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
231
|
+
end
|
232
|
+
|
233
|
+
hash[param] = _to_hash(value)
|
234
|
+
end
|
235
|
+
hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Outputs non-array value in the form of hash
|
239
|
+
# For object, use to_hash. Otherwise, just return the value
|
240
|
+
# @param [Object] value Any valid value
|
241
|
+
# @return [Hash] Returns the value in the form of hash
|
242
|
+
def _to_hash(value)
|
243
|
+
if value.is_a?(Array)
|
244
|
+
value.compact.map { |v| _to_hash(v) }
|
245
|
+
elsif value.is_a?(Hash)
|
246
|
+
{}.tap do |hash|
|
247
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
248
|
+
end
|
249
|
+
elsif value.respond_to? :to_hash
|
250
|
+
value.to_hash
|
251
|
+
else
|
252
|
+
value
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
257
|
+
|
258
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -143,6 +143,7 @@ require 'ultracart_api/models/conversation_event_read_message'
|
|
143
143
|
require 'ultracart_api/models/conversation_event_typing'
|
144
144
|
require 'ultracart_api/models/conversation_message'
|
145
145
|
require 'ultracart_api/models/conversation_message_transport_status'
|
146
|
+
require 'ultracart_api/models/conversation_messages_response'
|
146
147
|
require 'ultracart_api/models/conversation_multimedia_upload_url'
|
147
148
|
require 'ultracart_api/models/conversation_multimedia_upload_url_response'
|
148
149
|
require 'ultracart_api/models/conversation_participant'
|
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.
|
4
|
+
version: 4.0.64.rc
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- docs/ConversationEventTyping.md
|
194
194
|
- docs/ConversationMessage.md
|
195
195
|
- docs/ConversationMessageTransportStatus.md
|
196
|
+
- docs/ConversationMessagesResponse.md
|
196
197
|
- docs/ConversationMultimediaUploadUrl.md
|
197
198
|
- docs/ConversationMultimediaUploadUrlResponse.md
|
198
199
|
- docs/ConversationParticipant.md
|
@@ -899,6 +900,7 @@ files:
|
|
899
900
|
- lib/ultracart_api/models/conversation_event_typing.rb
|
900
901
|
- lib/ultracart_api/models/conversation_message.rb
|
901
902
|
- lib/ultracart_api/models/conversation_message_transport_status.rb
|
903
|
+
- lib/ultracart_api/models/conversation_messages_response.rb
|
902
904
|
- lib/ultracart_api/models/conversation_multimedia_upload_url.rb
|
903
905
|
- lib/ultracart_api/models/conversation_multimedia_upload_url_response.rb
|
904
906
|
- lib/ultracart_api/models/conversation_participant.rb
|