purecloud 0.28.0 → 0.29.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. checksums.yaml +4 -4
  2. data/config-ruby.json +1 -1
  3. data/lib/purecloud.rb +119 -110
  4. data/lib/purecloud/api/alerting_api.rb +609 -0
  5. data/lib/purecloud/api/analytics_api.rb +0 -618
  6. data/lib/purecloud/api/authorization_api.rb +32 -26
  7. data/lib/purecloud/api/callbacks_api.rb +5 -5
  8. data/lib/purecloud/api/calls_api.rb +5 -5
  9. data/lib/purecloud/api/chats_api.rb +5 -5
  10. data/lib/purecloud/api/configuration_api.rb +325 -4514
  11. data/lib/purecloud/api/conversations_api.rb +30 -157
  12. data/lib/purecloud/api/emails_api.rb +5 -5
  13. data/lib/purecloud/api/groups_api.rb +120 -0
  14. data/lib/purecloud/api/integrations_api.rb +6 -0
  15. data/lib/purecloud/api/integrations_workforce_management_api.rb +73 -0
  16. data/lib/purecloud/api/languages_api.rb +181 -0
  17. data/lib/purecloud/api/organization_api.rb +243 -0
  18. data/lib/purecloud/api/outbound_api.rb +13 -380
  19. data/lib/purecloud/api/presence_api.rb +20 -222
  20. data/lib/purecloud/api/quality_api.rb +30 -0
  21. data/lib/purecloud/api/recording_api.rb +12 -0
  22. data/lib/purecloud/api/routing_api.rb +211 -8
  23. data/lib/purecloud/api/scripts_api.rb +8 -2
  24. data/lib/purecloud/api/search_api.rb +315 -13
  25. data/lib/purecloud/api/socials_api.rb +5 -5
  26. data/lib/purecloud/api/telephony_providers_edge_api.rb +4594 -698
  27. data/lib/purecloud/api/users_api.rb +303 -44
  28. data/lib/purecloud/api/utilities_api.rb +0 -58
  29. data/lib/purecloud/api/videos_api.rb +5 -5
  30. data/lib/purecloud/models/address.rb +49 -51
  31. data/lib/purecloud/models/address_listing.rb +12 -12
  32. data/lib/purecloud/models/agent_activity_entity_listing.rb +11 -11
  33. data/lib/purecloud/models/{analytics_segment.rb → analytics_conversation_segment.rb} +8 -8
  34. data/lib/purecloud/models/analytics_query_predicate.rb +1 -1
  35. data/lib/purecloud/models/analytics_session.rb +1 -1
  36. data/lib/purecloud/models/attribute_entity_listing.rb +11 -11
  37. data/lib/purecloud/models/{primary_user_presence_source.rb → audit_entity.rb} +12 -24
  38. data/lib/purecloud/models/{facet.rb → audit_facet.rb} +1 -1
  39. data/lib/purecloud/models/audit_filter.rb +178 -0
  40. data/lib/purecloud/models/audit_message.rb +2 -2
  41. data/lib/purecloud/models/{facet_group.rb → audit_user.rb} +18 -20
  42. data/lib/purecloud/models/automate_queue_member_entity_listing.rb +11 -11
  43. data/lib/purecloud/models/available_additional_service_listing.rb +11 -11
  44. data/lib/purecloud/models/available_topic_entity_listing.rb +11 -11
  45. data/lib/purecloud/models/{chat_search_item.rb → billing_address.rb} +37 -27
  46. data/lib/purecloud/models/calibration_entity_listing.rb +11 -11
  47. data/lib/purecloud/models/call.rb +16 -4
  48. data/lib/purecloud/models/call_conversation.rb +1 -1
  49. data/lib/purecloud/models/{chat_search_listing.rb → call_conversation_entity_listing.rb} +13 -13
  50. data/lib/purecloud/models/{call_participant.rb → call_media_participant.rb} +1 -1
  51. data/lib/purecloud/models/callable_time.rb +1 -1
  52. data/lib/purecloud/models/callable_time_set_entity_listing.rb +11 -11
  53. data/lib/purecloud/models/callback_conversation.rb +1 -1
  54. data/lib/purecloud/models/callback_conversation_entity_listing.rb +238 -0
  55. data/lib/purecloud/models/{callback_participant.rb → callback_media_participant.rb} +1 -1
  56. data/lib/purecloud/models/campaign.rb +219 -17
  57. data/lib/purecloud/models/campaign_entity_listing.rb +11 -11
  58. data/lib/purecloud/models/campaign_sequence_entity_listing.rb +11 -11
  59. data/lib/purecloud/models/{facet_item.rb → campaign_time_slot.rb} +20 -20
  60. data/lib/purecloud/models/carrier_entity_listing.rb +11 -11
  61. data/lib/purecloud/models/certificate_authority_entity_listing.rb +11 -11
  62. data/lib/purecloud/models/change.rb +1 -1
  63. data/lib/purecloud/models/channel_entity_listing.rb +11 -11
  64. data/lib/purecloud/models/channel_topic_entity_listing.rb +11 -11
  65. data/lib/purecloud/models/chat_conversation.rb +1 -1
  66. data/lib/purecloud/models/{rule_entity_listing.rb → chat_conversation_entity_listing.rb} +13 -13
  67. data/lib/purecloud/models/{chat_participant.rb → chat_media_participant.rb} +1 -1
  68. data/lib/purecloud/models/command_status_entity_listing.rb +11 -11
  69. data/lib/purecloud/models/common_audit_request.rb +2 -2
  70. data/lib/purecloud/models/{template.rb → composer_template.rb} +2 -2
  71. data/lib/purecloud/models/consumed_resources_entity_listing.rb +11 -11
  72. data/lib/purecloud/models/consuming_resources_entity_listing.rb +11 -11
  73. data/lib/purecloud/models/{client_transform_model.rb → contact_address.rb} +42 -36
  74. data/lib/purecloud/models/contact_list.rb +111 -1
  75. data/lib/purecloud/models/contact_list_entity_listing.rb +11 -11
  76. data/lib/purecloud/models/contact_listing.rb +11 -11
  77. data/lib/purecloud/models/{dialer_disposition_call_command.rb → contact_phone_number_column.rb} +20 -20
  78. data/lib/purecloud/models/{facet_filter_item.rb → content_filter_item.rb} +1 -1
  79. data/lib/purecloud/models/{transform_progress.rb → conversation_chat.rb} +91 -82
  80. data/lib/purecloud/models/conversation_entity_listing.rb +11 -11
  81. data/lib/purecloud/models/create_share_request.rb +2 -2
  82. data/lib/purecloud/models/create_share_request_member.rb +1 -1
  83. data/lib/purecloud/models/customer_account.rb +1 -1
  84. data/lib/purecloud/models/deleted_resource_consumer_entity_listing.rb +11 -11
  85. data/lib/purecloud/models/dependency_object_entity_listing.rb +11 -11
  86. data/lib/purecloud/models/dependency_type_entity_listing.rb +11 -11
  87. data/lib/purecloud/models/{action.rb → dialer_action.rb} +1 -1
  88. data/lib/purecloud/models/dialer_audit_request.rb +2 -2
  89. data/lib/purecloud/models/{transform_model.rb → dialer_contact.rb} +42 -28
  90. data/lib/purecloud/models/{rule.rb → dialer_rule.rb} +2 -2
  91. data/lib/purecloud/models/did.rb +1 -1
  92. data/lib/purecloud/models/did_entity_listing.rb +11 -11
  93. data/lib/purecloud/models/did_pool.rb +1 -1
  94. data/lib/purecloud/models/did_pool_entity_listing.rb +11 -11
  95. data/lib/purecloud/models/{metric_threshold.rb → disconnect_reason.rb} +29 -19
  96. data/lib/purecloud/models/dnc_list_entity_listing.rb +11 -11
  97. data/lib/purecloud/models/document_audit_entity_listing.rb +11 -11
  98. data/lib/purecloud/models/document_entity_listing.rb +11 -11
  99. data/lib/purecloud/models/domain_billing_period_entity_listing.rb +11 -11
  100. data/lib/purecloud/models/domain_certificate_authority.rb +1 -1
  101. data/lib/purecloud/models/domain_entity_listing.rb +11 -11
  102. data/lib/purecloud/models/domain_entity_listing_evaluation_form.rb +11 -11
  103. data/lib/purecloud/models/domain_entity_listing_query_result.rb +11 -11
  104. data/lib/purecloud/models/domain_invoice_entity_listing.rb +11 -11
  105. data/lib/purecloud/models/domain_logical_interface.rb +28 -2
  106. data/lib/purecloud/models/{dialer_place_call_command.rb → domain_role.rb} +16 -14
  107. data/lib/purecloud/models/domain_third_party_account_entity_listing.rb +11 -11
  108. data/lib/purecloud/models/domain_third_party_subscription_entity_listing.rb +11 -11
  109. data/lib/purecloud/models/domain_voice_rate_extended_response_item_entity_listing.rb +11 -11
  110. data/lib/purecloud/models/domain_voice_rate_international_response_item_entity_listing.rb +11 -11
  111. data/lib/purecloud/models/domain_voice_rate_response_item_entity_listing.rb +11 -11
  112. data/lib/purecloud/models/edge.rb +1 -1
  113. data/lib/purecloud/models/edge_entity_listing.rb +11 -11
  114. data/lib/purecloud/models/edge_group.rb +1 -1
  115. data/lib/purecloud/models/edge_group_entity_listing.rb +11 -11
  116. data/lib/purecloud/models/edge_line.rb +1 -1
  117. data/lib/purecloud/models/edge_line_entity_listing.rb +11 -11
  118. data/lib/purecloud/models/email_conversation.rb +1 -1
  119. data/lib/purecloud/models/{user_presence_entity_listing.rb → email_conversation_entity_listing.rb} +13 -13
  120. data/lib/purecloud/models/{email_participant.rb → email_media_participant.rb} +1 -1
  121. data/lib/purecloud/models/email_message.rb +56 -26
  122. data/lib/purecloud/models/email_message_listing.rb +11 -11
  123. data/lib/purecloud/models/encryption_key_entity_listing.rb +11 -11
  124. data/lib/purecloud/models/endpoint.rb +2 -2
  125. data/lib/purecloud/models/endpoint_entity_listing.rb +11 -11
  126. data/lib/purecloud/models/entity.rb +20 -10
  127. data/lib/purecloud/models/evaluation_entity_listing.rb +11 -11
  128. data/lib/purecloud/models/evaluation_form_entity_listing.rb +11 -11
  129. data/lib/purecloud/models/evaluator_activity_entity_listing.rb +11 -11
  130. data/lib/purecloud/models/extension.rb +1 -1
  131. data/lib/purecloud/models/extension_entity_listing.rb +11 -11
  132. data/lib/purecloud/models/extension_pool.rb +1 -1
  133. data/lib/purecloud/models/extension_pool_entity_listing.rb +11 -11
  134. data/lib/purecloud/models/external_contact.rb +1 -1
  135. data/lib/purecloud/models/external_organization.rb +1 -1
  136. data/lib/purecloud/models/external_organization_listing.rb +11 -11
  137. data/lib/purecloud/models/fax_document_entity_listing.rb +11 -11
  138. data/lib/purecloud/models/flow_body.rb +1 -1
  139. data/lib/purecloud/models/flow_config_meta_data_entity_listing.rb +11 -11
  140. data/lib/purecloud/models/flow_entity_listing.rb +11 -11
  141. data/lib/purecloud/models/flow_history_result_item_entity_listing.rb +11 -11
  142. data/lib/purecloud/models/flow_search_request.rb +222 -0
  143. data/lib/purecloud/models/flow_version_config_meta_data_entity_listing.rb +11 -11
  144. data/lib/purecloud/models/flow_version_entity_listing.rb +11 -11
  145. data/lib/purecloud/models/group.rb +42 -36
  146. data/lib/purecloud/models/group_entity_listing.rb +11 -11
  147. data/lib/purecloud/models/groups_search_response.rb +230 -0
  148. data/lib/purecloud/models/hardware_rate_listing.rb +11 -11
  149. data/lib/purecloud/models/health_check_info.rb +1 -31
  150. data/lib/purecloud/models/inbound_domain_entity_listing.rb +11 -11
  151. data/lib/purecloud/models/inbound_route_entity_listing.rb +11 -11
  152. data/lib/purecloud/models/integration_type_entity_listing.rb +11 -11
  153. data/lib/purecloud/models/interaction_stats_alert.rb +373 -0
  154. data/lib/purecloud/models/interaction_stats_alert_container.rb +238 -0
  155. data/lib/purecloud/models/{alert.rb → interaction_stats_rule.rb} +111 -80
  156. data/lib/purecloud/models/interaction_stats_rule_container.rb +238 -0
  157. data/lib/purecloud/models/ivr.rb +1 -1
  158. data/lib/purecloud/models/ivr_entity_listing.rb +11 -11
  159. data/lib/purecloud/models/json_node.rb +395 -0
  160. data/lib/purecloud/models/json_node_search_response.rb +228 -0
  161. data/lib/purecloud/models/language_entity_listing.rb +11 -11
  162. data/lib/purecloud/models/library_entity_listing.rb +11 -11
  163. data/lib/purecloud/models/line.rb +2 -2
  164. data/lib/purecloud/models/line_base.rb +1 -1
  165. data/lib/purecloud/models/line_base_entity_listing.rb +11 -11
  166. data/lib/purecloud/models/line_entity_listing.rb +11 -11
  167. data/lib/purecloud/models/{body_1.rb → line_properties.rb} +1 -1
  168. data/lib/purecloud/models/linked_entity_listing_flow_details.rb +11 -11
  169. data/lib/purecloud/models/linked_entity_listing_work_item_search_details.rb +11 -11
  170. data/lib/purecloud/models/location_entity_listing.rb +11 -11
  171. data/lib/purecloud/models/logical_interface_entity_listing.rb +11 -11
  172. data/lib/purecloud/models/media_participant_request.rb +232 -0
  173. data/lib/purecloud/models/{inline_response_200.rb → member_entity.rb} +13 -3
  174. data/lib/purecloud/models/note_listing.rb +11 -11
  175. data/lib/purecloud/models/number_plan.rb +1 -1
  176. data/lib/purecloud/models/o_auth_client.rb +1 -1
  177. data/lib/purecloud/models/o_auth_client_entity_listing.rb +11 -11
  178. data/lib/purecloud/models/o_auth_provider_entity_listing.rb +11 -11
  179. data/lib/purecloud/models/organization.rb +2 -22
  180. data/lib/purecloud/models/organization_presence_entity_listing.rb +11 -11
  181. data/lib/purecloud/models/organization_role_entity_listing.rb +11 -11
  182. data/lib/purecloud/models/orphan_recording_listing.rb +11 -11
  183. data/lib/purecloud/models/outbound_route.rb +1 -1
  184. data/lib/purecloud/models/outbound_route_entity_listing.rb +11 -11
  185. data/lib/purecloud/models/page.rb +2 -2
  186. data/lib/purecloud/models/participant.rb +1 -1
  187. data/lib/purecloud/models/participant_request.rb +7 -0
  188. data/lib/purecloud/models/payment_method_listing.rb +11 -11
  189. data/lib/purecloud/models/permission_collection_entity_listing.rb +11 -11
  190. data/lib/purecloud/models/phone.rb +2 -2
  191. data/lib/purecloud/models/phone_base.rb +1 -1
  192. data/lib/purecloud/models/phone_base_entity_listing.rb +11 -11
  193. data/lib/purecloud/models/phone_entity_listing.rb +11 -11
  194. data/lib/purecloud/models/phone_meta_base_entity_listing.rb +11 -11
  195. data/lib/purecloud/models/physical_interface_entity_listing.rb +11 -11
  196. data/lib/purecloud/models/policy_entity_listing.rb +11 -11
  197. data/lib/purecloud/models/prompt_asset.rb +25 -1
  198. data/lib/purecloud/models/prompt_asset_entity_listing.rb +11 -11
  199. data/lib/purecloud/models/prompt_entity_listing.rb +11 -11
  200. data/lib/purecloud/models/quality_audit_page.rb +11 -11
  201. data/lib/purecloud/models/query_request.rb +1 -1
  202. data/lib/purecloud/models/queue.rb +1 -1
  203. data/lib/purecloud/models/queue_entity_listing.rb +11 -11
  204. data/lib/purecloud/models/queues_entity_listing.rb +11 -11
  205. data/lib/purecloud/models/quote_charge.rb +1 -1
  206. data/lib/purecloud/models/quote_listing.rb +11 -11
  207. data/lib/purecloud/models/recording.rb +13 -2
  208. data/lib/purecloud/models/{preview.rb → recording_email_message.rb} +72 -57
  209. data/lib/purecloud/models/relationship_listing.rb +11 -11
  210. data/lib/purecloud/models/report_meta_data_entity_listing.rb +11 -11
  211. data/lib/purecloud/models/report_run_entry_entity_domain_listing.rb +11 -11
  212. data/lib/purecloud/models/report_schedule.rb +1 -1
  213. data/lib/purecloud/models/report_schedule_entity_listing.rb +11 -11
  214. data/lib/purecloud/models/resource_permission_policy.rb +1 -11
  215. data/lib/purecloud/models/response.rb +84 -14
  216. data/lib/purecloud/models/response_entity_list.rb +11 -11
  217. data/lib/purecloud/models/response_entity_listing.rb +11 -11
  218. data/lib/purecloud/models/{filter.rb → response_filter.rb} +1 -1
  219. data/lib/purecloud/models/response_query_request.rb +1 -1
  220. data/lib/purecloud/models/response_set_entity_listing.rb +11 -11
  221. data/lib/purecloud/models/rule_set.rb +1 -1
  222. data/lib/purecloud/models/rule_set_entity_listing.rb +11 -11
  223. data/lib/purecloud/models/schedule.rb +1 -1
  224. data/lib/purecloud/models/schedule_entity_listing.rb +11 -11
  225. data/lib/purecloud/models/schedule_group.rb +1 -1
  226. data/lib/purecloud/models/schedule_group_entity_listing.rb +11 -11
  227. data/lib/purecloud/models/schema_category_entity_listing.rb +11 -11
  228. data/lib/purecloud/models/schema_reference_entity_listing.rb +11 -11
  229. data/lib/purecloud/models/script_entity_listing.rb +11 -11
  230. data/lib/purecloud/models/{occurrence.rb → search_aggregation.rb} +19 -9
  231. data/lib/purecloud/models/{conversation_historical_query_request_filter.rb → search_criteria.rb} +83 -24
  232. data/lib/purecloud/models/search_request.rb +73 -50
  233. data/lib/purecloud/models/security_profile_entity_listing.rb +11 -11
  234. data/lib/purecloud/models/service_entity_listing.rb +11 -11
  235. data/lib/purecloud/models/share_entity_listing.rb +11 -11
  236. data/lib/purecloud/models/{group_images.rb → shared_entity.rb} +8 -10
  237. data/lib/purecloud/models/site.rb +1 -1
  238. data/lib/purecloud/models/site_entity_listing.rb +11 -11
  239. data/lib/purecloud/models/skill_entity_listing.rb +11 -11
  240. data/lib/purecloud/models/social_conversation.rb +1 -1
  241. data/lib/purecloud/models/social_conversation_entity_listing.rb +238 -0
  242. data/lib/purecloud/models/{social_participant.rb → social_media_participant.rb} +1 -1
  243. data/lib/purecloud/models/spreadsheet_transform_entity_listing.rb +11 -11
  244. data/lib/purecloud/models/station.rb +11 -1
  245. data/lib/purecloud/models/station_entity_listing.rb +11 -11
  246. data/lib/purecloud/models/{facets.rb → subscriber_response.rb} +16 -16
  247. data/lib/purecloud/models/system_prompt_asset.rb +25 -1
  248. data/lib/purecloud/models/system_prompt_asset_entity_listing.rb +11 -11
  249. data/lib/purecloud/models/system_prompt_entity_listing.rb +11 -11
  250. data/lib/purecloud/models/tag_value_entity_listing.rb +11 -11
  251. data/lib/purecloud/models/template_entity_listing.rb +12 -12
  252. data/lib/purecloud/models/text_table_transform_entity_listing.rb +11 -11
  253. data/lib/purecloud/models/time_slot.rb +3 -0
  254. data/lib/purecloud/models/time_zone_entity_listing.rb +11 -11
  255. data/lib/purecloud/models/trunk_base.rb +2 -2
  256. data/lib/purecloud/models/trunk_metabase_entity_listing.rb +11 -11
  257. data/lib/purecloud/models/unread_metric.rb +1 -0
  258. data/lib/purecloud/models/unread_status.rb +149 -0
  259. data/lib/purecloud/models/user.rb +7 -7
  260. data/lib/purecloud/models/user_action_category_entity_listing.rb +11 -11
  261. data/lib/purecloud/models/user_action_metadata_entity_listing.rb +11 -11
  262. data/lib/purecloud/models/user_authorization.rb +7 -37
  263. data/lib/purecloud/models/user_entity_listing.rb +11 -11
  264. data/lib/purecloud/models/user_me.rb +375 -0
  265. data/lib/purecloud/models/user_presence.rb +14 -32
  266. data/lib/purecloud/models/user_queue.rb +1 -1
  267. data/lib/purecloud/models/user_queue_entity_listing.rb +11 -11
  268. data/lib/purecloud/models/user_recording_entity_listing.rb +11 -11
  269. data/lib/purecloud/models/user_skill_entity_listing.rb +11 -11
  270. data/lib/purecloud/models/users_entity_listing.rb +11 -11
  271. data/lib/purecloud/models/users_search_response.rb +230 -0
  272. data/lib/purecloud/models/validate_address_response.rb +1 -1
  273. data/lib/purecloud/models/video_conversation.rb +1 -1
  274. data/lib/purecloud/models/{alert_entity_listing.rb → video_conversation_entity_listing.rb} +13 -13
  275. data/lib/purecloud/models/{video_participant.rb → video_media_participant.rb} +1 -1
  276. data/lib/purecloud/models/voice_rate_international_entity_listing.rb +11 -11
  277. data/lib/purecloud/models/voice_xml_operation_entity_listing.rb +11 -11
  278. data/lib/purecloud/models/voicemail_message_entity_listing.rb +11 -11
  279. data/lib/purecloud/models/workspace_entity_listing.rb +11 -11
  280. data/lib/purecloud/models/workspace_member_entity_listing.rb +11 -11
  281. data/lib/purecloud/models/wrapup_code_entity_listing.rb +11 -11
  282. data/lib/purecloud/version.rb +1 -1
  283. data/newVersion.md +1 -1
  284. data/swagger.json +1 -1
  285. data/version.json +1 -1
  286. metadata +54 -45
  287. data/lib/purecloud/api/architect_api.rb +0 -3285
  288. data/lib/purecloud/models/chat_search_request.rb +0 -244
  289. data/lib/purecloud/models/conversation_historical_query_request_body.rb +0 -185
  290. data/lib/purecloud/models/conversation_query_response.rb +0 -366
  291. data/lib/purecloud/models/dialer_call.rb +0 -156
  292. data/lib/purecloud/models/penetration_rate.rb +0 -176
  293. data/lib/purecloud/models/penetration_rate_id.rb +0 -156
  294. data/lib/purecloud/models/progress_model.rb +0 -169
