purecloudplatformclientv2 19.0.0 → 20.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (321) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/ActionEntityListing.md +1 -1
  4. data/docs/AgentActivityEntityListing.md +1 -1
  5. data/docs/AnalyticsSession.md +3 -0
  6. data/docs/ArchitectApi.md +272 -2
  7. data/docs/AttemptLimitsEntityListing.md +1 -1
  8. data/docs/AttributeEntityListing.md +1 -1
  9. data/docs/CalibrationEntityListing.md +1 -1
  10. data/docs/CallConversationEntityListing.md +1 -1
  11. data/docs/CallHistoryConversationEntityListing.md +1 -1
  12. data/docs/CallHistoryParticipant.md +2 -0
  13. data/docs/CallableTimeSetEntityListing.md +1 -1
  14. data/docs/CallbackConversationEntityListing.md +1 -1
  15. data/docs/CampaignEntityListing.md +1 -1
  16. data/docs/CampaignRuleEntityListing.md +1 -1
  17. data/docs/CampaignSequenceEntityListing.md +1 -1
  18. data/docs/CertificateAuthorityEntityListing.md +1 -1
  19. data/docs/ChatConversationEntityListing.md +1 -1
  20. data/docs/CobrowseConversationEntityListing.md +1 -1
  21. data/docs/CommandStatusEntityListing.md +1 -1
  22. data/docs/ConsumedResourcesEntityListing.md +1 -1
  23. data/docs/ConsumingResourcesEntityListing.md +1 -1
  24. data/docs/ContactListEntityListing.md +1 -1
  25. data/docs/ContactListFilterEntityListing.md +1 -1
  26. data/docs/ContactListing.md +1 -1
  27. data/docs/ConversationEntityListing.md +1 -1
  28. data/docs/ConversationNotificationEmail.md +1 -0
  29. data/docs/ConversationNotificationEmails.md +1 -0
  30. data/docs/ConversationNotificationMessage.md +27 -0
  31. data/docs/ConversationNotificationMessageDetails.md +14 -0
  32. data/docs/ConversationNotificationMessages.md +14 -0
  33. data/docs/ConversationNotificationMessages1.md +27 -0
  34. data/docs/ConversationNotificationParticipant.md +1 -0
  35. data/docs/ConversationNotificationParticipants.md +1 -0
  36. data/docs/DIDEntityListing.md +1 -1
  37. data/docs/DIDPoolEntityListing.md +1 -1
  38. data/docs/DependencyObjectEntityListing.md +1 -1
  39. data/docs/DependencyTypeEntityListing.md +1 -1
  40. data/docs/DialerEventEntityListing.md +1 -1
  41. data/docs/DirectoryUserDevicesListing.md +1 -1
  42. data/docs/DncListEntityListing.md +1 -1
  43. data/docs/DocumentAuditEntityListing.md +1 -1
  44. data/docs/DocumentEntityListing.md +1 -1
  45. data/docs/DomainEdgeSoftwareVersionDtoEntityListing.md +1 -1
  46. data/docs/DomainEntityListing.md +1 -1
  47. data/docs/DomainEntityListingEvaluationForm.md +1 -1
  48. data/docs/DomainEntityListingQueryResult.md +1 -1
  49. data/docs/DomainOrganizationRole.md +1 -1
  50. data/docs/DomainOrganizationRoleCreate.md +1 -1
  51. data/docs/DomainOrganizationRoleUpdate.md +1 -1
  52. data/docs/EdgeEntityListing.md +1 -1
  53. data/docs/EdgeGroupEntityListing.md +1 -1
  54. data/docs/EdgeLineEntityListing.md +1 -1
  55. data/docs/EmailConversationEntityListing.md +1 -1
  56. data/docs/EmailMessageListing.md +1 -1
  57. data/docs/EncryptionKeyEntityListing.md +1 -1
  58. data/docs/EndpointEntityListing.md +1 -1
  59. data/docs/EvaluationEntityListing.md +1 -1
  60. data/docs/EvaluationFormEntityListing.md +1 -1
  61. data/docs/EvaluatorActivityEntityListing.md +1 -1
  62. data/docs/ExtensionEntityListing.md +1 -1
  63. data/docs/ExtensionPoolEntityListing.md +1 -1
  64. data/docs/ExternalOrganizationListing.md +1 -1
  65. data/docs/FaxDocumentEntityListing.md +1 -1
  66. data/docs/FlowEntityListing.md +1 -1
  67. data/docs/FlowVersionEntityListing.md +1 -1
  68. data/docs/GreetingListing.md +1 -1
  69. data/docs/GroupEntityListing.md +1 -1
  70. data/docs/IVREntityListing.md +1 -1
  71. data/docs/InboundDomainEntityListing.md +1 -1
  72. data/docs/InboundRouteEntityListing.md +1 -1
  73. data/docs/IntegrationsApi.md +4 -0
  74. data/docs/InteractionStatsAlertContainer.md +1 -1
  75. data/docs/InteractionStatsRuleContainer.md +1 -1
  76. data/docs/JsonNode.md +2 -2
  77. data/docs/KeywordSetEntityListing.md +1 -1
  78. data/docs/LanguageEntityListing.md +1 -1
  79. data/docs/LibraryEntityListing.md +1 -1
  80. data/docs/LineBaseEntityListing.md +1 -1
  81. data/docs/LineEntityListing.md +1 -1
  82. data/docs/LocationEntityListing.md +1 -1
  83. data/docs/LogicalInterfaceEntityListing.md +1 -1
  84. data/docs/ManagementUnitListing.md +1 -1
  85. data/docs/Message.md +29 -0
  86. data/docs/MessageConversationNotification.md +16 -0
  87. data/docs/MessageConversationNotificationDetail.md +16 -0
  88. data/docs/MessageConversationNotificationErrorBody.md +22 -0
  89. data/docs/MessageConversationNotificationErrorInfo.md +22 -0
  90. data/docs/MessageConversationNotificationMessageDetails.md +14 -0
  91. data/docs/MessageConversationNotificationMessageMediaParticipant.md +40 -0
  92. data/docs/MessageConversationNotificationMessages.md +14 -0
  93. data/docs/MessageConversationNotificationParticipants.md +40 -0
  94. data/docs/MessageConversationNotificationUriReference.md +14 -0
  95. data/docs/MessageConversationNotificationWrapup.md +18 -0
  96. data/docs/MessageDetails.md +15 -0
  97. data/docs/NoteListing.md +1 -1
  98. data/docs/OAuthClientEntityListing.md +1 -1
  99. data/docs/OAuthProviderEntityListing.md +1 -1
  100. data/docs/OrganizationPresenceEntityListing.md +1 -1
  101. data/docs/OrganizationRoleEntityListing.md +1 -1
  102. data/docs/OrphanRecordingListing.md +1 -1
  103. data/docs/OutboundRouteBaseEntityListing.md +1 -1
  104. data/docs/OutboundRouteEntityListing.md +1 -1
  105. data/docs/Participant.md +1 -0
  106. data/docs/ParticipantBasic.md +1 -0
  107. data/docs/PermissionCollectionEntityListing.md +1 -1
  108. data/docs/PhoneBaseEntityListing.md +1 -1
  109. data/docs/PhoneEntityListing.md +1 -1
  110. data/docs/PhoneMetaBaseEntityListing.md +1 -1
  111. data/docs/PhysicalInterfaceEntityListing.md +1 -1
  112. data/docs/PolicyEntityListing.md +1 -1
  113. data/docs/PromptAssetEntityListing.md +1 -1
  114. data/docs/PromptEntityListing.md +1 -1
  115. data/docs/QualityApi.md +2 -2
  116. data/docs/QualityAuditPage.md +1 -1
  117. data/docs/QueueEntityListing.md +1 -1
  118. data/docs/QueueMemberEntityListing.md +1 -1
  119. data/docs/RelationshipListing.md +1 -1
  120. data/docs/ReportMetaDataEntityListing.md +1 -1
  121. data/docs/ReportRunEntryEntityDomainListing.md +1 -1
  122. data/docs/ReportScheduleEntityListing.md +1 -1
  123. data/docs/ResponseEntityList.md +1 -1
  124. data/docs/ResponseEntityListing.md +1 -1
  125. data/docs/ResponseSetEntityListing.md +1 -1
  126. data/docs/RuleSetEntityListing.md +1 -1
  127. data/docs/ScheduleEntityListing.md +1 -1
  128. data/docs/ScheduleGroupEntityListing.md +1 -1
  129. data/docs/SchemaCategoryEntityListing.md +1 -1
  130. data/docs/SchemaReferenceEntityListing.md +1 -1
  131. data/docs/ScreenRecordingSessionListing.md +1 -1
  132. data/docs/ScriptEntityListing.md +1 -1
  133. data/docs/ScriptsApi.md +46 -15
  134. data/docs/SecurityProfileEntityListing.md +1 -1
  135. data/docs/ShareEntityListing.md +1 -1
  136. data/docs/SiteEntityListing.md +1 -1
  137. data/docs/SkillEntityListing.md +1 -1
  138. data/docs/StationEntityListing.md +1 -1
  139. data/docs/SystemPromptAssetEntityListing.md +1 -1
  140. data/docs/SystemPromptEntityListing.md +1 -1
  141. data/docs/TagValueEntityListing.md +1 -1
  142. data/docs/TelephonyProvidersEdgeApi.md +10 -10
  143. data/docs/TimeZoneEntityListing.md +1 -1
  144. data/docs/TrunkBaseEntityListing.md +1 -1
  145. data/docs/TrunkEntityListing.md +1 -1
  146. data/docs/TrunkMetabaseEntityListing.md +1 -1
  147. data/docs/TrustEntityListing.md +1 -1
  148. data/docs/TrustUserEntityListing.md +1 -1
  149. data/docs/TrustorEntityListing.md +1 -1
  150. data/docs/UserEntityListing.md +1 -1
  151. data/docs/UserQueueEntityListing.md +1 -1
  152. data/docs/UserRecordingEntityListing.md +1 -1
  153. data/docs/UserSkillEntityListing.md +1 -1
  154. data/docs/VoicemailMessageEntityListing.md +1 -1
  155. data/docs/WorkspaceEntityListing.md +1 -1
  156. data/docs/WorkspaceMemberEntityListing.md +1 -1
  157. data/docs/WrapupCodeEntityListing.md +1 -1
  158. data/lib/purecloudplatformclientv2.rb +16 -0
  159. data/lib/purecloudplatformclientv2/api/architect_api.rb +380 -2
  160. data/lib/purecloudplatformclientv2/api/integrations_api.rb +26 -0
  161. data/lib/purecloudplatformclientv2/api/quality_api.rb +2 -2
  162. data/lib/purecloudplatformclientv2/api/scripts_api.rb +95 -4
  163. data/lib/purecloudplatformclientv2/api/telephony_providers_edge_api.rb +15 -15
  164. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  165. data/lib/purecloudplatformclientv2/models/action_entity_listing.rb +14 -14
  166. data/lib/purecloudplatformclientv2/models/agent_activity_entity_listing.rb +14 -14
  167. data/lib/purecloudplatformclientv2/models/aggregate_metric_data.rb +2 -2
  168. data/lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb +2 -2
  169. data/lib/purecloudplatformclientv2/models/analytics_participant.rb +2 -2
  170. data/lib/purecloudplatformclientv2/models/analytics_query_predicate.rb +4 -4
  171. data/lib/purecloudplatformclientv2/models/analytics_session.rb +79 -3
  172. data/lib/purecloudplatformclientv2/models/attempt_limits_entity_listing.rb +14 -14
  173. data/lib/purecloudplatformclientv2/models/attribute_entity_listing.rb +14 -14
  174. data/lib/purecloudplatformclientv2/models/calibration_entity_listing.rb +14 -14
  175. data/lib/purecloudplatformclientv2/models/call_conversation_entity_listing.rb +14 -14
  176. data/lib/purecloudplatformclientv2/models/call_history_conversation_entity_listing.rb +14 -14
  177. data/lib/purecloudplatformclientv2/models/call_history_participant.rb +58 -4
  178. data/lib/purecloudplatformclientv2/models/callable_time_set_entity_listing.rb +14 -14
  179. data/lib/purecloudplatformclientv2/models/callback_conversation_entity_listing.rb +14 -14
  180. data/lib/purecloudplatformclientv2/models/campaign_entity_listing.rb +14 -14
  181. data/lib/purecloudplatformclientv2/models/campaign_rule_entity_listing.rb +14 -14
  182. data/lib/purecloudplatformclientv2/models/campaign_sequence_entity_listing.rb +14 -14
  183. data/lib/purecloudplatformclientv2/models/certificate_authority_entity_listing.rb +14 -14
  184. data/lib/purecloudplatformclientv2/models/chat_conversation_entity_listing.rb +14 -14
  185. data/lib/purecloudplatformclientv2/models/cobrowse_conversation_entity_listing.rb +14 -14
  186. data/lib/purecloudplatformclientv2/models/command_status_entity_listing.rb +14 -14
  187. data/lib/purecloudplatformclientv2/models/consumed_resources_entity_listing.rb +14 -14
  188. data/lib/purecloudplatformclientv2/models/consuming_resources_entity_listing.rb +14 -14
  189. data/lib/purecloudplatformclientv2/models/contact_list_entity_listing.rb +14 -14
  190. data/lib/purecloudplatformclientv2/models/contact_list_filter_entity_listing.rb +14 -14
  191. data/lib/purecloudplatformclientv2/models/contact_listing.rb +14 -14
  192. data/lib/purecloudplatformclientv2/models/conversation_association.rb +2 -2
  193. data/lib/purecloudplatformclientv2/models/conversation_entity_listing.rb +14 -14
  194. data/lib/purecloudplatformclientv2/models/conversation_notification_email.rb +40 -1
  195. data/lib/purecloudplatformclientv2/models/conversation_notification_emails.rb +40 -1
  196. data/lib/purecloudplatformclientv2/models/conversation_notification_message.rb +581 -0
  197. data/lib/purecloudplatformclientv2/models/conversation_notification_message_details.rb +226 -0
  198. data/lib/purecloudplatformclientv2/models/conversation_notification_messages.rb +226 -0
  199. data/lib/purecloudplatformclientv2/models/conversation_notification_messages_1.rb +581 -0
  200. data/lib/purecloudplatformclientv2/models/conversation_notification_participant.rb +30 -3
  201. data/lib/purecloudplatformclientv2/models/conversation_notification_participants.rb +30 -3
  202. data/lib/purecloudplatformclientv2/models/dependency_object_entity_listing.rb +14 -14
  203. data/lib/purecloudplatformclientv2/models/dependency_type_entity_listing.rb +14 -14
  204. data/lib/purecloudplatformclientv2/models/dialer_event_entity_listing.rb +14 -14
  205. data/lib/purecloudplatformclientv2/models/did_entity_listing.rb +14 -14
  206. data/lib/purecloudplatformclientv2/models/did_pool_entity_listing.rb +14 -14
  207. data/lib/purecloudplatformclientv2/models/directory_user_devices_listing.rb +14 -14
  208. data/lib/purecloudplatformclientv2/models/dnc_list_entity_listing.rb +14 -14
  209. data/lib/purecloudplatformclientv2/models/document_audit_entity_listing.rb +14 -14
  210. data/lib/purecloudplatformclientv2/models/document_entity_listing.rb +14 -14
  211. data/lib/purecloudplatformclientv2/models/domain_edge_software_version_dto_entity_listing.rb +14 -14
  212. data/lib/purecloudplatformclientv2/models/domain_entity_listing.rb +14 -14
  213. data/lib/purecloudplatformclientv2/models/domain_entity_listing_evaluation_form.rb +14 -14
  214. data/lib/purecloudplatformclientv2/models/domain_entity_listing_query_result.rb +14 -14
  215. data/lib/purecloudplatformclientv2/models/domain_organization_role.rb +12 -12
  216. data/lib/purecloudplatformclientv2/models/domain_organization_role_create.rb +12 -12
  217. data/lib/purecloudplatformclientv2/models/domain_organization_role_update.rb +12 -12
  218. data/lib/purecloudplatformclientv2/models/edge_entity_listing.rb +14 -14
  219. data/lib/purecloudplatformclientv2/models/edge_group_entity_listing.rb +14 -14
  220. data/lib/purecloudplatformclientv2/models/edge_line_entity_listing.rb +14 -14
  221. data/lib/purecloudplatformclientv2/models/email_conversation_entity_listing.rb +14 -14
  222. data/lib/purecloudplatformclientv2/models/email_message_listing.rb +14 -14
  223. data/lib/purecloudplatformclientv2/models/encryption_key_entity_listing.rb +14 -14
  224. data/lib/purecloudplatformclientv2/models/endpoint_entity_listing.rb +14 -14
  225. data/lib/purecloudplatformclientv2/models/evaluation_entity_listing.rb +14 -14
  226. data/lib/purecloudplatformclientv2/models/evaluation_form_entity_listing.rb +14 -14
  227. data/lib/purecloudplatformclientv2/models/evaluator_activity_entity_listing.rb +14 -14
  228. data/lib/purecloudplatformclientv2/models/extension_entity_listing.rb +14 -14
  229. data/lib/purecloudplatformclientv2/models/extension_pool_entity_listing.rb +14 -14
  230. data/lib/purecloudplatformclientv2/models/external_organization_listing.rb +14 -14
  231. data/lib/purecloudplatformclientv2/models/fax_document_entity_listing.rb +14 -14
  232. data/lib/purecloudplatformclientv2/models/flow_entity_listing.rb +14 -14
  233. data/lib/purecloudplatformclientv2/models/flow_version_entity_listing.rb +14 -14
  234. data/lib/purecloudplatformclientv2/models/greeting_listing.rb +14 -14
  235. data/lib/purecloudplatformclientv2/models/group_entity_listing.rb +14 -14
  236. data/lib/purecloudplatformclientv2/models/inbound_domain_entity_listing.rb +14 -14
  237. data/lib/purecloudplatformclientv2/models/inbound_route_entity_listing.rb +14 -14
  238. data/lib/purecloudplatformclientv2/models/interaction_stats_alert_container.rb +14 -14
  239. data/lib/purecloudplatformclientv2/models/interaction_stats_rule_container.rb +14 -14
  240. data/lib/purecloudplatformclientv2/models/ivr_entity_listing.rb +14 -14
  241. data/lib/purecloudplatformclientv2/models/json_node.rb +50 -50
  242. data/lib/purecloudplatformclientv2/models/keyword_set_entity_listing.rb +14 -14
  243. data/lib/purecloudplatformclientv2/models/language_entity_listing.rb +14 -14
  244. data/lib/purecloudplatformclientv2/models/library_entity_listing.rb +14 -14
  245. data/lib/purecloudplatformclientv2/models/line_base_entity_listing.rb +14 -14
  246. data/lib/purecloudplatformclientv2/models/line_entity_listing.rb +14 -14
  247. data/lib/purecloudplatformclientv2/models/location_entity_listing.rb +14 -14
  248. data/lib/purecloudplatformclientv2/models/logical_interface_entity_listing.rb +14 -14
  249. data/lib/purecloudplatformclientv2/models/management_unit_listing.rb +14 -14
  250. data/lib/purecloudplatformclientv2/models/message.rb +663 -0
  251. data/lib/purecloudplatformclientv2/models/message_conversation_notification.rb +280 -0
  252. data/lib/purecloudplatformclientv2/models/message_conversation_notification_detail.rb +276 -0
  253. data/lib/purecloudplatformclientv2/models/message_conversation_notification_error_body.rb +432 -0
  254. data/lib/purecloudplatformclientv2/models/message_conversation_notification_error_info.rb +432 -0
  255. data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_details.rb +226 -0
  256. data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_media_participant.rb +922 -0
  257. data/lib/purecloudplatformclientv2/models/message_conversation_notification_messages.rb +226 -0
  258. data/lib/purecloudplatformclientv2/models/message_conversation_notification_participants.rb +922 -0
  259. data/lib/purecloudplatformclientv2/models/message_conversation_notification_uri_reference.rb +226 -0
  260. data/lib/purecloudplatformclientv2/models/message_conversation_notification_wrapup.rb +328 -0
  261. data/lib/purecloudplatformclientv2/models/message_details.rb +254 -0
  262. data/lib/purecloudplatformclientv2/models/note_listing.rb +14 -14
  263. data/lib/purecloudplatformclientv2/models/o_auth_client_entity_listing.rb +14 -14
  264. data/lib/purecloudplatformclientv2/models/o_auth_provider_entity_listing.rb +14 -14
  265. data/lib/purecloudplatformclientv2/models/organization_presence_entity_listing.rb +14 -14
  266. data/lib/purecloudplatformclientv2/models/organization_role_entity_listing.rb +14 -14
  267. data/lib/purecloudplatformclientv2/models/orphan_recording_listing.rb +14 -14
  268. data/lib/purecloudplatformclientv2/models/outbound_route_base_entity_listing.rb +14 -14
  269. data/lib/purecloudplatformclientv2/models/outbound_route_entity_listing.rb +14 -14
  270. data/lib/purecloudplatformclientv2/models/participant.rb +28 -1
  271. data/lib/purecloudplatformclientv2/models/participant_basic.rb +28 -1
  272. data/lib/purecloudplatformclientv2/models/permission_collection_entity_listing.rb +14 -14
  273. data/lib/purecloudplatformclientv2/models/phone_base_entity_listing.rb +14 -14
  274. data/lib/purecloudplatformclientv2/models/phone_entity_listing.rb +14 -14
  275. data/lib/purecloudplatformclientv2/models/phone_meta_base_entity_listing.rb +14 -14
  276. data/lib/purecloudplatformclientv2/models/physical_interface_entity_listing.rb +14 -14
  277. data/lib/purecloudplatformclientv2/models/policy_entity_listing.rb +14 -14
  278. data/lib/purecloudplatformclientv2/models/prompt_asset_entity_listing.rb +14 -14
  279. data/lib/purecloudplatformclientv2/models/prompt_entity_listing.rb +14 -14
  280. data/lib/purecloudplatformclientv2/models/quality_audit_page.rb +14 -14
  281. data/lib/purecloudplatformclientv2/models/queue_entity_listing.rb +14 -14
  282. data/lib/purecloudplatformclientv2/models/queue_member_entity_listing.rb +14 -14
  283. data/lib/purecloudplatformclientv2/models/relationship_listing.rb +14 -14
  284. data/lib/purecloudplatformclientv2/models/report_meta_data_entity_listing.rb +14 -14
  285. data/lib/purecloudplatformclientv2/models/report_run_entry_entity_domain_listing.rb +14 -14
  286. data/lib/purecloudplatformclientv2/models/report_schedule_entity_listing.rb +14 -14
  287. data/lib/purecloudplatformclientv2/models/response_entity_list.rb +14 -14
  288. data/lib/purecloudplatformclientv2/models/response_entity_listing.rb +14 -14
  289. data/lib/purecloudplatformclientv2/models/response_set_entity_listing.rb +14 -14
  290. data/lib/purecloudplatformclientv2/models/rule_set_entity_listing.rb +14 -14
  291. data/lib/purecloudplatformclientv2/models/schedule_entity_listing.rb +14 -14
  292. data/lib/purecloudplatformclientv2/models/schedule_group_entity_listing.rb +14 -14
  293. data/lib/purecloudplatformclientv2/models/schema_category_entity_listing.rb +14 -14
  294. data/lib/purecloudplatformclientv2/models/schema_reference_entity_listing.rb +14 -14
  295. data/lib/purecloudplatformclientv2/models/screen_recording_session_listing.rb +14 -14
  296. data/lib/purecloudplatformclientv2/models/script_entity_listing.rb +14 -14
  297. data/lib/purecloudplatformclientv2/models/security_profile_entity_listing.rb +14 -14
  298. data/lib/purecloudplatformclientv2/models/share_entity_listing.rb +14 -14
  299. data/lib/purecloudplatformclientv2/models/site_entity_listing.rb +14 -14
  300. data/lib/purecloudplatformclientv2/models/skill_entity_listing.rb +14 -14
  301. data/lib/purecloudplatformclientv2/models/station_entity_listing.rb +14 -14
  302. data/lib/purecloudplatformclientv2/models/system_prompt_asset_entity_listing.rb +14 -14
  303. data/lib/purecloudplatformclientv2/models/system_prompt_entity_listing.rb +14 -14
  304. data/lib/purecloudplatformclientv2/models/tag_value_entity_listing.rb +14 -14
  305. data/lib/purecloudplatformclientv2/models/time_zone_entity_listing.rb +14 -14
  306. data/lib/purecloudplatformclientv2/models/trunk_base_entity_listing.rb +14 -14
  307. data/lib/purecloudplatformclientv2/models/trunk_entity_listing.rb +14 -14
  308. data/lib/purecloudplatformclientv2/models/trunk_metabase_entity_listing.rb +14 -14
  309. data/lib/purecloudplatformclientv2/models/trust_entity_listing.rb +14 -14
  310. data/lib/purecloudplatformclientv2/models/trust_user_entity_listing.rb +14 -14
  311. data/lib/purecloudplatformclientv2/models/trustor_entity_listing.rb +14 -14
  312. data/lib/purecloudplatformclientv2/models/user_entity_listing.rb +14 -14
  313. data/lib/purecloudplatformclientv2/models/user_queue_entity_listing.rb +14 -14
  314. data/lib/purecloudplatformclientv2/models/user_recording_entity_listing.rb +14 -14
  315. data/lib/purecloudplatformclientv2/models/user_skill_entity_listing.rb +14 -14
  316. data/lib/purecloudplatformclientv2/models/voicemail_message_entity_listing.rb +14 -14
  317. data/lib/purecloudplatformclientv2/models/workspace_entity_listing.rb +14 -14
  318. data/lib/purecloudplatformclientv2/models/workspace_member_entity_listing.rb +14 -14
  319. data/lib/purecloudplatformclientv2/models/wrapup_code_entity_listing.rb +14 -14
  320. data/lib/purecloudplatformclientv2/version.rb +1 -1
  321. metadata +34 -2
