purecloudplatformclientv2 27.1.0 → 28.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/AdditionalMessage.md +13 -0
  4. data/docs/AnalyticsParticipant.md +1 -0
  5. data/docs/ArchitectApi.md +40 -28
  6. data/docs/Attachment.md +5 -5
  7. data/docs/ConversationNotificationAttachment.md +18 -0
  8. data/docs/ConversationNotificationDraftAttachments.md +18 -0
  9. data/docs/ConversationNotificationEmail.md +1 -0
  10. data/docs/ConversationNotificationEmails.md +1 -0
  11. data/docs/ConversationsApi.md +964 -198
  12. data/docs/DataTable.md +17 -0
  13. data/docs/DataTableRowEntityListing.md +22 -0
  14. data/docs/DataTablesDomainEntityListing.md +22 -0
  15. data/docs/Document.md +1 -1
  16. data/docs/DomainEdgeSoftwareVersionDto.md +1 -1
  17. data/docs/DomainOrganizationRole.md +1 -1
  18. data/docs/DomainOrganizationRoleCreate.md +1 -1
  19. data/docs/DomainOrganizationRoleUpdate.md +1 -1
  20. data/docs/Email.md +1 -0
  21. data/docs/EmailConversationNotificationAttachment.md +18 -0
  22. data/docs/EmailConversationNotificationEmailMediaParticipant.md +1 -0
  23. data/docs/EmailConversationNotificationParticipants.md +1 -0
  24. data/docs/EmailMediaParticipant.md +1 -0
  25. data/docs/FaxDocument.md +1 -1
  26. data/docs/JsonNode.md +4 -4
  27. data/docs/MessageConversation.md +17 -0
  28. data/docs/MessageConversationEntityListing.md +22 -0
  29. data/docs/MessageData.md +25 -0
  30. data/docs/MessageMediaParticipant.md +44 -0
  31. data/docs/Question.md +1 -1
  32. data/docs/Recipient.md +20 -0
  33. data/docs/RecipientListing.md +22 -0
  34. data/docs/RoutingApi.md +632 -0
  35. data/docs/SMSAvailablePhoneNumberEntityListing.md +13 -0
  36. data/docs/SmsAddressProvision.md +21 -0
  37. data/docs/SmsAvailablePhoneNumber.md +22 -0
  38. data/docs/SmsPhoneNumber.md +25 -0
  39. data/docs/SmsPhoneNumberEntityListing.md +22 -0
  40. data/docs/SmsPhoneNumberProvision.md +18 -0
  41. data/docs/TextMessageListing.md +22 -0
  42. data/lib/purecloudplatformclientv2.rb +20 -0
  43. data/lib/purecloudplatformclientv2/api/architect_api.rb +108 -34
  44. data/lib/purecloudplatformclientv2/api/conversations_api.rb +1247 -317
  45. data/lib/purecloudplatformclientv2/api/routing_api.rb +829 -43
  46. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  47. data/lib/purecloudplatformclientv2/models/additional_message.rb +207 -0
  48. data/lib/purecloudplatformclientv2/models/aggregate_metric_data.rb +2 -2
  49. data/lib/purecloudplatformclientv2/models/analytics_participant.rb +41 -1
  50. data/lib/purecloudplatformclientv2/models/analytics_query_predicate.rb +4 -4
  51. data/lib/purecloudplatformclientv2/models/attachment.rb +5 -0
  52. data/lib/purecloudplatformclientv2/models/conversation_notification_attachment.rb +326 -0
  53. data/lib/purecloudplatformclientv2/models/conversation_notification_draft_attachments.rb +326 -0
  54. data/lib/purecloudplatformclientv2/models/conversation_notification_email.rb +28 -1
  55. data/lib/purecloudplatformclientv2/models/conversation_notification_emails.rb +28 -1
  56. data/lib/purecloudplatformclientv2/models/data_table.rb +306 -0
  57. data/lib/purecloudplatformclientv2/models/data_table_row_entity_listing.rb +428 -0
  58. data/lib/purecloudplatformclientv2/models/data_tables_domain_entity_listing.rb +428 -0
  59. data/lib/purecloudplatformclientv2/models/document.rb +12 -12
  60. data/lib/purecloudplatformclientv2/models/domain_edge_software_version_dto.rb +12 -12
  61. data/lib/purecloudplatformclientv2/models/domain_organization_role.rb +12 -12
  62. data/lib/purecloudplatformclientv2/models/domain_organization_role_create.rb +12 -12
  63. data/lib/purecloudplatformclientv2/models/domain_organization_role_update.rb +12 -12
  64. data/lib/purecloudplatformclientv2/models/email.rb +32 -4
  65. data/lib/purecloudplatformclientv2/models/email_conversation_notification_attachment.rb +326 -0
  66. data/lib/purecloudplatformclientv2/models/email_conversation_notification_email_media_participant.rb +31 -4
  67. data/lib/purecloudplatformclientv2/models/email_conversation_notification_participants.rb +31 -4
  68. data/lib/purecloudplatformclientv2/models/email_media_participant.rb +32 -4
  69. data/lib/purecloudplatformclientv2/models/fax_document.rb +12 -12
  70. data/lib/purecloudplatformclientv2/models/json_node.rb +72 -72
  71. data/lib/purecloudplatformclientv2/models/message_conversation.rb +309 -0
  72. data/lib/purecloudplatformclientv2/models/message_conversation_entity_listing.rb +428 -0
  73. data/lib/purecloudplatformclientv2/models/message_data.rb +572 -0
  74. data/lib/purecloudplatformclientv2/models/message_media_participant.rb +1068 -0
  75. data/lib/purecloudplatformclientv2/models/question.rb +13 -13
  76. data/lib/purecloudplatformclientv2/models/recipient.rb +383 -0
  77. data/lib/purecloudplatformclientv2/models/recipient_listing.rb +428 -0
  78. data/lib/purecloudplatformclientv2/models/sms_address_provision.rb +440 -0
  79. data/lib/purecloudplatformclientv2/models/sms_available_phone_number.rb +465 -0
  80. data/lib/purecloudplatformclientv2/models/sms_available_phone_number_entity_listing.rb +203 -0
  81. data/lib/purecloudplatformclientv2/models/sms_phone_number.rb +546 -0
  82. data/lib/purecloudplatformclientv2/models/sms_phone_number_entity_listing.rb +428 -0
  83. data/lib/purecloudplatformclientv2/models/sms_phone_number_provision.rb +360 -0
  84. data/lib/purecloudplatformclientv2/models/text_message_listing.rb +428 -0
  85. data/lib/purecloudplatformclientv2/version.rb +1 -1
  86. metadata +42 -2
