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