@@ -149,7 +149,7 @@ module PureCloud
149
149
 
150
150
 
151
151
 
152
- allowed_values = ["CALL", "CALLBACK", "CHAT", "COBROWSE", "EMAIL", "SOCIAL_EXPRESSION", "VIDEO", "SCREENSHARE"]
152
+ allowed_values = ["CALL", "CALLBACK", "CHAT", "COBROWSE", "EMAIL", "MESSAGE", "SOCIAL_EXPRESSION", "VIDEO", "SCREENSHARE"]
153
153
  if @media_type && !allowed_values.include?(@media_type)
154
154
  return false
155
155
  end
@@ -178,7 +178,7 @@ module PureCloud
178
178
  # Custom attribute writer method checking allowed values (enum).
179
179
  # @param [Object] media_type Object to be assigned
180
180
  def media_type=(media_type)
181
- allowed_values = ["CALL", "CALLBACK", "CHAT", "COBROWSE", "EMAIL", "SOCIAL_EXPRESSION", "VIDEO", "SCREENSHARE"]
181
+ allowed_values = ["CALL", "CALLBACK", "CHAT", "COBROWSE", "EMAIL", "MESSAGE", "SOCIAL_EXPRESSION", "VIDEO", "SCREENSHARE"]
182
182
  if media_type && !allowed_values.include?(media_type)