@@ -0,0 +1,465 @@
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: ININ
11
+ http://www.inin.com
12
+
13
+ Terms of Service: https://developer.mypurecloud.com/tos
14
+
15
+ =end
16
+
17
+ require 'date'
18
+
19
+ module PureCloud
20
+ class SmsAvailablePhoneNumber
21
+ # The globally unique identifier for the object.
22
+ attr_accessor :id
23
+
24
+ attr_accessor :name
25
+
26
+ # A phone number available for provisioning in E.164 format. E.g. +13175555555 or +34234234234
27
+ attr_accessor :phone_number
28
+
29
+ # The ISO 3166-1 alpha-2 country code of the country this phone number is associated with.
30
+ attr_accessor :country_code
31
+
32
+ # The region/province/state the phone number is associated with.
33
+ attr_accessor :region
34
+
35
+ # The city the phone number is associated with.
36
+ attr_accessor :city
37
+
38
+ # The capabilities of the phone number available for provisioning.
39
+ attr_accessor :capabilities
40
+
41
+ # The type of phone number available for provisioning.
42
+ attr_accessor :phone_number_type
43
+
44
+ # The address requirement needed for provisioning this number. If there is a requirement, the address must be the residence or place of business of the individual or entity using the phone number.
45
+ attr_accessor :address_requirement
46
+
47
+ # The URI for this object
48
+ attr_accessor :self_uri
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+
54
+ :'id' => :'id',
55
+
56
+ :'name' => :'name',
57
+
58
+ :'phone_number' => :'phoneNumber',
59
+
60
+ :'country_code' => :'countryCode',
61
+
62
+ :'region' => :'region',
63
+
64
+ :'city' => :'city',
65
+
66
+ :'capabilities' => :'capabilities',
67
+
68
+ :'phone_number_type' => :'phoneNumberType',
69
+
70
+ :'address_requirement' => :'addressRequirement',
71
+
72
+ :'self_uri' => :'selfUri'
73
+
74
+ }
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ def self.swagger_types
79
+ {
80
+
81
+ :'id' => :'String',
82
+
83
+ :'name' => :'String',
84
+
85
+ :'phone_number' => :'String',
86
+
87
+ :'country_code' => :'String',
88
+
89
+ :'region' => :'String',
90
+
91
+ :'city' => :'String',
92
+
93
+ :'capabilities' => :'Array<String>',
94
+
95
+ :'phone_number_type' => :'String',
96
+
97
+ :'address_requirement' => :'String',
98
+
99
+ :'self_uri' => :'String'
100
+
101
+ }
102
+ end
103
+
104
+ # Initializes the object
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ def initialize(attributes = {})
107
+ return unless attributes.is_a?(Hash)
108
+
109
+ # convert string to symbol for hash key
110
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
111
+
112
+
113
+ if attributes.has_key?(:'id')
114
+
115
+
116
+ self.id = attributes[:'id']
117
+
118
+
119
+ end
120
+
121
+
122
+ if attributes.has_key?(:'name')
123
+
124
+
125
+ self.name = attributes[:'name']
126
+
127
+
128
+ end
129
+
130
+
131
+ if attributes.has_key?(:'phoneNumber')
132
+
133
+
134
+ self.phone_number = attributes[:'phoneNumber']
135
+
136
+
137
+ end
138
+
139
+
140
+ if attributes.has_key?(:'countryCode')
141
+
142
+
143
+ self.country_code = attributes[:'countryCode']
144
+
145
+
146
+ end
147
+
148
+
149
+ if attributes.has_key?(:'region')
150
+
151
+
152
+ self.region = attributes[:'region']
153
+
154
+
155
+ end
156
+
157
+
158
+ if attributes.has_key?(:'city')
159
+
160
+
161
+ self.city = attributes[:'city']
162
+
163
+
164
+ end
165
+
166
+
167
+ if attributes.has_key?(:'capabilities')
168
+
169
+ if (value = attributes[:'capabilities']).is_a?(Array)
170
+ self.capabilities = value
171
+ end
172
+
173
+
174
+
175
+ end
176
+
177
+
178
+ if attributes.has_key?(:'phoneNumberType')
179
+
180
+
181
+ self.phone_number_type = attributes[:'phoneNumberType']
182
+
183
+
184
+ end
185
+
186
+
187
+ if attributes.has_key?(:'addressRequirement')
188
+
189
+
190
+ self.address_requirement = attributes[:'addressRequirement']
191
+
192
+
193
+ end
194
+
195
+
196
+ if attributes.has_key?(:'selfUri')
197
+
198
+
199
+ self.self_uri = attributes[:'selfUri']
200
+
201
+
202
+ end
203
+
204
+
205
+ end
206
+
207
+ # Show invalid properties with the reasons. Usually used together with valid?
208
+ # @return Array for valid properies with the reasons
209
+ def list_invalid_properties
210
+ invalid_properties = Array.new
211
+
212
+
213
+ return invalid_properties
214
+ end
215
+
216
+ # Check to see if the all the properties in the model are valid
217
+ # @return true if the model is valid
218
+ def valid?
219
+
220
+
221
+
222
+
223
+
224
+
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
+ allowed_values = ["local", "mobile", "tollfree", "shortcode"]
251
+ if @phone_number_type && !allowed_values.include?(@phone_number_type)
252
+ return false
253
+ end
254
+
255
+
256
+
257
+
258
+
259
+ allowed_values = ["none", "any", "local", "foreign"]
260
+ if @address_requirement && !allowed_values.include?(@address_requirement)
261
+ return false
262
+ end
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+ end
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+ # Custom attribute writer method checking allowed values (enum).
310
+ # @param [Object] phone_number_type Object to be assigned
311
+ def phone_number_type=(phone_number_type)
312
+ allowed_values = ["local", "mobile", "tollfree", "shortcode"]
313
+ if phone_number_type && !allowed_values.include?(phone_number_type)
314
+ fail ArgumentError, "invalid value for 'phone_number_type', must be one of #{allowed_values}."
315
+ end
316
+ @phone_number_type = phone_number_type
317
+ end
318
+
319
+
320
+
321
+
322
+
323
+ # Custom attribute writer method checking allowed values (enum).
324
+ # @param [Object] address_requirement Object to be assigned
325
+ def address_requirement=(address_requirement)
326
+ allowed_values = ["none", "any", "local", "foreign"]
327
+ if address_requirement && !allowed_values.include?(address_requirement)
328
+ fail ArgumentError, "invalid value for 'address_requirement', must be one of #{allowed_values}."
329
+ end
330
+ @address_requirement = address_requirement
331
+ end
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+ # Checks equality by comparing each attribute.
342
+ # @param [Object] Object to be compared
343
+ def ==(o)
344
+ return true if self.equal?(o)
345
+ self.class == o.class &&
346
+ id == o.id &&
347
+ name == o.name &&
348
+ phone_number == o.phone_number &&
349
+ country_code == o.country_code &&
350
+ region == o.region &&
351
+ city == o.city &&
352
+ capabilities == o.capabilities &&
353
+ phone_number_type == o.phone_number_type &&
354
+ address_requirement == o.address_requirement &&
355
+ self_uri == o.self_uri
356
+ end
357
+
358
+ # @see the `==` method
359
+ # @param [Object] Object to be compared
360
+ def eql?(o)
361
+ self == o
362
+ end
363
+
364
+ # Calculates hash code according to all attributes.
365
+ # @return [Fixnum] Hash code
366
+ def hash
367
+ [id, name, phone_number, country_code, region, city, capabilities, phone_number_type, address_requirement, self_uri].hash
368
+ end
369
+
370
+ # build the object from hash
371
+ def build_from_hash(attributes)
372
+ return nil unless attributes.is_a?(Hash)
373
+ self.class.swagger_types.each_pair do |key, type|
374
+ if type =~ /^Array<(.*)>/i
375
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
376
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
377
+ else
378
+ #TODO show warning in debug mode
379
+ end
380
+ elsif !attributes[self.class.attribute_map[key]].nil?
381
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
382
+ else
383
+ # data not found in attributes(hash), not an issue as the data can be optional
384
+ end
385
+ end
386
+
387
+ self
388
+ end
389
+
390
+ def _deserialize(type, value)
391
+ case type.to_sym
392
+ when :DateTime
393
+ DateTime.parse(value)
394
+ when :Date
395
+ Date.parse(value)
396
+ when :String
397
+ value.to_s
398
+ when :Integer
399
+ value.to_i
400
+ when :Float
401
+ value.to_f
402
+ when :BOOLEAN
403
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
404
+ true
405
+ else
406
+ false
407
+ end
408
+ when :Object
409
+ # generic object (usually a Hash), return directly
410
+ value
411
+ when /\AArray<(?<inner_type>.+)>\z/
412
+ inner_type = Regexp.last_match[:inner_type]
413
+ value.map { |v| _deserialize(inner_type, v) }
414
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
415
+ k_type = Regexp.last_match[:k_type]
416
+ v_type = Regexp.last_match[:v_type]
417
+ {}.tap do |hash|
418
+ value.each do |k, v|
419
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
420
+ end
421
+ end
422
+ else # model
423
+ _model = Object.const_get("PureCloud").const_get(type).new
424
+ _model.build_from_hash(value)
425
+ end
426
+ end
427
+
428
+ def to_s
429
+ to_hash.to_s
430
+ end
431
+
432
+ # to_body is an alias to to_body (backward compatibility))
433
+ def to_body
434
+ to_hash
435
+ end
436
+
437
+ # return the object in the form of hash
438
+ def to_hash
439
+ hash = {}
440
+ self.class.attribute_map.each_pair do |attr, param|
441
+ value = self.send(attr)
442
+ next if value.nil?
443
+ hash[param] = _to_hash(value)
444
+ end
445
+ hash
446
+ end
447
+
448
+ # Method to output non-array value in the form of hash
449
+ # For object, use to_hash. Otherwise, just return the value
450
+ def _to_hash(value)
451
+ if value.is_a?(Array)
452
+ value.compact.map{ |v| _to_hash(v) }
453
+ elsif value.is_a?(Hash)
454
+ {}.tap do |hash|
455
+ value.each { |k, v| hash[k] = _to_hash(v) }
456
+ end
457
+ elsif value.respond_to? :to_hash
458
+ value.to_hash
459
+ else
460
+ value
461
+ end
462
+ end
463
+
464
+ end
465
+ end