ultracart_api 4.0.85.rc → 4.0.86.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 +11 -4
- data/docs/ConversationApi.md +72 -0
- data/docs/ConversationWebchatContext.md +26 -0
- data/docs/HitPageView.md +38 -0
- data/docs/HitPageViewMetaData.md +20 -0
- data/docs/HitSessionStart.md +50 -0
- data/docs/HitSessionUtm.md +46 -0
- data/lib/ultracart_api/api/conversation_api.rb +64 -0
- data/lib/ultracart_api/models/conversation_webchat_context.rb +257 -0
- data/lib/ultracart_api/models/conversation_websocket_message.rb +2 -2
- data/lib/ultracart_api/models/hit_page_view.rb +311 -0
- data/lib/ultracart_api/models/hit_page_view_meta_data.rb +228 -0
- data/lib/ultracart_api/models/hit_session_start.rb +363 -0
- data/lib/ultracart_api/models/hit_session_utm.rb +345 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -0
- metadata +11 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2616012b176378834c3507a43f196c35dcb6bbcd99c31645e4d5a26912bd908b
|
4
|
+
data.tar.gz: 708a2a56046daa1abc7883f683761dc6737f7a852d00b671f52919d13407e19f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efb9efc5ad1a28fadbecbec39403dd2534b7843cf1e7311e05adb02d0a2f32bd5cd5356318b9d4ff4b2824fab69b5d732037ac848a6d33255ae8f936e4c8244d
|
7
|
+
data.tar.gz: fe65f23e2eb6278eeab172d55123441465f16e814156bd584672909bf512033980075ebcc69c31b111b577bdd4ce61252d7a7821343dadec2064c23828e62615
|
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.86.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.86.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.86.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.86.rc'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -134,6 +134,7 @@ Class | Method | HTTP request | Description
|
|
134
134
|
*UltracartClient::ConversationApi* | [**get_agent_keep_alive**](docs/ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive
|
135
135
|
*UltracartClient::ConversationApi* | [**get_agent_websocket_authorization**](docs/ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization
|
136
136
|
*UltracartClient::ConversationApi* | [**get_conversation**](docs/ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
|
137
|
+
*UltracartClient::ConversationApi* | [**get_conversation_context**](docs/ConversationApi.md#get_conversation_context) | **PUT** /conversation/conversations/{conversation_uuid}/context | Get a webchat conversation context
|
137
138
|
*UltracartClient::ConversationApi* | [**get_conversation_messages**](docs/ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages
|
138
139
|
*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
|
139
140
|
*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
|
@@ -606,6 +607,7 @@ Class | Method | HTTP request | Description
|
|
606
607
|
- [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
|
607
608
|
- [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
|
608
609
|
- [UltracartClient::ConversationTwilioAccount](docs/ConversationTwilioAccount.md)
|
610
|
+
- [UltracartClient::ConversationWebchatContext](docs/ConversationWebchatContext.md)
|
609
611
|
- [UltracartClient::ConversationWebchatQueueStatus](docs/ConversationWebchatQueueStatus.md)
|
610
612
|
- [UltracartClient::ConversationWebchatQueueStatusAgent](docs/ConversationWebchatQueueStatusAgent.md)
|
611
613
|
- [UltracartClient::ConversationWebchatQueueStatusQueueEntry](docs/ConversationWebchatQueueStatusQueueEntry.md)
|
@@ -858,6 +860,10 @@ Class | Method | HTTP request | Description
|
|
858
860
|
- [UltracartClient::GroupUserMembership](docs/GroupUserMembership.md)
|
859
861
|
- [UltracartClient::GroupsResponse](docs/GroupsResponse.md)
|
860
862
|
- [UltracartClient::HTTPHeader](docs/HTTPHeader.md)
|
863
|
+
- [UltracartClient::HitPageView](docs/HitPageView.md)
|
864
|
+
- [UltracartClient::HitPageViewMetaData](docs/HitPageViewMetaData.md)
|
865
|
+
- [UltracartClient::HitSessionStart](docs/HitSessionStart.md)
|
866
|
+
- [UltracartClient::HitSessionUtm](docs/HitSessionUtm.md)
|
861
867
|
- [UltracartClient::IntegrationLog](docs/IntegrationLog.md)
|
862
868
|
- [UltracartClient::IntegrationLogFile](docs/IntegrationLogFile.md)
|
863
869
|
- [UltracartClient::IntegrationLogLog](docs/IntegrationLogLog.md)
|
@@ -1227,6 +1233,7 @@ Not every change is committed to every SDK.
|
|
1227
1233
|
|
1228
1234
|
| Version | Date | Comments |
|
1229
1235
|
| --: | :-: | --- |
|
1236
|
+
| 4.0.86-RC | 11/21/2022 | conversation context method |
|
1230
1237
|
| 4.0.85-RC | 11/21/2022 | adjusted conversation event model |
|
1231
1238
|
| 4.0.84-RC | 11/15/2022 | conversation methods bug fix |
|
1232
1239
|
| 4.0.83-RC | 11/15/2022 | conversations - enw events for add coupon and items |
|
data/docs/ConversationApi.md
CHANGED
@@ -7,6 +7,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
7
7
|
| [**get_agent_keep_alive**](ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive |
|
8
8
|
| [**get_agent_websocket_authorization**](ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization |
|
9
9
|
| [**get_conversation**](ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation |
|
10
|
+
| [**get_conversation_context**](ConversationApi.md#get_conversation_context) | **PUT** /conversation/conversations/{conversation_uuid}/context | Get a webchat conversation context |
|
10
11
|
| [**get_conversation_messages**](ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages |
|
11
12
|
| [**get_conversation_multimedia_upload_url**](ConversationApi.md#get_conversation_multimedia_upload_url) | **GET** /conversation/upload_url/{extension} | Get a presigned conersation multimedia upload URL |
|
12
13
|
| [**get_conversation_webchat_queue_statuses**](ConversationApi.md#get_conversation_webchat_queue_statuses) | **GET** /conversation/conversations/queues/statuses | Retrieve a conversation webchat queue statuses |
|
@@ -227,6 +228,77 @@ end
|
|
227
228
|
- **Accept**: application/json
|
228
229
|
|
229
230
|
|
231
|
+
## get_conversation_context
|
232
|
+
|
233
|
+
> <ConversationWebchatContext> get_conversation_context(conversation_uuid)
|
234
|
+
|
235
|
+
Get a webchat conversation context
|
236
|
+
|
237
|
+
Get a webchat conversation context
|
238
|
+
|
239
|
+
### Examples
|
240
|
+
|
241
|
+
```ruby
|
242
|
+
require 'time'
|
243
|
+
require 'ultracart_api'
|
244
|
+
require 'json'
|
245
|
+
require 'yaml'
|
246
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
247
|
+
|
248
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
249
|
+
# As such, this might not be the best way to use this object.
|
250
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
251
|
+
|
252
|
+
api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
253
|
+
conversation_uuid = 'conversation_uuid_example' # String |
|
254
|
+
|
255
|
+
begin
|
256
|
+
# Get a webchat conversation context
|
257
|
+
result = api_instance.get_conversation_context(conversation_uuid)
|
258
|
+
p result
|
259
|
+
rescue UltracartClient::ApiError => e
|
260
|
+
puts "Error when calling ConversationApi->get_conversation_context: #{e}"
|
261
|
+
end
|
262
|
+
```
|
263
|
+
|
264
|
+
#### Using the get_conversation_context_with_http_info variant
|
265
|
+
|
266
|
+
This returns an Array which contains the response data, status code and headers.
|
267
|
+
|
268
|
+
> <Array(<ConversationWebchatContext>, Integer, Hash)> get_conversation_context_with_http_info(conversation_uuid)
|
269
|
+
|
270
|
+
```ruby
|
271
|
+
begin
|
272
|
+
# Get a webchat conversation context
|
273
|
+
data, status_code, headers = api_instance.get_conversation_context_with_http_info(conversation_uuid)
|
274
|
+
p status_code # => 2xx
|
275
|
+
p headers # => { ... }
|
276
|
+
p data # => <ConversationWebchatContext>
|
277
|
+
rescue UltracartClient::ApiError => e
|
278
|
+
puts "Error when calling ConversationApi->get_conversation_context_with_http_info: #{e}"
|
279
|
+
end
|
280
|
+
```
|
281
|
+
|
282
|
+
### Parameters
|
283
|
+
|
284
|
+
| Name | Type | Description | Notes |
|
285
|
+
| ---- | ---- | ----------- | ----- |
|
286
|
+
| **conversation_uuid** | **String** | | |
|
287
|
+
|
288
|
+
### Return type
|
289
|
+
|
290
|
+
[**ConversationWebchatContext**](ConversationWebchatContext.md)
|
291
|
+
|
292
|
+
### Authorization
|
293
|
+
|
294
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
295
|
+
|
296
|
+
### HTTP request headers
|
297
|
+
|
298
|
+
- **Content-Type**: Not defined
|
299
|
+
- **Accept**: application/json
|
300
|
+
|
301
|
+
|
230
302
|
## get_conversation_messages
|
231
303
|
|
232
304
|
> <ConversationMessagesResponse> get_conversation_messages(conversation_uuid, since, opts)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# UltracartClient::ConversationWebchatContext
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **cart** | [**Cart**](Cart.md) | | [optional] |
|
8
|
+
| **current_url** | **String** | | [optional] |
|
9
|
+
| **page_view** | [**Array<HitPageView>**](HitPageView.md) | | [optional] |
|
10
|
+
| **session_start** | [**HitSessionStart**](HitSessionStart.md) | | [optional] |
|
11
|
+
| **session_utm** | [**HitSessionUtm**](HitSessionUtm.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'ultracart_api'
|
17
|
+
|
18
|
+
instance = UltracartClient::ConversationWebchatContext.new(
|
19
|
+
cart: null,
|
20
|
+
current_url: null,
|
21
|
+
page_view: null,
|
22
|
+
session_start: null,
|
23
|
+
session_utm: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
data/docs/HitPageView.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# UltracartClient::HitPageView
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **bounce** | **Boolean** | | [optional] |
|
8
|
+
| **meta_data** | [**Array<HitPageViewMetaData>**](HitPageViewMetaData.md) | | [optional] |
|
9
|
+
| **method** | **String** | | [optional] |
|
10
|
+
| **prefetch** | **Boolean** | | [optional] |
|
11
|
+
| **query** | **String** | | [optional] |
|
12
|
+
| **recording** | **Boolean** | | [optional] |
|
13
|
+
| **redirect** | **Boolean** | | [optional] |
|
14
|
+
| **referrer** | **String** | | [optional] |
|
15
|
+
| **time_on_page** | **Float** | | [optional] |
|
16
|
+
| **title** | **String** | | [optional] |
|
17
|
+
| **url** | **String** | | [optional] |
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'ultracart_api'
|
23
|
+
|
24
|
+
instance = UltracartClient::HitPageView.new(
|
25
|
+
bounce: null,
|
26
|
+
meta_data: null,
|
27
|
+
method: null,
|
28
|
+
prefetch: null,
|
29
|
+
query: null,
|
30
|
+
recording: null,
|
31
|
+
redirect: null,
|
32
|
+
referrer: null,
|
33
|
+
time_on_page: null,
|
34
|
+
title: null,
|
35
|
+
url: null
|
36
|
+
)
|
37
|
+
```
|
38
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# UltracartClient::HitPageViewMetaData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **key** | **String** | | [optional] |
|
8
|
+
| **value** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ultracart_api'
|
14
|
+
|
15
|
+
instance = UltracartClient::HitPageViewMetaData.new(
|
16
|
+
key: null,
|
17
|
+
value: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# UltracartClient::HitSessionStart
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **bot** | **Boolean** | | [optional] |
|
8
|
+
| **bounce** | **Boolean** | | [optional] |
|
9
|
+
| **channel** | **String** | | [optional] |
|
10
|
+
| **device_switch_detected** | **Boolean** | | [optional] |
|
11
|
+
| **fake_bot** | **Boolean** | | [optional] |
|
12
|
+
| **geolocation_country** | **String** | | [optional] |
|
13
|
+
| **geolocation_latitude** | **Float** | | [optional] |
|
14
|
+
| **geolocation_longitude** | **Float** | | [optional] |
|
15
|
+
| **geolocation_province** | **String** | | [optional] |
|
16
|
+
| **no_cookie_support** | **Boolean** | | [optional] |
|
17
|
+
| **prefetch** | **Boolean** | | [optional] |
|
18
|
+
| **referrer** | **String** | | [optional] |
|
19
|
+
| **screen_height** | **Integer** | | [optional] |
|
20
|
+
| **screen_width** | **Integer** | | [optional] |
|
21
|
+
| **time_on_site** | **Float** | | [optional] |
|
22
|
+
| **user_agent** | **String** | | [optional] |
|
23
|
+
| **user_ip** | **String** | | [optional] |
|
24
|
+
|
25
|
+
## Example
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
require 'ultracart_api'
|
29
|
+
|
30
|
+
instance = UltracartClient::HitSessionStart.new(
|
31
|
+
bot: null,
|
32
|
+
bounce: null,
|
33
|
+
channel: null,
|
34
|
+
device_switch_detected: null,
|
35
|
+
fake_bot: null,
|
36
|
+
geolocation_country: null,
|
37
|
+
geolocation_latitude: null,
|
38
|
+
geolocation_longitude: null,
|
39
|
+
geolocation_province: null,
|
40
|
+
no_cookie_support: null,
|
41
|
+
prefetch: null,
|
42
|
+
referrer: null,
|
43
|
+
screen_height: null,
|
44
|
+
screen_width: null,
|
45
|
+
time_on_site: null,
|
46
|
+
user_agent: null,
|
47
|
+
user_ip: null
|
48
|
+
)
|
49
|
+
```
|
50
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# UltracartClient::HitSessionUtm
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **fb_ad_id** | **String** | | [optional] |
|
8
|
+
| **fbclid** | **String** | | [optional] |
|
9
|
+
| **gbraid** | **String** | | [optional] |
|
10
|
+
| **gclid** | **String** | | [optional] |
|
11
|
+
| **msclkid** | **String** | | [optional] |
|
12
|
+
| **ttclid** | **String** | | [optional] |
|
13
|
+
| **uc_message_id** | **String** | | [optional] |
|
14
|
+
| **utm_campaign** | **String** | | [optional] |
|
15
|
+
| **utm_content** | **String** | | [optional] |
|
16
|
+
| **utm_id** | **String** | | [optional] |
|
17
|
+
| **utm_medium** | **String** | | [optional] |
|
18
|
+
| **utm_source** | **String** | | [optional] |
|
19
|
+
| **utm_term** | **String** | | [optional] |
|
20
|
+
| **vmcid** | **String** | | [optional] |
|
21
|
+
| **wbraid** | **String** | | [optional] |
|
22
|
+
|
23
|
+
## Example
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'ultracart_api'
|
27
|
+
|
28
|
+
instance = UltracartClient::HitSessionUtm.new(
|
29
|
+
fb_ad_id: null,
|
30
|
+
fbclid: null,
|
31
|
+
gbraid: null,
|
32
|
+
gclid: null,
|
33
|
+
msclkid: null,
|
34
|
+
ttclid: null,
|
35
|
+
uc_message_id: null,
|
36
|
+
utm_campaign: null,
|
37
|
+
utm_content: null,
|
38
|
+
utm_id: null,
|
39
|
+
utm_medium: null,
|
40
|
+
utm_source: null,
|
41
|
+
utm_term: null,
|
42
|
+
vmcid: null,
|
43
|
+
wbraid: null
|
44
|
+
)
|
45
|
+
```
|
46
|
+
|
@@ -215,6 +215,70 @@ module UltracartClient
|
|
215
215
|
return data, status_code, headers
|
216
216
|
end
|
217
217
|
|
218
|
+
# Get a webchat conversation context
|
219
|
+
# Get a webchat conversation context
|
220
|
+
# @param conversation_uuid [String]
|
221
|
+
# @param [Hash] opts the optional parameters
|
222
|
+
# @return [ConversationWebchatContext]
|
223
|
+
def get_conversation_context(conversation_uuid, opts = {})
|
224
|
+
data, _status_code, _headers = get_conversation_context_with_http_info(conversation_uuid, opts)
|
225
|
+
data
|
226
|
+
end
|
227
|
+
|
228
|
+
# Get a webchat conversation context
|
229
|
+
# Get a webchat conversation context
|
230
|
+
# @param conversation_uuid [String]
|
231
|
+
# @param [Hash] opts the optional parameters
|
232
|
+
# @return [Array<(ConversationWebchatContext, Integer, Hash)>] ConversationWebchatContext data, response status code and response headers
|
233
|
+
def get_conversation_context_with_http_info(conversation_uuid, opts = {})
|
234
|
+
if @api_client.config.debugging
|
235
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_context ...'
|
236
|
+
end
|
237
|
+
# verify the required parameter 'conversation_uuid' is set
|
238
|
+
if @api_client.config.client_side_validation && conversation_uuid.nil?
|
239
|
+
fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation_context"
|
240
|
+
end
|
241
|
+
# resource path
|
242
|
+
local_var_path = '/conversation/conversations/{conversation_uuid}/context'.sub('{' + 'conversation_uuid' + '}', CGI.escape(conversation_uuid.to_s))
|
243
|
+
|
244
|
+
# query parameters
|
245
|
+
query_params = opts[:query_params] || {}
|
246
|
+
|
247
|
+
# header parameters
|
248
|
+
header_params = opts[:header_params] || {}
|
249
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
250
|
+
# HTTP header 'Accept' (if needed)
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
252
|
+
|
253
|
+
# form parameters
|
254
|
+
form_params = opts[:form_params] || {}
|
255
|
+
|
256
|
+
# http body (model)
|
257
|
+
post_body = opts[:debug_body]
|
258
|
+
|
259
|
+
# return_type
|
260
|
+
return_type = opts[:debug_return_type] || 'ConversationWebchatContext'
|
261
|
+
|
262
|
+
# auth_names
|
263
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
264
|
+
|
265
|
+
new_options = opts.merge(
|
266
|
+
:operation => :"ConversationApi.get_conversation_context",
|
267
|
+
:header_params => header_params,
|
268
|
+
:query_params => query_params,
|
269
|
+
:form_params => form_params,
|
270
|
+
:body => post_body,
|
271
|
+
:auth_names => auth_names,
|
272
|
+
:return_type => return_type
|
273
|
+
)
|
274
|
+
|
275
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_conversation_context\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
278
|
+
end
|
279
|
+
return data, status_code, headers
|
280
|
+
end
|
281
|
+
|
218
282
|
# Retrieve conversation messages
|
219
283
|
# Retrieve conversation messages since a particular time
|
220
284
|
# @param conversation_uuid [String]
|
@@ -0,0 +1,257 @@
|
|
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 ConversationWebchatContext
|
18
|
+
attr_accessor :cart
|
19
|
+
|
20
|
+
attr_accessor :current_url
|
21
|
+
|
22
|
+
attr_accessor :page_view
|
23
|
+
|
24
|
+
attr_accessor :session_start
|
25
|
+
|
26
|
+
attr_accessor :session_utm
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'cart' => :'cart',
|
32
|
+
:'current_url' => :'current_url',
|
33
|
+
:'page_view' => :'page_view',
|
34
|
+
:'session_start' => :'session_start',
|
35
|
+
:'session_utm' => :'session_utm'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Returns all the JSON keys this model knows about
|
40
|
+
def self.acceptable_attributes
|
41
|
+
attribute_map.values
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'cart' => :'Cart',
|
48
|
+
:'current_url' => :'String',
|
49
|
+
:'page_view' => :'Array<HitPageView>',
|
50
|
+
:'session_start' => :'HitSessionStart',
|
51
|
+
:'session_utm' => :'HitSessionUtm'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationWebchatContext` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationWebchatContext`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
75
|
+
|
76
|
+
if attributes.key?(:'cart')
|
77
|
+
self.cart = attributes[:'cart']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'current_url')
|
81
|
+
self.current_url = attributes[:'current_url']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'page_view')
|
85
|
+
if (value = attributes[:'page_view']).is_a?(Array)
|
86
|
+
self.page_view = value
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'session_start')
|
91
|
+
self.session_start = attributes[:'session_start']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'session_utm')
|
95
|
+
self.session_utm = attributes[:'session_utm']
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
100
|
+
# @return Array for valid properties with the reasons
|
101
|
+
def list_invalid_properties
|
102
|
+
invalid_properties = Array.new
|
103
|
+
invalid_properties
|
104
|
+
end
|
105
|
+
|
106
|
+
# Check to see if the all the properties in the model are valid
|
107
|
+
# @return true if the model is valid
|
108
|
+
def valid?
|
109
|
+
true
|
110
|
+
end
|
111
|
+
|
112
|
+
# Checks equality by comparing each attribute.
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def ==(o)
|
115
|
+
return true if self.equal?(o)
|
116
|
+
self.class == o.class &&
|
117
|
+
cart == o.cart &&
|
118
|
+
current_url == o.current_url &&
|
119
|
+
page_view == o.page_view &&
|
120
|
+
session_start == o.session_start &&
|
121
|
+
session_utm == o.session_utm
|
122
|
+
end
|
123
|
+
|
124
|
+
# @see the `==` method
|
125
|
+
# @param [Object] Object to be compared
|
126
|
+
def eql?(o)
|
127
|
+
self == o
|
128
|
+
end
|
129
|
+
|
130
|
+
# Calculates hash code according to all attributes.
|
131
|
+
# @return [Integer] Hash code
|
132
|
+
def hash
|
133
|
+
[cart, current_url, page_view, session_start, session_utm].hash
|
134
|
+
end
|
135
|
+
|
136
|
+
# Builds the object from hash
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
+
# @return [Object] Returns the model itself
|
139
|
+
def self.build_from_hash(attributes)
|
140
|
+
new.build_from_hash(attributes)
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def build_from_hash(attributes)
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
149
|
+
self.class.openapi_types.each_pair do |key, type|
|
150
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
151
|
+
self.send("#{key}=", nil)
|
152
|
+
elsif type =~ /\AArray<(.*)>/i
|
153
|
+
# check to ensure the input is an array given that the attribute
|
154
|
+
# is documented as an array but the input is not
|
155
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
156
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
157
|
+
end
|
158
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
159
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
self
|
164
|
+
end
|
165
|
+
|
166
|
+
# Deserializes the data based on type
|
167
|
+
# @param string type Data type
|
168
|
+
# @param string value Value to be deserialized
|
169
|
+
# @return [Object] Deserialized data
|
170
|
+
def _deserialize(type, value)
|
171
|
+
case type.to_sym
|
172
|
+
when :Time
|
173
|
+
Time.parse(value)
|
174
|
+
when :Date
|
175
|
+
Date.parse(value)
|
176
|
+
when :String
|
177
|
+
value.to_s
|
178
|
+
when :Integer
|
179
|
+
value.to_i
|
180
|
+
when :Float
|
181
|
+
value.to_f
|
182
|
+
when :Boolean
|
183
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
184
|
+
true
|
185
|
+
else
|
186
|
+
false
|
187
|
+
end
|
188
|
+
when :Object
|
189
|
+
# generic object (usually a Hash), return directly
|
190
|
+
value
|
191
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
192
|
+
inner_type = Regexp.last_match[:inner_type]
|
193
|
+
value.map { |v| _deserialize(inner_type, v) }
|
194
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
195
|
+
k_type = Regexp.last_match[:k_type]
|
196
|
+
v_type = Regexp.last_match[:v_type]
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each do |k, v|
|
199
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
else # model
|
203
|
+
# models (e.g. Pet) or oneOf
|
204
|
+
klass = UltracartClient.const_get(type)
|
205
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
# Returns the string representation of the object
|
210
|
+
# @return [String] String presentation of the object
|
211
|
+
def to_s
|
212
|
+
to_hash.to_s
|
213
|
+
end
|
214
|
+
|
215
|
+
# to_body is an alias to to_hash (backward compatibility)
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_body
|
218
|
+
to_hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Returns the object in the form of hash
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
223
|
+
def to_hash
|
224
|
+
hash = {}
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
226
|
+
value = self.send(attr)
|
227
|
+
if value.nil?
|
228
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
229
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
230
|
+
end
|
231
|
+
|
232
|
+
hash[param] = _to_hash(value)
|
233
|
+
end
|
234
|
+
hash
|
235
|
+
end
|
236
|
+
|
237
|
+
# Outputs non-array value in the form of hash
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
239
|
+
# @param [Object] value Any valid value
|
240
|
+
# @return [Hash] Returns the value in the form of hash
|
241
|
+
def _to_hash(value)
|
242
|
+
if value.is_a?(Array)
|
243
|
+
value.compact.map { |v| _to_hash(v) }
|
244
|
+
elsif value.is_a?(Hash)
|
245
|
+
{}.tap do |hash|
|
246
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
247
|
+
end
|
248
|
+
elsif value.respond_to? :to_hash
|
249
|
+
value.to_hash
|
250
|
+
else
|
251
|
+
value
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|