ultracart_api 3.10.68 → 3.10.69

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee1778c270b95f8ac3103b2cda7313d65885871e6b83100cc44b3e84dc6ad0be
4
- data.tar.gz: a5ee2f282c48dc7532bfccff0153b7de9eeb455ec9983011a7ffa87dd25c5b96
3
+ metadata.gz: 1103c12b7948ddc60c291a1c814afd77b21e766db291075521acc3ec6a424a92
4
+ data.tar.gz: 5290aa17302e832dcbdf2c711f66b326a65a90c67878b93d597e950bd98b76b2
5
5
  SHA512:
6
- metadata.gz: fd4ff25edbdc4d42e9f53a8d66a9aa10bd7a96bb4d1fbe0a6bfdd4184a720b2fccf94645f32d13278af9ead712b7aa01454cdcc9c850f8fb3618e8e4ff5a1fe2
7
- data.tar.gz: c05d46142890fc1bed0eedeaaff9464869f2743f5f95a0f7ec0913d8d93463b0e77ad8c6475660fabada608c912e8cfe2489f897fe74f66b804fd87011cb5b7e
6
+ metadata.gz: 4bf2a66e41e019c7ddcb4af1633fd8ccfca0bfad8d1dd4cde816daa1c59ae2215b35a9b6c203524054b0b5d1cfd9365617fcfcf2f9cf158dc751abf7542d3f81
7
+ data.tar.gz: 6185b32a541b629ac87e3acd94a398ef485aab0e4769dd423a9a0dcea8dea2aec58b73a7857e17dc1a91d7940c324a4059899102a5d62832cbd5d0e53ba74527
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.68
10
+ - Package version: 3.10.69
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.68.gem
27
+ gem install ./ultracart_api-3.10.69.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.68.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.69.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.68'
35
+ gem 'ultracart_api', '~> 3.10.69'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -128,6 +128,7 @@ Class | Method | HTTP request | Description
128
128
  *UltracartClient::ConversationApi* | [**get_agent_keep_alive**](docs/ConversationApi.md#get_agent_keep_alive) | **GET** /conversation/agent/keepalive | Agent keep alive
129
129
  *UltracartClient::ConversationApi* | [**get_agent_websocket_authorization**](docs/ConversationApi.md#get_agent_websocket_authorization) | **PUT** /conversation/agent/auth | Get agent websocket authorization
130
130
  *UltracartClient::ConversationApi* | [**get_conversation**](docs/ConversationApi.md#get_conversation) | **GET** /conversation/conversations/{conversation_uuid} | Retrieve a conversation
131
+ *UltracartClient::ConversationApi* | [**get_conversation_context**](docs/ConversationApi.md#get_conversation_context) | **PUT** /conversation/conversations/{conversation_uuid}/context | Get a webchat conversation context
131
132
  *UltracartClient::ConversationApi* | [**get_conversation_messages**](docs/ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages
132
133
  *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
133
134
  *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
@@ -600,6 +601,7 @@ Class | Method | HTTP request | Description
600
601
  - [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
601
602
  - [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
602
603
  - [UltracartClient::ConversationTwilioAccount](docs/ConversationTwilioAccount.md)
604
+ - [UltracartClient::ConversationWebchatContext](docs/ConversationWebchatContext.md)
603
605
  - [UltracartClient::ConversationWebchatQueueStatus](docs/ConversationWebchatQueueStatus.md)
604
606
  - [UltracartClient::ConversationWebchatQueueStatusAgent](docs/ConversationWebchatQueueStatusAgent.md)
605
607
  - [UltracartClient::ConversationWebchatQueueStatusQueueEntry](docs/ConversationWebchatQueueStatusQueueEntry.md)
@@ -852,6 +854,10 @@ Class | Method | HTTP request | Description
852
854
  - [UltracartClient::GroupUserMembership](docs/GroupUserMembership.md)
853
855
  - [UltracartClient::GroupsResponse](docs/GroupsResponse.md)
854
856
  - [UltracartClient::HTTPHeader](docs/HTTPHeader.md)
857
+ - [UltracartClient::HitPageView](docs/HitPageView.md)
858
+ - [UltracartClient::HitPageViewMetaData](docs/HitPageViewMetaData.md)
859
+ - [UltracartClient::HitSessionStart](docs/HitSessionStart.md)
860
+ - [UltracartClient::HitSessionUtm](docs/HitSessionUtm.md)
855
861
  - [UltracartClient::IntegrationLog](docs/IntegrationLog.md)
856
862
  - [UltracartClient::IntegrationLogFile](docs/IntegrationLogFile.md)
857
863
  - [UltracartClient::IntegrationLogLog](docs/IntegrationLogLog.md)
@@ -1218,6 +1224,7 @@ Not every change is committed to every SDK.
1218
1224
 
1219
1225
  | Version | Date | Comments |
1220
1226
  | --: | :-: | --- |
1227
+ | 3.10.69 | 11/21/2022 | conversation context method |
1221
1228
  | 3.10.68 | 11/21/2022 | adjusted conversation event model |
1222
1229
  | 3.10.67 | 11/15/2022 | conversation methods bug fix |
1223
1230
  | 3.10.66 | 11/15/2022 | conversations - enw events for add coupon and items |
@@ -7,6 +7,7 @@ Method | HTTP request | Description
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
@@ -160,6 +161,56 @@ Name | Type | Description | Notes
160
161
 
161
162
 
162
163
 
164
+ # **get_conversation_context**
165
+ > ConversationWebchatContext get_conversation_context(conversation_uuid)
166
+
167
+ Get a webchat conversation context
168
+
169
+ Get a webchat conversation context
170
+
171
+ ### Example
172
+ ```ruby
173
+ # load the gem
174
+ require 'ultracart_api'
175
+
176
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
177
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
178
+ api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
179
+
180
+
181
+ conversation_uuid = 'conversation_uuid_example' # String |
182
+
183
+
184
+ begin
185
+ #Get a webchat conversation context
186
+ result = api_instance.get_conversation_context(conversation_uuid)
187
+ p result
188
+ rescue UltracartClient::ApiError => e
189
+ puts "Exception when calling ConversationApi->get_conversation_context: #{e}"
190
+ end
191
+ ```
192
+
193
+ ### Parameters
194
+
195
+ Name | Type | Description | Notes
196
+ ------------- | ------------- | ------------- | -------------
197
+ **conversation_uuid** | **String**| |
198
+
199
+ ### Return type
200
+
201
+ [**ConversationWebchatContext**](ConversationWebchatContext.md)
202
+
203
+ ### Authorization
204
+
205
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
206
+
207
+ ### HTTP request headers
208
+
209
+ - **Content-Type**: application/json
210
+ - **Accept**: application/json
211
+
212
+
213
+
163
214
  # **get_conversation_messages**
164
215
  > ConversationMessagesResponse get_conversation_messages(conversation_uuid, since, opts)
165
216
 
@@ -0,0 +1,12 @@
1
+ # UltracartClient::ConversationWebchatContext
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **cart** | [**Cart**](Cart.md) | | [optional]
7
+ **current_url** | **String** | | [optional]
8
+ **page_view** | [**Array<HitPageView>**](HitPageView.md) | | [optional]
9
+ **session_start** | [**HitSessionStart**](HitSessionStart.md) | | [optional]
10
+ **session_utm** | [**HitSessionUtm**](HitSessionUtm.md) | | [optional]
11
+
12
+
@@ -0,0 +1,18 @@
1
+ # UltracartClient::HitPageView
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **bounce** | **BOOLEAN** | | [optional]
7
+ **meta_data** | [**Array<HitPageViewMetaData>**](HitPageViewMetaData.md) | | [optional]
8
+ **method** | **String** | | [optional]
9
+ **prefetch** | **BOOLEAN** | | [optional]
10
+ **query** | **String** | | [optional]
11
+ **recording** | **BOOLEAN** | | [optional]
12
+ **redirect** | **BOOLEAN** | | [optional]
13
+ **referrer** | **String** | | [optional]
14
+ **time_on_page** | **Float** | | [optional]
15
+ **title** | **String** | | [optional]
16
+ **url** | **String** | | [optional]
17
+
18
+
@@ -0,0 +1,9 @@
1
+ # UltracartClient::HitPageViewMetaData
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **key** | **String** | | [optional]
7
+ **value** | **String** | | [optional]
8
+
9
+
@@ -0,0 +1,24 @@
1
+ # UltracartClient::HitSessionStart
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **bot** | **BOOLEAN** | | [optional]
7
+ **bounce** | **BOOLEAN** | | [optional]
8
+ **channel** | **String** | | [optional]
9
+ **device_switch_detected** | **BOOLEAN** | | [optional]
10
+ **fake_bot** | **BOOLEAN** | | [optional]
11
+ **geolocation_country** | **String** | | [optional]
12
+ **geolocation_latitude** | **Float** | | [optional]
13
+ **geolocation_longitude** | **Float** | | [optional]
14
+ **geolocation_province** | **String** | | [optional]
15
+ **no_cookie_support** | **BOOLEAN** | | [optional]
16
+ **prefetch** | **BOOLEAN** | | [optional]
17
+ **referrer** | **String** | | [optional]
18
+ **screen_height** | **Integer** | | [optional]
19
+ **screen_width** | **Integer** | | [optional]
20
+ **time_on_site** | **Float** | | [optional]
21
+ **user_agent** | **String** | | [optional]
22
+ **user_ip** | **String** | | [optional]
23
+
24
+
@@ -0,0 +1,22 @@
1
+ # UltracartClient::HitSessionUtm
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **fb_ad_id** | **String** | | [optional]
7
+ **fbclid** | **String** | | [optional]
8
+ **gbraid** | **String** | | [optional]
9
+ **gclid** | **String** | | [optional]
10
+ **msclkid** | **String** | | [optional]
11
+ **ttclid** | **String** | | [optional]
12
+ **uc_message_id** | **String** | | [optional]
13
+ **utm_campaign** | **String** | | [optional]
14
+ **utm_content** | **String** | | [optional]
15
+ **utm_id** | **String** | | [optional]
16
+ **utm_medium** | **String** | | [optional]
17
+ **utm_source** | **String** | | [optional]
18
+ **utm_term** | **String** | | [optional]
19
+ **vmcid** | **String** | | [optional]
20
+ **wbraid** | **String** | | [optional]
21
+
22
+
@@ -187,6 +187,61 @@ module UltracartClient
187
187
  end
188
188
  return data, status_code, headers
189
189
  end
190
+ # Get a webchat conversation context
191
+ # Get a webchat conversation context
192
+ # @param conversation_uuid
193
+ # @param [Hash] opts the optional parameters
194
+ # @return [ConversationWebchatContext]
195
+ def get_conversation_context(conversation_uuid, opts = {})
196
+ data, _status_code, _headers = get_conversation_context_with_http_info(conversation_uuid, opts)
197
+ data
198
+ end
199
+
200
+ # Get a webchat conversation context
201
+ # Get a webchat conversation context
202
+ # @param conversation_uuid
203
+ # @param [Hash] opts the optional parameters
204
+ # @return [Array<(ConversationWebchatContext, Fixnum, Hash)>] ConversationWebchatContext data, response status code and response headers
205
+ def get_conversation_context_with_http_info(conversation_uuid, opts = {})
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_context ...'
208
+ end
209
+ # verify the required parameter 'conversation_uuid' is set
210
+ if @api_client.config.client_side_validation && conversation_uuid.nil?
211
+ fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation_context"
212
+ end
213
+ # resource path
214
+ local_var_path = '/conversation/conversations/{conversation_uuid}/context'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s)
215
+
216
+ # query parameters
217
+ query_params = {}
218
+
219
+ # header parameters
220
+ header_params = {}
221
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
222
+ # HTTP header 'Accept' (if needed)
223
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
224
+ # HTTP header 'Content-Type'
225
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
226
+
227
+ # form parameters
228
+ form_params = {}
229
+
230
+ # http body (model)
231
+ post_body = nil
232
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
233
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
234
+ :header_params => header_params,
235
+ :query_params => query_params,
236
+ :form_params => form_params,
237
+ :body => post_body,
238
+ :auth_names => auth_names,
239
+ :return_type => 'ConversationWebchatContext')
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug "API called: ConversationApi#get_conversation_context\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
+ end
243
+ return data, status_code, headers
244
+ end
190
245
  # Retrieve conversation messages
191
246
  # Retrieve conversation messages since a particular time
192
247
  # @param conversation_uuid
@@ -0,0 +1,222 @@
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 ConversationWebchatContext
17
+ attr_accessor :cart
18
+
19
+ attr_accessor :current_url
20
+
21
+ attr_accessor :page_view
22
+
23
+ attr_accessor :session_start
24
+
25
+ attr_accessor :session_utm
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'cart' => :'cart',
31
+ :'current_url' => :'current_url',
32
+ :'page_view' => :'page_view',
33
+ :'session_start' => :'session_start',
34
+ :'session_utm' => :'session_utm'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'cart' => :'Cart',
42
+ :'current_url' => :'String',
43
+ :'page_view' => :'Array<HitPageView>',
44
+ :'session_start' => :'HitSessionStart',
45
+ :'session_utm' => :'HitSessionUtm'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'cart')
58
+ self.cart = attributes[:'cart']
59
+ end
60
+
61
+ if attributes.has_key?(:'current_url')
62
+ self.current_url = attributes[:'current_url']
63
+ end
64
+
65
+ if attributes.has_key?(:'page_view')
66
+ if (value = attributes[:'page_view']).is_a?(Array)
67
+ self.page_view = value
68
+ end
69
+ end
70
+
71
+ if attributes.has_key?(:'session_start')
72
+ self.session_start = attributes[:'session_start']
73
+ end
74
+
75
+ if attributes.has_key?(:'session_utm')
76
+ self.session_utm = attributes[:'session_utm']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ true
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ cart == o.cart &&
99
+ current_url == o.current_url &&
100
+ page_view == o.page_view &&
101
+ session_start == o.session_start &&
102
+ session_utm == o.session_utm
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Fixnum] Hash code
113
+ def hash
114
+ [cart, current_url, page_view, session_start, session_utm].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ self.class.swagger_types.each_pair do |key, type|
123
+ if type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :DateTime
144
+ DateTime.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :BOOLEAN
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ temp_model = UltracartClient.const_get(type).new
175
+ temp_model.build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ next if value.nil?
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ # Outputs non-array value in the form of hash
204
+ # For object, use to_hash. Otherwise, just return the value
205
+ # @param [Object] value Any valid value
206
+ # @return [Hash] Returns the value in the form of hash
207
+ def _to_hash(value)
208
+ if value.is_a?(Array)
209
+ value.compact.map { |v| _to_hash(v) }
210
+ elsif value.is_a?(Hash)
211
+ {}.tap do |hash|
212
+ value.each { |k, v| hash[k] = _to_hash(v) }
213
+ end
214
+ elsif value.respond_to? :to_hash
215
+ value.to_hash
216
+ else
217
+ value
218
+ end
219
+ end
220
+
221
+ end
222
+ end
@@ -206,7 +206,7 @@ module UltracartClient
206
206
  # Check to see if the all the properties in the model are valid
207
207
  # @return true if the model is valid
208
208
  def valid?
209
- event_type_validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb', 'participant update', 'read message', 'typing', 'add coupon', 'add item'])
209
+ event_type_validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb', 'participant update', 'read message', 'typing', 'add coupon', 'add item', 'webchat context'])
210
210
  return false unless event_type_validator.valid?(@event_type)
211
211
  type_validator = EnumAttributeValidator.new('String', ['message', 'event', 'ping', 'check queue position'])
212
212
  return false unless type_validator.valid?(@type)
@@ -216,7 +216,7 @@ module UltracartClient
216
216
  # Custom attribute writer method checking allowed values (enum).
217
217
  # @param [Object] event_type Object to be assigned
218
218
  def event_type=(event_type)
219
- validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb', 'participant update', 'read message', 'typing', 'add coupon', 'add item'])
219
+ validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb', 'participant update', 'read message', 'typing', 'add coupon', 'add item', 'webchat context'])
220
220
  unless validator.valid?(event_type)
221
221
  fail ArgumentError, 'invalid value for "event_type", must be one of #{validator.allowable_values}.'
222
222
  end