schematichq 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.fern/metadata.json +4 -4
- data/.fern/replay.lock +10 -0
- data/.fernignore +3 -0
- data/README.md +1 -1
- data/lib/schematic/accounts/client.rb +76 -0
- data/lib/schematic/accounts/types/get_account_member_response.rb +12 -0
- data/lib/schematic/accounts/types/list_account_members_params.rb +15 -0
- data/lib/schematic/accounts/types/list_account_members_request.rb +14 -0
- data/lib/schematic/accounts/types/list_account_members_response.rb +12 -0
- data/lib/schematic/billing/client.rb +6 -2
- data/lib/schematic/billing/types/count_billing_products_params.rb +1 -0
- data/lib/schematic/billing/types/count_billing_products_request.rb +1 -0
- data/lib/schematic/billing/types/create_billing_price_request_body.rb +2 -0
- data/lib/schematic/billing/types/create_billing_subscription_request_body.rb +1 -0
- data/lib/schematic/billing/types/create_meter_request_body.rb +1 -0
- data/lib/schematic/billing/types/list_billing_products_params.rb +1 -0
- data/lib/schematic/billing/types/list_billing_products_request.rb +1 -0
- data/lib/schematic/cache.rb +7 -4
- data/lib/schematic/client.rb +14 -4
- data/lib/schematic/companies/client.rb +8 -105
- data/lib/schematic/companies/types/count_companies_params.rb +1 -0
- data/lib/schematic/companies/types/count_companies_request.rb +1 -0
- data/lib/schematic/companies/types/list_companies_params.rb +1 -0
- data/lib/schematic/companies/types/list_companies_request.rb +1 -0
- data/lib/schematic/companies/types/list_plan_changes_params.rb +2 -2
- data/lib/schematic/companies/types/list_plan_changes_request.rb +2 -2
- data/lib/schematic/credits/client.rb +44 -2
- data/lib/schematic/credits/types/count_billing_plan_credit_grants_params.rb +1 -0
- data/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb +1 -0
- data/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb +1 -0
- data/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb +1 -0
- data/lib/schematic/credits/types/list_company_credit_balances_params.rb +12 -0
- data/lib/schematic/credits/types/list_company_credit_balances_request.rb +11 -0
- data/lib/schematic/credits/types/list_company_credit_balances_response.rb +12 -0
- data/lib/schematic/datastream/client.rb +28 -21
- data/lib/schematic/datastream/websocket_client.rb +32 -1
- data/lib/schematic/entitlements/client.rb +38 -2
- data/lib/schematic/entitlements/types/count_feature_usage_params.rb +1 -0
- data/lib/schematic/entitlements/types/count_feature_usage_request.rb +1 -0
- data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +44 -0
- data/lib/schematic/entitlements/types/create_company_override_request_body.rb +2 -2
- data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +6 -2
- data/lib/schematic/entitlements/types/list_feature_usage_params.rb +1 -0
- data/lib/schematic/entitlements/types/list_feature_usage_request.rb +1 -0
- data/lib/schematic/entitlements/types/update_company_override_request_body.rb +2 -2
- data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +6 -2
- data/lib/schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response.rb +12 -0
- data/lib/schematic/event_buffer.rb +10 -2
- data/lib/schematic/events/client.rb +3 -1
- data/lib/schematic/events/types/list_events_params.rb +1 -0
- data/lib/schematic/events/types/list_events_request.rb +1 -0
- data/lib/schematic/features/client.rb +50 -14
- data/lib/schematic/features/types/count_features_params.rb +1 -0
- data/lib/schematic/features/types/count_features_request.rb +4 -3
- data/lib/schematic/features/types/create_billing_linked_feature_request_body.rb +23 -0
- data/lib/schematic/features/types/create_feature_request_body.rb +1 -1
- data/lib/schematic/features/types/list_features_params.rb +1 -0
- data/lib/schematic/features/types/list_features_request.rb +4 -3
- data/lib/schematic/features/types/update_feature_request_body.rb +1 -1
- data/lib/schematic/features/types/upsert_feature_for_billing_product_response.rb +12 -0
- data/lib/schematic/insights/client.rb +251 -0
- data/lib/schematic/insights/types/get_activity_params.rb +12 -0
- data/lib/schematic/insights/types/get_activity_request.rb +11 -0
- data/lib/schematic/insights/types/get_activity_response.rb +12 -0
- data/lib/schematic/insights/types/get_environment_feature_usage_time_series_params.rb +15 -0
- data/lib/schematic/insights/types/get_environment_feature_usage_time_series_request.rb +14 -0
- data/lib/schematic/insights/types/get_environment_feature_usage_time_series_response.rb +12 -0
- data/lib/schematic/insights/types/get_environment_trait_usage_time_series_params.rb +15 -0
- data/lib/schematic/insights/types/get_environment_trait_usage_time_series_request.rb +14 -0
- data/lib/schematic/insights/types/get_environment_trait_usage_time_series_response.rb +12 -0
- data/lib/schematic/insights/types/get_plan_growth_params.rb +12 -0
- data/lib/schematic/insights/types/get_plan_growth_request.rb +11 -0
- data/lib/schematic/insights/types/get_plan_growth_response.rb +12 -0
- data/lib/schematic/{companies/types/create_plan_trait_response.rb → insights/types/get_summary_response.rb} +3 -3
- data/lib/schematic/insights/types/get_top_features_by_usage_params.rb +14 -0
- data/lib/schematic/insights/types/get_top_features_by_usage_request.rb +13 -0
- data/lib/schematic/insights/types/get_top_features_by_usage_response.rb +12 -0
- data/lib/schematic/integrationsapi/client.rb +223 -0
- data/lib/schematic/integrationsapi/types/get_integration_webhook_url_response.rb +12 -0
- data/lib/schematic/integrationsapi/types/list_integrations_params.rb +18 -0
- data/lib/schematic/integrationsapi/types/list_integrations_request.rb +17 -0
- data/lib/schematic/integrationsapi/types/list_integrations_response.rb +12 -0
- data/lib/schematic/integrationsapi/types/load_sample_data_set_v_2_response.rb +12 -0
- data/lib/schematic/integrationsapi/types/run_integration_response.rb +12 -0
- data/lib/schematic/integrationsapi/types/start_data_import_request_body.rb +13 -0
- data/lib/schematic/integrationsapi/types/start_data_import_response.rb +12 -0
- data/lib/schematic/{companies/types/delete_plan_trait_response.rb → integrationsapi/types/uninstall_integration_response.rb} +2 -2
- data/lib/schematic/planbundle/client.rb +32 -0
- data/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb +13 -0
- data/lib/schematic/planbundle/types/create_custom_plan_bundle_response.rb +12 -0
- data/lib/schematic/plans/client.rb +251 -2
- data/lib/schematic/plans/types/count_billing_product_match_companies_params.rb +15 -0
- data/lib/schematic/plans/types/count_billing_product_match_companies_request.rb +14 -0
- data/lib/schematic/plans/types/count_billing_product_match_companies_response.rb +12 -0
- data/lib/schematic/plans/types/count_plans_params.rb +3 -0
- data/lib/schematic/plans/types/count_plans_request.rb +3 -0
- data/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb +17 -0
- data/lib/schematic/plans/types/create_custom_plan_request_body.rb +15 -0
- data/lib/schematic/{companies/types/update_plan_trait_response.rb → plans/types/create_custom_plan_response.rb} +3 -3
- data/lib/schematic/plans/types/list_billing_product_match_companies_params.rb +15 -0
- data/lib/schematic/plans/types/list_billing_product_match_companies_request.rb +14 -0
- data/lib/schematic/plans/types/list_billing_product_match_companies_response.rb +12 -0
- data/lib/schematic/plans/types/list_custom_plan_billings_params.rb +17 -0
- data/lib/schematic/plans/types/list_custom_plan_billings_request.rb +16 -0
- data/lib/schematic/plans/types/list_custom_plan_billings_response.rb +12 -0
- data/lib/schematic/plans/types/list_plans_params.rb +3 -0
- data/lib/schematic/plans/types/list_plans_request.rb +3 -0
- data/lib/schematic/plans/types/publish_plan_version_request_body.rb +4 -0
- data/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +15 -0
- data/lib/schematic/plans/types/retry_custom_plan_billing_response.rb +12 -0
- data/lib/schematic/plans/types/upsert_plan_for_billing_product_response.rb +12 -0
- data/lib/schematic/redis_cache.rb +5 -2
- data/lib/schematic/schematic_client.rb +0 -1
- data/lib/schematic/types/account_member_permission.rb +25 -0
- data/lib/schematic/types/account_member_response_data.rb +16 -0
- data/lib/schematic/types/{rulesengine_company_metric_month_reset.rb → account_member_role.rb} +3 -3
- data/lib/schematic/types/activity_entry_response_data.rb +14 -0
- data/lib/schematic/types/activity_response_response_data.rb +9 -0
- data/lib/schematic/types/api_key_create_response_data.rb +2 -0
- data/lib/schematic/types/api_key_integration_response_data.rb +11 -0
- data/lib/schematic/types/api_key_response_data.rb +2 -0
- data/lib/schematic/types/audit_log_list_response_data.rb +2 -0
- data/lib/schematic/types/audit_log_response_data.rb +2 -0
- data/lib/schematic/types/billing_credit_bundle_view.rb +1 -1
- data/lib/schematic/types/billing_credit_view.rb +1 -0
- data/lib/schematic/types/billing_linked_resource_response_data.rb +11 -0
- data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +2 -0
- data/lib/schematic/types/billing_price_response_data.rb +2 -0
- data/lib/schematic/types/billing_price_view.rb +2 -0
- data/lib/schematic/types/billing_product_for_subscription_response_data.rb +1 -0
- data/lib/schematic/types/billing_product_plan_response_data.rb +2 -1
- data/lib/schematic/types/billing_product_price_response_data.rb +2 -0
- data/lib/schematic/types/billing_provider_type.rb +1 -0
- data/lib/schematic/types/billing_strategy.rb +13 -0
- data/lib/schematic/types/change_subscription_internal_request_body.rb +1 -0
- data/lib/schematic/types/change_subscription_request_body.rb +1 -0
- data/lib/schematic/types/charge_type.rb +1 -0
- data/lib/schematic/types/check_flag_response_data.rb +2 -2
- data/lib/schematic/types/checkout_subscription.rb +1 -0
- data/lib/schematic/types/clerk_integration_config.rb +10 -0
- data/lib/schematic/types/company_credit_balance_response_data.rb +12 -0
- data/lib/schematic/types/company_detail_response_data.rb +1 -0
- data/lib/schematic/types/company_event_period_metrics_response_data.rb +2 -2
- data/lib/schematic/types/company_matching_criteria.rb +12 -0
- data/lib/schematic/types/company_override_response_data.rb +2 -2
- data/lib/schematic/types/company_plan_credit_grant_view.rb +40 -0
- data/lib/schematic/types/company_plan_detail_response_data.rb +9 -3
- data/lib/schematic/types/company_plan_with_billing_sub_view.rb +1 -1
- data/lib/schematic/types/company_subscription_response_data.rb +1 -0
- data/lib/schematic/types/{condition_operator.rb → comparable_operator.rb} +4 -4
- data/lib/schematic/types/condition.rb +4 -4
- data/lib/schematic/types/condition_response_data.rb +4 -4
- data/lib/schematic/types/{condition_condition_type.rb → condition_type.rb} +1 -1
- data/lib/schematic/types/condition_view.rb +4 -4
- data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +2 -0
- data/lib/schematic/types/create_custom_plan_bundle_plan_request_body.rb +12 -0
- data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +6 -2
- data/lib/schematic/types/create_entitlement_req_common.rb +2 -2
- data/lib/schematic/types/create_event_request_body.rb +3 -0
- data/lib/schematic/types/create_flag_request_body.rb +1 -1
- data/lib/schematic/types/create_or_update_condition_request_body.rb +4 -4
- data/lib/schematic/types/create_or_update_flag_request_body.rb +1 -1
- data/lib/schematic/types/create_or_update_rule_request_body.rb +1 -1
- data/lib/schematic/types/create_plan_request_body.rb +1 -1
- data/lib/schematic/types/credit_currency_price.rb +10 -0
- data/lib/schematic/types/currency_price_request_body.rb +3 -0
- data/lib/schematic/types/custom_plan_activation_strategy.rb +12 -0
- data/lib/schematic/types/custom_plan_billing_response_data.rb +19 -0
- data/lib/schematic/types/custom_plan_billing_status.rb +14 -0
- data/lib/schematic/types/data_event_payload.rb +3 -0
- data/lib/schematic/types/datastream_company_plan.rb +1 -0
- data/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb +1 -0
- data/lib/schematic/types/entitlement_currency_prices_response_data.rb +1 -0
- data/lib/schematic/types/environment_feature_usage_time_series_response_data.rb +11 -0
- data/lib/schematic/types/environment_trait_usage_time_series_response_data.rb +11 -0
- data/lib/schematic/types/environment_usage_point_response_data.rb +10 -0
- data/lib/schematic/types/event_detail_response_data.rb +2 -0
- data/lib/schematic/types/event_response_data.rb +1 -0
- data/lib/schematic/types/feature_company_response_data.rb +4 -3
- data/lib/schematic/types/feature_company_user_response_data.rb +2 -2
- data/lib/schematic/types/feature_detail_response_data.rb +3 -1
- data/lib/schematic/types/feature_entitlement.rb +2 -2
- data/lib/schematic/types/feature_in_plan_response_data.rb +26 -0
- data/lib/schematic/types/feature_response_data.rb +1 -1
- data/lib/schematic/types/feature_usage_response_data.rb +4 -3
- data/lib/schematic/types/feature_view.rb +1 -1
- data/lib/schematic/types/flag_detail_response_data.rb +2 -1
- data/lib/schematic/types/flag_in_plan_response_data.rb +21 -0
- data/lib/schematic/types/flag_response_data.rb +1 -1
- data/lib/schematic/types/flag_view.rb +0 -1
- data/lib/schematic/types/insights_summary_response_data.rb +14 -0
- data/lib/schematic/types/integration_capabilities.rb +11 -0
- data/lib/schematic/types/integration_config.rb +15 -0
- data/lib/schematic/types/integration_response_data.rb +13 -0
- data/lib/schematic/types/integration_state.rb +13 -0
- data/lib/schematic/types/{plan_controlled_by_type.rb → integration_type.rb} +4 -2
- data/lib/schematic/types/integration_webhook_url_response_data.rb +10 -0
- data/lib/schematic/types/integrations_data_set_response_data.rb +9 -0
- data/lib/schematic/types/integrations_list_response_data.rb +15 -0
- data/lib/schematic/types/integrations_response_data.rb +13 -0
- data/lib/schematic/types/{condition_metric_period.rb → metric_period.rb} +1 -1
- data/lib/schematic/types/{feature_entitlement_month_reset.rb → metric_period_month_reset.rb} +2 -2
- data/lib/schematic/types/mrr_response_data.rb +10 -0
- data/lib/schematic/types/orb_integration_config.rb +9 -0
- data/lib/schematic/types/plan_credit_grant_view.rb +2 -0
- data/lib/schematic/types/plan_currency_price_request_body.rb +1 -0
- data/lib/schematic/types/plan_currency_prices_response_data.rb +1 -0
- data/lib/schematic/types/plan_detail_response_data.rb +9 -3
- data/lib/schematic/types/plan_entitlement_response_data.rb +4 -2
- data/lib/schematic/types/plan_group_plan_detail_response_data.rb +9 -3
- data/lib/schematic/types/plan_growth_point_response_data.rb +12 -0
- data/lib/schematic/types/plan_growth_response_data.rb +9 -0
- data/lib/schematic/types/plan_icon.rb +35 -0
- data/lib/schematic/types/plan_response_data.rb +3 -1
- data/lib/schematic/types/plan_version_response_data.rb +1 -1
- data/lib/schematic/types/plan_view_public_response_data.rb +9 -3
- data/lib/schematic/types/rule.rb +1 -1
- data/lib/schematic/types/rule_condition_detail_response_data.rb +4 -4
- data/lib/schematic/types/rule_condition_response_data.rb +4 -4
- data/lib/schematic/types/rule_detail_response_data.rb +1 -1
- data/lib/schematic/types/rule_response_data.rb +1 -1
- data/lib/schematic/types/{rule_rule_type.rb → rule_type.rb} +3 -3
- data/lib/schematic/types/rule_view.rb +1 -1
- data/lib/schematic/types/rules_engine_schema_version.rb +1 -1
- data/lib/schematic/types/rulesengine_check_flag_result.rb +2 -2
- data/lib/schematic/types/rulesengine_company_metric.rb +2 -2
- data/lib/schematic/types/rulesengine_condition.rb +4 -4
- data/lib/schematic/types/{rulesengine_condition_condition_type.rb → rulesengine_condition_type.rb} +1 -1
- data/lib/schematic/types/rulesengine_feature_entitlement.rb +2 -2
- data/lib/schematic/types/{feature_entitlement_metric_period.rb → rulesengine_metric_period.rb} +1 -1
- data/lib/schematic/types/{condition_metric_period_month_reset.rb → rulesengine_metric_period_month_reset.rb} +2 -2
- data/lib/schematic/types/rulesengine_rule.rb +1 -1
- data/lib/schematic/types/{rulesengine_rule_rule_type.rb → rulesengine_rule_type.rb} +3 -3
- data/lib/schematic/types/stripe_integration_config.rb +15 -0
- data/lib/schematic/types/top_feature_by_usage_response_data.rb +14 -0
- data/lib/schematic/types/top_features_by_usage_response_data.rb +9 -0
- data/lib/schematic/types/trial_status.rb +13 -0
- data/lib/schematic/types/update_auto_topup_override_request_body.rb +12 -0
- data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +2 -0
- data/lib/schematic/types/update_entitlement_req_common.rb +2 -2
- data/lib/schematic/types/update_plan_request_body.rb +1 -1
- data/lib/schematic/types/upsert_billing_product_request_body.rb +3 -0
- data/lib/schematic/types/usage_based_entitlement_request_body.rb +4 -0
- data/lib/schematic/types/usage_based_entitlement_response_data.rb +3 -2
- data/lib/schematic/types/webhook_url.rb +10 -0
- data/lib/schematic/version.rb +1 -1
- data/lib/schematic.rb +121 -57
- data/reference.md +2910 -886
- metadata +110 -45
- data/lib/schematic/companies/types/create_plan_trait_request_body.rb +0 -13
- data/lib/schematic/companies/types/update_plan_trait_request_body.rb +0 -13
- data/lib/schematic/entitlements/types/create_company_override_request_body_metric_period.rb +0 -16
- data/lib/schematic/entitlements/types/create_company_override_request_body_metric_period_month_reset.rb +0 -14
- data/lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period.rb +0 -16
- data/lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period_month_reset.rb +0 -14
- data/lib/schematic/entitlements/types/update_company_override_request_body_metric_period.rb +0 -16
- data/lib/schematic/entitlements/types/update_company_override_request_body_metric_period_month_reset.rb +0 -14
- data/lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period.rb +0 -16
- data/lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period_month_reset.rb +0 -14
- data/lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period.rb +0 -14
- data/lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period_month_reset.rb +0 -12
- data/lib/schematic/types/create_entitlement_req_common_metric_period.rb +0 -14
- data/lib/schematic/types/create_entitlement_req_common_metric_period_month_reset.rb +0 -12
- data/lib/schematic/types/create_or_update_condition_request_body_condition_type.rb +0 -17
- data/lib/schematic/types/create_or_update_condition_request_body_metric_period.rb +0 -14
- data/lib/schematic/types/create_or_update_condition_request_body_metric_period_month_reset.rb +0 -12
- data/lib/schematic/types/create_or_update_condition_request_body_operator.rb +0 -18
- data/lib/schematic/types/create_or_update_rule_request_body_rule_type.rb +0 -15
- data/lib/schematic/types/rulesengine_check_flag_result_feature_usage_period.rb +0 -14
- data/lib/schematic/types/rulesengine_check_flag_result_rule_type.rb +0 -17
- data/lib/schematic/types/rulesengine_company_metric_period.rb +0 -14
- data/lib/schematic/types/rulesengine_condition_metric_period.rb +0 -14
- data/lib/schematic/types/rulesengine_condition_metric_period_month_reset.rb +0 -12
- data/lib/schematic/types/rulesengine_condition_operator.rb +0 -18
- data/lib/schematic/types/rulesengine_feature_entitlement_metric_period.rb +0 -14
- data/lib/schematic/types/rulesengine_feature_entitlement_month_reset.rb +0 -12
- data/lib/schematic/types/update_entitlement_req_common_metric_period.rb +0 -14
- data/lib/schematic/types/update_entitlement_req_common_metric_period_month_reset.rb +0 -12
|
@@ -9,6 +9,7 @@ module Schematic
|
|
|
9
9
|
field :event_subtype, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :event_types, -> { Internal::Types::Array[Schematic::Types::EventType] }, optional: true, nullable: false
|
|
11
11
|
field :flag_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :idempotency_key, -> { String }, optional: true, nullable: false
|
|
12
13
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
13
14
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
14
15
|
field :user_id, -> { String }, optional: true, nullable: false
|
|
@@ -8,6 +8,7 @@ module Schematic
|
|
|
8
8
|
field :event_subtype, -> { String }, optional: true, nullable: false
|
|
9
9
|
field :event_types, -> { Schematic::Types::EventType }, optional: true, nullable: false
|
|
10
10
|
field :flag_id, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :idempotency_key, -> { String }, optional: true, nullable: false
|
|
11
12
|
field :user_id, -> { String }, optional: true, nullable: false
|
|
12
13
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
13
14
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
@@ -17,28 +17,30 @@ module Schematic
|
|
|
17
17
|
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
18
18
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
19
19
|
# @option request_options [Integer] :timeout_in_seconds
|
|
20
|
+
# @option params [Boolean, nil] :boolean_require_event
|
|
21
|
+
# @option params [Schematic::Types::FeatureType, nil] :feature_type
|
|
20
22
|
# @option params [String, nil] :ids
|
|
23
|
+
# @option params [Schematic::Types::BillingProviderType, nil] :managed_by
|
|
24
|
+
# @option params [String, nil] :plan_version_id
|
|
21
25
|
# @option params [String, nil] :q
|
|
22
26
|
# @option params [String, nil] :without_company_override_for
|
|
23
|
-
# @option params [String, nil] :plan_version_id
|
|
24
27
|
# @option params [String, nil] :without_plan_entitlement_for
|
|
25
|
-
# @option params [Schematic::Types::FeatureType, nil] :feature_type
|
|
26
|
-
# @option params [Boolean, nil] :boolean_require_event
|
|
27
28
|
# @option params [Integer, nil] :limit
|
|
28
29
|
# @option params [Integer, nil] :offset
|
|
29
30
|
#
|
|
30
31
|
# @return [Schematic::Features::Types::ListFeaturesResponse]
|
|
31
32
|
def list_features(request_options: {}, **params)
|
|
32
33
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
33
|
-
query_param_names = %i[ids q without_company_override_for
|
|
34
|
+
query_param_names = %i[boolean_require_event feature_type ids managed_by plan_version_id q without_company_override_for without_plan_entitlement_for limit offset]
|
|
34
35
|
query_params = {}
|
|
36
|
+
query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event)
|
|
37
|
+
query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type)
|
|
35
38
|
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
39
|
+
query_params["managed_by"] = params[:managed_by] if params.key?(:managed_by)
|
|
40
|
+
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
36
41
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
37
42
|
query_params["without_company_override_for"] = params[:without_company_override_for] if params.key?(:without_company_override_for)
|
|
38
|
-
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
39
43
|
query_params["without_plan_entitlement_for"] = params[:without_plan_entitlement_for] if params.key?(:without_plan_entitlement_for)
|
|
40
|
-
query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type)
|
|
41
|
-
query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event)
|
|
42
44
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
43
45
|
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
44
46
|
params.except(*query_param_names)
|
|
@@ -197,6 +199,38 @@ module Schematic
|
|
|
197
199
|
end
|
|
198
200
|
end
|
|
199
201
|
|
|
202
|
+
# @param request_options [Hash]
|
|
203
|
+
# @param params [Schematic::Features::Types::CreateBillingLinkedFeatureRequestBody]
|
|
204
|
+
# @option request_options [String] :base_url
|
|
205
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
206
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
207
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
208
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
209
|
+
#
|
|
210
|
+
# @return [Schematic::Features::Types::UpsertFeatureForBillingProductResponse]
|
|
211
|
+
def upsert_feature_for_billing_product(request_options: {}, **params)
|
|
212
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
213
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
214
|
+
base_url: request_options[:base_url],
|
|
215
|
+
method: "POST",
|
|
216
|
+
path: "features/billing-linked",
|
|
217
|
+
body: Schematic::Features::Types::CreateBillingLinkedFeatureRequestBody.new(params).to_h,
|
|
218
|
+
request_options: request_options
|
|
219
|
+
)
|
|
220
|
+
begin
|
|
221
|
+
response = @client.send(request)
|
|
222
|
+
rescue Net::HTTPRequestTimeout
|
|
223
|
+
raise Schematic::Errors::TimeoutError
|
|
224
|
+
end
|
|
225
|
+
code = response.code.to_i
|
|
226
|
+
if code.between?(200, 299)
|
|
227
|
+
Schematic::Features::Types::UpsertFeatureForBillingProductResponse.load(response.body)
|
|
228
|
+
else
|
|
229
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
230
|
+
raise error_class.new(response.body, code: code)
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
200
234
|
# @param request_options [Hash]
|
|
201
235
|
# @param params [Hash]
|
|
202
236
|
# @option request_options [String] :base_url
|
|
@@ -204,28 +238,30 @@ module Schematic
|
|
|
204
238
|
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
205
239
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
206
240
|
# @option request_options [Integer] :timeout_in_seconds
|
|
241
|
+
# @option params [Boolean, nil] :boolean_require_event
|
|
242
|
+
# @option params [Schematic::Types::FeatureType, nil] :feature_type
|
|
207
243
|
# @option params [String, nil] :ids
|
|
244
|
+
# @option params [Schematic::Types::BillingProviderType, nil] :managed_by
|
|
245
|
+
# @option params [String, nil] :plan_version_id
|
|
208
246
|
# @option params [String, nil] :q
|
|
209
247
|
# @option params [String, nil] :without_company_override_for
|
|
210
|
-
# @option params [String, nil] :plan_version_id
|
|
211
248
|
# @option params [String, nil] :without_plan_entitlement_for
|
|
212
|
-
# @option params [Schematic::Types::FeatureType, nil] :feature_type
|
|
213
|
-
# @option params [Boolean, nil] :boolean_require_event
|
|
214
249
|
# @option params [Integer, nil] :limit
|
|
215
250
|
# @option params [Integer, nil] :offset
|
|
216
251
|
#
|
|
217
252
|
# @return [Schematic::Features::Types::CountFeaturesResponse]
|
|
218
253
|
def count_features(request_options: {}, **params)
|
|
219
254
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
220
|
-
query_param_names = %i[ids q without_company_override_for
|
|
255
|
+
query_param_names = %i[boolean_require_event feature_type ids managed_by plan_version_id q without_company_override_for without_plan_entitlement_for limit offset]
|
|
221
256
|
query_params = {}
|
|
257
|
+
query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event)
|
|
258
|
+
query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type)
|
|
222
259
|
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
260
|
+
query_params["managed_by"] = params[:managed_by] if params.key?(:managed_by)
|
|
261
|
+
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
223
262
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
224
263
|
query_params["without_company_override_for"] = params[:without_company_override_for] if params.key?(:without_company_override_for)
|
|
225
|
-
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
226
264
|
query_params["without_plan_entitlement_for"] = params[:without_plan_entitlement_for] if params.key?(:without_plan_entitlement_for)
|
|
227
|
-
query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type)
|
|
228
|
-
query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event)
|
|
229
265
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
230
266
|
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
231
267
|
params.except(*query_param_names)
|
|
@@ -9,6 +9,7 @@ module Schematic
|
|
|
9
9
|
field :feature_type, -> { Internal::Types::Array[Schematic::Types::FeatureType] }, optional: true, nullable: false
|
|
10
10
|
field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
11
11
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
12
|
+
field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
12
13
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
13
14
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
14
15
|
field :q, -> { String }, optional: true, nullable: false
|
|
@@ -4,13 +4,14 @@ module Schematic
|
|
|
4
4
|
module Features
|
|
5
5
|
module Types
|
|
6
6
|
class CountFeaturesRequest < Internal::Types::Model
|
|
7
|
+
field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
8
|
+
field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false
|
|
7
9
|
field :ids, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
11
|
+
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
8
12
|
field :q, -> { String }, optional: true, nullable: false
|
|
9
13
|
field :without_company_override_for, -> { String }, optional: true, nullable: false
|
|
10
|
-
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
11
14
|
field :without_plan_entitlement_for, -> { String }, optional: true, nullable: false
|
|
12
|
-
field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false
|
|
13
|
-
field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
15
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
15
16
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
16
17
|
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Features
|
|
5
|
+
module Types
|
|
6
|
+
class CreateBillingLinkedFeatureRequestBody < Internal::Types::Model
|
|
7
|
+
field :billing_provider, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false
|
|
8
|
+
field :description, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :event_subtype, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :external_resource_id, -> { String }, optional: false, nullable: false
|
|
11
|
+
field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false
|
|
12
|
+
field :flag, -> { Schematic::Types::CreateOrUpdateFlagRequestBody }, optional: true, nullable: false
|
|
13
|
+
field :icon, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false
|
|
15
|
+
field :maintainer_account_member_id, -> { String }, optional: true, nullable: false
|
|
16
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
17
|
+
field :plural_name, -> { String }, optional: true, nullable: false
|
|
18
|
+
field :singular_name, -> { String }, optional: true, nullable: false
|
|
19
|
+
field :trait_id, -> { String }, optional: true, nullable: false
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -10,7 +10,7 @@ module Schematic
|
|
|
10
10
|
field :flag, -> { Schematic::Types::CreateOrUpdateFlagRequestBody }, optional: true, nullable: false
|
|
11
11
|
field :icon, -> { String }, optional: true, nullable: false
|
|
12
12
|
field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false
|
|
13
|
-
field :
|
|
13
|
+
field :maintainer_account_member_id, -> { String }, optional: true, nullable: false
|
|
14
14
|
field :name, -> { String }, optional: false, nullable: false
|
|
15
15
|
field :plural_name, -> { String }, optional: true, nullable: false
|
|
16
16
|
field :singular_name, -> { String }, optional: true, nullable: false
|
|
@@ -9,6 +9,7 @@ module Schematic
|
|
|
9
9
|
field :feature_type, -> { Internal::Types::Array[Schematic::Types::FeatureType] }, optional: true, nullable: false
|
|
10
10
|
field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
11
11
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
12
|
+
field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
12
13
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
13
14
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
14
15
|
field :q, -> { String }, optional: true, nullable: false
|
|
@@ -4,13 +4,14 @@ module Schematic
|
|
|
4
4
|
module Features
|
|
5
5
|
module Types
|
|
6
6
|
class ListFeaturesRequest < Internal::Types::Model
|
|
7
|
+
field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
8
|
+
field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false
|
|
7
9
|
field :ids, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
11
|
+
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
8
12
|
field :q, -> { String }, optional: true, nullable: false
|
|
9
13
|
field :without_company_override_for, -> { String }, optional: true, nullable: false
|
|
10
|
-
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
11
14
|
field :without_plan_entitlement_for, -> { String }, optional: true, nullable: false
|
|
12
|
-
field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false
|
|
13
|
-
field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
15
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
15
16
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
16
17
|
end
|
|
@@ -11,7 +11,7 @@ module Schematic
|
|
|
11
11
|
field :flag, -> { Schematic::Types::CreateOrUpdateFlagRequestBody }, optional: true, nullable: false
|
|
12
12
|
field :icon, -> { String }, optional: true, nullable: false
|
|
13
13
|
field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false
|
|
14
|
-
field :
|
|
14
|
+
field :maintainer_account_member_id, -> { String }, optional: true, nullable: false
|
|
15
15
|
field :name, -> { String }, optional: true, nullable: false
|
|
16
16
|
field :plural_name, -> { String }, optional: true, nullable: false
|
|
17
17
|
field :singular_name, -> { String }, optional: true, nullable: false
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Features
|
|
5
|
+
module Types
|
|
6
|
+
class UpsertFeatureForBillingProductResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::FeatureDetailResponseData }, optional: false, nullable: false
|
|
8
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Insights
|
|
5
|
+
class Client
|
|
6
|
+
# @param client [Schematic::Internal::Http::RawClient]
|
|
7
|
+
#
|
|
8
|
+
# @return [void]
|
|
9
|
+
def initialize(client:)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# @param request_options [Hash]
|
|
14
|
+
# @param params [Hash]
|
|
15
|
+
# @option request_options [String] :base_url
|
|
16
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
17
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
18
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
19
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
20
|
+
# @option params [Integer, nil] :limit
|
|
21
|
+
#
|
|
22
|
+
# @return [Schematic::Insights::Types::GetActivityResponse]
|
|
23
|
+
def get_activity(request_options: {}, **params)
|
|
24
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
25
|
+
query_param_names = %i[limit]
|
|
26
|
+
query_params = {}
|
|
27
|
+
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
28
|
+
params.except(*query_param_names)
|
|
29
|
+
|
|
30
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
31
|
+
base_url: request_options[:base_url],
|
|
32
|
+
method: "GET",
|
|
33
|
+
path: "insights/activity",
|
|
34
|
+
query: query_params,
|
|
35
|
+
request_options: request_options
|
|
36
|
+
)
|
|
37
|
+
begin
|
|
38
|
+
response = @client.send(request)
|
|
39
|
+
rescue Net::HTTPRequestTimeout
|
|
40
|
+
raise Schematic::Errors::TimeoutError
|
|
41
|
+
end
|
|
42
|
+
code = response.code.to_i
|
|
43
|
+
if code.between?(200, 299)
|
|
44
|
+
Schematic::Insights::Types::GetActivityResponse.load(response.body)
|
|
45
|
+
else
|
|
46
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
47
|
+
raise error_class.new(response.body, code: code)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# @param request_options [Hash]
|
|
52
|
+
# @param params [Hash]
|
|
53
|
+
# @option request_options [String] :base_url
|
|
54
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
55
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
56
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
57
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
58
|
+
# @option params [String] :end_time
|
|
59
|
+
# @option params [String] :feature_id
|
|
60
|
+
# @option params [Schematic::Types::TimeSeriesGranularity, nil] :granularity
|
|
61
|
+
# @option params [String] :start_time
|
|
62
|
+
#
|
|
63
|
+
# @return [Schematic::Insights::Types::GetEnvironmentFeatureUsageTimeSeriesResponse]
|
|
64
|
+
def get_environment_feature_usage_time_series(request_options: {}, **params)
|
|
65
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
66
|
+
query_param_names = %i[end_time feature_id granularity start_time]
|
|
67
|
+
query_params = {}
|
|
68
|
+
query_params["end_time"] = params[:end_time] if params.key?(:end_time)
|
|
69
|
+
query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id)
|
|
70
|
+
query_params["granularity"] = params[:granularity] if params.key?(:granularity)
|
|
71
|
+
query_params["start_time"] = params[:start_time] if params.key?(:start_time)
|
|
72
|
+
params.except(*query_param_names)
|
|
73
|
+
|
|
74
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
75
|
+
base_url: request_options[:base_url],
|
|
76
|
+
method: "GET",
|
|
77
|
+
path: "insights/feature-usage-timeseries",
|
|
78
|
+
query: query_params,
|
|
79
|
+
request_options: request_options
|
|
80
|
+
)
|
|
81
|
+
begin
|
|
82
|
+
response = @client.send(request)
|
|
83
|
+
rescue Net::HTTPRequestTimeout
|
|
84
|
+
raise Schematic::Errors::TimeoutError
|
|
85
|
+
end
|
|
86
|
+
code = response.code.to_i
|
|
87
|
+
if code.between?(200, 299)
|
|
88
|
+
Schematic::Insights::Types::GetEnvironmentFeatureUsageTimeSeriesResponse.load(response.body)
|
|
89
|
+
else
|
|
90
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
91
|
+
raise error_class.new(response.body, code: code)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @param request_options [Hash]
|
|
96
|
+
# @param params [Hash]
|
|
97
|
+
# @option request_options [String] :base_url
|
|
98
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
99
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
100
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
101
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
102
|
+
# @option params [Integer, nil] :months
|
|
103
|
+
#
|
|
104
|
+
# @return [Schematic::Insights::Types::GetPlanGrowthResponse]
|
|
105
|
+
def get_plan_growth(request_options: {}, **params)
|
|
106
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
107
|
+
query_param_names = %i[months]
|
|
108
|
+
query_params = {}
|
|
109
|
+
query_params["months"] = params[:months] if params.key?(:months)
|
|
110
|
+
params.except(*query_param_names)
|
|
111
|
+
|
|
112
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
113
|
+
base_url: request_options[:base_url],
|
|
114
|
+
method: "GET",
|
|
115
|
+
path: "insights/plan-growth",
|
|
116
|
+
query: query_params,
|
|
117
|
+
request_options: request_options
|
|
118
|
+
)
|
|
119
|
+
begin
|
|
120
|
+
response = @client.send(request)
|
|
121
|
+
rescue Net::HTTPRequestTimeout
|
|
122
|
+
raise Schematic::Errors::TimeoutError
|
|
123
|
+
end
|
|
124
|
+
code = response.code.to_i
|
|
125
|
+
if code.between?(200, 299)
|
|
126
|
+
Schematic::Insights::Types::GetPlanGrowthResponse.load(response.body)
|
|
127
|
+
else
|
|
128
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
129
|
+
raise error_class.new(response.body, code: code)
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# @param request_options [Hash]
|
|
134
|
+
# @param params [Hash]
|
|
135
|
+
# @option request_options [String] :base_url
|
|
136
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
137
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
138
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
139
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
140
|
+
#
|
|
141
|
+
# @return [Schematic::Insights::Types::GetSummaryResponse]
|
|
142
|
+
def get_summary(request_options: {}, **params)
|
|
143
|
+
Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
144
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
145
|
+
base_url: request_options[:base_url],
|
|
146
|
+
method: "GET",
|
|
147
|
+
path: "insights/summary",
|
|
148
|
+
request_options: request_options
|
|
149
|
+
)
|
|
150
|
+
begin
|
|
151
|
+
response = @client.send(request)
|
|
152
|
+
rescue Net::HTTPRequestTimeout
|
|
153
|
+
raise Schematic::Errors::TimeoutError
|
|
154
|
+
end
|
|
155
|
+
code = response.code.to_i
|
|
156
|
+
if code.between?(200, 299)
|
|
157
|
+
Schematic::Insights::Types::GetSummaryResponse.load(response.body)
|
|
158
|
+
else
|
|
159
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
160
|
+
raise error_class.new(response.body, code: code)
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# @param request_options [Hash]
|
|
165
|
+
# @param params [Hash]
|
|
166
|
+
# @option request_options [String] :base_url
|
|
167
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
168
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
169
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
170
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
171
|
+
# @option params [String] :end_time
|
|
172
|
+
# @option params [Integer, nil] :limit
|
|
173
|
+
# @option params [String] :start_time
|
|
174
|
+
#
|
|
175
|
+
# @return [Schematic::Insights::Types::GetTopFeaturesByUsageResponse]
|
|
176
|
+
def get_top_features_by_usage(request_options: {}, **params)
|
|
177
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
178
|
+
query_param_names = %i[end_time limit start_time]
|
|
179
|
+
query_params = {}
|
|
180
|
+
query_params["end_time"] = params[:end_time] if params.key?(:end_time)
|
|
181
|
+
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
182
|
+
query_params["start_time"] = params[:start_time] if params.key?(:start_time)
|
|
183
|
+
params.except(*query_param_names)
|
|
184
|
+
|
|
185
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
186
|
+
base_url: request_options[:base_url],
|
|
187
|
+
method: "GET",
|
|
188
|
+
path: "insights/top-features",
|
|
189
|
+
query: query_params,
|
|
190
|
+
request_options: request_options
|
|
191
|
+
)
|
|
192
|
+
begin
|
|
193
|
+
response = @client.send(request)
|
|
194
|
+
rescue Net::HTTPRequestTimeout
|
|
195
|
+
raise Schematic::Errors::TimeoutError
|
|
196
|
+
end
|
|
197
|
+
code = response.code.to_i
|
|
198
|
+
if code.between?(200, 299)
|
|
199
|
+
Schematic::Insights::Types::GetTopFeaturesByUsageResponse.load(response.body)
|
|
200
|
+
else
|
|
201
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
202
|
+
raise error_class.new(response.body, code: code)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# @param request_options [Hash]
|
|
207
|
+
# @param params [Hash]
|
|
208
|
+
# @option request_options [String] :base_url
|
|
209
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
210
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
211
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
212
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
213
|
+
# @option params [String] :end_time
|
|
214
|
+
# @option params [String] :feature_id
|
|
215
|
+
# @option params [Schematic::Types::TimeSeriesGranularity, nil] :granularity
|
|
216
|
+
# @option params [String] :start_time
|
|
217
|
+
#
|
|
218
|
+
# @return [Schematic::Insights::Types::GetEnvironmentTraitUsageTimeSeriesResponse]
|
|
219
|
+
def get_environment_trait_usage_time_series(request_options: {}, **params)
|
|
220
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
221
|
+
query_param_names = %i[end_time feature_id granularity start_time]
|
|
222
|
+
query_params = {}
|
|
223
|
+
query_params["end_time"] = params[:end_time] if params.key?(:end_time)
|
|
224
|
+
query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id)
|
|
225
|
+
query_params["granularity"] = params[:granularity] if params.key?(:granularity)
|
|
226
|
+
query_params["start_time"] = params[:start_time] if params.key?(:start_time)
|
|
227
|
+
params.except(*query_param_names)
|
|
228
|
+
|
|
229
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
230
|
+
base_url: request_options[:base_url],
|
|
231
|
+
method: "GET",
|
|
232
|
+
path: "insights/trait-usage-timeseries",
|
|
233
|
+
query: query_params,
|
|
234
|
+
request_options: request_options
|
|
235
|
+
)
|
|
236
|
+
begin
|
|
237
|
+
response = @client.send(request)
|
|
238
|
+
rescue Net::HTTPRequestTimeout
|
|
239
|
+
raise Schematic::Errors::TimeoutError
|
|
240
|
+
end
|
|
241
|
+
code = response.code.to_i
|
|
242
|
+
if code.between?(200, 299)
|
|
243
|
+
Schematic::Insights::Types::GetEnvironmentTraitUsageTimeSeriesResponse.load(response.body)
|
|
244
|
+
else
|
|
245
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
246
|
+
raise error_class.new(response.body, code: code)
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Insights
|
|
5
|
+
module Types
|
|
6
|
+
class GetActivityResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::ActivityResponseResponseData }, optional: false, nullable: false
|
|
8
|
+
field :params, -> { Schematic::Insights::Types::GetActivityParams }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Insights
|
|
5
|
+
module Types
|
|
6
|
+
# Input parameters
|
|
7
|
+
class GetEnvironmentFeatureUsageTimeSeriesParams < Internal::Types::Model
|
|
8
|
+
field :end_time, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :feature_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false
|
|
11
|
+
field :start_time, -> { String }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Insights
|
|
5
|
+
module Types
|
|
6
|
+
class GetEnvironmentFeatureUsageTimeSeriesRequest < Internal::Types::Model
|
|
7
|
+
field :end_time, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :feature_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false
|
|
10
|
+
field :start_time, -> { String }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Insights
|
|
5
|
+
module Types
|
|
6
|
+
class GetEnvironmentFeatureUsageTimeSeriesResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::EnvironmentFeatureUsageTimeSeriesResponseData }, optional: false, nullable: false
|
|
8
|
+
field :params, -> { Schematic::Insights::Types::GetEnvironmentFeatureUsageTimeSeriesParams }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Insights
|
|
5
|
+
module Types
|
|
6
|
+
# Input parameters
|
|
7
|
+
class GetEnvironmentTraitUsageTimeSeriesParams < Internal::Types::Model
|
|
8
|
+
field :end_time, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :feature_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false
|
|
11
|
+
field :start_time, -> { String }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Insights
|
|
5
|
+
module Types
|
|
6
|
+
class GetEnvironmentTraitUsageTimeSeriesRequest < Internal::Types::Model
|
|
7
|
+
field :end_time, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :feature_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false
|
|
10
|
+
field :start_time, -> { String }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Insights
|
|
5
|
+
module Types
|
|
6
|
+
class GetEnvironmentTraitUsageTimeSeriesResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::EnvironmentTraitUsageTimeSeriesResponseData }, optional: false, nullable: false
|
|
8
|
+
field :params, -> { Schematic::Insights::Types::GetEnvironmentTraitUsageTimeSeriesParams }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|