purecloudplatformclientv2 92.0.0 → 93.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/AnalyticsEvaluation.md +1 -1
- data/docs/AnalyticsSession.md +4 -0
- data/docs/ArchitectApi.md +51 -49
- data/docs/CoachingApi.md +8 -7
- data/docs/CommonCampaign.md +17 -0
- data/docs/CommonCampaignDivisionView.md +17 -0
- data/docs/CommonCampaignDivisionViewEntityListing.md +22 -0
- data/docs/CommonCampaignEntityListing.md +22 -0
- data/docs/ConversationAssociation.md +1 -1
- data/docs/ConversationEventTopicMessage.md +1 -0
- data/docs/ConversationsApi.md +4 -4
- data/docs/ExternalContactsApi.md +4 -4
- data/docs/HistoricalAdherenceActuals.md +15 -0
- data/docs/HistoricalAdherenceDayMetrics.md +23 -0
- data/docs/HistoricalAdherenceExceptionInfo.md +21 -0
- data/docs/HistoricalAdherenceQueryResult.md +21 -0
- data/docs/KnowledgeSearchRequest.md +3 -3
- data/docs/MessagingCampaign.md +28 -0
- data/docs/MessagingCampaignDivisionView.md +16 -0
- data/docs/MessagingCampaignDivisionViewEntityListing.md +22 -0
- data/docs/MessagingCampaignEntityListing.md +22 -0
- data/docs/ObservationValue.md +3 -1
- data/docs/OutboundApi.md +881 -76
- data/docs/QueueConversationEventTopicMessage.md +1 -0
- data/docs/QueueConversationSocialExpressionEventTopicMessage.md +1 -0
- data/docs/QueueConversationVideoEventTopicMessage.md +1 -0
- data/docs/ReportingExportJobRequest.md +2 -0
- data/docs/ReportingExportJobResponse.md +3 -0
- data/docs/SCIMApi.md +96 -108
- data/docs/ScimConfigResourceType.md +1 -1
- data/docs/ScimUserExtensions.md +2 -2
- data/docs/ScimUserRole.md +1 -1
- data/docs/ScimUserRoutingLanguage.md +2 -2
- data/docs/ScimUserRoutingSkill.md +2 -2
- data/docs/ScimV2CreateUser.md +3 -3
- data/docs/ScimV2Group.md +1 -1
- data/docs/ScimV2SchemaAttribute.md +11 -11
- data/docs/ScimV2SchemaDefinition.md +4 -4
- data/docs/ScimV2SchemaListResponse.md +1 -1
- data/docs/ScimV2User.md +4 -4
- data/docs/SmsConfig.md +15 -0
- data/docs/SmsPhoneNumberRef.md +14 -0
- data/docs/UserRoutingLanguage.md +3 -3
- data/docs/UserRoutingLanguagePost.md +1 -1
- data/docs/UserRoutingSkill.md +1 -1
- data/docs/VoicemailUserPolicy.md +1 -0
- data/docs/WfmBusinessUnitReference.md +14 -0
- data/docs/WfmHistoricalAdherenceResponse.md +1 -0
- data/docs/WfmHistoricalAdherenceResultWrapper.md +15 -0
- data/docs/WfmHistoricalDataUploadRequestStatusTopicDateTime.md +16 -0
- data/docs/WfmHistoricalDataUploadRequestStatusTopicHistoricalDataUploadRequestUpdate.md +20 -0
- data/docs/WfmScheduleReference.md +16 -0
- data/lib/purecloudplatformclientv2.rb +19 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +15 -6
- data/lib/purecloudplatformclientv2/api/coaching_api.rb +10 -9
- data/lib/purecloudplatformclientv2/api/conversations_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/external_contacts_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/outbound_api.rb +1215 -155
- data/lib/purecloudplatformclientv2/api/scim_api.rb +88 -88
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +13 -13
- data/lib/purecloudplatformclientv2/models/analytics_session.rb +124 -4
- data/lib/purecloudplatformclientv2/models/common_campaign.rb +320 -0
- data/lib/purecloudplatformclientv2/models/common_campaign_division_view.rb +320 -0
- data/lib/purecloudplatformclientv2/models/common_campaign_division_view_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/common_campaign_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_association.rb +1 -1
- data/lib/purecloudplatformclientv2/models/conversation_event_topic_message.rb +26 -1
- data/lib/purecloudplatformclientv2/models/dependency.rb +2 -2
- data/lib/purecloudplatformclientv2/models/dependency_object.rb +2 -2
- data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/historical_adherence_actuals.rb +268 -0
- data/lib/purecloudplatformclientv2/models/historical_adherence_day_metrics.rb +462 -0
- data/lib/purecloudplatformclientv2/models/historical_adherence_exception_info.rb +466 -0
- data/lib/purecloudplatformclientv2/models/historical_adherence_query_result.rb +430 -0
- data/lib/purecloudplatformclientv2/models/knowledge_search_request.rb +0 -15
- data/lib/purecloudplatformclientv2/models/messaging_campaign.rb +621 -0
- data/lib/purecloudplatformclientv2/models/messaging_campaign_division_view.rb +279 -0
- data/lib/purecloudplatformclientv2/models/messaging_campaign_division_view_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/messaging_campaign_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/observation_value.rb +70 -2
- data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_message.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_message.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_message.rb +26 -1
- data/lib/purecloudplatformclientv2/models/reporting_export_job_request.rb +53 -1
- data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +78 -1
- data/lib/purecloudplatformclientv2/models/scim_config_resource_type.rb +1 -1
- data/lib/purecloudplatformclientv2/models/scim_user_extensions.rb +3 -3
- data/lib/purecloudplatformclientv2/models/scim_user_role.rb +1 -1
- data/lib/purecloudplatformclientv2/models/scim_user_routing_language.rb +3 -3
- data/lib/purecloudplatformclientv2/models/scim_user_routing_skill.rb +3 -3
- data/lib/purecloudplatformclientv2/models/scim_v2_create_user.rb +3 -2
- data/lib/purecloudplatformclientv2/models/scim_v2_enterprise_user.rb +1 -1
- data/lib/purecloudplatformclientv2/models/scim_v2_group.rb +1 -1
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_attribute.rb +12 -12
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_definition.rb +5 -5
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_list_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/scim_v2_user.rb +4 -3
- data/lib/purecloudplatformclientv2/models/segment_detail_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/sms_config.rb +269 -0
- data/lib/purecloudplatformclientv2/models/sms_phone_number_ref.rb +232 -0
- data/lib/purecloudplatformclientv2/models/user_routing_language.rb +4 -4
- data/lib/purecloudplatformclientv2/models/user_routing_language_post.rb +1 -1
- data/lib/purecloudplatformclientv2/models/user_routing_skill.rb +1 -1
- data/lib/purecloudplatformclientv2/models/voicemail_user_policy.rb +30 -4
- data/lib/purecloudplatformclientv2/models/wem_coaching_appointment_topic_coaching_appointment_notification.rb +4 -4
- data/lib/purecloudplatformclientv2/models/wfm_business_unit_reference.rb +228 -0
- data/lib/purecloudplatformclientv2/models/wfm_historical_adherence_response.rb +27 -1
- data/lib/purecloudplatformclientv2/models/wfm_historical_adherence_result_wrapper.rb +258 -0
- data/lib/purecloudplatformclientv2/models/wfm_historical_data_upload_request_status_topic_date_time.rb +276 -0
- data/lib/purecloudplatformclientv2/models/wfm_historical_data_upload_request_status_topic_historical_data_upload_request_update.rb +390 -0
- data/lib/purecloudplatformclientv2/models/wfm_schedule_reference.rb +280 -0
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +41 -3
@@ -0,0 +1,621 @@
|
|
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 MessagingCampaign
|
21
|
+
# The globally unique identifier for the object.
|
22
|
+
attr_accessor :id
|
23
|
+
|
24
|
+
attr_accessor :name
|
25
|
+
|
26
|
+
# Creation time of the entity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
27
|
+
attr_accessor :date_created
|
28
|
+
|
29
|
+
# Last modified time of the entity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
30
|
+
attr_accessor :date_modified
|
31
|
+
|
32
|
+
# Required for updates, must match the version number of the most recent update
|
33
|
+
attr_accessor :version
|
34
|
+
|
35
|
+
# The division this entity belongs to.
|
36
|
+
attr_accessor :division
|
37
|
+
|
38
|
+
# The current status of the messaging campaign. A messaging campaign may be turned 'on' or 'off'.
|
39
|
+
attr_accessor :campaign_status
|
40
|
+
|
41
|
+
# The callable time set for this messaging campaign.
|
42
|
+
attr_accessor :callable_time_set
|
43
|
+
|
44
|
+
# The contact list that this messaging campaign will send messages for.
|
45
|
+
attr_accessor :contact_list
|
46
|
+
|
47
|
+
# The dnc lists to check before sending a message for this messaging campaign.
|
48
|
+
attr_accessor :dnc_lists
|
49
|
+
|
50
|
+
# Whether this messaging campaign is always running
|
51
|
+
attr_accessor :always_running
|
52
|
+
|
53
|
+
# The order in which to sort contacts for dialing, based on up to four columns.
|
54
|
+
attr_accessor :contact_sorts
|
55
|
+
|
56
|
+
# How many messages this messaging campaign will send per minute.
|
57
|
+
attr_accessor :messages_per_minute
|
58
|
+
|
59
|
+
# A list of current error conditions associated with this messaging campaign.
|
60
|
+
attr_accessor :errors
|
61
|
+
|
62
|
+
# Configuration for this messaging campaign to send SMS messages.
|
63
|
+
attr_accessor :sms_config
|
64
|
+
|
65
|
+
# The URI for this object
|
66
|
+
attr_accessor :self_uri
|
67
|
+
|
68
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
69
|
+
def self.attribute_map
|
70
|
+
{
|
71
|
+
|
72
|
+
:'id' => :'id',
|
73
|
+
|
74
|
+
:'name' => :'name',
|
75
|
+
|
76
|
+
:'date_created' => :'dateCreated',
|
77
|
+
|
78
|
+
:'date_modified' => :'dateModified',
|
79
|
+
|
80
|
+
:'version' => :'version',
|
81
|
+
|
82
|
+
:'division' => :'division',
|
83
|
+
|
84
|
+
:'campaign_status' => :'campaignStatus',
|
85
|
+
|
86
|
+
:'callable_time_set' => :'callableTimeSet',
|
87
|
+
|
88
|
+
:'contact_list' => :'contactList',
|
89
|
+
|
90
|
+
:'dnc_lists' => :'dncLists',
|
91
|
+
|
92
|
+
:'always_running' => :'alwaysRunning',
|
93
|
+
|
94
|
+
:'contact_sorts' => :'contactSorts',
|
95
|
+
|
96
|
+
:'messages_per_minute' => :'messagesPerMinute',
|
97
|
+
|
98
|
+
:'errors' => :'errors',
|
99
|
+
|
100
|
+
:'sms_config' => :'smsConfig',
|
101
|
+
|
102
|
+
:'self_uri' => :'selfUri'
|
103
|
+
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
# Attribute type mapping.
|
108
|
+
def self.swagger_types
|
109
|
+
{
|
110
|
+
|
111
|
+
:'id' => :'String',
|
112
|
+
|
113
|
+
:'name' => :'String',
|
114
|
+
|
115
|
+
:'date_created' => :'DateTime',
|
116
|
+
|
117
|
+
:'date_modified' => :'DateTime',
|
118
|
+
|
119
|
+
:'version' => :'Integer',
|
120
|
+
|
121
|
+
:'division' => :'DomainEntityRef',
|
122
|
+
|
123
|
+
:'campaign_status' => :'String',
|
124
|
+
|
125
|
+
:'callable_time_set' => :'DomainEntityRef',
|
126
|
+
|
127
|
+
:'contact_list' => :'DomainEntityRef',
|
128
|
+
|
129
|
+
:'dnc_lists' => :'Array<DomainEntityRef>',
|
130
|
+
|
131
|
+
:'always_running' => :'BOOLEAN',
|
132
|
+
|
133
|
+
:'contact_sorts' => :'Array<ContactSort>',
|
134
|
+
|
135
|
+
:'messages_per_minute' => :'Integer',
|
136
|
+
|
137
|
+
:'errors' => :'Array<RestErrorDetail>',
|
138
|
+
|
139
|
+
:'sms_config' => :'SmsConfig',
|
140
|
+
|
141
|
+
:'self_uri' => :'String'
|
142
|
+
|
143
|
+
}
|
144
|
+
end
|
145
|
+
|
146
|
+
# Initializes the object
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
148
|
+
def initialize(attributes = {})
|
149
|
+
return unless attributes.is_a?(Hash)
|
150
|
+
|
151
|
+
# convert string to symbol for hash key
|
152
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
153
|
+
|
154
|
+
|
155
|
+
if attributes.has_key?(:'id')
|
156
|
+
|
157
|
+
|
158
|
+
self.id = attributes[:'id']
|
159
|
+
|
160
|
+
|
161
|
+
end
|
162
|
+
|
163
|
+
|
164
|
+
if attributes.has_key?(:'name')
|
165
|
+
|
166
|
+
|
167
|
+
self.name = attributes[:'name']
|
168
|
+
|
169
|
+
|
170
|
+
end
|
171
|
+
|
172
|
+
|
173
|
+
if attributes.has_key?(:'dateCreated')
|
174
|
+
|
175
|
+
|
176
|
+
self.date_created = attributes[:'dateCreated']
|
177
|
+
|
178
|
+
|
179
|
+
end
|
180
|
+
|
181
|
+
|
182
|
+
if attributes.has_key?(:'dateModified')
|
183
|
+
|
184
|
+
|
185
|
+
self.date_modified = attributes[:'dateModified']
|
186
|
+
|
187
|
+
|
188
|
+
end
|
189
|
+
|
190
|
+
|
191
|
+
if attributes.has_key?(:'version')
|
192
|
+
|
193
|
+
|
194
|
+
self.version = attributes[:'version']
|
195
|
+
|
196
|
+
|
197
|
+
end
|
198
|
+
|
199
|
+
|
200
|
+
if attributes.has_key?(:'division')
|
201
|
+
|
202
|
+
|
203
|
+
self.division = attributes[:'division']
|
204
|
+
|
205
|
+
|
206
|
+
end
|
207
|
+
|
208
|
+
|
209
|
+
if attributes.has_key?(:'campaignStatus')
|
210
|
+
|
211
|
+
|
212
|
+
self.campaign_status = attributes[:'campaignStatus']
|
213
|
+
|
214
|
+
|
215
|
+
end
|
216
|
+
|
217
|
+
|
218
|
+
if attributes.has_key?(:'callableTimeSet')
|
219
|
+
|
220
|
+
|
221
|
+
self.callable_time_set = attributes[:'callableTimeSet']
|
222
|
+
|
223
|
+
|
224
|
+
end
|
225
|
+
|
226
|
+
|
227
|
+
if attributes.has_key?(:'contactList')
|
228
|
+
|
229
|
+
|
230
|
+
self.contact_list = attributes[:'contactList']
|
231
|
+
|
232
|
+
|
233
|
+
end
|
234
|
+
|
235
|
+
|
236
|
+
if attributes.has_key?(:'dncLists')
|
237
|
+
|
238
|
+
if (value = attributes[:'dncLists']).is_a?(Array)
|
239
|
+
self.dnc_lists = value
|
240
|
+
end
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
end
|
245
|
+
|
246
|
+
|
247
|
+
if attributes.has_key?(:'alwaysRunning')
|
248
|
+
|
249
|
+
|
250
|
+
self.always_running = attributes[:'alwaysRunning']
|
251
|
+
|
252
|
+
|
253
|
+
end
|
254
|
+
|
255
|
+
|
256
|
+
if attributes.has_key?(:'contactSorts')
|
257
|
+
|
258
|
+
if (value = attributes[:'contactSorts']).is_a?(Array)
|
259
|
+
self.contact_sorts = value
|
260
|
+
end
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
end
|
265
|
+
|
266
|
+
|
267
|
+
if attributes.has_key?(:'messagesPerMinute')
|
268
|
+
|
269
|
+
|
270
|
+
self.messages_per_minute = attributes[:'messagesPerMinute']
|
271
|
+
|
272
|
+
|
273
|
+
end
|
274
|
+
|
275
|
+
|
276
|
+
if attributes.has_key?(:'errors')
|
277
|
+
|
278
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
279
|
+
self.errors = value
|
280
|
+
end
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
end
|
285
|
+
|
286
|
+
|
287
|
+
if attributes.has_key?(:'smsConfig')
|
288
|
+
|
289
|
+
|
290
|
+
self.sms_config = attributes[:'smsConfig']
|
291
|
+
|
292
|
+
|
293
|
+
end
|
294
|
+
|
295
|
+
|
296
|
+
if attributes.has_key?(:'selfUri')
|
297
|
+
|
298
|
+
|
299
|
+
self.self_uri = attributes[:'selfUri']
|
300
|
+
|
301
|
+
|
302
|
+
end
|
303
|
+
|
304
|
+
|
305
|
+
end
|
306
|
+
|
307
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
308
|
+
# @return Array for valid properies with the reasons
|
309
|
+
def list_invalid_properties
|
310
|
+
invalid_properties = Array.new
|
311
|
+
|
312
|
+
|
313
|
+
return invalid_properties
|
314
|
+
end
|
315
|
+
|
316
|
+
# Check to see if the all the properties in the model are valid
|
317
|
+
# @return true if the model is valid
|
318
|
+
def valid?
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
allowed_values = ["on", "stopping", "off", "complete", "invalid"]
|
347
|
+
if @campaign_status && !allowed_values.include?(@campaign_status)
|
348
|
+
return false
|
349
|
+
end
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
if @contact_list.nil?
|
359
|
+
return false
|
360
|
+
end
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
if @messages_per_minute.nil?
|
380
|
+
return false
|
381
|
+
end
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
end
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
# Custom attribute writer method checking allowed values (enum).
|
434
|
+
# @param [Object] campaign_status Object to be assigned
|
435
|
+
def campaign_status=(campaign_status)
|
436
|
+
allowed_values = ["on", "stopping", "off", "complete", "invalid"]
|
437
|
+
if campaign_status && !allowed_values.include?(campaign_status)
|
438
|
+
fail ArgumentError, "invalid value for 'campaign_status', must be one of #{allowed_values}."
|
439
|
+
end
|
440
|
+
@campaign_status = campaign_status
|
441
|
+
end
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
# Checks equality by comparing each attribute.
|
492
|
+
# @param [Object] Object to be compared
|
493
|
+
def ==(o)
|
494
|
+
return true if self.equal?(o)
|
495
|
+
self.class == o.class &&
|
496
|
+
id == o.id &&
|
497
|
+
name == o.name &&
|
498
|
+
date_created == o.date_created &&
|
499
|
+
date_modified == o.date_modified &&
|
500
|
+
version == o.version &&
|
501
|
+
division == o.division &&
|
502
|
+
campaign_status == o.campaign_status &&
|
503
|
+
callable_time_set == o.callable_time_set &&
|
504
|
+
contact_list == o.contact_list &&
|
505
|
+
dnc_lists == o.dnc_lists &&
|
506
|
+
always_running == o.always_running &&
|
507
|
+
contact_sorts == o.contact_sorts &&
|
508
|
+
messages_per_minute == o.messages_per_minute &&
|
509
|
+
errors == o.errors &&
|
510
|
+
sms_config == o.sms_config &&
|
511
|
+
self_uri == o.self_uri
|
512
|
+
end
|
513
|
+
|
514
|
+
# @see the `==` method
|
515
|
+
# @param [Object] Object to be compared
|
516
|
+
def eql?(o)
|
517
|
+
self == o
|
518
|
+
end
|
519
|
+
|
520
|
+
# Calculates hash code according to all attributes.
|
521
|
+
# @return [Fixnum] Hash code
|
522
|
+
def hash
|
523
|
+
[id, name, date_created, date_modified, version, division, campaign_status, callable_time_set, contact_list, dnc_lists, always_running, contact_sorts, messages_per_minute, errors, sms_config, self_uri].hash
|
524
|
+
end
|
525
|
+
|
526
|
+
# build the object from hash
|
527
|
+
def build_from_hash(attributes)
|
528
|
+
return nil unless attributes.is_a?(Hash)
|
529
|
+
self.class.swagger_types.each_pair do |key, type|
|
530
|
+
if type =~ /^Array<(.*)>/i
|
531
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
532
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
533
|
+
else
|
534
|
+
#TODO show warning in debug mode
|
535
|
+
end
|
536
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
537
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
538
|
+
else
|
539
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
540
|
+
end
|
541
|
+
end
|
542
|
+
|
543
|
+
self
|
544
|
+
end
|
545
|
+
|
546
|
+
def _deserialize(type, value)
|
547
|
+
case type.to_sym
|
548
|
+
when :DateTime
|
549
|
+
DateTime.parse(value)
|
550
|
+
when :Date
|
551
|
+
Date.parse(value)
|
552
|
+
when :String
|
553
|
+
value.to_s
|
554
|
+
when :Integer
|
555
|
+
value.to_i
|
556
|
+
when :Float
|
557
|
+
value.to_f
|
558
|
+
when :BOOLEAN
|
559
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
560
|
+
true
|
561
|
+
else
|
562
|
+
false
|
563
|
+
end
|
564
|
+
when :Object
|
565
|
+
# generic object (usually a Hash), return directly
|
566
|
+
value
|
567
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
568
|
+
inner_type = Regexp.last_match[:inner_type]
|
569
|
+
value.map { |v| _deserialize(inner_type, v) }
|
570
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
571
|
+
k_type = Regexp.last_match[:k_type]
|
572
|
+
v_type = Regexp.last_match[:v_type]
|
573
|
+
{}.tap do |hash|
|
574
|
+
value.each do |k, v|
|
575
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
576
|
+
end
|
577
|
+
end
|
578
|
+
else # model
|
579
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
580
|
+
_model.build_from_hash(value)
|
581
|
+
end
|
582
|
+
end
|
583
|
+
|
584
|
+
def to_s
|
585
|
+
to_hash.to_s
|
586
|
+
end
|
587
|
+
|
588
|
+
# to_body is an alias to to_body (backward compatibility))
|
589
|
+
def to_body
|
590
|
+
to_hash
|
591
|
+
end
|
592
|
+
|
593
|
+
# return the object in the form of hash
|
594
|
+
def to_hash
|
595
|
+
hash = {}
|
596
|
+
self.class.attribute_map.each_pair do |attr, param|
|
597
|
+
value = self.send(attr)
|
598
|
+
next if value.nil?
|
599
|
+
hash[param] = _to_hash(value)
|
600
|
+
end
|
601
|
+
hash
|
602
|
+
end
|
603
|
+
|
604
|
+
# Method to output non-array value in the form of hash
|
605
|
+
# For object, use to_hash. Otherwise, just return the value
|
606
|
+
def _to_hash(value)
|
607
|
+
if value.is_a?(Array)
|
608
|
+
value.compact.map{ |v| _to_hash(v) }
|
609
|
+
elsif value.is_a?(Hash)
|
610
|
+
{}.tap do |hash|
|
611
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
612
|
+
end
|
613
|
+
elsif value.respond_to? :to_hash
|
614
|
+
value.to_hash
|
615
|
+
else
|
616
|
+
value
|
617
|
+
end
|
618
|
+
end
|
619
|
+
|
620
|
+
end
|
621
|
+
end
|