@@ -12,12 +12,12 @@ module PureCloud
12
12
 
13
13
  attr_accessor :self_uri
14
14
 
15
- attr_accessor :next_uri
16
-
17
15
  attr_accessor :first_uri
18
16
 
19
17
  attr_accessor :previous_uri
20
18
 
19
+ attr_accessor :next_uri
20
+
21
21
  attr_accessor :last_uri
22
22
 
23
23
  attr_accessor :page_count
@@ -36,12 +36,12 @@ module PureCloud
36
36
 
37
37
  :'self_uri' => :'selfUri',
38
38
 
39
- :'next_uri' => :'nextUri',
40
-
41
39
  :'first_uri' => :'firstUri',
42
40
 
43
41
  :'previous_uri' => :'previousUri',
44
42
 
43
+ :'next_uri' => :'nextUri',
44
+
45
45
  :'last_uri' => :'lastUri',
46
46
 
47
47
  :'page_count' => :'pageCount'
@@ -57,9 +57,9 @@ module PureCloud
57
57
  :'total' => :'Integer',
58
58
  :'entities' => :'Array<HardwareRate>',
59
59
  :'self_uri' => :'String',
60
- :'next_uri' => :'String',
61
60
  :'first_uri' => :'String',
62
61
  :'previous_uri' => :'String',