183
183
  fail ArgumentError, "invalid value for 'media_type', must be one of #{allowed_values}."
184
184
  end
@@ -30,12 +30,12 @@ module PureCloud
30
30
 
31
31
  attr_accessor :first_uri
32
32
 
33
- attr_accessor :last_uri
34
-
35
33
  attr_accessor :previous_uri
36
34
 
37
35
  attr_accessor :next_uri
38
36
 
37
+ attr_accessor :last_uri
38
+
39
39
  attr_accessor :page_count
40
40
 
41
41
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -54,12 +54,12 @@ module PureCloud
54
54
 
55
55
  :'first_uri' => :'firstUri',
56
56
 
57
- :'last_uri' => :'lastUri',
58
-
59
57
  :'previous_uri' => :'previousUri',
60
58
 
61
59
  :'next_uri' => :'nextUri',
62
60
 
61
+ :'last_uri' => :'lastUri',
62
+
63
63
  :'page_count' => :'pageCount'
64
64
 
65
65
  }
@@ -81,12 +81,12 @@ module PureCloud
81
81
 
82
82
  :'first_uri' => :'String',
83
83
 
84
- :'last_uri' => :'String',
85
-
86
84
  :'previous_uri' => :'String',
87
85
 
88
86
  :'next_uri' => :'String',
