algolia 3.10.2 → 3.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/Bug_report.yml +1 -1
- data/.github/workflows/release.yml +1 -1
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/ingestion_client.rb +8 -2
- data/lib/algolia/api/search_client.rb +56 -51
- data/lib/algolia/models/abtesting/ab_test.rb +0 -5
- data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -5
- data/lib/algolia/models/abtesting/ab_test_response.rb +0 -5
- data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -5
- data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +5 -3
- data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -5
- data/lib/algolia/models/abtesting/add_ab_tests_variant.rb +5 -6
- data/lib/algolia/models/abtesting/currency.rb +0 -5
- data/lib/algolia/models/abtesting/empty_search.rb +0 -5
- data/lib/algolia/models/abtesting/empty_search_filter.rb +0 -5
- data/lib/algolia/models/abtesting/error_base.rb +0 -5
- data/lib/algolia/models/abtesting/estimate_ab_test_request.rb +0 -5
- data/lib/algolia/models/abtesting/estimate_ab_test_response.rb +0 -5
- data/lib/algolia/models/abtesting/estimate_configuration.rb +0 -5
- data/lib/algolia/models/abtesting/filter_effects.rb +0 -5
- data/lib/algolia/models/abtesting/list_ab_tests_response.rb +0 -5
- data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -5
- data/lib/algolia/models/abtesting/outliers.rb +0 -5
- data/lib/algolia/models/abtesting/outliers_filter.rb +0 -5
- data/lib/algolia/models/abtesting/schedule_ab_test_response.rb +0 -5
- data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -5
- data/lib/algolia/models/abtesting/variant.rb +0 -5
- data/lib/algolia/models/analytics/click_position.rb +0 -5
- data/lib/algolia/models/analytics/currency_code.rb +0 -5
- data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -5
- data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -5
- data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -5
- data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -5
- data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -5
- data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -5
- data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -5
- data/lib/algolia/models/analytics/daily_revenue.rb +0 -5
- data/lib/algolia/models/analytics/daily_searches.rb +0 -5
- data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -5
- data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -5
- data/lib/algolia/models/analytics/daily_users.rb +0 -5
- data/lib/algolia/models/analytics/error_base.rb +0 -5
- data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -5
- data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -5
- data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -5
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -5
- data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -5
- data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -5
- data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -5
- data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -5
- data/lib/algolia/models/analytics/get_revenue.rb +0 -5
- data/lib/algolia/models/analytics/get_searches_count_response.rb +0 -5
- data/lib/algolia/models/analytics/get_searches_no_clicks_response.rb +0 -5
- data/lib/algolia/models/analytics/get_searches_no_results_response.rb +0 -5
- data/lib/algolia/models/analytics/get_status_response.rb +0 -5
- data/lib/algolia/models/analytics/get_top_countries_response.rb +0 -5
- data/lib/algolia/models/analytics/get_top_filter_attribute.rb +0 -5
- data/lib/algolia/models/analytics/get_top_filter_attributes_response.rb +0 -5
- data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +0 -5
- data/lib/algolia/models/analytics/get_top_filter_for_attribute_response.rb +0 -5
- data/lib/algolia/models/analytics/get_top_filters_no_results_response.rb +0 -5
- data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +0 -5
- data/lib/algolia/models/analytics/get_top_filters_no_results_values.rb +0 -5
- data/lib/algolia/models/analytics/get_top_hits_response.rb +5 -6
- data/lib/algolia/models/analytics/get_top_searches_response.rb +5 -6
- data/lib/algolia/models/analytics/get_users_count_response.rb +0 -5
- data/lib/algolia/models/analytics/top_country.rb +0 -5
- data/lib/algolia/models/analytics/top_hit.rb +0 -5
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -5
- data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -5
- data/lib/algolia/models/analytics/top_hits_response.rb +0 -5
- data/lib/algolia/models/analytics/top_hits_response_with_analytics.rb +0 -5
- data/lib/algolia/models/analytics/top_hits_response_with_revenue_analytics.rb +0 -5
- data/lib/algolia/models/analytics/top_search.rb +0 -5
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -5
- data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -5
- data/lib/algolia/models/analytics/top_searches_response.rb +0 -5
- data/lib/algolia/models/analytics/top_searches_response_with_analytics.rb +0 -5
- data/lib/algolia/models/analytics/top_searches_response_with_revenue_analytics.rb +0 -5
- data/lib/algolia/models/ingestion/auth_algolia.rb +0 -5
- data/lib/algolia/models/ingestion/auth_algolia_insights.rb +0 -5
- data/lib/algolia/models/ingestion/auth_algolia_insights_partial.rb +0 -5
- data/lib/algolia/models/ingestion/auth_algolia_partial.rb +0 -5
- data/lib/algolia/models/ingestion/auth_api_key.rb +5 -3
- data/lib/algolia/models/ingestion/auth_api_key_partial.rb +5 -3
- data/lib/algolia/models/ingestion/auth_basic.rb +6 -3
- data/lib/algolia/models/ingestion/auth_basic_partial.rb +5 -3
- data/lib/algolia/models/ingestion/auth_google_service_account.rb +6 -3
- data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +5 -3
- data/lib/algolia/models/ingestion/auth_input.rb +5 -6
- data/lib/algolia/models/ingestion/auth_input_partial.rb +5 -6
- data/lib/algolia/models/ingestion/auth_o_auth.rb +7 -3
- data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +5 -3
- data/lib/algolia/models/ingestion/authentication.rb +0 -5
- data/lib/algolia/models/ingestion/authentication_create.rb +0 -5
- data/lib/algolia/models/ingestion/authentication_create_response.rb +0 -5
- data/lib/algolia/models/ingestion/authentication_search.rb +0 -5
- data/lib/algolia/models/ingestion/authentication_update.rb +0 -5
- data/lib/algolia/models/ingestion/authentication_update_response.rb +0 -5
- data/lib/algolia/models/ingestion/big_commerce_channel.rb +0 -5
- data/lib/algolia/models/ingestion/big_commerce_metafield.rb +0 -5
- data/lib/algolia/models/ingestion/commercetools_custom_fields.rb +0 -5
- data/lib/algolia/models/ingestion/delete_response.rb +0 -5
- data/lib/algolia/models/ingestion/destination.rb +0 -5
- data/lib/algolia/models/ingestion/destination_create.rb +0 -5
- data/lib/algolia/models/ingestion/destination_create_response.rb +0 -5
- data/lib/algolia/models/ingestion/destination_index_name.rb +0 -5
- data/lib/algolia/models/ingestion/destination_input.rb +5 -6
- data/lib/algolia/models/ingestion/destination_search.rb +0 -5
- data/lib/algolia/models/ingestion/destination_update.rb +0 -5
- data/lib/algolia/models/ingestion/destination_update_response.rb +0 -5
- data/lib/algolia/models/ingestion/docker_image_type.rb +1 -2
- data/lib/algolia/models/ingestion/docker_streams.rb +0 -5
- data/lib/algolia/models/ingestion/docker_streams_input.rb +6 -4
- data/lib/algolia/models/ingestion/email_notifications.rb +207 -0
- data/lib/algolia/models/ingestion/error_base.rb +0 -5
- data/lib/algolia/models/ingestion/event.rb +0 -5
- data/lib/algolia/models/ingestion/list_authentications_response.rb +0 -5
- data/lib/algolia/models/ingestion/list_destinations_response.rb +0 -5
- data/lib/algolia/models/ingestion/list_events_response.rb +0 -5
- data/lib/algolia/models/ingestion/list_sources_response.rb +0 -5
- data/lib/algolia/models/ingestion/list_tasks_response.rb +0 -5
- data/lib/algolia/models/ingestion/list_tasks_response_v1.rb +0 -5
- data/lib/algolia/models/ingestion/list_transformations_response.rb +0 -5
- data/lib/algolia/models/ingestion/mapping_field_directive.rb +0 -5
- data/lib/algolia/models/ingestion/mapping_input.rb +6 -3
- data/lib/algolia/models/ingestion/mapping_kit_action.rb +0 -5
- data/lib/algolia/models/ingestion/notifications.rb +209 -0
- data/lib/algolia/models/ingestion/on_demand_trigger.rb +0 -5
- data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +0 -5
- data/lib/algolia/models/ingestion/pagination.rb +0 -5
- data/lib/algolia/models/ingestion/platform_with_none.rb +5 -6
- data/lib/algolia/models/ingestion/policies.rb +205 -0
- data/lib/algolia/models/ingestion/push_task_payload.rb +0 -5
- data/lib/algolia/models/ingestion/push_task_records.rb +0 -5
- data/lib/algolia/models/ingestion/run.rb +0 -5
- data/lib/algolia/models/ingestion/run_list_response.rb +0 -5
- data/lib/algolia/models/ingestion/run_progress.rb +0 -5
- data/lib/algolia/models/ingestion/run_response.rb +0 -5
- data/lib/algolia/models/ingestion/run_source_payload.rb +0 -5
- data/lib/algolia/models/ingestion/run_source_response.rb +0 -5
- data/lib/algolia/models/ingestion/schedule_trigger.rb +0 -5
- data/lib/algolia/models/ingestion/schedule_trigger_input.rb +5 -3
- data/lib/algolia/models/ingestion/shopify_input.rb +0 -5
- data/lib/algolia/models/ingestion/shopify_market.rb +0 -5
- data/lib/algolia/models/ingestion/shopify_metafield.rb +0 -5
- data/lib/algolia/models/ingestion/source.rb +0 -5
- data/lib/algolia/models/ingestion/source_big_commerce.rb +5 -3
- data/lib/algolia/models/ingestion/source_big_query.rb +5 -3
- data/lib/algolia/models/ingestion/source_commercetools.rb +5 -3
- data/lib/algolia/models/ingestion/source_create.rb +0 -5
- data/lib/algolia/models/ingestion/source_create_response.rb +0 -5
- data/lib/algolia/models/ingestion/source_csv.rb +0 -5
- data/lib/algolia/models/ingestion/source_docker.rb +8 -3
- data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +7 -3
- data/lib/algolia/models/ingestion/source_input.rb +5 -6
- data/lib/algolia/models/ingestion/source_json.rb +0 -5
- data/lib/algolia/models/ingestion/source_search.rb +0 -5
- data/lib/algolia/models/ingestion/source_shopify.rb +5 -3
- data/lib/algolia/models/ingestion/source_update.rb +0 -5
- data/lib/algolia/models/ingestion/source_update_commercetools.rb +0 -5
- data/lib/algolia/models/ingestion/source_update_docker.rb +5 -3
- data/lib/algolia/models/ingestion/source_update_input.rb +5 -6
- data/lib/algolia/models/ingestion/source_update_response.rb +0 -5
- data/lib/algolia/models/ingestion/source_update_shopify.rb +0 -5
- data/lib/algolia/models/ingestion/streaming_input.rb +5 -3
- data/lib/algolia/models/ingestion/streaming_trigger.rb +0 -5
- data/lib/algolia/models/ingestion/subscription_trigger.rb +0 -5
- data/lib/algolia/models/ingestion/task.rb +20 -5
- data/lib/algolia/models/ingestion/task_create.rb +22 -9
- data/lib/algolia/models/ingestion/task_create_response.rb +0 -5
- data/lib/algolia/models/ingestion/task_create_trigger.rb +5 -6
- data/lib/algolia/models/ingestion/task_create_v1.rb +0 -5
- data/lib/algolia/models/ingestion/task_input.rb +5 -6
- data/lib/algolia/models/ingestion/task_search.rb +0 -5
- data/lib/algolia/models/ingestion/task_update.rb +22 -9
- data/lib/algolia/models/ingestion/task_update_response.rb +0 -5
- data/lib/algolia/models/ingestion/task_update_v1.rb +0 -5
- data/lib/algolia/models/ingestion/task_v1.rb +20 -5
- data/lib/algolia/models/ingestion/transformation.rb +0 -5
- data/lib/algolia/models/ingestion/transformation_create.rb +0 -5
- data/lib/algolia/models/ingestion/transformation_create_response.rb +0 -5
- data/lib/algolia/models/ingestion/transformation_error.rb +0 -5
- data/lib/algolia/models/ingestion/transformation_search.rb +0 -5
- data/lib/algolia/models/ingestion/transformation_try.rb +0 -5
- data/lib/algolia/models/ingestion/transformation_try_response.rb +0 -5
- data/lib/algolia/models/ingestion/transformation_update_response.rb +0 -5
- data/lib/algolia/models/ingestion/trigger.rb +5 -6
- data/lib/algolia/models/ingestion/trigger_update_input.rb +0 -5
- data/lib/algolia/models/ingestion/watch_response.rb +0 -5
- data/lib/algolia/models/ingestion/window.rb +0 -5
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +7 -3
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +8 -3
- data/lib/algolia/models/insights/clicked_filters.rb +6 -3
- data/lib/algolia/models/insights/clicked_object_ids.rb +6 -3
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +7 -3
- data/lib/algolia/models/insights/converted_filters.rb +6 -3
- data/lib/algolia/models/insights/converted_object_ids.rb +6 -3
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +6 -3
- data/lib/algolia/models/insights/discount.rb +5 -6
- data/lib/algolia/models/insights/error_base.rb +0 -5
- data/lib/algolia/models/insights/events_items.rb +5 -6
- data/lib/algolia/models/insights/events_response.rb +0 -5
- data/lib/algolia/models/insights/insights_events.rb +0 -5
- data/lib/algolia/models/insights/object_data.rb +0 -5
- data/lib/algolia/models/insights/object_data_after_search.rb +0 -5
- data/lib/algolia/models/insights/price.rb +5 -6
- data/lib/algolia/models/insights/purchased_object_ids.rb +7 -3
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +8 -3
- data/lib/algolia/models/insights/value.rb +5 -6
- data/lib/algolia/models/insights/viewed_filters.rb +6 -3
- data/lib/algolia/models/insights/viewed_object_ids.rb +6 -3
- data/lib/algolia/models/monitoring/error_base.rb +0 -5
- data/lib/algolia/models/monitoring/incident.rb +0 -5
- data/lib/algolia/models/monitoring/incident_entry.rb +0 -5
- data/lib/algolia/models/monitoring/incidents_response.rb +0 -5
- data/lib/algolia/models/monitoring/indexing_metric.rb +0 -5
- data/lib/algolia/models/monitoring/indexing_time_response.rb +0 -5
- data/lib/algolia/models/monitoring/infrastructure_response.rb +0 -5
- data/lib/algolia/models/monitoring/inventory_response.rb +0 -5
- data/lib/algolia/models/monitoring/latency_metric.rb +0 -5
- data/lib/algolia/models/monitoring/latency_response.rb +0 -5
- data/lib/algolia/models/monitoring/metrics.rb +0 -5
- data/lib/algolia/models/monitoring/probes_metric.rb +0 -5
- data/lib/algolia/models/monitoring/server.rb +0 -5
- data/lib/algolia/models/monitoring/status_response.rb +0 -5
- data/lib/algolia/models/monitoring/time_entry.rb +0 -5
- data/lib/algolia/models/personalization/delete_user_profile_response.rb +0 -5
- data/lib/algolia/models/personalization/error_base.rb +0 -5
- data/lib/algolia/models/personalization/{event_scoring.rb → events_scoring.rb} +3 -8
- data/lib/algolia/models/personalization/{facet_scoring.rb → facets_scoring.rb} +3 -8
- data/lib/algolia/models/personalization/get_user_token_response.rb +0 -5
- data/lib/algolia/models/personalization/personalization_strategy_params.rb +17 -22
- data/lib/algolia/models/personalization/set_personalization_strategy_response.rb +0 -5
- data/lib/algolia/models/query-suggestions/base_response.rb +0 -5
- data/lib/algolia/models/query-suggestions/config_status.rb +0 -5
- data/lib/algolia/models/query-suggestions/configuration.rb +0 -5
- data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -5
- data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -5
- data/lib/algolia/models/query-suggestions/error_base.rb +0 -5
- data/lib/algolia/models/query-suggestions/facet.rb +0 -5
- data/lib/algolia/models/query-suggestions/languages.rb +5 -6
- data/lib/algolia/models/query-suggestions/log_file.rb +0 -5
- data/lib/algolia/models/query-suggestions/source_index.rb +0 -5
- data/lib/algolia/models/recommend/around_precision.rb +5 -6
- data/lib/algolia/models/recommend/around_radius.rb +5 -6
- data/lib/algolia/models/recommend/auto_facet_filter.rb +0 -5
- data/lib/algolia/models/recommend/banner.rb +0 -5
- data/lib/algolia/models/recommend/banner_image.rb +0 -5
- data/lib/algolia/models/recommend/banner_image_url.rb +0 -5
- data/lib/algolia/models/recommend/banner_link.rb +0 -5
- data/lib/algolia/models/recommend/bought_together_query.rb +0 -5
- data/lib/algolia/models/recommend/condition.rb +0 -5
- data/lib/algolia/models/recommend/consequence.rb +0 -5
- data/lib/algolia/models/recommend/deleted_at_response.rb +0 -5
- data/lib/algolia/models/recommend/distinct.rb +5 -6
- data/lib/algolia/models/recommend/error_base.rb +0 -5
- data/lib/algolia/models/recommend/exhaustive.rb +0 -5
- data/lib/algolia/models/recommend/facet_filters.rb +5 -6
- data/lib/algolia/models/recommend/facet_ordering.rb +0 -5
- data/lib/algolia/models/recommend/facet_stats.rb +0 -5
- data/lib/algolia/models/recommend/fallback_params.rb +0 -5
- data/lib/algolia/models/recommend/get_recommend_task_response.rb +0 -5
- data/lib/algolia/models/recommend/get_recommendations_params.rb +0 -5
- data/lib/algolia/models/recommend/get_recommendations_response.rb +0 -5
- data/lib/algolia/models/recommend/hide_consequence_object.rb +0 -5
- data/lib/algolia/models/recommend/highlight_result.rb +5 -6
- data/lib/algolia/models/recommend/highlight_result_option.rb +6 -3
- data/lib/algolia/models/recommend/ignore_plurals.rb +5 -6
- data/lib/algolia/models/recommend/index_settings_facets.rb +0 -5
- data/lib/algolia/models/recommend/inside_bounding_box.rb +5 -6
- data/lib/algolia/models/recommend/looking_similar_query.rb +0 -5
- data/lib/algolia/models/recommend/matched_geo_location.rb +0 -5
- data/lib/algolia/models/recommend/numeric_filters.rb +5 -6
- data/lib/algolia/models/recommend/optional_filters.rb +5 -6
- data/lib/algolia/models/recommend/optional_words.rb +5 -6
- data/lib/algolia/models/recommend/params_consequence.rb +0 -5
- data/lib/algolia/models/recommend/personalization.rb +0 -5
- data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -5
- data/lib/algolia/models/recommend/range.rb +0 -5
- data/lib/algolia/models/recommend/ranking_info.rb +0 -5
- data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +5 -6
- data/lib/algolia/models/recommend/recommend_hit.rb +5 -3
- data/lib/algolia/models/recommend/recommend_rule.rb +0 -5
- data/lib/algolia/models/recommend/recommend_search_params.rb +0 -5
- data/lib/algolia/models/recommend/recommend_updated_at_response.rb +0 -5
- data/lib/algolia/models/recommend/recommendations_hit.rb +5 -6
- data/lib/algolia/models/recommend/recommendations_request.rb +5 -6
- data/lib/algolia/models/recommend/recommendations_results.rb +0 -5
- data/lib/algolia/models/recommend/redirect.rb +0 -5
- data/lib/algolia/models/recommend/redirect_rule_index_data.rb +0 -5
- data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +0 -5
- data/lib/algolia/models/recommend/redirect_url.rb +0 -5
- data/lib/algolia/models/recommend/related_query.rb +0 -5
- data/lib/algolia/models/recommend/remove_stop_words.rb +5 -6
- data/lib/algolia/models/recommend/rendering_content.rb +0 -5
- data/lib/algolia/models/recommend/rule_metadata.rb +0 -5
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +0 -5
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -5
- data/lib/algolia/models/recommend/snippet_result.rb +5 -6
- data/lib/algolia/models/recommend/snippet_result_option.rb +5 -3
- data/lib/algolia/models/recommend/tag_filters.rb +5 -6
- data/lib/algolia/models/recommend/time_range.rb +0 -5
- data/lib/algolia/models/recommend/trending_facet_hit.rb +6 -3
- data/lib/algolia/models/recommend/trending_facets_query.rb +0 -5
- data/lib/algolia/models/recommend/trending_items_query.rb +0 -5
- data/lib/algolia/models/recommend/typo_tolerance.rb +5 -6
- data/lib/algolia/models/recommend/value.rb +0 -5
- data/lib/algolia/models/recommend/widgets.rb +0 -5
- data/lib/algolia/models/search/add_api_key_response.rb +0 -5
- data/lib/algolia/models/search/api_key.rb +0 -5
- data/lib/algolia/models/search/around_precision.rb +5 -6
- data/lib/algolia/models/search/around_radius.rb +5 -6
- data/lib/algolia/models/search/assign_user_id_params.rb +0 -5
- data/lib/algolia/models/search/attribute_to_update.rb +5 -6
- data/lib/algolia/models/search/automatic_facet_filter.rb +0 -5
- data/lib/algolia/models/search/automatic_facet_filters.rb +5 -6
- data/lib/algolia/models/search/banner.rb +0 -5
- data/lib/algolia/models/search/banner_image.rb +0 -5
- data/lib/algolia/models/search/banner_image_url.rb +0 -5
- data/lib/algolia/models/search/banner_link.rb +0 -5
- data/lib/algolia/models/search/batch_assign_user_ids_params.rb +0 -5
- data/lib/algolia/models/search/batch_dictionary_entries_params.rb +0 -5
- data/lib/algolia/models/search/batch_dictionary_entries_request.rb +0 -5
- data/lib/algolia/models/search/batch_params.rb +0 -5
- data/lib/algolia/models/search/batch_request.rb +0 -5
- data/lib/algolia/models/search/batch_response.rb +0 -5
- data/lib/algolia/models/search/batch_write_params.rb +0 -5
- data/lib/algolia/models/search/browse_params.rb +5 -6
- data/lib/algolia/models/search/browse_params_object.rb +0 -5
- data/lib/algolia/models/search/browse_response.rb +0 -5
- data/lib/algolia/models/search/built_in_operation.rb +0 -5
- data/lib/algolia/models/search/built_in_operation_value.rb +5 -6
- data/lib/algolia/models/search/condition.rb +0 -5
- data/lib/algolia/models/search/consequence.rb +0 -5
- data/lib/algolia/models/search/consequence_hide.rb +0 -5
- data/lib/algolia/models/search/consequence_params.rb +0 -5
- data/lib/algolia/models/search/consequence_query.rb +5 -6
- data/lib/algolia/models/search/consequence_query_object.rb +0 -5
- data/lib/algolia/models/search/created_at_response.rb +0 -5
- data/lib/algolia/models/search/delete_api_key_response.rb +0 -5
- data/lib/algolia/models/search/delete_by_params.rb +0 -5
- data/lib/algolia/models/search/delete_source_response.rb +0 -5
- data/lib/algolia/models/search/deleted_at_response.rb +0 -5
- data/lib/algolia/models/search/dictionary_entry.rb +0 -5
- data/lib/algolia/models/search/dictionary_language.rb +0 -5
- data/lib/algolia/models/search/dictionary_settings_params.rb +0 -5
- data/lib/algolia/models/search/distinct.rb +5 -6
- data/lib/algolia/models/search/edit.rb +0 -5
- data/lib/algolia/models/search/error_base.rb +0 -5
- data/lib/algolia/models/search/exhaustive.rb +0 -5
- data/lib/algolia/models/search/facet_filters.rb +5 -6
- data/lib/algolia/models/search/facet_hits.rb +0 -5
- data/lib/algolia/models/search/facet_ordering.rb +0 -5
- data/lib/algolia/models/search/facet_stats.rb +0 -5
- data/lib/algolia/models/search/facets.rb +0 -5
- data/lib/algolia/models/search/fetched_index.rb +0 -5
- data/lib/algolia/models/search/get_api_key_response.rb +0 -5
- data/lib/algolia/models/search/get_dictionary_settings_response.rb +0 -5
- data/lib/algolia/models/search/get_logs_response.rb +0 -5
- data/lib/algolia/models/search/get_objects_params.rb +0 -5
- data/lib/algolia/models/search/get_objects_request.rb +0 -5
- data/lib/algolia/models/search/get_objects_response.rb +0 -5
- data/lib/algolia/models/search/get_task_response.rb +0 -5
- data/lib/algolia/models/search/get_top_user_ids_response.rb +0 -5
- data/lib/algolia/models/search/has_pending_mappings_response.rb +0 -5
- data/lib/algolia/models/search/highlight_result.rb +5 -6
- data/lib/algolia/models/search/highlight_result_option.rb +6 -3
- data/lib/algolia/models/search/hit.rb +0 -5
- data/lib/algolia/models/search/ignore_plurals.rb +5 -6
- data/lib/algolia/models/search/index_settings.rb +0 -5
- data/lib/algolia/models/search/inside_bounding_box.rb +5 -6
- data/lib/algolia/models/search/languages.rb +0 -5
- data/lib/algolia/models/search/list_api_keys_response.rb +0 -5
- data/lib/algolia/models/search/list_clusters_response.rb +0 -5
- data/lib/algolia/models/search/list_indices_response.rb +0 -5
- data/lib/algolia/models/search/list_user_ids_response.rb +0 -5
- data/lib/algolia/models/search/log.rb +0 -5
- data/lib/algolia/models/search/log_query.rb +0 -5
- data/lib/algolia/models/search/matched_geo_location.rb +0 -5
- data/lib/algolia/models/search/multiple_batch_request.rb +0 -5
- data/lib/algolia/models/search/multiple_batch_response.rb +0 -5
- data/lib/algolia/models/search/numeric_filters.rb +5 -6
- data/lib/algolia/models/search/operation_index_params.rb +0 -5
- data/lib/algolia/models/search/optional_filters.rb +5 -6
- data/lib/algolia/models/search/optional_words.rb +5 -6
- data/lib/algolia/models/search/personalization.rb +0 -5
- data/lib/algolia/models/search/promote.rb +5 -6
- data/lib/algolia/models/search/promote_object_id.rb +5 -3
- data/lib/algolia/models/search/promote_object_ids.rb +5 -3
- data/lib/algolia/models/search/range.rb +0 -5
- data/lib/algolia/models/search/ranking_info.rb +0 -5
- data/lib/algolia/models/search/re_ranking_apply_filter.rb +5 -6
- data/lib/algolia/models/search/redirect.rb +0 -5
- data/lib/algolia/models/search/redirect_rule_index_data.rb +0 -5
- data/lib/algolia/models/search/redirect_rule_index_metadata.rb +0 -5
- data/lib/algolia/models/search/redirect_url.rb +0 -5
- data/lib/algolia/models/search/remove_stop_words.rb +5 -6
- data/lib/algolia/models/search/remove_user_id_response.rb +0 -5
- data/lib/algolia/models/search/rendering_content.rb +0 -5
- data/lib/algolia/models/search/replace_all_objects_response.rb +0 -5
- data/lib/algolia/models/search/replace_source_response.rb +0 -5
- data/lib/algolia/models/search/rule.rb +0 -5
- data/lib/algolia/models/search/save_object_response.rb +0 -5
- data/lib/algolia/models/search/save_synonym_response.rb +0 -5
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -5
- data/lib/algolia/models/search/search_dictionary_entries_response.rb +0 -5
- data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -5
- data/lib/algolia/models/search/search_for_facet_values_response.rb +5 -3
- data/lib/algolia/models/search/search_for_facets.rb +6 -3
- data/lib/algolia/models/search/search_for_hits.rb +0 -5
- data/lib/algolia/models/search/search_method_params.rb +0 -5
- data/lib/algolia/models/search/search_params.rb +5 -6
- data/lib/algolia/models/search/search_params_object.rb +0 -5
- data/lib/algolia/models/search/search_params_string.rb +5 -3
- data/lib/algolia/models/search/search_query.rb +5 -6
- data/lib/algolia/models/search/search_response.rb +0 -5
- data/lib/algolia/models/search/search_responses.rb +0 -5
- data/lib/algolia/models/search/search_result.rb +5 -6
- data/lib/algolia/models/search/search_rules_params.rb +0 -5
- data/lib/algolia/models/search/search_rules_response.rb +0 -5
- data/lib/algolia/models/search/search_synonyms_params.rb +0 -5
- data/lib/algolia/models/search/search_synonyms_response.rb +0 -5
- data/lib/algolia/models/search/search_user_ids_params.rb +0 -5
- data/lib/algolia/models/search/search_user_ids_response.rb +0 -5
- data/lib/algolia/models/search/secured_api_key_restrictions.rb +0 -5
- data/lib/algolia/models/search/semantic_search.rb +0 -5
- data/lib/algolia/models/search/settings_response.rb +0 -5
- data/lib/algolia/models/search/snippet_result.rb +5 -6
- data/lib/algolia/models/search/snippet_result_option.rb +5 -3
- data/lib/algolia/models/search/source.rb +0 -5
- data/lib/algolia/models/search/standard_entries.rb +0 -5
- data/lib/algolia/models/search/synonym_hit.rb +0 -5
- data/lib/algolia/models/search/tag_filters.rb +5 -6
- data/lib/algolia/models/search/time_range.rb +0 -5
- data/lib/algolia/models/search/typo_tolerance.rb +5 -6
- data/lib/algolia/models/search/update_api_key_response.rb +0 -5
- data/lib/algolia/models/search/updated_at_response.rb +0 -5
- data/lib/algolia/models/search/updated_at_with_object_id_response.rb +0 -5
- data/lib/algolia/models/search/user_highlight_result.rb +0 -5
- data/lib/algolia/models/search/user_hit.rb +0 -5
- data/lib/algolia/models/search/user_id.rb +0 -5
- data/lib/algolia/models/search/value.rb +0 -5
- data/lib/algolia/models/search/widgets.rb +0 -5
- data/lib/algolia/version.rb +1 -1
- metadata +8 -9
@@ -46,7 +46,6 @@ module Algolia
|
|
46
46
|
|
47
47
|
SchemaMismatchError = Class.new(StandardError)
|
48
48
|
|
49
|
-
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
50
49
|
def find_and_cast_into_type(klass, data)
|
51
50
|
return if data.nil?
|
52
51
|
|
@@ -85,12 +84,12 @@ module Algolia
|
|
85
84
|
if const.respond_to?(:openapi_one_of)
|
86
85
|
# nested oneOf model
|
87
86
|
model = const.build(data)
|
88
|
-
elsif const.respond_to?(:
|
89
|
-
|
90
|
-
|
91
|
-
|
87
|
+
elsif const.respond_to?(:discriminator_attributes)
|
88
|
+
if const.discriminator_attributes.all? { |attr| data.key?(attr) }
|
89
|
+
model = const.build_from_hash(data)
|
90
|
+
end
|
92
91
|
else
|
93
|
-
# maybe it's an enum
|
92
|
+
# maybe it's an enum, or doens't have discriminators
|
94
93
|
model = const.build_from_hash(data)
|
95
94
|
end
|
96
95
|
|
@@ -21,6 +21,10 @@ module Algolia
|
|
21
21
|
# Maximum accepted percentage of failures for a task run to finish successfully.
|
22
22
|
attr_accessor :failure_threshold
|
23
23
|
|
24
|
+
attr_accessor :notifications
|
25
|
+
|
26
|
+
attr_accessor :policies
|
27
|
+
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
29
|
def self.attribute_map
|
26
30
|
{
|
@@ -28,15 +32,12 @@ module Algolia
|
|
28
32
|
:cron => :cron,
|
29
33
|
:input => :input,
|
30
34
|
:enabled => :enabled,
|
31
|
-
:failure_threshold => :failureThreshold
|
35
|
+
:failure_threshold => :failureThreshold,
|
36
|
+
:notifications => :notifications,
|
37
|
+
:policies => :policies
|
32
38
|
}
|
33
39
|
end
|
34
40
|
|
35
|
-
# Returns all the JSON keys this model knows about
|
36
|
-
def self.acceptable_attributes
|
37
|
-
attribute_map.values
|
38
|
-
end
|
39
|
-
|
40
41
|
# Attribute type mapping.
|
41
42
|
def self.types_mapping
|
42
43
|
{
|
@@ -44,7 +45,9 @@ module Algolia
|
|
44
45
|
:cron => :"String",
|
45
46
|
:input => :"TaskInput",
|
46
47
|
:enabled => :"Boolean",
|
47
|
-
:failure_threshold => :"Integer"
|
48
|
+
:failure_threshold => :"Integer",
|
49
|
+
:notifications => :"Notifications",
|
50
|
+
:policies => :"Policies"
|
48
51
|
}
|
49
52
|
end
|
50
53
|
|
@@ -97,6 +100,14 @@ module Algolia
|
|
97
100
|
if attributes.key?(:failure_threshold)
|
98
101
|
self.failure_threshold = attributes[:failure_threshold]
|
99
102
|
end
|
103
|
+
|
104
|
+
if attributes.key?(:notifications)
|
105
|
+
self.notifications = attributes[:notifications]
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:policies)
|
109
|
+
self.policies = attributes[:policies]
|
110
|
+
end
|
100
111
|
end
|
101
112
|
|
102
113
|
# Checks equality by comparing each attribute.
|
@@ -108,7 +119,9 @@ module Algolia
|
|
108
119
|
cron == other.cron &&
|
109
120
|
input == other.input &&
|
110
121
|
enabled == other.enabled &&
|
111
|
-
failure_threshold == other.failure_threshold
|
122
|
+
failure_threshold == other.failure_threshold &&
|
123
|
+
notifications == other.notifications &&
|
124
|
+
policies == other.policies
|
112
125
|
end
|
113
126
|
|
114
127
|
# @see the `==` method
|
@@ -120,7 +133,7 @@ module Algolia
|
|
120
133
|
# Calculates hash code according to all attributes.
|
121
134
|
# @return [Integer] Hash code
|
122
135
|
def hash
|
123
|
-
[destination_id, cron, input, enabled, failure_threshold].hash
|
136
|
+
[destination_id, cron, input, enabled, failure_threshold, notifications, policies].hash
|
124
137
|
end
|
125
138
|
|
126
139
|
# Builds the object from hash
|
@@ -31,6 +31,10 @@ module Algolia
|
|
31
31
|
# Date of the last cursor in RFC 3339 format.
|
32
32
|
attr_accessor :cursor
|
33
33
|
|
34
|
+
attr_accessor :notifications
|
35
|
+
|
36
|
+
attr_accessor :policies
|
37
|
+
|
34
38
|
# Date of creation in RFC 3339 format.
|
35
39
|
attr_accessor :created_at
|
36
40
|
|
@@ -49,16 +53,13 @@ module Algolia
|
|
49
53
|
:failure_threshold => :failureThreshold,
|
50
54
|
:action => :action,
|
51
55
|
:cursor => :cursor,
|
56
|
+
:notifications => :notifications,
|
57
|
+
:policies => :policies,
|
52
58
|
:created_at => :createdAt,
|
53
59
|
:updated_at => :updatedAt
|
54
60
|
}
|
55
61
|
end
|
56
62
|
|
57
|
-
# Returns all the JSON keys this model knows about
|
58
|
-
def self.acceptable_attributes
|
59
|
-
attribute_map.values
|
60
|
-
end
|
61
|
-
|
62
63
|
# Attribute type mapping.
|
63
64
|
def self.types_mapping
|
64
65
|
{
|
@@ -71,6 +72,8 @@ module Algolia
|
|
71
72
|
:failure_threshold => :"Integer",
|
72
73
|
:action => :"ActionType",
|
73
74
|
:cursor => :"String",
|
75
|
+
:notifications => :"Notifications",
|
76
|
+
:policies => :"Policies",
|
74
77
|
:created_at => :"String",
|
75
78
|
:updated_at => :"String"
|
76
79
|
}
|
@@ -149,6 +152,14 @@ module Algolia
|
|
149
152
|
self.cursor = attributes[:cursor]
|
150
153
|
end
|
151
154
|
|
155
|
+
if attributes.key?(:notifications)
|
156
|
+
self.notifications = attributes[:notifications]
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:policies)
|
160
|
+
self.policies = attributes[:policies]
|
161
|
+
end
|
162
|
+
|
152
163
|
if attributes.key?(:created_at)
|
153
164
|
self.created_at = attributes[:created_at]
|
154
165
|
else
|
@@ -174,6 +185,8 @@ module Algolia
|
|
174
185
|
failure_threshold == other.failure_threshold &&
|
175
186
|
action == other.action &&
|
176
187
|
cursor == other.cursor &&
|
188
|
+
notifications == other.notifications &&
|
189
|
+
policies == other.policies &&
|
177
190
|
created_at == other.created_at &&
|
178
191
|
updated_at == other.updated_at
|
179
192
|
end
|
@@ -197,6 +210,8 @@ module Algolia
|
|
197
210
|
failure_threshold,
|
198
211
|
action,
|
199
212
|
cursor,
|
213
|
+
notifications,
|
214
|
+
policies,
|
200
215
|
created_at,
|
201
216
|
updated_at
|
202
217
|
].hash
|
@@ -47,7 +47,6 @@ module Algolia
|
|
47
47
|
|
48
48
|
SchemaMismatchError = Class.new(StandardError)
|
49
49
|
|
50
|
-
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
51
50
|
def find_and_cast_into_type(klass, data)
|
52
51
|
return if data.nil?
|
53
52
|
|
@@ -86,12 +85,12 @@ module Algolia
|
|
86
85
|
if const.respond_to?(:openapi_one_of)
|
87
86
|
# nested oneOf model
|
88
87
|
model = const.build(data)
|
89
|
-
elsif const.respond_to?(:
|
90
|
-
|
91
|
-
|
92
|
-
|
88
|
+
elsif const.respond_to?(:discriminator_attributes)
|
89
|
+
if const.discriminator_attributes.all? { |attr| data.key?(attr) }
|
90
|
+
model = const.build_from_hash(data)
|
91
|
+
end
|
93
92
|
else
|
94
|
-
# maybe it's an enum
|
93
|
+
# maybe it's an enum, or doens't have discriminators
|
95
94
|
model = const.build_from_hash(data)
|
96
95
|
end
|
97
96
|
|
@@ -54,9 +54,13 @@ module Algolia
|
|
54
54
|
}
|
55
55
|
end
|
56
56
|
|
57
|
-
# Returns
|
58
|
-
def self.
|
59
|
-
|
57
|
+
# Returns the keys that uniquely identify this oneOf variant when present
|
58
|
+
def self.discriminator_attributes
|
59
|
+
[
|
60
|
+
:eventType,
|
61
|
+
:eventSubtype,
|
62
|
+
:objectIDs
|
63
|
+
]
|
60
64
|
end
|
61
65
|
|
62
66
|
# Attribute type mapping.
|
@@ -58,9 +58,14 @@ module Algolia
|
|
58
58
|
}
|
59
59
|
end
|
60
60
|
|
61
|
-
# Returns
|
62
|
-
def self.
|
63
|
-
|
61
|
+
# Returns the keys that uniquely identify this oneOf variant when present
|
62
|
+
def self.discriminator_attributes
|
63
|
+
[
|
64
|
+
:eventType,
|
65
|
+
:eventSubtype,
|
66
|
+
:queryID,
|
67
|
+
:objectIDs
|
68
|
+
]
|
64
69
|
end
|
65
70
|
|
66
71
|
# Attribute type mapping.
|
@@ -40,9 +40,12 @@ module Algolia
|
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
43
|
-
# Returns
|
44
|
-
def self.
|
45
|
-
|
43
|
+
# Returns the keys that uniquely identify this oneOf variant when present
|
44
|
+
def self.discriminator_attributes
|
45
|
+
[
|
46
|
+
:eventType,
|
47
|
+
:filters
|
48
|
+
]
|
46
49
|
end
|
47
50
|
|
48
51
|
# Attribute type mapping.
|
@@ -40,9 +40,12 @@ module Algolia
|
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
43
|
-
# Returns
|
44
|
-
def self.
|
45
|
-
|
43
|
+
# Returns the keys that uniquely identify this oneOf variant when present
|
44
|
+
def self.discriminator_attributes
|
45
|
+
[
|
46
|
+
:eventType,
|
47
|
+
:objectIDs
|
48
|
+
]
|
46
49
|
end
|
47
50
|
|
48
51
|
# Attribute type mapping.
|
@@ -48,9 +48,13 @@ module Algolia
|
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
51
|
-
# Returns
|
52
|
-
def self.
|
53
|
-
|
51
|
+
# Returns the keys that uniquely identify this oneOf variant when present
|
52
|
+
def self.discriminator_attributes
|
53
|
+
[
|
54
|
+
:positions,
|
55
|
+
:queryID,
|
56
|
+
:eventType
|
57
|
+
]
|
54
58
|
end
|
55
59
|
|
56
60
|
# Attribute type mapping.
|
@@ -39,9 +39,12 @@ module Algolia
|
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
42
|
-
# Returns
|
43
|
-
def self.
|
44
|
-
|
42
|
+
# Returns the keys that uniquely identify this oneOf variant when present
|
43
|
+
def self.discriminator_attributes
|
44
|
+
[
|
45
|
+
:eventType,
|
46
|
+
:filters
|
47
|
+
]
|
45
48
|
end
|
46
49
|
|
47
50
|
# Attribute type mapping.
|
@@ -40,9 +40,12 @@ module Algolia
|
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
43
|
-
# Returns
|
44
|
-
def self.
|
45
|
-
|
43
|
+
# Returns the keys that uniquely identify this oneOf variant when present
|
44
|
+
def self.discriminator_attributes
|
45
|
+
[
|
46
|
+
:eventType,
|
47
|
+
:objectIDs
|
48
|
+
]
|
46
49
|
end
|
47
50
|
|
48
51
|
# Attribute type mapping.
|
@@ -44,9 +44,12 @@ module Algolia
|
|
44
44
|
}
|
45
45
|
end
|
46
46
|
|
47
|
-
# Returns
|
48
|
-
def self.
|
49
|
-
|
47
|
+
# Returns the keys that uniquely identify this oneOf variant when present
|
48
|
+
def self.discriminator_attributes
|
49
|
+
[
|
50
|
+
:queryID,
|
51
|
+
:eventType
|
52
|
+
]
|
50
53
|
end
|
51
54
|
|
52
55
|
# Attribute type mapping.
|
@@ -45,7 +45,6 @@ module Algolia
|
|
45
45
|
|
46
46
|
SchemaMismatchError = Class.new(StandardError)
|
47
47
|
|
48
|
-
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
49
48
|
def find_and_cast_into_type(klass, data)
|
50
49
|
return if data.nil?
|
51
50
|
|
@@ -84,12 +83,12 @@ module Algolia
|
|
84
83
|
if const.respond_to?(:openapi_one_of)
|
85
84
|
# nested oneOf model
|
86
85
|
model = const.build(data)
|
87
|
-
elsif const.respond_to?(:
|
88
|
-
|
89
|
-
|
90
|
-
|
86
|
+
elsif const.respond_to?(:discriminator_attributes)
|
87
|
+
if const.discriminator_attributes.all? { |attr| data.key?(attr) }
|
88
|
+
model = const.build_from_hash(data)
|
89
|
+
end
|
91
90
|
else
|
92
|
-
# maybe it's an enum
|
91
|
+
# maybe it's an enum, or doens't have discriminators
|
93
92
|
model = const.build_from_hash(data)
|
94
93
|
end
|
95
94
|
|
@@ -54,7 +54,6 @@ module Algolia
|
|
54
54
|
|
55
55
|
SchemaMismatchError = Class.new(StandardError)
|
56
56
|
|
57
|
-
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
58
57
|
def find_and_cast_into_type(klass, data)
|
59
58
|
return if data.nil?
|
60
59
|
|
@@ -93,12 +92,12 @@ module Algolia
|
|
93
92
|
if const.respond_to?(:openapi_one_of)
|
94
93
|
# nested oneOf model
|
95
94
|
model = const.build(data)
|
96
|
-
elsif const.respond_to?(:
|
97
|
-
|
98
|
-
|
99
|
-
|
95
|
+
elsif const.respond_to?(:discriminator_attributes)
|
96
|
+
if const.discriminator_attributes.all? { |attr| data.key?(attr) }
|
97
|
+
model = const.build_from_hash(data)
|
98
|
+
end
|
100
99
|
else
|
101
|
-
# maybe it's an enum
|
100
|
+
# maybe it's an enum, or doens't have discriminators
|
102
101
|
model = const.build_from_hash(data)
|
103
102
|
end
|
104
103
|
|
@@ -45,7 +45,6 @@ module Algolia
|
|
45
45
|
|
46
46
|
SchemaMismatchError = Class.new(StandardError)
|
47
47
|
|
48
|
-
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
49
48
|
def find_and_cast_into_type(klass, data)
|
50
49
|
return if data.nil?
|
51
50
|
|
@@ -84,12 +83,12 @@ module Algolia
|
|
84
83
|
if const.respond_to?(:openapi_one_of)
|
85
84
|
# nested oneOf model
|
86
85
|
model = const.build(data)
|
87
|
-
elsif const.respond_to?(:
|
88
|
-
|
89
|
-
|
90
|
-
|
86
|
+
elsif const.respond_to?(:discriminator_attributes)
|
87
|
+
if const.discriminator_attributes.all? { |attr| data.key?(attr) }
|
88
|
+
model = const.build_from_hash(data)
|
89
|
+
end
|
91
90
|
else
|
92
|
-
# maybe it's an enum
|
91
|
+
# maybe it's an enum, or doens't have discriminators
|
93
92
|
model = const.build_from_hash(data)
|
94
93
|
end
|
95
94
|
|