62
+ :'next_uri' => :'String',
63
63
  :'last_uri' => :'String',
64
64
  :'page_count' => :'Integer'
65
65
 
@@ -95,10 +95,6 @@ module PureCloud
95
95
  self.self_uri = attributes[:'selfUri']
96
96
  end
97
97
 
98
- if attributes[:'nextUri']
99
- self.next_uri = attributes[:'nextUri']
100
- end
101
-
102
98
  if attributes[:'firstUri']
103
99
  self.first_uri = attributes[:'firstUri']
104
100
  end
@@ -107,6 +103,10 @@ module PureCloud
107
103
  self.previous_uri = attributes[:'previousUri']
108
104
  end
109
105
 
106
+ if attributes[:'nextUri']
107
+ self.next_uri = attributes[:'nextUri']
108
+ end
109
+
110
110
  if attributes[:'lastUri']
111
111
  self.last_uri = attributes[:'lastUri']
112
112
  end
@@ -126,9 +126,9 @@ module PureCloud
126
126
  total == o.total &&
127
127
  entities == o.entities &&
128
128
  self_uri == o.self_uri &&
129
- next_uri == o.next_uri &&
130
129
  first_uri == o.first_uri &&
131
130
  previous_uri == o.previous_uri &&
131
+ next_uri == o.next_uri &&
132
132
  last_uri == o.last_uri &&
