purecloudplatformclientv2 47.0.0 → 48.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 +3 -3
- data/docs/AnalyticsApi.md +66 -0
- data/docs/AnalyticsSession.md +1 -1
- data/docs/AuthorizationApi.md +9 -5
- data/docs/Condition.md +4 -4
- data/docs/ContactColumnToDataActionFieldMapping.md +12 -0
- data/docs/ConversationProperties.md +21 -0
- data/docs/DataActionConditionPredicate.md +12 -0
- data/docs/GroupsApi.md +1 -1
- data/docs/OrgUser.md +1 -0
- data/docs/OutboundApi.md +2 -2
- data/docs/QualityApi.md +376 -0
- data/docs/RoutingApi.md +85 -12
- data/docs/ScorableSurvey.md +18 -0
- data/docs/SearchApi.md +2 -42
- data/docs/SuggestApi.md +2 -2
- data/docs/Survey.md +22 -0
- data/docs/SurveyFormAndScoringSet.md +14 -0
- data/docs/SurveyQuestionGroupScore.md +17 -0
- data/docs/SurveyQuestionScore.md +19 -0
- data/docs/SurveyScoringSet.md +15 -0
- data/docs/Token.md +13 -0
- data/docs/TrustUser.md +1 -0
- data/docs/User.md +1 -0
- data/docs/UserMe.md +1 -0
- data/docs/UsersApi.md +8 -8
- data/docs/UtilitiesApi.md +59 -0
- data/docs/ViewFilter.md +13 -0
- data/lib/purecloudplatformclientv2.rb +10 -0
- data/lib/purecloudplatformclientv2/api/alerting_api.rb +11 -11
- data/lib/purecloudplatformclientv2/api/analytics_api.rb +91 -26
- data/lib/purecloudplatformclientv2/api/architect_api.rb +81 -81
- data/lib/purecloudplatformclientv2/api/attributes_api.rb +6 -6
- data/lib/purecloudplatformclientv2/api/authorization_api.rb +45 -36
- data/lib/purecloudplatformclientv2/api/billing_api.rb +2 -2
- data/lib/purecloudplatformclientv2/api/content_management_api.rb +38 -38
- data/lib/purecloudplatformclientv2/api/conversations_api.rb +100 -100
- data/lib/purecloudplatformclientv2/api/external_contacts_api.rb +30 -30
- data/lib/purecloudplatformclientv2/api/fax_api.rb +6 -6
- data/lib/purecloudplatformclientv2/api/flows_api.rb +1 -1
- data/lib/purecloudplatformclientv2/api/general_data_protection_regulation_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/geolocation_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/greetings_api.rb +16 -16
- data/lib/purecloudplatformclientv2/api/groups_api.rb +14 -14
- data/lib/purecloudplatformclientv2/api/identity_provider_api.rb +28 -28
- data/lib/purecloudplatformclientv2/api/integrations_api.rb +41 -41
- data/lib/purecloudplatformclientv2/api/languages_api.rb +10 -10
- data/lib/purecloudplatformclientv2/api/license_api.rb +8 -8
- data/lib/purecloudplatformclientv2/api/locations_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/messaging_api.rb +14 -14
- data/lib/purecloudplatformclientv2/api/mobile_devices_api.rb +5 -5
- data/lib/purecloudplatformclientv2/api/notifications_api.rb +7 -7
- data/lib/purecloudplatformclientv2/api/o_auth_api.rb +6 -6
- data/lib/purecloudplatformclientv2/api/objects_api.rb +8 -8
- data/lib/purecloudplatformclientv2/api/organization_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/organization_authorization_api.rb +23 -23
- data/lib/purecloudplatformclientv2/api/outbound_api.rb +98 -98
- data/lib/purecloudplatformclientv2/api/presence_api.rb +9 -9
- data/lib/purecloudplatformclientv2/api/quality_api.rb +450 -52
- data/lib/purecloudplatformclientv2/api/recording_api.rb +37 -37
- data/lib/purecloudplatformclientv2/api/response_management_api.rb +11 -11
- data/lib/purecloudplatformclientv2/api/routing_api.rb +173 -70
- data/lib/purecloudplatformclientv2/api/scripts_api.rb +11 -11
- data/lib/purecloudplatformclientv2/api/search_api.rb +16 -16
- data/lib/purecloudplatformclientv2/api/stations_api.rb +5 -5
- data/lib/purecloudplatformclientv2/api/suggest_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/telephony_providers_edge_api.rb +125 -125
- data/lib/purecloudplatformclientv2/api/tokens_api.rb +2 -2
- data/lib/purecloudplatformclientv2/api/user_recordings_api.rb +6 -6
- data/lib/purecloudplatformclientv2/api/users_api.rb +61 -61
- data/lib/purecloudplatformclientv2/api/utilities_api.rb +58 -3
- data/lib/purecloudplatformclientv2/api/voicemail_api.rb +24 -24
- data/lib/purecloudplatformclientv2/api/web_chat_api.rb +8 -8
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +64 -64
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/configuration.rb +9 -2
- data/lib/purecloudplatformclientv2/models/aggregate_metric_data.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_session.rb +1 -1
- data/lib/purecloudplatformclientv2/models/condition.rb +6 -6
- data/lib/purecloudplatformclientv2/models/contact_column_to_data_action_field_mapping.rb +176 -0
- data/lib/purecloudplatformclientv2/models/conversation_properties.rb +410 -0
- data/lib/purecloudplatformclientv2/models/data_action_condition_predicate.rb +176 -0
- data/lib/purecloudplatformclientv2/models/observation_metric_data.rb +2 -2
- data/lib/purecloudplatformclientv2/models/org_user.rb +27 -1
- data/lib/purecloudplatformclientv2/models/scorable_survey.rb +343 -0
- data/lib/purecloudplatformclientv2/models/survey.rb +444 -0
- data/lib/purecloudplatformclientv2/models/survey_form_and_scoring_set.rb +226 -0
- data/lib/purecloudplatformclientv2/models/survey_question_group_score.rb +303 -0
- data/lib/purecloudplatformclientv2/models/survey_question_score.rb +351 -0
- data/lib/purecloudplatformclientv2/models/survey_scoring_set.rb +253 -0
- data/lib/purecloudplatformclientv2/models/token.rb +207 -0
- data/lib/purecloudplatformclientv2/models/trust_user.rb +27 -1
- data/lib/purecloudplatformclientv2/models/user.rb +27 -1
- data/lib/purecloudplatformclientv2/models/user_me.rb +27 -1
- data/lib/purecloudplatformclientv2/models/view_filter.rb +354 -4
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +22 -2
@@ -0,0 +1,176 @@
|
|
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 DataActionConditionPredicate
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Initializes the object
|
36
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
|
+
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
47
|
+
# @return Array for valid properies with the reasons
|
48
|
+
def list_invalid_properties
|
49
|
+
invalid_properties = Array.new
|
50
|
+
|
51
|
+
|
52
|
+
return invalid_properties
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check to see if the all the properties in the model are valid
|
56
|
+
# @return true if the model is valid
|
57
|
+
def valid?
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
# Checks equality by comparing each attribute.
|
63
|
+
# @param [Object] Object to be compared
|
64
|
+
def ==(o)
|
65
|
+
return true if self.equal?(o)
|
66
|
+
self.class == o.class
|
67
|
+
end
|
68
|
+
|
69
|
+
# @see the `==` method
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def eql?(o)
|
72
|
+
self == o
|
73
|
+
end
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Fixnum] Hash code
|
77
|
+
def hash
|
78
|
+
[].hash
|
79
|
+
end
|
80
|
+
|
81
|
+
# build the object from hash
|
82
|
+
def build_from_hash(attributes)
|
83
|
+
return nil unless attributes.is_a?(Hash)
|
84
|
+
self.class.swagger_types.each_pair do |key, type|
|
85
|
+
if type =~ /^Array<(.*)>/i
|
86
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
87
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
88
|
+
else
|
89
|
+
#TODO show warning in debug mode
|
90
|
+
end
|
91
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
92
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
93
|
+
else
|
94
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
self
|
99
|
+
end
|
100
|
+
|
101
|
+
def _deserialize(type, value)
|
102
|
+
case type.to_sym
|
103
|
+
when :DateTime
|
104
|
+
DateTime.parse(value)
|
105
|
+
when :Date
|
106
|
+
Date.parse(value)
|
107
|
+
when :String
|
108
|
+
value.to_s
|
109
|
+
when :Integer
|
110
|
+
value.to_i
|
111
|
+
when :Float
|
112
|
+
value.to_f
|
113
|
+
when :BOOLEAN
|
114
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
115
|
+
true
|
116
|
+
else
|
117
|
+
false
|
118
|
+
end
|
119
|
+
when :Object
|
120
|
+
# generic object (usually a Hash), return directly
|
121
|
+
value
|
122
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
123
|
+
inner_type = Regexp.last_match[:inner_type]
|
124
|
+
value.map { |v| _deserialize(inner_type, v) }
|
125
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
126
|
+
k_type = Regexp.last_match[:k_type]
|
127
|
+
v_type = Regexp.last_match[:v_type]
|
128
|
+
{}.tap do |hash|
|
129
|
+
value.each do |k, v|
|
130
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
else # model
|
134
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
135
|
+
_model.build_from_hash(value)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
def to_s
|
140
|
+
to_hash.to_s
|
141
|
+
end
|
142
|
+
|
143
|
+
# to_body is an alias to to_body (backward compatibility))
|
144
|
+
def to_body
|
145
|
+
to_hash
|
146
|
+
end
|
147
|
+
|
148
|
+
# return the object in the form of hash
|
149
|
+
def to_hash
|
150
|
+
hash = {}
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
152
|
+
value = self.send(attr)
|
153
|
+
next if value.nil?
|
154
|
+
hash[param] = _to_hash(value)
|
155
|
+
end
|
156
|
+
hash
|
157
|
+
end
|
158
|
+
|
159
|
+
# Method to output non-array value in the form of hash
|
160
|
+
# For object, use to_hash. Otherwise, just return the value
|
161
|
+
def _to_hash(value)
|
162
|
+
if value.is_a?(Array)
|
163
|
+
value.compact.map{ |v| _to_hash(v) }
|
164
|
+
elsif value.is_a?(Hash)
|
165
|
+
{}.tap do |hash|
|
166
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
167
|
+
end
|
168
|
+
elsif value.respond_to? :to_hash
|
169
|
+
value.to_hash
|
170
|
+
else
|
171
|
+
value
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
end
|
176
|
+
end
|
@@ -103,7 +103,7 @@ module PureCloud
|
|
103
103
|
|
104
104
|
|
105
105
|
|
106
|
-
allowed_values = ["tSegmentDuration", "tConversationDuration", "oTotalCriticalScore", "oTotalScore", "nEvaluations", "tAbandon", "tIvr", "tAnswered", "tFlowOut", "tAcd", "tTalk", "tHeld", "tTalkComplete", "tHeldComplete", "tAcw", "tHandle", "tContacting", "tDialing", "tWait", "tAgentRoutingStatus", "tOrganizationPresence", "tSystemPresence", "tUserResponseTime", "tAgentResponseTime", "tVoicemail", "nStateTransitionError", "nOffered", "nOverSla", "nTransferred", "nBlindTransferred", "nConsultTransferred", "nConsult", "tAlert", "tNotResponding", "nOutbound", "nOutboundAttempted", "nOutboundConnected", "nOutboundAbandoned", "nError", "oServiceTarget", "oServiceLevel", "tActive", "tInactive", "oActiveUsers", "oMemberUsers", "oActiveQueues", "oMemberQueues", "oInteracting", "oWaiting", "oOnQueueUsers", "oOffQueueUsers", "oUserPresences", "oUserRoutingStatuses", "nSurveysSent", "nSurveysStarted", "nSurveysAbandoned", "nSurveysExpired", "nSurveyErrors", "nSurveyResponses", "nSurveyAnswerResponses", "oSurveyTotalScore", "oSurveyQuestionGroupScore", "nSurveyQuestionGroupResponses", "oSurveyQuestionScore", "nSurveyQuestionResponses", "nSurveyNpsResponses", "nSurveyNpsPromoters", "nSurveyNpsDetractors", "nFlow", "
|
106
|
+
allowed_values = ["tSegmentDuration", "tConversationDuration", "oTotalCriticalScore", "oTotalScore", "nEvaluations", "tAbandon", "tIvr", "tAnswered", "tFlowOut", "tAcd", "tTalk", "tHeld", "tTalkComplete", "tHeldComplete", "tAcw", "tHandle", "tContacting", "tDialing", "tWait", "tAgentRoutingStatus", "tOrganizationPresence", "tSystemPresence", "tUserResponseTime", "tAgentResponseTime", "tVoicemail", "nStateTransitionError", "nOffered", "nOverSla", "nTransferred", "nBlindTransferred", "nConsultTransferred", "nConsult", "tAlert", "tNotResponding", "nOutbound", "nOutboundAttempted", "nOutboundConnected", "nOutboundAbandoned", "nError", "oServiceTarget", "oServiceLevel", "tActive", "tInactive", "oActiveUsers", "oMemberUsers", "oActiveQueues", "oMemberQueues", "oInteracting", "oWaiting", "oOnQueueUsers", "oOffQueueUsers", "oUserPresences", "oUserRoutingStatuses", "nSurveysSent", "nSurveysStarted", "nSurveysAbandoned", "nSurveysExpired", "nSurveyErrors", "nSurveyResponses", "nSurveyAnswerResponses", "oSurveyTotalScore", "oSurveyQuestionGroupScore", "nSurveyQuestionGroupResponses", "oSurveyQuestionScore", "nSurveyQuestionResponses", "nSurveyNpsResponses", "nSurveyNpsPromoters", "nSurveyNpsDetractors", "nFlow", "tFlowDisconnect", "tFlowExit", "tFlow", "tFlowOutcome", "nFlowOutcome", "nFlowOutcomeFailed"]
|
107
107
|
if @metric && !allowed_values.include?(@metric)
|
108
108
|
return false
|
109
109
|
end
|
@@ -125,7 +125,7 @@ module PureCloud
|
|
125
125
|
# Custom attribute writer method checking allowed values (enum).
|
126
126
|
# @param [Object] metric Object to be assigned
|
127
127
|
def metric=(metric)
|
128
|
-
allowed_values = ["tSegmentDuration", "tConversationDuration", "oTotalCriticalScore", "oTotalScore", "nEvaluations", "tAbandon", "tIvr", "tAnswered", "tFlowOut", "tAcd", "tTalk", "tHeld", "tTalkComplete", "tHeldComplete", "tAcw", "tHandle", "tContacting", "tDialing", "tWait", "tAgentRoutingStatus", "tOrganizationPresence", "tSystemPresence", "tUserResponseTime", "tAgentResponseTime", "tVoicemail", "nStateTransitionError", "nOffered", "nOverSla", "nTransferred", "nBlindTransferred", "nConsultTransferred", "nConsult", "tAlert", "tNotResponding", "nOutbound", "nOutboundAttempted", "nOutboundConnected", "nOutboundAbandoned", "nError", "oServiceTarget", "oServiceLevel", "tActive", "tInactive", "oActiveUsers", "oMemberUsers", "oActiveQueues", "oMemberQueues", "oInteracting", "oWaiting", "oOnQueueUsers", "oOffQueueUsers", "oUserPresences", "oUserRoutingStatuses", "nSurveysSent", "nSurveysStarted", "nSurveysAbandoned", "nSurveysExpired", "nSurveyErrors", "nSurveyResponses", "nSurveyAnswerResponses", "oSurveyTotalScore", "oSurveyQuestionGroupScore", "nSurveyQuestionGroupResponses", "oSurveyQuestionScore", "nSurveyQuestionResponses", "nSurveyNpsResponses", "nSurveyNpsPromoters", "nSurveyNpsDetractors", "nFlow", "
|
128
|
+
allowed_values = ["tSegmentDuration", "tConversationDuration", "oTotalCriticalScore", "oTotalScore", "nEvaluations", "tAbandon", "tIvr", "tAnswered", "tFlowOut", "tAcd", "tTalk", "tHeld", "tTalkComplete", "tHeldComplete", "tAcw", "tHandle", "tContacting", "tDialing", "tWait", "tAgentRoutingStatus", "tOrganizationPresence", "tSystemPresence", "tUserResponseTime", "tAgentResponseTime", "tVoicemail", "nStateTransitionError", "nOffered", "nOverSla", "nTransferred", "nBlindTransferred", "nConsultTransferred", "nConsult", "tAlert", "tNotResponding", "nOutbound", "nOutboundAttempted", "nOutboundConnected", "nOutboundAbandoned", "nError", "oServiceTarget", "oServiceLevel", "tActive", "tInactive", "oActiveUsers", "oMemberUsers", "oActiveQueues", "oMemberQueues", "oInteracting", "oWaiting", "oOnQueueUsers", "oOffQueueUsers", "oUserPresences", "oUserRoutingStatuses", "nSurveysSent", "nSurveysStarted", "nSurveysAbandoned", "nSurveysExpired", "nSurveyErrors", "nSurveyResponses", "nSurveyAnswerResponses", "oSurveyTotalScore", "oSurveyQuestionGroupScore", "nSurveyQuestionGroupResponses", "oSurveyQuestionScore", "nSurveyQuestionResponses", "nSurveyNpsResponses", "nSurveyNpsPromoters", "nSurveyNpsDetractors", "nFlow", "tFlowDisconnect", "tFlowExit", "tFlow", "tFlowOutcome", "nFlowOutcome", "nFlowOutcomeFailed"]
|
129
129
|
if metric && !allowed_values.include?(metric)
|
130
130
|
fail ArgumentError, "invalid value for 'metric', must be one of #{allowed_values}."
|
131
131
|
end
|
@@ -91,6 +91,9 @@ module PureCloud
|
|
91
91
|
# acd auto answer
|
92
92
|
attr_accessor :acd_auto_answer
|
93
93
|
|
94
|
+
# preferred language by the user
|
95
|
+
attr_accessor :language_preference
|
96
|
+
|
94
97
|
attr_accessor :organization
|
95
98
|
|
96
99
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -151,6 +154,8 @@ module PureCloud
|
|
151
154
|
|
152
155
|
:'acd_auto_answer' => :'acdAutoAnswer',
|
153
156
|
|
157
|
+
:'language_preference' => :'languagePreference',
|
158
|
+
|
154
159
|
:'organization' => :'organization'
|
155
160
|
|
156
161
|
}
|
@@ -214,6 +219,8 @@ module PureCloud
|
|
214
219
|
|
215
220
|
:'acd_auto_answer' => :'BOOLEAN',
|
216
221
|
|
222
|
+
:'language_preference' => :'String',
|
223
|
+
|
217
224
|
:'organization' => :'Organization'
|
218
225
|
|
219
226
|
}
|
@@ -487,6 +494,15 @@ module PureCloud
|
|
487
494
|
end
|
488
495
|
|
489
496
|
|
497
|
+
if attributes.has_key?(:'languagePreference')
|
498
|
+
|
499
|
+
|
500
|
+
self.language_preference = attributes[:'languagePreference']
|
501
|
+
|
502
|
+
|
503
|
+
end
|
504
|
+
|
505
|
+
|
490
506
|
if attributes.has_key?(:'organization')
|
491
507
|
|
492
508
|
|
@@ -628,6 +644,10 @@ module PureCloud
|
|
628
644
|
|
629
645
|
|
630
646
|
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
631
651
|
|
632
652
|
|
633
653
|
|
@@ -779,6 +799,11 @@ module PureCloud
|
|
779
799
|
|
780
800
|
|
781
801
|
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
|
806
|
+
|
782
807
|
|
783
808
|
|
784
809
|
|
@@ -817,6 +842,7 @@ module PureCloud
|
|
817
842
|
skills == o.skills &&
|
818
843
|
languages == o.languages &&
|
819
844
|
acd_auto_answer == o.acd_auto_answer &&
|
845
|
+
language_preference == o.language_preference &&
|
820
846
|
organization == o.organization
|
821
847
|
end
|
822
848
|
|
@@ -829,7 +855,7 @@ module PureCloud
|
|
829
855
|
# Calculates hash code according to all attributes.
|
830
856
|
# @return [Fixnum] Hash code
|
831
857
|
def hash
|
832
|
-
[id, name, division, chat, department, email, primary_contact_info, addresses, state, title, username, manager, images, version, routing_status, presence, conversation_summary, out_of_office, geolocation, station, authorization, profile_skills, locations, groups, skills, languages, acd_auto_answer, organization].hash
|
858
|
+
[id, name, division, chat, department, email, primary_contact_info, addresses, state, title, username, manager, images, version, routing_status, presence, conversation_summary, out_of_office, geolocation, station, authorization, profile_skills, locations, groups, skills, languages, acd_auto_answer, language_preference, organization].hash
|
833
859
|
end
|
834
860
|
|
835
861
|
# build the object from hash
|
@@ -0,0 +1,343 @@
|
|
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 ScorableSurvey
|
21
|
+
# The globally unique identifier for the object.
|
22
|
+
attr_accessor :id
|
23
|
+
|
24
|
+
attr_accessor :name
|
25
|
+
|
26
|
+
# Survey form used for this survey.
|
27
|
+
attr_accessor :survey_form
|
28
|
+
|
29
|
+
attr_accessor :status
|
30
|
+
|
31
|
+
attr_accessor :answers
|
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
|
+
:'survey_form' => :'surveyForm',
|
45
|
+
|
46
|
+
:'status' => :'status',
|
47
|
+
|
48
|
+
:'answers' => :'answers',
|
49
|
+
|
50
|
+
:'self_uri' => :'selfUri'
|
51
|
+
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Attribute type mapping.
|
56
|
+
def self.swagger_types
|
57
|
+
{
|
58
|
+
|
59
|
+
:'id' => :'String',
|
60
|
+
|
61
|
+
:'name' => :'String',
|
62
|
+
|
63
|
+
:'survey_form' => :'SurveyForm',
|
64
|
+
|
65
|
+
:'status' => :'String',
|
66
|
+
|
67
|
+
:'answers' => :'SurveyScoringSet',
|
68
|
+
|
69
|
+
:'self_uri' => :'String'
|
70
|
+
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# Initializes the object
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
76
|
+
def initialize(attributes = {})
|
77
|
+
return unless attributes.is_a?(Hash)
|
78
|
+
|
79
|
+
# convert string to symbol for hash key
|
80
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
81
|
+
|
82
|
+
|
83
|
+
if attributes.has_key?(:'id')
|
84
|
+
|
85
|
+
|
86
|
+
self.id = attributes[:'id']
|
87
|
+
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
if attributes.has_key?(:'name')
|
93
|
+
|
94
|
+
|
95
|
+
self.name = attributes[:'name']
|
96
|
+
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
|
101
|
+
if attributes.has_key?(:'surveyForm')
|
102
|
+
|
103
|
+
|
104
|
+
self.survey_form = attributes[:'surveyForm']
|
105
|
+
|
106
|
+
|
107
|
+
end
|
108
|
+
|
109
|
+
|
110
|
+
if attributes.has_key?(:'status')
|
111
|
+
|
112
|
+
|
113
|
+
self.status = attributes[:'status']
|
114
|
+
|
115
|
+
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
if attributes.has_key?(:'answers')
|
120
|
+
|
121
|
+
|
122
|
+
self.answers = attributes[:'answers']
|
123
|
+
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
if attributes.has_key?(:'selfUri')
|
129
|
+
|
130
|
+
|
131
|
+
self.self_uri = attributes[:'selfUri']
|
132
|
+
|
133
|
+
|
134
|
+
end
|
135
|
+
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
140
|
+
# @return Array for valid properies with the reasons
|
141
|
+
def list_invalid_properties
|
142
|
+
invalid_properties = Array.new
|
143
|
+
|
144
|
+
|
145
|
+
return invalid_properties
|
146
|
+
end
|
147
|
+
|
148
|
+
# Check to see if the all the properties in the model are valid
|
149
|
+
# @return true if the model is valid
|
150
|
+
def valid?
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
allowed_values = ["Pending", "Sent", "InProgress", "Finished", "OptOut", "Error", "Expired"]
|
167
|
+
if @status && !allowed_values.include?(@status)
|
168
|
+
return false
|
169
|
+
end
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
end
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
# Custom attribute writer method checking allowed values (enum).
|
201
|
+
# @param [Object] status Object to be assigned
|
202
|
+
def status=(status)
|
203
|
+
allowed_values = ["Pending", "Sent", "InProgress", "Finished", "OptOut", "Error", "Expired"]
|
204
|
+
if status && !allowed_values.include?(status)
|
205
|
+
fail ArgumentError, "invalid value for 'status', must be one of #{allowed_values}."
|
206
|
+
end
|
207
|
+
@status = status
|
208
|
+
end
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
# Checks equality by comparing each attribute.
|
224
|
+
# @param [Object] Object to be compared
|
225
|
+
def ==(o)
|
226
|
+
return true if self.equal?(o)
|
227
|
+
self.class == o.class &&
|
228
|
+
id == o.id &&
|
229
|
+
name == o.name &&
|
230
|
+
survey_form == o.survey_form &&
|
231
|
+
status == o.status &&
|
232
|
+
answers == o.answers &&
|
233
|
+
self_uri == o.self_uri
|
234
|
+
end
|
235
|
+
|
236
|
+
# @see the `==` method
|
237
|
+
# @param [Object] Object to be compared
|
238
|
+
def eql?(o)
|
239
|
+
self == o
|
240
|
+
end
|
241
|
+
|
242
|
+
# Calculates hash code according to all attributes.
|
243
|
+
# @return [Fixnum] Hash code
|
244
|
+
def hash
|
245
|
+
[id, name, survey_form, status, answers, self_uri].hash
|
246
|
+
end
|
247
|
+
|
248
|
+
# build the object from hash
|
249
|
+
def build_from_hash(attributes)
|
250
|
+
return nil unless attributes.is_a?(Hash)
|
251
|
+
self.class.swagger_types.each_pair do |key, type|
|
252
|
+
if type =~ /^Array<(.*)>/i
|
253
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
254
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
255
|
+
else
|
256
|
+
#TODO show warning in debug mode
|
257
|
+
end
|
258
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
259
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
260
|
+
else
|
261
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
self
|
266
|
+
end
|
267
|
+
|
268
|
+
def _deserialize(type, value)
|
269
|
+
case type.to_sym
|
270
|
+
when :DateTime
|
271
|
+
DateTime.parse(value)
|
272
|
+
when :Date
|
273
|
+
Date.parse(value)
|
274
|
+
when :String
|
275
|
+
value.to_s
|
276
|
+
when :Integer
|
277
|
+
value.to_i
|
278
|
+
when :Float
|
279
|
+
value.to_f
|
280
|
+
when :BOOLEAN
|
281
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
282
|
+
true
|
283
|
+
else
|
284
|
+
false
|
285
|
+
end
|
286
|
+
when :Object
|
287
|
+
# generic object (usually a Hash), return directly
|
288
|
+
value
|
289
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
290
|
+
inner_type = Regexp.last_match[:inner_type]
|
291
|
+
value.map { |v| _deserialize(inner_type, v) }
|
292
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
293
|
+
k_type = Regexp.last_match[:k_type]
|
294
|
+
v_type = Regexp.last_match[:v_type]
|
295
|
+
{}.tap do |hash|
|
296
|
+
value.each do |k, v|
|
297
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
298
|
+
end
|
299
|
+
end
|
300
|
+
else # model
|
301
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
302
|
+
_model.build_from_hash(value)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
def to_s
|
307
|
+
to_hash.to_s
|
308
|
+
end
|
309
|
+
|
310
|
+
# to_body is an alias to to_body (backward compatibility))
|
311
|
+
def to_body
|
312
|
+
to_hash
|
313
|
+
end
|
314
|
+
|
315
|
+
# return the object in the form of hash
|
316
|
+
def to_hash
|
317
|
+
hash = {}
|
318
|
+
self.class.attribute_map.each_pair do |attr, param|
|
319
|
+
value = self.send(attr)
|
320
|
+
next if value.nil?
|
321
|
+
hash[param] = _to_hash(value)
|
322
|
+
end
|
323
|
+
hash
|
324
|
+
end
|
325
|
+
|
326
|
+
# Method to output non-array value in the form of hash
|
327
|
+
# For object, use to_hash. Otherwise, just return the value
|
328
|
+
def _to_hash(value)
|
329
|
+
if value.is_a?(Array)
|
330
|
+
value.compact.map{ |v| _to_hash(v) }
|
331
|
+
elsif value.is_a?(Hash)
|
332
|
+
{}.tap do |hash|
|
333
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
334
|
+
end
|
335
|
+
elsif value.respond_to? :to_hash
|
336
|
+
value.to_hash
|
337
|
+
else
|
338
|
+
value
|
339
|
+
end
|
340
|
+
end
|
341
|
+
|
342
|
+
end
|
343
|
+
end
|