ultracart_api 4.0.48.rc → 4.0.51.rc

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0624caccc11ea70dee0391435631912d28584b61e5ceabccb3bacd3c51c80e95
4
- data.tar.gz: 667e77fd135a7b513df023ba4446a51d6978de89e2298aa5777add6e6529705f
3
+ metadata.gz: 11411f98956e0b5b3fb41e00a9271f009c3f8b3078b0771460e799405558af84
4
+ data.tar.gz: 1883440bf616671e4c1bf3e244a7214d614cb462b6eb06baad2ecee6028e7cff
5
5
  SHA512:
6
- metadata.gz: 2d4f11ee1d8df637a993f2911620c4252d6eea21e2e8af10c274bb6fd1e494a4bb43964bd027708b9b19e8a53cbe19d788d1a7a8cd8a73ec221d16f13b45b3f3
7
- data.tar.gz: bc79bbabe755b6b36bac358bd051ac59c7c308e4755d2e0e291e50fd34f7beb2d89752e668850dca1c09842110175ac548821211e419fd62818f9e767023a412
6
+ metadata.gz: 5d2fac5fc8f15b8a6e8b2bbb024398632e2500ecfcff07209dfabd90260adbf11b43da7d512ebc32492c920943589c78936ab76bfce9f27da89f25619906670d
7
+ data.tar.gz: 9195b4829df200439b28c55e49e86f31f83c3e6b94841ee1445649e87c68276c46e5349a4b655d24f2ca18144b965764cd658d345eab85235362d6b1d018141f
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.48.rc
10
+ - Package version: 4.0.51.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.48.rc.gem
27
+ gem install ./ultracart_api-4.0.51.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.48.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.51.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.48.rc'
36
+ gem 'ultracart_api', '~> 4.0.51.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -570,6 +570,7 @@ Class | Method | HTTP request | Description
570
570
  - [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
571
571
  - [UltracartClient::ConversationEventQueuePosition](docs/ConversationEventQueuePosition.md)
572
572
  - [UltracartClient::ConversationEventRRWeb](docs/ConversationEventRRWeb.md)
573
+ - [UltracartClient::ConversationEventTyping](docs/ConversationEventTyping.md)
573
574
  - [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
574
575
  - [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
575
576
  - [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
@@ -1179,6 +1180,9 @@ Not every change is committed to every SDK.
1179
1180
 
1180
1181
  | Version | Date | Comments |
1181
1182
  | --: | :-: | --- |
1183
+ | 4.0.51-RC | 08/05/2022 | conversations query by medium and stats fixes |
1184
+ | 4.0.50-RC | 08/03/2022 | conversation summary participants |
1185
+ | 4.0.49-RC | 08/03/2022 | more conversation events |
1182
1186
  | 4.0.48-RC | 08/02/2022 | storefront communication sequence test method |
1183
1187
  | 4.0.47-RC | 08/01/2022 | conversation event refinement |
1184
1188
  | 4.0.46-RC | 07/29/2022 | conversation development |
data/docs/Conversation.md CHANGED
@@ -7,9 +7,18 @@
7
7
  | **closed** | **Boolean** | | [optional] |
8
8
  | **conversation_arn** | **String** | | [optional] |
9
9
  | **conversation_uuid** | **String** | | [optional] |
10
+ | **last_conversation_message_body** | **String** | | [optional] |
11
+ | **last_conversation_participant_arn** | **String** | | [optional] |
12
+ | **last_conversation_participant_name** | **String** | | [optional] |
13
+ | **last_message_dts** | **String** | Last message date/time | [optional] |
14
+ | **medium** | **String** | The communication medium of the customer. | [optional] |
10
15
  | **merchant_id** | **String** | | [optional] |
16
+ | **message_count** | **Integer** | | [optional] |
11
17
  | **messages** | [**Array<ConversationMessage>**](ConversationMessage.md) | | [optional] |
12
18
  | **participants** | [**Array<ConversationParticipant>**](ConversationParticipant.md) | | [optional] |
19
+ | **start_dts** | **String** | Start of the conversation date/time | [optional] |
20
+ | **unread_messages** | **Boolean** | | [optional] |
21
+ | **visible** | **Boolean** | | [optional] |
13
22
 
14
23
  ## Example
15
24
 
@@ -20,9 +29,18 @@ instance = UltracartClient::Conversation.new(
20
29
  closed: null,
21
30
  conversation_arn: null,
22
31
  conversation_uuid: null,
32
+ last_conversation_message_body: null,
33
+ last_conversation_participant_arn: null,
34
+ last_conversation_participant_name: null,
35
+ last_message_dts: null,
36
+ medium: null,
23
37
  merchant_id: null,
38
+ message_count: null,
24
39
  messages: null,
25
- participants: null
40
+ participants: null,
41
+ start_dts: null,
42
+ unread_messages: null,
43
+ visible: null
26
44
  )
27
45
  ```
28
46
 
@@ -316,6 +316,7 @@ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/
316
316
 
317
317
  api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
318
318
  opts = {
319
+ medium: 'medium_example', # String |
319
320
  _limit: 56, # Integer | The maximum number of records to return on this one API call. (Max 200)
320
321
  _offset: 56 # Integer | Pagination of the record set. Offset is a zero based index.
321
322
  }
@@ -351,6 +352,7 @@ end
351
352
 
352
353
  | Name | Type | Description | Notes |
353
354
  | ---- | ---- | ----------- | ----- |
355
+ | **medium** | **String** | | [optional] |
354
356
  | **_limit** | **Integer** | The maximum number of records to return on this one API call. (Max 200) | [optional][default to 100] |
355
357
  | **_offset** | **Integer** | Pagination of the record set. Offset is a zero based index. | [optional][default to 0] |
356
358
 
@@ -0,0 +1,22 @@
1
+ # UltracartClient::ConversationEventTyping
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **author_conversation_participant_arn** | **String** | | [optional] |
8
+ | **author_conversation_participant_name** | **String** | | [optional] |
9
+ | **value** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::ConversationEventTyping.new(
17
+ author_conversation_participant_arn: null,
18
+ author_conversation_participant_name: null,
19
+ value: null
20
+ )
21
+ ```
22
+
@@ -11,8 +11,10 @@
11
11
  | **last_conversation_participant_arn** | **String** | | [optional] |
12
12
  | **last_conversation_participant_name** | **String** | | [optional] |
13
13
  | **last_message_dts** | **String** | Last message date/time | [optional] |
14
+ | **medium** | **String** | The communication medium of the customer. | [optional] |
14
15
  | **merchant_id** | **String** | | [optional] |
15
16
  | **message_count** | **Integer** | | [optional] |
17
+ | **participants** | [**Array<ConversationParticipant>**](ConversationParticipant.md) | | [optional] |
16
18
  | **start_dts** | **String** | Start of the conversation date/time | [optional] |
17
19
  | **unread_messages** | **Boolean** | | [optional] |
18
20
  | **visible** | **Boolean** | | [optional] |
@@ -30,8 +32,10 @@ instance = UltracartClient::ConversationSummary.new(
30
32
  last_conversation_participant_arn: null,
31
33
  last_conversation_participant_name: null,
32
34
  last_message_dts: null,
35
+ medium: null,
33
36
  merchant_id: null,
34
37
  message_count: null,
38
+ participants: null,
35
39
  start_dts: null,
36
40
  unread_messages: null,
37
41
  visible: null
@@ -8,10 +8,12 @@
8
8
  | **event_conversation_closed** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
9
9
  | **event_new_conversation** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
10
10
  | **event_new_message** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
11
+ | **event_participant_update** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
11
12
  | **event_queue_position** | [**ConversationEventQueuePosition**](ConversationEventQueuePosition.md) | | [optional] |
12
13
  | **event_queue_status_update** | [**ConversationWebchatQueueStatus**](ConversationWebchatQueueStatus.md) | | [optional] |
13
14
  | **event_rrweb** | [**ConversationEventRRWeb**](ConversationEventRRWeb.md) | | [optional] |
14
15
  | **event_type** | **String** | Type of event | [optional] |
16
+ | **event_typing** | [**ConversationEventTyping**](ConversationEventTyping.md) | | [optional] |
15
17
  | **event_updated_message** | [**ConversationMessage**](ConversationMessage.md) | | [optional] |
16
18
  | **message** | [**ConversationMessage**](ConversationMessage.md) | | [optional] |
17
19
  | **type** | **String** | Type of message | [optional] |
@@ -26,10 +28,12 @@ instance = UltracartClient::ConversationWebsocketMessage.new(
26
28
  event_conversation_closed: null,
27
29
  event_new_conversation: null,
28
30
  event_new_message: null,
31
+ event_participant_update: null,
29
32
  event_queue_position: null,
30
33
  event_queue_status_update: null,
31
34
  event_rrweb: null,
32
35
  event_type: null,
36
+ event_typing: null,
33
37
  event_updated_message: null,
34
38
  message: null,
35
39
  type: null
@@ -279,6 +279,7 @@ module UltracartClient
279
279
  # Retrieve a list of conversation summaries newest to oldest
280
280
  # Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
281
281
  # @param [Hash] opts the optional parameters
282
+ # @option opts [String] :medium
282
283
  # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
283
284
  # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
284
285
  # @return [ConversationsResponse]
@@ -290,6 +291,7 @@ module UltracartClient
290
291
  # Retrieve a list of conversation summaries newest to oldest
291
292
  # Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
292
293
  # @param [Hash] opts the optional parameters
294
+ # @option opts [String] :medium
293
295
  # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
294
296
  # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
295
297
  # @return [Array<(ConversationsResponse, Integer, Hash)>] ConversationsResponse data, response status code and response headers
@@ -302,6 +304,7 @@ module UltracartClient
302
304
 
303
305
  # query parameters
304
306
  query_params = opts[:query_params] || {}
307
+ query_params[:'medium'] = opts[:'medium'] if !opts[:'medium'].nil?
305
308
  query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
306
309
  query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
307
310
 
@@ -21,21 +21,73 @@ module UltracartClient
21
21
 
22
22
  attr_accessor :conversation_uuid
23
23
 
24
+ attr_accessor :last_conversation_message_body
25
+
26
+ attr_accessor :last_conversation_participant_arn
27
+
28
+ attr_accessor :last_conversation_participant_name
29
+
30
+ # Last message date/time
31
+ attr_accessor :last_message_dts
32
+
33
+ # The communication medium of the customer.
34
+ attr_accessor :medium
35
+
24
36
  attr_accessor :merchant_id
25
37
 
38
+ attr_accessor :message_count
39
+
26
40
  attr_accessor :messages
27
41
 
28
42
  attr_accessor :participants
29
43
 
44
+ # Start of the conversation date/time
45
+ attr_accessor :start_dts
46
+
47
+ attr_accessor :unread_messages
48
+
49
+ attr_accessor :visible
50
+
51
+ class EnumAttributeValidator
52
+ attr_reader :datatype
53
+ attr_reader :allowable_values
54
+
55
+ def initialize(datatype, allowable_values)
56
+ @allowable_values = allowable_values.map do |value|
57
+ case datatype.to_s
58
+ when /Integer/i
59
+ value.to_i
60
+ when /Float/i
61
+ value.to_f
62
+ else
63
+ value
64
+ end
65
+ end
66
+ end
67
+
68
+ def valid?(value)
69
+ !value || allowable_values.include?(value)
70
+ end
71
+ end
72
+
30
73
  # Attribute mapping from ruby-style variable name to JSON key.
31
74
  def self.attribute_map
32
75
  {
33
76
  :'closed' => :'closed',
34
77
  :'conversation_arn' => :'conversation_arn',
35
78
  :'conversation_uuid' => :'conversation_uuid',
79
+ :'last_conversation_message_body' => :'last_conversation_message_body',
80
+ :'last_conversation_participant_arn' => :'last_conversation_participant_arn',
81
+ :'last_conversation_participant_name' => :'last_conversation_participant_name',
82
+ :'last_message_dts' => :'last_message_dts',
83
+ :'medium' => :'medium',
36
84
  :'merchant_id' => :'merchant_id',
85
+ :'message_count' => :'message_count',
37
86
  :'messages' => :'messages',
38
- :'participants' => :'participants'
87
+ :'participants' => :'participants',
88
+ :'start_dts' => :'start_dts',
89
+ :'unread_messages' => :'unread_messages',
90
+ :'visible' => :'visible'
39
91
  }
40
92
  end
41
93
 
@@ -50,9 +102,18 @@ module UltracartClient
50
102
  :'closed' => :'Boolean',
51
103
  :'conversation_arn' => :'String',
52
104
  :'conversation_uuid' => :'String',
105
+ :'last_conversation_message_body' => :'String',
106
+ :'last_conversation_participant_arn' => :'String',
107
+ :'last_conversation_participant_name' => :'String',
108
+ :'last_message_dts' => :'String',
109
+ :'medium' => :'String',
53
110
  :'merchant_id' => :'String',
111
+ :'message_count' => :'Integer',
54
112
  :'messages' => :'Array<ConversationMessage>',
55
- :'participants' => :'Array<ConversationParticipant>'
113
+ :'participants' => :'Array<ConversationParticipant>',
114
+ :'start_dts' => :'String',
115
+ :'unread_messages' => :'Boolean',
116
+ :'visible' => :'Boolean'
56
117
  }
57
118
  end
58
119
 
@@ -89,10 +150,34 @@ module UltracartClient
89
150
  self.conversation_uuid = attributes[:'conversation_uuid']
90
151
  end
91
152
 
153
+ if attributes.key?(:'last_conversation_message_body')
154
+ self.last_conversation_message_body = attributes[:'last_conversation_message_body']
155
+ end
156
+
157
+ if attributes.key?(:'last_conversation_participant_arn')
158
+ self.last_conversation_participant_arn = attributes[:'last_conversation_participant_arn']
159
+ end
160
+
161
+ if attributes.key?(:'last_conversation_participant_name')
162
+ self.last_conversation_participant_name = attributes[:'last_conversation_participant_name']
163
+ end
164
+
165
+ if attributes.key?(:'last_message_dts')
166
+ self.last_message_dts = attributes[:'last_message_dts']
167
+ end
168
+
169
+ if attributes.key?(:'medium')
170
+ self.medium = attributes[:'medium']
171
+ end
172
+
92
173
  if attributes.key?(:'merchant_id')
93
174
  self.merchant_id = attributes[:'merchant_id']
94
175
  end
95
176
 
177
+ if attributes.key?(:'message_count')
178
+ self.message_count = attributes[:'message_count']
179
+ end
180
+
96
181
  if attributes.key?(:'messages')
97
182
  if (value = attributes[:'messages']).is_a?(Array)
98
183
  self.messages = value
@@ -104,6 +189,18 @@ module UltracartClient
104
189
  self.participants = value
105
190
  end
106
191
  end
192
+
193
+ if attributes.key?(:'start_dts')
194
+ self.start_dts = attributes[:'start_dts']
195
+ end
196
+
197
+ if attributes.key?(:'unread_messages')
198
+ self.unread_messages = attributes[:'unread_messages']
199
+ end
200
+
201
+ if attributes.key?(:'visible')
202
+ self.visible = attributes[:'visible']
203
+ end
107
204
  end
108
205
 
109
206
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -116,9 +213,21 @@ module UltracartClient
116
213
  # Check to see if the all the properties in the model are valid
117
214
  # @return true if the model is valid
118
215
  def valid?
216
+ medium_validator = EnumAttributeValidator.new('String', ["sms", "websocket"])
217
+ return false unless medium_validator.valid?(@medium)
119
218
  true
120
219
  end
121
220
 
221
+ # Custom attribute writer method checking allowed values (enum).
222
+ # @param [Object] medium Object to be assigned
223
+ def medium=(medium)
224
+ validator = EnumAttributeValidator.new('String', ["sms", "websocket"])
225
+ unless validator.valid?(medium)
226
+ fail ArgumentError, "invalid value for \"medium\", must be one of #{validator.allowable_values}."
227
+ end
228
+ @medium = medium
229
+ end
230
+
122
231
  # Checks equality by comparing each attribute.
123
232
  # @param [Object] Object to be compared
124
233
  def ==(o)
@@ -127,9 +236,18 @@ module UltracartClient
127
236
  closed == o.closed &&
128
237
  conversation_arn == o.conversation_arn &&
129
238
  conversation_uuid == o.conversation_uuid &&
239
+ last_conversation_message_body == o.last_conversation_message_body &&
240
+ last_conversation_participant_arn == o.last_conversation_participant_arn &&
241
+ last_conversation_participant_name == o.last_conversation_participant_name &&
242
+ last_message_dts == o.last_message_dts &&
243
+ medium == o.medium &&
130
244
  merchant_id == o.merchant_id &&
245
+ message_count == o.message_count &&
131
246
  messages == o.messages &&
132
- participants == o.participants
247
+ participants == o.participants &&
248
+ start_dts == o.start_dts &&
249
+ unread_messages == o.unread_messages &&
250
+ visible == o.visible
133
251
  end
134
252
 
135
253
  # @see the `==` method
@@ -141,7 +259,7 @@ module UltracartClient
141
259
  # Calculates hash code according to all attributes.
142
260
  # @return [Integer] Hash code
143
261
  def hash
144
- [closed, conversation_arn, conversation_uuid, merchant_id, messages, participants].hash
262
+ [closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, medium, merchant_id, message_count, messages, participants, start_dts, unread_messages, visible].hash
145
263
  end
146
264
 
147
265
  # Builds the object from hash
@@ -0,0 +1,237 @@
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 ConversationEventTyping
18
+ attr_accessor :author_conversation_participant_arn
19
+
20
+ attr_accessor :author_conversation_participant_name
21
+
22
+ attr_accessor :value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'author_conversation_participant_arn' => :'author_conversation_participant_arn',
28
+ :'author_conversation_participant_name' => :'author_conversation_participant_name',
29
+ :'value' => :'value'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'author_conversation_participant_arn' => :'String',
42
+ :'author_conversation_participant_name' => :'String',
43
+ :'value' => :'String'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationEventTyping` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationEventTyping`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'author_conversation_participant_arn')
69
+ self.author_conversation_participant_arn = attributes[:'author_conversation_participant_arn']
70
+ end
71
+
72
+ if attributes.key?(:'author_conversation_participant_name')
73
+ self.author_conversation_participant_name = attributes[:'author_conversation_participant_name']
74
+ end
75
+
76
+ if attributes.key?(:'value')
77
+ self.value = attributes[:'value']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ author_conversation_participant_arn == o.author_conversation_participant_arn &&
100
+ author_conversation_participant_name == o.author_conversation_participant_name &&
101
+ value == o.value
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [author_conversation_participant_arn, author_conversation_participant_name, value].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = UltracartClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end
@@ -30,10 +30,15 @@ module UltracartClient
30
30
  # Last message date/time
31
31
  attr_accessor :last_message_dts
32
32
 
33
+ # The communication medium of the customer.
34
+ attr_accessor :medium
35
+
33
36
  attr_accessor :merchant_id
34
37
 
35
38
  attr_accessor :message_count
36
39
 
40
+ attr_accessor :participants
41
+
37
42
  # Start of the conversation date/time
38
43
  attr_accessor :start_dts
39
44
 
@@ -41,6 +46,28 @@ module UltracartClient
41
46
 
42
47
  attr_accessor :visible
43
48
 
49
+ class EnumAttributeValidator
50
+ attr_reader :datatype
51
+ attr_reader :allowable_values
52
+
53
+ def initialize(datatype, allowable_values)
54
+ @allowable_values = allowable_values.map do |value|
55
+ case datatype.to_s
56
+ when /Integer/i
57
+ value.to_i
58
+ when /Float/i
59
+ value.to_f
60
+ else
61
+ value
62
+ end
63
+ end
64
+ end
65
+
66
+ def valid?(value)
67
+ !value || allowable_values.include?(value)
68
+ end
69
+ end
70
+
44
71
  # Attribute mapping from ruby-style variable name to JSON key.
45
72
  def self.attribute_map
46
73
  {
@@ -51,8 +78,10 @@ module UltracartClient
51
78
  :'last_conversation_participant_arn' => :'last_conversation_participant_arn',
52
79
  :'last_conversation_participant_name' => :'last_conversation_participant_name',
53
80
  :'last_message_dts' => :'last_message_dts',
81
+ :'medium' => :'medium',
54
82
  :'merchant_id' => :'merchant_id',
55
83
  :'message_count' => :'message_count',
84
+ :'participants' => :'participants',
56
85
  :'start_dts' => :'start_dts',
57
86
  :'unread_messages' => :'unread_messages',
58
87
  :'visible' => :'visible'
@@ -74,8 +103,10 @@ module UltracartClient
74
103
  :'last_conversation_participant_arn' => :'String',
75
104
  :'last_conversation_participant_name' => :'String',
76
105
  :'last_message_dts' => :'String',
106
+ :'medium' => :'String',
77
107
  :'merchant_id' => :'String',
78
108
  :'message_count' => :'Integer',
109
+ :'participants' => :'Array<ConversationParticipant>',
79
110
  :'start_dts' => :'String',
80
111
  :'unread_messages' => :'Boolean',
81
112
  :'visible' => :'Boolean'
@@ -131,6 +162,10 @@ module UltracartClient
131
162
  self.last_message_dts = attributes[:'last_message_dts']
132
163
  end
133
164
 
165
+ if attributes.key?(:'medium')
166
+ self.medium = attributes[:'medium']
167
+ end
168
+
134
169
  if attributes.key?(:'merchant_id')
135
170
  self.merchant_id = attributes[:'merchant_id']
136
171
  end
@@ -139,6 +174,12 @@ module UltracartClient
139
174
  self.message_count = attributes[:'message_count']
140
175
  end
141
176
 
177
+ if attributes.key?(:'participants')
178
+ if (value = attributes[:'participants']).is_a?(Array)
179
+ self.participants = value
180
+ end
181
+ end
182
+
142
183
  if attributes.key?(:'start_dts')
143
184
  self.start_dts = attributes[:'start_dts']
144
185
  end
@@ -162,9 +203,21 @@ module UltracartClient
162
203
  # Check to see if the all the properties in the model are valid
163
204
  # @return true if the model is valid
164
205
  def valid?
206
+ medium_validator = EnumAttributeValidator.new('String', ["sms", "websocket"])
207
+ return false unless medium_validator.valid?(@medium)
165
208
  true
166
209
  end
167
210
 
211
+ # Custom attribute writer method checking allowed values (enum).
212
+ # @param [Object] medium Object to be assigned
213
+ def medium=(medium)
214
+ validator = EnumAttributeValidator.new('String', ["sms", "websocket"])
215
+ unless validator.valid?(medium)
216
+ fail ArgumentError, "invalid value for \"medium\", must be one of #{validator.allowable_values}."
217
+ end
218
+ @medium = medium
219
+ end
220
+
168
221
  # Checks equality by comparing each attribute.
169
222
  # @param [Object] Object to be compared
170
223
  def ==(o)
@@ -177,8 +230,10 @@ module UltracartClient
177
230
  last_conversation_participant_arn == o.last_conversation_participant_arn &&
178
231
  last_conversation_participant_name == o.last_conversation_participant_name &&
179
232
  last_message_dts == o.last_message_dts &&
233
+ medium == o.medium &&
180
234
  merchant_id == o.merchant_id &&
181
235
  message_count == o.message_count &&
236
+ participants == o.participants &&
182
237
  start_dts == o.start_dts &&
183
238
  unread_messages == o.unread_messages &&
184
239
  visible == o.visible
@@ -193,7 +248,7 @@ module UltracartClient
193
248
  # Calculates hash code according to all attributes.
194
249
  # @return [Integer] Hash code
195
250
  def hash
196
- [closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, merchant_id, message_count, start_dts, unread_messages, visible].hash
251
+ [closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, medium, merchant_id, message_count, participants, start_dts, unread_messages, visible].hash
197
252
  end
198
253
 
199
254
  # Builds the object from hash
@@ -24,6 +24,8 @@ module UltracartClient
24
24
 
25
25
  attr_accessor :event_new_message
26
26
 
27
+ attr_accessor :event_participant_update
28
+
27
29
  attr_accessor :event_queue_position
28
30
 
29
31
  attr_accessor :event_queue_status_update
@@ -33,6 +35,8 @@ module UltracartClient
33
35
  # Type of event
34
36
  attr_accessor :event_type
35
37
 
38
+ attr_accessor :event_typing
39
+
36
40
  attr_accessor :event_updated_message
37
41
 
38
42
  attr_accessor :message
@@ -69,10 +73,12 @@ module UltracartClient
69
73
  :'event_conversation_closed' => :'event_conversation_closed',
70
74
  :'event_new_conversation' => :'event_new_conversation',
71
75
  :'event_new_message' => :'event_new_message',
76
+ :'event_participant_update' => :'event_participant_update',
72
77
  :'event_queue_position' => :'event_queue_position',
73
78
  :'event_queue_status_update' => :'event_queue_status_update',
74
79
  :'event_rrweb' => :'event_rrweb',
75
80
  :'event_type' => :'event_type',
81
+ :'event_typing' => :'event_typing',
76
82
  :'event_updated_message' => :'event_updated_message',
77
83
  :'message' => :'message',
78
84
  :'type' => :'type'
@@ -91,10 +97,12 @@ module UltracartClient
91
97
  :'event_conversation_closed' => :'ConversationSummary',
92
98
  :'event_new_conversation' => :'ConversationSummary',
93
99
  :'event_new_message' => :'ConversationSummary',
100
+ :'event_participant_update' => :'ConversationSummary',
94
101
  :'event_queue_position' => :'ConversationEventQueuePosition',
95
102
  :'event_queue_status_update' => :'ConversationWebchatQueueStatus',
96
103
  :'event_rrweb' => :'ConversationEventRRWeb',
97
104
  :'event_type' => :'String',
105
+ :'event_typing' => :'ConversationEventTyping',
98
106
  :'event_updated_message' => :'ConversationMessage',
99
107
  :'message' => :'ConversationMessage',
100
108
  :'type' => :'String'
@@ -138,6 +146,10 @@ module UltracartClient
138
146
  self.event_new_message = attributes[:'event_new_message']
139
147
  end
140
148
 
149
+ if attributes.key?(:'event_participant_update')
150
+ self.event_participant_update = attributes[:'event_participant_update']
151
+ end
152
+
141
153
  if attributes.key?(:'event_queue_position')
142
154
  self.event_queue_position = attributes[:'event_queue_position']
143
155
  end
@@ -154,6 +166,10 @@ module UltracartClient
154
166
  self.event_type = attributes[:'event_type']
155
167
  end
156
168
 
169
+ if attributes.key?(:'event_typing')
170
+ self.event_typing = attributes[:'event_typing']
171
+ end
172
+
157
173
  if attributes.key?(:'event_updated_message')
158
174
  self.event_updated_message = attributes[:'event_updated_message']
159
175
  end
@@ -177,7 +193,7 @@ module UltracartClient
177
193
  # Check to see if the all the properties in the model are valid
178
194
  # @return true if the model is valid
179
195
  def valid?
180
- event_type_validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb"])
196
+ event_type_validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb", "participant update"])
181
197
  return false unless event_type_validator.valid?(@event_type)
182
198
  type_validator = EnumAttributeValidator.new('String', ["message", "event", "ping", "check queue position"])
183
199
  return false unless type_validator.valid?(@type)
@@ -187,7 +203,7 @@ module UltracartClient
187
203
  # Custom attribute writer method checking allowed values (enum).
188
204
  # @param [Object] event_type Object to be assigned
189
205
  def event_type=(event_type)
190
- validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb"])
206
+ validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb", "participant update"])
191
207
  unless validator.valid?(event_type)
192
208
  fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
193
209
  end
@@ -213,10 +229,12 @@ module UltracartClient
213
229
  event_conversation_closed == o.event_conversation_closed &&
214
230
  event_new_conversation == o.event_new_conversation &&
215
231
  event_new_message == o.event_new_message &&
232
+ event_participant_update == o.event_participant_update &&
216
233
  event_queue_position == o.event_queue_position &&
217
234
  event_queue_status_update == o.event_queue_status_update &&
218
235
  event_rrweb == o.event_rrweb &&
219
236
  event_type == o.event_type &&
237
+ event_typing == o.event_typing &&
220
238
  event_updated_message == o.event_updated_message &&
221
239
  message == o.message &&
222
240
  type == o.type
@@ -231,7 +249,7 @@ module UltracartClient
231
249
  # Calculates hash code according to all attributes.
232
250
  # @return [Integer] Hash code
233
251
  def 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
252
+ [conversation_uuid, event_conversation_closed, event_new_conversation, event_new_message, event_participant_update, event_queue_position, event_queue_status_update, event_rrweb, event_type, event_typing, event_updated_message, message, type].hash
235
253
  end
236
254
 
237
255
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.48.rc'
14
+ VERSION = '4.0.51.rc'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -139,6 +139,7 @@ require 'ultracart_api/models/conversation_agent_auth'
139
139
  require 'ultracart_api/models/conversation_agent_auth_response'
140
140
  require 'ultracart_api/models/conversation_event_queue_position'
141
141
  require 'ultracart_api/models/conversation_event_rr_web'
142
+ require 'ultracart_api/models/conversation_event_typing'
142
143
  require 'ultracart_api/models/conversation_message'
143
144
  require 'ultracart_api/models/conversation_message_transport_status'
144
145
  require 'ultracart_api/models/conversation_multimedia_upload_url'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.48.rc
4
+ version: 4.0.51.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-08-02 00:00:00.000000000 Z
11
+ date: 2022-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -189,6 +189,7 @@ files:
189
189
  - docs/ConversationApi.md
190
190
  - docs/ConversationEventQueuePosition.md
191
191
  - docs/ConversationEventRRWeb.md
192
+ - docs/ConversationEventTyping.md
192
193
  - docs/ConversationMessage.md
193
194
  - docs/ConversationMessageTransportStatus.md
194
195
  - docs/ConversationMultimediaUploadUrl.md
@@ -884,6 +885,7 @@ files:
884
885
  - lib/ultracart_api/models/conversation_agent_auth_response.rb
885
886
  - lib/ultracart_api/models/conversation_event_queue_position.rb
886
887
  - lib/ultracart_api/models/conversation_event_rr_web.rb
888
+ - lib/ultracart_api/models/conversation_event_typing.rb
887
889
  - lib/ultracart_api/models/conversation_message.rb
888
890
  - lib/ultracart_api/models/conversation_message_transport_status.rb
889
891
  - lib/ultracart_api/models/conversation_multimedia_upload_url.rb