133
133
  page_count == o.page_count
134
134
  end
@@ -140,7 +140,7 @@ module PureCloud
140
140
 
141
141
  # Calculate hash code according to all attributes.
142
142
  def hash
143
- [page_size, page_number, total, entities, self_uri, next_uri, first_uri, previous_uri, last_uri, page_count].hash
143
+ [page_size, page_number, total, entities, self_uri, first_uri, previous_uri, next_uri, last_uri, page_count].hash
144
144
  end
145
145
 
146
146
  # build the object from hash
@@ -14,12 +14,6 @@ module PureCloud
14
14
 
15
15
  attr_accessor :build_version
16
16
 
17
- attr_accessor :build_jdk
18
-
19
- attr_accessor :built_by
20
-
21
- attr_accessor :implementation_build
22
-
23
17
  attr_accessor :implementation_version
24
18
 
25
19
  attr_accessor :status
@@ -43,12 +37,6 @@ module PureCloud
43
37
 
44
38
  :'build_version' => :'Build-Version',
45
39
 
46
- :'build_jdk' => :'Build-Jdk',
47
-
48
- :'built_by' => :'Built-By',
49
-
50
- :'implementation_build' => :'Implementation-Build',
51
-
52
40
  :'implementation_version' => :'Implementation-Version',
