purecloudplatformclientv2 91.0.0 → 92.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/AmazonLexRequest.md +14 -0
  4. data/docs/AnalyticsEvaluation.md +1 -1
  5. data/docs/AuditApi.md +70 -0
  6. data/docs/AuditRealtimeQueryRequest.md +18 -0
  7. data/docs/AuditRealtimeQueryResultsResponse.md +17 -0
  8. data/docs/ButtonComponent.md +16 -0
  9. data/docs/ContentActions.md +17 -0
  10. data/docs/ContentAttachment.md +19 -0
  11. data/docs/ContentGeneric.md +19 -0
  12. data/docs/ContentList.md +19 -0
  13. data/docs/ContentLocation.md +17 -0
  14. data/docs/ContentNotificationTemplate.md +17 -0
  15. data/docs/ContentQuickReply.md +16 -0
  16. data/docs/EdgeGroup.md +1 -0
  17. data/docs/EntityListing.md +1 -5
  18. data/docs/GoogleDialogflowCustomSettings.md +13 -0
  19. data/docs/LanguageUnderstandingApi.md +164 -30
  20. data/docs/ListItemComponent.md +19 -0
  21. data/docs/MessageContent.md +19 -0
  22. data/docs/NluDomainVersion.md +2 -1
  23. data/docs/NotificationTemplateBody.md +14 -0
  24. data/docs/NotificationTemplateFooter.md +13 -0
  25. data/docs/NotificationTemplateHeader.md +16 -0
  26. data/docs/NotificationTemplateParameter.md +14 -0
  27. data/docs/PostTextMessage.md +15 -0
  28. data/docs/PostTextRequest.md +23 -0
  29. data/docs/PostTextResponse.md +20 -0
  30. data/docs/SurveyForm.md +0 -2
  31. data/docs/TextbotsApi.md +78 -0
  32. data/lib/purecloudplatformclientv2.rb +22 -0
  33. data/lib/purecloudplatformclientv2/api/audit_api.rb +74 -0
  34. data/lib/purecloudplatformclientv2/api/language_understanding_api.rb +189 -30
  35. data/lib/purecloudplatformclientv2/api/textbots_api.rb +92 -0
  36. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  37. data/lib/purecloudplatformclientv2/models/amazon_lex_request.rb +232 -0
  38. data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +13 -13
  39. data/lib/purecloudplatformclientv2/models/audit_realtime_query_request.rb +360 -0
  40. data/lib/purecloudplatformclientv2/models/audit_realtime_query_results_response.rb +303 -0
  41. data/lib/purecloudplatformclientv2/models/button_component.rb +281 -0
  42. data/lib/purecloudplatformclientv2/models/content_actions.rb +309 -0
  43. data/lib/purecloudplatformclientv2/models/content_attachment.rb +378 -0
  44. data/lib/purecloudplatformclientv2/models/content_generic.rb +361 -0
  45. data/lib/purecloudplatformclientv2/models/content_list.rb +375 -0
  46. data/lib/purecloudplatformclientv2/models/content_location.rb +307 -0
  47. data/lib/purecloudplatformclientv2/models/content_notification_template.rb +312 -0
  48. data/lib/purecloudplatformclientv2/models/content_quick_reply.rb +300 -0
  49. data/lib/purecloudplatformclientv2/models/edge_group.rb +27 -1
  50. data/lib/purecloudplatformclientv2/models/entity_listing.rb +4 -104
  51. data/lib/purecloudplatformclientv2/models/google_dialogflow_custom_settings.rb +202 -0
  52. data/lib/purecloudplatformclientv2/models/list_item_component.rb +373 -0
  53. data/lib/purecloudplatformclientv2/models/message_content.rb +378 -0
  54. data/lib/purecloudplatformclientv2/models/nlu_domain_version.rb +32 -1
  55. data/lib/purecloudplatformclientv2/models/notification_template_body.rb +236 -0
  56. data/lib/purecloudplatformclientv2/models/notification_template_footer.rb +203 -0
  57. data/lib/purecloudplatformclientv2/models/notification_template_header.rb +302 -0
  58. data/lib/purecloudplatformclientv2/models/notification_template_parameter.rb +234 -0
  59. data/lib/purecloudplatformclientv2/models/post_text_message.rb +275 -0
  60. data/lib/purecloudplatformclientv2/models/post_text_request.rb +482 -0
  61. data/lib/purecloudplatformclientv2/models/post_text_response.rb +413 -0
  62. data/lib/purecloudplatformclientv2/models/survey_form.rb +1 -53
  63. data/lib/purecloudplatformclientv2/version.rb +1 -1
  64. metadata +46 -2
