ultracart_api 4.0.46.rc → 4.0.47.rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/docs/ConversationEventRRWeb.md +30 -0
- data/docs/ConversationMessage.md +2 -0
- data/docs/ConversationWebsocketMessage.md +2 -0
- data/lib/ultracart_api/models/conversation_event_rr_web.rb +308 -0
- data/lib/ultracart_api/models/conversation_message.rb +45 -1
- data/lib/ultracart_api/models/conversation_websocket_message.rb +14 -5
- 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: 5b56e3862e653530133f53316374bfe568b508be1397bd342bcb3868d5bd1e2a
|
|
4
|
+
data.tar.gz: a1b80bad1c0808acd92f862d5a76d85ce3447ecd56dfb0bbd6a3d3a499889655
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12c2c978ae72a70c7ac5928d5885b5d932f54884f7c0d6176935f789dac114847c77a201a7f0f8f1f88e290be9e4dac5adc5ffab629779e10680ebc7a9493008
|
|
7
|
+
data.tar.gz: 8043d450130625dfe07dc3ee3f33f8e3099d0595c0c17622e7326571cfbfa43a4ebe066978f5d7e972beb205c10fda92eb08e9e8eb5fd4350f8d0d84dca33eec
|
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.47.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.47.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.47.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.47.rc'
|
|
37
37
|
|
|
38
38
|
### Install from Git
|
|
39
39
|
|
|
@@ -568,6 +568,7 @@ Class | Method | HTTP request | Description
|
|
|
568
568
|
- [UltracartClient::ConversationAgentAuth](docs/ConversationAgentAuth.md)
|
|
569
569
|
- [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
|
|
570
570
|
- [UltracartClient::ConversationEventQueuePosition](docs/ConversationEventQueuePosition.md)
|
|
571
|
+
- [UltracartClient::ConversationEventRRWeb](docs/ConversationEventRRWeb.md)
|
|
571
572
|
- [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
|
|
572
573
|
- [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
|
|
573
574
|
- [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
|
|
@@ -1175,6 +1176,7 @@ Not every change is committed to every SDK.
|
|
|
1175
1176
|
|
|
1176
1177
|
| Version | Date | Comments |
|
|
1177
1178
|
| --: | :-: | --- |
|
|
1179
|
+
| 4.0.47-RC | 08/01/2022 | conversation event refinement |
|
|
1178
1180
|
| 4.0.46-RC | 07/29/2022 | conversation development |
|
|
1179
1181
|
| 4.0.45-RC | 07/28/2022 | conversation bug fixes |
|
|
1180
1182
|
| 4.0.44-RC | 07/28/2022 | conversation message upload keys property |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UltracartClient::ConversationEventRRWeb
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | **String** | | [optional] |
|
|
8
|
+
| **data_part** | **Integer** | | [optional] |
|
|
9
|
+
| **data_sha256** | **String** | | [optional] |
|
|
10
|
+
| **data_total_parts** | **Integer** | | [optional] |
|
|
11
|
+
| **data_total_sha256** | **String** | | [optional] |
|
|
12
|
+
| **event_index** | **Integer** | | [optional] |
|
|
13
|
+
| **type** | **String** | Type of event | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'ultracart_api'
|
|
19
|
+
|
|
20
|
+
instance = UltracartClient::ConversationEventRRWeb.new(
|
|
21
|
+
data: null,
|
|
22
|
+
data_part: null,
|
|
23
|
+
data_sha256: null,
|
|
24
|
+
data_total_parts: null,
|
|
25
|
+
data_total_sha256: null,
|
|
26
|
+
event_index: null,
|
|
27
|
+
type: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
data/docs/ConversationMessage.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| **media_urls** | **Array<String>** | | [optional] |
|
|
12
12
|
| **message_dts** | **String** | Message date/time | [optional] |
|
|
13
13
|
| **transport_statuses** | [**Array<ConversationMessageTransportStatus>**](ConversationMessageTransportStatus.md) | | [optional] |
|
|
14
|
+
| **type** | **String** | Message type | [optional] |
|
|
14
15
|
| **upload_keys** | **Array<String>** | | [optional] |
|
|
15
16
|
|
|
16
17
|
## Example
|
|
@@ -26,6 +27,7 @@ instance = UltracartClient::ConversationMessage.new(
|
|
|
26
27
|
media_urls: null,
|
|
27
28
|
message_dts: null,
|
|
28
29
|
transport_statuses: null,
|
|
30
|
+
type: null,
|
|
29
31
|
upload_keys: null
|
|
30
32
|
)
|
|
31
33
|
```
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
| **event_new_message** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
|
|
11
11
|
| **event_queue_position** | [**ConversationEventQueuePosition**](ConversationEventQueuePosition.md) | | [optional] |
|
|
12
12
|
| **event_queue_status_update** | [**ConversationWebchatQueueStatus**](ConversationWebchatQueueStatus.md) | | [optional] |
|
|
13
|
+
| **event_rrweb** | [**ConversationEventRRWeb**](ConversationEventRRWeb.md) | | [optional] |
|
|
13
14
|
| **event_type** | **String** | Type of event | [optional] |
|
|
14
15
|
| **event_updated_message** | [**ConversationMessage**](ConversationMessage.md) | | [optional] |
|
|
15
16
|
| **message** | [**ConversationMessage**](ConversationMessage.md) | | [optional] |
|
|
@@ -27,6 +28,7 @@ instance = UltracartClient::ConversationWebsocketMessage.new(
|
|
|
27
28
|
event_new_message: null,
|
|
28
29
|
event_queue_position: null,
|
|
29
30
|
event_queue_status_update: null,
|
|
31
|
+
event_rrweb: null,
|
|
30
32
|
event_type: null,
|
|
31
33
|
event_updated_message: null,
|
|
32
34
|
message: null,
|
|
@@ -0,0 +1,308 @@
|
|
|
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 ConversationEventRRWeb
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
attr_accessor :data_part
|
|
21
|
+
|
|
22
|
+
attr_accessor :data_sha256
|
|
23
|
+
|
|
24
|
+
attr_accessor :data_total_parts
|
|
25
|
+
|
|
26
|
+
attr_accessor :data_total_sha256
|
|
27
|
+
|
|
28
|
+
attr_accessor :event_index
|
|
29
|
+
|
|
30
|
+
# Type of event
|
|
31
|
+
attr_accessor :type
|
|
32
|
+
|
|
33
|
+
class EnumAttributeValidator
|
|
34
|
+
attr_reader :datatype
|
|
35
|
+
attr_reader :allowable_values
|
|
36
|
+
|
|
37
|
+
def initialize(datatype, allowable_values)
|
|
38
|
+
@allowable_values = allowable_values.map do |value|
|
|
39
|
+
case datatype.to_s
|
|
40
|
+
when /Integer/i
|
|
41
|
+
value.to_i
|
|
42
|
+
when /Float/i
|
|
43
|
+
value.to_f
|
|
44
|
+
else
|
|
45
|
+
value
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def valid?(value)
|
|
51
|
+
!value || allowable_values.include?(value)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
|
+
def self.attribute_map
|
|
57
|
+
{
|
|
58
|
+
:'data' => :'data',
|
|
59
|
+
:'data_part' => :'data_part',
|
|
60
|
+
:'data_sha256' => :'data_sha256',
|
|
61
|
+
:'data_total_parts' => :'data_total_parts',
|
|
62
|
+
:'data_total_sha256' => :'data_total_sha256',
|
|
63
|
+
:'event_index' => :'event_index',
|
|
64
|
+
:'type' => :'type'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns all the JSON keys this model knows about
|
|
69
|
+
def self.acceptable_attributes
|
|
70
|
+
attribute_map.values
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute type mapping.
|
|
74
|
+
def self.openapi_types
|
|
75
|
+
{
|
|
76
|
+
:'data' => :'String',
|
|
77
|
+
:'data_part' => :'Integer',
|
|
78
|
+
:'data_sha256' => :'String',
|
|
79
|
+
:'data_total_parts' => :'Integer',
|
|
80
|
+
:'data_total_sha256' => :'String',
|
|
81
|
+
:'event_index' => :'Integer',
|
|
82
|
+
:'type' => :'String'
|
|
83
|
+
}
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# List of attributes with nullable: true
|
|
87
|
+
def self.openapi_nullable
|
|
88
|
+
Set.new([
|
|
89
|
+
])
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Initializes the object
|
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
94
|
+
def initialize(attributes = {})
|
|
95
|
+
if (!attributes.is_a?(Hash))
|
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationEventRRWeb` initialize method"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
101
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationEventRRWeb`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
103
|
+
end
|
|
104
|
+
h[k.to_sym] = v
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'data')
|
|
108
|
+
self.data = attributes[:'data']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'data_part')
|
|
112
|
+
self.data_part = attributes[:'data_part']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'data_sha256')
|
|
116
|
+
self.data_sha256 = attributes[:'data_sha256']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'data_total_parts')
|
|
120
|
+
self.data_total_parts = attributes[:'data_total_parts']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'data_total_sha256')
|
|
124
|
+
self.data_total_sha256 = attributes[:'data_total_sha256']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'event_index')
|
|
128
|
+
self.event_index = attributes[:'event_index']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'type')
|
|
132
|
+
self.type = attributes[:'type']
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
137
|
+
# @return Array for valid properties with the reasons
|
|
138
|
+
def list_invalid_properties
|
|
139
|
+
invalid_properties = Array.new
|
|
140
|
+
invalid_properties
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Check to see if the all the properties in the model are valid
|
|
144
|
+
# @return true if the model is valid
|
|
145
|
+
def valid?
|
|
146
|
+
type_validator = EnumAttributeValidator.new('String', ["init", "events"])
|
|
147
|
+
return false unless type_validator.valid?(@type)
|
|
148
|
+
true
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
152
|
+
# @param [Object] type Object to be assigned
|
|
153
|
+
def type=(type)
|
|
154
|
+
validator = EnumAttributeValidator.new('String', ["init", "events"])
|
|
155
|
+
unless validator.valid?(type)
|
|
156
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
157
|
+
end
|
|
158
|
+
@type = type
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Checks equality by comparing each attribute.
|
|
162
|
+
# @param [Object] Object to be compared
|
|
163
|
+
def ==(o)
|
|
164
|
+
return true if self.equal?(o)
|
|
165
|
+
self.class == o.class &&
|
|
166
|
+
data == o.data &&
|
|
167
|
+
data_part == o.data_part &&
|
|
168
|
+
data_sha256 == o.data_sha256 &&
|
|
169
|
+
data_total_parts == o.data_total_parts &&
|
|
170
|
+
data_total_sha256 == o.data_total_sha256 &&
|
|
171
|
+
event_index == o.event_index &&
|
|
172
|
+
type == o.type
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# @see the `==` method
|
|
176
|
+
# @param [Object] Object to be compared
|
|
177
|
+
def eql?(o)
|
|
178
|
+
self == o
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Calculates hash code according to all attributes.
|
|
182
|
+
# @return [Integer] Hash code
|
|
183
|
+
def hash
|
|
184
|
+
[data, data_part, data_sha256, data_total_parts, data_total_sha256, event_index, type].hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Builds the object from hash
|
|
188
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
189
|
+
# @return [Object] Returns the model itself
|
|
190
|
+
def self.build_from_hash(attributes)
|
|
191
|
+
new.build_from_hash(attributes)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Builds the object from hash
|
|
195
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
196
|
+
# @return [Object] Returns the model itself
|
|
197
|
+
def build_from_hash(attributes)
|
|
198
|
+
return nil unless attributes.is_a?(Hash)
|
|
199
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
200
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
201
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
202
|
+
self.send("#{key}=", nil)
|
|
203
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
204
|
+
# check to ensure the input is an array given that the attribute
|
|
205
|
+
# is documented as an array but the input is not
|
|
206
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
207
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
208
|
+
end
|
|
209
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
210
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
self
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Deserializes the data based on type
|
|
218
|
+
# @param string type Data type
|
|
219
|
+
# @param string value Value to be deserialized
|
|
220
|
+
# @return [Object] Deserialized data
|
|
221
|
+
def _deserialize(type, value)
|
|
222
|
+
case type.to_sym
|
|
223
|
+
when :Time
|
|
224
|
+
Time.parse(value)
|
|
225
|
+
when :Date
|
|
226
|
+
Date.parse(value)
|
|
227
|
+
when :String
|
|
228
|
+
value.to_s
|
|
229
|
+
when :Integer
|
|
230
|
+
value.to_i
|
|
231
|
+
when :Float
|
|
232
|
+
value.to_f
|
|
233
|
+
when :Boolean
|
|
234
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
235
|
+
true
|
|
236
|
+
else
|
|
237
|
+
false
|
|
238
|
+
end
|
|
239
|
+
when :Object
|
|
240
|
+
# generic object (usually a Hash), return directly
|
|
241
|
+
value
|
|
242
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
243
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
244
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
245
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
246
|
+
k_type = Regexp.last_match[:k_type]
|
|
247
|
+
v_type = Regexp.last_match[:v_type]
|
|
248
|
+
{}.tap do |hash|
|
|
249
|
+
value.each do |k, v|
|
|
250
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
else # model
|
|
254
|
+
# models (e.g. Pet) or oneOf
|
|
255
|
+
klass = UltracartClient.const_get(type)
|
|
256
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Returns the string representation of the object
|
|
261
|
+
# @return [String] String presentation of the object
|
|
262
|
+
def to_s
|
|
263
|
+
to_hash.to_s
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
267
|
+
# @return [Hash] Returns the object in the form of hash
|
|
268
|
+
def to_body
|
|
269
|
+
to_hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Returns the object in the form of hash
|
|
273
|
+
# @return [Hash] Returns the object in the form of hash
|
|
274
|
+
def to_hash
|
|
275
|
+
hash = {}
|
|
276
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
277
|
+
value = self.send(attr)
|
|
278
|
+
if value.nil?
|
|
279
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
280
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
hash[param] = _to_hash(value)
|
|
284
|
+
end
|
|
285
|
+
hash
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Outputs non-array value in the form of hash
|
|
289
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
290
|
+
# @param [Object] value Any valid value
|
|
291
|
+
# @return [Hash] Returns the value in the form of hash
|
|
292
|
+
def _to_hash(value)
|
|
293
|
+
if value.is_a?(Array)
|
|
294
|
+
value.compact.map { |v| _to_hash(v) }
|
|
295
|
+
elsif value.is_a?(Hash)
|
|
296
|
+
{}.tap do |hash|
|
|
297
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
298
|
+
end
|
|
299
|
+
elsif value.respond_to? :to_hash
|
|
300
|
+
value.to_hash
|
|
301
|
+
else
|
|
302
|
+
value
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
end
|
|
@@ -30,8 +30,33 @@ module UltracartClient
|
|
|
30
30
|
|
|
31
31
|
attr_accessor :transport_statuses
|
|
32
32
|
|
|
33
|
+
# Message type
|
|
34
|
+
attr_accessor :type
|
|
35
|
+
|
|
33
36
|
attr_accessor :upload_keys
|
|
34
37
|
|
|
38
|
+
class EnumAttributeValidator
|
|
39
|
+
attr_reader :datatype
|
|
40
|
+
attr_reader :allowable_values
|
|
41
|
+
|
|
42
|
+
def initialize(datatype, allowable_values)
|
|
43
|
+
@allowable_values = allowable_values.map do |value|
|
|
44
|
+
case datatype.to_s
|
|
45
|
+
when /Integer/i
|
|
46
|
+
value.to_i
|
|
47
|
+
when /Float/i
|
|
48
|
+
value.to_f
|
|
49
|
+
else
|
|
50
|
+
value
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def valid?(value)
|
|
56
|
+
!value || allowable_values.include?(value)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
35
60
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
61
|
def self.attribute_map
|
|
37
62
|
{
|
|
@@ -42,6 +67,7 @@ module UltracartClient
|
|
|
42
67
|
:'media_urls' => :'media_urls',
|
|
43
68
|
:'message_dts' => :'message_dts',
|
|
44
69
|
:'transport_statuses' => :'transport_statuses',
|
|
70
|
+
:'type' => :'type',
|
|
45
71
|
:'upload_keys' => :'upload_keys'
|
|
46
72
|
}
|
|
47
73
|
end
|
|
@@ -61,6 +87,7 @@ module UltracartClient
|
|
|
61
87
|
:'media_urls' => :'Array<String>',
|
|
62
88
|
:'message_dts' => :'String',
|
|
63
89
|
:'transport_statuses' => :'Array<ConversationMessageTransportStatus>',
|
|
90
|
+
:'type' => :'String',
|
|
64
91
|
:'upload_keys' => :'Array<String>'
|
|
65
92
|
}
|
|
66
93
|
end
|
|
@@ -118,6 +145,10 @@ module UltracartClient
|
|
|
118
145
|
end
|
|
119
146
|
end
|
|
120
147
|
|
|
148
|
+
if attributes.key?(:'type')
|
|
149
|
+
self.type = attributes[:'type']
|
|
150
|
+
end
|
|
151
|
+
|
|
121
152
|
if attributes.key?(:'upload_keys')
|
|
122
153
|
if (value = attributes[:'upload_keys']).is_a?(Array)
|
|
123
154
|
self.upload_keys = value
|
|
@@ -135,9 +166,21 @@ module UltracartClient
|
|
|
135
166
|
# Check to see if the all the properties in the model are valid
|
|
136
167
|
# @return true if the model is valid
|
|
137
168
|
def valid?
|
|
169
|
+
type_validator = EnumAttributeValidator.new('String', ["message", "notice"])
|
|
170
|
+
return false unless type_validator.valid?(@type)
|
|
138
171
|
true
|
|
139
172
|
end
|
|
140
173
|
|
|
174
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
175
|
+
# @param [Object] type Object to be assigned
|
|
176
|
+
def type=(type)
|
|
177
|
+
validator = EnumAttributeValidator.new('String', ["message", "notice"])
|
|
178
|
+
unless validator.valid?(type)
|
|
179
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
180
|
+
end
|
|
181
|
+
@type = type
|
|
182
|
+
end
|
|
183
|
+
|
|
141
184
|
# Checks equality by comparing each attribute.
|
|
142
185
|
# @param [Object] Object to be compared
|
|
143
186
|
def ==(o)
|
|
@@ -150,6 +193,7 @@ module UltracartClient
|
|
|
150
193
|
media_urls == o.media_urls &&
|
|
151
194
|
message_dts == o.message_dts &&
|
|
152
195
|
transport_statuses == o.transport_statuses &&
|
|
196
|
+
type == o.type &&
|
|
153
197
|
upload_keys == o.upload_keys
|
|
154
198
|
end
|
|
155
199
|
|
|
@@ -162,7 +206,7 @@ module UltracartClient
|
|
|
162
206
|
# Calculates hash code according to all attributes.
|
|
163
207
|
# @return [Integer] Hash code
|
|
164
208
|
def hash
|
|
165
|
-
[author_conversation_participant_arn, author_conversation_participant_name, body, client_message_id, media_urls, message_dts, transport_statuses, upload_keys].hash
|
|
209
|
+
[author_conversation_participant_arn, author_conversation_participant_name, body, client_message_id, media_urls, message_dts, transport_statuses, type, upload_keys].hash
|
|
166
210
|
end
|
|
167
211
|
|
|
168
212
|
# Builds the object from hash
|
|
@@ -28,6 +28,8 @@ module UltracartClient
|
|
|
28
28
|
|
|
29
29
|
attr_accessor :event_queue_status_update
|
|
30
30
|
|
|
31
|
+
attr_accessor :event_rrweb
|
|
32
|
+
|
|
31
33
|
# Type of event
|
|
32
34
|
attr_accessor :event_type
|
|
33
35
|
|
|
@@ -69,6 +71,7 @@ module UltracartClient
|
|
|
69
71
|
:'event_new_message' => :'event_new_message',
|
|
70
72
|
:'event_queue_position' => :'event_queue_position',
|
|
71
73
|
:'event_queue_status_update' => :'event_queue_status_update',
|
|
74
|
+
:'event_rrweb' => :'event_rrweb',
|
|
72
75
|
:'event_type' => :'event_type',
|
|
73
76
|
:'event_updated_message' => :'event_updated_message',
|
|
74
77
|
:'message' => :'message',
|
|
@@ -90,6 +93,7 @@ module UltracartClient
|
|
|
90
93
|
:'event_new_message' => :'ConversationSummary',
|
|
91
94
|
:'event_queue_position' => :'ConversationEventQueuePosition',
|
|
92
95
|
:'event_queue_status_update' => :'ConversationWebchatQueueStatus',
|
|
96
|
+
:'event_rrweb' => :'ConversationEventRRWeb',
|
|
93
97
|
:'event_type' => :'String',
|
|
94
98
|
:'event_updated_message' => :'ConversationMessage',
|
|
95
99
|
:'message' => :'ConversationMessage',
|
|
@@ -142,6 +146,10 @@ module UltracartClient
|
|
|
142
146
|
self.event_queue_status_update = attributes[:'event_queue_status_update']
|
|
143
147
|
end
|
|
144
148
|
|
|
149
|
+
if attributes.key?(:'event_rrweb')
|
|
150
|
+
self.event_rrweb = attributes[:'event_rrweb']
|
|
151
|
+
end
|
|
152
|
+
|
|
145
153
|
if attributes.key?(:'event_type')
|
|
146
154
|
self.event_type = attributes[:'event_type']
|
|
147
155
|
end
|
|
@@ -169,9 +177,9 @@ module UltracartClient
|
|
|
169
177
|
# Check to see if the all the properties in the model are valid
|
|
170
178
|
# @return true if the model is valid
|
|
171
179
|
def valid?
|
|
172
|
-
event_type_validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update"])
|
|
180
|
+
event_type_validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb"])
|
|
173
181
|
return false unless event_type_validator.valid?(@event_type)
|
|
174
|
-
type_validator = EnumAttributeValidator.new('String', ["message", "event", "ping"])
|
|
182
|
+
type_validator = EnumAttributeValidator.new('String', ["message", "event", "ping", "check queue position"])
|
|
175
183
|
return false unless type_validator.valid?(@type)
|
|
176
184
|
true
|
|
177
185
|
end
|
|
@@ -179,7 +187,7 @@ module UltracartClient
|
|
|
179
187
|
# Custom attribute writer method checking allowed values (enum).
|
|
180
188
|
# @param [Object] event_type Object to be assigned
|
|
181
189
|
def event_type=(event_type)
|
|
182
|
-
validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update"])
|
|
190
|
+
validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb"])
|
|
183
191
|
unless validator.valid?(event_type)
|
|
184
192
|
fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
|
|
185
193
|
end
|
|
@@ -189,7 +197,7 @@ module UltracartClient
|
|
|
189
197
|
# Custom attribute writer method checking allowed values (enum).
|
|
190
198
|
# @param [Object] type Object to be assigned
|
|
191
199
|
def type=(type)
|
|
192
|
-
validator = EnumAttributeValidator.new('String', ["message", "event", "ping"])
|
|
200
|
+
validator = EnumAttributeValidator.new('String', ["message", "event", "ping", "check queue position"])
|
|
193
201
|
unless validator.valid?(type)
|
|
194
202
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
195
203
|
end
|
|
@@ -207,6 +215,7 @@ module UltracartClient
|
|
|
207
215
|
event_new_message == o.event_new_message &&
|
|
208
216
|
event_queue_position == o.event_queue_position &&
|
|
209
217
|
event_queue_status_update == o.event_queue_status_update &&
|
|
218
|
+
event_rrweb == o.event_rrweb &&
|
|
210
219
|
event_type == o.event_type &&
|
|
211
220
|
event_updated_message == o.event_updated_message &&
|
|
212
221
|
message == o.message &&
|
|
@@ -222,7 +231,7 @@ module UltracartClient
|
|
|
222
231
|
# Calculates hash code according to all attributes.
|
|
223
232
|
# @return [Integer] Hash code
|
|
224
233
|
def hash
|
|
225
|
-
[conversation_uuid, event_conversation_closed, event_new_conversation, event_new_message, event_queue_position, event_queue_status_update, event_type, event_updated_message, message, type].hash
|
|
234
|
+
[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
|
|
226
235
|
end
|
|
227
236
|
|
|
228
237
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -138,6 +138,7 @@ require 'ultracart_api/models/conversation'
|
|
|
138
138
|
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
|
+
require 'ultracart_api/models/conversation_event_rr_web'
|
|
141
142
|
require 'ultracart_api/models/conversation_message'
|
|
142
143
|
require 'ultracart_api/models/conversation_message_transport_status'
|
|
143
144
|
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: 4.0.
|
|
4
|
+
version: 4.0.47.rc
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-08-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -188,6 +188,7 @@ files:
|
|
|
188
188
|
- docs/ConversationAgentAuthResponse.md
|
|
189
189
|
- docs/ConversationApi.md
|
|
190
190
|
- docs/ConversationEventQueuePosition.md
|
|
191
|
+
- docs/ConversationEventRRWeb.md
|
|
191
192
|
- docs/ConversationMessage.md
|
|
192
193
|
- docs/ConversationMessageTransportStatus.md
|
|
193
194
|
- docs/ConversationMultimediaUploadUrl.md
|
|
@@ -880,6 +881,7 @@ files:
|
|
|
880
881
|
- lib/ultracart_api/models/conversation_agent_auth.rb
|
|
881
882
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
|
882
883
|
- lib/ultracart_api/models/conversation_event_queue_position.rb
|
|
884
|
+
- lib/ultracart_api/models/conversation_event_rr_web.rb
|
|
883
885
|
- lib/ultracart_api/models/conversation_message.rb
|
|
884
886
|
- lib/ultracart_api/models/conversation_message_transport_status.rb
|
|
885
887
|
- lib/ultracart_api/models/conversation_multimedia_upload_url.rb
|