purecloudplatformclientv2 92.0.0 → 93.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.
- 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
|
@@ -170,6 +170,18 @@ module PureCloud
|
|
|
170
170
|
# Type of flow out that occurred, e.g. voicemail, callback, or acd
|
|
171
171
|
attr_accessor :flow_out_type
|
|
172
172
|
|
|
173
|
+
# All routing types for requested/attempted routing methods.
|
|
174
|
+
attr_accessor :requested_routings
|
|
175
|
+
|
|
176
|
+
# Complete routing method
|
|
177
|
+
attr_accessor :used_routing
|
|
178
|
+
|
|
179
|
+
# Selected agent id
|
|
180
|
+
attr_accessor :selected_agent_id
|
|
181
|
+
|
|
182
|
+
# Selected agent GPR rank
|
|
183
|
+
attr_accessor :selected_agent_rank
|
|
184
|
+
|
|
173
185
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
174
186
|
def self.attribute_map
|
|
175
187
|
{
|
|
@@ -278,7 +290,15 @@ module PureCloud
|
|
|
278
290
|
|
|
279
291
|
:'media_count' => :'mediaCount',
|
|
280
292
|
|
|
281
|
-
:'flow_out_type' => :'flowOutType'
|
|
293
|
+
:'flow_out_type' => :'flowOutType',
|
|
294
|
+
|
|
295
|
+
:'requested_routings' => :'requestedRoutings',
|
|
296
|
+
|
|
297
|
+
:'used_routing' => :'usedRouting',
|
|
298
|
+
|
|
299
|
+
:'selected_agent_id' => :'selectedAgentId',
|
|
300
|
+
|
|
301
|
+
:'selected_agent_rank' => :'selectedAgentRank'
|
|
282
302
|
|
|
283
303
|
}
|
|
284
304
|
end
|
|
@@ -391,7 +411,15 @@ module PureCloud
|
|
|
391
411
|
|
|
392
412
|
:'media_count' => :'Integer',
|
|
393
413
|
|
|
394
|
-
:'flow_out_type' => :'String'
|
|
414
|
+
:'flow_out_type' => :'String',
|
|
415
|
+
|
|
416
|
+
:'requested_routings' => :'Array<String>',
|
|
417
|
+
|
|
418
|
+
:'used_routing' => :'String',
|
|
419
|
+
|
|
420
|
+
:'selected_agent_id' => :'String',
|
|
421
|
+
|
|
422
|
+
:'selected_agent_rank' => :'Integer'
|
|
395
423
|
|
|
396
424
|
}
|
|
397
425
|
end
|
|
@@ -890,6 +918,44 @@ module PureCloud
|
|
|
890
918
|
end
|
|
891
919
|
|
|
892
920
|
|
|
921
|
+
if attributes.has_key?(:'requestedRoutings')
|
|
922
|
+
|
|
923
|
+
if (value = attributes[:'requestedRoutings']).is_a?(Array)
|
|
924
|
+
self.requested_routings = value
|
|
925
|
+
end
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
end
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
if attributes.has_key?(:'usedRouting')
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
self.used_routing = attributes[:'usedRouting']
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
end
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
if attributes.has_key?(:'selectedAgentId')
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
self.selected_agent_id = attributes[:'selectedAgentId']
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
end
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
if attributes.has_key?(:'selectedAgentRank')
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
self.selected_agent_rank = attributes[:'selectedAgentRank']
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
end
|
|
957
|
+
|
|
958
|
+
|
|
893
959
|
end
|
|
894
960
|
|
|
895
961
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -1121,6 +1187,27 @@ module PureCloud
|
|
|
1121
1187
|
|
|
1122
1188
|
|
|
1123
1189
|
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
allowed_values = ["Predictive", "Preferred", "Manual", "Last", "Bullseye", "Standard"]
|
|
1208
|
+
if @used_routing && !allowed_values.include?(@used_routing)
|
|
1209
|
+
return false
|
|
1210
|
+
end
|
|
1124
1211
|
|
|
1125
1212
|
|
|
1126
1213
|
|
|
@@ -1414,6 +1501,35 @@ module PureCloud
|
|
|
1414
1501
|
|
|
1415
1502
|
|
|
1416
1503
|
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
1524
|
+
# @param [Object] used_routing Object to be assigned
|
|
1525
|
+
def used_routing=(used_routing)
|
|
1526
|
+
allowed_values = ["Predictive", "Preferred", "Manual", "Last", "Bullseye", "Standard"]
|
|
1527
|
+
if used_routing && !allowed_values.include?(used_routing)
|
|
1528
|
+
fail ArgumentError, "invalid value for 'used_routing', must be one of #{allowed_values}."
|
|
1529
|
+
end
|
|
1530
|
+
@used_routing = used_routing
|
|
1531
|
+
end
|
|
1532
|
+
|
|
1417
1533
|
|
|
1418
1534
|
|
|
1419
1535
|
|
|
@@ -1484,7 +1600,11 @@ module PureCloud
|
|
|
1484
1600
|
provider == o.provider &&
|
|
1485
1601
|
remote == o.remote &&
|
|
1486
1602
|
media_count == o.media_count &&
|
|
1487
|
-
flow_out_type == o.flow_out_type
|
|
1603
|
+
flow_out_type == o.flow_out_type &&
|
|
1604
|
+
requested_routings == o.requested_routings &&
|
|
1605
|
+
used_routing == o.used_routing &&
|
|
1606
|
+
selected_agent_id == o.selected_agent_id &&
|
|
1607
|
+
selected_agent_rank == o.selected_agent_rank
|
|
1488
1608
|
end
|
|
1489
1609
|
|
|
1490
1610
|
# @see the `==` method
|
|
@@ -1496,7 +1616,7 @@ module PureCloud
|
|
|
1496
1616
|
# Calculates hash code according to all attributes.
|
|
1497
1617
|
# @return [Fixnum] Hash code
|
|
1498
1618
|
def hash
|
|
1499
|
-
[media_type, session_id, address_other, address_self, address_from, address_to, message_type, ani, direction, dnis, session_dnis, outbound_campaign_id, outbound_contact_id, outbound_contact_list_id, disposition_analyzer, disposition_name, edge_id, remote_name_displayable, room_id, monitored_session_id, monitored_participant_id, callback_user_name, callback_numbers, callback_scheduled_time, script_id, peer_id, skip_enabled, timeout_seconds, cobrowse_role, cobrowse_room_id, media_bridge_id, screen_share_address_self, sharing_screen, screen_share_room_id, video_room_id, video_address_self, segments, metrics, flow, media_endpoint_stats, recording, journey_customer_id, journey_customer_id_type, journey_customer_session_id, journey_customer_session_id_type, journey_action_id, journey_action_map_id, journey_action_map_version, protocol_call_id, provider, remote, media_count, flow_out_type].hash
|
|
1619
|
+
[media_type, session_id, address_other, address_self, address_from, address_to, message_type, ani, direction, dnis, session_dnis, outbound_campaign_id, outbound_contact_id, outbound_contact_list_id, disposition_analyzer, disposition_name, edge_id, remote_name_displayable, room_id, monitored_session_id, monitored_participant_id, callback_user_name, callback_numbers, callback_scheduled_time, script_id, peer_id, skip_enabled, timeout_seconds, cobrowse_role, cobrowse_room_id, media_bridge_id, screen_share_address_self, sharing_screen, screen_share_room_id, video_room_id, video_address_self, segments, metrics, flow, media_endpoint_stats, recording, journey_customer_id, journey_customer_id_type, journey_customer_session_id, journey_customer_session_id_type, journey_action_id, journey_action_map_id, journey_action_map_version, protocol_call_id, provider, remote, media_count, flow_out_type, requested_routings, used_routing, selected_agent_id, selected_agent_rank].hash
|
|
1500
1620
|
end
|
|
1501
1621
|
|
|
1502
1622
|
# build the object from hash
|
|
@@ -0,0 +1,320 @@
|
|
|
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 CommonCampaign
|
|
21
|
+
# The globally unique identifier for the object.
|
|
22
|
+
attr_accessor :id
|
|
23
|
+
|
|
24
|
+
# The name of the Campaign.
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# The division to which this entity belongs.
|
|
28
|
+
attr_accessor :division
|
|
29
|
+
|
|
30
|
+
# The media type used for this campaign.
|
|
31
|
+
attr_accessor :media_type
|
|
32
|
+
|
|
33
|
+
# The URI for this object
|
|
34
|
+
attr_accessor :self_uri
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
|
|
40
|
+
:'id' => :'id',
|
|
41
|
+
|
|
42
|
+
:'name' => :'name',
|
|
43
|
+
|
|
44
|
+
:'division' => :'division',
|
|
45
|
+
|
|
46
|
+
:'media_type' => :'mediaType',
|
|
47
|
+
|
|
48
|
+
:'self_uri' => :'selfUri'
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute type mapping.
|
|
54
|
+
def self.swagger_types
|
|
55
|
+
{
|
|
56
|
+
|
|
57
|
+
:'id' => :'String',
|
|
58
|
+
|
|
59
|
+
:'name' => :'String',
|
|
60
|
+
|
|
61
|
+
:'division' => :'Division',
|
|
62
|
+
|
|
63
|
+
:'media_type' => :'String',
|
|
64
|
+
|
|
65
|
+
:'self_uri' => :'String'
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
return unless attributes.is_a?(Hash)
|
|
74
|
+
|
|
75
|
+
# convert string to symbol for hash key
|
|
76
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
if attributes.has_key?(:'id')
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
self.id = attributes[:'id']
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
if attributes.has_key?(:'name')
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
self.name = attributes[:'name']
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
if attributes.has_key?(:'division')
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
self.division = attributes[:'division']
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
if attributes.has_key?(:'mediaType')
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
self.media_type = attributes[:'mediaType']
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
if attributes.has_key?(:'selfUri')
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
self.self_uri = attributes[:'selfUri']
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
127
|
+
# @return Array for valid properies with the reasons
|
|
128
|
+
def list_invalid_properties
|
|
129
|
+
invalid_properties = Array.new
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
return invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
allowed_values = ["sms", "voice"]
|
|
154
|
+
if @media_type && !allowed_values.include?(@media_type)
|
|
155
|
+
return false
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
184
|
+
# @param [Object] media_type Object to be assigned
|
|
185
|
+
def media_type=(media_type)
|
|
186
|
+
allowed_values = ["sms", "voice"]
|
|
187
|
+
if media_type && !allowed_values.include?(media_type)
|
|
188
|
+
fail ArgumentError, "invalid value for 'media_type', must be one of #{allowed_values}."
|
|
189
|
+
end
|
|
190
|
+
@media_type = media_type
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
# Checks equality by comparing each attribute.
|
|
202
|
+
# @param [Object] Object to be compared
|
|
203
|
+
def ==(o)
|
|
204
|
+
return true if self.equal?(o)
|
|
205
|
+
self.class == o.class &&
|
|
206
|
+
id == o.id &&
|
|
207
|
+
name == o.name &&
|
|
208
|
+
division == o.division &&
|
|
209
|
+
media_type == o.media_type &&
|
|
210
|
+
self_uri == o.self_uri
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# @see the `==` method
|
|
214
|
+
# @param [Object] Object to be compared
|
|
215
|
+
def eql?(o)
|
|
216
|
+
self == o
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Calculates hash code according to all attributes.
|
|
220
|
+
# @return [Fixnum] Hash code
|
|
221
|
+
def hash
|
|
222
|
+
[id, name, division, media_type, self_uri].hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# build the object from hash
|
|
226
|
+
def build_from_hash(attributes)
|
|
227
|
+
return nil unless attributes.is_a?(Hash)
|
|
228
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
229
|
+
if type =~ /^Array<(.*)>/i
|
|
230
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
231
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
232
|
+
else
|
|
233
|
+
#TODO show warning in debug mode
|
|
234
|
+
end
|
|
235
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
236
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
237
|
+
else
|
|
238
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
self
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
def _deserialize(type, value)
|
|
246
|
+
case type.to_sym
|
|
247
|
+
when :DateTime
|
|
248
|
+
DateTime.parse(value)
|
|
249
|
+
when :Date
|
|
250
|
+
Date.parse(value)
|
|
251
|
+
when :String
|
|
252
|
+
value.to_s
|
|
253
|
+
when :Integer
|
|
254
|
+
value.to_i
|
|
255
|
+
when :Float
|
|
256
|
+
value.to_f
|
|
257
|
+
when :BOOLEAN
|
|
258
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
259
|
+
true
|
|
260
|
+
else
|
|
261
|
+
false
|
|
262
|
+
end
|
|
263
|
+
when :Object
|
|
264
|
+
# generic object (usually a Hash), return directly
|
|
265
|
+
value
|
|
266
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
267
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
268
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
269
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
270
|
+
k_type = Regexp.last_match[:k_type]
|
|
271
|
+
v_type = Regexp.last_match[:v_type]
|
|
272
|
+
{}.tap do |hash|
|
|
273
|
+
value.each do |k, v|
|
|
274
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
275
|
+
end
|
|
276
|
+
end
|
|
277
|
+
else # model
|
|
278
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
279
|
+
_model.build_from_hash(value)
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
def to_s
|
|
284
|
+
to_hash.to_s
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
288
|
+
def to_body
|
|
289
|
+
to_hash
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# return the object in the form of hash
|
|
293
|
+
def to_hash
|
|
294
|
+
hash = {}
|
|
295
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
296
|
+
value = self.send(attr)
|
|
297
|
+
next if value.nil?
|
|
298
|
+
hash[param] = _to_hash(value)
|
|
299
|
+
end
|
|
300
|
+
hash
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Method to output non-array value in the form of hash
|
|
304
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
305
|
+
def _to_hash(value)
|
|
306
|
+
if value.is_a?(Array)
|
|
307
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
308
|
+
elsif value.is_a?(Hash)
|
|
309
|
+
{}.tap do |hash|
|
|
310
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
311
|
+
end
|
|
312
|
+
elsif value.respond_to? :to_hash
|
|
313
|
+
value.to_hash
|
|
314
|
+
else
|
|
315
|
+
value
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
end
|
|
320
|
+
end
|