@@ -0,0 +1,361 @@
1
+ =begin
2
+ PureCloud Platform API
3
+
4
+ With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: DeveloperEvangelists@genesys.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ License: UNLICENSED
11
+ https://help.mypurecloud.com/articles/terms-and-conditions/
12
+
13
+ Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/
14
+
15
+ =end
16
+
17
+ require 'date'
18
+
19
+ module PureCloud
20
+ # Generic content object
21
+ class ContentGeneric
22
+ # An ID assigned to this rich message content. Each instance inside the content array has a unique ID.
23
+ attr_accessor :id
24
+
25
+ # Text to show in the title row
26
+ attr_accessor :title
27
+
28
+ # Text to show in the description row. This is immediately below the title
29
+ attr_accessor :description
30
+
31
+ # Path or URI to an image file
32
+ attr_accessor :image
33
+
34
+ # Path or URI to a video file
35
+ attr_accessor :video
36
+
37
+ # User actions available on the content. All actions are optional and all actions are executed simultaneously.
38
+ attr_accessor :actions
39
+
40
+ # An array of component objects
41
+ attr_accessor :components
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+
47
+ :'id' => :'id',
48
+
49
+ :'title' => :'title',
50
+
51
+ :'description' => :'description',
52
+
53
+ :'image' => :'image',
54
+
55
+ :'video' => :'video',
56
+
57
+ :'actions' => :'actions',
58
+
59
+ :'components' => :'components'
60
+
61
+ }
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.swagger_types
66
+ {
67
+
68
+ :'id' => :'String',
69
+
70
+ :'title' => :'String',
71
+
72
+ :'description' => :'String',
73
+
74
+ :'image' => :'String',
75
+
76
+ :'video' => :'String',
77
+
78
+ :'actions' => :'ContentActions',
79
+
80
+ :'components' => :'Array<ButtonComponent>'
81
+
82
+ }
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ return unless attributes.is_a?(Hash)
89
+
90
+ # convert string to symbol for hash key
91
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
92
+
93
+
94
+ if attributes.has_key?(:'id')
95
+
96
+
97
+ self.id = attributes[:'id']
98
+
99
+
100
+ end
101
+
102
+
103
+ if attributes.has_key?(:'title')
104
+
105
+
106
+ self.title = attributes[:'title']
107
+
108
+
109
+ end
110
+
111
+
112
+ if attributes.has_key?(:'description')
113
+
114
+
115
+ self.description = attributes[:'description']
116
+
117
+
118
+ end
119
+
120
+
121
+ if attributes.has_key?(:'image')
122
+
123
+
124
+ self.image = attributes[:'image']
125
+
126
+
127
+ end
128
+
129
+
130
+ if attributes.has_key?(:'video')
131
+
132
+
133
+ self.video = attributes[:'video']
134
+
135
+
136
+ end
137
+
138
+
139
+ if attributes.has_key?(:'actions')
140
+
141
+
142
+ self.actions = attributes[:'actions']
143
+
144
+
145
+ end
146
+
147
+
148
+ if attributes.has_key?(:'components')
149
+
150
+ if (value = attributes[:'components']).is_a?(Array)
151
+ self.components = value
152
+ end
153
+
154
+
155
+
156
+ end
157
+
158
+
159
+ end
160
+
161
+ # Show invalid properties with the reasons. Usually used together with valid?
162
+ # @return Array for valid properies with the reasons
163
+ def list_invalid_properties
164
+ invalid_properties = Array.new
165
+
166
+
167
+ return invalid_properties
168
+ end
169
+
170
+ # Check to see if the all the properties in the model are valid
171
+ # @return true if the model is valid
172
+ def valid?
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ end
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+ # Checks equality by comparing each attribute.
241
+ # @param [Object] Object to be compared
242
+ def ==(o)
243
+ return true if self.equal?(o)
244
+ self.class == o.class &&
245
+ id == o.id &&
246
+ title == o.title &&
247
+ description == o.description &&
248
+ image == o.image &&
249
+ video == o.video &&
250
+ actions == o.actions &&
251
+ components == o.components
252
+ end
253
+
254
+ # @see the `==` method
255
+ # @param [Object] Object to be compared
256
+ def eql?(o)
257
+ self == o
258
+ end
259
+
260
+ # Calculates hash code according to all attributes.
261
+ # @return [Fixnum] Hash code
262
+ def hash
263
+ [id, title, description, image, video, actions, components].hash
264
+ end
265
+
266
+ # build the object from hash
267
+ def build_from_hash(attributes)
268
+ return nil unless attributes.is_a?(Hash)
269
+ self.class.swagger_types.each_pair do |key, type|
270
+ if type =~ /^Array<(.*)>/i
271
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
272
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
273
+ else
274
+ #TODO show warning in debug mode
275
+ end
276
+ elsif !attributes[self.class.attribute_map[key]].nil?
277
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
278
+ else
279
+ # data not found in attributes(hash), not an issue as the data can be optional
280
+ end
281
+ end
282
+
283
+ self
284
+ end
285
+
286
+ def _deserialize(type, value)
287
+ case type.to_sym
288
+ when :DateTime
289
+ DateTime.parse(value)
290
+ when :Date
291
+ Date.parse(value)
292
+ when :String
293
+ value.to_s
294
+ when :Integer
295
+ value.to_i
296
+ when :Float
297
+ value.to_f
298
+ when :BOOLEAN
299
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
300
+ true
301
+ else
302
+ false
303
+ end
304
+ when :Object
305
+ # generic object (usually a Hash), return directly
306
+ value
307
+ when /\AArray<(?<inner_type>.+)>\z/
308
+ inner_type = Regexp.last_match[:inner_type]
309
+ value.map { |v| _deserialize(inner_type, v) }
310
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
311
+ k_type = Regexp.last_match[:k_type]
312
+ v_type = Regexp.last_match[:v_type]
313
+ {}.tap do |hash|
314
+ value.each do |k, v|
315
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
316
+ end
317
+ end
318
+ else # model
319
+ _model = Object.const_get("PureCloud").const_get(type).new
320
+ _model.build_from_hash(value)
321
+ end
322
+ end
323
+
324
+ def to_s
325
+ to_hash.to_s
326
+ end
327
+
328
+ # to_body is an alias to to_body (backward compatibility))
329
+ def to_body
330
+ to_hash
331
+ end
332
+
333
+ # return the object in the form of hash
334
+ def to_hash
335
+ hash = {}
336
+ self.class.attribute_map.each_pair do |attr, param|
337
+ value = self.send(attr)
338
+ next if value.nil?
339
+ hash[param] = _to_hash(value)
340
+ end
341
+ hash
342
+ end
343
+
344
+ # Method to output non-array value in the form of hash
345
+ # For object, use to_hash. Otherwise, just return the value
346
+ def _to_hash(value)
347
+ if value.is_a?(Array)
348
+ value.compact.map{ |v| _to_hash(v) }
349
+ elsif value.is_a?(Hash)
350
+ {}.tap do |hash|
351
+ value.each { |k, v| hash[k] = _to_hash(v) }
352
+ end
353
+ elsif value.respond_to? :to_hash
354
+ value.to_hash
355
+ else
356
+ value
357
+ end
358
+ end
359
+
360
+ end
361
+ end
@@ -0,0 +1,375 @@
1
+ =begin
2
+ PureCloud Platform API
3
+
4
+ With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: DeveloperEvangelists@genesys.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ License: UNLICENSED
11
+ https://help.mypurecloud.com/articles/terms-and-conditions/
12
+
13
+ Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/
14
+
15
+ =end
16
+
17
+ require 'date'
18
+
19
+ module PureCloud
20
+ # List content object
21
+ class ContentList
22
+ # An ID assigned to this rich message content. Each instance inside the content array has a unique ID.
23
+ attr_accessor :id
24
+
25
+ # The type of list this instance represents
26
+ attr_accessor :list_type
27
+
28
+ # Text to show in the title row
29
+ attr_accessor :title
30
+
31
+ # Text to show in the description row. This is immediately below the title
32
+ attr_accessor :description
33
+
34
+ # Label for Submit button
35
+ attr_accessor :submit_label
36
+
37
+ # User actions available on the content. All actions are optional and all actions are executed simultaneously.
38
+ attr_accessor :actions
39
+
40
+ # An array of component objects
41
+ attr_accessor :components
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+
47
+ :'id' => :'id',
48
+
49
+ :'list_type' => :'listType',
50
+
51
+ :'title' => :'title',
52
+
53
+ :'description' => :'description',
54
+
55
+ :'submit_label' => :'submitLabel',
56
+
57
+ :'actions' => :'actions',
58
+
59
+ :'components' => :'components'
60
+
61
+ }
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.swagger_types
66
+ {
67
+
68
+ :'id' => :'String',
69
+
70
+ :'list_type' => :'String',
71
+
72
+ :'title' => :'String',
73
+
74
+ :'description' => :'String',
75
+
76
+ :'submit_label' => :'String',
77
+
78
+ :'actions' => :'ContentActions',
79
+
80
+ :'components' => :'Array<ListItemComponent>'
81
+
82
+ }
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ return unless attributes.is_a?(Hash)
89
+
90
+ # convert string to symbol for hash key
91
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
92
+
93
+
94
+ if attributes.has_key?(:'id')
95
+
96
+
97
+ self.id = attributes[:'id']
98
+
99
+
100
+ end
101
+
102
+
103
+ if attributes.has_key?(:'listType')
104
+
105
+
106
+ self.list_type = attributes[:'listType']
107
+
108
+
109
+ end
110
+
111
+
112
+ if attributes.has_key?(:'title')
113
+
114
+
115
+ self.title = attributes[:'title']
116
+
117
+
118
+ end
119
+
120
+
121
+ if attributes.has_key?(:'description')
122
+
123
+
124
+ self.description = attributes[:'description']
125
+
126
+
127
+ end
128
+
129
+
130
+ if attributes.has_key?(:'submitLabel')
131
+
132
+
133
+ self.submit_label = attributes[:'submitLabel']
134
+
135
+
136
+ end
137
+
138
+
139
+ if attributes.has_key?(:'actions')
140
+
141
+
142
+ self.actions = attributes[:'actions']
143
+
144
+
145
+ end
146
+
147
+
148
+ if attributes.has_key?(:'components')
149
+
150
+ if (value = attributes[:'components']).is_a?(Array)
151
+ self.components = value
152
+ end
153
+
154
+
155
+
156
+ end
157
+
158
+
159
+ end
160
+
161
+ # Show invalid properties with the reasons. Usually used together with valid?
162
+ # @return Array for valid properies with the reasons
163
+ def list_invalid_properties
164
+ invalid_properties = Array.new
165
+
166
+
167
+ return invalid_properties
168
+ end
169
+
170
+ # Check to see if the all the properties in the model are valid
171
+ # @return true if the model is valid
172
+ def valid?
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ allowed_values = ["Selection", "Vertical"]
181
+ if @list_type && !allowed_values.include?(@list_type)
182
+ return false
183
+ end
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ end
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ # Custom attribute writer method checking allowed values (enum).
217
+ # @param [Object] list_type Object to be assigned
218
+ def list_type=(list_type)
219
+ allowed_values = ["Selection", "Vertical"]
220
+ if list_type && !allowed_values.include?(list_type)
221
+ fail ArgumentError, "invalid value for 'list_type', must be one of #{allowed_values}."
222
+ end
223
+ @list_type = list_type
224
+ end
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+ # Checks equality by comparing each attribute.
255
+ # @param [Object] Object to be compared
256
+ def ==(o)
257
+ return true if self.equal?(o)
258
+ self.class == o.class &&
259
+ id == o.id &&
260
+ list_type == o.list_type &&
261
+ title == o.title &&
262
+ description == o.description &&
263
+ submit_label == o.submit_label &&
264
+ actions == o.actions &&
265
+ components == o.components
266
+ end
267
+
268
+ # @see the `==` method
269
+ # @param [Object] Object to be compared
270
+ def eql?(o)
271
+ self == o
272
+ end
273
+
274
+ # Calculates hash code according to all attributes.
275
+ # @return [Fixnum] Hash code
276
+ def hash
277
+ [id, list_type, title, description, submit_label, actions, components].hash
278
+ end
279
+
280
+ # build the object from hash
281
+ def build_from_hash(attributes)
282
+ return nil unless attributes.is_a?(Hash)
283
+ self.class.swagger_types.each_pair do |key, type|
284
+ if type =~ /^Array<(.*)>/i
285
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
286
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
287
+ else
288
+ #TODO show warning in debug mode
289
+ end
290
+ elsif !attributes[self.class.attribute_map[key]].nil?
291
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
292
+ else
293
+ # data not found in attributes(hash), not an issue as the data can be optional
294
+ end
295
+ end
296
+
297
+ self
298
+ end
299
+
300
+ def _deserialize(type, value)
301
+ case type.to_sym
302
+ when :DateTime
303
+ DateTime.parse(value)
304
+ when :Date
305
+ Date.parse(value)
306
+ when :String
307
+ value.to_s
308
+ when :Integer
309
+ value.to_i
310
+ when :Float
311
+ value.to_f
312
+ when :BOOLEAN
313
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
314
+ true
315
+ else
316
+ false
317
+ end
318
+ when :Object
319
+ # generic object (usually a Hash), return directly
320
+ value
321
+ when /\AArray<(?<inner_type>.+)>\z/
322
+ inner_type = Regexp.last_match[:inner_type]
323
+ value.map { |v| _deserialize(inner_type, v) }
324
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
325
+ k_type = Regexp.last_match[:k_type]
326
+ v_type = Regexp.last_match[:v_type]
327
+ {}.tap do |hash|
328
+ value.each do |k, v|
329
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
330
+ end
331
+ end
332
+ else # model
333
+ _model = Object.const_get("PureCloud").const_get(type).new
334
+ _model.build_from_hash(value)
335
+ end
336
+ end
337
+
338
+ def to_s
339
+ to_hash.to_s
340
+ end
341
+
342
+ # to_body is an alias to to_body (backward compatibility))
343
+ def to_body
344
+ to_hash
345
+ end
346
+
347
+ # return the object in the form of hash
348
+ def to_hash
349
+ hash = {}
350
+ self.class.attribute_map.each_pair do |attr, param|
351
+ value = self.send(attr)
352
+ next if value.nil?
353
+ hash[param] = _to_hash(value)
354
+ end
355
+ hash
356
+ end
357
+
358
+ # Method to output non-array value in the form of hash
359
+ # For object, use to_hash. Otherwise, just return the value
360
+ def _to_hash(value)
361
+ if value.is_a?(Array)
362
+ value.compact.map{ |v| _to_hash(v) }
363
+ elsif value.is_a?(Hash)
364
+ {}.tap do |hash|
365
+ value.each { |k, v| hash[k] = _to_hash(v) }
366
+ end
367
+ elsif value.respond_to? :to_hash
368
+ value.to_hash
369
+ else
370
+ value
371
+ end
372
+ end
373
+
374
+ end
375
+ end