53
41
 
54
42
  :'status' => :'Status',
@@ -68,9 +56,6 @@ module PureCloud
68
56
  :'self_uri' => :'String',
69
57
  :'build_time' => :'String',
70
58
  :'build_version' => :'String',
71
- :'build_jdk' => :'String',
72
- :'built_by' => :'String',
73
- :'implementation_build' => :'String',
74
59
  :'implementation_version' => :'String',
75
60
  :'status' => :'String',
76
61
  :'ping_ms' => :'Integer',
@@ -106,18 +91,6 @@ module PureCloud
106
91
  self.build_version = attributes[:'Build-Version']
107
92
  end
108
93
 
109
- if attributes[:'Build-Jdk']
110
- self.build_jdk = attributes[:'Build-Jdk']
111
- end
112
-
113
- if attributes[:'Built-By']
114
- self.built_by = attributes[:'Built-By']
115
- end
116
-
117
- if attributes[:'Implementation-Build']
118
- self.implementation_build = attributes[:'Implementation-Build']
119
- end
120
-
121
94
  if attributes[:'Implementation-Version']
122
95
  self.implementation_version = attributes[:'Implementation-Version']
123
96
  end
@@ -154,9 +127,6 @@ module PureCloud
154
127
  self_uri == o.self_uri &&
155
128
  build_time == o.build_time &&
156
129
  build_version == o.build_version &&
157
- build_jdk == o.build_jdk &&
158
- built_by == o.built_by &&
159
- implementation_build == o.implementation_build &&
160
130
  implementation_version == o.implementation_version &&
161
131
  status == o.status &&
162
132
  ping_ms == o.ping_ms &&
@@ -170,7 +140,7 @@ module PureCloud
170
140
 
171
141
  # Calculate hash code according to all attributes.
172
142
  def hash
173
- [id, name, self_uri, build_time, build_version, build_jdk, built_by, implementation_build, implementation_version, status, ping_ms, date].hash
143
+ [id, name, self_uri, build_time, build_version, implementation_version, status, ping_ms, date].hash
174
144
  end
175
145
 
176
146
  # build the object from hash
@@ -12,12 +12,12 @@ module PureCloud
12
12
 
13
13
  attr_accessor :self_uri
14
14
 
15
- attr_accessor :next_uri
16
-
17
15
  attr_accessor :first_uri
18
16
 
19
17
  attr_accessor :previous_uri
20
18
 
19
+ attr_accessor :next_uri
20
+
21
21
  attr_accessor :last_uri
22
22
 
23
23
  attr_accessor :page_count
@@ -36,12 +36,12 @@ module PureCloud
36
36
 
37
37
  :'self_uri' => :'selfUri',
38
38
 
39
- :'next_uri' => :'nextUri',
40
-
41
39
  :'first_uri' => :'firstUri',
42
40
 
43
41
  :'previous_uri' => :'previousUri',
44
42
 
43
+ :'next_uri' => :'nextUri',
44
+
45
45
  :'last_uri' => :'lastUri',
46
46
 
47
47
  :'page_count' => :'pageCount'
@@ -57,9 +57,9 @@ module PureCloud
57
57
  :'total' => :'Integer',
58
58
  :'entities' => :'Array<InboundDomain>',
59
59
  :'self_uri' => :'String',
60
- :'next_uri' => :'String',
61
60
  :'first_uri' => :'String',
62
61
  :'previous_uri' => :'String',
62
+ :'next_uri' => :'String',
63
63
  :'last_uri' => :'String',
64
64
  :'page_count' => :'Integer'
65
65
 
@@ -95,10 +95,6 @@ module PureCloud
95
95
  self.self_uri = attributes[:'selfUri']
96
96
  end
97
97
 
98
- if attributes[:'nextUri']
99
- self.next_uri = attributes[:'nextUri']
100
- end
101
-
102
98
  if attributes[:'firstUri']
103
99
  self.first_uri = attributes[:'firstUri']
104
100
  end
@@ -107,6 +103,10 @@ module PureCloud
107
103
  self.previous_uri = attributes[:'previousUri']
108
104
  end
109
105
 
106
+ if attributes[:'nextUri']
107
+ self.next_uri = attributes[:'nextUri']
108
+ end
109
+
110
110
  if attributes[:'lastUri']
111
111
  self.last_uri = attributes[:'lastUri']
112
112
  end
