purecloudplatformclientv2 86.0.0 → 87.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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/AnalyticsEvaluation.md +1 -1
  4. data/docs/CoachingAnnotation.md +21 -0
  5. data/docs/CoachingAnnotationCreateRequest.md +14 -0
  6. data/docs/CoachingAnnotationList.md +22 -0
  7. data/docs/CoachingApi.md +1132 -0
  8. data/docs/CoachingAppointmentReference.md +14 -0
  9. data/docs/CoachingAppointmentResponse.md +27 -0
  10. data/docs/CoachingAppointmentResponseList.md +22 -0
  11. data/docs/CoachingAppointmentStatusDto.md +16 -0
  12. data/docs/CoachingAppointmentStatusDtoList.md +17 -0
  13. data/docs/CoachingNotification.md +23 -0
  14. data/docs/CoachingNotificationList.md +22 -0
  15. data/docs/ConversationEventTopicCall.md +1 -0
  16. data/docs/ConversationEventTopicCallback.md +1 -0
  17. data/docs/ConversationEventTopicChat.md +1 -0
  18. data/docs/ConversationEventTopicCobrowse.md +1 -0
  19. data/docs/ConversationEventTopicEmail.md +1 -0
  20. data/docs/ConversationEventTopicMessage.md +1 -0
  21. data/docs/ConversationEventTopicScreenshare.md +1 -0
  22. data/docs/ConversationEventTopicSocialExpression.md +1 -0
  23. data/docs/ConversationEventTopicVideo.md +1 -0
  24. data/docs/ConversationReference.md +14 -0
  25. data/docs/CreateCoachingAppointmentRequest.md +20 -0
  26. data/docs/DocumentReference.md +14 -0
  27. data/docs/EntityListing.md +5 -1
  28. data/docs/QueueConversationEventTopicCall.md +1 -0
  29. data/docs/QueueConversationEventTopicCallback.md +1 -0
  30. data/docs/QueueConversationEventTopicChat.md +1 -0
  31. data/docs/QueueConversationEventTopicCobrowse.md +1 -0
  32. data/docs/QueueConversationEventTopicEmail.md +1 -0
  33. data/docs/QueueConversationEventTopicMessage.md +1 -0
  34. data/docs/QueueConversationEventTopicScreenshare.md +1 -0
  35. data/docs/QueueConversationEventTopicSocialExpression.md +1 -0
  36. data/docs/QueueConversationEventTopicVideo.md +1 -0
  37. data/docs/QueueConversationSocialExpressionEventTopicCall.md +1 -0
  38. data/docs/QueueConversationSocialExpressionEventTopicCallback.md +1 -0
  39. data/docs/QueueConversationSocialExpressionEventTopicChat.md +1 -0
  40. data/docs/QueueConversationSocialExpressionEventTopicCobrowse.md +1 -0
  41. data/docs/QueueConversationSocialExpressionEventTopicEmail.md +1 -0
  42. data/docs/QueueConversationSocialExpressionEventTopicMessage.md +1 -0
  43. data/docs/QueueConversationSocialExpressionEventTopicScreenshare.md +1 -0
  44. data/docs/QueueConversationSocialExpressionEventTopicSocialExpression.md +1 -0
  45. data/docs/QueueConversationSocialExpressionEventTopicVideo.md +1 -0
  46. data/docs/QueueConversationVideoEventTopicCall.md +1 -0
  47. data/docs/QueueConversationVideoEventTopicCallback.md +1 -0
  48. data/docs/QueueConversationVideoEventTopicChat.md +1 -0
  49. data/docs/QueueConversationVideoEventTopicCobrowse.md +1 -0
  50. data/docs/QueueConversationVideoEventTopicEmail.md +1 -0
  51. data/docs/QueueConversationVideoEventTopicMessage.md +1 -0
  52. data/docs/QueueConversationVideoEventTopicScreenshare.md +1 -0
  53. data/docs/QueueConversationVideoEventTopicSocialExpression.md +1 -0
  54. data/docs/QueueConversationVideoEventTopicVideo.md +1 -0
  55. data/docs/UpdateCoachingAppointmentRequest.md +18 -0
  56. data/docs/WemLearningAssignmentRuleRunTopicLearningAssignmentRuleRunNotification.md +14 -0
  57. data/docs/WemLearningAssignmentRuleRunTopicLearningModuleReference.md +14 -0
  58. data/docs/WemLearningAssignmentRuleRunTopicWemLearningAssignmentsCreated.md +13 -0
  59. data/docs/WemLearningAssignmentTopicLearningAssignmentNotification.md +22 -0
  60. data/docs/WemLearningAssignmentTopicLearningModuleReference.md +14 -0
  61. data/docs/WemLearningAssignmentTopicUserReference.md +13 -0
  62. data/lib/purecloudplatformclientv2.rb +21 -0
  63. data/lib/purecloudplatformclientv2/api/coaching_api.rb +1296 -0
  64. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  65. data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +13 -13
  66. data/lib/purecloudplatformclientv2/models/coaching_annotation.rb +429 -0
  67. data/lib/purecloudplatformclientv2/models/coaching_annotation_create_request.rb +252 -0
  68. data/lib/purecloudplatformclientv2/models/coaching_annotation_list.rb +428 -0
  69. data/lib/purecloudplatformclientv2/models/coaching_appointment_reference.rb +228 -0
  70. data/lib/purecloudplatformclientv2/models/coaching_appointment_response.rb +587 -0
  71. data/lib/purecloudplatformclientv2/models/coaching_appointment_response_list.rb +428 -0
  72. data/lib/purecloudplatformclientv2/models/coaching_appointment_status_dto.rb +299 -0
  73. data/lib/purecloudplatformclientv2/models/coaching_appointment_status_dto_list.rb +303 -0
  74. data/lib/purecloudplatformclientv2/models/coaching_notification.rb +504 -0
  75. data/lib/purecloudplatformclientv2/models/coaching_notification_list.rb +428 -0
  76. data/lib/purecloudplatformclientv2/models/conversation_chat.rb +2 -2
  77. data/lib/purecloudplatformclientv2/models/conversation_event_topic_call.rb +26 -1
  78. data/lib/purecloudplatformclientv2/models/conversation_event_topic_callback.rb +26 -1
  79. data/lib/purecloudplatformclientv2/models/conversation_event_topic_chat.rb +26 -1
  80. data/lib/purecloudplatformclientv2/models/conversation_event_topic_cobrowse.rb +26 -1
  81. data/lib/purecloudplatformclientv2/models/conversation_event_topic_email.rb +26 -1
  82. data/lib/purecloudplatformclientv2/models/conversation_event_topic_message.rb +26 -1
  83. data/lib/purecloudplatformclientv2/models/conversation_event_topic_screenshare.rb +26 -1
  84. data/lib/purecloudplatformclientv2/models/conversation_event_topic_social_expression.rb +26 -1
  85. data/lib/purecloudplatformclientv2/models/conversation_event_topic_video.rb +26 -1
  86. data/lib/purecloudplatformclientv2/models/conversation_reference.rb +228 -0
  87. data/lib/purecloudplatformclientv2/models/create_coaching_appointment_request.rb +426 -0
  88. data/lib/purecloudplatformclientv2/models/document_reference.rb +228 -0
  89. data/lib/purecloudplatformclientv2/models/entity_listing.rb +104 -4
  90. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_call.rb +26 -1
  91. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_callback.rb +26 -1
  92. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_chat.rb +26 -1
  93. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_cobrowse.rb +26 -1
  94. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_email.rb +26 -1
  95. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_message.rb +26 -1
  96. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_screenshare.rb +26 -1
  97. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_social_expression.rb +26 -1
  98. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_video.rb +26 -1
  99. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_call.rb +26 -1
  100. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_callback.rb +26 -1
  101. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_chat.rb +26 -1
  102. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_cobrowse.rb +26 -1
  103. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_email.rb +26 -1
  104. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_message.rb +26 -1
  105. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_screenshare.rb +26 -1
  106. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_social_expression.rb +26 -1
  107. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_video.rb +26 -1
  108. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_call.rb +26 -1
  109. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_callback.rb +26 -1
  110. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_chat.rb +26 -1
  111. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_cobrowse.rb +26 -1
  112. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_email.rb +26 -1
  113. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_message.rb +26 -1
  114. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_screenshare.rb +26 -1
  115. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_social_expression.rb +26 -1
  116. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_video.rb +26 -1
  117. data/lib/purecloudplatformclientv2/models/update_coaching_appointment_request.rb +337 -0
  118. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_rule_run_topic_learning_assignment_rule_run_notification.rb +228 -0
  119. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_rule_run_topic_learning_module_reference.rb +226 -0
  120. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_rule_run_topic_wem_learning_assignments_created.rb +201 -0
  121. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_topic_learning_assignment_notification.rb +440 -0
  122. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_topic_learning_module_reference.rb +226 -0
  123. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_topic_user_reference.rb +201 -0
  124. data/lib/purecloudplatformclientv2/version.rb +1 -1
  125. metadata +44 -2
