ultracart_api 3.10.46 → 3.10.47
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 +8 -4
- data/docs/ConversationApi.md +109 -2
- data/docs/ConversationMessagesResponse.md +12 -0
- data/lib/ultracart_api/api/conversation_api.rb +115 -0
- data/lib/ultracart_api/models/conversation_messages_response.rb +223 -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: 6c81286e0c3b92487863d04107623efd2989df4d89073257247f1e8591f1c3b3
|
|
4
|
+
data.tar.gz: 63bfd9540814e060d2d9779fa72a87d2c30fb754103759b144d44eb24b61e571
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa099d7d6f856a4cbf381ffbb978e774331682c71937507407c155f224773702d3798dbc8086eb2746616dcdc5d73cca9f8ab6362894228a4973183e24f3c2a1
|
|
7
|
+
data.tar.gz: 8d9a82ac81ed72f5586d8c04650838401622b0e069013d115d66bc484e2bdf4a1ba78c66f6c0fdf5c3e761005512269ed026fe6684a98827849cd6034e55e6c9
|
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.47
|
|
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.47.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.47.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.47'
|
|
36
36
|
|
|
37
37
|
### Install from Git
|
|
38
38
|
|
|
@@ -125,8 +125,10 @@ Class | Method | HTTP request | Description
|
|
|
125
125
|
*UltracartClient::CheckoutApi* | [**setup_browser_key**](docs/CheckoutApi.md#setup_browser_key) | **PUT** /checkout/browser_key | Setup Browser Application
|
|
126
126
|
*UltracartClient::CheckoutApi* | [**update_cart**](docs/CheckoutApi.md#update_cart) | **PUT** /checkout/cart | Update cart
|
|
127
127
|
*UltracartClient::CheckoutApi* | [**validate_cart**](docs/CheckoutApi.md#validate_cart) | **POST** /checkout/cart/validate | Validate
|
|
128
|
+
*UltracartClient::ConversationApi* | [**get_agent_keep_alive**](docs/ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive
|
|
128
129
|
*UltracartClient::ConversationApi* | [**get_agent_websocket_authorization**](docs/ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization
|
|
129
130
|
*UltracartClient::ConversationApi* | [**get_conversation**](docs/ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
|
|
131
|
+
*UltracartClient::ConversationApi* | [**get_conversation_messages**](docs/ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages
|
|
130
132
|
*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
133
|
*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
|
|
132
134
|
*UltracartClient::ConversationApi* | [**get_conversations**](docs/ConversationApi.md#get_conversations) | **GET** /conversation/conversations | Retrieve a list of conversation summaries newest to oldest
|
|
@@ -572,6 +574,7 @@ Class | Method | HTTP request | Description
|
|
|
572
574
|
- [UltracartClient::ConversationEventTyping](docs/ConversationEventTyping.md)
|
|
573
575
|
- [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
|
|
574
576
|
- [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
|
|
577
|
+
- [UltracartClient::ConversationMessagesResponse](docs/ConversationMessagesResponse.md)
|
|
575
578
|
- [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
|
|
576
579
|
- [UltracartClient::ConversationMultimediaUploadUrlResponse](docs/ConversationMultimediaUploadUrlResponse.md)
|
|
577
580
|
- [UltracartClient::ConversationParticipant](docs/ConversationParticipant.md)
|
|
@@ -1185,6 +1188,7 @@ Not every change is committed to every SDK.
|
|
|
1185
1188
|
|
|
1186
1189
|
| Version | Date | Comments |
|
|
1187
1190
|
| --: | :-: | --- |
|
|
1191
|
+
| 3.10.47 | 09/19/2022 | conversations pagination |
|
|
1188
1192
|
| 3.10.46 | 09/13/2022 | storefront comms - postcard tracking |
|
|
1189
1193
|
| 3.10.45 | 09/12/2022 | storefront comm - send back reviews.io configured flag on getEmailSettings |
|
|
1190
1194
|
| 3.10.44 | 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,50 @@ Method | HTTP request | Description
|
|
|
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
|
+
> get_agent_keep_alive
|
|
22
|
+
|
|
23
|
+
Agent keep alive
|
|
24
|
+
|
|
25
|
+
Called periodically by the conversation API to keep the session alive.
|
|
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::ConversationApi.new_using_api_key(simple_key, false, false)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
begin
|
|
39
|
+
#Agent keep alive
|
|
40
|
+
api_instance.get_agent_keep_alive
|
|
41
|
+
rescue UltracartClient::ApiError => e
|
|
42
|
+
puts "Exception when calling ConversationApi->get_agent_keep_alive: #{e}"
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Parameters
|
|
47
|
+
This endpoint does not need any parameter.
|
|
48
|
+
|
|
49
|
+
### Return type
|
|
50
|
+
|
|
51
|
+
nil (empty response body)
|
|
52
|
+
|
|
53
|
+
### Authorization
|
|
54
|
+
|
|
55
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
56
|
+
|
|
57
|
+
### HTTP request headers
|
|
58
|
+
|
|
59
|
+
- **Content-Type**: application/json
|
|
60
|
+
- **Accept**: application/json
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
18
64
|
# **get_agent_websocket_authorization**
|
|
19
65
|
> ConversationAgentAuthResponse get_agent_websocket_authorization
|
|
20
66
|
|
|
@@ -61,7 +107,7 @@ This endpoint does not need any parameter.
|
|
|
61
107
|
|
|
62
108
|
|
|
63
109
|
# **get_conversation**
|
|
64
|
-
> ConversationResponse get_conversation(conversation_uuid)
|
|
110
|
+
> ConversationResponse get_conversation(conversation_uuid, opts)
|
|
65
111
|
|
|
66
112
|
Retrieve a conversation
|
|
67
113
|
|
|
@@ -79,10 +125,13 @@ api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, fa
|
|
|
79
125
|
|
|
80
126
|
conversation_uuid = 'conversation_uuid_example' # String |
|
|
81
127
|
|
|
128
|
+
opts = {
|
|
129
|
+
limit: 56 # Integer |
|
|
130
|
+
}
|
|
82
131
|
|
|
83
132
|
begin
|
|
84
133
|
#Retrieve a conversation
|
|
85
|
-
result = api_instance.get_conversation(conversation_uuid)
|
|
134
|
+
result = api_instance.get_conversation(conversation_uuid, opts)
|
|
86
135
|
p result
|
|
87
136
|
rescue UltracartClient::ApiError => e
|
|
88
137
|
puts "Exception when calling ConversationApi->get_conversation: #{e}"
|
|
@@ -94,6 +143,7 @@ end
|
|
|
94
143
|
Name | Type | Description | Notes
|
|
95
144
|
------------- | ------------- | ------------- | -------------
|
|
96
145
|
**conversation_uuid** | **String**| |
|
|
146
|
+
**limit** | **Integer**| | [optional]
|
|
97
147
|
|
|
98
148
|
### Return type
|
|
99
149
|
|
|
@@ -110,6 +160,63 @@ Name | Type | Description | Notes
|
|
|
110
160
|
|
|
111
161
|
|
|
112
162
|
|
|
163
|
+
# **get_conversation_messages**
|
|
164
|
+
> ConversationMessagesResponse get_conversation_messages(conversation_uuid, since, opts)
|
|
165
|
+
|
|
166
|
+
Retrieve conversation messages
|
|
167
|
+
|
|
168
|
+
Retrieve conversation messages since a particular time
|
|
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
|
+
conversation_uuid = 'conversation_uuid_example' # String |
|
|
181
|
+
|
|
182
|
+
since = 789 # Integer |
|
|
183
|
+
|
|
184
|
+
opts = {
|
|
185
|
+
limit: 56 # Integer |
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
begin
|
|
189
|
+
#Retrieve conversation messages
|
|
190
|
+
result = api_instance.get_conversation_messages(conversation_uuid, since, opts)
|
|
191
|
+
p result
|
|
192
|
+
rescue UltracartClient::ApiError => e
|
|
193
|
+
puts "Exception when calling ConversationApi->get_conversation_messages: #{e}"
|
|
194
|
+
end
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Parameters
|
|
198
|
+
|
|
199
|
+
Name | Type | Description | Notes
|
|
200
|
+
------------- | ------------- | ------------- | -------------
|
|
201
|
+
**conversation_uuid** | **String**| |
|
|
202
|
+
**since** | **Integer**| |
|
|
203
|
+
**limit** | **Integer**| | [optional]
|
|
204
|
+
|
|
205
|
+
### Return type
|
|
206
|
+
|
|
207
|
+
[**ConversationMessagesResponse**](ConversationMessagesResponse.md)
|
|
208
|
+
|
|
209
|
+
### Authorization
|
|
210
|
+
|
|
211
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
212
|
+
|
|
213
|
+
### HTTP request headers
|
|
214
|
+
|
|
215
|
+
- **Content-Type**: application/json
|
|
216
|
+
- **Accept**: application/json
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
113
220
|
# **get_conversation_multimedia_upload_url**
|
|
114
221
|
> ConversationMultimediaUploadUrlResponse get_conversation_multimedia_upload_url(extension)
|
|
115
222
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# UltracartClient::ConversationMessagesResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**conversation_messages** | [**Array<ConversationMessage>**](ConversationMessage.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
|
+
|
|
@@ -32,6 +32,54 @@ 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, Fixnum, 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 = {}
|
|
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(:GET, 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
|
+
if @api_client.config.debugging
|
|
79
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_agent_keep_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
80
|
+
end
|
|
81
|
+
return data, status_code, headers
|
|
82
|
+
end
|
|
35
83
|
# Get agent websocket authorization
|
|
36
84
|
# Retrieve a JWT to authorize an agent to make a websocket connection.
|
|
37
85
|
# @param [Hash] opts the optional parameters
|
|
@@ -85,6 +133,7 @@ module UltracartClient
|
|
|
85
133
|
# Retrieve a conversation including the participants and messages
|
|
86
134
|
# @param conversation_uuid
|
|
87
135
|
# @param [Hash] opts the optional parameters
|
|
136
|
+
# @option opts [Integer] :limit
|
|
88
137
|
# @return [ConversationResponse]
|
|
89
138
|
def get_conversation(conversation_uuid, opts = {})
|
|
90
139
|
data, _status_code, _headers = get_conversation_with_http_info(conversation_uuid, opts)
|
|
@@ -95,6 +144,7 @@ module UltracartClient
|
|
|
95
144
|
# Retrieve a conversation including the participants and messages
|
|
96
145
|
# @param conversation_uuid
|
|
97
146
|
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @option opts [Integer] :limit
|
|
98
148
|
# @return [Array<(ConversationResponse, Fixnum, Hash)>] ConversationResponse data, response status code and response headers
|
|
99
149
|
def get_conversation_with_http_info(conversation_uuid, opts = {})
|
|
100
150
|
if @api_client.config.debugging
|
|
@@ -109,6 +159,7 @@ module UltracartClient
|
|
|
109
159
|
|
|
110
160
|
# query parameters
|
|
111
161
|
query_params = {}
|
|
162
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
112
163
|
|
|
113
164
|
# header parameters
|
|
114
165
|
header_params = {}
|
|
@@ -136,6 +187,70 @@ module UltracartClient
|
|
|
136
187
|
end
|
|
137
188
|
return data, status_code, headers
|
|
138
189
|
end
|
|
190
|
+
# Retrieve conversation messages
|
|
191
|
+
# Retrieve conversation messages since a particular time
|
|
192
|
+
# @param conversation_uuid
|
|
193
|
+
# @param since
|
|
194
|
+
# @param [Hash] opts the optional parameters
|
|
195
|
+
# @option opts [Integer] :limit
|
|
196
|
+
# @return [ConversationMessagesResponse]
|
|
197
|
+
def get_conversation_messages(conversation_uuid, since, opts = {})
|
|
198
|
+
data, _status_code, _headers = get_conversation_messages_with_http_info(conversation_uuid, since, opts)
|
|
199
|
+
data
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Retrieve conversation messages
|
|
203
|
+
# Retrieve conversation messages since a particular time
|
|
204
|
+
# @param conversation_uuid
|
|
205
|
+
# @param since
|
|
206
|
+
# @param [Hash] opts the optional parameters
|
|
207
|
+
# @option opts [Integer] :limit
|
|
208
|
+
# @return [Array<(ConversationMessagesResponse, Fixnum, Hash)>] ConversationMessagesResponse data, response status code and response headers
|
|
209
|
+
def get_conversation_messages_with_http_info(conversation_uuid, since, opts = {})
|
|
210
|
+
if @api_client.config.debugging
|
|
211
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_messages ...'
|
|
212
|
+
end
|
|
213
|
+
# verify the required parameter 'conversation_uuid' is set
|
|
214
|
+
if @api_client.config.client_side_validation && conversation_uuid.nil?
|
|
215
|
+
fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation_messages"
|
|
216
|
+
end
|
|
217
|
+
# verify the required parameter 'since' is set
|
|
218
|
+
if @api_client.config.client_side_validation && since.nil?
|
|
219
|
+
fail ArgumentError, "Missing the required parameter 'since' when calling ConversationApi.get_conversation_messages"
|
|
220
|
+
end
|
|
221
|
+
# resource path
|
|
222
|
+
local_var_path = '/conversation/conversations/{conversation_uuid}/messages/{since}'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s).sub('{' + 'since' + '}', since.to_s)
|
|
223
|
+
|
|
224
|
+
# query parameters
|
|
225
|
+
query_params = {}
|
|
226
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
227
|
+
|
|
228
|
+
# header parameters
|
|
229
|
+
header_params = {}
|
|
230
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
231
|
+
# HTTP header 'Accept' (if needed)
|
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
233
|
+
# HTTP header 'Content-Type'
|
|
234
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
235
|
+
|
|
236
|
+
# form parameters
|
|
237
|
+
form_params = {}
|
|
238
|
+
|
|
239
|
+
# http body (model)
|
|
240
|
+
post_body = nil
|
|
241
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
242
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
243
|
+
:header_params => header_params,
|
|
244
|
+
:query_params => query_params,
|
|
245
|
+
:form_params => form_params,
|
|
246
|
+
:body => post_body,
|
|
247
|
+
:auth_names => auth_names,
|
|
248
|
+
:return_type => 'ConversationMessagesResponse')
|
|
249
|
+
if @api_client.config.debugging
|
|
250
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_conversation_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
251
|
+
end
|
|
252
|
+
return data, status_code, headers
|
|
253
|
+
end
|
|
139
254
|
# Get a presigned conersation multimedia upload URL
|
|
140
255
|
# Get a presigned conersation multimedia upload URL
|
|
141
256
|
# @param extension
|
|
@@ -0,0 +1,223 @@
|
|
|
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 ConversationMessagesResponse
|
|
17
|
+
attr_accessor :conversation_messages
|
|
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
|
+
:'conversation_messages' => :'conversation_messages',
|
|
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
|
+
:'conversation_messages' => :'Array<ConversationMessage>',
|
|
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?(:'conversation_messages')
|
|
59
|
+
if (value = attributes[:'conversation_messages']).is_a?(Array)
|
|
60
|
+
self.conversation_messages = value
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
if attributes.has_key?(:'error')
|
|
65
|
+
self.error = attributes[:'error']
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
if attributes.has_key?(:'metadata')
|
|
69
|
+
self.metadata = attributes[:'metadata']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.has_key?(:'success')
|
|
73
|
+
self.success = attributes[:'success']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.has_key?(:'warning')
|
|
77
|
+
self.warning = attributes[:'warning']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
conversation_messages == o.conversation_messages &&
|
|
100
|
+
error == o.error &&
|
|
101
|
+
metadata == o.metadata &&
|
|
102
|
+
success == o.success &&
|
|
103
|
+
warning == o.warning
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def eql?(o)
|
|
109
|
+
self == o
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Fixnum] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[conversation_messages, error, metadata, success, warning].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
124
|
+
if type =~ /\AArray<(.*)>/i
|
|
125
|
+
# check to ensure the input is an array given that the attribute
|
|
126
|
+
# is documented as an array but the input is not
|
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
129
|
+
end
|
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
self
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Deserializes the data based on type
|
|
139
|
+
# @param string type Data type
|
|
140
|
+
# @param string value Value to be deserialized
|
|
141
|
+
# @return [Object] Deserialized data
|
|
142
|
+
def _deserialize(type, value)
|
|
143
|
+
case type.to_sym
|
|
144
|
+
when :DateTime
|
|
145
|
+
DateTime.parse(value)
|
|
146
|
+
when :Date
|
|
147
|
+
Date.parse(value)
|
|
148
|
+
when :String
|
|
149
|
+
value.to_s
|
|
150
|
+
when :Integer
|
|
151
|
+
value.to_i
|
|
152
|
+
when :Float
|
|
153
|
+
value.to_f
|
|
154
|
+
when :BOOLEAN
|
|
155
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
156
|
+
true
|
|
157
|
+
else
|
|
158
|
+
false
|
|
159
|
+
end
|
|
160
|
+
when :Object
|
|
161
|
+
# generic object (usually a Hash), return directly
|
|
162
|
+
value
|
|
163
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
164
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
165
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
166
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
167
|
+
k_type = Regexp.last_match[:k_type]
|
|
168
|
+
v_type = Regexp.last_match[:v_type]
|
|
169
|
+
{}.tap do |hash|
|
|
170
|
+
value.each do |k, v|
|
|
171
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
else # model
|
|
175
|
+
temp_model = UltracartClient.const_get(type).new
|
|
176
|
+
temp_model.build_from_hash(value)
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Returns the string representation of the object
|
|
181
|
+
# @return [String] String presentation of the object
|
|
182
|
+
def to_s
|
|
183
|
+
to_hash.to_s
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_body
|
|
189
|
+
to_hash
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the object in the form of hash
|
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
|
194
|
+
def to_hash
|
|
195
|
+
hash = {}
|
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
197
|
+
value = self.send(attr)
|
|
198
|
+
next if value.nil?
|
|
199
|
+
hash[param] = _to_hash(value)
|
|
200
|
+
end
|
|
201
|
+
hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Outputs non-array value in the form of hash
|
|
205
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
206
|
+
# @param [Object] value Any valid value
|
|
207
|
+
# @return [Hash] Returns the value in the form of hash
|
|
208
|
+
def _to_hash(value)
|
|
209
|
+
if value.is_a?(Array)
|
|
210
|
+
value.compact.map { |v| _to_hash(v) }
|
|
211
|
+
elsif value.is_a?(Hash)
|
|
212
|
+
{}.tap do |hash|
|
|
213
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
214
|
+
end
|
|
215
|
+
elsif value.respond_to? :to_hash
|
|
216
|
+
value.to_hash
|
|
217
|
+
else
|
|
218
|
+
value
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
|
223
|
+
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: 3.10.
|
|
4
|
+
version: 3.10.47
|
|
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
|
|
@@ -353,6 +353,7 @@ files:
|
|
|
353
353
|
- docs/ConversationEventTyping.md
|
|
354
354
|
- docs/ConversationMessage.md
|
|
355
355
|
- docs/ConversationMessageTransportStatus.md
|
|
356
|
+
- docs/ConversationMessagesResponse.md
|
|
356
357
|
- docs/ConversationMultimediaUploadUrl.md
|
|
357
358
|
- docs/ConversationMultimediaUploadUrlResponse.md
|
|
358
359
|
- docs/ConversationParticipant.md
|
|
@@ -1059,6 +1060,7 @@ files:
|
|
|
1059
1060
|
- lib/ultracart_api/models/conversation_event_typing.rb
|
|
1060
1061
|
- lib/ultracart_api/models/conversation_message.rb
|
|
1061
1062
|
- lib/ultracart_api/models/conversation_message_transport_status.rb
|
|
1063
|
+
- lib/ultracart_api/models/conversation_messages_response.rb
|
|
1062
1064
|
- lib/ultracart_api/models/conversation_multimedia_upload_url.rb
|
|
1063
1065
|
- lib/ultracart_api/models/conversation_multimedia_upload_url_response.rb
|
|
1064
1066
|
- lib/ultracart_api/models/conversation_participant.rb
|