ultracart_api 4.0.95.rc → 4.0.97.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 +20 -4
- data/docs/ConversationApi.md +439 -5
- data/docs/ConversationCannedMessage.md +2 -2
- data/docs/ConversationDepartment.md +26 -0
- data/docs/ConversationDepartmentResponse.md +26 -0
- data/docs/ConversationDepartmentsResponse.md +26 -0
- data/docs/ConversationEngagement.md +30 -0
- data/docs/ConversationEngagementResponse.md +26 -0
- data/docs/ConversationEngagementsResponse.md +26 -0
- data/docs/ConversationJoinRequest.md +18 -0
- data/docs/ConversationMessage.md +4 -0
- data/docs/ConversationMessageTranslation.md +20 -0
- data/docs/ConversationParticipant.md +6 -0
- data/docs/ConversationWebchatQueueStatusQueueEntry.md +2 -0
- data/lib/ultracart_api/api/conversation_api.rb +412 -1
- data/lib/ultracart_api/models/conversation_canned_message.rb +8 -8
- data/lib/ultracart_api/models/conversation_department.rb +255 -0
- data/lib/ultracart_api/models/conversation_department_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_departments_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_engagement.rb +275 -0
- data/lib/ultracart_api/models/conversation_engagement_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_engagements_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_join_request.rb +219 -0
- data/lib/ultracart_api/models/conversation_message.rb +21 -1
- data/lib/ultracart_api/models/conversation_message_translation.rb +228 -0
- data/lib/ultracart_api/models/conversation_participant.rb +28 -1
- data/lib/ultracart_api/models/conversation_webchat_queue_status_queue_entry.rb +10 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +8 -0
- metadata +18 -2
@@ -0,0 +1,219 @@
|
|
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 ConversationJoinRequest
|
18
|
+
attr_accessor :participant_language_iso_code
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'participant_language_iso_code' => :'participant_language_iso_code'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'participant_language_iso_code' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationJoinRequest` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationJoinRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'participant_language_iso_code')
|
61
|
+
self.participant_language_iso_code = attributes[:'participant_language_iso_code']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
participant_language_iso_code == o.participant_language_iso_code
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[participant_language_iso_code].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
attributes = attributes.transform_keys(&:to_sym)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = UltracartClient.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
@@ -28,6 +28,8 @@ module UltracartClient
|
|
28
28
|
# Delay message transmission until date/time
|
29
29
|
attr_accessor :delay_until_dts
|
30
30
|
|
31
|
+
attr_accessor :language_iso_code
|
32
|
+
|
31
33
|
attr_accessor :media_urls
|
32
34
|
|
33
35
|
attr_accessor :merchant_id
|
@@ -38,6 +40,8 @@ module UltracartClient
|
|
38
40
|
# Message epoch milliseconds
|
39
41
|
attr_accessor :message_epoch
|
40
42
|
|
43
|
+
attr_accessor :translations
|
44
|
+
|
41
45
|
attr_accessor :transport_statuses
|
42
46
|
|
43
47
|
# Message type
|
@@ -76,10 +80,12 @@ module UltracartClient
|
|
76
80
|
:'client_message_id' => :'client_message_id',
|
77
81
|
:'conversation_message_uuid' => :'conversation_message_uuid',
|
78
82
|
:'delay_until_dts' => :'delay_until_dts',
|
83
|
+
:'language_iso_code' => :'language_iso_code',
|
79
84
|
:'media_urls' => :'media_urls',
|
80
85
|
:'merchant_id' => :'merchant_id',
|
81
86
|
:'message_dts' => :'message_dts',
|
82
87
|
:'message_epoch' => :'message_epoch',
|
88
|
+
:'translations' => :'translations',
|
83
89
|
:'transport_statuses' => :'transport_statuses',
|
84
90
|
:'type' => :'type',
|
85
91
|
:'upload_keys' => :'upload_keys'
|
@@ -100,10 +106,12 @@ module UltracartClient
|
|
100
106
|
:'client_message_id' => :'String',
|
101
107
|
:'conversation_message_uuid' => :'String',
|
102
108
|
:'delay_until_dts' => :'String',
|
109
|
+
:'language_iso_code' => :'String',
|
103
110
|
:'media_urls' => :'Array<String>',
|
104
111
|
:'merchant_id' => :'String',
|
105
112
|
:'message_dts' => :'String',
|
106
113
|
:'message_epoch' => :'Integer',
|
114
|
+
:'translations' => :'Array<ConversationMessageTranslation>',
|
107
115
|
:'transport_statuses' => :'Array<ConversationMessageTransportStatus>',
|
108
116
|
:'type' => :'String',
|
109
117
|
:'upload_keys' => :'Array<String>'
|
@@ -155,6 +163,10 @@ module UltracartClient
|
|
155
163
|
self.delay_until_dts = attributes[:'delay_until_dts']
|
156
164
|
end
|
157
165
|
|
166
|
+
if attributes.key?(:'language_iso_code')
|
167
|
+
self.language_iso_code = attributes[:'language_iso_code']
|
168
|
+
end
|
169
|
+
|
158
170
|
if attributes.key?(:'media_urls')
|
159
171
|
if (value = attributes[:'media_urls']).is_a?(Array)
|
160
172
|
self.media_urls = value
|
@@ -173,6 +185,12 @@ module UltracartClient
|
|
173
185
|
self.message_epoch = attributes[:'message_epoch']
|
174
186
|
end
|
175
187
|
|
188
|
+
if attributes.key?(:'translations')
|
189
|
+
if (value = attributes[:'translations']).is_a?(Array)
|
190
|
+
self.translations = value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
176
194
|
if attributes.key?(:'transport_statuses')
|
177
195
|
if (value = attributes[:'transport_statuses']).is_a?(Array)
|
178
196
|
self.transport_statuses = value
|
@@ -226,10 +244,12 @@ module UltracartClient
|
|
226
244
|
client_message_id == o.client_message_id &&
|
227
245
|
conversation_message_uuid == o.conversation_message_uuid &&
|
228
246
|
delay_until_dts == o.delay_until_dts &&
|
247
|
+
language_iso_code == o.language_iso_code &&
|
229
248
|
media_urls == o.media_urls &&
|
230
249
|
merchant_id == o.merchant_id &&
|
231
250
|
message_dts == o.message_dts &&
|
232
251
|
message_epoch == o.message_epoch &&
|
252
|
+
translations == o.translations &&
|
233
253
|
transport_statuses == o.transport_statuses &&
|
234
254
|
type == o.type &&
|
235
255
|
upload_keys == o.upload_keys
|
@@ -244,7 +264,7 @@ module UltracartClient
|
|
244
264
|
# Calculates hash code according to all attributes.
|
245
265
|
# @return [Integer] Hash code
|
246
266
|
def hash
|
247
|
-
[author_conversation_participant_arn, author_conversation_participant_name, body, client_message_id, conversation_message_uuid, delay_until_dts, media_urls, merchant_id, message_dts, message_epoch, transport_statuses, type, upload_keys].hash
|
267
|
+
[author_conversation_participant_arn, author_conversation_participant_name, body, client_message_id, conversation_message_uuid, delay_until_dts, language_iso_code, media_urls, merchant_id, message_dts, message_epoch, translations, transport_statuses, type, upload_keys].hash
|
248
268
|
end
|
249
269
|
|
250
270
|
# Builds the object from hash
|
@@ -0,0 +1,228 @@
|
|
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 ConversationMessageTranslation
|
18
|
+
attr_accessor :body
|
19
|
+
|
20
|
+
attr_accessor :language_iso_code
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'body' => :'body',
|
26
|
+
:'language_iso_code' => :'language_iso_code'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'body' => :'String',
|
39
|
+
:'language_iso_code' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationMessageTranslation` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationMessageTranslation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'body')
|
65
|
+
self.body = attributes[:'body']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'language_iso_code')
|
69
|
+
self.language_iso_code = attributes[:'language_iso_code']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
invalid_properties = Array.new
|
77
|
+
invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
body == o.body &&
|
92
|
+
language_iso_code == o.language_iso_code
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[body, language_iso_code].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
new.build_from_hash(attributes)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
attributes = attributes.transform_keys(&:to_sym)
|
120
|
+
self.class.openapi_types.each_pair do |key, type|
|
121
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
122
|
+
self.send("#{key}=", nil)
|
123
|
+
elsif 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
|
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 :Time
|
144
|
+
Time.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
|
+
# models (e.g. Pet) or oneOf
|
175
|
+
klass = UltracartClient.const_get(type)
|
176
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Returns the string representation of the object
|
181
|
+
# @return [String] String presentation of the object
|
182
|
+
def to_s
|
183
|
+
to_hash.to_s
|
184
|
+
end
|
185
|
+
|
186
|
+
# to_body is an alias to to_hash (backward compatibility)
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_body
|
189
|
+
to_hash
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the object in the form of hash
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_hash
|
195
|
+
hash = {}
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
197
|
+
value = self.send(attr)
|
198
|
+
if value.nil?
|
199
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
200
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
201
|
+
end
|
202
|
+
|
203
|
+
hash[param] = _to_hash(value)
|
204
|
+
end
|
205
|
+
hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Outputs non-array value in the form of hash
|
209
|
+
# For object, use to_hash. Otherwise, just return the value
|
210
|
+
# @param [Object] value Any valid value
|
211
|
+
# @return [Hash] Returns the value in the form of hash
|
212
|
+
def _to_hash(value)
|
213
|
+
if value.is_a?(Array)
|
214
|
+
value.compact.map { |v| _to_hash(v) }
|
215
|
+
elsif value.is_a?(Hash)
|
216
|
+
{}.tap do |hash|
|
217
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
218
|
+
end
|
219
|
+
elsif value.respond_to? :to_hash
|
220
|
+
value.to_hash
|
221
|
+
else
|
222
|
+
value
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
@@ -21,9 +21,13 @@ module UltracartClient
|
|
21
21
|
|
22
22
|
attr_accessor :conversation_participant_uuid
|
23
23
|
|
24
|
+
attr_accessor :email
|
25
|
+
|
24
26
|
# Joined conversation date/time
|
25
27
|
attr_accessor :joined_dts
|
26
28
|
|
29
|
+
attr_accessor :language_iso_code
|
30
|
+
|
27
31
|
# Last message date/time
|
28
32
|
attr_accessor :last_message_dts
|
29
33
|
|
@@ -32,6 +36,8 @@ module UltracartClient
|
|
32
36
|
|
33
37
|
attr_accessor :profile_image_url
|
34
38
|
|
39
|
+
attr_accessor :sms_phone_number
|
40
|
+
|
35
41
|
attr_accessor :status
|
36
42
|
|
37
43
|
attr_accessor :timezone
|
@@ -44,10 +50,13 @@ module UltracartClient
|
|
44
50
|
:'conversation_participant_arn' => :'conversation_participant_arn',
|
45
51
|
:'conversation_participant_name' => :'conversation_participant_name',
|
46
52
|
:'conversation_participant_uuid' => :'conversation_participant_uuid',
|
53
|
+
:'email' => :'email',
|
47
54
|
:'joined_dts' => :'joined_dts',
|
55
|
+
:'language_iso_code' => :'language_iso_code',
|
48
56
|
:'last_message_dts' => :'last_message_dts',
|
49
57
|
:'left_dts' => :'left_dts',
|
50
58
|
:'profile_image_url' => :'profile_image_url',
|
59
|
+
:'sms_phone_number' => :'sms_phone_number',
|
51
60
|
:'status' => :'status',
|
52
61
|
:'timezone' => :'timezone',
|
53
62
|
:'unread_messages' => :'unread_messages'
|
@@ -65,10 +74,13 @@ module UltracartClient
|
|
65
74
|
:'conversation_participant_arn' => :'String',
|
66
75
|
:'conversation_participant_name' => :'String',
|
67
76
|
:'conversation_participant_uuid' => :'String',
|
77
|
+
:'email' => :'String',
|
68
78
|
:'joined_dts' => :'String',
|
79
|
+
:'language_iso_code' => :'String',
|
69
80
|
:'last_message_dts' => :'String',
|
70
81
|
:'left_dts' => :'String',
|
71
82
|
:'profile_image_url' => :'String',
|
83
|
+
:'sms_phone_number' => :'String',
|
72
84
|
:'status' => :'String',
|
73
85
|
:'timezone' => :'String',
|
74
86
|
:'unread_messages' => :'Integer'
|
@@ -108,10 +120,18 @@ module UltracartClient
|
|
108
120
|
self.conversation_participant_uuid = attributes[:'conversation_participant_uuid']
|
109
121
|
end
|
110
122
|
|
123
|
+
if attributes.key?(:'email')
|
124
|
+
self.email = attributes[:'email']
|
125
|
+
end
|
126
|
+
|
111
127
|
if attributes.key?(:'joined_dts')
|
112
128
|
self.joined_dts = attributes[:'joined_dts']
|
113
129
|
end
|
114
130
|
|
131
|
+
if attributes.key?(:'language_iso_code')
|
132
|
+
self.language_iso_code = attributes[:'language_iso_code']
|
133
|
+
end
|
134
|
+
|
115
135
|
if attributes.key?(:'last_message_dts')
|
116
136
|
self.last_message_dts = attributes[:'last_message_dts']
|
117
137
|
end
|
@@ -124,6 +144,10 @@ module UltracartClient
|
|
124
144
|
self.profile_image_url = attributes[:'profile_image_url']
|
125
145
|
end
|
126
146
|
|
147
|
+
if attributes.key?(:'sms_phone_number')
|
148
|
+
self.sms_phone_number = attributes[:'sms_phone_number']
|
149
|
+
end
|
150
|
+
|
127
151
|
if attributes.key?(:'status')
|
128
152
|
self.status = attributes[:'status']
|
129
153
|
end
|
@@ -158,10 +182,13 @@ module UltracartClient
|
|
158
182
|
conversation_participant_arn == o.conversation_participant_arn &&
|
159
183
|
conversation_participant_name == o.conversation_participant_name &&
|
160
184
|
conversation_participant_uuid == o.conversation_participant_uuid &&
|
185
|
+
email == o.email &&
|
161
186
|
joined_dts == o.joined_dts &&
|
187
|
+
language_iso_code == o.language_iso_code &&
|
162
188
|
last_message_dts == o.last_message_dts &&
|
163
189
|
left_dts == o.left_dts &&
|
164
190
|
profile_image_url == o.profile_image_url &&
|
191
|
+
sms_phone_number == o.sms_phone_number &&
|
165
192
|
status == o.status &&
|
166
193
|
timezone == o.timezone &&
|
167
194
|
unread_messages == o.unread_messages
|
@@ -176,7 +203,7 @@ module UltracartClient
|
|
176
203
|
# Calculates hash code according to all attributes.
|
177
204
|
# @return [Integer] Hash code
|
178
205
|
def hash
|
179
|
-
[conversation_participant_arn, conversation_participant_name, conversation_participant_uuid, joined_dts, last_message_dts, left_dts, profile_image_url, status, timezone, unread_messages].hash
|
206
|
+
[conversation_participant_arn, conversation_participant_name, conversation_participant_uuid, email, joined_dts, language_iso_code, last_message_dts, left_dts, profile_image_url, sms_phone_number, status, timezone, unread_messages].hash
|
180
207
|
end
|
181
208
|
|
182
209
|
# Builds the object from hash
|
@@ -26,6 +26,8 @@ module UltracartClient
|
|
26
26
|
# Date/time the customer joined the queue
|
27
27
|
attr_accessor :join_dts
|
28
28
|
|
29
|
+
attr_accessor :participant_language_iso_code
|
30
|
+
|
29
31
|
attr_accessor :question
|
30
32
|
|
31
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -36,6 +38,7 @@ module UltracartClient
|
|
36
38
|
:'conversation_webchat_queue_uuid' => :'conversation_webchat_queue_uuid',
|
37
39
|
:'email' => :'email',
|
38
40
|
:'join_dts' => :'join_dts',
|
41
|
+
:'participant_language_iso_code' => :'participant_language_iso_code',
|
39
42
|
:'question' => :'question'
|
40
43
|
}
|
41
44
|
end
|
@@ -53,6 +56,7 @@ module UltracartClient
|
|
53
56
|
:'conversation_webchat_queue_uuid' => :'String',
|
54
57
|
:'email' => :'String',
|
55
58
|
:'join_dts' => :'String',
|
59
|
+
:'participant_language_iso_code' => :'String',
|
56
60
|
:'question' => :'String'
|
57
61
|
}
|
58
62
|
end
|
@@ -98,6 +102,10 @@ module UltracartClient
|
|
98
102
|
self.join_dts = attributes[:'join_dts']
|
99
103
|
end
|
100
104
|
|
105
|
+
if attributes.key?(:'participant_language_iso_code')
|
106
|
+
self.participant_language_iso_code = attributes[:'participant_language_iso_code']
|
107
|
+
end
|
108
|
+
|
101
109
|
if attributes.key?(:'question')
|
102
110
|
self.question = attributes[:'question']
|
103
111
|
end
|
@@ -126,6 +134,7 @@ module UltracartClient
|
|
126
134
|
conversation_webchat_queue_uuid == o.conversation_webchat_queue_uuid &&
|
127
135
|
email == o.email &&
|
128
136
|
join_dts == o.join_dts &&
|
137
|
+
participant_language_iso_code == o.participant_language_iso_code &&
|
129
138
|
question == o.question
|
130
139
|
end
|
131
140
|
|
@@ -138,7 +147,7 @@ module UltracartClient
|
|
138
147
|
# Calculates hash code according to all attributes.
|
139
148
|
# @return [Integer] Hash code
|
140
149
|
def hash
|
141
|
-
[conversation_participant_arn, conversation_participant_name, conversation_webchat_queue_uuid, email, join_dts, question].hash
|
150
|
+
[conversation_participant_arn, conversation_participant_name, conversation_webchat_queue_uuid, email, join_dts, participant_language_iso_code, question].hash
|
142
151
|
end
|
143
152
|
|
144
153
|
# Builds the object from hash
|