@@ -0,0 +1,428 @@
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 CoachingAppointmentResponseList
21
+ attr_accessor :entities
22
+
23
+ attr_accessor :page_size
24
+
25
+ attr_accessor :page_number
26
+
27
+ attr_accessor :total
28
+
29
+ attr_accessor :first_uri
30
+
31
+ attr_accessor :self_uri
32
+
33
+ attr_accessor :next_uri
34
+
35
+ attr_accessor :last_uri
36
+
37
+ attr_accessor :previous_uri
38
+
39
+ attr_accessor :page_count
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+
45
+ :'entities' => :'entities',
46
+
47
+ :'page_size' => :'pageSize',
48
+
49
+ :'page_number' => :'pageNumber',
50
+
51
+ :'total' => :'total',
52
+
53
+ :'first_uri' => :'firstUri',
54
+
55
+ :'self_uri' => :'selfUri',
56
+
57
+ :'next_uri' => :'nextUri',
58
+
59
+ :'last_uri' => :'lastUri',
60
+
61
+ :'previous_uri' => :'previousUri',
62
+
63
+ :'page_count' => :'pageCount'
64
+
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ {
71
+
72
+ :'entities' => :'Array<CoachingAppointmentResponse>',
73
+
74
+ :'page_size' => :'Integer',
75
+
76
+ :'page_number' => :'Integer',
77
+
78
+ :'total' => :'Integer',
79
+
80
+ :'first_uri' => :'String',
81
+
82
+ :'self_uri' => :'String',
83
+
84
+ :'next_uri' => :'String',
85
+
86
+ :'last_uri' => :'String',
87
+
88
+ :'previous_uri' => :'String',
89
+
90
+ :'page_count' => :'Integer'
91
+
92
+ }
93
+ end
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ def initialize(attributes = {})
98
+ return unless attributes.is_a?(Hash)
99
+
100
+ # convert string to symbol for hash key
101
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
102
+
103
+
104
+ if attributes.has_key?(:'entities')
105
+
106
+ if (value = attributes[:'entities']).is_a?(Array)
107
+ self.entities = value
108
+ end
109
+
110
+
111
+
112
+ end
113
+
114
+
115
+ if attributes.has_key?(:'pageSize')
116
+
117
+
118
+ self.page_size = attributes[:'pageSize']
119
+
120
+
121
+ end
122
+
123
+
124
+ if attributes.has_key?(:'pageNumber')
125
+
126
+
127
+ self.page_number = attributes[:'pageNumber']
128
+
129
+
130
+ end
131
+
132
+
133
+ if attributes.has_key?(:'total')
134
+
135
+
136
+ self.total = attributes[:'total']
137
+
138
+
139
+ end
140
+
141
+
142
+ if attributes.has_key?(:'firstUri')
143
+
144
+
145
+ self.first_uri = attributes[:'firstUri']
146
+
147
+
148
+ end
149
+
150
+
151
+ if attributes.has_key?(:'selfUri')
152
+
153
+
154
+ self.self_uri = attributes[:'selfUri']
155
+
156
+
157
+ end
158
+
159
+
160
+ if attributes.has_key?(:'nextUri')
161
+
162
+
163
+ self.next_uri = attributes[:'nextUri']
164
+
165
+
166
+ end
167
+
168
+
169
+ if attributes.has_key?(:'lastUri')
170
+
171
+
172
+ self.last_uri = attributes[:'lastUri']
173
+
174
+
175
+ end
176
+
177
+
178
+ if attributes.has_key?(:'previousUri')
179
+
180
+
181
+ self.previous_uri = attributes[:'previousUri']
182
+
183
+
184
+ end
185
+
186
+
187
+ if attributes.has_key?(:'pageCount')
188
+
189
+
190
+ self.page_count = attributes[:'pageCount']
191
+
192
+
193
+ end
194
+
195
+
196
+ end
197
+
198
+ # Show invalid properties with the reasons. Usually used together with valid?
199
+ # @return Array for valid properies with the reasons
200
+ def list_invalid_properties
201
+ invalid_properties = Array.new
202
+
203
+
204
+ return invalid_properties
205
+ end
206
+
207
+ # Check to see if the all the properties in the model are valid
208
+ # @return true if the model is valid
209
+ def valid?
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
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+ end
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
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
+ # Checks equality by comparing each attribute.
305
+ # @param [Object] Object to be compared
306
+ def ==(o)
307
+ return true if self.equal?(o)
308
+ self.class == o.class &&
309
+ entities == o.entities &&
310
+ page_size == o.page_size &&
311
+ page_number == o.page_number &&
312
+ total == o.total &&
313
+ first_uri == o.first_uri &&
314
+ self_uri == o.self_uri &&
315
+ next_uri == o.next_uri &&
316
+ last_uri == o.last_uri &&
317
+ previous_uri == o.previous_uri &&
318
+ page_count == o.page_count
319
+ end
320
+
321
+ # @see the `==` method
322
+ # @param [Object] Object to be compared
323
+ def eql?(o)
324
+ self == o
325
+ end
326
+
327
+ # Calculates hash code according to all attributes.
328
+ # @return [Fixnum] Hash code
329
+ def hash
330
+ [entities, page_size, page_number, total, first_uri, self_uri, next_uri, last_uri, previous_uri, page_count].hash
331
+ end
332
+
333
+ # build the object from hash
334
+ def build_from_hash(attributes)
335
+ return nil unless attributes.is_a?(Hash)
336
+ self.class.swagger_types.each_pair do |key, type|
337
+ if type =~ /^Array<(.*)>/i
338
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
339
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
340
+ else
341
+ #TODO show warning in debug mode
342
+ end
343
+ elsif !attributes[self.class.attribute_map[key]].nil?
344
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
345
+ else
346
+ # data not found in attributes(hash), not an issue as the data can be optional
347
+ end
348
+ end
349
+
350
+ self
351
+ end
352
+
353
+ def _deserialize(type, value)
354
+ case type.to_sym
355
+ when :DateTime
356
+ DateTime.parse(value)
357
+ when :Date
358
+ Date.parse(value)
359
+ when :String
360
+ value.to_s
361
+ when :Integer
362
+ value.to_i
363
+ when :Float
364
+ value.to_f
365
+ when :BOOLEAN
366
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
367
+ true
368
+ else
369
+ false
370
+ end
371
+ when :Object
372
+ # generic object (usually a Hash), return directly
373
+ value
374
+ when /\AArray<(?<inner_type>.+)>\z/
375
+ inner_type = Regexp.last_match[:inner_type]
376
+ value.map { |v| _deserialize(inner_type, v) }
377
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
378
+ k_type = Regexp.last_match[:k_type]
379
+ v_type = Regexp.last_match[:v_type]
380
+ {}.tap do |hash|
381
+ value.each do |k, v|
382
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
383
+ end
384
+ end
385
+ else # model
386
+ _model = Object.const_get("PureCloud").const_get(type).new
387
+ _model.build_from_hash(value)
388
+ end
389
+ end
390
+
391
+ def to_s
392
+ to_hash.to_s
393
+ end
394
+
395
+ # to_body is an alias to to_body (backward compatibility))
396
+ def to_body
397
+ to_hash
398
+ end
399
+
400
+ # return the object in the form of hash
401
+ def to_hash
402
+ hash = {}
403
+ self.class.attribute_map.each_pair do |attr, param|
404
+ value = self.send(attr)
405
+ next if value.nil?
406
+ hash[param] = _to_hash(value)
407
+ end
408
+ hash
409
+ end
410
+
411
+ # Method to output non-array value in the form of hash
412
+ # For object, use to_hash. Otherwise, just return the value
413
+ def _to_hash(value)
414
+ if value.is_a?(Array)
415
+ value.compact.map{ |v| _to_hash(v) }
416
+ elsif value.is_a?(Hash)
417
+ {}.tap do |hash|
418
+ value.each { |k, v| hash[k] = _to_hash(v) }
419
+ end
420
+ elsif value.respond_to? :to_hash
421
+ value.to_hash
422
+ else
423
+ value
424
+ end
425
+ end
426
+
427
+ end
428
+ end
@@ -0,0 +1,299 @@
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 CoachingAppointmentStatusDto
21
+ # The coaching appointment this status belongs to
22
+ attr_accessor :appointment
23
+
24
+ # User who updated the status
25
+ attr_accessor :created_by
26
+
27
+ # Creation time of the status. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
28
+ attr_accessor :date_created
29
+
30
+ # The status of the coaching appointment
31
+ attr_accessor :status
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+
37
+ :'appointment' => :'appointment',
38
+
39
+ :'created_by' => :'createdBy',
40
+
41
+ :'date_created' => :'dateCreated',
42
+
43
+ :'status' => :'status'
44
+
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+
52
+ :'appointment' => :'CoachingAppointmentReference',
53
+
54
+ :'created_by' => :'UserReference',
55
+
56
+ :'date_created' => :'DateTime',
57
+
58
+ :'status' => :'String'
59
+
60
+ }
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ return unless attributes.is_a?(Hash)
67
+
68
+ # convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
70
+
71
+
72
+ if attributes.has_key?(:'appointment')
73
+
74
+
75
+ self.appointment = attributes[:'appointment']
76
+
77
+
78
+ end
79
+
80
+
81
+ if attributes.has_key?(:'createdBy')
82
+
83
+
84
+ self.created_by = attributes[:'createdBy']
85
+
86
+
87
+ end
88
+
89
+
90
+ if attributes.has_key?(:'dateCreated')
91
+
92
+
93
+ self.date_created = attributes[:'dateCreated']
94
+
95
+
96
+ end
97
+
98
+
99
+ if attributes.has_key?(:'status')
100
+
101
+
102
+ self.status = attributes[:'status']
103
+
104
+
105
+ end
106
+
107
+
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properies with the reasons
112
+ def list_invalid_properties
113
+ invalid_properties = Array.new
114
+
115
+
116
+ return invalid_properties
117
+ end
118
+
119
+ # Check to see if the all the properties in the model are valid
120
+ # @return true if the model is valid
121
+ def valid?
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ if @status.nil?
137
+ return false
138
+ end
139
+
140
+
141
+
142
+ allowed_values = ["Scheduled", "InProgress", "Completed"]
143
+ if @status && !allowed_values.include?(@status)
144
+ return false
145
+ end
146
+
147
+
148
+
149
+ end
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+ # Custom attribute writer method checking allowed values (enum).
169
+ # @param [Object] status Object to be assigned
170
+ def status=(status)
171
+ allowed_values = ["Scheduled", "InProgress", "Completed"]
172
+ if status && !allowed_values.include?(status)
173
+ fail ArgumentError, "invalid value for 'status', must be one of #{allowed_values}."
174
+ end
175
+ @status = status
176
+ end
177
+
178
+
179
+
180
+
181
+ # Checks equality by comparing each attribute.
182
+ # @param [Object] Object to be compared
183
+ def ==(o)
184
+ return true if self.equal?(o)
185
+ self.class == o.class &&
186
+ appointment == o.appointment &&
187
+ created_by == o.created_by &&
188
+ date_created == o.date_created &&
189
+ status == o.status
190
+ end
191
+
192
+ # @see the `==` method
193
+ # @param [Object] Object to be compared
194
+ def eql?(o)
195
+ self == o
196
+ end
197
+
198
+ # Calculates hash code according to all attributes.
199
+ # @return [Fixnum] Hash code
200
+ def hash
201
+ [appointment, created_by, date_created, status].hash
202
+ end
203
+
204
+ # build the object from hash
205
+ def build_from_hash(attributes)
206
+ return nil unless attributes.is_a?(Hash)
207
+ self.class.swagger_types.each_pair do |key, type|
208
+ if type =~ /^Array<(.*)>/i
209
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
210
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
211
+ else
212
+ #TODO show warning in debug mode
213
+ end
214
+ elsif !attributes[self.class.attribute_map[key]].nil?
215
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
216
+ else
217
+ # data not found in attributes(hash), not an issue as the data can be optional
218
+ end
219
+ end
220
+
221
+ self
222
+ end
223
+
224
+ def _deserialize(type, value)
225
+ case type.to_sym
226
+ when :DateTime
227
+ DateTime.parse(value)
228
+ when :Date
229
+ Date.parse(value)
230
+ when :String
231
+ value.to_s
232
+ when :Integer
233
+ value.to_i
234
+ when :Float
235
+ value.to_f
236
+ when :BOOLEAN
237
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
238
+ true
239
+ else
240
+ false
241
+ end
242
+ when :Object
243
+ # generic object (usually a Hash), return directly
244
+ value
245
+ when /\AArray<(?<inner_type>.+)>\z/
246
+ inner_type = Regexp.last_match[:inner_type]
247
+ value.map { |v| _deserialize(inner_type, v) }
248
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
249
+ k_type = Regexp.last_match[:k_type]
250
+ v_type = Regexp.last_match[:v_type]
251
+ {}.tap do |hash|
252
+ value.each do |k, v|
253
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
254
+ end
255
+ end
256
+ else # model
257
+ _model = Object.const_get("PureCloud").const_get(type).new
258
+ _model.build_from_hash(value)
259
+ end
260
+ end
261
+
262
+ def to_s
263
+ to_hash.to_s
264
+ end
265
+
266
+ # to_body is an alias to to_body (backward compatibility))
267
+ def to_body
268
+ to_hash
269
+ end
270
+
271
+ # return the object in the form of hash
272
+ def to_hash
273
+ hash = {}
274
+ self.class.attribute_map.each_pair do |attr, param|
275
+ value = self.send(attr)
276
+ next if value.nil?
277
+ hash[param] = _to_hash(value)
278
+ end
279
+ hash
280
+ end
281
+
282
+ # Method to output non-array value in the form of hash
283
+ # For object, use to_hash. Otherwise, just return the value
284
+ def _to_hash(value)
285
+ if value.is_a?(Array)
286
+ value.compact.map{ |v| _to_hash(v) }
287
+ elsif value.is_a?(Hash)
288
+ {}.tap do |hash|
289
+ value.each { |k, v| hash[k] = _to_hash(v) }
290
+ end
291
+ elsif value.respond_to? :to_hash
292
+ value.to_hash
293
+ else
294
+ value
295
+ end
296
+ end
297
+
298
+ end
299
+ end