@@ -126,9 +126,9 @@ module PureCloud
126
126
  total == o.total &&
127
127
  entities == o.entities &&
128
128
  self_uri == o.self_uri &&
129
- next_uri == o.next_uri &&
130
129
  first_uri == o.first_uri &&
131
130
  previous_uri == o.previous_uri &&
131
+ next_uri == o.next_uri &&
132
132
  last_uri == o.last_uri &&
133
133
  page_count == o.page_count
134
134
  end
@@ -140,7 +140,7 @@ module PureCloud
140
140
 
141
141
  # Calculate hash code according to all attributes.
142
142
  def hash
143
- [page_size, page_number, total, entities, self_uri, next_uri, first_uri, previous_uri, last_uri, page_count].hash
143
+ [page_size, page_number, total, entities, self_uri, first_uri, previous_uri, next_uri, last_uri, page_count].hash
144
144
  end
145
145
 
146
146
  # build the object from hash
@@ -12,12 +12,12 @@ module PureCloud
12
12
 
13
13
  attr_accessor :self_uri
14
14
 
15
- attr_accessor :next_uri
16
-
17
15
  attr_accessor :first_uri
18
16
 
19
17
  attr_accessor :previous_uri
20
18
 
19
+ attr_accessor :next_uri
20
+
21
21
  attr_accessor :last_uri
22
22
 
23
23
  attr_accessor :page_count
@@ -36,12 +36,12 @@ module PureCloud
36
36
 
37
37
  :'self_uri' => :'selfUri',
38
38
 
39
- :'next_uri' => :'nextUri',
40
-
41
39
  :'first_uri' => :'firstUri',
42
40
 
43
41
  :'previous_uri' => :'previousUri',
44
42
 
43
+ :'next_uri' => :'nextUri',
44
+
45
45
  :'last_uri' => :'lastUri',
46
46
 
47
47
  :'page_count' => :'pageCount'
@@ -57,9 +57,9 @@ module PureCloud
57
57
  :'total' => :'Integer',
58
58
  :'entities' => :'Array<InboundRoute>',
59
59
  :'self_uri' => :'String',
60
- :'next_uri' => :'String',
61
60
  :'first_uri' => :'String',
62
61
  :'previous_uri' => :'String',
62
+ :'next_uri' => :'String',
63
63
  :'last_uri' => :'String',
64
64
  :'page_count' => :'Integer'
65
65
 
@@ -95,10 +95,6 @@ module PureCloud
95
95
  self.self_uri = attributes[:'selfUri']
96
96
  end
97
97
 
98
- if attributes[:'nextUri']
99
- self.next_uri = attributes[:'nextUri']
100
- end
101
-
102
98
  if attributes[:'firstUri']
103
99
  self.first_uri = attributes[:'firstUri']
104
100
  end
@@ -107,6 +103,10 @@ module PureCloud
107
103
  self.previous_uri = attributes[:'previousUri']
108
104
  end
109
105
 
106
+ if attributes[:'nextUri']
107
+ self.next_uri = attributes[:'nextUri']
108
+ end
109
+
110
110
  if attributes[:'lastUri']
111
111
  self.last_uri = attributes[:'lastUri']
112
112
  end
@@ -126,9 +126,9 @@ module PureCloud
126
126
  total == o.total &&
127
127
  entities == o.entities &&
128
128
  self_uri == o.self_uri &&
129
- next_uri == o.next_uri &&
130
129
  first_uri == o.first_uri &&
131
130
  previous_uri == o.previous_uri &&
131
+ next_uri == o.next_uri &&
132
132
  last_uri == o.last_uri &&
133
133
  page_count == o.page_count
134
134
  end
@@ -140,7 +140,7 @@ module PureCloud
140
140
 
141
141
  # Calculate hash code according to all attributes.
142
142
  def hash
143
- [page_size, page_number, total, entities, self_uri, next_uri, first_uri, previous_uri, last_uri, page_count].hash
143
+ [page_size, page_number, total, entities, self_uri, first_uri, previous_uri, next_uri, last_uri, page_count].hash
144
144
  end
145
145
 
146
146
  # build the object from hash
@@ -12,12 +12,12 @@ module PureCloud
12
12
 
13
13
  attr_accessor :self_uri
14
14
 
15
- attr_accessor :next_uri
16
-
17
15
  attr_accessor :first_uri
18
16
 
19
17
  attr_accessor :previous_uri
20
18
 
19
+ attr_accessor :next_uri
20
+
21
21
  attr_accessor :last_uri
22
22
 
23
23
  attr_accessor :page_count
@@ -36,12 +36,12 @@ module PureCloud
36
36
 
37
37
  :'self_uri' => :'selfUri',
38
38
 
39
- :'next_uri' => :'nextUri',
40
-
41
39
  :'first_uri' => :'firstUri',
42
40
 
43
41
  :'previous_uri' => :'previousUri',
44
42
 
43
+ :'next_uri' => :'nextUri',
44
+
45
45
  :'last_uri' => :'lastUri',
46
46
 
47
47
  :'page_count' => :'pageCount'
@@ -57,9 +57,9 @@ module PureCloud
57
57
  :'total' => :'Integer',
58
58
  :'entities' => :'Array<IntegrationType>',
59
59
  :'self_uri' => :'String',
60
- :'next_uri' => :'String',
61
60
  :'first_uri' => :'String',
62
61
  :'previous_uri' => :'String',
62
+ :'next_uri' => :'String',
63
63
  :'last_uri' => :'String',
64
64
  :'page_count' => :'Integer'
65
65
 
@@ -95,10 +95,6 @@ module PureCloud
95
95
  self.self_uri = attributes[:'selfUri']
96
96
  end
97
97
 
98
- if attributes[:'nextUri']
99
- self.next_uri = attributes[:'nextUri']
100
- end
101
-
102
98
  if attributes[:'firstUri']
103
99
  self.first_uri = attributes[:'firstUri']
104
100
  end
@@ -107,6 +103,10 @@ module PureCloud
107
103
  self.previous_uri = attributes[:'previousUri']
108
104
  end
109
105
 
106
+ if attributes[:'nextUri']
107
+ self.next_uri = attributes[:'nextUri']
108
+ end
109
+
110
110
  if attributes[:'lastUri']
111
111
  self.last_uri = attributes[:'lastUri']
112
112
  end
@@ -126,9 +126,9 @@ module PureCloud
126
126
  total == o.total &&
127
127
  entities == o.entities &&
