purecloudplatformclientv2 91.0.0 → 92.0.0

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.
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,202 @@
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
+ class GoogleDialogflowCustomSettings
21
+ # If set this environment will be used to initiate the dialogflow bot, otherwise the default configuration will be used. See https://cloud.google.com/dialogflow/docs/agents-versions
22
+ attr_accessor :environment
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+
28
+ :'environment' => :'environment'
29
+
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+
37
+ :'environment' => :'String'
38
+
39
+ }
40
+ end
41
+
42
+ # Initializes the object
43
+ # @param [Hash] attributes Model attributes in the form of hash
44
+ def initialize(attributes = {})
45
+ return unless attributes.is_a?(Hash)
46
+
47
+ # convert string to symbol for hash key
48
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
49
+
50
+
51
+ if attributes.has_key?(:'environment')
52
+
53
+
54
+ self.environment = attributes[:'environment']
55
+
56
+
57
+ end
58
+
59
+
60
+ end
61
+
62
+ # Show invalid properties with the reasons. Usually used together with valid?
63
+ # @return Array for valid properies with the reasons
64
+ def list_invalid_properties
65
+ invalid_properties = Array.new
66
+
67
+
68
+ return invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+
75
+
76
+
77
+
78
+
79
+ end
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ environment == o.environment
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 [Fixnum] Hash code
103
+ def hash
104
+ [environment].hash
105
+ end
106
+
107
+ # build the object from hash
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.swagger_types.each_pair do |key, type|
111
+ if type =~ /^Array<(.*)>/i
112
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
113
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
114
+ else
115
+ #TODO show warning in debug mode
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ else
120
+ # data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ def _deserialize(type, value)
128
+ case type.to_sym
129
+ when :DateTime
130
+ DateTime.parse(value)
131
+ when :Date
132
+ Date.parse(value)
133
+ when :String
134
+ value.to_s
135
+ when :Integer
136
+ value.to_i
137
+ when :Float
138
+ value.to_f
139
+ when :BOOLEAN
140
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
141
+ true
142
+ else
143
+ false
144
+ end
145
+ when :Object
146
+ # generic object (usually a Hash), return directly
147
+ value
148
+ when /\AArray<(?<inner_type>.+)>\z/
149
+ inner_type = Regexp.last_match[:inner_type]
150
+ value.map { |v| _deserialize(inner_type, v) }
151
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
152
+ k_type = Regexp.last_match[:k_type]
153
+ v_type = Regexp.last_match[:v_type]
154
+ {}.tap do |hash|
155
+ value.each do |k, v|
156
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
157
+ end
158
+ end
159
+ else # model
160
+ _model = Object.const_get("PureCloud").const_get(type).new
161
+ _model.build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_body (backward compatibility))
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # return the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ next if value.nil?
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ # Method to output non-array value in the form of hash
186
+ # For object, use to_hash. Otherwise, just return the value
187
+ def _to_hash(value)
188
+ if value.is_a?(Array)
189
+ value.compact.map{ |v| _to_hash(v) }
190
+ elsif value.is_a?(Hash)
191
+ {}.tap do |hash|
192
+ value.each { |k, v| hash[k] = _to_hash(v) }
193
+ end
194
+ elsif value.respond_to? :to_hash
195
+ value.to_hash
196
+ else
197
+ value
198
+ end
199
+ end
200
+
201
+ end
202
+ end
@@ -0,0 +1,373 @@
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
+ # An entry in List template
21
+ class ListItemComponent
22
+ # An ID assigned to this component
23
+ attr_accessor :id
24
+
25
+ # An ID of the rich message instance
26
+ attr_accessor :rmid
27
+
28
+ # The type of component to render
29
+ attr_accessor :type
30
+
31
+ # Path or URI to an image file
32
+ attr_accessor :image
33
+
34
+ # The main headline of the list item
35
+ attr_accessor :title
36
+
37
+ # Text to show in the description row
38
+ attr_accessor :description
39
+
40
+ # User actions available on the content. All actions are optional and all actions are executed simultaneously.
41
+ attr_accessor :actions
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+
47
+ :'id' => :'id',
48
+
49
+ :'rmid' => :'rmid',
50
+
51
+ :'type' => :'type',
52
+
53
+ :'image' => :'image',
54
+
55
+ :'title' => :'title',
56
+
57
+ :'description' => :'description',
58
+
59
+ :'actions' => :'actions'
60
+
61
+ }
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.swagger_types
66
+ {
67
+
68
+ :'id' => :'String',
69
+
70
+ :'rmid' => :'String',
71
+
72
+ :'type' => :'String',
73
+
74
+ :'image' => :'String',
75
+
76
+ :'title' => :'String',
77
+
78
+ :'description' => :'String',
79
+
80
+ :'actions' => :'ContentActions'
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?(:'rmid')
104
+
105
+
106
+ self.rmid = attributes[:'rmid']
107
+
108
+
109
+ end
110
+
111
+
112
+ if attributes.has_key?(:'type')
113
+
114
+
115
+ self.type = attributes[:'type']
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?(:'title')
131
+
132
+
133
+ self.title = attributes[:'title']
134
+
135
+
136
+ end
137
+
138
+
139
+ if attributes.has_key?(:'description')
140
+
141
+
142
+ self.description = attributes[:'description']
143
+
144
+
145
+ end
146
+
147
+
148
+ if attributes.has_key?(:'actions')
149
+
150
+
151
+ self.actions = attributes[:'actions']
152
+
153
+
154
+ end
155
+
156
+
157
+ end
158
+
159
+ # Show invalid properties with the reasons. Usually used together with valid?
160
+ # @return Array for valid properies with the reasons
161
+ def list_invalid_properties
162
+ invalid_properties = Array.new
163
+
164
+
165
+ return invalid_properties
166
+ end
167
+
168
+ # Check to see if the all the properties in the model are valid
169
+ # @return true if the model is valid
170
+ def valid?
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+ allowed_values = ["ListItem", "ListItemBig"]
183
+ if @type && !allowed_values.include?(@type)
184
+ return false
185
+ end
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+ end
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] type Object to be assigned
221
+ def type=(type)
222
+ allowed_values = ["ListItem", "ListItemBig"]
223
+ if type && !allowed_values.include?(type)
224
+ fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
225
+ end
226
+ @type = type
227
+ end
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
+ # Checks equality by comparing each attribute.
253
+ # @param [Object] Object to be compared
254
+ def ==(o)
255
+ return true if self.equal?(o)
256
+ self.class == o.class &&
257
+ id == o.id &&
258
+ rmid == o.rmid &&
259
+ type == o.type &&
260
+ image == o.image &&
261
+ title == o.title &&
262
+ description == o.description &&
263
+ actions == o.actions
264
+ end
265
+
266
+ # @see the `==` method
267
+ # @param [Object] Object to be compared
268
+ def eql?(o)
269
+ self == o
270
+ end
271
+
272
+ # Calculates hash code according to all attributes.
273
+ # @return [Fixnum] Hash code
274
+ def hash
275
+ [id, rmid, type, image, title, description, actions].hash
276
+ end
277
+
278
+ # build the object from hash
279
+ def build_from_hash(attributes)
280
+ return nil unless attributes.is_a?(Hash)
281
+ self.class.swagger_types.each_pair do |key, type|
282
+ if type =~ /^Array<(.*)>/i
283
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
284
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
285
+ else
286
+ #TODO show warning in debug mode
287
+ end
288
+ elsif !attributes[self.class.attribute_map[key]].nil?
289
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
290
+ else
291
+ # data not found in attributes(hash), not an issue as the data can be optional
292
+ end
293
+ end
294
+
295
+ self
296
+ end
297
+
298
+ def _deserialize(type, value)
299
+ case type.to_sym
300
+ when :DateTime
301
+ DateTime.parse(value)
302
+ when :Date
303
+ Date.parse(value)
304
+ when :String
305
+ value.to_s
306
+ when :Integer
307
+ value.to_i
308
+ when :Float
309
+ value.to_f
310
+ when :BOOLEAN
311
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
312
+ true
313
+ else
314
+ false
315
+ end
316
+ when :Object
317
+ # generic object (usually a Hash), return directly
318
+ value
319
+ when /\AArray<(?<inner_type>.+)>\z/
320
+ inner_type = Regexp.last_match[:inner_type]
321
+ value.map { |v| _deserialize(inner_type, v) }
322
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
323
+ k_type = Regexp.last_match[:k_type]
324
+ v_type = Regexp.last_match[:v_type]
325
+ {}.tap do |hash|
326
+ value.each do |k, v|
327
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
328
+ end
329
+ end
330
+ else # model
331
+ _model = Object.const_get("PureCloud").const_get(type).new
332
+ _model.build_from_hash(value)
333
+ end
334
+ end
335
+
336
+ def to_s
337
+ to_hash.to_s
338
+ end
339
+
340
+ # to_body is an alias to to_body (backward compatibility))
341
+ def to_body
342
+ to_hash
343
+ end
344
+
345
+ # return the object in the form of hash
346
+ def to_hash
347
+ hash = {}
348
+ self.class.attribute_map.each_pair do |attr, param|
349
+ value = self.send(attr)
350
+ next if value.nil?
351
+ hash[param] = _to_hash(value)
352
+ end
353
+ hash
354
+ end
355
+
356
+ # Method to output non-array value in the form of hash
357
+ # For object, use to_hash. Otherwise, just return the value
358
+ def _to_hash(value)
359
+ if value.is_a?(Array)
360
+ value.compact.map{ |v| _to_hash(v) }
361
+ elsif value.is_a?(Hash)
362
+ {}.tap do |hash|
363
+ value.each { |k, v| hash[k] = _to_hash(v) }
364
+ end
365
+ elsif value.respond_to? :to_hash
366
+ value.to_hash
367
+ else
368
+ value
369
+ end
370
+ end
371
+
372
+ end
373
+ end