89
87
 
88
+ :'last_uri' => :'String',
89
+
90
90
  :'page_count' => :'Integer'
91
91
 
92
92
  }
@@ -157,28 +157,28 @@ module PureCloud
157
157
  end
158
158
 
159
159
 
160
- if attributes.has_key?(:'lastUri')
160
+ if attributes.has_key?(:'previousUri')
161
161
 
162
162
 
163
- self.last_uri = attributes[:'lastUri']
163
+ self.previous_uri = attributes[:'previousUri']
164
164
 
165
165
 
166
166
  end
167
167
 
168
168
 
169
- if attributes.has_key?(:'previousUri')
169
+ if attributes.has_key?(:'nextUri')
170
170
 
171
171
 
172
- self.previous_uri = attributes[:'previousUri']
172
+ self.next_uri = attributes[:'nextUri']
173
173
 
174
174
 
175
175
  end
176
176
 
177
177
 
178
- if attributes.has_key?(:'nextUri')
178
+ if attributes.has_key?(:'lastUri')
179
179
 
180
180
 
181
- self.next_uri = attributes[:'nextUri']
181
+ self.last_uri = attributes[:'lastUri']
182
182
 
183
183
 
184
184
  end
@@ -312,9 +312,9 @@ module PureCloud
312
312
  total == o.total &&