128
128
  self_uri == o.self_uri &&
129
- next_uri == o.next_uri &&
130
129
  first_uri == o.first_uri &&
131
130
  previous_uri == o.previous_uri &&
131
+ next_uri == o.next_uri &&
132
132
  last_uri == o.last_uri &&
133
133
  page_count == o.page_count
134
134
  end
@@ -140,7 +140,7 @@ module PureCloud
140
140
 
141
141
  # Calculate hash code according to all attributes.
142
142
  def hash
143
- [page_size, page_number, total, entities, self_uri, next_uri, first_uri, previous_uri, last_uri, page_count].hash
143
+ [page_size, page_number, total, entities, self_uri, first_uri, previous_uri, next_uri, last_uri, page_count].hash
144
144
  end
145
145
 
146
146
  # build the object from hash
@@ -0,0 +1,373 @@
1
+ require 'date'
2
+
3
+ module PureCloud
4
+ class InteractionStatsAlert
5
+ # The globally unique identifier for the object.
6
+ attr_accessor :id
7
+
8
+ # Name of the rule that generated the alert
9
+ attr_accessor :name
10
+
11
+ # The dimension of concern.
12
+ attr_accessor :dimension
13
+
14
+ # The value of the dimension.
15
+ attr_accessor :dimension_value
16
+
17
+ # The metric to be assessed.
18
+ attr_accessor :metric
19
+
20
+ # The media type.
21
+ attr_accessor :media_type
22
+
23
+ # The comparison descriptor used against the metric's value.
24
+ attr_accessor :numeric_range
25
+
26
+ # The statistic of concern for the metric.
27
+ attr_accessor :statistic
28
+
29
+ # The threshold value.
30
+ attr_accessor :value
31
+
32
+ # The id of the rule.
33
+ attr_accessor :rule_id
34
+
35
+ # Indicates if the alert has been read.
36
+ attr_accessor :unread
37
+
38
+ # The date/time the alert was created. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
39
+ attr_accessor :start_date
40
+
41
+ # The date/time the owning rule exiting in alarm status. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
42
+ attr_accessor :end_date
43
+
44
+ # The ids of users who were notified of alarm state change.
45
+ attr_accessor :notification_users
46
+
47
+ # A collection of notification methods. = ['SMS', 'DEVICE', 'EMAIL']
48
+ attr_accessor :alert_types
49
+
50
+ attr_accessor :rule_uri
51
+
52
+ # The URI for this object
53
+ attr_accessor :self_uri
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+
59
+ :'id' => :'id',
60
+
61
+ :'name' => :'name',
62
+
63
+ :'dimension' => :'dimension',
64
+
65
+ :'dimension_value' => :'dimensionValue',
66
+
67
+ :'metric' => :'metric',
68
+
69
+ :'media_type' => :'mediaType',
70
+
71
+ :'numeric_range' => :'numericRange',
72
+
73
+ :'statistic' => :'statistic',
74
+
75
+ :'value' => :'value',
76
+
77
+ :'rule_id' => :'ruleId',
78
+
79
+ :'unread' => :'unread',
80
+
81
+ :'start_date' => :'startDate',
82
+
83
+ :'end_date' => :'endDate',
84
+
85
+ :'notification_users' => :'notificationUsers',
86
+
87
+ :'alert_types' => :'alertTypes',
88
+
89
+ :'rule_uri' => :'ruleUri',
90
+
91
+ :'self_uri' => :'selfUri'
92
+
93
+ }
94
+ end
95
+
96
+ # Attribute type mapping.
97
+ def self.swagger_types
98
+ {
99
+ :'id' => :'String',
100
+ :'name' => :'String',
101
+ :'dimension' => :'String',
102
+ :'dimension_value' => :'String',
103
+ :'metric' => :'String',
104
+ :'media_type' => :'String',
105
+ :'numeric_range' => :'String',
106
+ :'statistic' => :'String',
107
+ :'value' => :'Float',
108
+ :'rule_id' => :'String',
109
+ :'unread' => :'BOOLEAN',
110
+ :'start_date' => :'DateTime',
111
+ :'end_date' => :'DateTime',
112
+ :'notification_users' => :'Array<User>',
113
+ :'alert_types' => :'Array<String>',
114
+ :'rule_uri' => :'String',
115
+ :'self_uri' => :'String'
116
+
117
+ }
118
+ end
119
+
120
+ def initialize(attributes = {})
121
+ return unless attributes.is_a?(Hash)
122
+
123
+ # convert string to symbol for hash key
124
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
125
+
126
+
127
+ if attributes[:'id']
128
+ self.id = attributes[:'id']
129
+ end
130
+
131
+ if attributes[:'name']
132
+ self.name = attributes[:'name']
133
+ end
134
+
135
+ if attributes[:'dimension']
136
+ self.dimension = attributes[:'dimension']
137
+ end
138
+
139
+ if attributes[:'dimensionValue']
140
+ self.dimension_value = attributes[:'dimensionValue']
141
+ end
142
+
143
+ if attributes[:'metric']
144
+ self.metric = attributes[:'metric']
145
+ end
146
+
147
+ if attributes[:'mediaType']
148
+ self.media_type = attributes[:'mediaType']
149
+ end
150
+
151
+ if attributes[:'numericRange']
152
+ self.numeric_range = attributes[:'numericRange']
153
+ end
154
+
155
+ if attributes[:'statistic']
156
+ self.statistic = attributes[:'statistic']
157
+ end
158
+
159
+ if attributes[:'value']
160
+ self.value = attributes[:'value']
161
+ end
162
+
163
+ if attributes[:'ruleId']
164
+ self.rule_id = attributes[:'ruleId']
165
+ end
166
+
167
+ if attributes[:'unread']
168
+ self.unread = attributes[:'unread']
169
+ else
170
+ self.unread = false
171
+ end
172
+
173
+ if attributes[:'startDate']
174
+ self.start_date = attributes[:'startDate']
175
+ end
176
+
177
+ if attributes[:'endDate']
178
+ self.end_date = attributes[:'endDate']
179
+ end
180
+
181
+ if attributes[:'notificationUsers']
182
+ if (value = attributes[:'notificationUsers']).is_a?(Array)
183
+ self.notification_users = value
184
+ end
185
+ end
186
+
187
+ if attributes[:'alertTypes']
188
+ if (value = attributes[:'alertTypes']).is_a?(Array)
189
+ self.alert_types = value
190
+ end
191
+ end
192
+
193
+ if attributes[:'ruleUri']
194
+ self.rule_uri = attributes[:'ruleUri']
195
+ end
196
+
197
+ if attributes[:'selfUri']
198
+ self.self_uri = attributes[:'selfUri']
199
+ end
200
+
201
+ end
202
+
203
+ # Custom attribute writer method checking allowed values (enum).
204
+ def dimension=(dimension)
205
+ allowed_values = ["queueId", "userId"]
206
+ if dimension && !allowed_values.include?(dimension)
207
+ fail "invalid value for 'dimension', must be one of #{allowed_values}"
208
+ end
209
+ @dimension = dimension
210
+ end
211
+
212
+ # Custom attribute writer method checking allowed values (enum).
213
+ def metric=(metric)
214
+ allowed_values = ["tAbandon", "tAnswered", "tTalk", "nOffered", "tHandle", "nTransferred", "oServiceLevel", "tWait", "tHeld", "tAcw"]
215
+ if metric && !allowed_values.include?(metric)
216
+ fail "invalid value for 'metric', must be one of #{allowed_values}"
217
+ end
218
+ @metric = metric
219
+ end
220
+
221
+ # Custom attribute writer method checking allowed values (enum).
222
+ def media_type=(media_type)
223
+ allowed_values = ["voice", "chat", "email"]
224
+ if media_type && !allowed_values.include?(media_type)
225
+ fail "invalid value for 'media_type', must be one of #{allowed_values}"
226
+ end
227
+ @media_type = media_type
228
+ end
229
+
230
+ # Custom attribute writer method checking allowed values (enum).
231
+ def numeric_range=(numeric_range)
232
+ allowed_values = ["gt", "gte", "lt", "lte", "eq", "ne"]
233
+ if numeric_range && !allowed_values.include?(numeric_range)
234
+ fail "invalid value for 'numeric_range', must be one of #{allowed_values}"
235
+ end
236
+ @numeric_range = numeric_range
237
+ end
238
+
239
+ # Custom attribute writer method checking allowed values (enum).
240
+ def statistic=(statistic)
241
+ allowed_values = ["count", "min", "ratio", "max"]
242
+ if statistic && !allowed_values.include?(statistic)
243
+ fail "invalid value for 'statistic', must be one of #{allowed_values}"
244
+ end
245
+ @statistic = statistic
246
+ end
247
+
248
+ # Check equality by comparing each attribute.
249
+ def ==(o)
250
+ return true if self.equal?(o)
251
+ self.class == o.class &&
252
+ id == o.id &&
253
+ name == o.name &&
254
+ dimension == o.dimension &&
255
+ dimension_value == o.dimension_value &&
256
+ metric == o.metric &&
257
+ media_type == o.media_type &&
258
+ numeric_range == o.numeric_range &&
259
+ statistic == o.statistic &&
260
+ value == o.value &&
261
+ rule_id == o.rule_id &&
262
+ unread == o.unread &&
263
+ start_date == o.start_date &&
264
+ end_date == o.end_date &&
265
+ notification_users == o.notification_users &&
266
+ alert_types == o.alert_types &&
267
+ rule_uri == o.rule_uri &&
268
+ self_uri == o.self_uri
269
+ end
270
+
271
+ # @see the `==` method
272
+ def eql?(o)
273
+ self == o
274
+ end
275
+
276
+ # Calculate hash code according to all attributes.
277
+ def hash
278
+ [id, name, dimension, dimension_value, metric, media_type, numeric_range, statistic, value, rule_id, unread, start_date, end_date, notification_users, alert_types, rule_uri, self_uri].hash
279
+ end
280
+
281
+ # build the object from hash
282
+ def build_from_hash(attributes)
283
+ return nil unless attributes.is_a?(Hash)
284
+ self.class.swagger_types.each_pair do |key, type|
285
+ if type =~ /^Array<(.*)>/i
286
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
287
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
288
+ else
289
+ #TODO show warning in debug mode
290
+ end
291
+ elsif !attributes[self.class.attribute_map[key]].nil?
292
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
293
+ else
294
+ # data not found in attributes(hash), not an issue as the data can be optional
295
+ end
296
+ end
297
+
298
+ self
299
+ end
300
+
301
+ def _deserialize(type, value)
302
+ case type.to_sym
303
+ when :DateTime
304
+ DateTime.parse(value)
305
+ when :Date
306
+ Date.parse(value)
307
+ when :String
308
+ value.to_s
309
+ when :Integer
310
+ value.to_i
311
+ when :Float
312
+ value.to_f
313
+ when :BOOLEAN
314
+ if value =~ /^(true|t|yes|y|1)$/i
315
+ true
316
+ else
317
+ false
318
+ end
319
+ when /\AArray<(?<inner_type>.+)>\z/
320
+ inner_type = Regexp.last_match[:inner_type]
321
+ value.map { |v| _deserialize(inner_type, v) }
322
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
323
+ k_type = Regexp.last_match[:k_type]
324
+ v_type = Regexp.last_match[:v_type]
325
+ {}.tap do |hash|
326
+ value.each do |k, v|
327
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
328
+ end
329
+ end
330
+ else # model
331
+ _model = Object.const_get("PureCloud").const_get(type).new
332
+ _model.build_from_hash(value)
333
+ end
334
+ end
335
+
336
+ def to_s
337
+ to_hash.to_s
338
+ end
339
+
340
+ # to_body is an alias to to_body (backward compatibility))
341
+ def to_body
342
+ to_hash
343
+ end
344
+
345
+ # return the object in the form of hash
346
+ def to_hash
347
+ hash = {}
348
+ self.class.attribute_map.each_pair do |attr, param|
349
+ value = self.send(attr)
350
+ next if value.nil?
351
+ hash[param] = _to_hash(value)
352
+ end
353
+ hash
354
+ end
355
+
356
+ # Method to output non-array value in the form of hash
357
+ # For object, use to_hash. Otherwise, just return the value
358
+ def _to_hash(value)
359
+ if value.is_a?(Array)
360
+ value.compact.map{ |v| _to_hash(v) }
361
+ elsif value.is_a?(Hash)
362
+ {}.tap do |hash|
363
+ value.each { |k, v| hash[k] = _to_hash(v) }
364
+ end
365
+ elsif value.respond_to? :to_hash
366
+ value.to_hash
367
+ else
368
+ value
369
+ end
370
+ end
371
+
372
+ end
373
+ end