purecloudplatformclientv2 75.1.0 → 79.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/ActivityCode.md +1 -1
- data/docs/AnalyticsApi.md +66 -2
- data/docs/AnalyticsConversationAsyncQueryResponse.md +1 -1
- data/docs/AnalyticsConversationQueryResponse.md +1 -1
- data/docs/AnalyticsParticipant.md +1 -0
- data/docs/AnalyticsParticipantWithoutAttributes.md +1 -0
- data/docs/ArchitectApi.md +345 -0
- data/docs/AuditApi.md +3 -1
- data/docs/AuditLogMessage.md +1 -1
- data/docs/AuthorizationApi.md +154 -9
- data/docs/AvailableTopic.md +3 -1
- data/docs/BuAgentScheduleActivity.md +18 -0
- data/docs/BuAgentSchedulePublishedScheduleReference.md +16 -0
- data/docs/BuAgentScheduleSearchResponse.md +15 -0
- data/docs/BuAgentScheduleShift.md +18 -0
- data/docs/BuAgentSchedulesSearchResponse.md +15 -0
- data/docs/BuAsyncAgentSchedulesSearchResponse.md +17 -0
- data/docs/BuFullDayTimeOffMarker.md +18 -0
- data/docs/BuScheduleReference.md +15 -0
- data/docs/Call.md +1 -1
- data/docs/CallBasic.md +1 -1
- data/docs/CallMediaParticipant.md +1 -1
- data/docs/CallbackMediaParticipant.md +1 -1
- data/docs/CampaignProgress.md +2 -1
- data/docs/ChatMediaParticipant.md +1 -1
- data/docs/CobrowseMediaParticipant.md +1 -1
- data/docs/ConversationsApi.md +71 -1
- data/docs/CopyAttachmentsRequest.md +14 -0
- data/docs/CreateManagementUnitApiRequest.md +3 -2
- data/docs/CreateManagementUnitSettingsRequest.md +1 -1
- data/docs/CreateWorkPlanShift.md +1 -1
- data/docs/DataTableExportJob.md +22 -0
- data/docs/DataTableImportJob.md +25 -0
- data/docs/DivsPermittedEntityListing.md +23 -0
- data/docs/EmailMediaParticipant.md +1 -1
- data/docs/EntityListing.md +17 -0
- data/docs/ErrorBody.md +2 -2
- data/docs/ErrorInfo.md +14 -0
- data/docs/Evaluation.md +1 -0
- data/docs/EvaluationQuestionGroupScore.md +4 -0
- data/docs/EvaluationScoringSet.md +1 -0
- data/docs/FacebookIntegrationRequest.md +2 -2
- data/docs/GDPRJourneyCustomer.md +2 -2
- data/docs/InboundDomain.md +2 -0
- data/docs/Library.md +4 -3
- data/docs/LicenseApi.md +66 -0
- data/docs/MailFromResult.md +15 -0
- data/docs/ManagementUnit.md +2 -2
- data/docs/ManagementUnitSettingsRequest.md +1 -1
- data/docs/MessageMediaParticipant.md +1 -1
- data/docs/MessagingApi.md +0 -936
- data/docs/MessagingTemplate.md +15 -0
- data/docs/Organization.md +1 -0
- data/docs/QualityApi.md +5 -6
- data/docs/Record.md +15 -0
- data/docs/ReportingExportMetadataJobListing.md +22 -0
- data/docs/ReportingExportMetadataJobResponse.md +22 -0
- data/docs/Response.md +2 -0
- data/docs/RoutingApi.md +385 -0
- data/docs/RoutingSettings.md +13 -0
- data/docs/SCIMApi.md +397 -23
- data/docs/ScimUserExtensions.md +14 -0
- data/docs/ScimUserRole.md +13 -0
- data/docs/ScimUserRoutingLanguage.md +14 -0
- data/docs/ScimUserRoutingSkill.md +14 -0
- data/docs/ScimV2CreateUser.md +2 -1
- data/docs/ScimV2SchemaAttribute.md +24 -0
- data/docs/ScimV2SchemaDefinition.md +17 -0
- data/docs/ScimV2SchemaListResponse.md +17 -0
- data/docs/ScimV2User.md +2 -1
- data/docs/ShortTermForecast.md +2 -2
- data/docs/ShortTermForecastListItemResponse.md +2 -2
- data/docs/ShortTermForecastReference.md +2 -2
- data/docs/TimeOffRequestLookup.md +3 -3
- data/docs/TimeOffRequestResponse.md +3 -3
- data/docs/UserScheduleAdherence.md +1 -1
- data/docs/UsersApi.md +358 -10
- data/docs/ViewFilter.md +4 -10
- data/docs/WeekSchedule.md +1 -1
- data/docs/WeekScheduleListItemResponse.md +1 -1
- data/docs/WeekScheduleReference.md +1 -1
- data/docs/WorkPlanShift.md +1 -1
- data/docs/WorkforceManagementApi.md +40 -41
- data/lib/purecloudplatformclientv2.rb +27 -0
- data/lib/purecloudplatformclientv2/api/analytics_api.rb +73 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +373 -0
- data/lib/purecloudplatformclientv2/api/audit_api.rb +9 -0
- data/lib/purecloudplatformclientv2/api/authorization_api.rb +185 -7
- data/lib/purecloudplatformclientv2/api/conversations_api.rb +84 -0
- data/lib/purecloudplatformclientv2/api/license_api.rb +63 -0
- data/lib/purecloudplatformclientv2/api/messaging_api.rb +0 -949
- data/lib/purecloudplatformclientv2/api/quality_api.rb +8 -6
- data/lib/purecloudplatformclientv2/api/routing_api.rb +378 -0
- data/lib/purecloudplatformclientv2/api/scim_api.rb +366 -26
- data/lib/purecloudplatformclientv2/api/users_api.rb +398 -7
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +3 -3
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/activity_code.rb +30 -30
- data/lib/purecloudplatformclientv2/models/analytics_conversation_async_query_response.rb +15 -15
- data/lib/purecloudplatformclientv2/models/analytics_conversation_query_response.rb +15 -15
- data/lib/purecloudplatformclientv2/models/analytics_participant.rb +27 -1
- data/lib/purecloudplatformclientv2/models/analytics_participant_without_attributes.rb +27 -1
- data/lib/purecloudplatformclientv2/models/audit_log_message.rb +5 -5
- data/lib/purecloudplatformclientv2/models/available_topic.rb +57 -4
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_activity.rb +332 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_published_schedule_reference.rb +280 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_search_response.rb +258 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_shift.rb +334 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedules_search_response.rb +258 -0
- data/lib/purecloudplatformclientv2/models/bu_async_agent_schedules_search_response.rb +320 -0
- data/lib/purecloudplatformclientv2/models/bu_full_day_time_off_marker.rb +332 -0
- data/lib/purecloudplatformclientv2/models/bu_schedule_reference.rb +254 -0
- data/lib/purecloudplatformclientv2/models/call.rb +1 -1
- data/lib/purecloudplatformclientv2/models/call_basic.rb +1 -1
- data/lib/purecloudplatformclientv2/models/call_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/callback_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/campaign_progress.rb +28 -2
- data/lib/purecloudplatformclientv2/models/chat_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/cobrowse_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/copy_attachments_request.rb +240 -0
- data/lib/purecloudplatformclientv2/models/create_management_unit_api_request.rb +37 -16
- data/lib/purecloudplatformclientv2/models/create_management_unit_settings_request.rb +1 -1
- data/lib/purecloudplatformclientv2/models/create_work_plan_shift.rb +1 -1
- data/lib/purecloudplatformclientv2/models/data_table_export_job.rb +455 -0
- data/lib/purecloudplatformclientv2/models/data_table_import_job.rb +547 -0
- data/lib/purecloudplatformclientv2/models/divs_permitted_entity_listing.rb +453 -0
- data/lib/purecloudplatformclientv2/models/email_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/entity_listing.rb +303 -0
- data/lib/purecloudplatformclientv2/models/error_body.rb +20 -20
- data/lib/purecloudplatformclientv2/models/error_info.rb +226 -0
- data/lib/purecloudplatformclientv2/models/evaluation.rb +27 -1
- data/lib/purecloudplatformclientv2/models/evaluation_question_group_score.rb +101 -1
- data/lib/purecloudplatformclientv2/models/evaluation_scoring_set.rb +26 -1
- data/lib/purecloudplatformclientv2/models/facebook_integration_request.rb +2 -7
- data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/gdpr_journey_customer.rb +2 -12
- data/lib/purecloudplatformclientv2/models/inbound_domain.rb +53 -1
- data/lib/purecloudplatformclientv2/models/library.rb +44 -2
- data/lib/purecloudplatformclientv2/models/mail_from_result.rb +275 -0
- data/lib/purecloudplatformclientv2/models/management_unit.rb +2 -2
- data/lib/purecloudplatformclientv2/models/management_unit_settings_request.rb +1 -1
- data/lib/purecloudplatformclientv2/models/message_media_participant.rb +1 -1
- data/lib/purecloudplatformclientv2/models/messaging_template.rb +270 -0
- data/lib/purecloudplatformclientv2/models/organization.rb +41 -1
- data/lib/purecloudplatformclientv2/models/record.rb +269 -0
- data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/reporting_export_metadata_job_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/reporting_export_metadata_job_response.rb +459 -0
- data/lib/purecloudplatformclientv2/models/response.rb +67 -1
- data/lib/purecloudplatformclientv2/models/routing_settings.rb +202 -0
- data/lib/purecloudplatformclientv2/models/scim_metadata.rb +2 -2
- data/lib/purecloudplatformclientv2/models/scim_user_extensions.rb +233 -0
- data/lib/purecloudplatformclientv2/models/scim_user_role.rb +203 -0
- data/lib/purecloudplatformclientv2/models/scim_user_routing_language.rb +234 -0
- data/lib/purecloudplatformclientv2/models/scim_user_routing_skill.rb +234 -0
- data/lib/purecloudplatformclientv2/models/scim_v2_create_user.rb +30 -5
- data/lib/purecloudplatformclientv2/models/scim_v2_group_reference.rb +2 -2
- data/lib/purecloudplatformclientv2/models/scim_v2_member_reference.rb +2 -2
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_attribute.rb +551 -0
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_definition.rb +309 -0
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_list_response.rb +311 -0
- data/lib/purecloudplatformclientv2/models/scim_v2_user.rb +27 -2
- data/lib/purecloudplatformclientv2/models/segment_detail_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/short_term_forecast.rb +30 -35
- data/lib/purecloudplatformclientv2/models/short_term_forecast_list_item_response.rb +30 -35
- data/lib/purecloudplatformclientv2/models/short_term_forecast_reference.rb +22 -27
- data/lib/purecloudplatformclientv2/models/time_off_request_lookup.rb +3 -3
- data/lib/purecloudplatformclientv2/models/time_off_request_response.rb +3 -3
- data/lib/purecloudplatformclientv2/models/user_schedule_adherence.rb +1 -1
- data/lib/purecloudplatformclientv2/models/view_filter.rb +53 -255
- data/lib/purecloudplatformclientv2/models/week_schedule.rb +21 -21
- data/lib/purecloudplatformclientv2/models/week_schedule_list_item_response.rb +21 -21
- data/lib/purecloudplatformclientv2/models/week_schedule_reference.rb +14 -14
- data/lib/purecloudplatformclientv2/models/work_plan_shift.rb +1 -1
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +56 -2
@@ -91,7 +91,7 @@ module PureCloud
|
|
91
91
|
|
92
92
|
:'id' => :'String',
|
93
93
|
|
94
|
-
:'user' => :'
|
94
|
+
:'user' => :'DomainEntityRef',
|
95
95
|
|
96
96
|
:'client' => :'AddressableEntityRef',
|
97
97
|
|
@@ -289,7 +289,7 @@ module PureCloud
|
|
289
289
|
|
290
290
|
|
291
291
|
|
292
|
-
allowed_values = ["Create", "View", "Update", "Delete", "Download", "MemberAdd", "MemberUpdate", "MemberRemove", "Read", "ReadAll", "Execute", "Publish"]
|
292
|
+
allowed_values = ["Create", "View", "Update", "Delete", "Download", "MemberAdd", "MemberUpdate", "MemberRemove", "Read", "ReadAll", "Execute", "Publish", "Authorize", "Deauthorize", "Authenticate", "ChangePassword"]
|
293
293
|
if @action && !allowed_values.include?(@action)
|
294
294
|
return false
|
295
295
|
end
|
@@ -302,7 +302,7 @@ module PureCloud
|
|
302
302
|
|
303
303
|
|
304
304
|
|
305
|
-
allowed_values = ["Document", "Queue", "Recording", "Role", "VoicemailUserPolicy", "WrapupCode", "AccessToken", "BulkActions", "Feedback", "Topic", "Program"]
|
305
|
+
allowed_values = ["Document", "Queue", "Recording", "Role", "VoicemailUserPolicy", "WrapupCode", "AccessToken", "OAuthClient", "OAuthClientAuthorization", "AuthOrganization", "AuthUser", "BulkActions", "Feedback", "Topic", "Program"]
|
306
306
|
if @entity_type && !allowed_values.include?(@entity_type)
|
307
307
|
return false
|
308
308
|
end
|
@@ -368,7 +368,7 @@ module PureCloud
|
|
368
368
|
# Custom attribute writer method checking allowed values (enum).
|
369
369
|
# @param [Object] action Object to be assigned
|
370
370
|
def action=(action)
|
371
|
-
allowed_values = ["Create", "View", "Update", "Delete", "Download", "MemberAdd", "MemberUpdate", "MemberRemove", "Read", "ReadAll", "Execute", "Publish"]
|
371
|
+
allowed_values = ["Create", "View", "Update", "Delete", "Download", "MemberAdd", "MemberUpdate", "MemberRemove", "Read", "ReadAll", "Execute", "Publish", "Authorize", "Deauthorize", "Authenticate", "ChangePassword"]
|
372
372
|
if action && !allowed_values.include?(action)
|
373
373
|
fail ArgumentError, "invalid value for 'action', must be one of #{allowed_values}."
|
374
374
|
end
|
@@ -387,7 +387,7 @@ module PureCloud
|
|
387
387
|
# Custom attribute writer method checking allowed values (enum).
|
388
388
|
# @param [Object] entity_type Object to be assigned
|
389
389
|
def entity_type=(entity_type)
|
390
|
-
allowed_values = ["Document", "Queue", "Recording", "Role", "VoicemailUserPolicy", "WrapupCode", "AccessToken", "BulkActions", "Feedback", "Topic", "Program"]
|
390
|
+
allowed_values = ["Document", "Queue", "Recording", "Role", "VoicemailUserPolicy", "WrapupCode", "AccessToken", "OAuthClient", "OAuthClientAuthorization", "AuthOrganization", "AuthUser", "BulkActions", "Feedback", "Topic", "Program"]
|
391
391
|
if entity_type && !allowed_values.include?(entity_type)
|
392
392
|
fail ArgumentError, "invalid value for 'entity_type', must be one of #{allowed_values}."
|
393
393
|
end
|
@@ -22,10 +22,17 @@ module PureCloud
|
|
22
22
|
|
23
23
|
attr_accessor :id
|
24
24
|
|
25
|
+
# Permissions required to subscribe to the topic
|
25
26
|
attr_accessor :requires_permissions
|
26
27
|
|
27
28
|
attr_accessor :schema
|
28
29
|
|
30
|
+
# True if the topic user ID is required to match the subscribing user ID
|
31
|
+
attr_accessor :requires_current_user
|
32
|
+
|
33
|
+
# True if permissions are only required when the topic user ID does not match the subscribing user ID
|
34
|
+
attr_accessor :requires_current_user_or_permission
|
35
|
+
|
29
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
37
|
def self.attribute_map
|
31
38
|
{
|
@@ -36,7 +43,11 @@ module PureCloud
|
|
36
43
|
|
37
44
|
:'requires_permissions' => :'requiresPermissions',
|
38
45
|
|
39
|
-
:'schema' => :'schema'
|
46
|
+
:'schema' => :'schema',
|
47
|
+
|
48
|
+
:'requires_current_user' => :'requiresCurrentUser',
|
49
|
+
|
50
|
+
:'requires_current_user_or_permission' => :'requiresCurrentUserOrPermission'
|
40
51
|
|
41
52
|
}
|
42
53
|
end
|
@@ -51,7 +62,11 @@ module PureCloud
|
|
51
62
|
|
52
63
|
:'requires_permissions' => :'Array<String>',
|
53
64
|
|
54
|
-
:'schema' => :'Hash<String, Object>'
|
65
|
+
:'schema' => :'Hash<String, Object>',
|
66
|
+
|
67
|
+
:'requires_current_user' => :'BOOLEAN',
|
68
|
+
|
69
|
+
:'requires_current_user_or_permission' => :'BOOLEAN'
|
55
70
|
|
56
71
|
}
|
57
72
|
end
|
@@ -105,6 +120,24 @@ module PureCloud
|
|
105
120
|
end
|
106
121
|
|
107
122
|
|
123
|
+
if attributes.has_key?(:'requiresCurrentUser')
|
124
|
+
|
125
|
+
|
126
|
+
self.requires_current_user = attributes[:'requiresCurrentUser']
|
127
|
+
|
128
|
+
|
129
|
+
end
|
130
|
+
|
131
|
+
|
132
|
+
if attributes.has_key?(:'requiresCurrentUserOrPermission')
|
133
|
+
|
134
|
+
|
135
|
+
self.requires_current_user_or_permission = attributes[:'requiresCurrentUserOrPermission']
|
136
|
+
|
137
|
+
|
138
|
+
end
|
139
|
+
|
140
|
+
|
108
141
|
end
|
109
142
|
|
110
143
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -131,6 +164,14 @@ module PureCloud
|
|
131
164
|
|
132
165
|
|
133
166
|
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
134
175
|
|
135
176
|
|
136
177
|
|
@@ -148,6 +189,16 @@ module PureCloud
|
|
148
189
|
|
149
190
|
|
150
191
|
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
151
202
|
|
152
203
|
|
153
204
|
|
@@ -167,7 +218,9 @@ module PureCloud
|
|
167
218
|
description == o.description &&
|
168
219
|
id == o.id &&
|
169
220
|
requires_permissions == o.requires_permissions &&
|
170
|
-
schema == o.schema
|
221
|
+
schema == o.schema &&
|
222
|
+
requires_current_user == o.requires_current_user &&
|
223
|
+
requires_current_user_or_permission == o.requires_current_user_or_permission
|
171
224
|
end
|
172
225
|
|
173
226
|
# @see the `==` method
|
@@ -179,7 +232,7 @@ module PureCloud
|
|
179
232
|
# Calculates hash code according to all attributes.
|
180
233
|
# @return [Fixnum] Hash code
|
181
234
|
def hash
|
182
|
-
[description, id, requires_permissions, schema].hash
|
235
|
+
[description, id, requires_permissions, schema, requires_current_user, requires_current_user_or_permission].hash
|
183
236
|
end
|
184
237
|
|
185
238
|
# build the object from hash
|
@@ -0,0 +1,332 @@
|
|
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 BuAgentScheduleActivity
|
21
|
+
# The start date/time of this activity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
22
|
+
attr_accessor :start_date
|
23
|
+
|
24
|
+
# The length of this activity in minutes
|
25
|
+
attr_accessor :length_minutes
|
26
|
+
|
27
|
+
# The description of this activity
|
28
|
+
attr_accessor :description
|
29
|
+
|
30
|
+
# The ID of the activity code associated with this activity
|
31
|
+
attr_accessor :activity_code_id
|
32
|
+
|
33
|
+
# Whether this activity is paid
|
34
|
+
attr_accessor :paid
|
35
|
+
|
36
|
+
# The ID of the time off request associated with this activity, if applicable
|
37
|
+
attr_accessor :time_off_request_id
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
|
43
|
+
:'start_date' => :'startDate',
|
44
|
+
|
45
|
+
:'length_minutes' => :'lengthMinutes',
|
46
|
+
|
47
|
+
:'description' => :'description',
|
48
|
+
|
49
|
+
:'activity_code_id' => :'activityCodeId',
|
50
|
+
|
51
|
+
:'paid' => :'paid',
|
52
|
+
|
53
|
+
:'time_off_request_id' => :'timeOffRequestId'
|
54
|
+
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Attribute type mapping.
|
59
|
+
def self.swagger_types
|
60
|
+
{
|
61
|
+
|
62
|
+
:'start_date' => :'DateTime',
|
63
|
+
|
64
|
+
:'length_minutes' => :'Integer',
|
65
|
+
|
66
|
+
:'description' => :'String',
|
67
|
+
|
68
|
+
:'activity_code_id' => :'String',
|
69
|
+
|
70
|
+
:'paid' => :'BOOLEAN',
|
71
|
+
|
72
|
+
:'time_off_request_id' => :'String'
|
73
|
+
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
# Initializes the object
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
79
|
+
def initialize(attributes = {})
|
80
|
+
return unless attributes.is_a?(Hash)
|
81
|
+
|
82
|
+
# convert string to symbol for hash key
|
83
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
84
|
+
|
85
|
+
|
86
|
+
if attributes.has_key?(:'startDate')
|
87
|
+
|
88
|
+
|
89
|
+
self.start_date = attributes[:'startDate']
|
90
|
+
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
if attributes.has_key?(:'lengthMinutes')
|
96
|
+
|
97
|
+
|
98
|
+
self.length_minutes = attributes[:'lengthMinutes']
|
99
|
+
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
if attributes.has_key?(:'description')
|
105
|
+
|
106
|
+
|
107
|
+
self.description = attributes[:'description']
|
108
|
+
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
if attributes.has_key?(:'activityCodeId')
|
114
|
+
|
115
|
+
|
116
|
+
self.activity_code_id = attributes[:'activityCodeId']
|
117
|
+
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
if attributes.has_key?(:'paid')
|
123
|
+
|
124
|
+
|
125
|
+
self.paid = attributes[:'paid']
|
126
|
+
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
if attributes.has_key?(:'timeOffRequestId')
|
132
|
+
|
133
|
+
|
134
|
+
self.time_off_request_id = attributes[:'timeOffRequestId']
|
135
|
+
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
|
140
|
+
end
|
141
|
+
|
142
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
143
|
+
# @return Array for valid properies with the reasons
|
144
|
+
def list_invalid_properties
|
145
|
+
invalid_properties = Array.new
|
146
|
+
|
147
|
+
|
148
|
+
return invalid_properties
|
149
|
+
end
|
150
|
+
|
151
|
+
# Check to see if the all the properties in the model are valid
|
152
|
+
# @return true if the model is valid
|
153
|
+
def valid?
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
end
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
# Checks equality by comparing each attribute.
|
213
|
+
# @param [Object] Object to be compared
|
214
|
+
def ==(o)
|
215
|
+
return true if self.equal?(o)
|
216
|
+
self.class == o.class &&
|
217
|
+
start_date == o.start_date &&
|
218
|
+
length_minutes == o.length_minutes &&
|
219
|
+
description == o.description &&
|
220
|
+
activity_code_id == o.activity_code_id &&
|
221
|
+
paid == o.paid &&
|
222
|
+
time_off_request_id == o.time_off_request_id
|
223
|
+
end
|
224
|
+
|
225
|
+
# @see the `==` method
|
226
|
+
# @param [Object] Object to be compared
|
227
|
+
def eql?(o)
|
228
|
+
self == o
|
229
|
+
end
|
230
|
+
|
231
|
+
# Calculates hash code according to all attributes.
|
232
|
+
# @return [Fixnum] Hash code
|
233
|
+
def hash
|
234
|
+
[start_date, length_minutes, description, activity_code_id, paid, time_off_request_id].hash
|
235
|
+
end
|
236
|
+
|
237
|
+
# build the object from hash
|
238
|
+
def build_from_hash(attributes)
|
239
|
+
return nil unless attributes.is_a?(Hash)
|
240
|
+
self.class.swagger_types.each_pair do |key, type|
|
241
|
+
if type =~ /^Array<(.*)>/i
|
242
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
243
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
244
|
+
else
|
245
|
+
#TODO show warning in debug mode
|
246
|
+
end
|
247
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
248
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
249
|
+
else
|
250
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
self
|
255
|
+
end
|
256
|
+
|
257
|
+
def _deserialize(type, value)
|
258
|
+
case type.to_sym
|
259
|
+
when :DateTime
|
260
|
+
DateTime.parse(value)
|
261
|
+
when :Date
|
262
|
+
Date.parse(value)
|
263
|
+
when :String
|
264
|
+
value.to_s
|
265
|
+
when :Integer
|
266
|
+
value.to_i
|
267
|
+
when :Float
|
268
|
+
value.to_f
|
269
|
+
when :BOOLEAN
|
270
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
271
|
+
true
|
272
|
+
else
|
273
|
+
false
|
274
|
+
end
|
275
|
+
when :Object
|
276
|
+
# generic object (usually a Hash), return directly
|
277
|
+
value
|
278
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
279
|
+
inner_type = Regexp.last_match[:inner_type]
|
280
|
+
value.map { |v| _deserialize(inner_type, v) }
|
281
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
282
|
+
k_type = Regexp.last_match[:k_type]
|
283
|
+
v_type = Regexp.last_match[:v_type]
|
284
|
+
{}.tap do |hash|
|
285
|
+
value.each do |k, v|
|
286
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
287
|
+
end
|
288
|
+
end
|
289
|
+
else # model
|
290
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
291
|
+
_model.build_from_hash(value)
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
def to_s
|
296
|
+
to_hash.to_s
|
297
|
+
end
|
298
|
+
|
299
|
+
# to_body is an alias to to_body (backward compatibility))
|
300
|
+
def to_body
|
301
|
+
to_hash
|
302
|
+
end
|
303
|
+
|
304
|
+
# return the object in the form of hash
|
305
|
+
def to_hash
|
306
|
+
hash = {}
|
307
|
+
self.class.attribute_map.each_pair do |attr, param|
|
308
|
+
value = self.send(attr)
|
309
|
+
next if value.nil?
|
310
|
+
hash[param] = _to_hash(value)
|
311
|
+
end
|
312
|
+
hash
|
313
|
+
end
|
314
|
+
|
315
|
+
# Method to output non-array value in the form of hash
|
316
|
+
# For object, use to_hash. Otherwise, just return the value
|
317
|
+
def _to_hash(value)
|
318
|
+
if value.is_a?(Array)
|
319
|
+
value.compact.map{ |v| _to_hash(v) }
|
320
|
+
elsif value.is_a?(Hash)
|
321
|
+
{}.tap do |hash|
|
322
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
323
|
+
end
|
324
|
+
elsif value.respond_to? :to_hash
|
325
|
+
value.to_hash
|
326
|
+
else
|
327
|
+
value
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
end
|
332
|
+
end
|