313
313
  self_uri == o.self_uri &&
314
314
  first_uri == o.first_uri &&
315
- last_uri == o.last_uri &&
316
315
  previous_uri == o.previous_uri &&
317
316
  next_uri == o.next_uri &&
317
+ last_uri == o.last_uri &&
318
318
  page_count == o.page_count
319
319
  end
320
320
 
@@ -327,7 +327,7 @@ module PureCloud
327
327
  # Calculates hash code according to all attributes.
328
328
  # @return [Fixnum] Hash code
329
329
  def hash
330
- [entities, page_size, page_number, total, self_uri, first_uri, last_uri, previous_uri, next_uri, page_count].hash
330
+ [entities, page_size, page_number, total, self_uri, first_uri, previous_uri, next_uri, last_uri, page_count].hash
331
331
  end
332
332
 
333
333
  # build the object from hash
@@ -48,6 +48,8 @@ module PureCloud
48
48
 
49
49
  attr_accessor :message_id
50
50
 
51
+ attr_accessor :direction
52
+
51
53
  attr_accessor :additional_properties
52
54
 
53
55
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -84,6 +86,8 @@ module PureCloud
84
86
 
85
87
  :'message_id' => :'messageId',
86
88
 
89
+ :'direction' => :'direction',
90
+
87
91
  :'additional_properties' => :'additionalProperties'
