ultracart_api 3.10.119 → 3.10.121
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/Conversation.md +1 -0
- data/docs/ConversationEngagement.md +1 -0
- data/docs/ConversationSentiment.md +13 -0
- data/docs/ConversationSummary.md +1 -0
- data/lib/ultracart_api/models/conversation.rb +10 -1
- data/lib/ultracart_api/models/conversation_engagement.rb +10 -1
- data/lib/ultracart_api/models/conversation_sentiment.rb +269 -0
- data/lib/ultracart_api/models/conversation_summary.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: 6de46d470d6e12fa47eb7076e16b316a13766c9325959b408cfed550d2800a8a
|
4
|
+
data.tar.gz: 92b12240cf0dff406859311ee91429803cff97b42678f4f07d749267363f3801
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6267ee25dae10dec68398c12f860b6c6a1ea76ffba0b009e02fd6fb0c321b012d11888130e5b2aea0eb82057edcd905a37b2d897c7f6bc5b30e9b8e711b6d6c
|
7
|
+
data.tar.gz: 50fdd8cb1b101f6e3c14d1a28048c31036fd2fb783932b4ec6791ea09694965e0f216cf2d093df0715baf59eabeda8dd040d2d6e10b31f2bd7b86e2acc55110f
|
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.121
|
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.121.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.121.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.121'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -663,6 +663,7 @@ Class | Method | HTTP request | Description
|
|
663
663
|
- [UltracartClient::ConversationResponse](docs/ConversationResponse.md)
|
664
664
|
- [UltracartClient::ConversationSearchRequest](docs/ConversationSearchRequest.md)
|
665
665
|
- [UltracartClient::ConversationSearchResponse](docs/ConversationSearchResponse.md)
|
666
|
+
- [UltracartClient::ConversationSentiment](docs/ConversationSentiment.md)
|
666
667
|
- [UltracartClient::ConversationStartRequest](docs/ConversationStartRequest.md)
|
667
668
|
- [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
|
668
669
|
- [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
|
@@ -1303,6 +1304,8 @@ Not every change is committed to every SDK.
|
|
1303
1304
|
|
1304
1305
|
| Version | Date | Comments |
|
1305
1306
|
| --: | :-: | --- |
|
1307
|
+
| 3.10.121 | 03/01/2023 | convo - add sentiment record to conversation obj |
|
1308
|
+
| 3.10.120 | 02/22/2023 | convo - customer initiated flag on engagement |
|
1306
1309
|
| 3.10.119 | 02/20/2023 | refund reasons |
|
1307
1310
|
| 3.10.118 | 02/17/2023 | convo api - smsUnsubscribeConversation method |
|
1308
1311
|
| 3.10.117 | 02/15/2023 | added auto order sorting by next_shipment_dts |
|
data/docs/Conversation.md
CHANGED
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
|
|
18
18
|
**message_count** | **Integer** | | [optional]
|
19
19
|
**messages** | [**Array<ConversationMessage>**](ConversationMessage.md) | | [optional]
|
20
20
|
**participants** | [**Array<ConversationParticipant>**](ConversationParticipant.md) | | [optional]
|
21
|
+
**sentiment** | [**ConversationSentiment**](ConversationSentiment.md) | | [optional]
|
21
22
|
**start_dts** | **String** | Start of the conversation date/time | [optional]
|
22
23
|
**unread_messages** | **BOOLEAN** | | [optional]
|
23
24
|
**visible** | **BOOLEAN** | | [optional]
|
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
**active** | **BOOLEAN** | | [optional]
|
7
7
|
**conversation_engagement_oid** | **Integer** | | [optional]
|
8
8
|
**customer_greeting** | **String** | | [optional]
|
9
|
+
**customer_initiated** | **BOOLEAN** | | [optional]
|
9
10
|
**department_oids** | **Array<Integer>** | | [optional]
|
10
11
|
**engagement_name** | **String** | | [optional]
|
11
12
|
**equation** | [**ConversationEngagementEquation**](ConversationEngagementEquation.md) | | [optional]
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# UltracartClient::ConversationSentiment
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**last_detect_sentiment** | **String** | The last time the detect sentiment was run on this conversation | [optional]
|
7
|
+
**mixed** | **Float** | The mixed score | [optional]
|
8
|
+
**negative** | **Float** | The negative score | [optional]
|
9
|
+
**neutral** | **Float** | The neutral score | [optional]
|
10
|
+
**positive** | **Float** | The positive score | [optional]
|
11
|
+
**sentiment** | **String** | The overall sentiment | [optional]
|
12
|
+
|
13
|
+
|
data/docs/ConversationSummary.md
CHANGED
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
|
|
16
16
|
**merchant_id** | **String** | | [optional]
|
17
17
|
**message_count** | **Integer** | | [optional]
|
18
18
|
**participants** | [**Array<ConversationParticipant>**](ConversationParticipant.md) | | [optional]
|
19
|
+
**sentiment** | [**ConversationSentiment**](ConversationSentiment.md) | | [optional]
|
19
20
|
**start_dts** | **String** | Start of the conversation date/time | [optional]
|
20
21
|
**unread_messages** | **BOOLEAN** | | [optional]
|
21
22
|
**visible** | **BOOLEAN** | | [optional]
|
@@ -49,6 +49,8 @@ module UltracartClient
|
|
49
49
|
|
50
50
|
attr_accessor :participants
|
51
51
|
|
52
|
+
attr_accessor :sentiment
|
53
|
+
|
52
54
|
# Start of the conversation date/time
|
53
55
|
attr_accessor :start_dts
|
54
56
|
|
@@ -96,6 +98,7 @@ module UltracartClient
|
|
96
98
|
:'message_count' => :'message_count',
|
97
99
|
:'messages' => :'messages',
|
98
100
|
:'participants' => :'participants',
|
101
|
+
:'sentiment' => :'sentiment',
|
99
102
|
:'start_dts' => :'start_dts',
|
100
103
|
:'unread_messages' => :'unread_messages',
|
101
104
|
:'visible' => :'visible'
|
@@ -120,6 +123,7 @@ module UltracartClient
|
|
120
123
|
:'message_count' => :'Integer',
|
121
124
|
:'messages' => :'Array<ConversationMessage>',
|
122
125
|
:'participants' => :'Array<ConversationParticipant>',
|
126
|
+
:'sentiment' => :'ConversationSentiment',
|
123
127
|
:'start_dts' => :'String',
|
124
128
|
:'unread_messages' => :'BOOLEAN',
|
125
129
|
:'visible' => :'BOOLEAN'
|
@@ -198,6 +202,10 @@ module UltracartClient
|
|
198
202
|
end
|
199
203
|
end
|
200
204
|
|
205
|
+
if attributes.has_key?(:'sentiment')
|
206
|
+
self.sentiment = attributes[:'sentiment']
|
207
|
+
end
|
208
|
+
|
201
209
|
if attributes.has_key?(:'start_dts')
|
202
210
|
self.start_dts = attributes[:'start_dts']
|
203
211
|
end
|
@@ -256,6 +264,7 @@ module UltracartClient
|
|
256
264
|
message_count == o.message_count &&
|
257
265
|
messages == o.messages &&
|
258
266
|
participants == o.participants &&
|
267
|
+
sentiment == o.sentiment &&
|
259
268
|
start_dts == o.start_dts &&
|
260
269
|
unread_messages == o.unread_messages &&
|
261
270
|
visible == o.visible
|
@@ -270,7 +279,7 @@ module UltracartClient
|
|
270
279
|
# Calculates hash code according to all attributes.
|
271
280
|
# @return [Fixnum] Hash code
|
272
281
|
def hash
|
273
|
-
[base_language_iso_code, closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, messages, participants, start_dts, unread_messages, visible].hash
|
282
|
+
[base_language_iso_code, closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, messages, participants, sentiment, start_dts, unread_messages, visible].hash
|
274
283
|
end
|
275
284
|
|
276
285
|
# Builds the object from hash
|
@@ -20,6 +20,8 @@ module UltracartClient
|
|
20
20
|
|
21
21
|
attr_accessor :customer_greeting
|
22
22
|
|
23
|
+
attr_accessor :customer_initiated
|
24
|
+
|
23
25
|
attr_accessor :department_oids
|
24
26
|
|
25
27
|
attr_accessor :engagement_name
|
@@ -59,6 +61,7 @@ module UltracartClient
|
|
59
61
|
:'active' => :'active',
|
60
62
|
:'conversation_engagement_oid' => :'conversation_engagement_oid',
|
61
63
|
:'customer_greeting' => :'customer_greeting',
|
64
|
+
:'customer_initiated' => :'customer_initiated',
|
62
65
|
:'department_oids' => :'department_oids',
|
63
66
|
:'engagement_name' => :'engagement_name',
|
64
67
|
:'equation' => :'equation',
|
@@ -73,6 +76,7 @@ module UltracartClient
|
|
73
76
|
:'active' => :'BOOLEAN',
|
74
77
|
:'conversation_engagement_oid' => :'Integer',
|
75
78
|
:'customer_greeting' => :'String',
|
79
|
+
:'customer_initiated' => :'BOOLEAN',
|
76
80
|
:'department_oids' => :'Array<Integer>',
|
77
81
|
:'engagement_name' => :'String',
|
78
82
|
:'equation' => :'ConversationEngagementEquation',
|
@@ -101,6 +105,10 @@ module UltracartClient
|
|
101
105
|
self.customer_greeting = attributes[:'customer_greeting']
|
102
106
|
end
|
103
107
|
|
108
|
+
if attributes.has_key?(:'customer_initiated')
|
109
|
+
self.customer_initiated = attributes[:'customer_initiated']
|
110
|
+
end
|
111
|
+
|
104
112
|
if attributes.has_key?(:'department_oids')
|
105
113
|
if (value = attributes[:'department_oids']).is_a?(Array)
|
106
114
|
self.department_oids = value
|
@@ -157,6 +165,7 @@ module UltracartClient
|
|
157
165
|
active == o.active &&
|
158
166
|
conversation_engagement_oid == o.conversation_engagement_oid &&
|
159
167
|
customer_greeting == o.customer_greeting &&
|
168
|
+
customer_initiated == o.customer_initiated &&
|
160
169
|
department_oids == o.department_oids &&
|
161
170
|
engagement_name == o.engagement_name &&
|
162
171
|
equation == o.equation &&
|
@@ -173,7 +182,7 @@ module UltracartClient
|
|
173
182
|
# Calculates hash code according to all attributes.
|
174
183
|
# @return [Fixnum] Hash code
|
175
184
|
def hash
|
176
|
-
[active, conversation_engagement_oid, customer_greeting, department_oids, engagement_name, equation, time_on_page, visitor_type].hash
|
185
|
+
[active, conversation_engagement_oid, customer_greeting, customer_initiated, department_oids, engagement_name, equation, time_on_page, visitor_type].hash
|
177
186
|
end
|
178
187
|
|
179
188
|
# Builds the object from hash
|
@@ -0,0 +1,269 @@
|
|
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 ConversationSentiment
|
17
|
+
# The last time the detect sentiment was run on this conversation
|
18
|
+
attr_accessor :last_detect_sentiment
|
19
|
+
|
20
|
+
# The mixed score
|
21
|
+
attr_accessor :mixed
|
22
|
+
|
23
|
+
# The negative score
|
24
|
+
attr_accessor :negative
|
25
|
+
|
26
|
+
# The neutral score
|
27
|
+
attr_accessor :neutral
|
28
|
+
|
29
|
+
# The positive score
|
30
|
+
attr_accessor :positive
|
31
|
+
|
32
|
+
# The overall sentiment
|
33
|
+
attr_accessor :sentiment
|
34
|
+
|
35
|
+
class EnumAttributeValidator
|
36
|
+
attr_reader :datatype
|
37
|
+
attr_reader :allowable_values
|
38
|
+
|
39
|
+
def initialize(datatype, allowable_values)
|
40
|
+
@allowable_values = allowable_values.map do |value|
|
41
|
+
case datatype.to_s
|
42
|
+
when /Integer/i
|
43
|
+
value.to_i
|
44
|
+
when /Float/i
|
45
|
+
value.to_f
|
46
|
+
else
|
47
|
+
value
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def valid?(value)
|
53
|
+
!value || allowable_values.include?(value)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
58
|
+
def self.attribute_map
|
59
|
+
{
|
60
|
+
:'last_detect_sentiment' => :'last_detect_sentiment',
|
61
|
+
:'mixed' => :'mixed',
|
62
|
+
:'negative' => :'negative',
|
63
|
+
:'neutral' => :'neutral',
|
64
|
+
:'positive' => :'positive',
|
65
|
+
:'sentiment' => :'sentiment'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute type mapping.
|
70
|
+
def self.swagger_types
|
71
|
+
{
|
72
|
+
:'last_detect_sentiment' => :'String',
|
73
|
+
:'mixed' => :'Float',
|
74
|
+
:'negative' => :'Float',
|
75
|
+
:'neutral' => :'Float',
|
76
|
+
:'positive' => :'Float',
|
77
|
+
:'sentiment' => :'String'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# Initializes the object
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
def initialize(attributes = {})
|
84
|
+
return unless attributes.is_a?(Hash)
|
85
|
+
|
86
|
+
# convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
88
|
+
|
89
|
+
if attributes.has_key?(:'last_detect_sentiment')
|
90
|
+
self.last_detect_sentiment = attributes[:'last_detect_sentiment']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'mixed')
|
94
|
+
self.mixed = attributes[:'mixed']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'negative')
|
98
|
+
self.negative = attributes[:'negative']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'neutral')
|
102
|
+
self.neutral = attributes[:'neutral']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'positive')
|
106
|
+
self.positive = attributes[:'positive']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'sentiment')
|
110
|
+
self.sentiment = attributes[:'sentiment']
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
115
|
+
# @return Array for valid properties with the reasons
|
116
|
+
def list_invalid_properties
|
117
|
+
invalid_properties = Array.new
|
118
|
+
invalid_properties
|
119
|
+
end
|
120
|
+
|
121
|
+
# Check to see if the all the properties in the model are valid
|
122
|
+
# @return true if the model is valid
|
123
|
+
def valid?
|
124
|
+
sentiment_validator = EnumAttributeValidator.new('String', ['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'MIXED'])
|
125
|
+
return false unless sentiment_validator.valid?(@sentiment)
|
126
|
+
true
|
127
|
+
end
|
128
|
+
|
129
|
+
# Custom attribute writer method checking allowed values (enum).
|
130
|
+
# @param [Object] sentiment Object to be assigned
|
131
|
+
def sentiment=(sentiment)
|
132
|
+
validator = EnumAttributeValidator.new('String', ['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'MIXED'])
|
133
|
+
unless validator.valid?(sentiment)
|
134
|
+
fail ArgumentError, 'invalid value for "sentiment", must be one of #{validator.allowable_values}.'
|
135
|
+
end
|
136
|
+
@sentiment = sentiment
|
137
|
+
end
|
138
|
+
|
139
|
+
# Checks equality by comparing each attribute.
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def ==(o)
|
142
|
+
return true if self.equal?(o)
|
143
|
+
self.class == o.class &&
|
144
|
+
last_detect_sentiment == o.last_detect_sentiment &&
|
145
|
+
mixed == o.mixed &&
|
146
|
+
negative == o.negative &&
|
147
|
+
neutral == o.neutral &&
|
148
|
+
positive == o.positive &&
|
149
|
+
sentiment == o.sentiment
|
150
|
+
end
|
151
|
+
|
152
|
+
# @see the `==` method
|
153
|
+
# @param [Object] Object to be compared
|
154
|
+
def eql?(o)
|
155
|
+
self == o
|
156
|
+
end
|
157
|
+
|
158
|
+
# Calculates hash code according to all attributes.
|
159
|
+
# @return [Fixnum] Hash code
|
160
|
+
def hash
|
161
|
+
[last_detect_sentiment, mixed, negative, neutral, positive, sentiment].hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Builds the object from hash
|
165
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
166
|
+
# @return [Object] Returns the model itself
|
167
|
+
def build_from_hash(attributes)
|
168
|
+
return nil unless attributes.is_a?(Hash)
|
169
|
+
self.class.swagger_types.each_pair do |key, type|
|
170
|
+
if type =~ /\AArray<(.*)>/i
|
171
|
+
# check to ensure the input is an array given that the attribute
|
172
|
+
# is documented as an array but the input is not
|
173
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
174
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
175
|
+
end
|
176
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
177
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
178
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
179
|
+
end
|
180
|
+
|
181
|
+
self
|
182
|
+
end
|
183
|
+
|
184
|
+
# Deserializes the data based on type
|
185
|
+
# @param string type Data type
|
186
|
+
# @param string value Value to be deserialized
|
187
|
+
# @return [Object] Deserialized data
|
188
|
+
def _deserialize(type, value)
|
189
|
+
case type.to_sym
|
190
|
+
when :DateTime
|
191
|
+
DateTime.parse(value)
|
192
|
+
when :Date
|
193
|
+
Date.parse(value)
|
194
|
+
when :String
|
195
|
+
value.to_s
|
196
|
+
when :Integer
|
197
|
+
value.to_i
|
198
|
+
when :Float
|
199
|
+
value.to_f
|
200
|
+
when :BOOLEAN
|
201
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
202
|
+
true
|
203
|
+
else
|
204
|
+
false
|
205
|
+
end
|
206
|
+
when :Object
|
207
|
+
# generic object (usually a Hash), return directly
|
208
|
+
value
|
209
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
210
|
+
inner_type = Regexp.last_match[:inner_type]
|
211
|
+
value.map { |v| _deserialize(inner_type, v) }
|
212
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
213
|
+
k_type = Regexp.last_match[:k_type]
|
214
|
+
v_type = Regexp.last_match[:v_type]
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each do |k, v|
|
217
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
218
|
+
end
|
219
|
+
end
|
220
|
+
else # model
|
221
|
+
temp_model = UltracartClient.const_get(type).new
|
222
|
+
temp_model.build_from_hash(value)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
# Returns the string representation of the object
|
227
|
+
# @return [String] String presentation of the object
|
228
|
+
def to_s
|
229
|
+
to_hash.to_s
|
230
|
+
end
|
231
|
+
|
232
|
+
# to_body is an alias to to_hash (backward compatibility)
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_body
|
235
|
+
to_hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the object in the form of hash
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
240
|
+
def to_hash
|
241
|
+
hash = {}
|
242
|
+
self.class.attribute_map.each_pair do |attr, param|
|
243
|
+
value = self.send(attr)
|
244
|
+
next if value.nil?
|
245
|
+
hash[param] = _to_hash(value)
|
246
|
+
end
|
247
|
+
hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Outputs non-array value in the form of hash
|
251
|
+
# For object, use to_hash. Otherwise, just return the value
|
252
|
+
# @param [Object] value Any valid value
|
253
|
+
# @return [Hash] Returns the value in the form of hash
|
254
|
+
def _to_hash(value)
|
255
|
+
if value.is_a?(Array)
|
256
|
+
value.compact.map { |v| _to_hash(v) }
|
257
|
+
elsif value.is_a?(Hash)
|
258
|
+
{}.tap do |hash|
|
259
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
260
|
+
end
|
261
|
+
elsif value.respond_to? :to_hash
|
262
|
+
value.to_hash
|
263
|
+
else
|
264
|
+
value
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
end
|
269
|
+
end
|
@@ -44,6 +44,8 @@ module UltracartClient
|
|
44
44
|
|
45
45
|
attr_accessor :participants
|
46
46
|
|
47
|
+
attr_accessor :sentiment
|
48
|
+
|
47
49
|
# Start of the conversation date/time
|
48
50
|
attr_accessor :start_dts
|
49
51
|
|
@@ -89,6 +91,7 @@ module UltracartClient
|
|
89
91
|
:'merchant_id' => :'merchant_id',
|
90
92
|
:'message_count' => :'message_count',
|
91
93
|
:'participants' => :'participants',
|
94
|
+
:'sentiment' => :'sentiment',
|
92
95
|
:'start_dts' => :'start_dts',
|
93
96
|
:'unread_messages' => :'unread_messages',
|
94
97
|
:'visible' => :'visible'
|
@@ -111,6 +114,7 @@ module UltracartClient
|
|
111
114
|
:'merchant_id' => :'String',
|
112
115
|
:'message_count' => :'Integer',
|
113
116
|
:'participants' => :'Array<ConversationParticipant>',
|
117
|
+
:'sentiment' => :'ConversationSentiment',
|
114
118
|
:'start_dts' => :'String',
|
115
119
|
:'unread_messages' => :'BOOLEAN',
|
116
120
|
:'visible' => :'BOOLEAN'
|
@@ -179,6 +183,10 @@ module UltracartClient
|
|
179
183
|
end
|
180
184
|
end
|
181
185
|
|
186
|
+
if attributes.has_key?(:'sentiment')
|
187
|
+
self.sentiment = attributes[:'sentiment']
|
188
|
+
end
|
189
|
+
|
182
190
|
if attributes.has_key?(:'start_dts')
|
183
191
|
self.start_dts = attributes[:'start_dts']
|
184
192
|
end
|
@@ -235,6 +243,7 @@ module UltracartClient
|
|
235
243
|
merchant_id == o.merchant_id &&
|
236
244
|
message_count == o.message_count &&
|
237
245
|
participants == o.participants &&
|
246
|
+
sentiment == o.sentiment &&
|
238
247
|
start_dts == o.start_dts &&
|
239
248
|
unread_messages == o.unread_messages &&
|
240
249
|
visible == o.visible
|
@@ -249,7 +258,7 @@ module UltracartClient
|
|
249
258
|
# Calculates hash code according to all attributes.
|
250
259
|
# @return [Fixnum] Hash code
|
251
260
|
def hash
|
252
|
-
[closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, participants, start_dts, unread_messages, visible].hash
|
261
|
+
[closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, participants, sentiment, start_dts, unread_messages, visible].hash
|
253
262
|
end
|
254
263
|
|
255
264
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -187,6 +187,7 @@ require 'ultracart_api/models/conversation_permissions_response'
|
|
187
187
|
require 'ultracart_api/models/conversation_response'
|
188
188
|
require 'ultracart_api/models/conversation_search_request'
|
189
189
|
require 'ultracart_api/models/conversation_search_response'
|
190
|
+
require 'ultracart_api/models/conversation_sentiment'
|
190
191
|
require 'ultracart_api/models/conversation_start_request'
|
191
192
|
require 'ultracart_api/models/conversation_start_response'
|
192
193
|
require 'ultracart_api/models/conversation_summary'
|
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.121
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -397,6 +397,7 @@ files:
|
|
397
397
|
- docs/ConversationResponse.md
|
398
398
|
- docs/ConversationSearchRequest.md
|
399
399
|
- docs/ConversationSearchResponse.md
|
400
|
+
- docs/ConversationSentiment.md
|
400
401
|
- docs/ConversationStartRequest.md
|
401
402
|
- docs/ConversationStartResponse.md
|
402
403
|
- docs/ConversationSummary.md
|
@@ -1174,6 +1175,7 @@ files:
|
|
1174
1175
|
- lib/ultracart_api/models/conversation_response.rb
|
1175
1176
|
- lib/ultracart_api/models/conversation_search_request.rb
|
1176
1177
|
- lib/ultracart_api/models/conversation_search_response.rb
|
1178
|
+
- lib/ultracart_api/models/conversation_sentiment.rb
|
1177
1179
|
- lib/ultracart_api/models/conversation_start_request.rb
|
1178
1180
|
- lib/ultracart_api/models/conversation_start_response.rb
|
1179
1181
|
- lib/ultracart_api/models/conversation_summary.rb
|