From b22d57b539d0a826d1f3ae95bafe33d9e42c9bfa Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 19:47:25 +0000 Subject: [PATCH] SDK regeneration --- .fern/metadata.json | 4 +- Gemfile.lock | 2 +- lib/schematic.rb | 31 +- lib/schematic/billing/client.rb | 8 +- .../types/count_billing_products_params.rb | 1 + .../types/count_billing_products_request.rb | 1 + .../types/list_billing_products_params.rb | 1 + .../types/list_billing_products_request.rb | 1 + lib/schematic/credits/client.rb | 8 +- ...count_billing_plan_credit_grants_params.rb | 1 + ...ount_billing_plan_credit_grants_request.rb | 1 + .../list_billing_plan_credit_grants_params.rb | 1 + ...list_billing_plan_credit_grants_request.rb | 1 + lib/schematic/events/client.rb | 4 +- .../events/types/list_events_params.rb | 1 + .../events/types/list_events_request.rb | 1 + lib/schematic/features/client.rb | 8 +- .../features/types/count_features_params.rb | 1 + .../features/types/count_features_request.rb | 1 + .../features/types/list_features_params.rb | 1 + .../features/types/list_features_request.rb | 1 + lib/schematic/integrationsapi/client.rb | 177 ++++++++ .../types/list_integrations_params.rb | 18 + .../types/list_integrations_request.rb | 17 + .../types/list_integrations_response.rb | 12 + .../load_sample_data_set_v_2_response.rb | 12 + .../types/run_integration_response.rb | 12 + .../types/start_data_import_request_body.rb | 13 + .../types/start_data_import_response.rb | 12 + .../types/uninstall_integration_response.rb | 12 + lib/schematic/plans/client.rb | 8 +- .../plans/types/count_plans_params.rb | 1 + .../plans/types/count_plans_request.rb | 1 + ...create_billing_linked_plan_request_body.rb | 1 + .../plans/types/list_plans_params.rb | 1 + .../plans/types/list_plans_request.rb | 1 + .../types/api_key_create_response_data.rb | 1 + .../api_key_integration_response_data.rb | 11 + lib/schematic/types/api_key_response_data.rb | 1 + .../types/audit_log_list_response_data.rb | 1 + .../types/audit_log_response_data.rb | 1 + .../types/billing_credit_bundle_view.rb | 2 +- lib/schematic/types/billing_credit_view.rb | 1 + ...billing_plan_credit_grant_response_data.rb | 1 + ...ange_subscription_internal_request_body.rb | 1 + .../types/change_subscription_request_body.rb | 1 + .../types/clerk_integration_config.rb | 10 + .../types/company_matching_criteria.rb | 12 + .../types/company_plan_credit_grant_view.rb | 40 ++ .../company_plan_with_billing_sub_view.rb | 2 +- ..._billing_plan_credit_grant_request_body.rb | 1 + .../types/create_event_request_body.rb | 1 + lib/schematic/types/credit_currency_price.rb | 10 + lib/schematic/types/data_event_payload.rb | 1 + ...lan_entitlements_response_response_data.rb | 1 + .../types/event_detail_response_data.rb | 2 + lib/schematic/types/event_response_data.rb | 1 + .../types/integration_capabilities.rb | 11 + lib/schematic/types/integration_config.rb | 15 + .../types/integration_response_data.rb | 13 + lib/schematic/types/integration_state.rb | 13 + .../integrations_data_set_response_data.rb | 9 + .../types/integrations_list_response_data.rb | 15 + .../types/integrations_response_data.rb | 13 + lib/schematic/types/orb_integration_config.rb | 9 + lib/schematic/types/plan_credit_grant_view.rb | 1 + .../types/rules_engine_schema_version.rb | 2 +- .../types/stripe_integration_config.rb | 15 + ...update_auto_topup_override_request_body.rb | 12 + ..._billing_plan_credit_grant_request_body.rb | 1 + reference.md | 399 ++++++++++++++++++ 71 files changed, 988 insertions(+), 19 deletions(-) create mode 100644 lib/schematic/integrationsapi/types/list_integrations_params.rb create mode 100644 lib/schematic/integrationsapi/types/list_integrations_request.rb create mode 100644 lib/schematic/integrationsapi/types/list_integrations_response.rb create mode 100644 lib/schematic/integrationsapi/types/load_sample_data_set_v_2_response.rb create mode 100644 lib/schematic/integrationsapi/types/run_integration_response.rb create mode 100644 lib/schematic/integrationsapi/types/start_data_import_request_body.rb create mode 100644 lib/schematic/integrationsapi/types/start_data_import_response.rb create mode 100644 lib/schematic/integrationsapi/types/uninstall_integration_response.rb create mode 100644 lib/schematic/types/api_key_integration_response_data.rb create mode 100644 lib/schematic/types/clerk_integration_config.rb create mode 100644 lib/schematic/types/company_matching_criteria.rb create mode 100644 lib/schematic/types/company_plan_credit_grant_view.rb create mode 100644 lib/schematic/types/credit_currency_price.rb create mode 100644 lib/schematic/types/integration_capabilities.rb create mode 100644 lib/schematic/types/integration_config.rb create mode 100644 lib/schematic/types/integration_response_data.rb create mode 100644 lib/schematic/types/integration_state.rb create mode 100644 lib/schematic/types/integrations_data_set_response_data.rb create mode 100644 lib/schematic/types/integrations_list_response_data.rb create mode 100644 lib/schematic/types/integrations_response_data.rb create mode 100644 lib/schematic/types/orb_integration_config.rb create mode 100644 lib/schematic/types/stripe_integration_config.rb create mode 100644 lib/schematic/types/update_auto_topup_override_request_body.rb diff --git a/.fern/metadata.json b/.fern/metadata.json index 6d569b2..0f1c010 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,5 +1,5 @@ { - "cliVersion": "4.76.1", + "cliVersion": "5.6.0", "generatorName": "fernapi/fern-ruby-sdk", "generatorVersion": "1.1.13", "generatorConfig": { @@ -13,6 +13,6 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "65ef3b80b68cd7596daad7fa53232ea510ad01f2", + "originGitCommit": "4fd82021eff164a6f2484d4504850c46fe8f4a95", "sdkVersion": "1.4.1" } \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 242814e..6504fc7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,7 +18,7 @@ GEM rexml hashdiff (1.2.1) io-console (0.8.2) - json (2.19.4) + json (2.19.5) language_server-protocol (3.17.0.5) lint_roller (1.1.0) method_source (1.1.0) diff --git a/lib/schematic.rb b/lib/schematic.rb index cc24360..6c36499 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -42,6 +42,9 @@ 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/integration_state" +require_relative "schematic/types/integration_type" +require_relative "schematic/types/api_key_integration_response_data" require_relative "schematic/types/api_key_scope" require_relative "schematic/types/environment_type" require_relative "schematic/types/environment_response_data" @@ -201,6 +204,7 @@ require_relative "schematic/credits/types/count_credit_event_ledger_response" require_relative "schematic/types/checkout_subscription" require_relative "schematic/checkout/types/checkout_internal_response" +require_relative "schematic/types/credit_currency_price" 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" @@ -211,7 +215,7 @@ 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_credit_grant_view" require_relative "schematic/types/company_plan_with_billing_sub_view" require_relative "schematic/types/comparable_operator" require_relative "schematic/types/condition_type" @@ -385,6 +389,7 @@ 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/plan_issue_response_data" require_relative "schematic/types/skipped_entitlement_error_response_data" require_relative "schematic/types/skipped_entitlement_response_data" require_relative "schematic/types/duplicate_plan_entitlements_response_response_data" @@ -413,7 +418,6 @@ 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" -require_relative "schematic/types/plan_issue_response_data" require_relative "schematic/plans/types/list_plan_issues_response" require_relative "schematic/plans/types/delete_plan_version_params" require_relative "schematic/plans/types/delete_plan_version_response" @@ -435,6 +439,7 @@ require_relative "schematic/types/billing_credit_bundle_view" require_relative "schematic/types/company_plan_invalid_reason" require_relative "schematic/types/custom_plan_config" +require_relative "schematic/types/plan_credit_grant_view" require_relative "schematic/types/company_plan_detail_response_data" require_relative "schematic/types/compatible_plans" require_relative "schematic/types/component_capabilities" @@ -514,9 +519,22 @@ require_relative "schematic/insights/types/get_environment_trait_usage_time_series_params" require_relative "schematic/types/environment_trait_usage_time_series_response_data" require_relative "schematic/insights/types/get_environment_trait_usage_time_series_response" -require_relative "schematic/types/integration_type" +require_relative "schematic/types/integrations_response_data" +require_relative "schematic/integrationsapi/types/run_integration_response" +require_relative "schematic/integrationsapi/types/list_integrations_params" +require_relative "schematic/types/clerk_integration_config" +require_relative "schematic/types/integration_capabilities" +require_relative "schematic/types/orb_integration_config" +require_relative "schematic/types/stripe_integration_config" +require_relative "schematic/types/integration_config" +require_relative "schematic/types/integrations_list_response_data" +require_relative "schematic/integrationsapi/types/list_integrations_response" require_relative "schematic/types/integration_webhook_url_response_data" require_relative "schematic/integrationsapi/types/get_integration_webhook_url_response" +require_relative "schematic/integrationsapi/types/start_data_import_response" +require_relative "schematic/types/integrations_data_set_response_data" +require_relative "schematic/integrationsapi/types/load_sample_data_set_v_2_response" +require_relative "schematic/integrationsapi/types/uninstall_integration_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" @@ -589,11 +607,13 @@ require_relative "schematic/types/capture_raw_event" require_relative "schematic/types/capture_raw_event_batch" require_relative "schematic/types/update_add_on_request_body" +require_relative "schematic/types/update_auto_topup_override_request_body" require_relative "schematic/types/update_credit_bundle_request_body" require_relative "schematic/types/update_pay_in_advance_request_body" require_relative "schematic/types/change_subscription_internal_request_body" require_relative "schematic/types/change_subscription_request_body" require_relative "schematic/types/check_flag_request_body" +require_relative "schematic/types/company_matching_criteria" require_relative "schematic/types/company_membership_response_data" require_relative "schematic/types/component_hydrate_response_data" require_relative "schematic/types/condition_group_response_data" @@ -608,10 +628,10 @@ 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" -require_relative "schematic/types/event_body_track" require_relative "schematic/types/event_body_flag_check" require_relative "schematic/types/event_body_identify_company" require_relative "schematic/types/event_body_identify" +require_relative "schematic/types/event_body_track" require_relative "schematic/types/event_body" require_relative "schematic/types/create_event_request_body" require_relative "schematic/types/create_flag_request_body" @@ -636,6 +656,7 @@ require_relative "schematic/types/flag_view" require_relative "schematic/types/feature_view" require_relative "schematic/types/feature_usage_legacy_response_data" +require_relative "schematic/types/integration_response_data" require_relative "schematic/types/invoice_request_body" require_relative "schematic/types/keys_request_body" require_relative "schematic/types/plan_selection" @@ -829,6 +850,8 @@ require_relative "schematic/insights/types/get_top_features_by_usage_request" require_relative "schematic/insights/types/get_environment_trait_usage_time_series_request" require_relative "schematic/integrationsapi/client" +require_relative "schematic/integrationsapi/types/list_integrations_request" +require_relative "schematic/integrationsapi/types/start_data_import_request_body" 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/billing/client.rb b/lib/schematic/billing/client.rb index e1bd1b7..40ea94a 100644 --- a/lib/schematic/billing/client.rb +++ b/lib/schematic/billing/client.rb @@ -719,6 +719,7 @@ def upsert_billing_product(request_options: {}, **params) # @option params [Schematic::Types::BillingPriceUsageType, nil] :price_usage_type # @option params [Schematic::Types::BillingProviderType, nil] :provider_type # @option params [String, nil] :q + # @option params [Boolean, nil] :recurring_charges_only # @option params [Boolean, nil] :with_one_time_charges # @option params [Boolean, nil] :with_prices_only # @option params [Boolean, nil] :with_zero_price @@ -729,7 +730,7 @@ def upsert_billing_product(request_options: {}, **params) # @return [Schematic::Billing::Types::ListBillingProductsResponse] def list_billing_products(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids is_active name price_usage_type provider_type q with_one_time_charges with_prices_only with_zero_price without_linked_to_plan limit offset] + query_param_names = %i[ids is_active name price_usage_type provider_type q recurring_charges_only with_one_time_charges with_prices_only with_zero_price without_linked_to_plan limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["is_active"] = params[:is_active] if params.key?(:is_active) @@ -737,6 +738,7 @@ def list_billing_products(request_options: {}, **params) query_params["price_usage_type"] = params[:price_usage_type] if params.key?(:price_usage_type) query_params["provider_type"] = params[:provider_type] if params.key?(:provider_type) query_params["q"] = params[:q] if params.key?(:q) + query_params["recurring_charges_only"] = params[:recurring_charges_only] if params.key?(:recurring_charges_only) query_params["with_one_time_charges"] = params[:with_one_time_charges] if params.key?(:with_one_time_charges) query_params["with_prices_only"] = params[:with_prices_only] if params.key?(:with_prices_only) query_params["with_zero_price"] = params[:with_zero_price] if params.key?(:with_zero_price) @@ -779,6 +781,7 @@ def list_billing_products(request_options: {}, **params) # @option params [Schematic::Types::BillingPriceUsageType, nil] :price_usage_type # @option params [Schematic::Types::BillingProviderType, nil] :provider_type # @option params [String, nil] :q + # @option params [Boolean, nil] :recurring_charges_only # @option params [Boolean, nil] :with_one_time_charges # @option params [Boolean, nil] :with_prices_only # @option params [Boolean, nil] :with_zero_price @@ -789,7 +792,7 @@ def list_billing_products(request_options: {}, **params) # @return [Schematic::Billing::Types::CountBillingProductsResponse] def count_billing_products(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids is_active name price_usage_type provider_type q with_one_time_charges with_prices_only with_zero_price without_linked_to_plan limit offset] + query_param_names = %i[ids is_active name price_usage_type provider_type q recurring_charges_only with_one_time_charges with_prices_only with_zero_price without_linked_to_plan limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["is_active"] = params[:is_active] if params.key?(:is_active) @@ -797,6 +800,7 @@ def count_billing_products(request_options: {}, **params) query_params["price_usage_type"] = params[:price_usage_type] if params.key?(:price_usage_type) query_params["provider_type"] = params[:provider_type] if params.key?(:provider_type) query_params["q"] = params[:q] if params.key?(:q) + query_params["recurring_charges_only"] = params[:recurring_charges_only] if params.key?(:recurring_charges_only) query_params["with_one_time_charges"] = params[:with_one_time_charges] if params.key?(:with_one_time_charges) query_params["with_prices_only"] = params[:with_prices_only] if params.key?(:with_prices_only) query_params["with_zero_price"] = params[:with_zero_price] if params.key?(:with_zero_price) diff --git a/lib/schematic/billing/types/count_billing_products_params.rb b/lib/schematic/billing/types/count_billing_products_params.rb index 539bf7b..d135476 100644 --- a/lib/schematic/billing/types/count_billing_products_params.rb +++ b/lib/schematic/billing/types/count_billing_products_params.rb @@ -13,6 +13,7 @@ class CountBillingProductsParams < Internal::Types::Model field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/schematic/billing/types/count_billing_products_request.rb b/lib/schematic/billing/types/count_billing_products_request.rb index 18a762c..04c413d 100644 --- a/lib/schematic/billing/types/count_billing_products_request.rb +++ b/lib/schematic/billing/types/count_billing_products_request.rb @@ -10,6 +10,7 @@ class CountBillingProductsRequest < Internal::Types::Model field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/schematic/billing/types/list_billing_products_params.rb b/lib/schematic/billing/types/list_billing_products_params.rb index d0755a4..de3e746 100644 --- a/lib/schematic/billing/types/list_billing_products_params.rb +++ b/lib/schematic/billing/types/list_billing_products_params.rb @@ -13,6 +13,7 @@ class ListBillingProductsParams < Internal::Types::Model field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/schematic/billing/types/list_billing_products_request.rb b/lib/schematic/billing/types/list_billing_products_request.rb index 7baf546..b217b1b 100644 --- a/lib/schematic/billing/types/list_billing_products_request.rb +++ b/lib/schematic/billing/types/list_billing_products_request.rb @@ -10,6 +10,7 @@ class ListBillingProductsRequest < Internal::Types::Model field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/schematic/credits/client.rb b/lib/schematic/credits/client.rb index df745fe..598997c 100644 --- a/lib/schematic/credits/client.rb +++ b/lib/schematic/credits/client.rb @@ -863,19 +863,21 @@ def count_credit_ledger(request_options: {}, **params) # @option params [String, nil] :plan_id # @option params [String, nil] :plan_ids # @option params [String, nil] :plan_version_id + # @option params [String, nil] :plan_version_ids # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # # @return [Schematic::Credits::Types::ListBillingPlanCreditGrantsResponse] def list_billing_plan_credit_grants(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id limit offset] + query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id plan_version_ids limit offset] query_params = {} query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids) query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) + query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) params.except(*query_param_names) @@ -1049,19 +1051,21 @@ def delete_billing_plan_credit_grant(request_options: {}, **params) # @option params [String, nil] :plan_id # @option params [String, nil] :plan_ids # @option params [String, nil] :plan_version_id + # @option params [String, nil] :plan_version_ids # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # # @return [Schematic::Credits::Types::CountBillingPlanCreditGrantsResponse] def count_billing_plan_credit_grants(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id limit offset] + query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id plan_version_ids limit offset] query_params = {} query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids) query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) + query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids) 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/credits/types/count_billing_plan_credit_grants_params.rb b/lib/schematic/credits/types/count_billing_plan_credit_grants_params.rb index 260d56a..d336b22 100644 --- a/lib/schematic/credits/types/count_billing_plan_credit_grants_params.rb +++ b/lib/schematic/credits/types/count_billing_plan_credit_grants_params.rb @@ -12,6 +12,7 @@ class CountBillingPlanCreditGrantsParams < Internal::Types::Model field :plan_id, -> { String }, optional: true, nullable: false field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false end end end diff --git a/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb b/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb index 027d318..1029e66 100644 --- a/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb +++ b/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb @@ -9,6 +9,7 @@ class CountBillingPlanCreditGrantsRequest < Internal::Types::Model field :plan_id, -> { String }, optional: true, nullable: false field :plan_ids, -> { String }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false end diff --git a/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb b/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb index 54d47d8..f06137b 100644 --- a/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb +++ b/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb @@ -12,6 +12,7 @@ class ListBillingPlanCreditGrantsParams < Internal::Types::Model field :plan_id, -> { String }, optional: true, nullable: false field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false end end end diff --git a/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb b/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb index b101e52..ae2c3a3 100644 --- a/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb +++ b/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb @@ -9,6 +9,7 @@ class ListBillingPlanCreditGrantsRequest < Internal::Types::Model field :plan_id, -> { String }, optional: true, nullable: false field :plan_ids, -> { String }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false end diff --git a/lib/schematic/events/client.rb b/lib/schematic/events/client.rb index 47d53fd..a00b92a 100644 --- a/lib/schematic/events/client.rb +++ b/lib/schematic/events/client.rb @@ -97,6 +97,7 @@ def get_event_summaries(request_options: {}, **params) # @option params [String, nil] :event_subtype # @option params [Schematic::Types::EventType, nil] :event_types # @option params [String, nil] :flag_id + # @option params [String, nil] :idempotency_key # @option params [String, nil] :user_id # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset @@ -104,12 +105,13 @@ def get_event_summaries(request_options: {}, **params) # @return [Schematic::Events::Types::ListEventsResponse] def list_events(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id event_subtype event_types flag_id user_id limit offset] + query_param_names = %i[company_id event_subtype event_types flag_id idempotency_key user_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["event_subtype"] = params[:event_subtype] if params.key?(:event_subtype) query_params["event_types"] = params[:event_types] if params.key?(:event_types) query_params["flag_id"] = params[:flag_id] if params.key?(:flag_id) + query_params["idempotency_key"] = params[:idempotency_key] if params.key?(:idempotency_key) query_params["user_id"] = params[:user_id] if params.key?(:user_id) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) diff --git a/lib/schematic/events/types/list_events_params.rb b/lib/schematic/events/types/list_events_params.rb index 49b54cd..4a42e00 100644 --- a/lib/schematic/events/types/list_events_params.rb +++ b/lib/schematic/events/types/list_events_params.rb @@ -9,6 +9,7 @@ class ListEventsParams < Internal::Types::Model field :event_subtype, -> { String }, optional: true, nullable: false field :event_types, -> { Internal::Types::Array[Schematic::Types::EventType] }, optional: true, nullable: false field :flag_id, -> { String }, optional: true, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false field :user_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/events/types/list_events_request.rb b/lib/schematic/events/types/list_events_request.rb index 0db0460..7bb40cc 100644 --- a/lib/schematic/events/types/list_events_request.rb +++ b/lib/schematic/events/types/list_events_request.rb @@ -8,6 +8,7 @@ class ListEventsRequest < Internal::Types::Model field :event_subtype, -> { String }, optional: true, nullable: false field :event_types, -> { Schematic::Types::EventType }, optional: true, nullable: false field :flag_id, -> { String }, optional: true, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false field :user_id, -> { String }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/features/client.rb b/lib/schematic/features/client.rb index 94dbfb6..026d46e 100644 --- a/lib/schematic/features/client.rb +++ b/lib/schematic/features/client.rb @@ -20,6 +20,7 @@ def initialize(client:) # @option params [Boolean, nil] :boolean_require_event # @option params [Schematic::Types::FeatureType, nil] :feature_type # @option params [String, nil] :ids + # @option params [Schematic::Types::BillingProviderType, nil] :managed_by # @option params [String, nil] :plan_version_id # @option params [String, nil] :q # @option params [String, nil] :without_company_override_for @@ -30,11 +31,12 @@ def initialize(client:) # @return [Schematic::Features::Types::ListFeaturesResponse] def list_features(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - 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_param_names = %i[boolean_require_event feature_type ids managed_by plan_version_id q without_company_override_for without_plan_entitlement_for limit offset] 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["managed_by"] = params[:managed_by] if params.key?(:managed_by) 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) @@ -239,6 +241,7 @@ def upsert_feature_for_billing_product(request_options: {}, **params) # @option params [Boolean, nil] :boolean_require_event # @option params [Schematic::Types::FeatureType, nil] :feature_type # @option params [String, nil] :ids + # @option params [Schematic::Types::BillingProviderType, nil] :managed_by # @option params [String, nil] :plan_version_id # @option params [String, nil] :q # @option params [String, nil] :without_company_override_for @@ -249,11 +252,12 @@ def upsert_feature_for_billing_product(request_options: {}, **params) # @return [Schematic::Features::Types::CountFeaturesResponse] def count_features(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - 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_param_names = %i[boolean_require_event feature_type ids managed_by plan_version_id q without_company_override_for without_plan_entitlement_for limit offset] 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["managed_by"] = params[:managed_by] if params.key?(:managed_by) 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) diff --git a/lib/schematic/features/types/count_features_params.rb b/lib/schematic/features/types/count_features_params.rb index 35c0e8f..4228239 100644 --- a/lib/schematic/features/types/count_features_params.rb +++ b/lib/schematic/features/types/count_features_params.rb @@ -9,6 +9,7 @@ class CountFeaturesParams < Internal::Types::Model field :feature_type, -> { Internal::Types::Array[Schematic::Types::FeatureType] }, optional: true, nullable: false field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/features/types/count_features_request.rb b/lib/schematic/features/types/count_features_request.rb index df18fe9..b6cd878 100644 --- a/lib/schematic/features/types/count_features_request.rb +++ b/lib/schematic/features/types/count_features_request.rb @@ -7,6 +7,7 @@ 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 :managed_by, -> { Schematic::Types::BillingProviderType }, 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 diff --git a/lib/schematic/features/types/list_features_params.rb b/lib/schematic/features/types/list_features_params.rb index ff03d30..d574734 100644 --- a/lib/schematic/features/types/list_features_params.rb +++ b/lib/schematic/features/types/list_features_params.rb @@ -9,6 +9,7 @@ class ListFeaturesParams < Internal::Types::Model field :feature_type, -> { Internal::Types::Array[Schematic::Types::FeatureType] }, optional: true, nullable: false field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false field :q, -> { 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 f5427c9..1829293 100644 --- a/lib/schematic/features/types/list_features_request.rb +++ b/lib/schematic/features/types/list_features_request.rb @@ -7,6 +7,7 @@ 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 :managed_by, -> { Schematic::Types::BillingProviderType }, 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 diff --git a/lib/schematic/integrationsapi/client.rb b/lib/schematic/integrationsapi/client.rb index 0db678c..bd26243 100644 --- a/lib/schematic/integrationsapi/client.rb +++ b/lib/schematic/integrationsapi/client.rb @@ -10,6 +10,88 @@ 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] :integration_id + # + # @return [Schematic::Integrationsapi::Types::RunIntegrationResponse] + def run_integration(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: "integration/start/#{URI.encode_uri_component(params[:integration_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::Integrationsapi::Types::RunIntegrationResponse.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 [Boolean, nil] :billing_only + # @option params [String, nil] :exclude_ids + # @option params [String, nil] :id + # @option params [Schematic::Types::IntegrationState, nil] :state + # @option params [Schematic::Types::IntegrationType, nil] :type + # @option params [Integer, nil] :limit + # @option params [Integer, nil] :offset + # + # @return [Schematic::Integrationsapi::Types::ListIntegrationsResponse] + def list_integrations(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[billing_only exclude_ids id state type limit offset] + query_params = {} + query_params["billing_only"] = params[:billing_only] if params.key?(:billing_only) + query_params["exclude_ids"] = params[:exclude_ids] if params.key?(:exclude_ids) + query_params["id"] = params[:id] if params.key?(:id) + query_params["state"] = params[:state] if params.key?(:state) + query_params["type"] = params[:type] if params.key?(:type) + 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: "integrations", + 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::Integrationsapi::Types::ListIntegrationsResponse.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 @@ -41,6 +123,101 @@ def get_integration_webhook_url(request_options: {}, **params) raise error_class.new(response.body, code: code) end end + + # @param request_options [Hash] + # @param params [Schematic::Integrationsapi::Types::StartDataImportRequestBody] + # @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::Integrationsapi::Types::StartDataImportResponse] + def start_data_import(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: "integrations/start-data-import", + body: Schematic::Integrationsapi::Types::StartDataImportRequestBody.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::Integrationsapi::Types::StartDataImportResponse.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 + # + # @return [Schematic::Integrationsapi::Types::LoadSampleDataSetV2Response] + def load_sample_data_set_v_2(request_options: {}, **params) + Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "integrations/stripe/dataset-sample-v2", + 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::LoadSampleDataSetV2Response.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] :integration_id + # + # @return [Schematic::Integrationsapi::Types::UninstallIntegrationResponse] + def uninstall_integration(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: "integrations/uninstall/#{URI.encode_uri_component(params[:integration_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::Integrationsapi::Types::UninstallIntegrationResponse.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/list_integrations_params.rb b/lib/schematic/integrationsapi/types/list_integrations_params.rb new file mode 100644 index 0000000..2441e33 --- /dev/null +++ b/lib/schematic/integrationsapi/types/list_integrations_params.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + module Types + # Input parameters + class ListIntegrationsParams < Internal::Types::Model + field :billing_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :exclude_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: true, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/integrationsapi/types/list_integrations_request.rb b/lib/schematic/integrationsapi/types/list_integrations_request.rb new file mode 100644 index 0000000..135973b --- /dev/null +++ b/lib/schematic/integrationsapi/types/list_integrations_request.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + module Types + class ListIntegrationsRequest < Internal::Types::Model + field :billing_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :exclude_ids, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: true, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, 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/integrationsapi/types/list_integrations_response.rb b/lib/schematic/integrationsapi/types/list_integrations_response.rb new file mode 100644 index 0000000..7d8f5f5 --- /dev/null +++ b/lib/schematic/integrationsapi/types/list_integrations_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + module Types + class ListIntegrationsResponse < Internal::Types::Model + field :data, -> { Internal::Types::Array[Schematic::Types::IntegrationsListResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Integrationsapi::Types::ListIntegrationsParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/integrationsapi/types/load_sample_data_set_v_2_response.rb b/lib/schematic/integrationsapi/types/load_sample_data_set_v_2_response.rb new file mode 100644 index 0000000..8891e48 --- /dev/null +++ b/lib/schematic/integrationsapi/types/load_sample_data_set_v_2_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + module Types + class LoadSampleDataSetV2Response < Internal::Types::Model + field :data, -> { Schematic::Types::IntegrationsDataSetResponseData }, 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/types/run_integration_response.rb b/lib/schematic/integrationsapi/types/run_integration_response.rb new file mode 100644 index 0000000..271cf73 --- /dev/null +++ b/lib/schematic/integrationsapi/types/run_integration_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + module Types + class RunIntegrationResponse < Internal::Types::Model + field :data, -> { Schematic::Types::IntegrationsResponseData }, 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/types/start_data_import_request_body.rb b/lib/schematic/integrationsapi/types/start_data_import_request_body.rb new file mode 100644 index 0000000..e6af8e9 --- /dev/null +++ b/lib/schematic/integrationsapi/types/start_data_import_request_body.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + module Types + class StartDataImportRequestBody < Internal::Types::Model + field :company_matching_criteria, -> { Schematic::Types::CompanyMatchingCriteria }, optional: true, nullable: false + field :company_matching_field, -> { String }, optional: true, nullable: false + field :integration_id, -> { String }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/integrationsapi/types/start_data_import_response.rb b/lib/schematic/integrationsapi/types/start_data_import_response.rb new file mode 100644 index 0000000..2a3a25b --- /dev/null +++ b/lib/schematic/integrationsapi/types/start_data_import_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + module Types + class StartDataImportResponse < Internal::Types::Model + field :data, -> { Schematic::Types::IntegrationsResponseData }, 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/types/uninstall_integration_response.rb b/lib/schematic/integrationsapi/types/uninstall_integration_response.rb new file mode 100644 index 0000000..d5dfce0 --- /dev/null +++ b/lib/schematic/integrationsapi/types/uninstall_integration_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Integrationsapi + module Types + class UninstallIntegrationResponse < Internal::Types::Model + field :data, -> { Schematic::Types::DeleteResponse }, 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 cb2de78..d2db699 100644 --- a/lib/schematic/plans/client.rb +++ b/lib/schematic/plans/client.rb @@ -172,6 +172,7 @@ def create_custom_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] :company_scoped_only # @option params [Boolean, nil] :exclude_company_scoped # @option params [Boolean, nil] :for_fallback_plan # @option params [Boolean, nil] :for_initial_plan @@ -190,9 +191,10 @@ def create_custom_plan(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 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_param_names = %i[company_id company_scoped_only 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["company_scoped_only"] = params[:company_scoped_only] if params.key?(:company_scoped_only) 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) @@ -527,6 +529,7 @@ def count_billing_product_match_companies(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] :company_scoped_only # @option params [Boolean, nil] :exclude_company_scoped # @option params [Boolean, nil] :for_fallback_plan # @option params [Boolean, nil] :for_initial_plan @@ -545,9 +548,10 @@ def count_billing_product_match_companies(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 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_param_names = %i[company_id company_scoped_only 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["company_scoped_only"] = params[:company_scoped_only] if params.key?(:company_scoped_only) 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) diff --git a/lib/schematic/plans/types/count_plans_params.rb b/lib/schematic/plans/types/count_plans_params.rb index a15282e..d07dcb2 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 :company_scoped_only, -> { Internal::Types::Boolean }, 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 diff --git a/lib/schematic/plans/types/count_plans_request.rb b/lib/schematic/plans/types/count_plans_request.rb index b69d116..ade2ee1 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 :company_scoped_only, -> { Internal::Types::Boolean }, 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 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 index 3b2c584..d9fa9c3 100644 --- a/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb +++ b/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb @@ -7,6 +7,7 @@ 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 :external_resource_version, -> { 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 diff --git a/lib/schematic/plans/types/list_plans_params.rb b/lib/schematic/plans/types/list_plans_params.rb index 861067e..4a1372b 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 :company_scoped_only, -> { Internal::Types::Boolean }, 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 diff --git a/lib/schematic/plans/types/list_plans_request.rb b/lib/schematic/plans/types/list_plans_request.rb index ef4a0a6..df56a88 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 :company_scoped_only, -> { Internal::Types::Boolean }, 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 diff --git a/lib/schematic/types/api_key_create_response_data.rb b/lib/schematic/types/api_key_create_response_data.rb index 87a0edd..168b3e5 100644 --- a/lib/schematic/types/api_key_create_response_data.rb +++ b/lib/schematic/types/api_key_create_response_data.rb @@ -8,6 +8,7 @@ class ApiKeyCreateResponseData < Internal::Types::Model 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 :integration, -> { Schematic::Types::ApiKeyIntegrationResponseData }, optional: true, nullable: false field :last_used_at, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :readonly, -> { Internal::Types::Boolean }, optional: false, nullable: false diff --git a/lib/schematic/types/api_key_integration_response_data.rb b/lib/schematic/types/api_key_integration_response_data.rb new file mode 100644 index 0000000..059cc1b --- /dev/null +++ b/lib/schematic/types/api_key_integration_response_data.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Types + class ApiKeyIntegrationResponseData < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/api_key_response_data.rb b/lib/schematic/types/api_key_response_data.rb index 358478b..457bf49 100644 --- a/lib/schematic/types/api_key_response_data.rb +++ b/lib/schematic/types/api_key_response_data.rb @@ -8,6 +8,7 @@ class ApiKeyResponseData < Internal::Types::Model 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 :integration, -> { Schematic::Types::ApiKeyIntegrationResponseData }, optional: true, nullable: false field :last_used_at, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :readonly, -> { Internal::Types::Boolean }, optional: false, 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 16cf142..3ccb144 100644 --- a/lib/schematic/types/audit_log_list_response_data.rb +++ b/lib/schematic/types/audit_log_list_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class AuditLogListResponseData < Internal::Types::Model field :actor_type, -> { Schematic::Types::ActorType }, optional: false, nullable: false + field :api_key, -> { Schematic::Types::ApiKeyResponseData }, optional: true, 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 diff --git a/lib/schematic/types/audit_log_response_data.rb b/lib/schematic/types/audit_log_response_data.rb index 1d472a2..5c280a9 100644 --- a/lib/schematic/types/audit_log_response_data.rb +++ b/lib/schematic/types/audit_log_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class AuditLogResponseData < Internal::Types::Model field :actor_type, -> { Schematic::Types::ActorType }, optional: false, nullable: false + field :api_key, -> { Schematic::Types::ApiKeyResponseData }, optional: true, 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 diff --git a/lib/schematic/types/billing_credit_bundle_view.rb b/lib/schematic/types/billing_credit_bundle_view.rb index 9a7ed1c..acb62e3 100644 --- a/lib/schematic/types/billing_credit_bundle_view.rb +++ b/lib/schematic/types/billing_credit_bundle_view.rb @@ -9,7 +9,7 @@ class BillingCreditBundleView < Internal::Types::Model field :credit_icon, -> { String }, optional: true, nullable: false field :credit_id, -> { String }, optional: false, nullable: false field :credit_name, -> { String }, optional: false, nullable: false - field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPrice] }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPrice] }, optional: false, nullable: false field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: false, nullable: false field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: false, nullable: false field :expiry_unit_count, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/types/billing_credit_view.rb b/lib/schematic/types/billing_credit_view.rb index 82b20cf..00f2a7a 100644 --- a/lib/schematic/types/billing_credit_view.rb +++ b/lib/schematic/types/billing_credit_view.rb @@ -7,6 +7,7 @@ class BillingCreditView < Internal::Types::Model field :burn_strategy, -> { Schematic::Types::BillingCreditBurnStrategy }, optional: false, nullable: false field :cost_editable, -> { Internal::Types::Boolean }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditCurrencyPrice] }, optional: false, nullable: false field :default_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: false, nullable: false field :default_expiry_unit_count, -> { Integer }, optional: true, nullable: false field :default_rollover_policy, -> { Schematic::Types::BillingCreditRolloverPolicy }, optional: false, nullable: false 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 32af4d9..22be983 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_self_service, -> { Internal::Types::Boolean }, optional: false, 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 diff --git a/lib/schematic/types/change_subscription_internal_request_body.rb b/lib/schematic/types/change_subscription_internal_request_body.rb index ab75ffb..9877ca0 100644 --- a/lib/schematic/types/change_subscription_internal_request_body.rb +++ b/lib/schematic/types/change_subscription_internal_request_body.rb @@ -4,6 +4,7 @@ module Schematic module Types class ChangeSubscriptionInternalRequestBody < Internal::Types::Model field :add_on_ids, -> { Internal::Types::Array[Schematic::Types::UpdateAddOnRequestBody] }, optional: false, nullable: false + field :auto_topup_overrides, -> { Internal::Types::Array[Schematic::Types::UpdateAutoTopupOverrideRequestBody] }, optional: false, nullable: false field :company_id, -> { String }, optional: false, nullable: false field :coupon_external_id, -> { String }, optional: true, nullable: false field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false diff --git a/lib/schematic/types/change_subscription_request_body.rb b/lib/schematic/types/change_subscription_request_body.rb index 7b2bbd9..265d5a2 100644 --- a/lib/schematic/types/change_subscription_request_body.rb +++ b/lib/schematic/types/change_subscription_request_body.rb @@ -4,6 +4,7 @@ module Schematic module Types class ChangeSubscriptionRequestBody < Internal::Types::Model field :add_on_ids, -> { Internal::Types::Array[Schematic::Types::UpdateAddOnRequestBody] }, optional: false, nullable: false + field :auto_topup_overrides, -> { Internal::Types::Array[Schematic::Types::UpdateAutoTopupOverrideRequestBody] }, optional: false, nullable: false field :coupon_external_id, -> { String }, optional: true, nullable: false field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false field :new_plan_id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/clerk_integration_config.rb b/lib/schematic/types/clerk_integration_config.rb new file mode 100644 index 0000000..4d8713a --- /dev/null +++ b/lib/schematic/types/clerk_integration_config.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Schematic + module Types + class ClerkIntegrationConfig < Internal::Types::Model + field :first_events_received, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :webhook_url, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/company_matching_criteria.rb b/lib/schematic/types/company_matching_criteria.rb new file mode 100644 index 0000000..e5258a3 --- /dev/null +++ b/lib/schematic/types/company_matching_criteria.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module CompanyMatchingCriteria + extend Schematic::Internal::Types::Enum + + BILLING_META_OBJECT = "billing_meta_object" + MANUAL_UPSERT = "manual_upsert" + end + end +end diff --git a/lib/schematic/types/company_plan_credit_grant_view.rb b/lib/schematic/types/company_plan_credit_grant_view.rb new file mode 100644 index 0000000..33cf849 --- /dev/null +++ b/lib/schematic/types/company_plan_credit_grant_view.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CompanyPlanCreditGrantView < Internal::Types::Model + field :billing_credit_auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :billing_credit_auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :billing_credit_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + 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_self_service, -> { Internal::Types::Boolean }, optional: false, 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 :company_auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :company_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :company_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit, -> { Schematic::Types::BillingCreditView }, optional: true, nullable: false + field :credit_amount, -> { Integer }, optional: false, nullable: false + field :credit_description, -> { String }, optional: false, nullable: false + field :credit_icon, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :plan, -> { Schematic::Types::GenericPreviewObject }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false + field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false + field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: false, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/company_plan_with_billing_sub_view.rb b/lib/schematic/types/company_plan_with_billing_sub_view.rb index 9c06a51..77da110 100644 --- a/lib/schematic/types/company_plan_with_billing_sub_view.rb +++ b/lib/schematic/types/company_plan_with_billing_sub_view.rb @@ -9,7 +9,7 @@ class CompanyPlanWithBillingSubView < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :image_url, -> { String }, optional: true, nullable: false - field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantView] }, optional: false, nullable: false + field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::CompanyPlanCreditGrantView] }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false field :plan_period, -> { String }, optional: true, nullable: false field :plan_price, -> { Integer }, optional: true, 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 22d67d1..2841425 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_self_service, -> { Internal::Types::Boolean }, 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 diff --git a/lib/schematic/types/create_event_request_body.rb b/lib/schematic/types/create_event_request_body.rb index 9dfbecf..7eacfb9 100644 --- a/lib/schematic/types/create_event_request_body.rb +++ b/lib/schematic/types/create_event_request_body.rb @@ -5,6 +5,7 @@ module Types class CreateEventRequestBody < Internal::Types::Model field :body, -> { Schematic::Types::EventBody }, optional: true, nullable: false field :event_type, -> { Schematic::Types::EventType }, optional: false, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false field :sent_at, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_currency_price.rb b/lib/schematic/types/credit_currency_price.rb new file mode 100644 index 0000000..c2c43e6 --- /dev/null +++ b/lib/schematic/types/credit_currency_price.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CreditCurrencyPrice < Internal::Types::Model + field :currency, -> { String }, optional: false, nullable: false + field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/data_event_payload.rb b/lib/schematic/types/data_event_payload.rb index 90c5f07..e2913d5 100644 --- a/lib/schematic/types/data_event_payload.rb +++ b/lib/schematic/types/data_event_payload.rb @@ -5,6 +5,7 @@ module Types class DataEventPayload < Internal::Types::Model field :api_key, -> { String }, optional: false, nullable: false field :body, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false field :sent_at, -> { String }, optional: true, nullable: false field :type, -> { Schematic::Types::EventType }, optional: false, nullable: false end diff --git a/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb b/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb index f88bbd7..7d58721 100644 --- a/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb +++ b/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class DuplicatePlanEntitlementsResponseResponseData < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: false, nullable: false + field :issues, -> { Internal::Types::Array[Schematic::Types::PlanIssueResponseData] }, optional: false, nullable: false field :skipped, -> { Internal::Types::Array[Schematic::Types::SkippedEntitlementResponseData] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/event_detail_response_data.rb b/lib/schematic/types/event_detail_response_data.rb index f7b69fd..b627b65 100644 --- a/lib/schematic/types/event_detail_response_data.rb +++ b/lib/schematic/types/event_detail_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class EventDetailResponseData < Internal::Types::Model field :api_key, -> { String }, optional: true, nullable: false + field :api_key_view, -> { Schematic::Types::ApiKeyResponseData }, optional: true, nullable: false field :body, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false field :body_preview, -> { String }, optional: false, nullable: false field :captured_at, -> { String }, optional: false, nullable: false @@ -15,6 +16,7 @@ class EventDetailResponseData < Internal::Types::Model field :feature_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :features, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false field :loaded_at, -> { String }, optional: true, nullable: false field :processed_at, -> { String }, optional: true, nullable: false field :quantity, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/event_response_data.rb b/lib/schematic/types/event_response_data.rb index a684c1f..8bdda1a 100644 --- a/lib/schematic/types/event_response_data.rb +++ b/lib/schematic/types/event_response_data.rb @@ -13,6 +13,7 @@ class EventResponseData < Internal::Types::Model field :error_message, -> { String }, optional: true, nullable: false field :feature_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false field :loaded_at, -> { String }, optional: true, nullable: false field :processed_at, -> { String }, optional: true, nullable: false field :quantity, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/integration_capabilities.rb b/lib/schematic/types/integration_capabilities.rb new file mode 100644 index 0000000..bd78cf0 --- /dev/null +++ b/lib/schematic/types/integration_capabilities.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Types + class IntegrationCapabilities < Internal::Types::Model + field :author_plans, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :edit_billing, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/integration_config.rb b/lib/schematic/types/integration_config.rb new file mode 100644 index 0000000..9f27edf --- /dev/null +++ b/lib/schematic/types/integration_config.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Types + class IntegrationConfig < Internal::Types::Model + extend Schematic::Internal::Types::Union + + discriminant :type + + member -> { Schematic::Types::ClerkIntegrationConfig }, key: "CLERK" + member -> { Schematic::Types::OrbIntegrationConfig }, key: "ORB" + member -> { Schematic::Types::StripeIntegrationConfig }, key: "STRIPE" + end + end +end diff --git a/lib/schematic/types/integration_response_data.rb b/lib/schematic/types/integration_response_data.rb new file mode 100644 index 0000000..05d4f8c --- /dev/null +++ b/lib/schematic/types/integration_response_data.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + class IntegrationResponseData < Internal::Types::Model + field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/integration_state.rb b/lib/schematic/types/integration_state.rb new file mode 100644 index 0000000..1a00de8 --- /dev/null +++ b/lib/schematic/types/integration_state.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + module IntegrationState + extend Schematic::Internal::Types::Enum + + ACTIVE = "active" + CREATED = "created" + PENDING = "pending" + end + end +end diff --git a/lib/schematic/types/integrations_data_set_response_data.rb b/lib/schematic/types/integrations_data_set_response_data.rb new file mode 100644 index 0000000..1e589b7 --- /dev/null +++ b/lib/schematic/types/integrations_data_set_response_data.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Schematic + module Types + class IntegrationsDataSetResponseData < Internal::Types::Model + field :keys, -> { Internal::Types::Array[String] }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/integrations_list_response_data.rb b/lib/schematic/types/integrations_list_response_data.rb new file mode 100644 index 0000000..d58d58d --- /dev/null +++ b/lib/schematic/types/integrations_list_response_data.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Types + class IntegrationsListResponseData < Internal::Types::Model + field :capabilities, -> { Schematic::Types::IntegrationCapabilities }, optional: false, nullable: false + field :config, -> { Schematic::Types::IntegrationConfig }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :is_app_install, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_connect_install, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/integrations_response_data.rb b/lib/schematic/types/integrations_response_data.rb new file mode 100644 index 0000000..06a62f9 --- /dev/null +++ b/lib/schematic/types/integrations_response_data.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + class IntegrationsResponseData < Internal::Types::Model + field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/orb_integration_config.rb b/lib/schematic/types/orb_integration_config.rb new file mode 100644 index 0000000..f6399b3 --- /dev/null +++ b/lib/schematic/types/orb_integration_config.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Schematic + module Types + class OrbIntegrationConfig < Internal::Types::Model + field :external_customer_id_key, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/plan_credit_grant_view.rb b/lib/schematic/types/plan_credit_grant_view.rb index 336934c..74d979c 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_self_service, -> { Internal::Types::Boolean }, optional: false, 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 diff --git a/lib/schematic/types/rules_engine_schema_version.rb b/lib/schematic/types/rules_engine_schema_version.rb index 574402b..3b67ae6 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 - VF_05_BF_5_DA = "vf05bf5da" + V_97288_F_60 = "v97288f60" PLACEHOLDER_FOR_FERN_COMPATIBILITY = "placeholder-for-fern-compatibility" end end diff --git a/lib/schematic/types/stripe_integration_config.rb b/lib/schematic/types/stripe_integration_config.rb new file mode 100644 index 0000000..adf746d --- /dev/null +++ b/lib/schematic/types/stripe_integration_config.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Types + class StripeIntegrationConfig < Internal::Types::Model + field :account_id, -> { String }, optional: true, nullable: false + field :account_name, -> { String }, optional: true, nullable: false + field :company_update_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :is_sandbox, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :live_mode, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :onboard_url, -> { String }, optional: true, nullable: false + field :version, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/update_auto_topup_override_request_body.rb b/lib/schematic/types/update_auto_topup_override_request_body.rb new file mode 100644 index 0000000..87d9aab --- /dev/null +++ b/lib/schematic/types/update_auto_topup_override_request_body.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + class UpdateAutoTopupOverrideRequestBody < Internal::Types::Model + field :auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false + field :plan_credit_grant_id, -> { String }, optional: false, nullable: false + 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 3f3042b..b2d75f2 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_self_service, -> { Internal::Types::Boolean }, 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 diff --git a/reference.md b/reference.md index 8882a71..d7d3ef4 100644 --- a/reference.md +++ b/reference.md @@ -2984,6 +2984,7 @@ client.billing.list_billing_products( price_usage_type: "licensed", provider_type: "orb", q: "q", + recurring_charges_only: true, with_one_time_charges: true, with_prices_only: true, with_zero_price: true, @@ -3053,6 +3054,14 @@ client.billing.list_billing_products(
+**recurring_charges_only:** `Internal::Types::Boolean` — Filter to products that have at least one recurring price + +
+
+ +
+
+ **with_one_time_charges:** `Internal::Types::Boolean` — Filter products that are one time charges
@@ -3133,6 +3142,7 @@ client.billing.count_billing_products( price_usage_type: "licensed", provider_type: "orb", q: "q", + recurring_charges_only: true, with_one_time_charges: true, with_prices_only: true, with_zero_price: true, @@ -3202,6 +3212,14 @@ client.billing.count_billing_products(
+**recurring_charges_only:** `Internal::Types::Boolean` — Filter to products that have at least one recurring price + +
+
+ +
+
+ **with_one_time_charges:** `Internal::Types::Boolean` — Filter products that are one time charges
@@ -5398,6 +5416,7 @@ client.credits.list_billing_plan_credit_grants( plan_id: "plan_id", plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", + plan_version_ids: ["plan_version_ids"], limit: 1000000, offset: 1000000 ) @@ -5455,6 +5474,14 @@ client.credits.list_billing_plan_credit_grants(
+**plan_version_ids:** `String` + +
+
+ +
+
+ **limit:** `Integer` — Page limit (default 100)
@@ -5723,6 +5750,7 @@ client.credits.count_billing_plan_credit_grants( plan_id: "plan_id", plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", + plan_version_ids: ["plan_version_ids"], limit: 1000000, offset: 1000000 ) @@ -5780,6 +5808,14 @@ client.credits.count_billing_plan_credit_grants(
+**plan_version_ids:** `String` + +
+
+ +
+
+ **limit:** `Integer` — Page limit (default 100)
@@ -6053,6 +6089,9 @@ client.checkout.internal( add_on_id: "add_on_id", price_id: "price_id" }], + auto_topup_overrides: [{ + plan_credit_grant_id: "plan_credit_grant_id" + }], company_id: "company_id", credit_bundles: [{ bundle_id: "bundle_id", @@ -6174,6 +6213,9 @@ client.checkout.preview_checkout_internal( add_on_id: "add_on_id", price_id: "price_id" }], + auto_topup_overrides: [{ + plan_credit_grant_id: "plan_credit_grant_id" + }], company_id: "company_id", credit_bundles: [{ bundle_id: "bundle_id", @@ -12053,6 +12095,7 @@ client.plans.create_custom_plan( ```ruby client.plans.list_plans( company_id: "company_id", + company_scoped_only: true, exclude_company_scoped: true, for_fallback_plan: true, for_initial_plan: true, @@ -12090,6 +12133,14 @@ client.plans.list_plans(
+**company_scoped_only:** `Internal::Types::Boolean` — Only return plans that are scoped to a company (custom plans assigned to a company) + +
+
+ +
+
+ **exclude_company_scoped:** `Internal::Types::Boolean` — Exclude plans that are scoped to a company (custom plans assigned to a company)
@@ -12550,6 +12601,14 @@ client.plans.upsert_plan_for_billing_product(
+**external_resource_version:** `String` + +
+
+ +
+
+ **icon:** `Schematic::Types::PlanIcon`
@@ -12755,6 +12814,7 @@ client.plans.count_billing_product_match_companies( ```ruby client.plans.count_plans( company_id: "company_id", + company_scoped_only: true, exclude_company_scoped: true, for_fallback_plan: true, for_initial_plan: true, @@ -12792,6 +12852,14 @@ client.plans.count_plans(
+**company_scoped_only:** `Internal::Types::Boolean` — Only return plans that are scoped to a company (custom plans assigned to a company) + +
+
+ +
+
+ **exclude_company_scoped:** `Internal::Types::Boolean` — Exclude plans that are scoped to a company (custom plans assigned to a company)
@@ -13840,6 +13908,7 @@ client.events.list_events( event_subtype: "event_subtype", event_types: ["flag_check"], flag_id: "flag_id", + idempotency_key: "idempotency_key", user_id: "user_id", limit: 1000000, offset: 1000000 @@ -13890,6 +13959,14 @@ client.events.list_events(
+**idempotency_key:** `String` + +
+
+ +
+
+ **user_id:** `String`
@@ -14080,6 +14157,7 @@ client.features.list_features( boolean_require_event: true, feature_type: ["boolean"], ids: ["ids"], + managed_by: "orb", plan_version_id: "plan_version_id", q: "q", without_company_override_for: "without_company_override_for", @@ -14125,6 +14203,14 @@ client.features.list_features(
+**managed_by:** `Schematic::Types::BillingProviderType` — Filter for features managed by a billing provider, or by Schematic (no billing provider) + +
+
+ +
+
+ **plan_version_id:** `String` — Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used
@@ -14716,6 +14802,7 @@ client.features.count_features( boolean_require_event: true, feature_type: ["boolean"], ids: ["ids"], + managed_by: "orb", plan_version_id: "plan_version_id", q: "q", without_company_override_for: "without_company_override_for", @@ -14761,6 +14848,14 @@ client.features.count_features(
+**managed_by:** `Schematic::Types::BillingProviderType` — Filter for features managed by a billing provider, or by Schematic (no billing provider) + +
+
+ +
+
+ **plan_version_id:** `String` — Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used
@@ -15793,6 +15888,158 @@ client.insights.get_environment_trait_usage_time_series( ## integrationsapi +
client.integrationsapi.run_integration(integration_id) -> Schematic::Integrationsapi::Types::RunIntegrationResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.integrationsapi.run_integration(integration_id: "integration_id") +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**integration_id:** `String` — integration_id + +
+
+ +
+
+ +**request_options:** `Schematic::Integrationsapi::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.integrationsapi.list_integrations() -> Schematic::Integrationsapi::Types::ListIntegrationsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.integrationsapi.list_integrations( + billing_only: true, + exclude_ids: ["exclude_ids"], + id: "id", + state: "active", + type: "clerk", + limit: 1000000, + offset: 1000000 +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**billing_only:** `Internal::Types::Boolean` + +
+
+ +
+
+ +**exclude_ids:** `String` + +
+
+ +
+
+ +**id:** `String` + +
+
+ +
+
+ +**state:** `Schematic::Types::IntegrationState` + +
+
+ +
+
+ +**type:** `Schematic::Types::IntegrationType` + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `Integer` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `Schematic::Integrationsapi::RequestOptions` + +
+
+
+
+ + +
+
+
+
client.integrationsapi.get_integration_webhook_url(type) -> Schematic::Integrationsapi::Types::GetIntegrationWebhookUrlResponse
@@ -15837,6 +16084,158 @@ client.integrationsapi.get_integration_webhook_url(type: "type")
+ +
+ + +
client.integrationsapi.start_data_import(request) -> Schematic::Integrationsapi::Types::StartDataImportResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.integrationsapi.start_data_import(integration_id: "integration_id") +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_matching_criteria:** `Schematic::Types::CompanyMatchingCriteria` + +
+
+ +
+
+ +**company_matching_field:** `String` + +
+
+ +
+
+ +**integration_id:** `String` + +
+
+ +
+
+ +**request_options:** `Schematic::Integrationsapi::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.integrationsapi.load_sample_data_set_v_2() -> Schematic::Integrationsapi::Types::LoadSampleDataSetV2Response +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.integrationsapi.load_sample_data_set_v_2 +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `Schematic::Integrationsapi::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.integrationsapi.uninstall_integration(integration_id) -> Schematic::Integrationsapi::Types::UninstallIntegrationResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.integrationsapi.uninstall_integration(integration_id: "integration_id") +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**integration_id:** `String` — integration_id + +
+
+ +
+
+ +**request_options:** `Schematic::Integrationsapi::RequestOptions` + +
+
+
+
+ +