88
92
 
89
93
  }
@@ -123,6 +127,8 @@ module PureCloud
123
127
 
124
128
  :'message_id' => :'String',
125
129
 
130
+ :'direction' => :'String',
131
+
126
132
  :'additional_properties' => :'Object'
127
133
 
128
134
  }
@@ -272,6 +278,15 @@ module PureCloud
272
278
  end
273
279
 
274
280
 
281
+ if attributes.has_key?(:'direction')
282
+
283
+
284
+ self.direction = attributes[:'direction']
285
+
286
+
287
+ end
288
+
289
+
275
290
  if attributes.has_key?(:'additionalProperties')
276
291
 
277
292
 
@@ -367,6 +382,15 @@ module PureCloud
367
382
 
368
383
 
369
384
 
385
+
386
+ allowed_values = ["OUTBOUND", "INBOUND"]
387
+ if @direction && !allowed_values.include?(@direction)
388
+ return false
389
+ end
390
+
391
+
392
+
393
+
370
394
 
371
395
 
372
396
 
@@ -463,6 +487,20 @@ module PureCloud
463
487
 
464
488
 
465
489
 
490
+
491
+
492
+
493
+
494
+ # Custom attribute writer method checking allowed values (enum).
495
+ # @param [Object] direction Object to be assigned
496
+ def direction=(direction)
497
+ allowed_values = ["OUTBOUND", "INBOUND"]
498
+ if direction && !allowed_values.include?(direction)
499
+ fail ArgumentError, "invalid value for 'direction', must be one of #{allowed_values}."
500
+ end
501
+ @direction = direction
502
+ end
503
+
466
504
 
467
505
 
468
506
 
@@ -491,6 +529,7 @@ module PureCloud
491
529
  connected_time == o.connected_time &&
492
530
  disconnected_time == o.disconnected_time &&
493
531
  message_id == o.message_id &&
532
+ direction == o.direction &&
494
533
  additional_properties == o.additional_properties
495
534
  end
496
535
 
@@ -503,7 +542,7 @@ module PureCloud
503
542
  # Calculates hash code according to all attributes.
504
543
  # @return [Fixnum] Hash code
505
544
  def hash
506
- [id, state, held, auto_generated, subject, provider, script_id, peer_id, messages_sent, error_info, disconnect_type, start_hold_time, connected_time, disconnected_time, message_id, additional_properties].hash
545
+ [id, state, held, auto_generated, subject, provider, script_id, peer_id, messages_sent, error_info, disconnect_type, start_hold_time, connected_time, disconnected_time, message_id, direction, additional_properties].hash
507
546
  end
508
547
 
509
548
  # build the object from hash
@@ -48,6 +48,8 @@ module PureCloud
48
48
 
49
49
  attr_accessor :message_id
50
50
 
51
+ attr_accessor :direction
52
+
51
53
  attr_accessor :additional_properties
52
54
 
53
55
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -84,6 +86,8 @@ module PureCloud
84
86
 
85
87
  :'message_id' => :'messageId',
86
88
 
89
+ :'direction' => :'direction',
90
+
87
91
  :'additional_properties' => :'additionalProperties'
88
92
 
89
93
  }
@@ -123,6 +127,8 @@ module PureCloud
123
127
 
124
128
  :'message_id' => :'String',
125
129
 
130
+ :'direction' => :'String',
131
+
126
132
  :'additional_properties' => :'Object'
127
133
 
128
134
  }
@@ -272,6 +278,15 @@ module PureCloud
272
278
  end
273
279
 
274
280
 
281
+ if attributes.has_key?(:'direction')
282
+
283
+
284
+ self.direction = attributes[:'direction']
285
+
286
+
287
+ end
288
+
289
+
275
290
  if attributes.has_key?(:'additionalProperties')
276
291
 
277
292
 
@@ -367,6 +382,15 @@ module PureCloud
367
382
 
368
383
 
369
384
 
385
+
386
+ allowed_values = ["OUTBOUND", "INBOUND"]
387
+ if @direction && !allowed_values.include?(@direction)
388
+ return false
389
+ end
390
+
391
+
392
+
393
+
370
394
 
371
395
 
372
396
 
@@ -463,6 +487,20 @@ module PureCloud
463
487
 
464
488
 
465
489
 
490
+
491
+
492
+
493
+
494
+ # Custom attribute writer method checking allowed values (enum).
495
+ # @param [Object] direction Object to be assigned
496
+ def direction=(direction)
497
+ allowed_values = ["OUTBOUND", "INBOUND"]
498
+ if direction && !allowed_values.include?(direction)
499
+ fail ArgumentError, "invalid value for 'direction', must be one of #{allowed_values}."
500
+ end
501
+ @direction = direction
502
+ end
503
+
466
504
 
467
505
 
468
506
 
@@ -491,6 +529,7 @@ module PureCloud
491
529
  connected_time == o.connected_time &&
492
530
  disconnected_time == o.disconnected_time &&
493
531
  message_id == o.message_id &&
532
+ direction == o.direction &&
494
533
  additional_properties == o.additional_properties
495
534
  end
496
535
 
@@ -503,7 +542,7 @@ module PureCloud
503
542
  # Calculates hash code according to all attributes.
504
543
  # @return [Fixnum] Hash code
505
544
  def hash
506
- [id, state, held, auto_generated, subject, provider, script_id, peer_id, messages_sent, error_info, disconnect_type, start_hold_time, connected_time, disconnected_time, message_id, additional_properties].hash
545
+ [id, state, held, auto_generated, subject, provider, script_id, peer_id, messages_sent, error_info, disconnect_type, start_hold_time, connected_time, disconnected_time, message_id, direction, additional_properties].hash
507
546
  end
508
547
 
509
548
  # build the object from hash
