ultracart_api 3.10.31 → 3.10.34
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/Conversation.md +9 -0
- data/docs/ConversationApi.md +2 -0
- data/docs/ConversationEventTyping.md +10 -0
- data/docs/ConversationSummary.md +2 -0
- data/docs/ConversationWebsocketMessage.md +2 -0
- data/lib/ultracart_api/api/conversation_api.rb +3 -0
- data/lib/ultracart_api/models/conversation.rb +122 -4
- data/lib/ultracart_api/models/conversation_event_typing.rb +202 -0
- data/lib/ultracart_api/models/conversation_summary.rb +56 -1
- data/lib/ultracart_api/models/conversation_websocket_message.rb +21 -3
- 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: d3a3fba5debcce4defe2f7c7985f045d21b25741c1b7161e63b1257b4e3d11c9
|
4
|
+
data.tar.gz: fbb18792b975847150dca1756cfa3dadca7e90e82078961d2790cf0a4cd6ccc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8b53de8ec2edd136729ffdc4f749b0a114fdba39a111c6ce1e095824af46a0b7b54cd4cbd5c226dc01b79f4db067e7f88fc84bdcbfc04d346de6703eacf834c
|
7
|
+
data.tar.gz: 4d53b7f855cb4211987d95dd8a0c1ef3bb8476c59876315dfd3b2a9cd1c4cf2257ebf55551bf7133fa9e81ab49636ab33c664e11ce77018bf896bc46b9486eb6
|
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.34
|
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.34.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.34.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.34'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -564,6 +564,7 @@ Class | Method | HTTP request | Description
|
|
564
564
|
- [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
|
565
565
|
- [UltracartClient::ConversationEventQueuePosition](docs/ConversationEventQueuePosition.md)
|
566
566
|
- [UltracartClient::ConversationEventRRWeb](docs/ConversationEventRRWeb.md)
|
567
|
+
- [UltracartClient::ConversationEventTyping](docs/ConversationEventTyping.md)
|
567
568
|
- [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
|
568
569
|
- [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
|
569
570
|
- [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
|
@@ -1171,6 +1172,9 @@ Not every change is committed to every SDK.
|
|
1171
1172
|
|
1172
1173
|
| Version | Date | Comments |
|
1173
1174
|
| --: | :-: | --- |
|
1175
|
+
| 3.10.34 | 08/05/2022 | conversations query by medium and stats fixes |
|
1176
|
+
| 3.10.33 | 08/03/2022 | conversation summary participants |
|
1177
|
+
| 3.10.32 | 08/03/2022 | more conversation events |
|
1174
1178
|
| 3.10.31 | 08/02/2022 | storefront communication sequence test method |
|
1175
1179
|
| 3.10.30 | 08/01/2022 | conversation event refinement |
|
1176
1180
|
| 3.10.29 | 07/29/2022 | conversation development |
|
data/docs/Conversation.md
CHANGED
@@ -6,8 +6,17 @@ Name | Type | Description | Notes
|
|
6
6
|
**closed** | **BOOLEAN** | | [optional]
|
7
7
|
**conversation_arn** | **String** | | [optional]
|
8
8
|
**conversation_uuid** | **String** | | [optional]
|
9
|
+
**last_conversation_message_body** | **String** | | [optional]
|
10
|
+
**last_conversation_participant_arn** | **String** | | [optional]
|
11
|
+
**last_conversation_participant_name** | **String** | | [optional]
|
12
|
+
**last_message_dts** | **String** | Last message date/time | [optional]
|
13
|
+
**medium** | **String** | The communication medium of the customer. | [optional]
|
9
14
|
**merchant_id** | **String** | | [optional]
|
15
|
+
**message_count** | **Integer** | | [optional]
|
10
16
|
**messages** | [**Array<ConversationMessage>**](ConversationMessage.md) | | [optional]
|
11
17
|
**participants** | [**Array<ConversationParticipant>**](ConversationParticipant.md) | | [optional]
|
18
|
+
**start_dts** | **String** | Start of the conversation date/time | [optional]
|
19
|
+
**unread_messages** | **BOOLEAN** | | [optional]
|
20
|
+
**visible** | **BOOLEAN** | | [optional]
|
12
21
|
|
13
22
|
|
data/docs/ConversationApi.md
CHANGED
@@ -223,6 +223,7 @@ api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, fa
|
|
223
223
|
|
224
224
|
|
225
225
|
opts = {
|
226
|
+
medium: 'medium_example', # String |
|
226
227
|
_limit: 100, # Integer | The maximum number of records to return on this one API call. (Max 200)
|
227
228
|
_offset: 0 # Integer | Pagination of the record set. Offset is a zero based index.
|
228
229
|
}
|
@@ -240,6 +241,7 @@ end
|
|
240
241
|
|
241
242
|
Name | Type | Description | Notes
|
242
243
|
------------- | ------------- | ------------- | -------------
|
244
|
+
**medium** | **String**| | [optional]
|
243
245
|
**_limit** | **Integer**| The maximum number of records to return on this one API call. (Max 200) | [optional] [default to 100]
|
244
246
|
**_offset** | **Integer**| Pagination of the record set. Offset is a zero based index. | [optional] [default to 0]
|
245
247
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# UltracartClient::ConversationEventTyping
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**author_conversation_participant_arn** | **String** | | [optional]
|
7
|
+
**author_conversation_participant_name** | **String** | | [optional]
|
8
|
+
**value** | **String** | | [optional]
|
9
|
+
|
10
|
+
|
data/docs/ConversationSummary.md
CHANGED
@@ -10,8 +10,10 @@ Name | Type | Description | Notes
|
|
10
10
|
**last_conversation_participant_arn** | **String** | | [optional]
|
11
11
|
**last_conversation_participant_name** | **String** | | [optional]
|
12
12
|
**last_message_dts** | **String** | Last message date/time | [optional]
|
13
|
+
**medium** | **String** | The communication medium of the customer. | [optional]
|
13
14
|
**merchant_id** | **String** | | [optional]
|
14
15
|
**message_count** | **Integer** | | [optional]
|
16
|
+
**participants** | [**Array<ConversationParticipant>**](ConversationParticipant.md) | | [optional]
|
15
17
|
**start_dts** | **String** | Start of the conversation date/time | [optional]
|
16
18
|
**unread_messages** | **BOOLEAN** | | [optional]
|
17
19
|
**visible** | **BOOLEAN** | | [optional]
|
@@ -7,10 +7,12 @@ Name | Type | Description | Notes
|
|
7
7
|
**event_conversation_closed** | [**ConversationSummary**](ConversationSummary.md) | | [optional]
|
8
8
|
**event_new_conversation** | [**ConversationSummary**](ConversationSummary.md) | | [optional]
|
9
9
|
**event_new_message** | [**ConversationSummary**](ConversationSummary.md) | | [optional]
|
10
|
+
**event_participant_update** | [**ConversationSummary**](ConversationSummary.md) | | [optional]
|
10
11
|
**event_queue_position** | [**ConversationEventQueuePosition**](ConversationEventQueuePosition.md) | | [optional]
|
11
12
|
**event_queue_status_update** | [**ConversationWebchatQueueStatus**](ConversationWebchatQueueStatus.md) | | [optional]
|
12
13
|
**event_rrweb** | [**ConversationEventRRWeb**](ConversationEventRRWeb.md) | | [optional]
|
13
14
|
**event_type** | **String** | Type of event | [optional]
|
15
|
+
**event_typing** | [**ConversationEventTyping**](ConversationEventTyping.md) | | [optional]
|
14
16
|
**event_updated_message** | [**ConversationMessage**](ConversationMessage.md) | | [optional]
|
15
17
|
**message** | [**ConversationMessage**](ConversationMessage.md) | | [optional]
|
16
18
|
**type** | **String** | Type of message | [optional]
|
@@ -243,6 +243,7 @@ module UltracartClient
|
|
243
243
|
# Retrieve a list of conversation summaries newest to oldest
|
244
244
|
# Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
|
245
245
|
# @param [Hash] opts the optional parameters
|
246
|
+
# @option opts [String] :medium
|
246
247
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
|
247
248
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
248
249
|
# @return [ConversationsResponse]
|
@@ -254,6 +255,7 @@ module UltracartClient
|
|
254
255
|
# Retrieve a list of conversation summaries newest to oldest
|
255
256
|
# Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
|
256
257
|
# @param [Hash] opts the optional parameters
|
258
|
+
# @option opts [String] :medium
|
257
259
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200)
|
258
260
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
|
259
261
|
# @return [Array<(ConversationsResponse, Fixnum, Hash)>] ConversationsResponse data, response status code and response headers
|
@@ -266,6 +268,7 @@ module UltracartClient
|
|
266
268
|
|
267
269
|
# query parameters
|
268
270
|
query_params = {}
|
271
|
+
query_params[:'medium'] = opts[:'medium'] if !opts[:'medium'].nil?
|
269
272
|
query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
|
270
273
|
query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
|
271
274
|
|
@@ -20,21 +20,73 @@ module UltracartClient
|
|
20
20
|
|
21
21
|
attr_accessor :conversation_uuid
|
22
22
|
|
23
|
+
attr_accessor :last_conversation_message_body
|
24
|
+
|
25
|
+
attr_accessor :last_conversation_participant_arn
|
26
|
+
|
27
|
+
attr_accessor :last_conversation_participant_name
|
28
|
+
|
29
|
+
# Last message date/time
|
30
|
+
attr_accessor :last_message_dts
|
31
|
+
|
32
|
+
# The communication medium of the customer.
|
33
|
+
attr_accessor :medium
|
34
|
+
|
23
35
|
attr_accessor :merchant_id
|
24
36
|
|
37
|
+
attr_accessor :message_count
|
38
|
+
|
25
39
|
attr_accessor :messages
|
26
40
|
|
27
41
|
attr_accessor :participants
|
28
42
|
|
43
|
+
# Start of the conversation date/time
|
44
|
+
attr_accessor :start_dts
|
45
|
+
|
46
|
+
attr_accessor :unread_messages
|
47
|
+
|
48
|
+
attr_accessor :visible
|
49
|
+
|
50
|
+
class EnumAttributeValidator
|
51
|
+
attr_reader :datatype
|
52
|
+
attr_reader :allowable_values
|
53
|
+
|
54
|
+
def initialize(datatype, allowable_values)
|
55
|
+
@allowable_values = allowable_values.map do |value|
|
56
|
+
case datatype.to_s
|
57
|
+
when /Integer/i
|
58
|
+
value.to_i
|
59
|
+
when /Float/i
|
60
|
+
value.to_f
|
61
|
+
else
|
62
|
+
value
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def valid?(value)
|
68
|
+
!value || allowable_values.include?(value)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
29
72
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
73
|
def self.attribute_map
|
31
74
|
{
|
32
75
|
:'closed' => :'closed',
|
33
76
|
:'conversation_arn' => :'conversation_arn',
|
34
77
|
:'conversation_uuid' => :'conversation_uuid',
|
78
|
+
:'last_conversation_message_body' => :'last_conversation_message_body',
|
79
|
+
:'last_conversation_participant_arn' => :'last_conversation_participant_arn',
|
80
|
+
:'last_conversation_participant_name' => :'last_conversation_participant_name',
|
81
|
+
:'last_message_dts' => :'last_message_dts',
|
82
|
+
:'medium' => :'medium',
|
35
83
|
:'merchant_id' => :'merchant_id',
|
84
|
+
:'message_count' => :'message_count',
|
36
85
|
:'messages' => :'messages',
|
37
|
-
:'participants' => :'participants'
|
86
|
+
:'participants' => :'participants',
|
87
|
+
:'start_dts' => :'start_dts',
|
88
|
+
:'unread_messages' => :'unread_messages',
|
89
|
+
:'visible' => :'visible'
|
38
90
|
}
|
39
91
|
end
|
40
92
|
|
@@ -44,9 +96,18 @@ module UltracartClient
|
|
44
96
|
:'closed' => :'BOOLEAN',
|
45
97
|
:'conversation_arn' => :'String',
|
46
98
|
:'conversation_uuid' => :'String',
|
99
|
+
:'last_conversation_message_body' => :'String',
|
100
|
+
:'last_conversation_participant_arn' => :'String',
|
101
|
+
:'last_conversation_participant_name' => :'String',
|
102
|
+
:'last_message_dts' => :'String',
|
103
|
+
:'medium' => :'String',
|
47
104
|
:'merchant_id' => :'String',
|
105
|
+
:'message_count' => :'Integer',
|
48
106
|
:'messages' => :'Array<ConversationMessage>',
|
49
|
-
:'participants' => :'Array<ConversationParticipant>'
|
107
|
+
:'participants' => :'Array<ConversationParticipant>',
|
108
|
+
:'start_dts' => :'String',
|
109
|
+
:'unread_messages' => :'BOOLEAN',
|
110
|
+
:'visible' => :'BOOLEAN'
|
50
111
|
}
|
51
112
|
end
|
52
113
|
|
@@ -70,10 +131,34 @@ module UltracartClient
|
|
70
131
|
self.conversation_uuid = attributes[:'conversation_uuid']
|
71
132
|
end
|
72
133
|
|
134
|
+
if attributes.has_key?(:'last_conversation_message_body')
|
135
|
+
self.last_conversation_message_body = attributes[:'last_conversation_message_body']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.has_key?(:'last_conversation_participant_arn')
|
139
|
+
self.last_conversation_participant_arn = attributes[:'last_conversation_participant_arn']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.has_key?(:'last_conversation_participant_name')
|
143
|
+
self.last_conversation_participant_name = attributes[:'last_conversation_participant_name']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.has_key?(:'last_message_dts')
|
147
|
+
self.last_message_dts = attributes[:'last_message_dts']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.has_key?(:'medium')
|
151
|
+
self.medium = attributes[:'medium']
|
152
|
+
end
|
153
|
+
|
73
154
|
if attributes.has_key?(:'merchant_id')
|
74
155
|
self.merchant_id = attributes[:'merchant_id']
|
75
156
|
end
|
76
157
|
|
158
|
+
if attributes.has_key?(:'message_count')
|
159
|
+
self.message_count = attributes[:'message_count']
|
160
|
+
end
|
161
|
+
|
77
162
|
if attributes.has_key?(:'messages')
|
78
163
|
if (value = attributes[:'messages']).is_a?(Array)
|
79
164
|
self.messages = value
|
@@ -85,6 +170,18 @@ module UltracartClient
|
|
85
170
|
self.participants = value
|
86
171
|
end
|
87
172
|
end
|
173
|
+
|
174
|
+
if attributes.has_key?(:'start_dts')
|
175
|
+
self.start_dts = attributes[:'start_dts']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.has_key?(:'unread_messages')
|
179
|
+
self.unread_messages = attributes[:'unread_messages']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.has_key?(:'visible')
|
183
|
+
self.visible = attributes[:'visible']
|
184
|
+
end
|
88
185
|
end
|
89
186
|
|
90
187
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -97,9 +194,21 @@ module UltracartClient
|
|
97
194
|
# Check to see if the all the properties in the model are valid
|
98
195
|
# @return true if the model is valid
|
99
196
|
def valid?
|
197
|
+
medium_validator = EnumAttributeValidator.new('String', ['sms', 'websocket'])
|
198
|
+
return false unless medium_validator.valid?(@medium)
|
100
199
|
true
|
101
200
|
end
|
102
201
|
|
202
|
+
# Custom attribute writer method checking allowed values (enum).
|
203
|
+
# @param [Object] medium Object to be assigned
|
204
|
+
def medium=(medium)
|
205
|
+
validator = EnumAttributeValidator.new('String', ['sms', 'websocket'])
|
206
|
+
unless validator.valid?(medium)
|
207
|
+
fail ArgumentError, 'invalid value for "medium", must be one of #{validator.allowable_values}.'
|
208
|
+
end
|
209
|
+
@medium = medium
|
210
|
+
end
|
211
|
+
|
103
212
|
# Checks equality by comparing each attribute.
|
104
213
|
# @param [Object] Object to be compared
|
105
214
|
def ==(o)
|
@@ -108,9 +217,18 @@ module UltracartClient
|
|
108
217
|
closed == o.closed &&
|
109
218
|
conversation_arn == o.conversation_arn &&
|
110
219
|
conversation_uuid == o.conversation_uuid &&
|
220
|
+
last_conversation_message_body == o.last_conversation_message_body &&
|
221
|
+
last_conversation_participant_arn == o.last_conversation_participant_arn &&
|
222
|
+
last_conversation_participant_name == o.last_conversation_participant_name &&
|
223
|
+
last_message_dts == o.last_message_dts &&
|
224
|
+
medium == o.medium &&
|
111
225
|
merchant_id == o.merchant_id &&
|
226
|
+
message_count == o.message_count &&
|
112
227
|
messages == o.messages &&
|
113
|
-
participants == o.participants
|
228
|
+
participants == o.participants &&
|
229
|
+
start_dts == o.start_dts &&
|
230
|
+
unread_messages == o.unread_messages &&
|
231
|
+
visible == o.visible
|
114
232
|
end
|
115
233
|
|
116
234
|
# @see the `==` method
|
@@ -122,7 +240,7 @@ module UltracartClient
|
|
122
240
|
# Calculates hash code according to all attributes.
|
123
241
|
# @return [Fixnum] Hash code
|
124
242
|
def hash
|
125
|
-
[closed, conversation_arn, conversation_uuid, merchant_id, messages, participants].hash
|
243
|
+
[closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, medium, merchant_id, message_count, messages, participants, start_dts, unread_messages, visible].hash
|
126
244
|
end
|
127
245
|
|
128
246
|
# Builds the object from hash
|
@@ -0,0 +1,202 @@
|
|
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 ConversationEventTyping
|
17
|
+
attr_accessor :author_conversation_participant_arn
|
18
|
+
|
19
|
+
attr_accessor :author_conversation_participant_name
|
20
|
+
|
21
|
+
attr_accessor :value
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'author_conversation_participant_arn' => :'author_conversation_participant_arn',
|
27
|
+
:'author_conversation_participant_name' => :'author_conversation_participant_name',
|
28
|
+
:'value' => :'value'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'author_conversation_participant_arn' => :'String',
|
36
|
+
:'author_conversation_participant_name' => :'String',
|
37
|
+
:'value' => :'String'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
48
|
+
|
49
|
+
if attributes.has_key?(:'author_conversation_participant_arn')
|
50
|
+
self.author_conversation_participant_arn = attributes[:'author_conversation_participant_arn']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'author_conversation_participant_name')
|
54
|
+
self.author_conversation_participant_name = attributes[:'author_conversation_participant_name']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'value')
|
58
|
+
self.value = attributes[:'value']
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
63
|
+
# @return Array for valid properties with the reasons
|
64
|
+
def list_invalid_properties
|
65
|
+
invalid_properties = Array.new
|
66
|
+
invalid_properties
|
67
|
+
end
|
68
|
+
|
69
|
+
# Check to see if the all the properties in the model are valid
|
70
|
+
# @return true if the model is valid
|
71
|
+
def valid?
|
72
|
+
true
|
73
|
+
end
|
74
|
+
|
75
|
+
# Checks equality by comparing each attribute.
|
76
|
+
# @param [Object] Object to be compared
|
77
|
+
def ==(o)
|
78
|
+
return true if self.equal?(o)
|
79
|
+
self.class == o.class &&
|
80
|
+
author_conversation_participant_arn == o.author_conversation_participant_arn &&
|
81
|
+
author_conversation_participant_name == o.author_conversation_participant_name &&
|
82
|
+
value == o.value
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Fixnum] Hash code
|
93
|
+
def hash
|
94
|
+
[author_conversation_participant_arn, author_conversation_participant_name, value].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def build_from_hash(attributes)
|
101
|
+
return nil unless attributes.is_a?(Hash)
|
102
|
+
self.class.swagger_types.each_pair do |key, type|
|
103
|
+
if type =~ /\AArray<(.*)>/i
|
104
|
+
# check to ensure the input is an array given that the attribute
|
105
|
+
# is documented as an array but the input is not
|
106
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
107
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
108
|
+
end
|
109
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
110
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
111
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
112
|
+
end
|
113
|
+
|
114
|
+
self
|
115
|
+
end
|
116
|
+
|
117
|
+
# Deserializes the data based on type
|
118
|
+
# @param string type Data type
|
119
|
+
# @param string value Value to be deserialized
|
120
|
+
# @return [Object] Deserialized data
|
121
|
+
def _deserialize(type, value)
|
122
|
+
case type.to_sym
|
123
|
+
when :DateTime
|
124
|
+
DateTime.parse(value)
|
125
|
+
when :Date
|
126
|
+
Date.parse(value)
|
127
|
+
when :String
|
128
|
+
value.to_s
|
129
|
+
when :Integer
|
130
|
+
value.to_i
|
131
|
+
when :Float
|
132
|
+
value.to_f
|
133
|
+
when :BOOLEAN
|
134
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
135
|
+
true
|
136
|
+
else
|
137
|
+
false
|
138
|
+
end
|
139
|
+
when :Object
|
140
|
+
# generic object (usually a Hash), return directly
|
141
|
+
value
|
142
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
143
|
+
inner_type = Regexp.last_match[:inner_type]
|
144
|
+
value.map { |v| _deserialize(inner_type, v) }
|
145
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
146
|
+
k_type = Regexp.last_match[:k_type]
|
147
|
+
v_type = Regexp.last_match[:v_type]
|
148
|
+
{}.tap do |hash|
|
149
|
+
value.each do |k, v|
|
150
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
else # model
|
154
|
+
temp_model = UltracartClient.const_get(type).new
|
155
|
+
temp_model.build_from_hash(value)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the string representation of the object
|
160
|
+
# @return [String] String presentation of the object
|
161
|
+
def to_s
|
162
|
+
to_hash.to_s
|
163
|
+
end
|
164
|
+
|
165
|
+
# to_body is an alias to to_hash (backward compatibility)
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_body
|
168
|
+
to_hash
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the object in the form of hash
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_hash
|
174
|
+
hash = {}
|
175
|
+
self.class.attribute_map.each_pair do |attr, param|
|
176
|
+
value = self.send(attr)
|
177
|
+
next if value.nil?
|
178
|
+
hash[param] = _to_hash(value)
|
179
|
+
end
|
180
|
+
hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Outputs non-array value in the form of hash
|
184
|
+
# For object, use to_hash. Otherwise, just return the value
|
185
|
+
# @param [Object] value Any valid value
|
186
|
+
# @return [Hash] Returns the value in the form of hash
|
187
|
+
def _to_hash(value)
|
188
|
+
if value.is_a?(Array)
|
189
|
+
value.compact.map { |v| _to_hash(v) }
|
190
|
+
elsif value.is_a?(Hash)
|
191
|
+
{}.tap do |hash|
|
192
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
193
|
+
end
|
194
|
+
elsif value.respond_to? :to_hash
|
195
|
+
value.to_hash
|
196
|
+
else
|
197
|
+
value
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
end
|
202
|
+
end
|
@@ -29,10 +29,15 @@ module UltracartClient
|
|
29
29
|
# Last message date/time
|
30
30
|
attr_accessor :last_message_dts
|
31
31
|
|
32
|
+
# The communication medium of the customer.
|
33
|
+
attr_accessor :medium
|
34
|
+
|
32
35
|
attr_accessor :merchant_id
|
33
36
|
|
34
37
|
attr_accessor :message_count
|
35
38
|
|
39
|
+
attr_accessor :participants
|
40
|
+
|
36
41
|
# Start of the conversation date/time
|
37
42
|
attr_accessor :start_dts
|
38
43
|
|
@@ -40,6 +45,28 @@ module UltracartClient
|
|
40
45
|
|
41
46
|
attr_accessor :visible
|
42
47
|
|
48
|
+
class EnumAttributeValidator
|
49
|
+
attr_reader :datatype
|
50
|
+
attr_reader :allowable_values
|
51
|
+
|
52
|
+
def initialize(datatype, allowable_values)
|
53
|
+
@allowable_values = allowable_values.map do |value|
|
54
|
+
case datatype.to_s
|
55
|
+
when /Integer/i
|
56
|
+
value.to_i
|
57
|
+
when /Float/i
|
58
|
+
value.to_f
|
59
|
+
else
|
60
|
+
value
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def valid?(value)
|
66
|
+
!value || allowable_values.include?(value)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
43
70
|
# Attribute mapping from ruby-style variable name to JSON key.
|
44
71
|
def self.attribute_map
|
45
72
|
{
|
@@ -50,8 +77,10 @@ module UltracartClient
|
|
50
77
|
:'last_conversation_participant_arn' => :'last_conversation_participant_arn',
|
51
78
|
:'last_conversation_participant_name' => :'last_conversation_participant_name',
|
52
79
|
:'last_message_dts' => :'last_message_dts',
|
80
|
+
:'medium' => :'medium',
|
53
81
|
:'merchant_id' => :'merchant_id',
|
54
82
|
:'message_count' => :'message_count',
|
83
|
+
:'participants' => :'participants',
|
55
84
|
:'start_dts' => :'start_dts',
|
56
85
|
:'unread_messages' => :'unread_messages',
|
57
86
|
:'visible' => :'visible'
|
@@ -68,8 +97,10 @@ module UltracartClient
|
|
68
97
|
:'last_conversation_participant_arn' => :'String',
|
69
98
|
:'last_conversation_participant_name' => :'String',
|
70
99
|
:'last_message_dts' => :'String',
|
100
|
+
:'medium' => :'String',
|
71
101
|
:'merchant_id' => :'String',
|
72
102
|
:'message_count' => :'Integer',
|
103
|
+
:'participants' => :'Array<ConversationParticipant>',
|
73
104
|
:'start_dts' => :'String',
|
74
105
|
:'unread_messages' => :'BOOLEAN',
|
75
106
|
:'visible' => :'BOOLEAN'
|
@@ -112,6 +143,10 @@ module UltracartClient
|
|
112
143
|
self.last_message_dts = attributes[:'last_message_dts']
|
113
144
|
end
|
114
145
|
|
146
|
+
if attributes.has_key?(:'medium')
|
147
|
+
self.medium = attributes[:'medium']
|
148
|
+
end
|
149
|
+
|
115
150
|
if attributes.has_key?(:'merchant_id')
|
116
151
|
self.merchant_id = attributes[:'merchant_id']
|
117
152
|
end
|
@@ -120,6 +155,12 @@ module UltracartClient
|
|
120
155
|
self.message_count = attributes[:'message_count']
|
121
156
|
end
|
122
157
|
|
158
|
+
if attributes.has_key?(:'participants')
|
159
|
+
if (value = attributes[:'participants']).is_a?(Array)
|
160
|
+
self.participants = value
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
123
164
|
if attributes.has_key?(:'start_dts')
|
124
165
|
self.start_dts = attributes[:'start_dts']
|
125
166
|
end
|
@@ -143,9 +184,21 @@ module UltracartClient
|
|
143
184
|
# Check to see if the all the properties in the model are valid
|
144
185
|
# @return true if the model is valid
|
145
186
|
def valid?
|
187
|
+
medium_validator = EnumAttributeValidator.new('String', ['sms', 'websocket'])
|
188
|
+
return false unless medium_validator.valid?(@medium)
|
146
189
|
true
|
147
190
|
end
|
148
191
|
|
192
|
+
# Custom attribute writer method checking allowed values (enum).
|
193
|
+
# @param [Object] medium Object to be assigned
|
194
|
+
def medium=(medium)
|
195
|
+
validator = EnumAttributeValidator.new('String', ['sms', 'websocket'])
|
196
|
+
unless validator.valid?(medium)
|
197
|
+
fail ArgumentError, 'invalid value for "medium", must be one of #{validator.allowable_values}.'
|
198
|
+
end
|
199
|
+
@medium = medium
|
200
|
+
end
|
201
|
+
|
149
202
|
# Checks equality by comparing each attribute.
|
150
203
|
# @param [Object] Object to be compared
|
151
204
|
def ==(o)
|
@@ -158,8 +211,10 @@ module UltracartClient
|
|
158
211
|
last_conversation_participant_arn == o.last_conversation_participant_arn &&
|
159
212
|
last_conversation_participant_name == o.last_conversation_participant_name &&
|
160
213
|
last_message_dts == o.last_message_dts &&
|
214
|
+
medium == o.medium &&
|
161
215
|
merchant_id == o.merchant_id &&
|
162
216
|
message_count == o.message_count &&
|
217
|
+
participants == o.participants &&
|
163
218
|
start_dts == o.start_dts &&
|
164
219
|
unread_messages == o.unread_messages &&
|
165
220
|
visible == o.visible
|
@@ -174,7 +229,7 @@ module UltracartClient
|
|
174
229
|
# Calculates hash code according to all attributes.
|
175
230
|
# @return [Fixnum] Hash code
|
176
231
|
def hash
|
177
|
-
[closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, merchant_id, message_count, start_dts, unread_messages, visible].hash
|
232
|
+
[closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, medium, merchant_id, message_count, participants, start_dts, unread_messages, visible].hash
|
178
233
|
end
|
179
234
|
|
180
235
|
# Builds the object from hash
|
@@ -23,6 +23,8 @@ module UltracartClient
|
|
23
23
|
|
24
24
|
attr_accessor :event_new_message
|
25
25
|
|
26
|
+
attr_accessor :event_participant_update
|
27
|
+
|
26
28
|
attr_accessor :event_queue_position
|
27
29
|
|
28
30
|
attr_accessor :event_queue_status_update
|
@@ -32,6 +34,8 @@ module UltracartClient
|
|
32
34
|
# Type of event
|
33
35
|
attr_accessor :event_type
|
34
36
|
|
37
|
+
attr_accessor :event_typing
|
38
|
+
|
35
39
|
attr_accessor :event_updated_message
|
36
40
|
|
37
41
|
attr_accessor :message
|
@@ -68,10 +72,12 @@ module UltracartClient
|
|
68
72
|
:'event_conversation_closed' => :'event_conversation_closed',
|
69
73
|
:'event_new_conversation' => :'event_new_conversation',
|
70
74
|
:'event_new_message' => :'event_new_message',
|
75
|
+
:'event_participant_update' => :'event_participant_update',
|
71
76
|
:'event_queue_position' => :'event_queue_position',
|
72
77
|
:'event_queue_status_update' => :'event_queue_status_update',
|
73
78
|
:'event_rrweb' => :'event_rrweb',
|
74
79
|
:'event_type' => :'event_type',
|
80
|
+
:'event_typing' => :'event_typing',
|
75
81
|
:'event_updated_message' => :'event_updated_message',
|
76
82
|
:'message' => :'message',
|
77
83
|
:'type' => :'type'
|
@@ -85,10 +91,12 @@ module UltracartClient
|
|
85
91
|
:'event_conversation_closed' => :'ConversationSummary',
|
86
92
|
:'event_new_conversation' => :'ConversationSummary',
|
87
93
|
:'event_new_message' => :'ConversationSummary',
|
94
|
+
:'event_participant_update' => :'ConversationSummary',
|
88
95
|
:'event_queue_position' => :'ConversationEventQueuePosition',
|
89
96
|
:'event_queue_status_update' => :'ConversationWebchatQueueStatus',
|
90
97
|
:'event_rrweb' => :'ConversationEventRRWeb',
|
91
98
|
:'event_type' => :'String',
|
99
|
+
:'event_typing' => :'ConversationEventTyping',
|
92
100
|
:'event_updated_message' => :'ConversationMessage',
|
93
101
|
:'message' => :'ConversationMessage',
|
94
102
|
:'type' => :'String'
|
@@ -119,6 +127,10 @@ module UltracartClient
|
|
119
127
|
self.event_new_message = attributes[:'event_new_message']
|
120
128
|
end
|
121
129
|
|
130
|
+
if attributes.has_key?(:'event_participant_update')
|
131
|
+
self.event_participant_update = attributes[:'event_participant_update']
|
132
|
+
end
|
133
|
+
|
122
134
|
if attributes.has_key?(:'event_queue_position')
|
123
135
|
self.event_queue_position = attributes[:'event_queue_position']
|
124
136
|
end
|
@@ -135,6 +147,10 @@ module UltracartClient
|
|
135
147
|
self.event_type = attributes[:'event_type']
|
136
148
|
end
|
137
149
|
|
150
|
+
if attributes.has_key?(:'event_typing')
|
151
|
+
self.event_typing = attributes[:'event_typing']
|
152
|
+
end
|
153
|
+
|
138
154
|
if attributes.has_key?(:'event_updated_message')
|
139
155
|
self.event_updated_message = attributes[:'event_updated_message']
|
140
156
|
end
|
@@ -158,7 +174,7 @@ module UltracartClient
|
|
158
174
|
# Check to see if the all the properties in the model are valid
|
159
175
|
# @return true if the model is valid
|
160
176
|
def valid?
|
161
|
-
event_type_validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb'])
|
177
|
+
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'])
|
162
178
|
return false unless event_type_validator.valid?(@event_type)
|
163
179
|
type_validator = EnumAttributeValidator.new('String', ['message', 'event', 'ping', 'check queue position'])
|
164
180
|
return false unless type_validator.valid?(@type)
|
@@ -168,7 +184,7 @@ module UltracartClient
|
|
168
184
|
# Custom attribute writer method checking allowed values (enum).
|
169
185
|
# @param [Object] event_type Object to be assigned
|
170
186
|
def event_type=(event_type)
|
171
|
-
validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb'])
|
187
|
+
validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb', 'participant update'])
|
172
188
|
unless validator.valid?(event_type)
|
173
189
|
fail ArgumentError, 'invalid value for "event_type", must be one of #{validator.allowable_values}.'
|
174
190
|
end
|
@@ -194,10 +210,12 @@ module UltracartClient
|
|
194
210
|
event_conversation_closed == o.event_conversation_closed &&
|
195
211
|
event_new_conversation == o.event_new_conversation &&
|
196
212
|
event_new_message == o.event_new_message &&
|
213
|
+
event_participant_update == o.event_participant_update &&
|
197
214
|
event_queue_position == o.event_queue_position &&
|
198
215
|
event_queue_status_update == o.event_queue_status_update &&
|
199
216
|
event_rrweb == o.event_rrweb &&
|
200
217
|
event_type == o.event_type &&
|
218
|
+
event_typing == o.event_typing &&
|
201
219
|
event_updated_message == o.event_updated_message &&
|
202
220
|
message == o.message &&
|
203
221
|
type == o.type
|
@@ -212,7 +230,7 @@ module UltracartClient
|
|
212
230
|
# Calculates hash code according to all attributes.
|
213
231
|
# @return [Fixnum] Hash code
|
214
232
|
def hash
|
215
|
-
[conversation_uuid, event_conversation_closed, event_new_conversation, event_new_message, event_queue_position, event_queue_status_update, event_rrweb, event_type, event_updated_message, message, type].hash
|
233
|
+
[conversation_uuid, event_conversation_closed, event_new_conversation, event_new_message, event_participant_update, event_queue_position, event_queue_status_update, event_rrweb, event_type, event_typing, event_updated_message, message, type].hash
|
216
234
|
end
|
217
235
|
|
218
236
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -139,6 +139,7 @@ require 'ultracart_api/models/conversation_agent_auth'
|
|
139
139
|
require 'ultracart_api/models/conversation_agent_auth_response'
|
140
140
|
require 'ultracart_api/models/conversation_event_queue_position'
|
141
141
|
require 'ultracart_api/models/conversation_event_rr_web'
|
142
|
+
require 'ultracart_api/models/conversation_event_typing'
|
142
143
|
require 'ultracart_api/models/conversation_message'
|
143
144
|
require 'ultracart_api/models/conversation_message_transport_status'
|
144
145
|
require 'ultracart_api/models/conversation_multimedia_upload_url'
|
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.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -349,6 +349,7 @@ files:
|
|
349
349
|
- docs/ConversationApi.md
|
350
350
|
- docs/ConversationEventQueuePosition.md
|
351
351
|
- docs/ConversationEventRRWeb.md
|
352
|
+
- docs/ConversationEventTyping.md
|
352
353
|
- docs/ConversationMessage.md
|
353
354
|
- docs/ConversationMessageTransportStatus.md
|
354
355
|
- docs/ConversationMultimediaUploadUrl.md
|
@@ -1045,6 +1046,7 @@ files:
|
|
1045
1046
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
1046
1047
|
- lib/ultracart_api/models/conversation_event_queue_position.rb
|
1047
1048
|
- lib/ultracart_api/models/conversation_event_rr_web.rb
|
1049
|
+
- lib/ultracart_api/models/conversation_event_typing.rb
|
1048
1050
|
- lib/ultracart_api/models/conversation_message.rb
|
1049
1051
|
- lib/ultracart_api/models/conversation_message_transport_status.rb
|
1050
1052
|
- lib/ultracart_api/models/conversation_multimedia_upload_url.rb
|