From 0b19a10744c8dce2f821d4f8fda914a1ff2032d4 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 00:16:18 +0000 Subject: [PATCH 1/2] SDK regeneration --- .fern/metadata.json | 6 +- Gemfile.lock | 28 +- lib/schematic.rb | 101 +- lib/schematic/accounts/client.rb | 76 + .../types/get_account_member_response.rb} | 6 +- .../types/list_account_members_params.rb | 15 + .../types/list_account_members_request.rb | 14 + .../types/list_account_members_response.rb | 12 + .../create_billing_price_request_body.rb | 1 + ...reate_billing_subscription_request_body.rb | 1 + .../types/create_meter_request_body.rb | 1 + lib/schematic/client.rb | 5 + lib/schematic/companies/client.rb | 113 +- .../companies/types/count_companies_params.rb | 1 + .../types/count_companies_request.rb | 1 + .../types/create_plan_trait_request_body.rb | 13 - .../companies/types/list_companies_params.rb | 1 + .../companies/types/list_companies_request.rb | 1 + .../types/list_plan_changes_params.rb | 4 +- .../types/list_plan_changes_request.rb | 4 +- .../types/update_plan_trait_request_body.rb | 13 - lib/schematic/entitlements/client.rb | 32 + ...ng_linked_plan_entitlement_request_body.rb | 40 + .../create_company_override_request_body.rb | 4 +- ...any_override_request_body_metric_period.rb | 16 - ..._request_body_metric_period_month_reset.rb | 14 - .../create_plan_entitlement_request_body.rb | 4 +- ..._entitlement_request_body_metric_period.rb | 16 - ..._request_body_metric_period_month_reset.rb | 14 - .../update_company_override_request_body.rb | 4 +- ...any_override_request_body_metric_period.rb | 16 - ..._request_body_metric_period_month_reset.rb | 14 - .../update_plan_entitlement_request_body.rb | 4 +- ..._entitlement_request_body_metric_period.rb | 16 - ..._request_body_metric_period_month_reset.rb | 14 - ...ntitlement_for_billing_product_response.rb | 12 + lib/schematic/features/client.rb | 60 +- .../features/types/count_features_request.rb | 6 +- ...ate_billing_linked_feature_request_body.rb | 23 + .../types/create_feature_request_body.rb | 2 +- .../features/types/list_features_request.rb | 6 +- .../types/update_feature_request_body.rb | 2 +- ...rt_feature_for_billing_product_response.rb | 12 + lib/schematic/integrationsapi/client.rb | 46 + .../get_integration_webhook_url_response.rb | 12 + lib/schematic/plans/client.rb | 249 ++- ..._billing_product_match_companies_params.rb | 15 + ...billing_product_match_companies_request.rb | 14 + ...illing_product_match_companies_response.rb | 12 + .../plans/types/count_plans_params.rb | 2 + .../plans/types/count_plans_request.rb | 2 + ...create_billing_linked_plan_request_body.rb | 16 + .../types/create_custom_plan_request_body.rb | 15 + .../types/create_custom_plan_response.rb} | 6 +- ..._billing_product_match_companies_params.rb | 15 + ...billing_product_match_companies_request.rb | 14 + ...illing_product_match_companies_response.rb | 12 + .../types/list_custom_plan_billings_params.rb | 17 + .../list_custom_plan_billings_request.rb | 16 + .../list_custom_plan_billings_response.rb | 12 + .../plans/types/list_plans_params.rb | 2 + .../plans/types/list_plans_request.rb | 2 + .../publish_plan_version_request_body.rb | 4 + .../retry_custom_plan_billing_request_body.rb | 15 + .../retry_custom_plan_billing_response.rb | 12 + ...sert_plan_for_billing_product_response.rb} | 6 +- .../types/account_member_permission.rb | 25 + .../types/account_member_response_data.rb | 16 + ..._month_reset.rb => account_member_role.rb} | 6 +- .../types/api_key_create_response_data.rb | 1 + lib/schematic/types/api_key_response_data.rb | 1 + .../types/audit_log_list_response_data.rb | 1 + .../types/audit_log_response_data.rb | 1 + .../billing_linked_resource_response_data.rb | 11 + ...billing_plan_credit_grant_response_data.rb | 1 + .../types/billing_price_response_data.rb | 1 + lib/schematic/types/billing_price_view.rb | 1 + .../billing_product_plan_response_data.rb | 2 +- .../billing_product_price_response_data.rb | 1 + lib/schematic/types/billing_provider_type.rb | 1 + .../types/check_flag_response_data.rb | 4 +- lib/schematic/types/checkout_subscription.rb | 1 + .../types/company_detail_response_data.rb | 1 + ...pany_event_period_metrics_response_data.rb | 4 +- .../types/company_override_response_data.rb | 4 +- .../company_plan_detail_response_data.rb | 10 +- .../company_subscription_response_data.rb | 1 + ...ion_operator.rb => comparable_operator.rb} | 8 +- lib/schematic/types/condition.rb | 8 +- .../types/condition_response_data.rb | 8 +- ...on_condition_type.rb => condition_type.rb} | 2 +- lib/schematic/types/condition_view.rb | 8 +- ..._billing_plan_credit_grant_request_body.rb | 1 + ...eate_entitlement_in_bundle_request_body.rb | 4 +- ...nt_in_bundle_request_body_metric_period.rb | 14 - ..._request_body_metric_period_month_reset.rb | 12 - .../types/create_entitlement_req_common.rb | 4 +- ...te_entitlement_req_common_metric_period.rb | 14 - ...nt_req_common_metric_period_month_reset.rb | 12 - .../types/create_flag_request_body.rb | 2 +- ...create_or_update_condition_request_body.rb | 8 +- ...e_condition_request_body_condition_type.rb | 17 - ...te_condition_request_body_metric_period.rb | 14 - ..._request_body_metric_period_month_reset.rb | 12 - ..._update_condition_request_body_operator.rb | 18 - .../create_or_update_flag_request_body.rb | 2 +- .../create_or_update_rule_request_body.rb | 2 +- ...e_or_update_rule_request_body_rule_type.rb | 15 - .../types/create_plan_request_body.rb | 2 +- .../types/custom_plan_activation_strategy.rb | 12 + .../custom_plan_billing_response_data.rb | 19 + .../types/custom_plan_billing_status.rb | 14 + .../types/datastream_company_plan.rb | 1 + .../types/feature_company_response_data.rb | 6 +- .../feature_company_user_response_data.rb | 4 +- .../types/feature_detail_response_data.rb | 4 +- lib/schematic/types/feature_entitlement.rb | 4 +- .../types/feature_in_plan_response_data.rb | 26 + lib/schematic/types/feature_response_data.rb | 2 +- .../types/feature_usage_response_data.rb | 6 +- lib/schematic/types/feature_view.rb | 2 +- .../types/flag_detail_response_data.rb | 3 +- .../types/flag_in_plan_response_data.rb | 21 + lib/schematic/types/flag_response_data.rb | 2 +- lib/schematic/types/flag_view.rb | 1 - ...trolled_by_type.rb => integration_type.rb} | 6 +- .../integration_webhook_url_response_data.rb | 10 + ...tion_metric_period.rb => metric_period.rb} | 2 +- ..._reset.rb => metric_period_month_reset.rb} | 4 +- lib/schematic/types/plan_credit_grant_view.rb | 1 + .../types/plan_detail_response_data.rb | 10 +- .../types/plan_entitlement_response_data.rb | 5 +- .../plan_group_plan_detail_response_data.rb | 10 +- lib/schematic/types/plan_icon.rb | 35 + lib/schematic/types/plan_response_data.rb | 4 +- .../types/plan_version_response_data.rb | 2 +- .../types/plan_view_public_response_data.rb | 10 +- lib/schematic/types/rule.rb | 2 +- .../rule_condition_detail_response_data.rb | 8 +- .../types/rule_condition_response_data.rb | 8 +- .../types/rule_detail_response_data.rb | 2 +- lib/schematic/types/rule_response_data.rb | 2 +- .../types/{rule_rule_type.rb => rule_type.rb} | 6 +- lib/schematic/types/rule_view.rb | 2 +- .../types/rules_engine_schema_version.rb | 2 +- .../types/rulesengine_check_flag_result.rb | 4 +- ..._check_flag_result_feature_usage_period.rb | 14 - ...rulesengine_check_flag_result_rule_type.rb | 17 - .../types/rulesengine_company_metric.rb | 4 +- .../rulesengine_company_metric_period.rb | 14 - lib/schematic/types/rulesengine_condition.rb | 8 +- .../rulesengine_condition_metric_period.rb | 14 - ...ine_condition_metric_period_month_reset.rb | 12 - .../types/rulesengine_condition_operator.rb | 18 - ..._type.rb => rulesengine_condition_type.rb} | 2 +- .../types/rulesengine_feature_entitlement.rb | 4 +- ...ngine_feature_entitlement_metric_period.rb | 14 - ...sengine_feature_entitlement_month_reset.rb | 12 - ...period.rb => rulesengine_metric_period.rb} | 2 +- ... rulesengine_metric_period_month_reset.rb} | 4 +- lib/schematic/types/rulesengine_rule.rb | 2 +- ..._rule_type.rb => rulesengine_rule_type.rb} | 6 +- lib/schematic/types/trial_status.rb | 13 + ..._billing_plan_credit_grant_request_body.rb | 1 + .../types/update_entitlement_req_common.rb | 4 +- ...te_entitlement_req_common_metric_period.rb | 14 - ...nt_req_common_metric_period_month_reset.rb | 12 - .../types/update_plan_request_body.rb | 2 +- .../usage_based_entitlement_response_data.rb | 4 +- lib/schematic/types/webhook_url.rb | 10 + reference.md | 1826 +++++++++++++---- 171 files changed, 2697 insertions(+), 1143 deletions(-) rename lib/schematic/{companies/types/create_plan_trait_response.rb => accounts/types/get_account_member_response.rb} (51%) create mode 100644 lib/schematic/accounts/types/list_account_members_params.rb create mode 100644 lib/schematic/accounts/types/list_account_members_request.rb create mode 100644 lib/schematic/accounts/types/list_account_members_response.rb delete mode 100644 lib/schematic/companies/types/create_plan_trait_request_body.rb delete mode 100644 lib/schematic/companies/types/update_plan_trait_request_body.rb create mode 100644 lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb delete mode 100644 lib/schematic/entitlements/types/create_company_override_request_body_metric_period.rb delete mode 100644 lib/schematic/entitlements/types/create_company_override_request_body_metric_period_month_reset.rb delete mode 100644 lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period.rb delete mode 100644 lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period_month_reset.rb delete mode 100644 lib/schematic/entitlements/types/update_company_override_request_body_metric_period.rb delete mode 100644 lib/schematic/entitlements/types/update_company_override_request_body_metric_period_month_reset.rb delete mode 100644 lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period.rb delete mode 100644 lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period_month_reset.rb create mode 100644 lib/schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response.rb create mode 100644 lib/schematic/features/types/create_billing_linked_feature_request_body.rb create mode 100644 lib/schematic/features/types/upsert_feature_for_billing_product_response.rb create mode 100644 lib/schematic/integrationsapi/client.rb create mode 100644 lib/schematic/integrationsapi/types/get_integration_webhook_url_response.rb create mode 100644 lib/schematic/plans/types/count_billing_product_match_companies_params.rb create mode 100644 lib/schematic/plans/types/count_billing_product_match_companies_request.rb create mode 100644 lib/schematic/plans/types/count_billing_product_match_companies_response.rb create mode 100644 lib/schematic/plans/types/create_billing_linked_plan_request_body.rb create mode 100644 lib/schematic/plans/types/create_custom_plan_request_body.rb rename lib/schematic/{companies/types/delete_plan_trait_response.rb => plans/types/create_custom_plan_response.rb} (52%) create mode 100644 lib/schematic/plans/types/list_billing_product_match_companies_params.rb create mode 100644 lib/schematic/plans/types/list_billing_product_match_companies_request.rb create mode 100644 lib/schematic/plans/types/list_billing_product_match_companies_response.rb create mode 100644 lib/schematic/plans/types/list_custom_plan_billings_params.rb create mode 100644 lib/schematic/plans/types/list_custom_plan_billings_request.rb create mode 100644 lib/schematic/plans/types/list_custom_plan_billings_response.rb create mode 100644 lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb create mode 100644 lib/schematic/plans/types/retry_custom_plan_billing_response.rb rename lib/schematic/{companies/types/update_plan_trait_response.rb => plans/types/upsert_plan_for_billing_product_response.rb} (50%) create mode 100644 lib/schematic/types/account_member_permission.rb create mode 100644 lib/schematic/types/account_member_response_data.rb rename lib/schematic/types/{rulesengine_company_metric_month_reset.rb => account_member_role.rb} (50%) create mode 100644 lib/schematic/types/billing_linked_resource_response_data.rb rename lib/schematic/types/{condition_operator.rb => comparable_operator.rb} (90%) rename lib/schematic/types/{condition_condition_type.rb => condition_type.rb} (91%) delete mode 100644 lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period.rb delete mode 100644 lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period_month_reset.rb delete mode 100644 lib/schematic/types/create_entitlement_req_common_metric_period.rb delete mode 100644 lib/schematic/types/create_entitlement_req_common_metric_period_month_reset.rb delete mode 100644 lib/schematic/types/create_or_update_condition_request_body_condition_type.rb delete mode 100644 lib/schematic/types/create_or_update_condition_request_body_metric_period.rb delete mode 100644 lib/schematic/types/create_or_update_condition_request_body_metric_period_month_reset.rb delete mode 100644 lib/schematic/types/create_or_update_condition_request_body_operator.rb delete mode 100644 lib/schematic/types/create_or_update_rule_request_body_rule_type.rb create mode 100644 lib/schematic/types/custom_plan_activation_strategy.rb create mode 100644 lib/schematic/types/custom_plan_billing_response_data.rb create mode 100644 lib/schematic/types/custom_plan_billing_status.rb create mode 100644 lib/schematic/types/feature_in_plan_response_data.rb create mode 100644 lib/schematic/types/flag_in_plan_response_data.rb rename lib/schematic/types/{plan_controlled_by_type.rb => integration_type.rb} (62%) create mode 100644 lib/schematic/types/integration_webhook_url_response_data.rb rename lib/schematic/types/{condition_metric_period.rb => metric_period.rb} (88%) rename lib/schematic/types/{feature_entitlement_month_reset.rb => metric_period_month_reset.rb} (83%) create mode 100644 lib/schematic/types/plan_icon.rb rename lib/schematic/types/{rule_rule_type.rb => rule_type.rb} (95%) delete mode 100644 lib/schematic/types/rulesengine_check_flag_result_feature_usage_period.rb delete mode 100644 lib/schematic/types/rulesengine_check_flag_result_rule_type.rb delete mode 100644 lib/schematic/types/rulesengine_company_metric_period.rb delete mode 100644 lib/schematic/types/rulesengine_condition_metric_period.rb delete mode 100644 lib/schematic/types/rulesengine_condition_metric_period_month_reset.rb delete mode 100644 lib/schematic/types/rulesengine_condition_operator.rb rename lib/schematic/types/{rulesengine_condition_condition_type.rb => rulesengine_condition_type.rb} (89%) delete mode 100644 lib/schematic/types/rulesengine_feature_entitlement_metric_period.rb delete mode 100644 lib/schematic/types/rulesengine_feature_entitlement_month_reset.rb rename lib/schematic/types/{feature_entitlement_metric_period.rb => rulesengine_metric_period.rb} (86%) rename lib/schematic/types/{condition_metric_period_month_reset.rb => rulesengine_metric_period_month_reset.rb} (82%) rename lib/schematic/types/{rulesengine_rule_rule_type.rb => rulesengine_rule_type.rb} (92%) create mode 100644 lib/schematic/types/trial_status.rb delete mode 100644 lib/schematic/types/update_entitlement_req_common_metric_period.rb delete mode 100644 lib/schematic/types/update_entitlement_req_common_metric_period_month_reset.rb create mode 100644 lib/schematic/types/webhook_url.rb diff --git a/.fern/metadata.json b/.fern/metadata.json index ab7ccfb..ca4d771 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { - "cliVersion": "4.43.1", + "cliVersion": "4.76.1", "generatorName": "fernapi/fern-ruby-sdk", - "generatorVersion": "1.1.11", + "generatorVersion": "1.1.13", "generatorConfig": { "module": "SchematicHQ", "rubocopVariableNumberStyle": "disabled", @@ -13,6 +13,6 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "42e108eda47d554722530a9d404ee80ba2da1b28", + "originGitCommit": "5315b1ba06c9c71f00ac501c3e7ea3092701cd7b", "sdkVersion": "1.4.0" } \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 74c53e0..c79778a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,24 +8,24 @@ PATH GEM remote: https://rubygems.org/ specs: - addressable (2.8.9) + addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) - bigdecimal (4.1.0) + bigdecimal (4.1.2) coderay (1.1.3) crack (1.0.1) bigdecimal rexml hashdiff (1.2.1) io-console (0.8.2) - json (2.19.3) + json (2.19.4) language_server-protocol (3.17.0.5) lint_roller (1.1.0) method_source (1.1.0) minitest (5.27.0) minitest-rg (5.4.0) minitest (>= 5.0, < 7) - parallel (1.28.0) + parallel (2.0.1) parser (3.3.11.1) ast (~> 2.4.1) racc @@ -37,16 +37,16 @@ GEM public_suffix (7.0.5) racc (1.8.1) rainbow (3.1.1) - rake (13.3.1) - regexp_parser (2.11.3) + rake (13.4.2) + regexp_parser (2.12.0) reline (0.6.3) io-console (~> 0.5) rexml (3.4.4) - rubocop (1.86.0) + rubocop (1.86.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) - parallel (~> 1.10) + parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) @@ -64,12 +64,12 @@ GEM unicode-display_width (3.2.0) unicode-emoji (~> 4.1) unicode-emoji (4.2.0) - wasmtime (43.0.0-aarch64-linux) - wasmtime (43.0.0-aarch64-linux-musl) - wasmtime (43.0.0-arm64-darwin) - wasmtime (43.0.0-x86_64-darwin) - wasmtime (43.0.0-x86_64-linux) - wasmtime (43.0.0-x86_64-linux-musl) + wasmtime (43.0.1-aarch64-linux) + wasmtime (43.0.1-aarch64-linux-musl) + wasmtime (43.0.1-arm64-darwin) + wasmtime (43.0.1-x86_64-darwin) + wasmtime (43.0.1-x86_64-linux) + wasmtime (43.0.1-x86_64-linux-musl) webmock (3.26.2) addressable (>= 2.8.0) crack (>= 0.3.2) diff --git a/lib/schematic.rb b/lib/schematic.rb index 8227e73..c2e8b57 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -35,8 +35,16 @@ require_relative "schematic/internal/iterators/offset_item_iterator" require_relative "schematic/internal/iterators/cursor_page_iterator" require_relative "schematic/internal/iterators/offset_page_iterator" +require_relative "schematic/accounts/types/list_account_members_params" +require_relative "schematic/types/account_member_permission" +require_relative "schematic/types/account_member_role" +require_relative "schematic/types/account_member_response_data" +require_relative "schematic/accounts/types/list_account_members_response" +require_relative "schematic/accounts/types/get_account_member_response" require_relative "schematic/accounts/types/list_api_keys_params" require_relative "schematic/types/api_key_scope" +require_relative "schematic/types/environment_type" +require_relative "schematic/types/environment_response_data" require_relative "schematic/types/api_key_response_data" require_relative "schematic/accounts/types/list_api_keys_response" require_relative "schematic/types/api_key_create_response_data" @@ -57,8 +65,6 @@ require_relative "schematic/accounts/types/count_audit_logs_params" require_relative "schematic/accounts/types/count_audit_logs_response" require_relative "schematic/accounts/types/list_environments_params" -require_relative "schematic/types/environment_type" -require_relative "schematic/types/environment_response_data" require_relative "schematic/accounts/types/list_environments_response" require_relative "schematic/types/environment_detail_response_data" require_relative "schematic/accounts/types/create_environment_response" @@ -193,33 +199,35 @@ require_relative "schematic/types/checkout_subscription" require_relative "schematic/checkout/types/checkout_internal_response" require_relative "schematic/types/billing_credit_view" +require_relative "schematic/types/billing_linked_resource_response_data" require_relative "schematic/types/billing_product_for_subscription_response_data" require_relative "schematic/types/billing_subscription_discount_view" require_relative "schematic/types/billing_subscription_view" require_relative "schematic/types/charge_type" +require_relative "schematic/types/metric_period" +require_relative "schematic/types/metric_period_month_reset" require_relative "schematic/types/company_event_period_metrics_response_data" require_relative "schematic/types/generic_preview_object" require_relative "schematic/types/plan_credit_grant_view" require_relative "schematic/types/company_plan_with_billing_sub_view" -require_relative "schematic/types/condition_condition_type" -require_relative "schematic/types/condition_metric_period" -require_relative "schematic/types/condition_metric_period_month_reset" -require_relative "schematic/types/condition_operator" +require_relative "schematic/types/comparable_operator" +require_relative "schematic/types/condition_type" require_relative "schematic/types/entity_type" require_relative "schematic/types/trait_definition_comparable_type" require_relative "schematic/types/trait_definition" require_relative "schematic/types/condition" require_relative "schematic/types/condition_group" +require_relative "schematic/types/custom_plan_activation_strategy" +require_relative "schematic/types/custom_plan_billing_status" +require_relative "schematic/types/custom_plan_billing_response_data" require_relative "schematic/types/entitlement_value_type" require_relative "schematic/types/entity_key_definition_response_data" require_relative "schematic/types/entity_key_detail_response_data" require_relative "schematic/types/trait_type" require_relative "schematic/types/entity_trait_definition_response_data" require_relative "schematic/types/entity_trait_detail_response_data" -require_relative "schematic/types/feature_entitlement_metric_period" -require_relative "schematic/types/feature_entitlement_month_reset" require_relative "schematic/types/feature_entitlement" -require_relative "schematic/types/rule_rule_type" +require_relative "schematic/types/rule_type" require_relative "schematic/types/rule" require_relative "schematic/types/scheduled_downgrade_response_data" require_relative "schematic/types/company_detail_response_data" @@ -240,15 +248,15 @@ require_relative "schematic/types/rule_condition_detail_response_data" require_relative "schematic/types/rule_condition_group_detail_response_data" require_relative "schematic/types/rule_detail_response_data" -require_relative "schematic/types/flag_detail_response_data" +require_relative "schematic/types/flag_in_plan_response_data" require_relative "schematic/types/preview_object" -require_relative "schematic/types/feature_detail_response_data" +require_relative "schematic/types/feature_in_plan_response_data" +require_relative "schematic/types/plan_icon" require_relative "schematic/types/plan_type" require_relative "schematic/types/plan_response_data" require_relative "schematic/types/plan_entitlement_response_data" require_relative "schematic/types/feature_usage_response_data" require_relative "schematic/types/feature_usage_detail_response_data" -require_relative "schematic/types/plan_controlled_by_type" require_relative "schematic/types/plan_currency_prices_response_data" require_relative "schematic/types/plan_version_status" require_relative "schematic/types/plan_version_response_data" @@ -303,9 +311,9 @@ require_relative "schematic/companies/types/get_entity_trait_values_params" require_relative "schematic/types/entity_trait_value" require_relative "schematic/companies/types/get_entity_trait_values_response" -require_relative "schematic/companies/types/list_plan_changes_params" require_relative "schematic/types/plan_change_action" require_relative "schematic/types/plan_change_base_plan_action" +require_relative "schematic/companies/types/list_plan_changes_params" require_relative "schematic/types/plan_change_subscription_action" require_relative "schematic/types/plan_snapshot_view" require_relative "schematic/types/plan_version_snapshot_view" @@ -316,10 +324,7 @@ require_relative "schematic/companies/types/list_plan_traits_params" require_relative "schematic/types/plan_trait_response_data" require_relative "schematic/companies/types/list_plan_traits_response" -require_relative "schematic/companies/types/create_plan_trait_response" require_relative "schematic/companies/types/get_plan_trait_response" -require_relative "schematic/companies/types/update_plan_trait_response" -require_relative "schematic/companies/types/delete_plan_trait_response" require_relative "schematic/companies/types/update_plan_traits_bulk_response" require_relative "schematic/companies/types/count_plan_traits_params" require_relative "schematic/companies/types/count_plan_traits_response" @@ -339,12 +344,8 @@ require_relative "schematic/companies/types/lookup_user_response" require_relative "schematic/entitlements/types/list_company_overrides_params" require_relative "schematic/entitlements/types/list_company_overrides_response" -require_relative "schematic/entitlements/types/create_company_override_request_body_metric_period" -require_relative "schematic/entitlements/types/create_company_override_request_body_metric_period_month_reset" require_relative "schematic/entitlements/types/create_company_override_response" require_relative "schematic/entitlements/types/get_company_override_response" -require_relative "schematic/entitlements/types/update_company_override_request_body_metric_period" -require_relative "schematic/entitlements/types/update_company_override_request_body_metric_period_month_reset" require_relative "schematic/entitlements/types/update_company_override_response" require_relative "schematic/entitlements/types/delete_company_override_response" require_relative "schematic/entitlements/types/count_company_overrides_params" @@ -366,20 +367,19 @@ require_relative "schematic/entitlements/types/count_feature_usage_params" require_relative "schematic/entitlements/types/count_feature_usage_response" require_relative "schematic/entitlements/types/list_feature_users_params" +require_relative "schematic/types/flag_detail_response_data" +require_relative "schematic/types/feature_detail_response_data" require_relative "schematic/types/feature_company_user_response_data" require_relative "schematic/entitlements/types/list_feature_users_response" require_relative "schematic/entitlements/types/count_feature_users_params" require_relative "schematic/entitlements/types/count_feature_users_response" require_relative "schematic/entitlements/types/list_plan_entitlements_params" require_relative "schematic/entitlements/types/list_plan_entitlements_response" -require_relative "schematic/entitlements/types/create_plan_entitlement_request_body_metric_period" -require_relative "schematic/entitlements/types/create_plan_entitlement_request_body_metric_period_month_reset" require_relative "schematic/entitlements/types/create_plan_entitlement_response" require_relative "schematic/entitlements/types/get_plan_entitlement_response" -require_relative "schematic/entitlements/types/update_plan_entitlement_request_body_metric_period" -require_relative "schematic/entitlements/types/update_plan_entitlement_request_body_metric_period_month_reset" require_relative "schematic/entitlements/types/update_plan_entitlement_response" require_relative "schematic/entitlements/types/delete_plan_entitlement_response" +require_relative "schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response" require_relative "schematic/entitlements/types/count_plan_entitlements_params" require_relative "schematic/entitlements/types/count_plan_entitlements_response" require_relative "schematic/types/skipped_entitlement_error_response_data" @@ -389,6 +389,10 @@ require_relative "schematic/entitlements/types/get_feature_usage_by_company_params" require_relative "schematic/entitlements/types/get_feature_usage_by_company_response" require_relative "schematic/plans/types/update_company_plans_response" +require_relative "schematic/plans/types/list_custom_plan_billings_params" +require_relative "schematic/plans/types/list_custom_plan_billings_response" +require_relative "schematic/plans/types/retry_custom_plan_billing_response" +require_relative "schematic/plans/types/create_custom_plan_response" require_relative "schematic/plans/types/list_plans_params" require_relative "schematic/plans/types/list_plans_response" require_relative "schematic/plans/types/create_plan_response" @@ -398,6 +402,11 @@ require_relative "schematic/plans/types/delete_plan_response" require_relative "schematic/types/billing_product_plan_response_data" require_relative "schematic/plans/types/upsert_billing_product_plan_response" +require_relative "schematic/plans/types/upsert_plan_for_billing_product_response" +require_relative "schematic/plans/types/list_billing_product_match_companies_params" +require_relative "schematic/plans/types/list_billing_product_match_companies_response" +require_relative "schematic/plans/types/count_billing_product_match_companies_params" +require_relative "schematic/plans/types/count_billing_product_match_companies_response" require_relative "schematic/plans/types/count_plans_params" require_relative "schematic/plans/types/count_plans_response" require_relative "schematic/plans/types/list_plan_issues_params" @@ -458,6 +467,7 @@ require_relative "schematic/features/types/get_feature_response" require_relative "schematic/features/types/update_feature_response" require_relative "schematic/features/types/delete_feature_response" +require_relative "schematic/features/types/upsert_feature_for_billing_product_response" require_relative "schematic/features/types/count_features_params" require_relative "schematic/features/types/count_features_response" require_relative "schematic/features/types/list_flags_params" @@ -471,6 +481,7 @@ require_relative "schematic/features/types/update_flag_rules_response" require_relative "schematic/types/check_flag_response_data" require_relative "schematic/features/types/check_flag_response" +require_relative "schematic/types/trial_status" require_relative "schematic/types/datastream_company_plan" require_relative "schematic/types/check_flags_response_data" require_relative "schematic/features/types/check_flags_response" @@ -478,6 +489,9 @@ require_relative "schematic/features/types/check_flags_bulk_response" require_relative "schematic/features/types/count_flags_params" require_relative "schematic/features/types/count_flags_response" +require_relative "schematic/types/integration_type" +require_relative "schematic/types/integration_webhook_url_response_data" +require_relative "schematic/integrationsapi/types/get_integration_webhook_url_response" require_relative "schematic/types/plan_bundle_response_data" require_relative "schematic/planbundle/types/create_plan_bundle_response" require_relative "schematic/planbundle/types/update_plan_bundle_response" @@ -565,13 +579,9 @@ require_relative "schematic/types/credit_auto_topup_amount_type" require_relative "schematic/types/create_billing_plan_credit_grant_request_body" require_relative "schematic/types/create_billing_price_tier_request_body" -require_relative "schematic/types/create_entitlement_in_bundle_request_body_metric_period" -require_relative "schematic/types/create_entitlement_in_bundle_request_body_metric_period_month_reset" require_relative "schematic/types/create_price_tier_request_body" require_relative "schematic/types/currency_price_request_body" require_relative "schematic/types/create_entitlement_in_bundle_request_body" -require_relative "schematic/types/create_entitlement_req_common_metric_period" -require_relative "schematic/types/create_entitlement_req_common_metric_period_month_reset" require_relative "schematic/types/create_entitlement_req_common" require_relative "schematic/types/event_body_track" require_relative "schematic/types/event_body_flag_check" @@ -580,14 +590,9 @@ require_relative "schematic/types/event_body" require_relative "schematic/types/create_event_request_body" require_relative "schematic/types/create_flag_request_body" -require_relative "schematic/types/create_or_update_condition_request_body_condition_type" -require_relative "schematic/types/create_or_update_condition_request_body_metric_period" -require_relative "schematic/types/create_or_update_condition_request_body_metric_period_month_reset" -require_relative "schematic/types/create_or_update_condition_request_body_operator" require_relative "schematic/types/create_or_update_condition_request_body" require_relative "schematic/types/create_or_update_condition_group_request_body" require_relative "schematic/types/create_or_update_flag_request_body" -require_relative "schematic/types/create_or_update_rule_request_body_rule_type" require_relative "schematic/types/create_or_update_rule_request_body" require_relative "schematic/types/create_plan_request_body" require_relative "schematic/types/credit_bundle_currency_price_request_body" @@ -622,26 +627,19 @@ require_relative "schematic/types/rule_condition_response_data" require_relative "schematic/types/rule_response_data" require_relative "schematic/types/rules_engine_schema_version" -require_relative "schematic/types/rulesengine_check_flag_result_feature_usage_period" -require_relative "schematic/types/rulesengine_check_flag_result_rule_type" require_relative "schematic/types/rulesengine_entitlement_value_type" -require_relative "schematic/types/rulesengine_feature_entitlement_metric_period" -require_relative "schematic/types/rulesengine_feature_entitlement_month_reset" +require_relative "schematic/types/rulesengine_metric_period" +require_relative "schematic/types/rulesengine_metric_period_month_reset" require_relative "schematic/types/rulesengine_feature_entitlement" +require_relative "schematic/types/rulesengine_rule_type" require_relative "schematic/types/rulesengine_check_flag_result" -require_relative "schematic/types/rulesengine_company_metric_month_reset" -require_relative "schematic/types/rulesengine_company_metric_period" require_relative "schematic/types/rulesengine_company_metric" -require_relative "schematic/types/rulesengine_condition_condition_type" -require_relative "schematic/types/rulesengine_condition_metric_period" -require_relative "schematic/types/rulesengine_condition_metric_period_month_reset" -require_relative "schematic/types/rulesengine_condition_operator" +require_relative "schematic/types/rulesengine_condition_type" require_relative "schematic/types/rulesengine_entity_type" require_relative "schematic/types/rulesengine_trait_definition_comparable_type" require_relative "schematic/types/rulesengine_trait_definition" require_relative "schematic/types/rulesengine_condition" require_relative "schematic/types/rulesengine_condition_group" -require_relative "schematic/types/rulesengine_rule_rule_type" require_relative "schematic/types/rulesengine_rule" require_relative "schematic/types/rulesengine_subscription" require_relative "schematic/types/rulesengine_trait" @@ -650,8 +648,6 @@ require_relative "schematic/types/rulesengine_user" require_relative "schematic/types/scheduled_downgrade_config_behavior" require_relative "schematic/types/temporary_access_token_response_data" -require_relative "schematic/types/update_entitlement_req_common_metric_period" -require_relative "schematic/types/update_entitlement_req_common_metric_period_month_reset" require_relative "schematic/types/update_entitlement_req_common" require_relative "schematic/types/update_plan_request_body" require_relative "schematic/types/update_plan_trait_trait_request_body" @@ -665,8 +661,10 @@ require_relative "schematic/types/web_feature_usage_webhook_output" require_relative "schematic/types/web_scheduled_downgrade_webhook_output" require_relative "schematic/types/webhook_event_response_data" +require_relative "schematic/types/webhook_url" require_relative "schematic/client" require_relative "schematic/accounts/client" +require_relative "schematic/accounts/types/list_account_members_request" require_relative "schematic/accounts/types/list_api_keys_request" require_relative "schematic/accounts/types/create_api_key_request_body" require_relative "schematic/accounts/types/update_api_key_request_body" @@ -738,8 +736,6 @@ require_relative "schematic/companies/types/get_entity_trait_values_request" require_relative "schematic/companies/types/list_plan_changes_request" require_relative "schematic/companies/types/list_plan_traits_request" -require_relative "schematic/companies/types/create_plan_trait_request_body" -require_relative "schematic/companies/types/update_plan_trait_request_body" require_relative "schematic/companies/types/update_plan_trait_bulk_request_body" require_relative "schematic/companies/types/count_plan_traits_request" require_relative "schematic/companies/types/list_users_request" @@ -760,13 +756,20 @@ require_relative "schematic/entitlements/types/list_plan_entitlements_request" require_relative "schematic/entitlements/types/create_plan_entitlement_request_body" require_relative "schematic/entitlements/types/update_plan_entitlement_request_body" +require_relative "schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body" require_relative "schematic/entitlements/types/count_plan_entitlements_request" require_relative "schematic/entitlements/types/duplicate_plan_entitlements_request_body" require_relative "schematic/entitlements/types/get_feature_usage_by_company_request" require_relative "schematic/plans/client" require_relative "schematic/plans/types/update_company_plans_request_body" +require_relative "schematic/plans/types/list_custom_plan_billings_request" +require_relative "schematic/plans/types/retry_custom_plan_billing_request_body" +require_relative "schematic/plans/types/create_custom_plan_request_body" require_relative "schematic/plans/types/list_plans_request" require_relative "schematic/plans/types/get_plan_request" +require_relative "schematic/plans/types/create_billing_linked_plan_request_body" +require_relative "schematic/plans/types/list_billing_product_match_companies_request" +require_relative "schematic/plans/types/count_billing_product_match_companies_request" require_relative "schematic/plans/types/count_plans_request" require_relative "schematic/plans/types/list_plan_issues_request" require_relative "schematic/plans/types/delete_plan_version_request" @@ -787,11 +790,13 @@ require_relative "schematic/features/types/list_features_request" require_relative "schematic/features/types/create_feature_request_body" require_relative "schematic/features/types/update_feature_request_body" +require_relative "schematic/features/types/create_billing_linked_feature_request_body" require_relative "schematic/features/types/count_features_request" require_relative "schematic/features/types/list_flags_request" require_relative "schematic/features/types/update_flag_rules_request_body" require_relative "schematic/features/types/check_flags_bulk_request_body" require_relative "schematic/features/types/count_flags_request" +require_relative "schematic/integrationsapi/client" require_relative "schematic/planbundle/client" require_relative "schematic/planbundle/types/create_plan_bundle_request_body" require_relative "schematic/planbundle/types/update_plan_bundle_request_body" diff --git a/lib/schematic/accounts/client.rb b/lib/schematic/accounts/client.rb index 63dc52a..cfa0448 100644 --- a/lib/schematic/accounts/client.rb +++ b/lib/schematic/accounts/client.rb @@ -10,6 +10,82 @@ def initialize(client:) @client = client end + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :ids + # @option params [String, nil] :q + # @option params [Integer, nil] :limit + # @option params [Integer, nil] :offset + # + # @return [Schematic::Accounts::Types::ListAccountMembersResponse] + def list_account_members(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[ids q limit offset] + query_params = {} + query_params["ids"] = params[:ids] if params.key?(:ids) + query_params["q"] = params[:q] if params.key?(:q) + query_params["limit"] = params[:limit] if params.key?(:limit) + query_params["offset"] = params[:offset] if params.key?(:offset) + params.except(*query_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "account-members", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Accounts::Types::ListAccountMembersResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :account_member_id + # + # @return [Schematic::Accounts::Types::GetAccountMemberResponse] + def get_account_member(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "account-members/#{URI.encode_uri_component(params[:account_member_id].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Accounts::Types::GetAccountMemberResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url diff --git a/lib/schematic/companies/types/create_plan_trait_response.rb b/lib/schematic/accounts/types/get_account_member_response.rb similarity index 51% rename from lib/schematic/companies/types/create_plan_trait_response.rb rename to lib/schematic/accounts/types/get_account_member_response.rb index d8eedb8..95916a9 100644 --- a/lib/schematic/companies/types/create_plan_trait_response.rb +++ b/lib/schematic/accounts/types/get_account_member_response.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true module Schematic - module Companies + module Accounts module Types - class CreatePlanTraitResponse < Internal::Types::Model - field :data, -> { Schematic::Types::PlanTraitResponseData }, optional: false, nullable: false + class GetAccountMemberResponse < Internal::Types::Model + field :data, -> { Schematic::Types::AccountMemberResponseData }, optional: false, nullable: false field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/list_account_members_params.rb b/lib/schematic/accounts/types/list_account_members_params.rb new file mode 100644 index 0000000..3a52b8b --- /dev/null +++ b/lib/schematic/accounts/types/list_account_members_params.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Accounts + module Types + # Input parameters + class ListAccountMembersParams < Internal::Types::Model + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/accounts/types/list_account_members_request.rb b/lib/schematic/accounts/types/list_account_members_request.rb new file mode 100644 index 0000000..e015969 --- /dev/null +++ b/lib/schematic/accounts/types/list_account_members_request.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Accounts + module Types + class ListAccountMembersRequest < Internal::Types::Model + field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/accounts/types/list_account_members_response.rb b/lib/schematic/accounts/types/list_account_members_response.rb new file mode 100644 index 0000000..be9566b --- /dev/null +++ b/lib/schematic/accounts/types/list_account_members_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Accounts + module Types + class ListAccountMembersResponse < Internal::Types::Model + field :data, -> { Internal::Types::Array[Schematic::Types::AccountMemberResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Accounts::Types::ListAccountMembersParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/billing/types/create_billing_price_request_body.rb b/lib/schematic/billing/types/create_billing_price_request_body.rb index e9f9244..81de55e 100644 --- a/lib/schematic/billing/types/create_billing_price_request_body.rb +++ b/lib/schematic/billing/types/create_billing_price_request_body.rb @@ -10,6 +10,7 @@ class CreateBillingPriceRequestBody < Internal::Types::Model field :interval, -> { String }, optional: false, nullable: false field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false field :meter_id, -> { String }, optional: true, nullable: false + field :nickname, -> { String }, optional: true, nullable: false field :package_size, -> { Integer }, optional: true, nullable: false field :price, -> { Integer }, optional: false, nullable: false field :price_decimal, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/billing/types/create_billing_subscription_request_body.rb b/lib/schematic/billing/types/create_billing_subscription_request_body.rb index adcf667..2324931 100644 --- a/lib/schematic/billing/types/create_billing_subscription_request_body.rb +++ b/lib/schematic/billing/types/create_billing_subscription_request_body.rb @@ -18,6 +18,7 @@ class CreateBillingSubscriptionRequestBody < Internal::Types::Model field :period_end, -> { Integer }, optional: true, nullable: false field :period_start, -> { Integer }, optional: true, nullable: false field :product_external_ids, -> { Internal::Types::Array[Schematic::Types::BillingProductPricing] }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false field :status, -> { String }, optional: true, nullable: false field :subscription_external_id, -> { String }, optional: false, nullable: false field :total_price, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/billing/types/create_meter_request_body.rb b/lib/schematic/billing/types/create_meter_request_body.rb index cd37488..1877a65 100644 --- a/lib/schematic/billing/types/create_meter_request_body.rb +++ b/lib/schematic/billing/types/create_meter_request_body.rb @@ -8,6 +8,7 @@ class CreateMeterRequestBody < Internal::Types::Model field :event_name, -> { String }, optional: false, nullable: false field :event_payload_key, -> { String }, optional: false, nullable: false field :external_id, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false end end end diff --git a/lib/schematic/client.rb b/lib/schematic/client.rb index e5d52d7..580845b 100644 --- a/lib/schematic/client.rb +++ b/lib/schematic/client.rb @@ -72,6 +72,11 @@ def features @features ||= Schematic::Features::Client.new(client: @raw_client) end + # @return [Schematic::Integrationsapi::Client] + def integrationsapi + @integrationsapi ||= Schematic::Integrationsapi::Client.new(client: @raw_client) + end + # @return [Schematic::Planbundle::Client] def planbundle @planbundle ||= Schematic::Planbundle::Client.new(client: @raw_client) diff --git a/lib/schematic/companies/client.rb b/lib/schematic/companies/client.rb index 566cac1..a83bb71 100644 --- a/lib/schematic/companies/client.rb +++ b/lib/schematic/companies/client.rb @@ -18,6 +18,7 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String, nil] :credit_type_ids + # @option params [Boolean, nil] :has_scheduled_downgrade # @option params [String, nil] :ids # @option params [Boolean, nil] :monetized_subscriptions # @option params [String, nil] :plan_id @@ -39,9 +40,10 @@ def initialize(client:) # @return [Schematic::Companies::Types::ListCompaniesResponse] def list_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_type_ids ids monetized_subscriptions plan_id plan_ids plan_version_id q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset] + query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset] query_params = {} query_params["credit_type_ids"] = params[:credit_type_ids] if params.key?(:credit_type_ids) + query_params["has_scheduled_downgrade"] = params[:has_scheduled_downgrade] if params.key?(:has_scheduled_downgrade) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["monetized_subscriptions"] = params[:monetized_subscriptions] if params.key?(:monetized_subscriptions) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) @@ -195,6 +197,7 @@ def delete_company(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String, nil] :credit_type_ids + # @option params [Boolean, nil] :has_scheduled_downgrade # @option params [String, nil] :ids # @option params [Boolean, nil] :monetized_subscriptions # @option params [String, nil] :plan_id @@ -216,9 +219,10 @@ def delete_company(request_options: {}, **params) # @return [Schematic::Companies::Types::CountCompaniesResponse] def count_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_type_ids ids monetized_subscriptions plan_id plan_ids plan_version_id q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset] + query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset] query_params = {} query_params["credit_type_ids"] = params[:credit_type_ids] if params.key?(:credit_type_ids) + query_params["has_scheduled_downgrade"] = params[:has_scheduled_downgrade] if params.key?(:has_scheduled_downgrade) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["monetized_subscriptions"] = params[:monetized_subscriptions] if params.key?(:monetized_subscriptions) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) @@ -895,8 +899,8 @@ def get_entity_trait_values(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :action - # @option params [String, nil] :base_plan_action + # @option params [Schematic::Types::PlanChangeAction, nil] :action + # @option params [Schematic::Types::PlanChangeBasePlanAction, nil] :base_plan_action # @option params [String, nil] :company_id # @option params [String, nil] :company_ids # @option params [String, nil] :plan_ids @@ -1018,38 +1022,6 @@ def list_plan_traits(request_options: {}, **params) end end - # @param request_options [Hash] - # @param params [Schematic::Companies::Types::CreatePlanTraitRequestBody] - # @option request_options [String] :base_url - # @option request_options [Hash{String => Object}] :additional_headers - # @option request_options [Hash{String => Object}] :additional_query_parameters - # @option request_options [Hash{String => Object}] :additional_body_parameters - # @option request_options [Integer] :timeout_in_seconds - # - # @return [Schematic::Companies::Types::CreatePlanTraitResponse] - def create_plan_trait(request_options: {}, **params) - params = Schematic::Internal::Types::Utils.normalize_keys(params) - request = Schematic::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "POST", - path: "plan-traits", - body: Schematic::Companies::Types::CreatePlanTraitRequestBody.new(params).to_h, - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Schematic::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - Schematic::Companies::Types::CreatePlanTraitResponse.load(response.body) - else - error_class = Schematic::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) - end - end - # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url @@ -1082,75 +1054,6 @@ def get_plan_trait(request_options: {}, **params) end end - # @param request_options [Hash] - # @param params [Schematic::Companies::Types::UpdatePlanTraitRequestBody] - # @option request_options [String] :base_url - # @option request_options [Hash{String => Object}] :additional_headers - # @option request_options [Hash{String => Object}] :additional_query_parameters - # @option request_options [Hash{String => Object}] :additional_body_parameters - # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :plan_trait_id - # - # @return [Schematic::Companies::Types::UpdatePlanTraitResponse] - def update_plan_trait(request_options: {}, **params) - params = Schematic::Internal::Types::Utils.normalize_keys(params) - request_data = Schematic::Companies::Types::UpdatePlanTraitRequestBody.new(params).to_h - non_body_param_names = ["plan_trait_id"] - body = request_data.except(*non_body_param_names) - - request = Schematic::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "PUT", - path: "plan-traits/#{URI.encode_uri_component(params[:plan_trait_id].to_s)}", - body: body, - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Schematic::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - Schematic::Companies::Types::UpdatePlanTraitResponse.load(response.body) - else - error_class = Schematic::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) - end - end - - # @param request_options [Hash] - # @param params [Hash] - # @option request_options [String] :base_url - # @option request_options [Hash{String => Object}] :additional_headers - # @option request_options [Hash{String => Object}] :additional_query_parameters - # @option request_options [Hash{String => Object}] :additional_body_parameters - # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :plan_trait_id - # - # @return [Schematic::Companies::Types::DeletePlanTraitResponse] - def delete_plan_trait(request_options: {}, **params) - params = Schematic::Internal::Types::Utils.normalize_keys(params) - request = Schematic::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "DELETE", - path: "plan-traits/#{URI.encode_uri_component(params[:plan_trait_id].to_s)}", - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Schematic::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - Schematic::Companies::Types::DeletePlanTraitResponse.load(response.body) - else - error_class = Schematic::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) - end - end - # @param request_options [Hash] # @param params [Schematic::Companies::Types::UpdatePlanTraitBulkRequestBody] # @option request_options [String] :base_url diff --git a/lib/schematic/companies/types/count_companies_params.rb b/lib/schematic/companies/types/count_companies_params.rb index e889a62..53a90de 100644 --- a/lib/schematic/companies/types/count_companies_params.rb +++ b/lib/schematic/companies/types/count_companies_params.rb @@ -6,6 +6,7 @@ module Types # Input parameters class CountCompaniesParams < Internal::Types::Model field :credit_type_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/schematic/companies/types/count_companies_request.rb b/lib/schematic/companies/types/count_companies_request.rb index 86835e5..ad66c9f 100644 --- a/lib/schematic/companies/types/count_companies_request.rb +++ b/lib/schematic/companies/types/count_companies_request.rb @@ -5,6 +5,7 @@ module Companies module Types class CountCompaniesRequest < Internal::Types::Model field :credit_type_ids, -> { String }, optional: true, nullable: false + field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false field :ids, -> { String }, optional: true, nullable: false field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false field :plan_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/companies/types/create_plan_trait_request_body.rb b/lib/schematic/companies/types/create_plan_trait_request_body.rb deleted file mode 100644 index 50318f5..0000000 --- a/lib/schematic/companies/types/create_plan_trait_request_body.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Companies - module Types - class CreatePlanTraitRequestBody < Internal::Types::Model - field :plan_id, -> { String }, optional: false, nullable: false - field :trait_id, -> { String }, optional: false, nullable: false - field :trait_value, -> { String }, optional: false, nullable: false - end - end - end -end diff --git a/lib/schematic/companies/types/list_companies_params.rb b/lib/schematic/companies/types/list_companies_params.rb index 2b508cc..81b25c0 100644 --- a/lib/schematic/companies/types/list_companies_params.rb +++ b/lib/schematic/companies/types/list_companies_params.rb @@ -6,6 +6,7 @@ module Types # Input parameters class ListCompaniesParams < Internal::Types::Model field :credit_type_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/schematic/companies/types/list_companies_request.rb b/lib/schematic/companies/types/list_companies_request.rb index ca300fe..972e70b 100644 --- a/lib/schematic/companies/types/list_companies_request.rb +++ b/lib/schematic/companies/types/list_companies_request.rb @@ -5,6 +5,7 @@ module Companies module Types class ListCompaniesRequest < Internal::Types::Model field :credit_type_ids, -> { String }, optional: true, nullable: false + field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false field :ids, -> { String }, optional: true, nullable: false field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false field :plan_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/companies/types/list_plan_changes_params.rb b/lib/schematic/companies/types/list_plan_changes_params.rb index 0abf964..2e18145 100644 --- a/lib/schematic/companies/types/list_plan_changes_params.rb +++ b/lib/schematic/companies/types/list_plan_changes_params.rb @@ -5,8 +5,8 @@ module Companies module Types # Input parameters class ListPlanChangesParams < Internal::Types::Model - field :action, -> { String }, optional: true, nullable: false - field :base_plan_action, -> { String }, optional: true, nullable: false + field :action, -> { Schematic::Types::PlanChangeAction }, optional: true, nullable: false + field :base_plan_action, -> { Schematic::Types::PlanChangeBasePlanAction }, optional: true, nullable: false field :company_id, -> { String }, optional: true, nullable: false field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/companies/types/list_plan_changes_request.rb b/lib/schematic/companies/types/list_plan_changes_request.rb index 77f3889..3fb0a83 100644 --- a/lib/schematic/companies/types/list_plan_changes_request.rb +++ b/lib/schematic/companies/types/list_plan_changes_request.rb @@ -4,8 +4,8 @@ module Schematic module Companies module Types class ListPlanChangesRequest < Internal::Types::Model - field :action, -> { String }, optional: true, nullable: false - field :base_plan_action, -> { String }, optional: true, nullable: false + field :action, -> { Schematic::Types::PlanChangeAction }, optional: true, nullable: false + field :base_plan_action, -> { Schematic::Types::PlanChangeBasePlanAction }, optional: true, nullable: false field :company_id, -> { String }, optional: true, nullable: false field :company_ids, -> { String }, optional: true, nullable: false field :plan_ids, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/companies/types/update_plan_trait_request_body.rb b/lib/schematic/companies/types/update_plan_trait_request_body.rb deleted file mode 100644 index e25a537..0000000 --- a/lib/schematic/companies/types/update_plan_trait_request_body.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Companies - module Types - class UpdatePlanTraitRequestBody < Internal::Types::Model - field :plan_trait_id, -> { String }, optional: false, nullable: false - field :plan_id, -> { String }, optional: false, nullable: false - field :trait_value, -> { String }, optional: false, nullable: false - end - end - end -end diff --git a/lib/schematic/entitlements/client.rb b/lib/schematic/entitlements/client.rb index 1dea533..c9c425a 100644 --- a/lib/schematic/entitlements/client.rb +++ b/lib/schematic/entitlements/client.rb @@ -768,6 +768,38 @@ def delete_plan_entitlement(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Schematic::Entitlements::Types::CreateBillingLinkedPlanEntitlementRequestBody] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @return [Schematic::Entitlements::Types::UpsertPlanEntitlementForBillingProductResponse] + def upsert_plan_entitlement_for_billing_product(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "plan-entitlements/billing-linked", + body: Schematic::Entitlements::Types::CreateBillingLinkedPlanEntitlementRequestBody.new(params).to_h, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Entitlements::Types::UpsertPlanEntitlementForBillingProductResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url diff --git a/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb new file mode 100644 index 0000000..eadcf0f --- /dev/null +++ b/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + class CreateBillingLinkedPlanEntitlementRequestBody < Internal::Types::Model + field :billing_product_id, -> { String }, optional: true, nullable: false + field :billing_provider, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false + field :external_resource_id, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :monthly_metered_price_id, -> { String }, optional: true, nullable: false + field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :monthly_unit_price, -> { Integer }, optional: true, nullable: false + field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :overage_billing_product_id, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit_id, -> { String }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :yearly_metered_price_id, -> { String }, optional: true, nullable: false + field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :yearly_unit_price, -> { Integer }, optional: true, nullable: false + field :yearly_unit_price_decimal, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/entitlements/types/create_company_override_request_body.rb b/lib/schematic/entitlements/types/create_company_override_request_body.rb index 1092b73..979a846 100644 --- a/lib/schematic/entitlements/types/create_company_override_request_body.rb +++ b/lib/schematic/entitlements/types/create_company_override_request_body.rb @@ -8,8 +8,8 @@ class CreateCompanyOverrideRequestBody < Internal::Types::Model field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false field :expiration_date, -> { String }, optional: true, nullable: false field :feature_id, -> { String }, optional: false, nullable: false - field :metric_period, -> { Schematic::Entitlements::Types::CreateCompanyOverrideRequestBodyMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Entitlements::Types::CreateCompanyOverrideRequestBodyMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :note, -> { String }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_credit_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/entitlements/types/create_company_override_request_body_metric_period.rb b/lib/schematic/entitlements/types/create_company_override_request_body_metric_period.rb deleted file mode 100644 index 2884b0c..0000000 --- a/lib/schematic/entitlements/types/create_company_override_request_body_metric_period.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Entitlements - module Types - module CreateCompanyOverrideRequestBodyMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - CURRENT_DAY = "current_day" - end - end - end -end diff --git a/lib/schematic/entitlements/types/create_company_override_request_body_metric_period_month_reset.rb b/lib/schematic/entitlements/types/create_company_override_request_body_metric_period_month_reset.rb deleted file mode 100644 index e19a4ae..0000000 --- a/lib/schematic/entitlements/types/create_company_override_request_body_metric_period_month_reset.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Entitlements - module Types - module CreateCompanyOverrideRequestBodyMetricPeriodMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end - end -end diff --git a/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb index 2f888fb..a7913ea 100644 --- a/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb @@ -10,8 +10,8 @@ class CreatePlanEntitlementRequestBody < Internal::Types::Model field :currency, -> { String }, optional: true, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false field :feature_id, -> { String }, optional: false, nullable: false - field :metric_period, -> { Schematic::Entitlements::Types::CreatePlanEntitlementRequestBodyMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Entitlements::Types::CreatePlanEntitlementRequestBodyMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :monthly_metered_price_id, -> { String }, optional: true, nullable: false field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false field :monthly_unit_price, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period.rb b/lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period.rb deleted file mode 100644 index 9143d9a..0000000 --- a/lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Entitlements - module Types - module CreatePlanEntitlementRequestBodyMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - CURRENT_DAY = "current_day" - end - end - end -end diff --git a/lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period_month_reset.rb b/lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period_month_reset.rb deleted file mode 100644 index 5d0b628..0000000 --- a/lib/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period_month_reset.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Entitlements - module Types - module CreatePlanEntitlementRequestBodyMetricPeriodMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end - end -end diff --git a/lib/schematic/entitlements/types/update_company_override_request_body.rb b/lib/schematic/entitlements/types/update_company_override_request_body.rb index 4d6d7bd..fb3e7d9 100644 --- a/lib/schematic/entitlements/types/update_company_override_request_body.rb +++ b/lib/schematic/entitlements/types/update_company_override_request_body.rb @@ -7,8 +7,8 @@ class UpdateCompanyOverrideRequestBody < Internal::Types::Model field :company_override_id, -> { String }, optional: false, nullable: false field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false field :expiration_date, -> { String }, optional: true, nullable: false - field :metric_period, -> { Schematic::Entitlements::Types::UpdateCompanyOverrideRequestBodyMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Entitlements::Types::UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :note, -> { String }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_credit_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/entitlements/types/update_company_override_request_body_metric_period.rb b/lib/schematic/entitlements/types/update_company_override_request_body_metric_period.rb deleted file mode 100644 index bc185f9..0000000 --- a/lib/schematic/entitlements/types/update_company_override_request_body_metric_period.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Entitlements - module Types - module UpdateCompanyOverrideRequestBodyMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - CURRENT_DAY = "current_day" - end - end - end -end diff --git a/lib/schematic/entitlements/types/update_company_override_request_body_metric_period_month_reset.rb b/lib/schematic/entitlements/types/update_company_override_request_body_metric_period_month_reset.rb deleted file mode 100644 index a0b498e..0000000 --- a/lib/schematic/entitlements/types/update_company_override_request_body_metric_period_month_reset.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Entitlements - module Types - module UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end - end -end diff --git a/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb index 70e23fe..37b0abe 100644 --- a/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb @@ -10,8 +10,8 @@ class UpdatePlanEntitlementRequestBody < Internal::Types::Model field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false field :currency, -> { String }, optional: true, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false - field :metric_period, -> { Schematic::Entitlements::Types::UpdatePlanEntitlementRequestBodyMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Entitlements::Types::UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :monthly_metered_price_id, -> { String }, optional: true, nullable: false field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false field :monthly_unit_price, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period.rb b/lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period.rb deleted file mode 100644 index 22a9344..0000000 --- a/lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Entitlements - module Types - module UpdatePlanEntitlementRequestBodyMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - CURRENT_DAY = "current_day" - end - end - end -end diff --git a/lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period_month_reset.rb b/lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period_month_reset.rb deleted file mode 100644 index d8c27b5..0000000 --- a/lib/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period_month_reset.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Entitlements - module Types - module UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end - end -end diff --git a/lib/schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response.rb b/lib/schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response.rb new file mode 100644 index 0000000..7ed5e16 --- /dev/null +++ b/lib/schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + class UpsertPlanEntitlementForBillingProductResponse < Internal::Types::Model + field :data, -> { Schematic::Types::PlanEntitlementResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/features/client.rb b/lib/schematic/features/client.rb index 137eb7b..94dbfb6 100644 --- a/lib/schematic/features/client.rb +++ b/lib/schematic/features/client.rb @@ -17,28 +17,28 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds + # @option params [Boolean, nil] :boolean_require_event + # @option params [Schematic::Types::FeatureType, nil] :feature_type # @option params [String, nil] :ids + # @option params [String, nil] :plan_version_id # @option params [String, nil] :q # @option params [String, nil] :without_company_override_for - # @option params [String, nil] :plan_version_id # @option params [String, nil] :without_plan_entitlement_for - # @option params [Schematic::Types::FeatureType, nil] :feature_type - # @option params [Boolean, nil] :boolean_require_event # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # # @return [Schematic::Features::Types::ListFeaturesResponse] def list_features(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids q without_company_override_for plan_version_id without_plan_entitlement_for feature_type boolean_require_event limit offset] + query_param_names = %i[boolean_require_event feature_type ids plan_version_id q without_company_override_for without_plan_entitlement_for limit offset] query_params = {} + query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event) + query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type) query_params["ids"] = params[:ids] if params.key?(:ids) + query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["q"] = params[:q] if params.key?(:q) query_params["without_company_override_for"] = params[:without_company_override_for] if params.key?(:without_company_override_for) - query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["without_plan_entitlement_for"] = params[:without_plan_entitlement_for] if params.key?(:without_plan_entitlement_for) - query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type) - query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) params.except(*query_param_names) @@ -197,6 +197,38 @@ def delete_feature(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Schematic::Features::Types::CreateBillingLinkedFeatureRequestBody] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @return [Schematic::Features::Types::UpsertFeatureForBillingProductResponse] + def upsert_feature_for_billing_product(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "features/billing-linked", + body: Schematic::Features::Types::CreateBillingLinkedFeatureRequestBody.new(params).to_h, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Features::Types::UpsertFeatureForBillingProductResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url @@ -204,28 +236,28 @@ def delete_feature(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds + # @option params [Boolean, nil] :boolean_require_event + # @option params [Schematic::Types::FeatureType, nil] :feature_type # @option params [String, nil] :ids + # @option params [String, nil] :plan_version_id # @option params [String, nil] :q # @option params [String, nil] :without_company_override_for - # @option params [String, nil] :plan_version_id # @option params [String, nil] :without_plan_entitlement_for - # @option params [Schematic::Types::FeatureType, nil] :feature_type - # @option params [Boolean, nil] :boolean_require_event # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # # @return [Schematic::Features::Types::CountFeaturesResponse] def count_features(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids q without_company_override_for plan_version_id without_plan_entitlement_for feature_type boolean_require_event limit offset] + query_param_names = %i[boolean_require_event feature_type ids plan_version_id q without_company_override_for without_plan_entitlement_for limit offset] query_params = {} + query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event) + query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type) query_params["ids"] = params[:ids] if params.key?(:ids) + query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["q"] = params[:q] if params.key?(:q) query_params["without_company_override_for"] = params[:without_company_override_for] if params.key?(:without_company_override_for) - query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["without_plan_entitlement_for"] = params[:without_plan_entitlement_for] if params.key?(:without_plan_entitlement_for) - query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type) - query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) params.except(*query_param_names) diff --git a/lib/schematic/features/types/count_features_request.rb b/lib/schematic/features/types/count_features_request.rb index 684fd4b..df18fe9 100644 --- a/lib/schematic/features/types/count_features_request.rb +++ b/lib/schematic/features/types/count_features_request.rb @@ -4,13 +4,13 @@ module Schematic module Features module Types class CountFeaturesRequest < Internal::Types::Model + field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false field :ids, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :without_company_override_for, -> { String }, optional: true, nullable: false - field :plan_version_id, -> { String }, optional: true, nullable: false field :without_plan_entitlement_for, -> { String }, optional: true, nullable: false - field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false - field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false end diff --git a/lib/schematic/features/types/create_billing_linked_feature_request_body.rb b/lib/schematic/features/types/create_billing_linked_feature_request_body.rb new file mode 100644 index 0000000..45e681a --- /dev/null +++ b/lib/schematic/features/types/create_billing_linked_feature_request_body.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Schematic + module Features + module Types + class CreateBillingLinkedFeatureRequestBody < Internal::Types::Model + field :billing_provider, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :external_resource_id, -> { String }, optional: false, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + field :flag, -> { Schematic::Types::CreateOrUpdateFlagRequestBody }, optional: true, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/features/types/create_feature_request_body.rb b/lib/schematic/features/types/create_feature_request_body.rb index 2e2be2a..41dcff7 100644 --- a/lib/schematic/features/types/create_feature_request_body.rb +++ b/lib/schematic/features/types/create_feature_request_body.rb @@ -10,7 +10,7 @@ class CreateFeatureRequestBody < Internal::Types::Model field :flag, -> { Schematic::Types::CreateOrUpdateFlagRequestBody }, optional: true, nullable: false field :icon, -> { String }, optional: true, nullable: false field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :plural_name, -> { String }, optional: true, nullable: false field :singular_name, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/features/types/list_features_request.rb b/lib/schematic/features/types/list_features_request.rb index e5d17ff..f5427c9 100644 --- a/lib/schematic/features/types/list_features_request.rb +++ b/lib/schematic/features/types/list_features_request.rb @@ -4,13 +4,13 @@ module Schematic module Features module Types class ListFeaturesRequest < Internal::Types::Model + field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false field :ids, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :without_company_override_for, -> { String }, optional: true, nullable: false - field :plan_version_id, -> { String }, optional: true, nullable: false field :without_plan_entitlement_for, -> { String }, optional: true, nullable: false - field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false - field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false end diff --git a/lib/schematic/features/types/update_feature_request_body.rb b/lib/schematic/features/types/update_feature_request_body.rb index e8975b4..56fe4e8 100644 --- a/lib/schematic/features/types/update_feature_request_body.rb +++ b/lib/schematic/features/types/update_feature_request_body.rb @@ -11,7 +11,7 @@ class UpdateFeatureRequestBody < Internal::Types::Model field :flag, -> { Schematic::Types::CreateOrUpdateFlagRequestBody }, optional: true, nullable: false field :icon, -> { String }, optional: true, nullable: false field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false field :plural_name, -> { String }, optional: true, nullable: false field :singular_name, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/features/types/upsert_feature_for_billing_product_response.rb b/lib/schematic/features/types/upsert_feature_for_billing_product_response.rb new file mode 100644 index 0000000..5b51006 --- /dev/null +++ b/lib/schematic/features/types/upsert_feature_for_billing_product_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Features + module Types + class UpsertFeatureForBillingProductResponse < Internal::Types::Model + field :data, -> { Schematic::Types::FeatureDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/integrationsapi/client.rb b/lib/schematic/integrationsapi/client.rb new file mode 100644 index 0000000..0db678c --- /dev/null +++ b/lib/schematic/integrationsapi/client.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + class Client + # @param client [Schematic::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :type + # + # @return [Schematic::Integrationsapi::Types::GetIntegrationWebhookUrlResponse] + def get_integration_webhook_url(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "integrations/#{URI.encode_uri_component(params[:type].to_s)}/webhook-url", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Integrationsapi::Types::GetIntegrationWebhookUrlResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + end + end +end diff --git a/lib/schematic/integrationsapi/types/get_integration_webhook_url_response.rb b/lib/schematic/integrationsapi/types/get_integration_webhook_url_response.rb new file mode 100644 index 0000000..19ee844 --- /dev/null +++ b/lib/schematic/integrationsapi/types/get_integration_webhook_url_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + module Types + class GetIntegrationWebhookUrlResponse < Internal::Types::Model + field :data, -> { Schematic::Types::IntegrationWebhookUrlResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/client.rb b/lib/schematic/plans/client.rb index 3cc03b1..cb2de78 100644 --- a/lib/schematic/plans/client.rb +++ b/lib/schematic/plans/client.rb @@ -55,6 +55,124 @@ def update_company_plans(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String, nil] :company_id + # @option params [String, nil] :plan_id + # @option params [Schematic::Types::CustomPlanBillingStatus, nil] :status + # @option params [Schematic::Types::CustomPlanBillingStatus, nil] :statuses + # @option params [Integer, nil] :limit + # @option params [Integer, nil] :offset + # + # @return [Schematic::Plans::Types::ListCustomPlanBillingsResponse] + def list_custom_plan_billings(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[company_id plan_id status statuses limit offset] + query_params = {} + query_params["company_id"] = params[:company_id] if params.key?(:company_id) + query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) + query_params["status"] = params[:status] if params.key?(:status) + query_params["statuses"] = params[:statuses] if params.key?(:statuses) + query_params["limit"] = params[:limit] if params.key?(:limit) + query_params["offset"] = params[:offset] if params.key?(:offset) + params.except(*query_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "custom-plan-billings", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Plans::Types::ListCustomPlanBillingsResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @param request_options [Hash] + # @param params [Schematic::Plans::Types::RetryCustomPlanBillingRequestBody] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :custom_plan_billing_id + # + # @return [Schematic::Plans::Types::RetryCustomPlanBillingResponse] + def retry_custom_plan_billing(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request_data = Schematic::Plans::Types::RetryCustomPlanBillingRequestBody.new(params).to_h + non_body_param_names = ["custom_plan_billing_id"] + body = request_data.except(*non_body_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "PUT", + path: "custom-plan-billings/#{URI.encode_uri_component(params[:custom_plan_billing_id].to_s)}/retry", + body: body, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Plans::Types::RetryCustomPlanBillingResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @param request_options [Hash] + # @param params [Schematic::Plans::Types::CreateCustomPlanRequestBody] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @return [Schematic::Plans::Types::CreateCustomPlanResponse] + def create_custom_plan(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "custom-plans", + body: Schematic::Plans::Types::CreateCustomPlanRequestBody.new(params).to_h, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Plans::Types::CreateCustomPlanResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :company_id + # @option params [Boolean, nil] :exclude_company_scoped # @option params [Boolean, nil] :for_fallback_plan # @option params [Boolean, nil] :for_initial_plan # @option params [Boolean, nil] :for_trial_expiry_plan @@ -63,6 +181,7 @@ def update_company_plans(request_options: {}, **params) # @option params [Boolean, nil] :include_draft_versions # @option params [Schematic::Types::PlanType, nil] :plan_type # @option params [String, nil] :q + # @option params [String, nil] :scoped_to_company_id # @option params [String, nil] :without_entitlement_for # @option params [Boolean, nil] :without_paid_product_id # @option params [Integer, nil] :limit @@ -71,9 +190,10 @@ def update_company_plans(request_options: {}, **params) # @return [Schematic::Plans::Types::ListPlansResponse] def list_plans(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q without_entitlement_for without_paid_product_id limit offset] + query_param_names = %i[company_id exclude_company_scoped for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q scoped_to_company_id without_entitlement_for without_paid_product_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) + query_params["exclude_company_scoped"] = params[:exclude_company_scoped] if params.key?(:exclude_company_scoped) query_params["for_fallback_plan"] = params[:for_fallback_plan] if params.key?(:for_fallback_plan) query_params["for_initial_plan"] = params[:for_initial_plan] if params.key?(:for_initial_plan) query_params["for_trial_expiry_plan"] = params[:for_trial_expiry_plan] if params.key?(:for_trial_expiry_plan) @@ -82,6 +202,7 @@ def list_plans(request_options: {}, **params) query_params["include_draft_versions"] = params[:include_draft_versions] if params.key?(:include_draft_versions) query_params["plan_type"] = params[:plan_type] if params.key?(:plan_type) query_params["q"] = params[:q] if params.key?(:q) + query_params["scoped_to_company_id"] = params[:scoped_to_company_id] if params.key?(:scoped_to_company_id) query_params["without_entitlement_for"] = params[:without_entitlement_for] if params.key?(:without_entitlement_for) query_params["without_paid_product_id"] = params[:without_paid_product_id] if params.key?(:without_paid_product_id) query_params["limit"] = params[:limit] if params.key?(:limit) @@ -278,6 +399,126 @@ def upsert_billing_product_plan(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Schematic::Plans::Types::CreateBillingLinkedPlanRequestBody] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @return [Schematic::Plans::Types::UpsertPlanForBillingProductResponse] + def upsert_plan_for_billing_product(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "plans/billing-linked", + body: Schematic::Plans::Types::CreateBillingLinkedPlanRequestBody.new(params).to_h, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Plans::Types::UpsertPlanForBillingProductResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :plan_id + # @option params [String, nil] :q + # @option params [Integer, nil] :limit + # @option params [Integer, nil] :offset + # + # @return [Schematic::Plans::Types::ListBillingProductMatchCompaniesResponse] + def list_billing_product_match_companies(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[plan_id q limit offset] + query_params = {} + query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) + query_params["q"] = params[:q] if params.key?(:q) + query_params["limit"] = params[:limit] if params.key?(:limit) + query_params["offset"] = params[:offset] if params.key?(:offset) + params.except(*query_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "plans/billing-product-match-companies", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Plans::Types::ListBillingProductMatchCompaniesResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :plan_id + # @option params [String, nil] :q + # @option params [Integer, nil] :limit + # @option params [Integer, nil] :offset + # + # @return [Schematic::Plans::Types::CountBillingProductMatchCompaniesResponse] + def count_billing_product_match_companies(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[plan_id q limit offset] + query_params = {} + query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) + query_params["q"] = params[:q] if params.key?(:q) + query_params["limit"] = params[:limit] if params.key?(:limit) + query_params["offset"] = params[:offset] if params.key?(:offset) + params.except(*query_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "plans/billing-product-match-companies/count", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Plans::Types::CountBillingProductMatchCompaniesResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url @@ -286,6 +527,7 @@ def upsert_billing_product_plan(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String, nil] :company_id + # @option params [Boolean, nil] :exclude_company_scoped # @option params [Boolean, nil] :for_fallback_plan # @option params [Boolean, nil] :for_initial_plan # @option params [Boolean, nil] :for_trial_expiry_plan @@ -294,6 +536,7 @@ def upsert_billing_product_plan(request_options: {}, **params) # @option params [Boolean, nil] :include_draft_versions # @option params [Schematic::Types::PlanType, nil] :plan_type # @option params [String, nil] :q + # @option params [String, nil] :scoped_to_company_id # @option params [String, nil] :without_entitlement_for # @option params [Boolean, nil] :without_paid_product_id # @option params [Integer, nil] :limit @@ -302,9 +545,10 @@ def upsert_billing_product_plan(request_options: {}, **params) # @return [Schematic::Plans::Types::CountPlansResponse] def count_plans(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q without_entitlement_for without_paid_product_id limit offset] + query_param_names = %i[company_id exclude_company_scoped for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q scoped_to_company_id without_entitlement_for without_paid_product_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) + query_params["exclude_company_scoped"] = params[:exclude_company_scoped] if params.key?(:exclude_company_scoped) query_params["for_fallback_plan"] = params[:for_fallback_plan] if params.key?(:for_fallback_plan) query_params["for_initial_plan"] = params[:for_initial_plan] if params.key?(:for_initial_plan) query_params["for_trial_expiry_plan"] = params[:for_trial_expiry_plan] if params.key?(:for_trial_expiry_plan) @@ -313,6 +557,7 @@ def count_plans(request_options: {}, **params) query_params["include_draft_versions"] = params[:include_draft_versions] if params.key?(:include_draft_versions) query_params["plan_type"] = params[:plan_type] if params.key?(:plan_type) query_params["q"] = params[:q] if params.key?(:q) + query_params["scoped_to_company_id"] = params[:scoped_to_company_id] if params.key?(:scoped_to_company_id) query_params["without_entitlement_for"] = params[:without_entitlement_for] if params.key?(:without_entitlement_for) query_params["without_paid_product_id"] = params[:without_paid_product_id] if params.key?(:without_paid_product_id) query_params["limit"] = params[:limit] if params.key?(:limit) diff --git a/lib/schematic/plans/types/count_billing_product_match_companies_params.rb b/lib/schematic/plans/types/count_billing_product_match_companies_params.rb new file mode 100644 index 0000000..85f0256 --- /dev/null +++ b/lib/schematic/plans/types/count_billing_product_match_companies_params.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + # Input parameters + class CountBillingProductMatchCompaniesParams < Internal::Types::Model + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/count_billing_product_match_companies_request.rb b/lib/schematic/plans/types/count_billing_product_match_companies_request.rb new file mode 100644 index 0000000..871ec81 --- /dev/null +++ b/lib/schematic/plans/types/count_billing_product_match_companies_request.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class CountBillingProductMatchCompaniesRequest < Internal::Types::Model + field :plan_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/count_billing_product_match_companies_response.rb b/lib/schematic/plans/types/count_billing_product_match_companies_response.rb new file mode 100644 index 0000000..c23b8f2 --- /dev/null +++ b/lib/schematic/plans/types/count_billing_product_match_companies_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class CountBillingProductMatchCompaniesResponse < Internal::Types::Model + field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::CountBillingProductMatchCompaniesParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/count_plans_params.rb b/lib/schematic/plans/types/count_plans_params.rb index 78959d4..a15282e 100644 --- a/lib/schematic/plans/types/count_plans_params.rb +++ b/lib/schematic/plans/types/count_plans_params.rb @@ -6,6 +6,7 @@ module Types # Input parameters class CountPlansParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :exclude_company_scoped, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_fallback_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false @@ -16,6 +17,7 @@ class CountPlansParams < Internal::Types::Model field :offset, -> { Integer }, optional: true, nullable: false field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :scoped_to_company_id, -> { String }, optional: true, nullable: false field :without_entitlement_for, -> { String }, optional: true, nullable: false field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false end diff --git a/lib/schematic/plans/types/count_plans_request.rb b/lib/schematic/plans/types/count_plans_request.rb index 8686bc3..b69d116 100644 --- a/lib/schematic/plans/types/count_plans_request.rb +++ b/lib/schematic/plans/types/count_plans_request.rb @@ -5,6 +5,7 @@ module Plans module Types class CountPlansRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :exclude_company_scoped, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_fallback_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false @@ -13,6 +14,7 @@ class CountPlansRequest < Internal::Types::Model field :include_draft_versions, -> { Internal::Types::Boolean }, optional: true, nullable: false field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :scoped_to_company_id, -> { String }, optional: true, nullable: false field :without_entitlement_for, -> { String }, optional: true, nullable: false field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb b/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb new file mode 100644 index 0000000..3b2c584 --- /dev/null +++ b/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class CreateBillingLinkedPlanRequestBody < Internal::Types::Model + field :billing_provider, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :external_resource_id, -> { String }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/create_custom_plan_request_body.rb b/lib/schematic/plans/types/create_custom_plan_request_body.rb new file mode 100644 index 0000000..f51a4ec --- /dev/null +++ b/lib/schematic/plans/types/create_custom_plan_request_body.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class CreateCustomPlanRequestBody < Internal::Types::Model + field :company_id, -> { String }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/companies/types/delete_plan_trait_response.rb b/lib/schematic/plans/types/create_custom_plan_response.rb similarity index 52% rename from lib/schematic/companies/types/delete_plan_trait_response.rb rename to lib/schematic/plans/types/create_custom_plan_response.rb index a2d2f3f..e0b3006 100644 --- a/lib/schematic/companies/types/delete_plan_trait_response.rb +++ b/lib/schematic/plans/types/create_custom_plan_response.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true module Schematic - module Companies + module Plans module Types - class DeletePlanTraitResponse < Internal::Types::Model - field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + class CreateCustomPlanResponse < Internal::Types::Model + field :data, -> { Schematic::Types::PlanDetailResponseData }, optional: false, nullable: false field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/list_billing_product_match_companies_params.rb b/lib/schematic/plans/types/list_billing_product_match_companies_params.rb new file mode 100644 index 0000000..7bbde34 --- /dev/null +++ b/lib/schematic/plans/types/list_billing_product_match_companies_params.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + # Input parameters + class ListBillingProductMatchCompaniesParams < Internal::Types::Model + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/list_billing_product_match_companies_request.rb b/lib/schematic/plans/types/list_billing_product_match_companies_request.rb new file mode 100644 index 0000000..ab58b77 --- /dev/null +++ b/lib/schematic/plans/types/list_billing_product_match_companies_request.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class ListBillingProductMatchCompaniesRequest < Internal::Types::Model + field :plan_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/list_billing_product_match_companies_response.rb b/lib/schematic/plans/types/list_billing_product_match_companies_response.rb new file mode 100644 index 0000000..3aaade5 --- /dev/null +++ b/lib/schematic/plans/types/list_billing_product_match_companies_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class ListBillingProductMatchCompaniesResponse < Internal::Types::Model + field :data, -> { Internal::Types::Array[Schematic::Types::CompanyDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::ListBillingProductMatchCompaniesParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/list_custom_plan_billings_params.rb b/lib/schematic/plans/types/list_custom_plan_billings_params.rb new file mode 100644 index 0000000..15feea5 --- /dev/null +++ b/lib/schematic/plans/types/list_custom_plan_billings_params.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + # Input parameters + class ListCustomPlanBillingsParams < Internal::Types::Model + field :company_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false + field :statuses, -> { Internal::Types::Array[Schematic::Types::CustomPlanBillingStatus] }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/list_custom_plan_billings_request.rb b/lib/schematic/plans/types/list_custom_plan_billings_request.rb new file mode 100644 index 0000000..70347fd --- /dev/null +++ b/lib/schematic/plans/types/list_custom_plan_billings_request.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class ListCustomPlanBillingsRequest < Internal::Types::Model + field :company_id, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false + field :statuses, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/list_custom_plan_billings_response.rb b/lib/schematic/plans/types/list_custom_plan_billings_response.rb new file mode 100644 index 0000000..2b41c35 --- /dev/null +++ b/lib/schematic/plans/types/list_custom_plan_billings_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class ListCustomPlanBillingsResponse < Internal::Types::Model + field :data, -> { Internal::Types::Array[Schematic::Types::CustomPlanBillingResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::ListCustomPlanBillingsParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/list_plans_params.rb b/lib/schematic/plans/types/list_plans_params.rb index 0b62f48..861067e 100644 --- a/lib/schematic/plans/types/list_plans_params.rb +++ b/lib/schematic/plans/types/list_plans_params.rb @@ -6,6 +6,7 @@ module Types # Input parameters class ListPlansParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :exclude_company_scoped, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_fallback_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false @@ -16,6 +17,7 @@ class ListPlansParams < Internal::Types::Model field :offset, -> { Integer }, optional: true, nullable: false field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :scoped_to_company_id, -> { String }, optional: true, nullable: false field :without_entitlement_for, -> { String }, optional: true, nullable: false field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false end diff --git a/lib/schematic/plans/types/list_plans_request.rb b/lib/schematic/plans/types/list_plans_request.rb index 98c1b04..ef4a0a6 100644 --- a/lib/schematic/plans/types/list_plans_request.rb +++ b/lib/schematic/plans/types/list_plans_request.rb @@ -5,6 +5,7 @@ module Plans module Types class ListPlansRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :exclude_company_scoped, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_fallback_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false @@ -13,6 +14,7 @@ class ListPlansRequest < Internal::Types::Model field :include_draft_versions, -> { Internal::Types::Boolean }, optional: true, nullable: false field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :scoped_to_company_id, -> { String }, optional: true, nullable: false field :without_entitlement_for, -> { String }, optional: true, nullable: false field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/plans/types/publish_plan_version_request_body.rb b/lib/schematic/plans/types/publish_plan_version_request_body.rb index f991bb9..497f7e6 100644 --- a/lib/schematic/plans/types/publish_plan_version_request_body.rb +++ b/lib/schematic/plans/types/publish_plan_version_request_body.rb @@ -5,8 +5,12 @@ module Plans module Types class PublishPlanVersionRequestBody < Internal::Types::Model field :plan_id, -> { String }, optional: false, nullable: false + field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false + field :customer_email, -> { String }, optional: true, nullable: false + field :days_until_due, -> { Integer }, optional: true, nullable: false field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :migration_strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false + field :pay_in_advance, -> { Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody] }, optional: false, nullable: false end end end diff --git a/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb b/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb new file mode 100644 index 0000000..f22684d --- /dev/null +++ b/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class RetryCustomPlanBillingRequestBody < Internal::Types::Model + field :custom_plan_billing_id, -> { String }, optional: false, nullable: false + field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false + field :customer_email, -> { String }, optional: false, nullable: false + field :days_until_due, -> { Integer }, optional: true, nullable: false + field :pay_in_advance, -> { Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/retry_custom_plan_billing_response.rb b/lib/schematic/plans/types/retry_custom_plan_billing_response.rb new file mode 100644 index 0000000..8abac7c --- /dev/null +++ b/lib/schematic/plans/types/retry_custom_plan_billing_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class RetryCustomPlanBillingResponse < Internal::Types::Model + field :data, -> { Schematic::Types::CustomPlanBillingResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/companies/types/update_plan_trait_response.rb b/lib/schematic/plans/types/upsert_plan_for_billing_product_response.rb similarity index 50% rename from lib/schematic/companies/types/update_plan_trait_response.rb rename to lib/schematic/plans/types/upsert_plan_for_billing_product_response.rb index 0afd04b..259ab9b 100644 --- a/lib/schematic/companies/types/update_plan_trait_response.rb +++ b/lib/schematic/plans/types/upsert_plan_for_billing_product_response.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true module Schematic - module Companies + module Plans module Types - class UpdatePlanTraitResponse < Internal::Types::Model - field :data, -> { Schematic::Types::PlanTraitResponseData }, optional: false, nullable: false + class UpsertPlanForBillingProductResponse < Internal::Types::Model + field :data, -> { Schematic::Types::PlanDetailResponseData }, optional: false, nullable: false field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/account_member_permission.rb b/lib/schematic/types/account_member_permission.rb new file mode 100644 index 0000000..7f50e4e --- /dev/null +++ b/lib/schematic/types/account_member_permission.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module Schematic + module Types + module AccountMemberPermission + extend Schematic::Internal::Types::Enum + + BILLING_CREDITS_EDIT = "billing_credits_edit" + COMPANIES_EDIT = "companies_edit" + COMPANY_USERS_EDIT = "company_users_edit" + COMPONENTS_EDIT = "components_edit" + DATA_EXPORTS_EDIT = "data_exports_edit" + FEATURES_EDIT = "features_edit" + FLAG_RULES_EDIT = "flag_rules_edit" + FLAGS_EDIT = "flags_edit" + OVERRIDES_EDIT = "overrides_edit" + PLAN_BILLING_EDIT = "plan_billing_edit" + PLAN_ENTITLEMENTS_EDIT = "plan_entitlements_edit" + PLAN_VERSIONS_EDIT = "plan_versions_edit" + PLANS_EDIT = "plans_edit" + WEBHOOKS_EDIT = "webhooks_edit" + WEBHOOKS_REVEAL_SECRET = "webhooks_reveal_secret" + end + end +end diff --git a/lib/schematic/types/account_member_response_data.rb b/lib/schematic/types/account_member_response_data.rb new file mode 100644 index 0000000..9f76714 --- /dev/null +++ b/lib/schematic/types/account_member_response_data.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Schematic + module Types + class AccountMemberResponseData < Internal::Types::Model + field :created_at, -> { String }, optional: false, nullable: false + field :email, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :image_url, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :permissions, -> { Internal::Types::Hash[String, Internal::Types::Array[Schematic::Types::AccountMemberPermission]] }, optional: false, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/rulesengine_company_metric_month_reset.rb b/lib/schematic/types/account_member_role.rb similarity index 50% rename from lib/schematic/types/rulesengine_company_metric_month_reset.rb rename to lib/schematic/types/account_member_role.rb index a51813e..fd3d77d 100644 --- a/lib/schematic/types/rulesengine_company_metric_month_reset.rb +++ b/lib/schematic/types/account_member_role.rb @@ -2,11 +2,11 @@ module Schematic module Types - module RulesengineCompanyMetricMonthReset + module AccountMemberRole extend Schematic::Internal::Types::Enum - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" + ADMIN = "admin" + MEMBER = "member" end end end diff --git a/lib/schematic/types/api_key_create_response_data.rb b/lib/schematic/types/api_key_create_response_data.rb index a8939d5..87a0edd 100644 --- a/lib/schematic/types/api_key_create_response_data.rb +++ b/lib/schematic/types/api_key_create_response_data.rb @@ -5,6 +5,7 @@ module Types class ApiKeyCreateResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: true, nullable: false + field :environment, -> { Schematic::Types::EnvironmentResponseData }, optional: true, nullable: false field :environment_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :last_used_at, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/api_key_response_data.rb b/lib/schematic/types/api_key_response_data.rb index 1cb1c1f..358478b 100644 --- a/lib/schematic/types/api_key_response_data.rb +++ b/lib/schematic/types/api_key_response_data.rb @@ -5,6 +5,7 @@ module Types class ApiKeyResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: true, nullable: false + field :environment, -> { Schematic::Types::EnvironmentResponseData }, optional: true, nullable: false field :environment_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :last_used_at, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/audit_log_list_response_data.rb b/lib/schematic/types/audit_log_list_response_data.rb index 6398651..16cf142 100644 --- a/lib/schematic/types/audit_log_list_response_data.rb +++ b/lib/schematic/types/audit_log_list_response_data.rb @@ -6,6 +6,7 @@ class AuditLogListResponseData < Internal::Types::Model field :actor_type, -> { Schematic::Types::ActorType }, optional: false, nullable: false field :api_key_id, -> { String }, optional: true, nullable: false field :ended_at, -> { String }, optional: true, nullable: false + field :environment, -> { Schematic::Types::EnvironmentResponseData }, optional: true, nullable: false field :environment_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :method_, -> { String }, optional: false, nullable: false, api_name: "method" diff --git a/lib/schematic/types/audit_log_response_data.rb b/lib/schematic/types/audit_log_response_data.rb index c0b84a6..1d472a2 100644 --- a/lib/schematic/types/audit_log_response_data.rb +++ b/lib/schematic/types/audit_log_response_data.rb @@ -6,6 +6,7 @@ class AuditLogResponseData < Internal::Types::Model field :actor_type, -> { Schematic::Types::ActorType }, optional: false, nullable: false field :api_key_id, -> { String }, optional: true, nullable: false field :ended_at, -> { String }, optional: true, nullable: false + field :environment, -> { Schematic::Types::EnvironmentResponseData }, optional: true, nullable: false field :environment_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :method_, -> { String }, optional: false, nullable: false, api_name: "method" diff --git a/lib/schematic/types/billing_linked_resource_response_data.rb b/lib/schematic/types/billing_linked_resource_response_data.rb new file mode 100644 index 0000000..6e7b57d --- /dev/null +++ b/lib/schematic/types/billing_linked_resource_response_data.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Types + class BillingLinkedResourceResponseData < Internal::Types::Model + field :billing_provider, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :external_resource_id, -> { String }, optional: false, nullable: false + field :originator, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/billing_plan_credit_grant_response_data.rb b/lib/schematic/types/billing_plan_credit_grant_response_data.rb index eb5a81c..32af4d9 100644 --- a/lib/schematic/types/billing_plan_credit_grant_response_data.rb +++ b/lib/schematic/types/billing_plan_credit_grant_response_data.rb @@ -9,6 +9,7 @@ class BillingPlanCreditGrantResponseData < Internal::Types::Model field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false field :auto_topup_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit, -> { Schematic::Types::BillingCreditResponseData }, optional: true, nullable: false diff --git a/lib/schematic/types/billing_price_response_data.rb b/lib/schematic/types/billing_price_response_data.rb index 875b762..4601a82 100644 --- a/lib/schematic/types/billing_price_response_data.rb +++ b/lib/schematic/types/billing_price_response_data.rb @@ -7,6 +7,7 @@ class BillingPriceResponseData < Internal::Types::Model field :external_price_id, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :interval, -> { Schematic::Types::BillingProductPriceInterval }, optional: false, nullable: false + field :nickname, -> { String }, optional: true, nullable: false field :price, -> { Integer }, optional: false, nullable: false field :price_decimal, -> { String }, optional: true, nullable: false field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false diff --git a/lib/schematic/types/billing_price_view.rb b/lib/schematic/types/billing_price_view.rb index f133450..7820b40 100644 --- a/lib/schematic/types/billing_price_view.rb +++ b/lib/schematic/types/billing_price_view.rb @@ -12,6 +12,7 @@ class BillingPriceView < Internal::Types::Model field :meter_event_name, -> { String }, optional: true, nullable: false field :meter_event_payload_key, -> { String }, optional: true, nullable: false field :meter_id, -> { String }, optional: true, nullable: false + field :nickname, -> { String }, optional: true, nullable: false field :package_size, -> { Integer }, optional: false, nullable: false field :price, -> { Integer }, optional: false, nullable: false field :price_decimal, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/billing_product_plan_response_data.rb b/lib/schematic/types/billing_product_plan_response_data.rb index 6994b87..8db6aca 100644 --- a/lib/schematic/types/billing_product_plan_response_data.rb +++ b/lib/schematic/types/billing_product_plan_response_data.rb @@ -6,7 +6,7 @@ class BillingProductPlanResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false field :billing_product_id, -> { String }, optional: false, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false - field :controlled_by, -> { Schematic::Types::PlanControlledByType }, optional: false, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false field :environment_id, -> { String }, optional: false, nullable: false field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false field :monthly_price_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/billing_product_price_response_data.rb b/lib/schematic/types/billing_product_price_response_data.rb index 3c3e8b6..6bcf3e2 100644 --- a/lib/schematic/types/billing_product_price_response_data.rb +++ b/lib/schematic/types/billing_product_price_response_data.rb @@ -10,6 +10,7 @@ class BillingProductPriceResponseData < Internal::Types::Model field :interval, -> { Schematic::Types::BillingProductPriceInterval }, optional: false, nullable: false field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false field :meter_id, -> { String }, optional: true, nullable: false + field :nickname, -> { String }, optional: true, nullable: false field :package_size, -> { Integer }, optional: false, nullable: false field :price, -> { Integer }, optional: false, nullable: false field :price_decimal, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/billing_provider_type.rb b/lib/schematic/types/billing_provider_type.rb index b1a2559..45435b1 100644 --- a/lib/schematic/types/billing_provider_type.rb +++ b/lib/schematic/types/billing_provider_type.rb @@ -5,6 +5,7 @@ module Types module BillingProviderType extend Schematic::Internal::Types::Enum + ORB = "orb" SCHEMATIC = "schematic" STRIPE = "stripe" end diff --git a/lib/schematic/types/check_flag_response_data.rb b/lib/schematic/types/check_flag_response_data.rb index 25a9409..f274c03 100644 --- a/lib/schematic/types/check_flag_response_data.rb +++ b/lib/schematic/types/check_flag_response_data.rb @@ -9,13 +9,13 @@ class CheckFlagResponseData < Internal::Types::Model field :feature_allocation, -> { Integer }, optional: true, nullable: false field :feature_usage, -> { Integer }, optional: true, nullable: false field :feature_usage_event, -> { String }, optional: true, nullable: false - field :feature_usage_period, -> { String }, optional: true, nullable: false + field :feature_usage_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false field :feature_usage_reset_at, -> { String }, optional: true, nullable: false field :flag, -> { String }, optional: false, nullable: false field :flag_id, -> { String }, optional: true, nullable: false field :reason, -> { String }, optional: false, nullable: false field :rule_id, -> { String }, optional: true, nullable: false - field :rule_type, -> { String }, optional: true, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: true, nullable: false field :user_id, -> { String }, optional: true, nullable: false field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end diff --git a/lib/schematic/types/checkout_subscription.rb b/lib/schematic/types/checkout_subscription.rb index d0298b4..20d3309 100644 --- a/lib/schematic/types/checkout_subscription.rb +++ b/lib/schematic/types/checkout_subscription.rb @@ -16,6 +16,7 @@ class CheckoutSubscription < Internal::Types::Model field :expired_at, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :interval, -> { String }, optional: false, nullable: false + field :invoice_url, -> { String }, optional: true, nullable: false field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false field :period_end, -> { Integer }, optional: false, nullable: false field :period_start, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/company_detail_response_data.rb b/lib/schematic/types/company_detail_response_data.rb index 50298c1..623dde9 100644 --- a/lib/schematic/types/company_detail_response_data.rb +++ b/lib/schematic/types/company_detail_response_data.rb @@ -8,6 +8,7 @@ class CompanyDetailResponseData < Internal::Types::Model field :billing_subscription, -> { Schematic::Types::BillingSubscriptionView }, optional: true, nullable: false field :billing_subscriptions, -> { Internal::Types::Array[Schematic::Types::BillingSubscriptionView] }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false + field :custom_plan_billings, -> { Internal::Types::Array[Schematic::Types::CustomPlanBillingResponseData] }, optional: false, nullable: false field :default_payment_method, -> { Schematic::Types::PaymentMethodResponseData }, optional: true, nullable: false field :entitlements, -> { Internal::Types::Array[Schematic::Types::FeatureEntitlement] }, optional: false, nullable: false field :entity_traits, -> { Internal::Types::Array[Schematic::Types::EntityTraitDetailResponseData] }, optional: false, nullable: false diff --git a/lib/schematic/types/company_event_period_metrics_response_data.rb b/lib/schematic/types/company_event_period_metrics_response_data.rb index 18bbcf1..fc2c37a 100644 --- a/lib/schematic/types/company_event_period_metrics_response_data.rb +++ b/lib/schematic/types/company_event_period_metrics_response_data.rb @@ -10,8 +10,8 @@ class CompanyEventPeriodMetricsResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false field :environment_id, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: false, nullable: false - field :month_reset, -> { String }, optional: false, nullable: false - field :period, -> { String }, optional: false, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: false, nullable: false + field :period, -> { Schematic::Types::MetricPeriod }, optional: false, nullable: false field :valid_until, -> { String }, optional: true, nullable: false field :value, -> { Integer }, optional: false, nullable: false end diff --git a/lib/schematic/types/company_override_response_data.rb b/lib/schematic/types/company_override_response_data.rb index b995372..0aea964 100644 --- a/lib/schematic/types/company_override_response_data.rb +++ b/lib/schematic/types/company_override_response_data.rb @@ -12,8 +12,8 @@ class CompanyOverrideResponseData < Internal::Types::Model field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false field :feature_id, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false - field :metric_period, -> { String }, optional: true, nullable: false - field :metric_period_month_reset, -> { String }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :notes, -> { Internal::Types::Array[Schematic::Types::CompanyOverrideNoteResponseData] }, optional: false, nullable: false field :rule_id, -> { String }, optional: true, nullable: false field :rule_id_usage_exceeded, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/company_plan_detail_response_data.rb b/lib/schematic/types/company_plan_detail_response_data.rb index 4bcdb97..09d5da0 100644 --- a/lib/schematic/types/company_plan_detail_response_data.rb +++ b/lib/schematic/types/company_plan_detail_response_data.rb @@ -5,12 +5,16 @@ module Types class CompanyPlanDetailResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :audience_type, -> { String }, optional: true, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_can_trial, -> { Internal::Types::Boolean }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: true, nullable: false field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false - field :controlled_by, -> { Schematic::Types::PlanControlledByType }, optional: false, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false field :current, -> { Internal::Types::Boolean }, optional: false, nullable: false @@ -19,8 +23,8 @@ class CompanyPlanDetailResponseData < Internal::Types::Model field :description, -> { String }, optional: false, nullable: false field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: false, nullable: false - field :features, -> { Internal::Types::Array[Schematic::Types::FeatureDetailResponseData] }, optional: false, nullable: false - field :icon, -> { String }, optional: false, nullable: false + field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantView] }, optional: false, nullable: false field :invalid_reason, -> { Schematic::Types::CompanyPlanInvalidReason }, optional: true, nullable: false diff --git a/lib/schematic/types/company_subscription_response_data.rb b/lib/schematic/types/company_subscription_response_data.rb index fb4dc65..4ddcbf5 100644 --- a/lib/schematic/types/company_subscription_response_data.rb +++ b/lib/schematic/types/company_subscription_response_data.rb @@ -13,6 +13,7 @@ class CompanySubscriptionResponseData < Internal::Types::Model field :latest_invoice, -> { Schematic::Types::InvoiceResponseData }, optional: true, nullable: false field :payment_method, -> { Schematic::Types::PaymentMethodResponseData }, optional: true, nullable: false field :products, -> { Internal::Types::Array[Schematic::Types::BillingProductForSubscriptionResponseData] }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false field :status, -> { String }, optional: false, nullable: false field :subscription_external_id, -> { String }, optional: false, nullable: false field :total_price, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/condition_operator.rb b/lib/schematic/types/comparable_operator.rb similarity index 90% rename from lib/schematic/types/condition_operator.rb rename to lib/schematic/types/comparable_operator.rb index 8e2e846..401d280 100644 --- a/lib/schematic/types/condition_operator.rb +++ b/lib/schematic/types/comparable_operator.rb @@ -2,17 +2,17 @@ module Schematic module Types - module ConditionOperator + module ComparableOperator extend Schematic::Internal::Types::Enum EQ = "eq" - NE = "ne" GT = "gt" - LT = "lt" GTE = "gte" - LTE = "lte" IS_EMPTY = "is_empty" + LT = "lt" + LTE = "lte" NOT_EMPTY = "not_empty" + NE = "ne" end end end diff --git a/lib/schematic/types/condition.rb b/lib/schematic/types/condition.rb index 4f3e303..f7294a7 100644 --- a/lib/schematic/types/condition.rb +++ b/lib/schematic/types/condition.rb @@ -5,16 +5,16 @@ module Types class Condition < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false field :comparison_trait_definition, -> { Schematic::Types::TraitDefinition }, optional: true, nullable: false - field :condition_type, -> { Schematic::Types::ConditionConditionType }, optional: false, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false field :consumption_rate, -> { Integer }, optional: true, nullable: false field :credit_id, -> { String }, optional: true, nullable: false field :environment_id, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false - field :metric_period, -> { Schematic::Types::ConditionMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Types::ConditionMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :metric_value, -> { Integer }, optional: true, nullable: false - field :operator, -> { Schematic::Types::ConditionOperator }, optional: false, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :trait_definition, -> { Schematic::Types::TraitDefinition }, optional: true, nullable: false field :trait_value, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/condition_response_data.rb b/lib/schematic/types/condition_response_data.rb index dc34642..8cf47a0 100644 --- a/lib/schematic/types/condition_response_data.rb +++ b/lib/schematic/types/condition_response_data.rb @@ -6,7 +6,7 @@ class ConditionResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false field :comparison_trait_id, -> { String }, optional: true, nullable: false field :condition_group_id, -> { String }, optional: true, nullable: false - field :condition_type, -> { String }, optional: false, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false field :consumption_rate, -> { Integer }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit_id, -> { String }, optional: true, nullable: false @@ -14,10 +14,10 @@ class ConditionResponseData < Internal::Types::Model field :event_subtype, -> { String }, optional: true, nullable: false field :flag_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false - field :metric_period, -> { String }, optional: true, nullable: false - field :metric_period_month_reset, -> { String }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :metric_value, -> { Integer }, optional: true, nullable: false - field :operator, -> { String }, optional: false, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false field :resource_unspecified_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :rule_id, -> { String }, optional: false, nullable: false field :trait_entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false diff --git a/lib/schematic/types/condition_condition_type.rb b/lib/schematic/types/condition_type.rb similarity index 91% rename from lib/schematic/types/condition_condition_type.rb rename to lib/schematic/types/condition_type.rb index 79fddb6..97e498a 100644 --- a/lib/schematic/types/condition_condition_type.rb +++ b/lib/schematic/types/condition_type.rb @@ -2,7 +2,7 @@ module Schematic module Types - module ConditionConditionType + module ConditionType extend Schematic::Internal::Types::Enum BASE_PLAN = "base_plan" diff --git a/lib/schematic/types/condition_view.rb b/lib/schematic/types/condition_view.rb index 0cc90ab..ef5532a 100644 --- a/lib/schematic/types/condition_view.rb +++ b/lib/schematic/types/condition_view.rb @@ -9,7 +9,7 @@ class ConditionView < Internal::Types::Model field :comparison_trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false field :comparison_trait_id, -> { String }, optional: true, nullable: false field :condition_group_id, -> { String }, optional: true, nullable: false - field :condition_type, -> { String }, optional: false, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false field :consumption_rate, -> { Integer }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit_id, -> { String }, optional: true, nullable: false @@ -17,10 +17,10 @@ class ConditionView < Internal::Types::Model field :event_subtype, -> { String }, optional: true, nullable: false field :flag_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false - field :metric_period, -> { String }, optional: true, nullable: false - field :metric_period_month_reset, -> { String }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :metric_value, -> { Integer }, optional: true, nullable: false - field :operator, -> { String }, optional: false, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false field :plan_versions, -> { Internal::Types::Array[Schematic::Types::GenericPreviewObject] }, optional: false, nullable: false field :plans, -> { Internal::Types::Array[Schematic::Types::GenericPreviewObject] }, optional: false, nullable: false field :resource_unspecified_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false diff --git a/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb b/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb index 0f710ee..22d67d1 100644 --- a/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +++ b/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb @@ -10,6 +10,7 @@ class CreateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false field :auto_topup_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false field :credit_amount, -> { Integer }, optional: false, nullable: false field :credit_id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/create_entitlement_in_bundle_request_body.rb b/lib/schematic/types/create_entitlement_in_bundle_request_body.rb index 4f473dd..a45aee1 100644 --- a/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +++ b/lib/schematic/types/create_entitlement_in_bundle_request_body.rb @@ -9,8 +9,8 @@ class CreateEntitlementInBundleRequestBody < Internal::Types::Model field :currency, -> { String }, optional: true, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false field :feature_id, -> { String }, optional: false, nullable: false - field :metric_period, -> { Schematic::Types::CreateEntitlementInBundleRequestBodyMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Types::CreateEntitlementInBundleRequestBodyMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :monthly_metered_price_id, -> { String }, optional: true, nullable: false field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false field :monthly_unit_price, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period.rb b/lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period.rb deleted file mode 100644 index 5d72af5..0000000 --- a/lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module CreateEntitlementInBundleRequestBodyMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - CURRENT_DAY = "current_day" - end - end -end diff --git a/lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period_month_reset.rb b/lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period_month_reset.rb deleted file mode 100644 index fa1b2bf..0000000 --- a/lib/schematic/types/create_entitlement_in_bundle_request_body_metric_period_month_reset.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module CreateEntitlementInBundleRequestBodyMetricPeriodMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end -end diff --git a/lib/schematic/types/create_entitlement_req_common.rb b/lib/schematic/types/create_entitlement_req_common.rb index 8b3ff7f..6f50a4e 100644 --- a/lib/schematic/types/create_entitlement_req_common.rb +++ b/lib/schematic/types/create_entitlement_req_common.rb @@ -5,8 +5,8 @@ module Types class CreateEntitlementReqCommon < Internal::Types::Model field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false field :feature_id, -> { String }, optional: false, nullable: false - field :metric_period, -> { Schematic::Types::CreateEntitlementReqCommonMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Types::CreateEntitlementReqCommonMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_credit_id, -> { String }, optional: true, nullable: false field :value_numeric, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/types/create_entitlement_req_common_metric_period.rb b/lib/schematic/types/create_entitlement_req_common_metric_period.rb deleted file mode 100644 index b0a6432..0000000 --- a/lib/schematic/types/create_entitlement_req_common_metric_period.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module CreateEntitlementReqCommonMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - CURRENT_DAY = "current_day" - end - end -end diff --git a/lib/schematic/types/create_entitlement_req_common_metric_period_month_reset.rb b/lib/schematic/types/create_entitlement_req_common_metric_period_month_reset.rb deleted file mode 100644 index 55d9bac..0000000 --- a/lib/schematic/types/create_entitlement_req_common_metric_period_month_reset.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module CreateEntitlementReqCommonMetricPeriodMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end -end diff --git a/lib/schematic/types/create_flag_request_body.rb b/lib/schematic/types/create_flag_request_body.rb index d90e4e6..121af50 100644 --- a/lib/schematic/types/create_flag_request_body.rb +++ b/lib/schematic/types/create_flag_request_body.rb @@ -8,7 +8,7 @@ class CreateFlagRequestBody < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false field :flag_type, -> { String }, optional: false, nullable: false field :key, -> { String }, optional: false, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_or_update_condition_request_body.rb b/lib/schematic/types/create_or_update_condition_request_body.rb index 4316a26..4ed140f 100644 --- a/lib/schematic/types/create_or_update_condition_request_body.rb +++ b/lib/schematic/types/create_or_update_condition_request_body.rb @@ -4,15 +4,15 @@ module Schematic module Types class CreateOrUpdateConditionRequestBody < Internal::Types::Model field :comparison_trait_id, -> { String }, optional: true, nullable: false - field :condition_type, -> { Schematic::Types::CreateOrUpdateConditionRequestBodyConditionType }, optional: false, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false field :credit_cost, -> { Integer }, optional: true, nullable: false field :credit_id, -> { String }, optional: true, nullable: false field :event_subtype, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: true, nullable: false - field :metric_period, -> { Schematic::Types::CreateOrUpdateConditionRequestBodyMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Types::CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :metric_value, -> { Integer }, optional: true, nullable: false - field :operator, -> { Schematic::Types::CreateOrUpdateConditionRequestBodyOperator }, optional: false, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :trait_id, -> { String }, optional: true, nullable: false field :trait_value, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/create_or_update_condition_request_body_condition_type.rb b/lib/schematic/types/create_or_update_condition_request_body_condition_type.rb deleted file mode 100644 index d246bf0..0000000 --- a/lib/schematic/types/create_or_update_condition_request_body_condition_type.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module CreateOrUpdateConditionRequestBodyConditionType - extend Schematic::Internal::Types::Enum - - COMPANY = "company" - METRIC = "metric" - TRAIT = "trait" - USER = "user" - PLAN = "plan" - BILLING_PRODUCT = "billing_product" - BASE_PLAN = "base_plan" - end - end -end diff --git a/lib/schematic/types/create_or_update_condition_request_body_metric_period.rb b/lib/schematic/types/create_or_update_condition_request_body_metric_period.rb deleted file mode 100644 index dddc92a..0000000 --- a/lib/schematic/types/create_or_update_condition_request_body_metric_period.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module CreateOrUpdateConditionRequestBodyMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - CURRENT_DAY = "current_day" - end - end -end diff --git a/lib/schematic/types/create_or_update_condition_request_body_metric_period_month_reset.rb b/lib/schematic/types/create_or_update_condition_request_body_metric_period_month_reset.rb deleted file mode 100644 index c23894a..0000000 --- a/lib/schematic/types/create_or_update_condition_request_body_metric_period_month_reset.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end -end diff --git a/lib/schematic/types/create_or_update_condition_request_body_operator.rb b/lib/schematic/types/create_or_update_condition_request_body_operator.rb deleted file mode 100644 index 6805e67..0000000 --- a/lib/schematic/types/create_or_update_condition_request_body_operator.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module CreateOrUpdateConditionRequestBodyOperator - extend Schematic::Internal::Types::Enum - - EQ = "eq" - NE = "ne" - GT = "gt" - GTE = "gte" - LT = "lt" - LTE = "lte" - IS_EMPTY = "is_empty" - NOT_EMPTY = "not_empty" - end - end -end diff --git a/lib/schematic/types/create_or_update_flag_request_body.rb b/lib/schematic/types/create_or_update_flag_request_body.rb index f59e66b..914e97d 100644 --- a/lib/schematic/types/create_or_update_flag_request_body.rb +++ b/lib/schematic/types/create_or_update_flag_request_body.rb @@ -9,7 +9,7 @@ class CreateOrUpdateFlagRequestBody < Internal::Types::Model field :flag_type, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: true, nullable: false field :key, -> { String }, optional: false, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_or_update_rule_request_body.rb b/lib/schematic/types/create_or_update_rule_request_body.rb index 292f35f..efae468 100644 --- a/lib/schematic/types/create_or_update_rule_request_body.rb +++ b/lib/schematic/types/create_or_update_rule_request_body.rb @@ -8,7 +8,7 @@ class CreateOrUpdateRuleRequestBody < Internal::Types::Model field :id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :priority, -> { Integer }, optional: false, nullable: false - field :rule_type, -> { Schematic::Types::CreateOrUpdateRuleRequestBodyRuleType }, optional: true, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: true, nullable: false field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_or_update_rule_request_body_rule_type.rb b/lib/schematic/types/create_or_update_rule_request_body_rule_type.rb deleted file mode 100644 index fe11174..0000000 --- a/lib/schematic/types/create_or_update_rule_request_body_rule_type.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module CreateOrUpdateRuleRequestBodyRuleType - extend Schematic::Internal::Types::Enum - - GLOBAL_OVERRIDE = "global_override" - COMPANY_OVERRIDE = "company_override" - PLAN_ENTITLEMENT = "plan_entitlement" - STANDARD = "standard" - DEFAULT = "default" - end - end -end diff --git a/lib/schematic/types/create_plan_request_body.rb b/lib/schematic/types/create_plan_request_body.rb index feae366..77295c1 100644 --- a/lib/schematic/types/create_plan_request_body.rb +++ b/lib/schematic/types/create_plan_request_body.rb @@ -4,7 +4,7 @@ module Schematic module Types class CreatePlanRequestBody < Internal::Types::Model field :description, -> { String }, optional: false, nullable: false - field :icon, -> { String }, optional: true, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false end diff --git a/lib/schematic/types/custom_plan_activation_strategy.rb b/lib/schematic/types/custom_plan_activation_strategy.rb new file mode 100644 index 0000000..642b6e5 --- /dev/null +++ b/lib/schematic/types/custom_plan_activation_strategy.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module CustomPlanActivationStrategy + extend Schematic::Internal::Types::Enum + + ON_PAYMENT = "on_payment" + ON_PUBLISH = "on_publish" + end + end +end diff --git a/lib/schematic/types/custom_plan_billing_response_data.rb b/lib/schematic/types/custom_plan_billing_response_data.rb new file mode 100644 index 0000000..fc5a89f --- /dev/null +++ b/lib/schematic/types/custom_plan_billing_response_data.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CustomPlanBillingResponseData < Internal::Types::Model + field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: false, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :days_until_due, -> { Integer }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :paid_at, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :published_at, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: false, nullable: false + field :stripe_invoice_url, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/custom_plan_billing_status.rb b/lib/schematic/types/custom_plan_billing_status.rb new file mode 100644 index 0000000..b46f518 --- /dev/null +++ b/lib/schematic/types/custom_plan_billing_status.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Types + module CustomPlanBillingStatus + extend Schematic::Internal::Types::Enum + + ACTIVE = "active" + EXPIRED = "expired" + PAID = "paid" + PENDING = "pending" + end + end +end diff --git a/lib/schematic/types/datastream_company_plan.rb b/lib/schematic/types/datastream_company_plan.rb index dc7d26a..d18795c 100644 --- a/lib/schematic/types/datastream_company_plan.rb +++ b/lib/schematic/types/datastream_company_plan.rb @@ -6,6 +6,7 @@ class DatastreamCompanyPlan < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false field :trial_end_date, -> { String }, optional: true, nullable: false + field :trial_status, -> { Schematic::Types::TrialStatus }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/feature_company_response_data.rb b/lib/schematic/types/feature_company_response_data.rb index 7a1bfc5..b6f2b1f 100644 --- a/lib/schematic/types/feature_company_response_data.rb +++ b/lib/schematic/types/feature_company_response_data.rb @@ -24,15 +24,15 @@ class FeatureCompanyResponseData < Internal::Types::Model field :entitlement_id, -> { String }, optional: false, nullable: false field :entitlement_source, -> { String }, optional: true, nullable: false field :entitlement_type, -> { Schematic::Types::EntitlementType }, optional: false, nullable: false - field :feature, -> { Schematic::Types::FeatureDetailResponseData }, optional: true, nullable: false + field :feature, -> { Schematic::Types::FeatureInPlanResponseData }, optional: true, nullable: false field :has_valid_allocation, -> { Internal::Types::Boolean }, optional: true, nullable: false field :is_unlimited, -> { Internal::Types::Boolean }, optional: true, nullable: false field :metric_reset_at, -> { String }, optional: true, nullable: false - field :month_reset, -> { String }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :monthly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false field :overuse, -> { Integer }, optional: true, nullable: false field :percent_used, -> { Integer }, optional: true, nullable: false - field :period, -> { String }, optional: true, nullable: false + field :period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false field :plan_entitlement, -> { Schematic::Types::PlanEntitlementResponseData }, optional: true, nullable: false field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false diff --git a/lib/schematic/types/feature_company_user_response_data.rb b/lib/schematic/types/feature_company_user_response_data.rb index 0a3ff14..30a2719 100644 --- a/lib/schematic/types/feature_company_user_response_data.rb +++ b/lib/schematic/types/feature_company_user_response_data.rb @@ -11,8 +11,8 @@ class FeatureCompanyUserResponseData < Internal::Types::Model field :entitlement_type, -> { Schematic::Types::EntitlementType }, optional: false, nullable: false field :feature, -> { Schematic::Types::FeatureDetailResponseData }, optional: true, nullable: false field :metric_reset_at, -> { String }, optional: true, nullable: false - field :month_reset, -> { String }, optional: true, nullable: false - field :period, -> { String }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false field :usage, -> { Integer }, optional: true, nullable: false field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false diff --git a/lib/schematic/types/feature_detail_response_data.rb b/lib/schematic/types/feature_detail_response_data.rb index 44b6fcf..957c497 100644 --- a/lib/schematic/types/feature_detail_response_data.rb +++ b/lib/schematic/types/feature_detail_response_data.rb @@ -3,6 +3,7 @@ module Schematic module Types class FeatureDetailResponseData < Internal::Types::Model + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: true, nullable: false @@ -12,7 +13,8 @@ class FeatureDetailResponseData < Internal::Types::Model field :icon, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false + field :maintainer, -> { Schematic::Types::AccountMemberResponseData }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :plans, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false field :plural_name, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/feature_entitlement.rb b/lib/schematic/types/feature_entitlement.rb index 387ef6f..d086d5f 100644 --- a/lib/schematic/types/feature_entitlement.rb +++ b/lib/schematic/types/feature_entitlement.rb @@ -11,9 +11,9 @@ class FeatureEntitlement < Internal::Types::Model field :event_name, -> { String }, optional: true, nullable: false field :feature_id, -> { String }, optional: false, nullable: false field :feature_key, -> { String }, optional: false, nullable: false - field :metric_period, -> { Schematic::Types::FeatureEntitlementMetricPeriod }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false field :metric_reset_at, -> { String }, optional: true, nullable: false - field :month_reset, -> { Schematic::Types::FeatureEntitlementMonthReset }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :soft_limit, -> { Integer }, optional: true, nullable: false field :usage, -> { Integer }, optional: true, nullable: false field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false diff --git a/lib/schematic/types/feature_in_plan_response_data.rb b/lib/schematic/types/feature_in_plan_response_data.rb new file mode 100644 index 0000000..83562e1 --- /dev/null +++ b/lib/schematic/types/feature_in_plan_response_data.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module Schematic + module Types + class FeatureInPlanResponseData < Internal::Types::Model + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :event_summary, -> { Schematic::Types::EventSummaryResponseData }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + field :flags, -> { Internal::Types::Array[Schematic::Types::FlagInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plans, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/feature_response_data.rb b/lib/schematic/types/feature_response_data.rb index a82f10b..e820c4b 100644 --- a/lib/schematic/types/feature_response_data.rb +++ b/lib/schematic/types/feature_response_data.rb @@ -10,7 +10,7 @@ class FeatureResponseData < Internal::Types::Model field :icon, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :plural_name, -> { String }, optional: true, nullable: false field :singular_name, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/feature_usage_response_data.rb b/lib/schematic/types/feature_usage_response_data.rb index 98fb017..1d6b103 100644 --- a/lib/schematic/types/feature_usage_response_data.rb +++ b/lib/schematic/types/feature_usage_response_data.rb @@ -22,15 +22,15 @@ class FeatureUsageResponseData < Internal::Types::Model field :entitlement_id, -> { String }, optional: false, nullable: false field :entitlement_source, -> { String }, optional: true, nullable: false field :entitlement_type, -> { Schematic::Types::EntitlementType }, optional: false, nullable: false - field :feature, -> { Schematic::Types::FeatureDetailResponseData }, optional: true, nullable: false + field :feature, -> { Schematic::Types::FeatureInPlanResponseData }, optional: true, nullable: false field :has_valid_allocation, -> { Internal::Types::Boolean }, optional: true, nullable: false field :is_unlimited, -> { Internal::Types::Boolean }, optional: true, nullable: false field :metric_reset_at, -> { String }, optional: true, nullable: false - field :month_reset, -> { String }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :monthly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false field :overuse, -> { Integer }, optional: true, nullable: false field :percent_used, -> { Integer }, optional: true, nullable: false - field :period, -> { String }, optional: true, nullable: false + field :period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false field :plan_entitlement, -> { Schematic::Types::PlanEntitlementResponseData }, optional: true, nullable: false field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false diff --git a/lib/schematic/types/feature_view.rb b/lib/schematic/types/feature_view.rb index fe12b5c..7fc5e66 100644 --- a/lib/schematic/types/feature_view.rb +++ b/lib/schematic/types/feature_view.rb @@ -4,6 +4,7 @@ module Schematic module Types class FeatureView < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: true, nullable: false @@ -13,7 +14,6 @@ class FeatureView < Internal::Types::Model field :icon, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :plans, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false field :plural_name, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/flag_detail_response_data.rb b/lib/schematic/types/flag_detail_response_data.rb index 193e8b0..2ed860d 100644 --- a/lib/schematic/types/flag_detail_response_data.rb +++ b/lib/schematic/types/flag_detail_response_data.rb @@ -12,7 +12,8 @@ class FlagDetailResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :key, -> { String }, optional: false, nullable: false field :last_checked_at, -> { String }, optional: true, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false + field :maintainer, -> { Schematic::Types::AccountMemberResponseData }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :rules, -> { Internal::Types::Array[Schematic::Types::RuleDetailResponseData] }, optional: false, nullable: false field :updated_at, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/flag_in_plan_response_data.rb b/lib/schematic/types/flag_in_plan_response_data.rb new file mode 100644 index 0000000..e4d96c0 --- /dev/null +++ b/lib/schematic/types/flag_in_plan_response_data.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Schematic + module Types + class FlagInPlanResponseData < Internal::Types::Model + field :created_at, -> { String }, optional: false, nullable: false + field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :flag_type, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :last_checked_at, -> { String }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::RuleDetailResponseData] }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/flag_response_data.rb b/lib/schematic/types/flag_response_data.rb index 8119e59..b1c2193 100644 --- a/lib/schematic/types/flag_response_data.rb +++ b/lib/schematic/types/flag_response_data.rb @@ -10,7 +10,7 @@ class FlagResponseData < Internal::Types::Model field :flag_type, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :key, -> { String }, optional: false, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :updated_at, -> { String }, optional: false, nullable: false end diff --git a/lib/schematic/types/flag_view.rb b/lib/schematic/types/flag_view.rb index c49d172..b866d59 100644 --- a/lib/schematic/types/flag_view.rb +++ b/lib/schematic/types/flag_view.rb @@ -13,7 +13,6 @@ class FlagView < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :key, -> { String }, optional: false, nullable: false field :last_checked_at, -> { String }, optional: true, nullable: false - field :maintainer_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :rules, -> { Internal::Types::Array[Schematic::Types::RuleView] }, optional: false, nullable: false field :updated_at, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_controlled_by_type.rb b/lib/schematic/types/integration_type.rb similarity index 62% rename from lib/schematic/types/plan_controlled_by_type.rb rename to lib/schematic/types/integration_type.rb index 49570e8..60bd2e4 100644 --- a/lib/schematic/types/plan_controlled_by_type.rb +++ b/lib/schematic/types/integration_type.rb @@ -2,11 +2,13 @@ module Schematic module Types - module PlanControlledByType + module IntegrationType extend Schematic::Internal::Types::Enum - SCHEMATIC = "schematic" + CLERK = "clerk" + ORB = "orb" STRIPE = "stripe" + UNKNOWN = "unknown" end end end diff --git a/lib/schematic/types/integration_webhook_url_response_data.rb b/lib/schematic/types/integration_webhook_url_response_data.rb new file mode 100644 index 0000000..1c1ad68 --- /dev/null +++ b/lib/schematic/types/integration_webhook_url_response_data.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Schematic + module Types + class IntegrationWebhookUrlResponseData < Internal::Types::Model + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + field :url, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/condition_metric_period.rb b/lib/schematic/types/metric_period.rb similarity index 88% rename from lib/schematic/types/condition_metric_period.rb rename to lib/schematic/types/metric_period.rb index acebe03..7501014 100644 --- a/lib/schematic/types/condition_metric_period.rb +++ b/lib/schematic/types/metric_period.rb @@ -2,7 +2,7 @@ module Schematic module Types - module ConditionMetricPeriod + module MetricPeriod extend Schematic::Internal::Types::Enum ALL_TIME = "all_time" diff --git a/lib/schematic/types/feature_entitlement_month_reset.rb b/lib/schematic/types/metric_period_month_reset.rb similarity index 83% rename from lib/schematic/types/feature_entitlement_month_reset.rb rename to lib/schematic/types/metric_period_month_reset.rb index 647eb1c..f4422b2 100644 --- a/lib/schematic/types/feature_entitlement_month_reset.rb +++ b/lib/schematic/types/metric_period_month_reset.rb @@ -2,11 +2,11 @@ module Schematic module Types - module FeatureEntitlementMonthReset + module MetricPeriodMonthReset extend Schematic::Internal::Types::Enum - FIRST_OF_MONTH = "first_of_month" BILLING_CYCLE = "billing_cycle" + FIRST_OF_MONTH = "first_of_month" end end end diff --git a/lib/schematic/types/plan_credit_grant_view.rb b/lib/schematic/types/plan_credit_grant_view.rb index e7fce34..336934c 100644 --- a/lib/schematic/types/plan_credit_grant_view.rb +++ b/lib/schematic/types/plan_credit_grant_view.rb @@ -9,6 +9,7 @@ class PlanCreditGrantView < Internal::Types::Model field :billing_credit_auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :billing_credit_auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false field :billing_credit_auto_topup_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :billing_credit_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :billing_credit_auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit, -> { Schematic::Types::BillingCreditView }, optional: true, nullable: false diff --git a/lib/schematic/types/plan_detail_response_data.rb b/lib/schematic/types/plan_detail_response_data.rb index 2446e33..31572bc 100644 --- a/lib/schematic/types/plan_detail_response_data.rb +++ b/lib/schematic/types/plan_detail_response_data.rb @@ -5,16 +5,20 @@ module Types class PlanDetailResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :audience_type, -> { String }, optional: true, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false - field :controlled_by, -> { Schematic::Types::PlanControlledByType }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: true, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false field :description, -> { String }, optional: false, nullable: false field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false - field :features, -> { Internal::Types::Array[Schematic::Types::FeatureDetailResponseData] }, optional: false, nullable: false - field :icon, -> { String }, optional: false, nullable: false + field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_entitlement_response_data.rb b/lib/schematic/types/plan_entitlement_response_data.rb index 5fc3463..80fee2d 100644 --- a/lib/schematic/types/plan_entitlement_response_data.rb +++ b/lib/schematic/types/plan_entitlement_response_data.rb @@ -3,6 +3,7 @@ module Schematic module Types class PlanEntitlementResponseData < Internal::Types::Model + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_threshold, -> { Integer }, optional: true, nullable: false field :consumption_rate, -> { Integer }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false @@ -13,8 +14,8 @@ class PlanEntitlementResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :metered_monthly_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false field :metered_yearly_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false - field :metric_period, -> { String }, optional: true, nullable: false - field :metric_period_month_reset, -> { String }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false field :plan_id, -> { String }, optional: false, nullable: false field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false diff --git a/lib/schematic/types/plan_group_plan_detail_response_data.rb b/lib/schematic/types/plan_group_plan_detail_response_data.rb index a7bc0dc..6428637 100644 --- a/lib/schematic/types/plan_group_plan_detail_response_data.rb +++ b/lib/schematic/types/plan_group_plan_detail_response_data.rb @@ -5,19 +5,23 @@ module Types class PlanGroupPlanDetailResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :audience_type, -> { String }, optional: true, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: true, nullable: false field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false - field :controlled_by, -> { Schematic::Types::PlanControlledByType }, optional: false, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false field :custom_plan_config, -> { Schematic::Types::CustomPlanViewConfigResponseData }, optional: true, nullable: false field :description, -> { String }, optional: false, nullable: false field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: false, nullable: false - field :features, -> { Internal::Types::Array[Schematic::Types::FeatureDetailResponseData] }, optional: false, nullable: false - field :icon, -> { String }, optional: false, nullable: false + field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_icon.rb b/lib/schematic/types/plan_icon.rb new file mode 100644 index 0000000..d01bfce --- /dev/null +++ b/lib/schematic/types/plan_icon.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +module Schematic + module Types + module PlanIcon + extend Schematic::Internal::Types::Enum + + AMBER = "amber" + BLUE = "blue" + BLUE_GRAY = "blueGray" + BLUE_GREEN = "blueGreen" + CYAN = "cyan" + EMERALD = "emerald" + FUCHSIA = "fuchsia" + GRAY = "gray" + GREEN = "green" + INDIGO = "indigo" + LIGHT_BLUE = "lightBlue" + LIME = "lime" + ORANGE = "orange" + PINK = "pink" + PURPLE = "purple" + RED = "red" + RED_ORANGE = "redOrange" + ROSE = "rose" + SKY = "sky" + SLATE = "slate" + TEAL = "teal" + TRUE_GRAY = "trueGray" + VIOLET = "violet" + WARM_GRAY = "warmGray" + YELLOW = "yellow" + end + end +end diff --git a/lib/schematic/types/plan_response_data.rb b/lib/schematic/types/plan_response_data.rb index 85e71ea..2a2de02 100644 --- a/lib/schematic/types/plan_response_data.rb +++ b/lib/schematic/types/plan_response_data.rb @@ -4,9 +4,11 @@ module Schematic module Types class PlanResponseData < Internal::Types::Model field :audience_type, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: false, nullable: false - field :icon, -> { String }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_version_response_data.rb b/lib/schematic/types/plan_version_response_data.rb index b905c5f..743097d 100644 --- a/lib/schematic/types/plan_version_response_data.rb +++ b/lib/schematic/types/plan_version_response_data.rb @@ -6,7 +6,7 @@ class PlanVersionResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: false, nullable: false field :environment_id, -> { String }, optional: false, nullable: false - field :icon, -> { String }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false field :original_plan_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/plan_view_public_response_data.rb b/lib/schematic/types/plan_view_public_response_data.rb index 8f1983c..f1ecd09 100644 --- a/lib/schematic/types/plan_view_public_response_data.rb +++ b/lib/schematic/types/plan_view_public_response_data.rb @@ -5,11 +5,15 @@ module Types class PlanViewPublicResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :audience_type, -> { String }, optional: true, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: true, nullable: false field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false - field :controlled_by, -> { Schematic::Types::PlanControlledByType }, optional: false, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false field :custom, -> { Internal::Types::Boolean }, optional: false, nullable: false @@ -17,8 +21,8 @@ class PlanViewPublicResponseData < Internal::Types::Model field :description, -> { String }, optional: false, nullable: false field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: false, nullable: false - field :features, -> { Internal::Types::Array[Schematic::Types::FeatureDetailResponseData] }, optional: false, nullable: false - field :icon, -> { String }, optional: false, nullable: false + field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantView] }, optional: false, nullable: false field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false diff --git a/lib/schematic/types/rule.rb b/lib/schematic/types/rule.rb index 7a30346..315b515 100644 --- a/lib/schematic/types/rule.rb +++ b/lib/schematic/types/rule.rb @@ -11,7 +11,7 @@ class Rule < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false field :priority, -> { Integer }, optional: false, nullable: false - field :rule_type, -> { Schematic::Types::RuleRuleType }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: false, nullable: false field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rule_condition_detail_response_data.rb b/lib/schematic/types/rule_condition_detail_response_data.rb index 184dbfc..6a74606 100644 --- a/lib/schematic/types/rule_condition_detail_response_data.rb +++ b/lib/schematic/types/rule_condition_detail_response_data.rb @@ -6,16 +6,16 @@ class RuleConditionDetailResponseData < Internal::Types::Model field :comparison_trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false field :comparison_trait_id, -> { String }, optional: true, nullable: false field :condition_group_id, -> { String }, optional: true, nullable: false - field :condition_type, -> { String }, optional: false, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :environment_id, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: true, nullable: false field :flag_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false - field :metric_period, -> { String }, optional: true, nullable: false - field :metric_period_month_reset, -> { String }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :metric_value, -> { Integer }, optional: true, nullable: false - field :operator, -> { String }, optional: false, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :resources, -> { Internal::Types::Array[Schematic::Types::PreviewObjectResponseData] }, optional: false, nullable: false field :rule_id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/rule_condition_response_data.rb b/lib/schematic/types/rule_condition_response_data.rb index 4012378..1d66369 100644 --- a/lib/schematic/types/rule_condition_response_data.rb +++ b/lib/schematic/types/rule_condition_response_data.rb @@ -5,16 +5,16 @@ module Types class RuleConditionResponseData < Internal::Types::Model field :comparison_trait_id, -> { String }, optional: true, nullable: false field :condition_group_id, -> { String }, optional: true, nullable: false - field :condition_type, -> { String }, optional: false, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :environment_id, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: true, nullable: false field :flag_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false - field :metric_period, -> { String }, optional: true, nullable: false - field :metric_period_month_reset, -> { String }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :metric_value, -> { Integer }, optional: true, nullable: false - field :operator, -> { String }, optional: false, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :rule_id, -> { String }, optional: false, nullable: false field :trait_entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false diff --git a/lib/schematic/types/rule_detail_response_data.rb b/lib/schematic/types/rule_detail_response_data.rb index 7802b7c..4f4b145 100644 --- a/lib/schematic/types/rule_detail_response_data.rb +++ b/lib/schematic/types/rule_detail_response_data.rb @@ -11,7 +11,7 @@ class RuleDetailResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false field :priority, -> { Integer }, optional: false, nullable: false - field :rule_type, -> { String }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: false, nullable: false field :updated_at, -> { String }, optional: false, nullable: false field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end diff --git a/lib/schematic/types/rule_response_data.rb b/lib/schematic/types/rule_response_data.rb index ded7b4e..a541b0b 100644 --- a/lib/schematic/types/rule_response_data.rb +++ b/lib/schematic/types/rule_response_data.rb @@ -9,7 +9,7 @@ class RuleResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false field :priority, -> { Integer }, optional: false, nullable: false - field :rule_type, -> { String }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: false, nullable: false field :updated_at, -> { String }, optional: false, nullable: false field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end diff --git a/lib/schematic/types/rule_rule_type.rb b/lib/schematic/types/rule_type.rb similarity index 95% rename from lib/schematic/types/rule_rule_type.rb rename to lib/schematic/types/rule_type.rb index 47152c2..e91c50d 100644 --- a/lib/schematic/types/rule_rule_type.rb +++ b/lib/schematic/types/rule_type.rb @@ -2,13 +2,13 @@ module Schematic module Types - module RuleRuleType + module RuleType extend Schematic::Internal::Types::Enum - DEFAULT = "default" - GLOBAL_OVERRIDE = "global_override" COMPANY_OVERRIDE = "company_override" COMPANY_OVERRIDE_USAGE_EXCEEDED = "company_override_usage_exceeded" + DEFAULT = "default" + GLOBAL_OVERRIDE = "global_override" PLAN_ENTITLEMENT = "plan_entitlement" PLAN_ENTITLEMENT_USAGE_EXCEEDED = "plan_entitlement_usage_exceeded" STANDARD = "standard" diff --git a/lib/schematic/types/rule_view.rb b/lib/schematic/types/rule_view.rb index bb00a66..5ef2119 100644 --- a/lib/schematic/types/rule_view.rb +++ b/lib/schematic/types/rule_view.rb @@ -12,7 +12,7 @@ class RuleView < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false field :priority, -> { Integer }, optional: false, nullable: false - field :rule_type, -> { String }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: false, nullable: false field :updated_at, -> { String }, optional: false, nullable: false field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end diff --git a/lib/schematic/types/rules_engine_schema_version.rb b/lib/schematic/types/rules_engine_schema_version.rb index 459bc0d..574402b 100644 --- a/lib/schematic/types/rules_engine_schema_version.rb +++ b/lib/schematic/types/rules_engine_schema_version.rb @@ -5,7 +5,7 @@ module Types module RulesEngineSchemaVersion extend Schematic::Internal::Types::Enum - V_5_F_633_CC_3 = "v5f633cc3" + VF_05_BF_5_DA = "vf05bf5da" PLACEHOLDER_FOR_FERN_COMPATIBILITY = "placeholder-for-fern-compatibility" end end diff --git a/lib/schematic/types/rulesengine_check_flag_result.rb b/lib/schematic/types/rulesengine_check_flag_result.rb index 017f382..8d1e208 100644 --- a/lib/schematic/types/rulesengine_check_flag_result.rb +++ b/lib/schematic/types/rulesengine_check_flag_result.rb @@ -9,13 +9,13 @@ class RulesengineCheckFlagResult < Internal::Types::Model field :feature_allocation, -> { Integer }, optional: true, nullable: false field :feature_usage, -> { Integer }, optional: true, nullable: false field :feature_usage_event, -> { String }, optional: true, nullable: false - field :feature_usage_period, -> { Schematic::Types::RulesengineCheckFlagResultFeatureUsagePeriod }, optional: true, nullable: false + field :feature_usage_period, -> { Schematic::Types::RulesengineMetricPeriod }, optional: true, nullable: false field :feature_usage_reset_at, -> { String }, optional: true, nullable: false field :flag_id, -> { String }, optional: true, nullable: false field :flag_key, -> { String }, optional: false, nullable: false field :reason, -> { String }, optional: false, nullable: false field :rule_id, -> { String }, optional: true, nullable: false - field :rule_type, -> { Schematic::Types::RulesengineCheckFlagResultRuleType }, optional: true, nullable: false + field :rule_type, -> { Schematic::Types::RulesengineRuleType }, optional: true, nullable: false field :user_id, -> { String }, optional: true, nullable: false field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end diff --git a/lib/schematic/types/rulesengine_check_flag_result_feature_usage_period.rb b/lib/schematic/types/rulesengine_check_flag_result_feature_usage_period.rb deleted file mode 100644 index a26da95..0000000 --- a/lib/schematic/types/rulesengine_check_flag_result_feature_usage_period.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module RulesengineCheckFlagResultFeatureUsagePeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_DAY = "current_day" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - end - end -end diff --git a/lib/schematic/types/rulesengine_check_flag_result_rule_type.rb b/lib/schematic/types/rulesengine_check_flag_result_rule_type.rb deleted file mode 100644 index 7e585b4..0000000 --- a/lib/schematic/types/rulesengine_check_flag_result_rule_type.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module RulesengineCheckFlagResultRuleType - extend Schematic::Internal::Types::Enum - - DEFAULT = "default" - GLOBAL_OVERRIDE = "global_override" - COMPANY_OVERRIDE = "company_override" - COMPANY_OVERRIDE_USAGE_EXCEEDED = "company_override_usage_exceeded" - PLAN_ENTITLEMENT = "plan_entitlement" - PLAN_ENTITLEMENT_USAGE_EXCEEDED = "plan_entitlement_usage_exceeded" - STANDARD = "standard" - end - end -end diff --git a/lib/schematic/types/rulesengine_company_metric.rb b/lib/schematic/types/rulesengine_company_metric.rb index eb99349..8f55468 100644 --- a/lib/schematic/types/rulesengine_company_metric.rb +++ b/lib/schematic/types/rulesengine_company_metric.rb @@ -8,8 +8,8 @@ class RulesengineCompanyMetric < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false field :environment_id, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: false, nullable: false - field :month_reset, -> { Schematic::Types::RulesengineCompanyMetricMonthReset }, optional: false, nullable: false - field :period, -> { Schematic::Types::RulesengineCompanyMetricPeriod }, optional: false, nullable: false + field :month_reset, -> { Schematic::Types::RulesengineMetricPeriodMonthReset }, optional: false, nullable: false + field :period, -> { Schematic::Types::RulesengineMetricPeriod }, optional: false, nullable: false field :valid_until, -> { String }, optional: true, nullable: false field :value, -> { Integer }, optional: false, nullable: false end diff --git a/lib/schematic/types/rulesengine_company_metric_period.rb b/lib/schematic/types/rulesengine_company_metric_period.rb deleted file mode 100644 index 0a66b5a..0000000 --- a/lib/schematic/types/rulesengine_company_metric_period.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module RulesengineCompanyMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_DAY = "current_day" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - end - end -end diff --git a/lib/schematic/types/rulesengine_condition.rb b/lib/schematic/types/rulesengine_condition.rb index 109036b..76ebba0 100644 --- a/lib/schematic/types/rulesengine_condition.rb +++ b/lib/schematic/types/rulesengine_condition.rb @@ -5,16 +5,16 @@ module Types class RulesengineCondition < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false field :comparison_trait_definition, -> { Schematic::Types::RulesengineTraitDefinition }, optional: true, nullable: false - field :condition_type, -> { Schematic::Types::RulesengineConditionConditionType }, optional: false, nullable: false + field :condition_type, -> { Schematic::Types::RulesengineConditionType }, optional: false, nullable: false field :consumption_rate, -> { Integer }, optional: true, nullable: false field :credit_id, -> { String }, optional: true, nullable: false field :environment_id, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false - field :metric_period, -> { Schematic::Types::RulesengineConditionMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Types::RulesengineConditionMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::RulesengineMetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::RulesengineMetricPeriodMonthReset }, optional: true, nullable: false field :metric_value, -> { Integer }, optional: true, nullable: false - field :operator, -> { Schematic::Types::RulesengineConditionOperator }, optional: false, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :trait_definition, -> { Schematic::Types::RulesengineTraitDefinition }, optional: true, nullable: false field :trait_value, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/rulesengine_condition_metric_period.rb b/lib/schematic/types/rulesengine_condition_metric_period.rb deleted file mode 100644 index da11144..0000000 --- a/lib/schematic/types/rulesengine_condition_metric_period.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module RulesengineConditionMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_DAY = "current_day" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - end - end -end diff --git a/lib/schematic/types/rulesengine_condition_metric_period_month_reset.rb b/lib/schematic/types/rulesengine_condition_metric_period_month_reset.rb deleted file mode 100644 index 26633d9..0000000 --- a/lib/schematic/types/rulesengine_condition_metric_period_month_reset.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module RulesengineConditionMetricPeriodMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end -end diff --git a/lib/schematic/types/rulesengine_condition_operator.rb b/lib/schematic/types/rulesengine_condition_operator.rb deleted file mode 100644 index dfdf9f1..0000000 --- a/lib/schematic/types/rulesengine_condition_operator.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module RulesengineConditionOperator - extend Schematic::Internal::Types::Enum - - EQ = "eq" - NE = "ne" - GT = "gt" - LT = "lt" - GTE = "gte" - LTE = "lte" - IS_EMPTY = "is_empty" - NOT_EMPTY = "not_empty" - end - end -end diff --git a/lib/schematic/types/rulesengine_condition_condition_type.rb b/lib/schematic/types/rulesengine_condition_type.rb similarity index 89% rename from lib/schematic/types/rulesengine_condition_condition_type.rb rename to lib/schematic/types/rulesengine_condition_type.rb index f86c59b..c1ff9ca 100644 --- a/lib/schematic/types/rulesengine_condition_condition_type.rb +++ b/lib/schematic/types/rulesengine_condition_type.rb @@ -2,7 +2,7 @@ module Schematic module Types - module RulesengineConditionConditionType + module RulesengineConditionType extend Schematic::Internal::Types::Enum BASE_PLAN = "base_plan" diff --git a/lib/schematic/types/rulesengine_feature_entitlement.rb b/lib/schematic/types/rulesengine_feature_entitlement.rb index c65fe6e..86df2b4 100644 --- a/lib/schematic/types/rulesengine_feature_entitlement.rb +++ b/lib/schematic/types/rulesengine_feature_entitlement.rb @@ -11,9 +11,9 @@ class RulesengineFeatureEntitlement < Internal::Types::Model field :event_name, -> { String }, optional: true, nullable: false field :feature_id, -> { String }, optional: false, nullable: false field :feature_key, -> { String }, optional: false, nullable: false - field :metric_period, -> { Schematic::Types::RulesengineFeatureEntitlementMetricPeriod }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::RulesengineMetricPeriod }, optional: true, nullable: false field :metric_reset_at, -> { String }, optional: true, nullable: false - field :month_reset, -> { Schematic::Types::RulesengineFeatureEntitlementMonthReset }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::RulesengineMetricPeriodMonthReset }, optional: true, nullable: false field :soft_limit, -> { Integer }, optional: true, nullable: false field :usage, -> { Integer }, optional: true, nullable: false field :value_type, -> { Schematic::Types::RulesengineEntitlementValueType }, optional: false, nullable: false diff --git a/lib/schematic/types/rulesengine_feature_entitlement_metric_period.rb b/lib/schematic/types/rulesengine_feature_entitlement_metric_period.rb deleted file mode 100644 index 9a88b6f..0000000 --- a/lib/schematic/types/rulesengine_feature_entitlement_metric_period.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module RulesengineFeatureEntitlementMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_DAY = "current_day" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - end - end -end diff --git a/lib/schematic/types/rulesengine_feature_entitlement_month_reset.rb b/lib/schematic/types/rulesengine_feature_entitlement_month_reset.rb deleted file mode 100644 index 25df2b1..0000000 --- a/lib/schematic/types/rulesengine_feature_entitlement_month_reset.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module RulesengineFeatureEntitlementMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end -end diff --git a/lib/schematic/types/feature_entitlement_metric_period.rb b/lib/schematic/types/rulesengine_metric_period.rb similarity index 86% rename from lib/schematic/types/feature_entitlement_metric_period.rb rename to lib/schematic/types/rulesengine_metric_period.rb index 0cf6d4f..43bd605 100644 --- a/lib/schematic/types/feature_entitlement_metric_period.rb +++ b/lib/schematic/types/rulesengine_metric_period.rb @@ -2,7 +2,7 @@ module Schematic module Types - module FeatureEntitlementMetricPeriod + module RulesengineMetricPeriod extend Schematic::Internal::Types::Enum ALL_TIME = "all_time" diff --git a/lib/schematic/types/condition_metric_period_month_reset.rb b/lib/schematic/types/rulesengine_metric_period_month_reset.rb similarity index 82% rename from lib/schematic/types/condition_metric_period_month_reset.rb rename to lib/schematic/types/rulesengine_metric_period_month_reset.rb index 5730775..df7d3e3 100644 --- a/lib/schematic/types/condition_metric_period_month_reset.rb +++ b/lib/schematic/types/rulesengine_metric_period_month_reset.rb @@ -2,11 +2,11 @@ module Schematic module Types - module ConditionMetricPeriodMonthReset + module RulesengineMetricPeriodMonthReset extend Schematic::Internal::Types::Enum - FIRST_OF_MONTH = "first_of_month" BILLING_CYCLE = "billing_cycle" + FIRST_OF_MONTH = "first_of_month" end end end diff --git a/lib/schematic/types/rulesengine_rule.rb b/lib/schematic/types/rulesengine_rule.rb index 0cb96b3..191258e 100644 --- a/lib/schematic/types/rulesengine_rule.rb +++ b/lib/schematic/types/rulesengine_rule.rb @@ -11,7 +11,7 @@ class RulesengineRule < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false field :priority, -> { Integer }, optional: false, nullable: false - field :rule_type, -> { Schematic::Types::RulesengineRuleRuleType }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RulesengineRuleType }, optional: false, nullable: false field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_rule_rule_type.rb b/lib/schematic/types/rulesengine_rule_type.rb similarity index 92% rename from lib/schematic/types/rulesengine_rule_rule_type.rb rename to lib/schematic/types/rulesengine_rule_type.rb index 0148364..60809df 100644 --- a/lib/schematic/types/rulesengine_rule_rule_type.rb +++ b/lib/schematic/types/rulesengine_rule_type.rb @@ -2,13 +2,13 @@ module Schematic module Types - module RulesengineRuleRuleType + module RulesengineRuleType extend Schematic::Internal::Types::Enum - DEFAULT = "default" - GLOBAL_OVERRIDE = "global_override" COMPANY_OVERRIDE = "company_override" COMPANY_OVERRIDE_USAGE_EXCEEDED = "company_override_usage_exceeded" + DEFAULT = "default" + GLOBAL_OVERRIDE = "global_override" PLAN_ENTITLEMENT = "plan_entitlement" PLAN_ENTITLEMENT_USAGE_EXCEEDED = "plan_entitlement_usage_exceeded" STANDARD = "standard" diff --git a/lib/schematic/types/trial_status.rb b/lib/schematic/types/trial_status.rb new file mode 100644 index 0000000..916d366 --- /dev/null +++ b/lib/schematic/types/trial_status.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + module TrialStatus + extend Schematic::Internal::Types::Enum + + ACTIVE = "active" + CONVERTED = "converted" + EXPIRED = "expired" + end + end +end diff --git a/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb b/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb index 7bfd101..3f3042b 100644 --- a/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +++ b/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb @@ -10,6 +10,7 @@ class UpdateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false field :auto_topup_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false field :credit_amount, -> { Integer }, optional: true, nullable: false field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false diff --git a/lib/schematic/types/update_entitlement_req_common.rb b/lib/schematic/types/update_entitlement_req_common.rb index 60cde3b..54557ad 100644 --- a/lib/schematic/types/update_entitlement_req_common.rb +++ b/lib/schematic/types/update_entitlement_req_common.rb @@ -4,8 +4,8 @@ module Schematic module Types class UpdateEntitlementReqCommon < Internal::Types::Model field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false - field :metric_period, -> { Schematic::Types::UpdateEntitlementReqCommonMetricPeriod }, optional: true, nullable: false - field :metric_period_month_reset, -> { Schematic::Types::UpdateEntitlementReqCommonMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_credit_id, -> { String }, optional: true, nullable: false field :value_numeric, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/types/update_entitlement_req_common_metric_period.rb b/lib/schematic/types/update_entitlement_req_common_metric_period.rb deleted file mode 100644 index 9c73214..0000000 --- a/lib/schematic/types/update_entitlement_req_common_metric_period.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module UpdateEntitlementReqCommonMetricPeriod - extend Schematic::Internal::Types::Enum - - ALL_TIME = "all_time" - CURRENT_MONTH = "current_month" - CURRENT_WEEK = "current_week" - CURRENT_DAY = "current_day" - end - end -end diff --git a/lib/schematic/types/update_entitlement_req_common_metric_period_month_reset.rb b/lib/schematic/types/update_entitlement_req_common_metric_period_month_reset.rb deleted file mode 100644 index 36aac94..0000000 --- a/lib/schematic/types/update_entitlement_req_common_metric_period_month_reset.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - module UpdateEntitlementReqCommonMetricPeriodMonthReset - extend Schematic::Internal::Types::Enum - - FIRST_OF_MONTH = "first_of_month" - BILLING_CYCLE = "billing_cycle" - end - end -end diff --git a/lib/schematic/types/update_plan_request_body.rb b/lib/schematic/types/update_plan_request_body.rb index c35e904..00bee0d 100644 --- a/lib/schematic/types/update_plan_request_body.rb +++ b/lib/schematic/types/update_plan_request_body.rb @@ -4,7 +4,7 @@ module Schematic module Types class UpdatePlanRequestBody < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false - field :icon, -> { String }, optional: true, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/usage_based_entitlement_response_data.rb b/lib/schematic/types/usage_based_entitlement_response_data.rb index 80158d0..b71eaa9 100644 --- a/lib/schematic/types/usage_based_entitlement_response_data.rb +++ b/lib/schematic/types/usage_based_entitlement_response_data.rb @@ -7,8 +7,8 @@ class UsageBasedEntitlementResponseData < Internal::Types::Model field :consumption_rate, -> { Integer }, optional: true, nullable: false field :feature_id, -> { String }, optional: false, nullable: false field :metered_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false - field :metric_period, -> { String }, optional: true, nullable: false - field :metric_period_month_reset, -> { String }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false field :monthly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/schematic/types/webhook_url.rb b/lib/schematic/types/webhook_url.rb new file mode 100644 index 0000000..5fe5ba2 --- /dev/null +++ b/lib/schematic/types/webhook_url.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Schematic + module Types + class WebhookUrl < Internal::Types::Model + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + field :url, -> { String }, optional: false, nullable: false + end + end +end diff --git a/reference.md b/reference.md index 3758c90..f330784 100644 --- a/reference.md +++ b/reference.md @@ -1,5 +1,6 @@ # Reference -
client.put_plan_audiences_plan_audience_id(plan_audience_id) -> +## accounts +
client.accounts.list_account_members() -> Schematic::Accounts::Types::ListAccountMembersResponse
@@ -12,7 +13,12 @@
```ruby -client.put_plan_audiences_plan_audience_id(plan_audience_id: "plan_audience_id") +client.accounts.list_account_members( + ids: ["ids"], + q: "q", + limit: 1000000, + offset: 1000000 +) ```
@@ -27,7 +33,31 @@ client.put_plan_audiences_plan_audience_id(plan_audience_id: "plan_audience_id")
-**plan_audience_id:** `String` +**ids:** `String` + +
+
+ +
+
+ +**q:** `String` — Search filter + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `Integer` — Page offset (default 0)
@@ -35,7 +65,7 @@ client.put_plan_audiences_plan_audience_id(plan_audience_id: "plan_audience_id")
-**request_options:** `Schematic::RequestOptions` +**request_options:** `Schematic::Accounts::RequestOptions`
@@ -47,7 +77,7 @@ client.put_plan_audiences_plan_audience_id(plan_audience_id: "plan_audience_id")
-
client.delete_plan_audiences_plan_audience_id(plan_audience_id) -> +
client.accounts.get_account_member(account_member_id) -> Schematic::Accounts::Types::GetAccountMemberResponse
@@ -60,7 +90,7 @@ client.put_plan_audiences_plan_audience_id(plan_audience_id: "plan_audience_id")
```ruby -client.delete_plan_audiences_plan_audience_id(plan_audience_id: "plan_audience_id") +client.accounts.get_account_member(account_member_id: "account_member_id") ```
@@ -75,7 +105,7 @@ client.delete_plan_audiences_plan_audience_id(plan_audience_id: "plan_audience_i
-**plan_audience_id:** `String` +**account_member_id:** `String` — account_member_id
@@ -83,7 +113,7 @@ client.delete_plan_audiences_plan_audience_id(plan_audience_id: "plan_audience_i
-**request_options:** `Schematic::RequestOptions` +**request_options:** `Schematic::Accounts::RequestOptions`
@@ -95,7 +125,6 @@ client.delete_plan_audiences_plan_audience_id(plan_audience_id: "plan_audience_i
-## accounts
client.accounts.list_api_keys() -> Schematic::Accounts::Types::ListApiKeysResponse
@@ -752,6 +781,7 @@ client.accounts.count_audit_logs( ```ruby client.accounts.list_environments( + ids: ["ids"], limit: 1000000, offset: 1000000 ) @@ -1420,8 +1450,9 @@ client.billing.upsert_billing_customer( ```ruby client.billing.list_customers_with_subscriptions( + company_ids: ["company_ids"], name: "name", - provider_type: "schematic", + provider_type: "orb", q: "q", limit: 1000000, offset: 1000000 @@ -1514,8 +1545,9 @@ client.billing.list_customers_with_subscriptions( ```ruby client.billing.count_customers( + company_ids: ["company_ids"], name: "name", - provider_type: "schematic", + provider_type: "orb", q: "q", limit: 1000000, offset: 1000000 @@ -1965,6 +1997,14 @@ client.billing.upsert_billing_meter(
+**provider_type:** `Schematic::Types::BillingProviderType` + +
+
+ +
+
+ **request_options:** `Schematic::Billing::RequestOptions`
@@ -2211,11 +2251,13 @@ client.billing.list_billing_prices( currency: "currency", for_initial_plan: true, for_trial_expiry_plan: true, + ids: ["ids"], interval: "interval", is_active: true, price: 1000000, product_id: "product_id", - provider_type: "schematic", + product_ids: ["product_ids"], + provider_type: "orb", q: "q", tiers_mode: "graduated", usage_type: "licensed", @@ -2466,6 +2508,14 @@ client.billing.upsert_billing_price(
+**nickname:** `String` + +
+
+ +
+
+ **package_size:** `Integer`
@@ -2615,11 +2665,13 @@ client.billing.list_billing_product_prices( currency: "currency", for_initial_plan: true, for_trial_expiry_plan: true, + ids: ["ids"], interval: "interval", is_active: true, price: 1000000, product_id: "product_id", - provider_type: "schematic", + product_ids: ["product_ids"], + provider_type: "orb", q: "q", tiers_mode: "graduated", usage_type: "licensed", @@ -2926,10 +2978,11 @@ client.billing.upsert_billing_product( ```ruby client.billing.list_billing_products( + ids: ["ids"], is_active: true, name: "name", price_usage_type: "licensed", - provider_type: "schematic", + provider_type: "orb", q: "q", with_one_time_charges: true, with_prices_only: true, @@ -3074,10 +3127,11 @@ client.billing.list_billing_products( ```ruby client.billing.count_billing_products( + ids: ["ids"], is_active: true, name: "name", price_usage_type: "licensed", - provider_type: "schematic", + provider_type: "orb", q: "q", with_one_time_charges: true, with_prices_only: true, @@ -3370,6 +3424,14 @@ client.billing.upsert_billing_subscription(
+**provider_type:** `Schematic::Types::BillingProviderType` + +
+
+ +
+
+ **status:** `String`
@@ -3437,6 +3499,7 @@ client.billing.upsert_billing_subscription( ```ruby client.credits.list_billing_credits( + ids: ["ids"], name: "name", limit: 1000000, offset: 1000000 @@ -3905,6 +3968,7 @@ client.credits.soft_delete_billing_credit(credit_id: "credit_id") ```ruby client.credits.list_credit_bundles( + ids: ["ids"], credit_id: "credit_id", status: "active", bundle_type: "fixed", @@ -4360,6 +4424,7 @@ client.credits.delete_credit_bundle(bundle_id: "bundle_id") ```ruby client.credits.count_credit_bundles( + ids: ["ids"], credit_id: "credit_id", status: "active", bundle_type: "fixed", @@ -4454,6 +4519,7 @@ client.credits.count_credit_bundles( ```ruby client.credits.count_billing_credits( + ids: ["ids"], name: "name", limit: 1000000, offset: 1000000 @@ -4900,6 +4966,7 @@ client.credits.list_company_grants( ```ruby client.credits.count_billing_credits_grants( credit_id: "credit_id", + ids: ["ids"], limit: 1000000, offset: 1000000 ) @@ -4976,6 +5043,7 @@ client.credits.count_billing_credits_grants( ```ruby client.credits.list_grants_for_credit( credit_id: "credit_id", + ids: ["ids"], limit: 1000000, offset: 1000000 ) @@ -5278,7 +5346,9 @@ client.credits.count_credit_ledger( ```ruby client.credits.list_billing_plan_credit_grants( credit_id: "credit_id", + ids: ["ids"], plan_id: "plan_id", + plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", limit: 1000000, offset: 1000000 @@ -5601,7 +5671,9 @@ client.credits.delete_billing_plan_credit_grant( ```ruby client.credits.count_billing_plan_credit_grants( credit_id: "credit_id", + ids: ["ids"], plan_id: "plan_id", + plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", limit: 1000000, offset: 1000000 @@ -6358,12 +6430,18 @@ client.checkout.update_customer_subscription_trial_end(subscription_id: "subscri ```ruby client.companies.list_companies( + credit_type_ids: ["credit_type_ids"], + has_scheduled_downgrade: true, + ids: ["ids"], monetized_subscriptions: true, plan_id: "plan_id", + plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", q: "q", sort_order_column: "sort_order_column", sort_order_direction: "asc", + subscription_statuses: ["active"], + subscription_types: ["free"], with_entitlement_for: "with_entitlement_for", without_feature_override_for: "without_feature_override_for", without_plan: true, @@ -6394,6 +6472,14 @@ client.companies.list_companies(
+**has_scheduled_downgrade:** `Internal::Types::Boolean` — Filter companies that have a pending scheduled downgrade + +
+
+ +
+
+ **ids:** `String` — Filter companies by multiple company IDs (starts with comp_)
@@ -6722,12 +6808,18 @@ client.companies.delete_company( ```ruby client.companies.count_companies( + credit_type_ids: ["credit_type_ids"], + has_scheduled_downgrade: true, + ids: ["ids"], monetized_subscriptions: true, plan_id: "plan_id", + plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", q: "q", sort_order_column: "sort_order_column", sort_order_direction: "asc", + subscription_statuses: ["active"], + subscription_types: ["free"], with_entitlement_for: "with_entitlement_for", without_feature_override_for: "without_feature_override_for", without_plan: true, @@ -6758,6 +6850,14 @@ client.companies.count_companies(
+**has_scheduled_downgrade:** `Internal::Types::Boolean` — Filter companies that have a pending scheduled downgrade + +
+
+ +
+
+ **ids:** `String` — Filter companies by multiple company IDs (starts with comp_)
@@ -7273,6 +7373,7 @@ client.companies.delete_company_membership(company_membership_id: "company_membe ```ruby client.companies.get_active_company_subscription( company_id: "company_id", + company_ids: ["company_ids"], limit: 1000000, offset: 1000000 ) @@ -7402,6 +7503,7 @@ client.companies.upsert_company_trait( ```ruby client.companies.list_entity_key_definitions( entity_type: "company", + ids: ["ids"], q: "q", limit: 1000000, offset: 1000000 @@ -7487,6 +7589,7 @@ client.companies.list_entity_key_definitions( ```ruby client.companies.count_entity_key_definitions( entity_type: "company", + ids: ["ids"], q: "q", limit: 1000000, offset: 1000000 @@ -7572,8 +7675,10 @@ client.companies.count_entity_key_definitions( ```ruby client.companies.list_entity_trait_definitions( entity_type: "company", + ids: ["ids"], q: "q", trait_type: "boolean", + trait_types: ["boolean"], limit: 1000000, offset: 1000000 ) @@ -7865,8 +7970,10 @@ client.companies.update_entity_trait_definition( ```ruby client.companies.count_entity_trait_definitions( entity_type: "company", + ids: ["ids"], q: "q", trait_type: "boolean", + trait_types: ["boolean"], limit: 1000000, offset: 1000000 ) @@ -8043,9 +8150,11 @@ client.companies.get_entity_trait_values( ```ruby client.companies.list_plan_changes( - action: "action", - base_plan_action: "base_plan_action", + action: "checkout", + base_plan_action: "fallback", company_id: "company_id", + company_ids: ["company_ids"], + plan_ids: ["plan_ids"], limit: 1000000, offset: 1000000 ) @@ -8063,7 +8172,7 @@ client.companies.list_plan_changes(
-**action:** `String` +**action:** `Schematic::Types::PlanChangeAction`
@@ -8071,7 +8180,7 @@ client.companies.list_plan_changes(
-**base_plan_action:** `String` +**base_plan_action:** `Schematic::Types::PlanChangeBasePlanAction`
@@ -8193,8 +8302,10 @@ client.companies.get_plan_change(plan_change_id: "plan_change_id") ```ruby client.companies.list_plan_traits( + ids: ["ids"], plan_id: "plan_id", trait_id: "trait_id", + trait_ids: ["trait_ids"], limit: 1000000, offset: 1000000 ) @@ -8268,74 +8379,6 @@ client.companies.list_plan_traits(
-
-
-
- -
client.companies.create_plan_trait(request) -> Schematic::Companies::Types::CreatePlanTraitResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```ruby -client.companies.create_plan_trait( - plan_id: "plan_id", - trait_id: "trait_id", - trait_value: "trait_value" -) -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**plan_id:** `String` - -
-
- -
-
- -**trait_id:** `String` - -
-
- -
-
- -**trait_value:** `String` - -
-
- -
-
- -**request_options:** `Schematic::Companies::RequestOptions` - -
-
-
-
- -
@@ -8384,122 +8427,6 @@ client.companies.get_plan_trait(plan_trait_id: "plan_trait_id") - - -
- -
client.companies.update_plan_trait(plan_trait_id, request) -> Schematic::Companies::Types::UpdatePlanTraitResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```ruby -client.companies.update_plan_trait( - plan_trait_id: "plan_trait_id", - plan_id: "plan_id", - trait_value: "trait_value" -) -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**plan_trait_id:** `String` — plan_trait_id - -
-
- -
-
- -**plan_id:** `String` - -
-
- -
-
- -**trait_value:** `String` - -
-
- -
-
- -**request_options:** `Schematic::Companies::RequestOptions` - -
-
-
-
- - -
-
-
- -
client.companies.delete_plan_trait(plan_trait_id) -> Schematic::Companies::Types::DeletePlanTraitResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```ruby -client.companies.delete_plan_trait(plan_trait_id: "plan_trait_id") -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**plan_trait_id:** `String` — plan_trait_id - -
-
- -
-
- -**request_options:** `Schematic::Companies::RequestOptions` - -
-
-
-
- -
@@ -8589,8 +8516,10 @@ client.companies.update_plan_traits_bulk( ```ruby client.companies.count_plan_traits( + ids: ["ids"], plan_id: "plan_id", trait_id: "trait_id", + trait_ids: ["trait_ids"], limit: 1000000, offset: 1000000 ) @@ -8736,6 +8665,7 @@ client.companies.upsert_user_trait( ```ruby client.companies.list_users( company_id: "company_id", + ids: ["ids"], plan_id: "plan_id", q: "q", limit: 1000000, @@ -8976,6 +8906,7 @@ client.companies.delete_user(user_id: "user_id") ```ruby client.companies.count_users( company_id: "company_id", + ids: ["ids"], plan_id: "plan_id", q: "q", limit: 1000000, @@ -9221,7 +9152,10 @@ client.companies.lookup_user(keys: { ```ruby client.entitlements.list_company_overrides( company_id: "company_id", + company_ids: ["company_ids"], feature_id: "feature_id", + feature_ids: ["feature_ids"], + ids: ["ids"], without_expired: true, q: "q", limit: 1000000, @@ -9389,7 +9323,7 @@ client.entitlements.create_company_override(
-**metric_period:** `Schematic::Entitlements::Types::CreateCompanyOverrideRequestBodyMetricPeriod` +**metric_period:** `Schematic::Types::MetricPeriod`
@@ -9397,7 +9331,7 @@ client.entitlements.create_company_override(
-**metric_period_month_reset:** `Schematic::Entitlements::Types::CreateCompanyOverrideRequestBodyMetricPeriodMonthReset` +**metric_period_month_reset:** `Schematic::Types::MetricPeriodMonthReset`
@@ -9568,7 +9502,7 @@ client.entitlements.update_company_override(
-**metric_period:** `Schematic::Entitlements::Types::UpdateCompanyOverrideRequestBodyMetricPeriod` +**metric_period:** `Schematic::Types::MetricPeriod`
@@ -9576,7 +9510,7 @@ client.entitlements.update_company_override(
-**metric_period_month_reset:** `Schematic::Entitlements::Types::UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset` +**metric_period_month_reset:** `Schematic::Types::MetricPeriodMonthReset`
@@ -9707,7 +9641,10 @@ client.entitlements.delete_company_override(company_override_id: "company_overri ```ruby client.entitlements.count_company_overrides( company_id: "company_id", + company_ids: ["company_ids"], feature_id: "feature_id", + feature_ids: ["feature_ids"], + ids: ["ids"], without_expired: true, q: "q", limit: 1000000, @@ -9980,6 +9917,7 @@ client.entitlements.count_feature_companies( ```ruby client.entitlements.list_feature_usage( company_id: "company_id", + feature_ids: ["feature_ids"], include_usage_aggregation: true, q: "q", without_negative_entitlements: true, @@ -10177,6 +10115,7 @@ client.entitlements.get_feature_usage_time_series( ```ruby client.entitlements.count_feature_usage( company_id: "company_id", + feature_ids: ["feature_ids"], include_usage_aggregation: true, q: "q", without_negative_entitlements: true, @@ -10442,8 +10381,12 @@ client.entitlements.count_feature_users( ```ruby client.entitlements.list_plan_entitlements( feature_id: "feature_id", + feature_ids: ["feature_ids"], + ids: ["ids"], plan_id: "plan_id", + plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", + plan_version_ids: ["plan_version_ids"], q: "q", with_metered_products: true, limit: 1000000, @@ -10643,7 +10586,7 @@ client.entitlements.create_plan_entitlement(
-**metric_period:** `Schematic::Entitlements::Types::CreatePlanEntitlementRequestBodyMetricPeriod` +**metric_period:** `Schematic::Types::MetricPeriod`
@@ -10651,7 +10594,7 @@ client.entitlements.create_plan_entitlement(
-**metric_period_month_reset:** `Schematic::Entitlements::Types::CreatePlanEntitlementRequestBodyMetricPeriodMonthReset` +**metric_period_month_reset:** `Schematic::Types::MetricPeriodMonthReset`
@@ -10958,7 +10901,7 @@ client.entitlements.update_plan_entitlement(
-**metric_period:** `Schematic::Entitlements::Types::UpdatePlanEntitlementRequestBodyMetricPeriod` +**metric_period:** `Schematic::Types::MetricPeriod`
@@ -10966,7 +10909,7 @@ client.entitlements.update_plan_entitlement(
-**metric_period_month_reset:** `Schematic::Entitlements::Types::UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset` +**metric_period_month_reset:** `Schematic::Types::MetricPeriodMonthReset`
@@ -11178,7 +11121,7 @@ client.entitlements.delete_plan_entitlement(plan_entitlement_id: "plan_entitleme
-
client.entitlements.count_plan_entitlements() -> Schematic::Entitlements::Types::CountPlanEntitlementsResponse +
client.entitlements.upsert_plan_entitlement_for_billing_product(request) -> Schematic::Entitlements::Types::UpsertPlanEntitlementForBillingProductResponse
@@ -11191,14 +11134,12 @@ client.entitlements.delete_plan_entitlement(plan_entitlement_id: "plan_entitleme
```ruby -client.entitlements.count_plan_entitlements( +client.entitlements.upsert_plan_entitlement_for_billing_product( + billing_provider: "orb", + external_resource_id: "external_resource_id", feature_id: "feature_id", plan_id: "plan_id", - plan_version_id: "plan_version_id", - q: "q", - with_metered_products: true, - limit: 1000000, - offset: 1000000 + value_type: "boolean" ) ```
@@ -11214,7 +11155,7 @@ client.entitlements.count_plan_entitlements(
-**feature_id:** `String` — Filter plan entitlements by a single feature ID (starting with feat_) +**billing_product_id:** `String`
@@ -11222,7 +11163,7 @@ client.entitlements.count_plan_entitlements(
-**feature_ids:** `String` — Filter plan entitlements by multiple feature IDs (starting with feat_) +**billing_provider:** `Schematic::Types::BillingProviderType`
@@ -11230,7 +11171,7 @@ client.entitlements.count_plan_entitlements(
-**ids:** `String` — Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) +**billing_threshold:** `Integer`
@@ -11238,7 +11179,7 @@ client.entitlements.count_plan_entitlements(
-**plan_id:** `String` — Filter plan entitlements by a single plan ID (starting with plan_) +**credit_consumption_rate:** `Integer`
@@ -11246,7 +11187,7 @@ client.entitlements.count_plan_entitlements(
-**plan_ids:** `String` — Filter plan entitlements by multiple plan IDs (starting with plan_) +**currency:** `String`
@@ -11254,7 +11195,7 @@ client.entitlements.count_plan_entitlements(
-**plan_version_id:** `String` — Filter plan entitlements by a single plan version ID (starting with plvr_) +**currency_prices:** `Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody]`
@@ -11262,7 +11203,7 @@ client.entitlements.count_plan_entitlements(
-**plan_version_ids:** `String` — Filter plan entitlements by multiple plan version IDs (starting with plvr_) +**external_resource_id:** `String`
@@ -11270,7 +11211,7 @@ client.entitlements.count_plan_entitlements(
-**q:** `String` — Search for plan entitlements by feature or company name +**feature_id:** `String`
@@ -11278,7 +11219,7 @@ client.entitlements.count_plan_entitlements(
-**with_metered_products:** `Internal::Types::Boolean` — Filter plan entitlements only with metered products +**metric_period:** `Schematic::Types::MetricPeriod`
@@ -11286,7 +11227,7 @@ client.entitlements.count_plan_entitlements(
-**limit:** `Integer` — Page limit (default 100) +**metric_period_month_reset:** `Schematic::Types::MetricPeriodMonthReset`
@@ -11294,7 +11235,159 @@ client.entitlements.count_plan_entitlements(
-**offset:** `Integer` — Page offset (default 0) +**monthly_metered_price_id:** `String` + +
+
+ +
+
+ +**monthly_price_tiers:** `Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody]` + +
+
+ +
+
+ +**monthly_unit_price:** `Integer` + +
+
+ +
+
+ +**monthly_unit_price_decimal:** `String` + +
+
+ +
+
+ +**overage_billing_product_id:** `String` + +
+
+ +
+
+ +**plan_id:** `String` + +
+
+ +
+
+ +**plan_version_id:** `String` + +
+
+ +
+
+ +**price_behavior:** `Schematic::Types::EntitlementPriceBehavior` + +
+
+ +
+
+ +**price_tiers:** `Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody]` — Use MonthlyPriceTiers or YearlyPriceTiers instead + +
+
+ +
+
+ +**soft_limit:** `Integer` + +
+
+ +
+
+ +**tier_mode:** `Schematic::Types::BillingTiersMode` + +
+
+ +
+
+ +**value_bool:** `Internal::Types::Boolean` + +
+
+ +
+
+ +**value_credit_id:** `String` + +
+
+ +
+
+ +**value_numeric:** `Integer` + +
+
+ +
+
+ +**value_trait_id:** `String` + +
+
+ +
+
+ +**value_type:** `Schematic::Types::EntitlementValueType` + +
+
+ +
+
+ +**yearly_metered_price_id:** `String` + +
+
+ +
+
+ +**yearly_price_tiers:** `Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody]` + +
+
+ +
+
+ +**yearly_unit_price:** `Integer` + +
+
+ +
+
+ +**yearly_unit_price_decimal:** `String`
@@ -11314,7 +11407,7 @@ client.entitlements.count_plan_entitlements(
-
client.entitlements.duplicate_plan_entitlements(request) -> Schematic::Entitlements::Types::DuplicatePlanEntitlementsResponse +
client.entitlements.count_plan_entitlements() -> Schematic::Entitlements::Types::CountPlanEntitlementsResponse
@@ -11327,9 +11420,18 @@ client.entitlements.count_plan_entitlements(
```ruby -client.entitlements.duplicate_plan_entitlements( - source_plan_id: "source_plan_id", - target_plan_id: "target_plan_id" +client.entitlements.count_plan_entitlements( + feature_id: "feature_id", + feature_ids: ["feature_ids"], + ids: ["ids"], + plan_id: "plan_id", + plan_ids: ["plan_ids"], + plan_version_id: "plan_version_id", + plan_version_ids: ["plan_version_ids"], + q: "q", + with_metered_products: true, + limit: 1000000, + offset: 1000000 ) ```
@@ -11345,7 +11447,698 @@ client.entitlements.duplicate_plan_entitlements(
-**source_plan_id:** `String` +**feature_id:** `String` — Filter plan entitlements by a single feature ID (starting with feat_) + +
+
+ +
+
+ +**feature_ids:** `String` — Filter plan entitlements by multiple feature IDs (starting with feat_) + +
+
+ +
+
+ +**ids:** `String` — Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) + +
+
+ +
+
+ +**plan_id:** `String` — Filter plan entitlements by a single plan ID (starting with plan_) + +
+
+ +
+
+ +**plan_ids:** `String` — Filter plan entitlements by multiple plan IDs (starting with plan_) + +
+
+ +
+
+ +**plan_version_id:** `String` — Filter plan entitlements by a single plan version ID (starting with plvr_) + +
+
+ +
+
+ +**plan_version_ids:** `String` — Filter plan entitlements by multiple plan version IDs (starting with plvr_) + +
+
+ +
+
+ +**q:** `String` — Search for plan entitlements by feature or company name + +
+
+ +
+
+ +**with_metered_products:** `Internal::Types::Boolean` — Filter plan entitlements only with metered products + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `Integer` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `Schematic::Entitlements::RequestOptions` + +
+
+ +
+ + + + +
+ +
client.entitlements.duplicate_plan_entitlements(request) -> Schematic::Entitlements::Types::DuplicatePlanEntitlementsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.entitlements.duplicate_plan_entitlements( + source_plan_id: "source_plan_id", + target_plan_id: "target_plan_id" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**source_plan_id:** `String` + +
+
+ +
+
+ +**target_plan_id:** `String` + +
+
+ +
+
+ +**request_options:** `Schematic::Entitlements::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.entitlements.get_feature_usage_by_company() -> Schematic::Entitlements::Types::GetFeatureUsageByCompanyResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.entitlements.get_feature_usage_by_company(keys: { + keys: "keys" +}) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `Internal::Types::Hash[String, String]` — Key/value pairs + +
+
+ +
+
+ +**request_options:** `Schematic::Entitlements::RequestOptions` + +
+
+
+
+ + +
+
+
+ +## plans +
client.plans.update_company_plans(company_plan_id, request) -> Schematic::Plans::Types::UpdateCompanyPlansResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.plans.update_company_plans( + company_plan_id: "company_plan_id", + add_on_ids: ["add_on_ids"] +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_plan_id:** `String` — company_plan_id + +
+
+ +
+
+ +**add_on_ids:** `Internal::Types::Array[String]` + +
+
+ +
+
+ +**base_plan_id:** `String` + +
+
+ +
+
+ +**request_options:** `Schematic::Plans::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.plans.list_custom_plan_billings() -> Schematic::Plans::Types::ListCustomPlanBillingsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.plans.list_custom_plan_billings( + company_id: "company_id", + plan_id: "plan_id", + status: "active", + statuses: ["active"], + limit: 1000000, + offset: 1000000 +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `String` — Filter by company ID + +
+
+ +
+
+ +**plan_id:** `String` — Filter by plan ID + +
+
+ +
+
+ +**status:** `Schematic::Types::CustomPlanBillingStatus` — Filter by billing status + +
+
+ +
+
+ +**statuses:** `Schematic::Types::CustomPlanBillingStatus` — Filter by multiple billing statuses + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `Integer` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `Schematic::Plans::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.plans.retry_custom_plan_billing(custom_plan_billing_id, request) -> Schematic::Plans::Types::RetryCustomPlanBillingResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.plans.retry_custom_plan_billing( + custom_plan_billing_id: "custom_plan_billing_id", + customer_email: "customer_email", + pay_in_advance: [{ + price_id: "price_id", + quantity: 1000000 + }] +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**custom_plan_billing_id:** `String` — custom_plan_billing_id + +
+
+ +
+
+ +**activation_strategy:** `Schematic::Types::CustomPlanActivationStrategy` + +
+
+ +
+
+ +**customer_email:** `String` + +
+
+ +
+
+ +**days_until_due:** `Integer` + +
+
+ +
+
+ +**pay_in_advance:** `Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody]` + +
+
+ +
+
+ +**request_options:** `Schematic::Plans::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.plans.create_custom_plan(request) -> Schematic::Plans::Types::CreateCustomPlanResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.plans.create_custom_plan( + company_id: "company_id", + description: "description", + name: "name" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `String` + +
+
+ +
+
+ +**copied_from_plan_id:** `String` + +
+
+ +
+
+ +**description:** `String` + +
+
+ +
+
+ +**icon:** `Schematic::Types::PlanIcon` + +
+
+ +
+
+ +**name:** `String` + +
+
+ +
+
+ +**request_options:** `Schematic::Plans::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.plans.list_plans() -> Schematic::Plans::Types::ListPlansResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.plans.list_plans( + company_id: "company_id", + exclude_company_scoped: true, + for_fallback_plan: true, + for_initial_plan: true, + for_trial_expiry_plan: true, + has_product_id: true, + ids: ["ids"], + include_draft_versions: true, + plan_type: "plan", + q: "q", + scoped_to_company_id: "scoped_to_company_id", + without_entitlement_for: "without_entitlement_for", + without_paid_product_id: true, + limit: 1000000, + offset: 1000000 +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `String` + +
+
+ +
+
+ +**exclude_company_scoped:** `Internal::Types::Boolean` — Exclude plans that are scoped to a company (custom plans assigned to a company) + +
+
+ +
+
+ +**for_fallback_plan:** `Internal::Types::Boolean` — Filter for plans valid as fallback plans (not linked to billing) + +
+
+ +
+
+ +**for_initial_plan:** `Internal::Types::Boolean` — Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) + +
+
+ +
+
+ +**for_trial_expiry_plan:** `Internal::Types::Boolean` — Filter for plans valid as trial expiry plans (not linked to billing or free) + +
+
+ +
+
+ +**has_product_id:** `Internal::Types::Boolean` — Filter out plans that do not have a billing product ID + +
+
+ +
+
+ +**ids:** `String` + +
+
+ +
+
+ +**include_draft_versions:** `Internal::Types::Boolean` — Include billing settings from draft versions for plans which have draft version + +
+
+ +
+
+ +**plan_type:** `Schematic::Types::PlanType` — Filter by plan type + +
+
+ +
+
+ +**q:** `String` + +
+
+ +
+
+ +**scoped_to_company_id:** `String` — Filter plans scoped to a specific company (custom plans) + +
+
+ +
+
+ +**without_entitlement_for:** `String` — Filter out plans that already have a plan entitlement for the specified feature ID + +
+
+ +
+
+ +**without_paid_product_id:** `Internal::Types::Boolean` — Filter out plans that have a paid billing product ID + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100)
@@ -11353,7 +12146,7 @@ client.entitlements.duplicate_plan_entitlements(
-**target_plan_id:** `String` +**offset:** `Integer` — Page offset (default 0)
@@ -11361,7 +12154,7 @@ client.entitlements.duplicate_plan_entitlements(
-**request_options:** `Schematic::Entitlements::RequestOptions` +**request_options:** `Schematic::Plans::RequestOptions`
@@ -11373,7 +12166,7 @@ client.entitlements.duplicate_plan_entitlements(
-
client.entitlements.get_feature_usage_by_company() -> Schematic::Entitlements::Types::GetFeatureUsageByCompanyResponse +
client.plans.create_plan(request) -> Schematic::Plans::Types::CreatePlanResponse
@@ -11386,9 +12179,11 @@ client.entitlements.duplicate_plan_entitlements(
```ruby -client.entitlements.get_feature_usage_by_company(keys: { - keys: "keys" -}) +client.plans.create_plan( + description: "description", + name: "name", + plan_type: "plan" +) ```
@@ -11403,7 +12198,7 @@ client.entitlements.get_feature_usage_by_company(keys: {
-**keys:** `Internal::Types::Hash[String, String]` — Key/value pairs +**request:** `Schematic::Types::CreatePlanRequestBody`
@@ -11411,7 +12206,7 @@ client.entitlements.get_feature_usage_by_company(keys: {
-**request_options:** `Schematic::Entitlements::RequestOptions` +**request_options:** `Schematic::Plans::RequestOptions`
@@ -11423,8 +12218,7 @@ client.entitlements.get_feature_usage_by_company(keys: {
-## plans -
client.plans.update_company_plans(company_plan_id, request) -> Schematic::Plans::Types::UpdateCompanyPlansResponse +
client.plans.get_plan(plan_id) -> Schematic::Plans::Types::GetPlanResponse
@@ -11437,9 +12231,9 @@ client.entitlements.get_feature_usage_by_company(keys: {
```ruby -client.plans.update_company_plans( - company_plan_id: "company_plan_id", - add_on_ids: ["add_on_ids"] +client.plans.get_plan( + plan_id: "plan_id", + plan_version_id: "plan_version_id" ) ```
@@ -11455,15 +12249,7 @@ client.plans.update_company_plans(
-**company_plan_id:** `String` — company_plan_id - -
-
- -
-
- -**add_on_ids:** `Internal::Types::Array[String]` +**plan_id:** `String` — plan_id
@@ -11471,7 +12257,7 @@ client.plans.update_company_plans(
-**base_plan_id:** `String` +**plan_version_id:** `String` — Fetch billing settings for a specific plan version
@@ -11491,7 +12277,7 @@ client.plans.update_company_plans(
-
client.plans.list_plans() -> Schematic::Plans::Types::ListPlansResponse +
client.plans.update_plan(plan_id, request) -> Schematic::Plans::Types::UpdatePlanResponse
@@ -11504,19 +12290,9 @@ client.plans.update_company_plans(
```ruby -client.plans.list_plans( - company_id: "company_id", - for_fallback_plan: true, - for_initial_plan: true, - for_trial_expiry_plan: true, - has_product_id: true, - include_draft_versions: true, - plan_type: "plan", - q: "q", - without_entitlement_for: "without_entitlement_for", - without_paid_product_id: true, - limit: 1000000, - offset: 1000000 +client.plans.update_plan( + plan_id: "plan_id", + name: "name" ) ```
@@ -11532,7 +12308,7 @@ client.plans.list_plans(
-**company_id:** `String` +**plan_id:** `String` — plan_id
@@ -11540,7 +12316,7 @@ client.plans.list_plans(
-**for_fallback_plan:** `Internal::Types::Boolean` — Filter for plans valid as fallback plans (not linked to billing) +**request:** `Schematic::Types::UpdatePlanRequestBody`
@@ -11548,39 +12324,47 @@ client.plans.list_plans(
-**for_initial_plan:** `Internal::Types::Boolean` — Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) +**request_options:** `Schematic::Plans::RequestOptions`
+ +
-
-
-**for_trial_expiry_plan:** `Internal::Types::Boolean` — Filter for plans valid as trial expiry plans (not linked to billing or free) -
+
+
client.plans.delete_plan(plan_id) -> Schematic::Plans::Types::DeletePlanResponse
-**has_product_id:** `Internal::Types::Boolean` — Filter out plans that do not have a billing product ID - -
-
+#### 🔌 Usage
-**ids:** `String` - +
+
+ +```ruby +client.plans.delete_plan(plan_id: "plan_id") +``` +
+
+#### ⚙️ Parameters +
-**include_draft_versions:** `Internal::Types::Boolean` — Include billing settings from draft versions for plans which have draft version +
+
+ +**plan_id:** `String` — plan_id
@@ -11588,39 +12372,51 @@ client.plans.list_plans(
-**plan_type:** `Schematic::Types::PlanType` — Filter by plan type +**request_options:** `Schematic::Plans::RequestOptions`
+
+
-
-
-**q:** `String` -
+
+
client.plans.upsert_billing_product_plan(plan_id, request) -> Schematic::Plans::Types::UpsertBillingProductPlanResponse
-**without_entitlement_for:** `String` — Filter out plans that already have a plan entitlement for the specified feature ID - -
-
+#### 🔌 Usage
-**without_paid_product_id:** `Internal::Types::Boolean` — Filter out plans that have a paid billing product ID - +
+
+ +```ruby +client.plans.upsert_billing_product_plan( + plan_id: "plan_id", + charge_type: "free", + is_trialable: true +) +``` +
+
+#### ⚙️ Parameters +
-**limit:** `Integer` — Page limit (default 100) +
+
+ +**plan_id:** `String` — plan_id
@@ -11628,7 +12424,7 @@ client.plans.list_plans(
-**offset:** `Integer` — Page offset (default 0) +**request:** `Schematic::Types::UpsertBillingProductRequestBody`
@@ -11648,7 +12444,7 @@ client.plans.list_plans(
-
client.plans.create_plan(request) -> Schematic::Plans::Types::CreatePlanResponse +
client.plans.upsert_plan_for_billing_product(request) -> Schematic::Plans::Types::UpsertPlanForBillingProductResponse
@@ -11661,8 +12457,10 @@ client.plans.list_plans(
```ruby -client.plans.create_plan( +client.plans.upsert_plan_for_billing_product( + billing_provider: "orb", description: "description", + external_resource_id: "external_resource_id", name: "name", plan_type: "plan" ) @@ -11680,7 +12478,7 @@ client.plans.create_plan(
-**request:** `Schematic::Types::CreatePlanRequestBody` +**billing_provider:** `Schematic::Types::BillingProviderType`
@@ -11688,50 +12486,31 @@ client.plans.create_plan(
-**request_options:** `Schematic::Plans::RequestOptions` +**description:** `String`
-
-
- - - - -
-
client.plans.get_plan(plan_id) -> Schematic::Plans::Types::GetPlanResponse
-#### 🔌 Usage - -
-
+**external_resource_id:** `String` + +
+
-```ruby -client.plans.get_plan( - plan_id: "plan_id", - plan_version_id: "plan_version_id" -) -``` -
-
+**icon:** `Schematic::Types::PlanIcon` +
-#### ⚙️ Parameters -
-
-
- -**plan_id:** `String` — plan_id +**name:** `String`
@@ -11739,7 +12518,7 @@ client.plans.get_plan(
-**plan_version_id:** `String` — Fetch billing settings for a specific plan version +**plan_type:** `Schematic::Types::PlanType`
@@ -11759,7 +12538,7 @@ client.plans.get_plan(
-
client.plans.update_plan(plan_id, request) -> Schematic::Plans::Types::UpdatePlanResponse +
client.plans.list_billing_product_match_companies() -> Schematic::Plans::Types::ListBillingProductMatchCompaniesResponse
@@ -11772,9 +12551,11 @@ client.plans.get_plan(
```ruby -client.plans.update_plan( +client.plans.list_billing_product_match_companies( plan_id: "plan_id", - name: "name" + q: "q", + limit: 1000000, + offset: 1000000 ) ```
@@ -11790,7 +12571,7 @@ client.plans.update_plan(
-**plan_id:** `String` — plan_id +**plan_id:** `String` — The plan ID to find billing product match companies for
@@ -11798,7 +12579,7 @@ client.plans.update_plan(
-**request:** `Schematic::Types::UpdatePlanRequestBody` +**q:** `String` — Search for companies by name, keys or string traits
@@ -11806,47 +12587,15 @@ client.plans.update_plan(
-**request_options:** `Schematic::Plans::RequestOptions` +**limit:** `Integer` — Page limit (default 100) -
-
- -
- - - - -
- -
client.plans.delete_plan(plan_id) -> Schematic::Plans::Types::DeletePlanResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```ruby -client.plans.delete_plan(plan_id: "plan_id") -``` -
-
-#### ⚙️ Parameters - -
-
-
-**plan_id:** `String` — plan_id +**offset:** `Integer` — Page offset (default 0)
@@ -11866,7 +12615,7 @@ client.plans.delete_plan(plan_id: "plan_id")
-
client.plans.upsert_billing_product_plan(plan_id, request) -> Schematic::Plans::Types::UpsertBillingProductPlanResponse +
client.plans.count_billing_product_match_companies() -> Schematic::Plans::Types::CountBillingProductMatchCompaniesResponse
@@ -11879,10 +12628,11 @@ client.plans.delete_plan(plan_id: "plan_id")
```ruby -client.plans.upsert_billing_product_plan( +client.plans.count_billing_product_match_companies( plan_id: "plan_id", - charge_type: "free", - is_trialable: true + q: "q", + limit: 1000000, + offset: 1000000 ) ```
@@ -11898,7 +12648,7 @@ client.plans.upsert_billing_product_plan(
-**plan_id:** `String` — plan_id +**plan_id:** `String` — The plan ID to find billing product match companies for
@@ -11906,7 +12656,23 @@ client.plans.upsert_billing_product_plan(
-**request:** `Schematic::Types::UpsertBillingProductRequestBody` +**q:** `String` — Search for companies by name, keys or string traits + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `Integer` — Page offset (default 0)
@@ -11941,13 +12707,16 @@ client.plans.upsert_billing_product_plan( ```ruby client.plans.count_plans( company_id: "company_id", + exclude_company_scoped: true, for_fallback_plan: true, for_initial_plan: true, for_trial_expiry_plan: true, has_product_id: true, + ids: ["ids"], include_draft_versions: true, plan_type: "plan", q: "q", + scoped_to_company_id: "scoped_to_company_id", without_entitlement_for: "without_entitlement_for", without_paid_product_id: true, limit: 1000000, @@ -11975,6 +12744,14 @@ client.plans.count_plans(
+**exclude_company_scoped:** `Internal::Types::Boolean` — Exclude plans that are scoped to a company (custom plans assigned to a company) + +
+
+ +
+
+ **for_fallback_plan:** `Internal::Types::Boolean` — Filter for plans valid as fallback plans (not linked to billing)
@@ -12015,7 +12792,15 @@ client.plans.count_plans(
-**include_draft_versions:** `Internal::Types::Boolean` — Include billing settings from draft versions for plans which have draft version +**include_draft_versions:** `Internal::Types::Boolean` — Include billing settings from draft versions for plans which have draft version + +
+
+ +
+
+ +**plan_type:** `Schematic::Types::PlanType` — Filter by plan type
@@ -12023,7 +12808,7 @@ client.plans.count_plans(
-**plan_type:** `Schematic::Types::PlanType` — Filter by plan type +**q:** `String`
@@ -12031,7 +12816,7 @@ client.plans.count_plans(
-**q:** `String` +**scoped_to_company_id:** `String` — Filter plans scoped to a specific company (custom plans)
@@ -12217,7 +13002,11 @@ client.plans.delete_plan_version( client.plans.publish_plan_version( plan_id: "plan_id", excluded_company_ids: ["excluded_company_ids"], - migration_strategy: "immediate" + migration_strategy: "immediate", + pay_in_advance: [{ + price_id: "price_id", + quantity: 1000000 + }] ) ``` @@ -12241,6 +13030,30 @@ client.plans.publish_plan_version(
+**activation_strategy:** `Schematic::Types::CustomPlanActivationStrategy` + +
+
+ +
+
+ +**customer_email:** `String` + +
+
+ +
+
+ +**days_until_due:** `Integer` + +
+
+ +
+
+ **excluded_company_ids:** `Internal::Types::Array[String]`
@@ -12257,6 +13070,14 @@ client.plans.publish_plan_version(
+**pay_in_advance:** `Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody]` + +
+
+ +
+
+ **request_options:** `Schematic::Plans::RequestOptions`
@@ -12891,6 +13712,7 @@ client.events.create_event_batch(events: [{ ```ruby client.events.get_event_summaries( q: "q", + event_subtypes: ["event_subtypes"], limit: 1000000, offset: 1000000 ) @@ -12968,6 +13790,7 @@ client.events.get_event_summaries( client.events.list_events( company_id: "company_id", event_subtype: "event_subtype", + event_types: ["flag_check"], flag_id: "flag_id", user_id: "user_id", limit: 1000000, @@ -13206,11 +14029,13 @@ client.events.get_segment_integration_status ```ruby client.features.list_features( + boolean_require_event: true, + feature_type: ["boolean"], + ids: ["ids"], + plan_version_id: "plan_version_id", q: "q", without_company_override_for: "without_company_override_for", - plan_version_id: "plan_version_id", without_plan_entitlement_for: "without_plan_entitlement_for", - boolean_require_event: true, limit: 1000000, offset: 1000000 ) @@ -13228,7 +14053,7 @@ client.features.list_features(
-**ids:** `String` +**boolean_require_event:** `Internal::Types::Boolean` — Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter.
@@ -13236,7 +14061,7 @@ client.features.list_features(
-**q:** `String` — Search by feature name or ID +**feature_type:** `Schematic::Types::FeatureType` — Filter by one or more feature types (boolean, event, trait)
@@ -13244,7 +14069,7 @@ client.features.list_features(
-**without_company_override_for:** `String` — Filter out features that already have a company override for the specified company ID +**ids:** `String`
@@ -13260,7 +14085,7 @@ client.features.list_features(
-**without_plan_entitlement_for:** `String` — Filter out features that already have a plan entitlement for the specified plan ID +**q:** `String` — Search by feature name or ID
@@ -13268,7 +14093,7 @@ client.features.list_features(
-**feature_type:** `Schematic::Types::FeatureType` — Filter by one or more feature types (boolean, event, trait) +**without_company_override_for:** `String` — Filter out features that already have a company override for the specified company ID
@@ -13276,7 +14101,7 @@ client.features.list_features(
-**boolean_require_event:** `Internal::Types::Boolean` — Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter. +**without_plan_entitlement_for:** `String` — Filter out features that already have a plan entitlement for the specified plan ID
@@ -13392,7 +14217,7 @@ client.features.create_feature(
-**maintainer_id:** `String` +**maintainer_account_member_id:** `String`
@@ -13576,7 +14401,7 @@ client.features.update_feature(feature_id: "feature_id")
-**maintainer_id:** `String` +**maintainer_account_member_id:** `String`
@@ -13672,6 +14497,156 @@ client.features.delete_feature(feature_id: "feature_id")
+ +
+
+ +
client.features.upsert_feature_for_billing_product(request) -> Schematic::Features::Types::UpsertFeatureForBillingProductResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.features.upsert_feature_for_billing_product( + billing_provider: "orb", + description: "description", + external_resource_id: "external_resource_id", + feature_type: "boolean", + name: "name" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**billing_provider:** `Schematic::Types::BillingProviderType` + +
+
+ +
+
+ +**description:** `String` + +
+
+ +
+
+ +**event_subtype:** `String` + +
+
+ +
+
+ +**external_resource_id:** `String` + +
+
+ +
+
+ +**feature_type:** `Schematic::Types::FeatureType` + +
+
+ +
+
+ +**flag:** `Schematic::Types::CreateOrUpdateFlagRequestBody` + +
+
+ +
+
+ +**icon:** `String` + +
+
+ +
+
+ +**lifecycle_phase:** `Schematic::Types::FeatureLifecyclePhase` + +
+
+ +
+
+ +**maintainer_account_member_id:** `String` + +
+
+ +
+
+ +**name:** `String` + +
+
+ +
+
+ +**plural_name:** `String` + +
+
+ +
+
+ +**singular_name:** `String` + +
+
+ +
+
+ +**trait_id:** `String` + +
+
+ +
+
+ +**request_options:** `Schematic::Features::RequestOptions` + +
+
+
+
+ +
@@ -13690,11 +14665,13 @@ client.features.delete_feature(feature_id: "feature_id") ```ruby client.features.count_features( + boolean_require_event: true, + feature_type: ["boolean"], + ids: ["ids"], + plan_version_id: "plan_version_id", q: "q", without_company_override_for: "without_company_override_for", - plan_version_id: "plan_version_id", without_plan_entitlement_for: "without_plan_entitlement_for", - boolean_require_event: true, limit: 1000000, offset: 1000000 ) @@ -13712,7 +14689,7 @@ client.features.count_features(
-**ids:** `String` +**boolean_require_event:** `Internal::Types::Boolean` — Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter.
@@ -13720,7 +14697,7 @@ client.features.count_features(
-**q:** `String` — Search by feature name or ID +**feature_type:** `Schematic::Types::FeatureType` — Filter by one or more feature types (boolean, event, trait)
@@ -13728,7 +14705,7 @@ client.features.count_features(
-**without_company_override_for:** `String` — Filter out features that already have a company override for the specified company ID +**ids:** `String`
@@ -13744,7 +14721,7 @@ client.features.count_features(
-**without_plan_entitlement_for:** `String` — Filter out features that already have a plan entitlement for the specified plan ID +**q:** `String` — Search by feature name or ID
@@ -13752,7 +14729,7 @@ client.features.count_features(
-**feature_type:** `Schematic::Types::FeatureType` — Filter by one or more feature types (boolean, event, trait) +**without_company_override_for:** `String` — Filter out features that already have a company override for the specified company ID
@@ -13760,7 +14737,7 @@ client.features.count_features(
-**boolean_require_event:** `Internal::Types::Boolean` — Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter. +**without_plan_entitlement_for:** `String` — Filter out features that already have a plan entitlement for the specified plan ID
@@ -13811,6 +14788,7 @@ client.features.count_features( ```ruby client.features.list_flags( feature_id: "feature_id", + ids: ["ids"], q: "q", limit: 1000000, offset: 1000000 @@ -14112,13 +15090,13 @@ client.features.update_flag_rules( rules: [{ condition_groups: [{ conditions: [{ - condition_type: "company", + condition_type: "base_plan", operator: "eq", resource_ids: ["resource_ids"] }] }], conditions: [{ - condition_type: "company", + condition_type: "base_plan", operator: "eq", resource_ids: ["resource_ids"] }], @@ -14336,6 +15314,7 @@ client.features.check_flags_bulk(contexts: [{}]) ```ruby client.features.count_flags( feature_id: "feature_id", + ids: ["ids"], q: "q", limit: 1000000, offset: 1000000 @@ -14402,6 +15381,55 @@ client.features.count_flags( + + +
+ +## integrationsapi +
client.integrationsapi.get_integration_webhook_url(type) -> Schematic::Integrationsapi::Types::GetIntegrationWebhookUrlResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.integrationsapi.get_integration_webhook_url(type: "type") +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**type:** `String` — type + +
+
+ +
+
+ +**request_options:** `Schematic::Integrationsapi::RequestOptions` + +
+
+
+
+ +
@@ -16050,6 +17078,7 @@ client.accesstokens.issue_temporary_access_token( ```ruby client.webhooks.list_webhook_events( + ids: ["ids"], q: "q", webhook_id: "webhook_id", limit: 1000000, @@ -16183,6 +17212,7 @@ client.webhooks.get_webhook_event(webhook_event_id: "webhook_event_id") ```ruby client.webhooks.count_webhook_events( + ids: ["ids"], q: "q", webhook_id: "webhook_id", limit: 1000000, From 84fa046d3632482b4f6f290bc5e79606f431b3a7 Mon Sep 17 00:00:00 2001 From: Ben Papillon Date: Thu, 23 Apr 2026 20:31:52 -0700 Subject: [PATCH 2/2] fix: drop redundant Style/OneClassPerFile rubocop disable Rubocop flags this disable as unnecessary (Lint/RedundantCopDisableDirective) because Style/OneClassPerFile does not currently trigger on this file. --- test/custom.test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/custom.test.rb b/test/custom.test.rb index c1c2bc9..99a555c 100644 --- a/test/custom.test.rb +++ b/test/custom.test.rb @@ -22,7 +22,7 @@ def before_setup # A shared (non-local) cache for testing replicator mode. # Delegates to LocalCache but has its own class identity so the # DataStream::Client replicator validation doesn't reject it. -class TestSharedCache # rubocop:disable Style/OneClassPerFile +class TestSharedCache include Schematic::CacheProvider def initialize(max_size: 100, ttl: 60)