ultracart_api 4.0.95.rc → 4.0.96.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/ConversationCannedMessage.md +2 -2
- data/docs/ConversationMessage.md +4 -0
- data/docs/ConversationMessageTranslation.md +20 -0
- data/docs/ConversationParticipant.md +2 -0
- data/lib/ultracart_api/models/conversation_canned_message.rb +8 -8
- 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 +10 -1
- 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: 4417b0d5725a8766fe148d09d5209ae888791c1be0f874684343e09b334cc85a
|
|
4
|
+
data.tar.gz: 6bdf3db0451ee68e97696ea640d0284fb2c92d9c34429fe2da593d83807e1a33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d61110f16008bfc3760030ddb30b689d95571c7097d4d5e65c1f0d4c23a3cc49058ff7bf2cfe177525717628a42344f0885c8a393f3ac52365148117d2d5b723
|
|
7
|
+
data.tar.gz: 139c8ad64b700e430a3f7cf266378bbf71a72beb5a29922c8f68c94d1ac9c40cf89132914872676fbb4f654d29b62b6d493668389ef5a39999ed287a7eeb60e6
|
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.96.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.96.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.96.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.96.rc'
|
|
37
37
|
|
|
38
38
|
### Install from Git
|
|
39
39
|
|
|
@@ -607,6 +607,7 @@ Class | Method | HTTP request | Description
|
|
|
607
607
|
- [UltracartClient::ConversationEventTyping](docs/ConversationEventTyping.md)
|
|
608
608
|
- [UltracartClient::ConversationEventWebchatContext](docs/ConversationEventWebchatContext.md)
|
|
609
609
|
- [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
|
|
610
|
+
- [UltracartClient::ConversationMessageTranslation](docs/ConversationMessageTranslation.md)
|
|
610
611
|
- [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
|
|
611
612
|
- [UltracartClient::ConversationMessagesResponse](docs/ConversationMessagesResponse.md)
|
|
612
613
|
- [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
|
|
@@ -1244,6 +1245,7 @@ Not every change is committed to every SDK.
|
|
|
1244
1245
|
|
|
1245
1246
|
| Version | Date | Comments |
|
|
1246
1247
|
| --: | :-: | --- |
|
|
1248
|
+
| 4.0.96-RC | 12/09/2022 | conversations - message translation |
|
|
1247
1249
|
| 4.0.95-RC | 12/08/2022 | conversation canned messages |
|
|
1248
1250
|
| 4.0.94-RC | 12/08/2022 | communications - expose the rebuild percentage |
|
|
1249
1251
|
| 4.0.93-RC | 12/06/2022 | convo - add session_start_dts to webchat context, cart - add customer_profile.signup_dts |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **canned_message** | **String** | | [optional] |
|
|
8
8
|
| **conversation_canned_message_oid** | **Integer** | | [optional] |
|
|
9
|
-
| **
|
|
9
|
+
| **conversation_department_oids** | **Array<String>** | | [optional] |
|
|
10
10
|
| **short_code** | **String** | | [optional] |
|
|
11
11
|
|
|
12
12
|
## Example
|
|
@@ -17,7 +17,7 @@ require 'ultracart_api'
|
|
|
17
17
|
instance = UltracartClient::ConversationCannedMessage.new(
|
|
18
18
|
canned_message: null,
|
|
19
19
|
conversation_canned_message_oid: null,
|
|
20
|
-
|
|
20
|
+
conversation_department_oids: null,
|
|
21
21
|
short_code: null
|
|
22
22
|
)
|
|
23
23
|
```
|
data/docs/ConversationMessage.md
CHANGED
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
| **client_message_id** | **String** | | [optional] |
|
|
11
11
|
| **conversation_message_uuid** | **String** | | [optional] |
|
|
12
12
|
| **delay_until_dts** | **String** | Delay message transmission until date/time | [optional] |
|
|
13
|
+
| **language_iso_code** | **String** | | [optional] |
|
|
13
14
|
| **media_urls** | **Array<String>** | | [optional] |
|
|
14
15
|
| **merchant_id** | **String** | | [optional] |
|
|
15
16
|
| **message_dts** | **String** | Message date/time | [optional] |
|
|
16
17
|
| **message_epoch** | **Integer** | Message epoch milliseconds | [optional] |
|
|
18
|
+
| **translations** | [**Array<ConversationMessageTranslation>**](ConversationMessageTranslation.md) | | [optional] |
|
|
17
19
|
| **transport_statuses** | [**Array<ConversationMessageTransportStatus>**](ConversationMessageTransportStatus.md) | | [optional] |
|
|
18
20
|
| **type** | **String** | Message type | [optional] |
|
|
19
21
|
| **upload_keys** | **Array<String>** | | [optional] |
|
|
@@ -30,10 +32,12 @@ instance = UltracartClient::ConversationMessage.new(
|
|
|
30
32
|
client_message_id: null,
|
|
31
33
|
conversation_message_uuid: null,
|
|
32
34
|
delay_until_dts: null,
|
|
35
|
+
language_iso_code: null,
|
|
33
36
|
media_urls: null,
|
|
34
37
|
merchant_id: null,
|
|
35
38
|
message_dts: null,
|
|
36
39
|
message_epoch: null,
|
|
40
|
+
translations: null,
|
|
37
41
|
transport_statuses: null,
|
|
38
42
|
type: null,
|
|
39
43
|
upload_keys: null
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# UltracartClient::ConversationMessageTranslation
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **body** | **String** | | [optional] |
|
|
8
|
+
| **language_iso_code** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ultracart_api'
|
|
14
|
+
|
|
15
|
+
instance = UltracartClient::ConversationMessageTranslation.new(
|
|
16
|
+
body: null,
|
|
17
|
+
language_iso_code: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| **conversation_participant_name** | **String** | | [optional] |
|
|
9
9
|
| **conversation_participant_uuid** | **String** | | [optional] |
|
|
10
10
|
| **joined_dts** | **String** | Joined conversation date/time | [optional] |
|
|
11
|
+
| **language_iso_code** | **String** | | [optional] |
|
|
11
12
|
| **last_message_dts** | **String** | Last message date/time | [optional] |
|
|
12
13
|
| **left_dts** | **String** | Left conversation date/time | [optional] |
|
|
13
14
|
| **profile_image_url** | **String** | | [optional] |
|
|
@@ -25,6 +26,7 @@ instance = UltracartClient::ConversationParticipant.new(
|
|
|
25
26
|
conversation_participant_name: null,
|
|
26
27
|
conversation_participant_uuid: null,
|
|
27
28
|
joined_dts: null,
|
|
29
|
+
language_iso_code: null,
|
|
28
30
|
last_message_dts: null,
|
|
29
31
|
left_dts: null,
|
|
30
32
|
profile_image_url: null,
|
|
@@ -19,7 +19,7 @@ module UltracartClient
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :conversation_canned_message_oid
|
|
21
21
|
|
|
22
|
-
attr_accessor :
|
|
22
|
+
attr_accessor :conversation_department_oids
|
|
23
23
|
|
|
24
24
|
attr_accessor :short_code
|
|
25
25
|
|
|
@@ -28,7 +28,7 @@ module UltracartClient
|
|
|
28
28
|
{
|
|
29
29
|
:'canned_message' => :'canned_message',
|
|
30
30
|
:'conversation_canned_message_oid' => :'conversation_canned_message_oid',
|
|
31
|
-
:'
|
|
31
|
+
:'conversation_department_oids' => :'conversation_department_oids',
|
|
32
32
|
:'short_code' => :'short_code'
|
|
33
33
|
}
|
|
34
34
|
end
|
|
@@ -43,7 +43,7 @@ module UltracartClient
|
|
|
43
43
|
{
|
|
44
44
|
:'canned_message' => :'String',
|
|
45
45
|
:'conversation_canned_message_oid' => :'Integer',
|
|
46
|
-
:'
|
|
46
|
+
:'conversation_department_oids' => :'Array<String>',
|
|
47
47
|
:'short_code' => :'String'
|
|
48
48
|
}
|
|
49
49
|
end
|
|
@@ -77,9 +77,9 @@ module UltracartClient
|
|
|
77
77
|
self.conversation_canned_message_oid = attributes[:'conversation_canned_message_oid']
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
-
if attributes.key?(:'
|
|
81
|
-
if (value = attributes[:'
|
|
82
|
-
self.
|
|
80
|
+
if attributes.key?(:'conversation_department_oids')
|
|
81
|
+
if (value = attributes[:'conversation_department_oids']).is_a?(Array)
|
|
82
|
+
self.conversation_department_oids = value
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
|
|
@@ -108,7 +108,7 @@ module UltracartClient
|
|
|
108
108
|
self.class == o.class &&
|
|
109
109
|
canned_message == o.canned_message &&
|
|
110
110
|
conversation_canned_message_oid == o.conversation_canned_message_oid &&
|
|
111
|
-
|
|
111
|
+
conversation_department_oids == o.conversation_department_oids &&
|
|
112
112
|
short_code == o.short_code
|
|
113
113
|
end
|
|
114
114
|
|
|
@@ -121,7 +121,7 @@ module UltracartClient
|
|
|
121
121
|
# Calculates hash code according to all attributes.
|
|
122
122
|
# @return [Integer] Hash code
|
|
123
123
|
def hash
|
|
124
|
-
[canned_message, conversation_canned_message_oid,
|
|
124
|
+
[canned_message, conversation_canned_message_oid, conversation_department_oids, short_code].hash
|
|
125
125
|
end
|
|
126
126
|
|
|
127
127
|
# Builds the object from hash
|
|
@@ -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
|
|
@@ -24,6 +24,8 @@ module UltracartClient
|
|
|
24
24
|
# Joined conversation date/time
|
|
25
25
|
attr_accessor :joined_dts
|
|
26
26
|
|
|
27
|
+
attr_accessor :language_iso_code
|
|
28
|
+
|
|
27
29
|
# Last message date/time
|
|
28
30
|
attr_accessor :last_message_dts
|
|
29
31
|
|
|
@@ -45,6 +47,7 @@ module UltracartClient
|
|
|
45
47
|
:'conversation_participant_name' => :'conversation_participant_name',
|
|
46
48
|
:'conversation_participant_uuid' => :'conversation_participant_uuid',
|
|
47
49
|
:'joined_dts' => :'joined_dts',
|
|
50
|
+
:'language_iso_code' => :'language_iso_code',
|
|
48
51
|
:'last_message_dts' => :'last_message_dts',
|
|
49
52
|
:'left_dts' => :'left_dts',
|
|
50
53
|
:'profile_image_url' => :'profile_image_url',
|
|
@@ -66,6 +69,7 @@ module UltracartClient
|
|
|
66
69
|
:'conversation_participant_name' => :'String',
|
|
67
70
|
:'conversation_participant_uuid' => :'String',
|
|
68
71
|
:'joined_dts' => :'String',
|
|
72
|
+
:'language_iso_code' => :'String',
|
|
69
73
|
:'last_message_dts' => :'String',
|
|
70
74
|
:'left_dts' => :'String',
|
|
71
75
|
:'profile_image_url' => :'String',
|
|
@@ -112,6 +116,10 @@ module UltracartClient
|
|
|
112
116
|
self.joined_dts = attributes[:'joined_dts']
|
|
113
117
|
end
|
|
114
118
|
|
|
119
|
+
if attributes.key?(:'language_iso_code')
|
|
120
|
+
self.language_iso_code = attributes[:'language_iso_code']
|
|
121
|
+
end
|
|
122
|
+
|
|
115
123
|
if attributes.key?(:'last_message_dts')
|
|
116
124
|
self.last_message_dts = attributes[:'last_message_dts']
|
|
117
125
|
end
|
|
@@ -159,6 +167,7 @@ module UltracartClient
|
|
|
159
167
|
conversation_participant_name == o.conversation_participant_name &&
|
|
160
168
|
conversation_participant_uuid == o.conversation_participant_uuid &&
|
|
161
169
|
joined_dts == o.joined_dts &&
|
|
170
|
+
language_iso_code == o.language_iso_code &&
|
|
162
171
|
last_message_dts == o.last_message_dts &&
|
|
163
172
|
left_dts == o.left_dts &&
|
|
164
173
|
profile_image_url == o.profile_image_url &&
|
|
@@ -176,7 +185,7 @@ module UltracartClient
|
|
|
176
185
|
# Calculates hash code according to all attributes.
|
|
177
186
|
# @return [Integer] Hash code
|
|
178
187
|
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
|
|
188
|
+
[conversation_participant_arn, conversation_participant_name, conversation_participant_uuid, joined_dts, language_iso_code, last_message_dts, left_dts, profile_image_url, status, timezone, unread_messages].hash
|
|
180
189
|
end
|
|
181
190
|
|
|
182
191
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -150,6 +150,7 @@ require 'ultracart_api/models/conversation_event_read_message'
|
|
|
150
150
|
require 'ultracart_api/models/conversation_event_typing'
|
|
151
151
|
require 'ultracart_api/models/conversation_event_webchat_context'
|
|
152
152
|
require 'ultracart_api/models/conversation_message'
|
|
153
|
+
require 'ultracart_api/models/conversation_message_translation'
|
|
153
154
|
require 'ultracart_api/models/conversation_message_transport_status'
|
|
154
155
|
require 'ultracart_api/models/conversation_messages_response'
|
|
155
156
|
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.96.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-12-
|
|
11
|
+
date: 2022-12-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -200,6 +200,7 @@ files:
|
|
|
200
200
|
- docs/ConversationEventTyping.md
|
|
201
201
|
- docs/ConversationEventWebchatContext.md
|
|
202
202
|
- docs/ConversationMessage.md
|
|
203
|
+
- docs/ConversationMessageTranslation.md
|
|
203
204
|
- docs/ConversationMessageTransportStatus.md
|
|
204
205
|
- docs/ConversationMessagesResponse.md
|
|
205
206
|
- docs/ConversationMultimediaUploadUrl.md
|
|
@@ -934,6 +935,7 @@ files:
|
|
|
934
935
|
- lib/ultracart_api/models/conversation_event_typing.rb
|
|
935
936
|
- lib/ultracart_api/models/conversation_event_webchat_context.rb
|
|
936
937
|
- lib/ultracart_api/models/conversation_message.rb
|
|
938
|
+
- lib/ultracart_api/models/conversation_message_translation.rb
|
|
937
939
|
- lib/ultracart_api/models/conversation_message_transport_status.rb
|
|
938
940
|
- lib/ultracart_api/models/conversation_messages_response.rb
|
|
939
941
|
- lib/ultracart_api/models/conversation_multimedia_upload_url.rb
|