@@ -0,0 +1,581 @@
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 ConversationNotificationMessage
21
+ attr_accessor :id
22
+
23
+ attr_accessor :state
24
+
25
+ attr_accessor :held
26
+
27
+ attr_accessor :provider
28
+
29
+ attr_accessor :script_id
30
+
31
+ attr_accessor :peer_id
32
+
33
+ attr_accessor :disconnect_type
34
+
35
+ attr_accessor :start_hold_time
36
+
37
+ attr_accessor :connected_time
38
+
39
+ attr_accessor :disconnected_time
40
+
41
+ attr_accessor :to_address
42
+
43
+ attr_accessor :from_address
44
+
45
+ attr_accessor :messages
46
+
47
+ attr_accessor :messages_transcript_uri
48
+
49
+ attr_accessor :additional_properties
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+
55
+ :'id' => :'id',
56
+
57
+ :'state' => :'state',
58
+
59
+ :'held' => :'held',
60
+
61
+ :'provider' => :'provider',
62
+
63
+ :'script_id' => :'scriptId',
64
+
65
+ :'peer_id' => :'peerId',
66
+
67
+ :'disconnect_type' => :'disconnectType',
68
+
69
+ :'start_hold_time' => :'startHoldTime',
70
+
71
+ :'connected_time' => :'connectedTime',
72
+
73
+ :'disconnected_time' => :'disconnectedTime',
74
+
75
+ :'to_address' => :'toAddress',
76
+
77
+ :'from_address' => :'fromAddress',
78
+
79
+ :'messages' => :'messages',
80
+
81
+ :'messages_transcript_uri' => :'messagesTranscriptUri',
82
+
83
+ :'additional_properties' => :'additionalProperties'
84
+
85
+ }
86
+ end
87
+
88
+ # Attribute type mapping.
89
+ def self.swagger_types
90
+ {
91
+
92
+ :'id' => :'String',
93
+
94
+ :'state' => :'String',
95
+
96
+ :'held' => :'BOOLEAN',
97
+
98
+ :'provider' => :'String',
99
+
100
+ :'script_id' => :'String',
101
+
102
+ :'peer_id' => :'String',
103
+
104
+ :'disconnect_type' => :'String',
105
+
106
+ :'start_hold_time' => :'DateTime',
107
+
108
+ :'connected_time' => :'DateTime',
109
+
110
+ :'disconnected_time' => :'DateTime',
111
+
112
+ :'to_address' => :'ConversationNotificationAddress',
113
+
114
+ :'from_address' => :'ConversationNotificationAddress',
115
+
116
+ :'messages' => :'Array<ConversationNotificationMessages>',
117
+
118
+ :'messages_transcript_uri' => :'String',
119
+
120
+ :'additional_properties' => :'Object'
121
+
122
+ }
123
+ end
124
+
125
+ # Initializes the object
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ def initialize(attributes = {})
128
+ return unless attributes.is_a?(Hash)
129
+
130
+ # convert string to symbol for hash key
131
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
132
+
133
+
134
+ if attributes.has_key?(:'id')
135
+
136
+
137
+ self.id = attributes[:'id']
138
+
139
+
140
+ end
141
+
142
+
143
+ if attributes.has_key?(:'state')
144
+
145
+
146
+ self.state = attributes[:'state']
147
+
148
+
149
+ end
150
+
151
+
152
+ if attributes.has_key?(:'held')
153
+
154
+
155
+ self.held = attributes[:'held']
156
+
157
+
158
+ end
159
+
160
+
161
+ if attributes.has_key?(:'provider')
162
+
163
+
164
+ self.provider = attributes[:'provider']
165
+
166
+
167
+ end
168
+
169
+
170
+ if attributes.has_key?(:'scriptId')
171
+
172
+
173
+ self.script_id = attributes[:'scriptId']
174
+
175
+
176
+ end
177
+
178
+
179
+ if attributes.has_key?(:'peerId')
180
+
181
+
182
+ self.peer_id = attributes[:'peerId']
183
+
184
+
185
+ end
186
+
187
+
188
+ if attributes.has_key?(:'disconnectType')
189
+
190
+
191
+ self.disconnect_type = attributes[:'disconnectType']
192
+
193
+
194
+ end
195
+
196
+
197
+ if attributes.has_key?(:'startHoldTime')
198
+
199
+
200
+ self.start_hold_time = attributes[:'startHoldTime']
201
+
202
+
203
+ end
204
+
205
+
206
+ if attributes.has_key?(:'connectedTime')
207
+
208
+
209
+ self.connected_time = attributes[:'connectedTime']
210
+
211
+
212
+ end
213
+
214
+
215
+ if attributes.has_key?(:'disconnectedTime')
216
+
217
+
218
+ self.disconnected_time = attributes[:'disconnectedTime']
219
+
220
+
221
+ end
222
+
223
+
224
+ if attributes.has_key?(:'toAddress')
225
+
226
+
227
+ self.to_address = attributes[:'toAddress']
228
+
229
+
230
+ end
231
+
232
+
233
+ if attributes.has_key?(:'fromAddress')
234
+
235
+
236
+ self.from_address = attributes[:'fromAddress']
237
+
238
+
239
+ end
240
+
241
+
242
+ if attributes.has_key?(:'messages')
243
+
244
+ if (value = attributes[:'messages']).is_a?(Array)
245
+ self.messages = value
246
+ end
247
+
248
+
249
+
250
+ end
251
+
252
+
253
+ if attributes.has_key?(:'messagesTranscriptUri')
254
+
255
+
256
+ self.messages_transcript_uri = attributes[:'messagesTranscriptUri']
257
+
258
+
259
+ end
260
+
261
+
262
+ if attributes.has_key?(:'additionalProperties')
263
+
264
+
265
+ self.additional_properties = attributes[:'additionalProperties']
266
+
267
+
268
+ end
269
+
270
+
271
+ end
272
+
273
+ # Show invalid properties with the reasons. Usually used together with valid?
274
+ # @return Array for valid properies with the reasons
275
+ def list_invalid_properties
276
+ invalid_properties = Array.new
277
+
278
+
279
+ return invalid_properties
280
+ end
281
+
282
+ # Check to see if the all the properties in the model are valid
283
+ # @return true if the model is valid
284
+ def valid?
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+ allowed_values = ["ALERTING", "CONNECTED", "DISCONNECTED"]
293
+ if @state && !allowed_values.include?(@state)
294
+ return false
295
+ end
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+ allowed_values = ["ENDPOINT", "CLIENT", "SYSTEM", "TIMEOUT", "TRANSFER", "TRANSFER_CONFERENCE", "TRANSFER_CONSULT", "TRANSFER_FORWARD", "TRANSFER_NOANSWER", "TRANSFER_NOTAVAILABLE", "TRANSPORT_FAILURE", "ERROR", "PEER", "OTHER", "SPAM", "UNCALLABLE"]
318
+ if @disconnect_type && !allowed_values.include?(@disconnect_type)
319
+ return false
320
+ end
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
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+ end
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+ # Custom attribute writer method checking allowed values (enum).
366
+ # @param [Object] state Object to be assigned
367
+ def state=(state)
368
+ allowed_values = ["ALERTING", "CONNECTED", "DISCONNECTED"]
369
+ if state && !allowed_values.include?(state)
370
+ fail ArgumentError, "invalid value for 'state', must be one of #{allowed_values}."
371
+ end
372
+ @state = state
373
+ end
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+ # Custom attribute writer method checking allowed values (enum).
400
+ # @param [Object] disconnect_type Object to be assigned
401
+ def disconnect_type=(disconnect_type)
402
+ allowed_values = ["ENDPOINT", "CLIENT", "SYSTEM", "TIMEOUT", "TRANSFER", "TRANSFER_CONFERENCE", "TRANSFER_CONSULT", "TRANSFER_FORWARD", "TRANSFER_NOANSWER", "TRANSFER_NOTAVAILABLE", "TRANSPORT_FAILURE", "ERROR", "PEER", "OTHER", "SPAM", "UNCALLABLE"]
403
+ if disconnect_type && !allowed_values.include?(disconnect_type)
404
+ fail ArgumentError, "invalid value for 'disconnect_type', must be one of #{allowed_values}."
405
+ end
406
+ @disconnect_type = disconnect_type
407
+ end
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
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+ # Checks equality by comparing each attribute.
453
+ # @param [Object] Object to be compared
454
+ def ==(o)
455
+ return true if self.equal?(o)
456
+ self.class == o.class &&
457
+ id == o.id &&
458
+ state == o.state &&
459
+ held == o.held &&
460
+ provider == o.provider &&
461
+ script_id == o.script_id &&
462
+ peer_id == o.peer_id &&
463
+ disconnect_type == o.disconnect_type &&
464
+ start_hold_time == o.start_hold_time &&
465
+ connected_time == o.connected_time &&
466
+ disconnected_time == o.disconnected_time &&
467
+ to_address == o.to_address &&
468
+ from_address == o.from_address &&
469
+ messages == o.messages &&
470
+ messages_transcript_uri == o.messages_transcript_uri &&
471
+ additional_properties == o.additional_properties
472
+ end
473
+
474
+ # @see the `==` method
475
+ # @param [Object] Object to be compared
476
+ def eql?(o)
477
+ self == o
478
+ end
479
+
480
+ # Calculates hash code according to all attributes.
481
+ # @return [Fixnum] Hash code
482
+ def hash
483
+ [id, state, held, provider, script_id, peer_id, disconnect_type, start_hold_time, connected_time, disconnected_time, to_address, from_address, messages, messages_transcript_uri, additional_properties].hash
484
+ end
485
+
486
+ # build the object from hash
487
+ def build_from_hash(attributes)
488
+ return nil unless attributes.is_a?(Hash)
489
+ self.class.swagger_types.each_pair do |key, type|
490
+ if type =~ /^Array<(.*)>/i
491
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
492
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
493
+ else
494
+ #TODO show warning in debug mode
495
+ end
496
+ elsif !attributes[self.class.attribute_map[key]].nil?
497
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
498
+ else
499
+ # data not found in attributes(hash), not an issue as the data can be optional
500
+ end
501
+ end
502
+
503
+ self
504
+ end
505
+
506
+ def _deserialize(type, value)
507
+ case type.to_sym
508
+ when :DateTime
509
+ DateTime.parse(value)
510
+ when :Date
511
+ Date.parse(value)
512
+ when :String
513
+ value.to_s
514
+ when :Integer
515
+ value.to_i
516
+ when :Float
517
+ value.to_f
518
+ when :BOOLEAN
519
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
520
+ true
521
+ else
522
+ false
523
+ end
524
+ when :Object
525
+ # generic object (usually a Hash), return directly
526
+ value
527
+ when /\AArray<(?<inner_type>.+)>\z/
528
+ inner_type = Regexp.last_match[:inner_type]
529
+ value.map { |v| _deserialize(inner_type, v) }
530
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
531
+ k_type = Regexp.last_match[:k_type]
532
+ v_type = Regexp.last_match[:v_type]
533
+ {}.tap do |hash|
534
+ value.each do |k, v|
535
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
536
+ end
537
+ end
538
+ else # model
539
+ _model = Object.const_get("PureCloud").const_get(type).new
540
+ _model.build_from_hash(value)
541
+ end
542
+ end
543
+
544
+ def to_s
545
+ to_hash.to_s
546
+ end
547
+
548
+ # to_body is an alias to to_body (backward compatibility))
549
+ def to_body
550
+ to_hash
551
+ end
552
+
553
+ # return the object in the form of hash
554
+ def to_hash
555
+ hash = {}
556
+ self.class.attribute_map.each_pair do |attr, param|
557
+ value = self.send(attr)
558
+ next if value.nil?
559
+ hash[param] = _to_hash(value)
560
+ end
561
+ hash
562
+ end
563
+
564
+ # Method to output non-array value in the form of hash
565
+ # For object, use to_hash. Otherwise, just return the value
566
+ def _to_hash(value)
567
+ if value.is_a?(Array)
568
+ value.compact.map{ |v| _to_hash(v) }
569
+ elsif value.is_a?(Hash)
570
+ {}.tap do |hash|
571
+ value.each { |k, v| hash[k] = _to_hash(v) }
572
+ end
573
+ elsif value.respond_to? :to_hash
574
+ value.to_hash
575
+ else
576
+ value
577
+ end
578
+ end
579
+
580
+ end
581
+ end