From 843046d5c4a56237c648f044abb13b55839a7f31 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 10:12:04 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-ruby-sdk: 1.1.13 --- .fern/metadata.json | 4 +- Gemfile.lock | 2 +- lib/schematic.rb | 21 + lib/schematic/accounts/client.rb | 63 +++ .../types/get_onboarding_state_response.rb | 12 + .../update_onboarding_state_request_body.rb | 14 + .../types/update_onboarding_state_response.rb | 12 + lib/schematic/client.rb | 2 +- lib/schematic/companies/client.rb | 112 ++++- .../types/count_entity_traits_params.rb | 15 + .../types/count_entity_traits_request.rb | 14 + .../types/count_entity_traits_response.rb | 12 + ...delete_entity_trait_definition_response.rb | 12 + ..._entity_trait_definition_usage_response.rb | 12 + .../types/list_plan_changes_params.rb | 1 - .../types/list_plan_changes_request.rb | 1 - .../create_credit_bundle_request_body.rb | 1 + ...date_credit_bundle_details_request_body.rb | 1 + lib/schematic/planbundle/client.rb | 6 +- .../types/update_plan_bundle_request_body.rb | 2 +- .../types/create_plan_group_request_body.rb | 2 + .../types/update_plan_group_request_body.rb | 2 + .../types/create_migration_input.rb | 7 +- .../types/preview_migration_request_body.rb | 3 +- lib/schematic/plans/client.rb | 20 +- .../types/delete_plan_version_request.rb | 2 +- .../types/list_custom_plan_billings_params.rb | 1 + .../list_custom_plan_billings_request.rb | 1 + .../publish_plan_version_request_body.rb | 3 +- .../update_company_plans_request_body.rb | 2 +- .../types/billing_collection_method.rb | 12 + .../billing_credit_bundle_response_data.rb | 1 + .../types/billing_credit_bundle_view.rb | 1 + .../billing_credit_grant_response_data.rb | 2 + ...billing_plan_credit_grant_response_data.rb | 1 + .../checkout_bundle_purchase_behavior.rb | 12 + .../types/checkout_settings_response_data.rb | 2 + .../company_billing_checkout_settings.rb | 1 + .../company_feature_usage_export_metadata.rb | 2 + .../types/company_plan_credit_grant_view.rb | 1 + .../types/component_checkout_settings.rb | 2 + ..._billing_plan_credit_grant_request_body.rb | 1 + .../types/credit_company_grant_view.rb | 2 + .../custom_plan_billing_response_data.rb | 2 + .../types/entity_trait_definition_usage.rb | 14 + .../types/get_onboarding_state_resp.rb | 14 + lib/schematic/types/manage_plan_request.rb | 7 + .../types/migration_proration_behavior.rb | 12 + lib/schematic/types/onboarding_milestone.rb | 12 + .../types/onboarding_milestone_view.rb | 12 + lib/schematic/types/onboarding_path.rb | 12 + lib/schematic/types/onboarding_requirement.rb | 16 + .../types/onboarding_requirement_status.rb | 13 + .../types/onboarding_requirement_view.rb | 12 + lib/schematic/types/onboarding_track.rb | 12 + lib/schematic/types/plan_billing_source.rb | 12 + .../types/plan_bundle_response_data.rb | 1 + lib/schematic/types/plan_credit_grant_view.rb | 1 + ...version_migration_preview_response_data.rb | 1 + .../plan_version_migration_response_data.rb | 1 + ...view_subscription_finance_response_data.rb | 1 + ..._billing_plan_credit_grant_request_body.rb | 1 + .../types/upsert_company_request_body.rb | 1 + .../types/upsert_user_request_body.rb | 1 + .../types/upsert_user_sub_request_body.rb | 1 + lib/schematic/types/who_am_i_response_data.rb | 1 + lib/schematic/version.rb | 2 +- reference.md | 407 ++++++++++++++++-- test/rules_engine_clock_test.rb | 75 ---- 69 files changed, 916 insertions(+), 130 deletions(-) create mode 100644 lib/schematic/accounts/types/get_onboarding_state_response.rb create mode 100644 lib/schematic/accounts/types/update_onboarding_state_request_body.rb create mode 100644 lib/schematic/accounts/types/update_onboarding_state_response.rb create mode 100644 lib/schematic/companies/types/count_entity_traits_params.rb create mode 100644 lib/schematic/companies/types/count_entity_traits_request.rb create mode 100644 lib/schematic/companies/types/count_entity_traits_response.rb create mode 100644 lib/schematic/companies/types/delete_entity_trait_definition_response.rb create mode 100644 lib/schematic/companies/types/get_entity_trait_definition_usage_response.rb create mode 100644 lib/schematic/types/billing_collection_method.rb create mode 100644 lib/schematic/types/checkout_bundle_purchase_behavior.rb create mode 100644 lib/schematic/types/entity_trait_definition_usage.rb create mode 100644 lib/schematic/types/get_onboarding_state_resp.rb create mode 100644 lib/schematic/types/migration_proration_behavior.rb create mode 100644 lib/schematic/types/onboarding_milestone.rb create mode 100644 lib/schematic/types/onboarding_milestone_view.rb create mode 100644 lib/schematic/types/onboarding_path.rb create mode 100644 lib/schematic/types/onboarding_requirement.rb create mode 100644 lib/schematic/types/onboarding_requirement_status.rb create mode 100644 lib/schematic/types/onboarding_requirement_view.rb create mode 100644 lib/schematic/types/onboarding_track.rb create mode 100644 lib/schematic/types/plan_billing_source.rb delete mode 100644 test/rules_engine_clock_test.rb diff --git a/.fern/metadata.json b/.fern/metadata.json index d45d34c..f781251 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -13,6 +13,6 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "8cfe954dda14329fc30a4f80b915db0acf608382", - "sdkVersion": "1.4.13" + "originGitCommit": "1ab5d36abb4de887dde605f8b82a71dce464a26b", + "sdkVersion": "1.4.14" } \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 3415e26..7d6589c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - schematichq (1.4.13) + schematichq (1.4.14) wasmtime (>= 19.0) websocket (>= 1.2) diff --git a/lib/schematic.rb b/lib/schematic.rb index 9b3b251..2aca302 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -76,6 +76,16 @@ require_relative "schematic/accounts/types/get_environment_response" require_relative "schematic/accounts/types/update_environment_response" require_relative "schematic/accounts/types/delete_environment_response" +require_relative "schematic/types/onboarding_milestone" +require_relative "schematic/types/onboarding_requirement" +require_relative "schematic/types/onboarding_milestone_view" +require_relative "schematic/types/onboarding_path" +require_relative "schematic/types/onboarding_requirement_status" +require_relative "schematic/types/onboarding_requirement_view" +require_relative "schematic/types/onboarding_track" +require_relative "schematic/types/get_onboarding_state_resp" +require_relative "schematic/accounts/types/get_onboarding_state_response" +require_relative "schematic/accounts/types/update_onboarding_state_response" require_relative "schematic/types/quickstart_resp" require_relative "schematic/accounts/types/quickstart_response" require_relative "schematic/types/who_am_i_response_data" @@ -286,6 +296,7 @@ require_relative "schematic/types/condition_group" require_relative "schematic/types/custom_plan_activation_strategy" require_relative "schematic/types/custom_plan_billing_status" +require_relative "schematic/types/plan_billing_source" require_relative "schematic/types/custom_plan_billing_response_data" require_relative "schematic/types/entity_key_definition_response_data" require_relative "schematic/types/entity_key_detail_response_data" @@ -366,11 +377,16 @@ require_relative "schematic/companies/types/get_or_create_entity_trait_definition_response" require_relative "schematic/companies/types/get_entity_trait_definition_response" require_relative "schematic/companies/types/update_entity_trait_definition_response" +require_relative "schematic/companies/types/delete_entity_trait_definition_response" +require_relative "schematic/types/entity_trait_definition_usage" +require_relative "schematic/companies/types/get_entity_trait_definition_usage_response" require_relative "schematic/companies/types/count_entity_trait_definitions_params" require_relative "schematic/companies/types/count_entity_trait_definitions_response" require_relative "schematic/companies/types/get_entity_trait_values_params" require_relative "schematic/types/entity_trait_value" require_relative "schematic/companies/types/get_entity_trait_values_response" +require_relative "schematic/companies/types/count_entity_traits_params" +require_relative "schematic/companies/types/count_entity_traits_response" require_relative "schematic/types/plan_change_action" require_relative "schematic/types/plan_change_base_plan_action" require_relative "schematic/companies/types/list_plan_changes_params" @@ -503,6 +519,7 @@ require_relative "schematic/types/billing_product_price_response_data" require_relative "schematic/types/credit_bundle_currency_price" require_relative "schematic/types/billing_credit_bundle_view" +require_relative "schematic/types/checkout_bundle_purchase_behavior" require_relative "schematic/types/company_plan_invalid_reason" require_relative "schematic/types/custom_plan_config" require_relative "schematic/types/plan_credit_grant_view" @@ -656,6 +673,7 @@ require_relative "schematic/planmigrations/types/count_company_migrations_response" require_relative "schematic/types/plan_version_migration_status" require_relative "schematic/planmigrations/types/list_migrations_params" +require_relative "schematic/types/migration_proration_behavior" require_relative "schematic/types/plan_version_migration_strategy" require_relative "schematic/types/plan_version_migration_response_data" require_relative "schematic/planmigrations/types/list_migrations_response" @@ -703,6 +721,7 @@ require_relative "schematic/webhooks/types/count_webhooks_params" require_relative "schematic/webhooks/types/count_webhooks_response" require_relative "schematic/types/api_error" +require_relative "schematic/types/billing_collection_method" require_relative "schematic/types/billing_product_pricing" require_relative "schematic/types/billing_subscription_discount" require_relative "schematic/types/capture_raw_event" @@ -839,6 +858,7 @@ require_relative "schematic/accounts/types/list_environments_request" require_relative "schematic/accounts/types/create_environment_request_body" require_relative "schematic/accounts/types/update_environment_request_body" +require_relative "schematic/accounts/types/update_onboarding_state_request_body" require_relative "schematic/billing/client" require_relative "schematic/billing/types/list_coupons_request" require_relative "schematic/billing/types/create_coupon_request_body" @@ -909,6 +929,7 @@ require_relative "schematic/companies/types/update_entity_trait_definition_request_body" require_relative "schematic/companies/types/count_entity_trait_definitions_request" require_relative "schematic/companies/types/get_entity_trait_values_request" +require_relative "schematic/companies/types/count_entity_traits_request" require_relative "schematic/companies/types/list_plan_changes_request" require_relative "schematic/companies/types/list_plan_traits_request" require_relative "schematic/companies/types/update_plan_trait_bulk_request_body" diff --git a/lib/schematic/accounts/client.rb b/lib/schematic/accounts/client.rb index 5bd8384..03efa4f 100644 --- a/lib/schematic/accounts/client.rb +++ b/lib/schematic/accounts/client.rb @@ -662,6 +662,69 @@ def delete_environment(request_options: {}, **params) 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::Accounts::Types::GetOnboardingStateResponse] + def get_onboarding_state(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: "onboarding-state", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Accounts::Types::GetOnboardingStateResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @param request_options [Hash] + # @param params [Schematic::Accounts::Types::UpdateOnboardingStateRequestBody] + # @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::Accounts::Types::UpdateOnboardingStateResponse] + def update_onboarding_state(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: "onboarding-state", + body: Schematic::Accounts::Types::UpdateOnboardingStateRequestBody.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::Accounts::Types::UpdateOnboardingStateResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url diff --git a/lib/schematic/accounts/types/get_onboarding_state_response.rb b/lib/schematic/accounts/types/get_onboarding_state_response.rb new file mode 100644 index 0000000..697638e --- /dev/null +++ b/lib/schematic/accounts/types/get_onboarding_state_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Accounts + module Types + class GetOnboardingStateResponse < Internal::Types::Model + field :data, -> { Schematic::Types::GetOnboardingStateResp }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/accounts/types/update_onboarding_state_request_body.rb b/lib/schematic/accounts/types/update_onboarding_state_request_body.rb new file mode 100644 index 0000000..17909b0 --- /dev/null +++ b/lib/schematic/accounts/types/update_onboarding_state_request_body.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Accounts + module Types + class UpdateOnboardingStateRequestBody < Internal::Types::Model + field :path, -> { Schematic::Types::OnboardingPath }, optional: true, nullable: false + field :pricing_page_url, -> { String }, optional: true, nullable: false + field :track, -> { Schematic::Types::OnboardingTrack }, optional: true, nullable: false + field :website_url, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/accounts/types/update_onboarding_state_response.rb b/lib/schematic/accounts/types/update_onboarding_state_response.rb new file mode 100644 index 0000000..440c5df --- /dev/null +++ b/lib/schematic/accounts/types/update_onboarding_state_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Accounts + module Types + class UpdateOnboardingStateResponse < Internal::Types::Model + field :data, -> { Schematic::Types::GetOnboardingStateResp }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/client.rb b/lib/schematic/client.rb index 3f6f11c..4c9a580 100644 --- a/lib/schematic/client.rb +++ b/lib/schematic/client.rb @@ -10,7 +10,7 @@ def initialize(api_key:, base_url: nil) @raw_client = Schematic::Internal::Http::RawClient.new( base_url: base_url || Schematic::Environment::DEFAULT, headers: { - "User-Agent" => "schematichq/1.4.13", + "User-Agent" => "schematichq/1.4.14", "X-Fern-Language" => "Ruby", "X-Schematic-Api-Key" => api_key.to_s } diff --git a/lib/schematic/companies/client.rb b/lib/schematic/companies/client.rb index 3263dc5..e9479a2 100644 --- a/lib/schematic/companies/client.rb +++ b/lib/schematic/companies/client.rb @@ -954,6 +954,70 @@ def update_entity_trait_definition(request_options: {}, **params) 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] :entity_trait_definition_id + # + # @return [Schematic::Companies::Types::DeleteEntityTraitDefinitionResponse] + def delete_entity_trait_definition(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: "entity-trait-definitions/#{URI.encode_uri_component(params[:entity_trait_definition_id].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Companies::Types::DeleteEntityTraitDefinitionResponse.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] :entity_trait_definition_id + # + # @return [Schematic::Companies::Types::GetEntityTraitDefinitionUsageResponse] + def get_entity_trait_definition_usage(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: "entity-trait-definitions/#{URI.encode_uri_component(params[:entity_trait_definition_id].to_s)}/usage", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Companies::Types::GetEntityTraitDefinitionUsageResponse.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 @@ -1048,6 +1112,50 @@ def get_entity_trait_values(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :definition_id + # @option params [Schematic::Types::EntityType, nil] :entity_type + # @option params [Integer, nil] :limit + # @option params [Integer, nil] :offset + # + # @return [Schematic::Companies::Types::CountEntityTraitsResponse] + def count_entity_traits(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[definition_id entity_type limit offset] + query_params = {} + query_params["definition_id"] = params[:definition_id] if params.key?(:definition_id) + query_params["entity_type"] = params[:entity_type] if params.key?(:entity_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: "entity-traits/count", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Companies::Types::CountEntityTraitsResponse.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 @@ -1059,20 +1167,18 @@ def get_entity_trait_values(request_options: {}, **params) # @option params [Schematic::Types::PlanChangeBasePlanAction, nil] :base_plan_action # @option params [String, nil] :company_id # @option params [String, nil] :company_ids - # @option params [String, nil] :plan_ids # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # # @return [Schematic::Companies::Types::ListPlanChangesResponse] def list_plan_changes(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[action base_plan_action company_id company_ids plan_ids limit offset] + query_param_names = %i[action base_plan_action company_id company_ids limit offset] query_params = {} query_params["action"] = params[:action] if params.key?(:action) query_params["base_plan_action"] = params[:base_plan_action] if params.key?(:base_plan_action) query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_ids"] = params[:company_ids] if params.key?(:company_ids) - query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_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/companies/types/count_entity_traits_params.rb b/lib/schematic/companies/types/count_entity_traits_params.rb new file mode 100644 index 0000000..5573f23 --- /dev/null +++ b/lib/schematic/companies/types/count_entity_traits_params.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + # Input parameters + class CountEntityTraitsParams < Internal::Types::Model + field :definition_id, -> { String }, optional: true, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, 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/companies/types/count_entity_traits_request.rb b/lib/schematic/companies/types/count_entity_traits_request.rb new file mode 100644 index 0000000..eb6c4dd --- /dev/null +++ b/lib/schematic/companies/types/count_entity_traits_request.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + class CountEntityTraitsRequest < Internal::Types::Model + field :definition_id, -> { String }, optional: true, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, 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/companies/types/count_entity_traits_response.rb b/lib/schematic/companies/types/count_entity_traits_response.rb new file mode 100644 index 0000000..e30086e --- /dev/null +++ b/lib/schematic/companies/types/count_entity_traits_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + class CountEntityTraitsResponse < Internal::Types::Model + field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::CountEntityTraitsParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/companies/types/delete_entity_trait_definition_response.rb b/lib/schematic/companies/types/delete_entity_trait_definition_response.rb new file mode 100644 index 0000000..2e3ca7c --- /dev/null +++ b/lib/schematic/companies/types/delete_entity_trait_definition_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + class DeleteEntityTraitDefinitionResponse < 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/companies/types/get_entity_trait_definition_usage_response.rb b/lib/schematic/companies/types/get_entity_trait_definition_usage_response.rb new file mode 100644 index 0000000..9c4fce8 --- /dev/null +++ b/lib/schematic/companies/types/get_entity_trait_definition_usage_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + class GetEntityTraitDefinitionUsageResponse < Internal::Types::Model + field :data, -> { Schematic::Types::EntityTraitDefinitionUsage }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/companies/types/list_plan_changes_params.rb b/lib/schematic/companies/types/list_plan_changes_params.rb index 2e18145..82a325b 100644 --- a/lib/schematic/companies/types/list_plan_changes_params.rb +++ b/lib/schematic/companies/types/list_plan_changes_params.rb @@ -11,7 +11,6 @@ class ListPlanChangesParams < Internal::Types::Model field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false - field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false end end end diff --git a/lib/schematic/companies/types/list_plan_changes_request.rb b/lib/schematic/companies/types/list_plan_changes_request.rb index 3fb0a83..5062484 100644 --- a/lib/schematic/companies/types/list_plan_changes_request.rb +++ b/lib/schematic/companies/types/list_plan_changes_request.rb @@ -8,7 +8,6 @@ class ListPlanChangesRequest < Internal::Types::Model field :base_plan_action, -> { Schematic::Types::PlanChangeBasePlanAction }, optional: true, nullable: false field :company_id, -> { String }, optional: true, nullable: false field :company_ids, -> { String }, optional: true, nullable: false - field :plan_ids, -> { String }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false end diff --git a/lib/schematic/credits/types/create_credit_bundle_request_body.rb b/lib/schematic/credits/types/create_credit_bundle_request_body.rb index 2a68ff7..54fd61b 100644 --- a/lib/schematic/credits/types/create_credit_bundle_request_body.rb +++ b/lib/schematic/credits/types/create_credit_bundle_request_body.rb @@ -6,6 +6,7 @@ module Types class CreateCreditBundleRequestBody < Internal::Types::Model field :bundle_name, -> { String }, optional: false, nullable: false field :bundle_type, -> { String }, optional: true, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :credit_id, -> { String }, optional: false, nullable: false field :currency, -> { String }, optional: false, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPriceRequestBody] }, optional: true, nullable: false diff --git a/lib/schematic/credits/types/update_credit_bundle_details_request_body.rb b/lib/schematic/credits/types/update_credit_bundle_details_request_body.rb index 13cc043..2d1d875 100644 --- a/lib/schematic/credits/types/update_credit_bundle_details_request_body.rb +++ b/lib/schematic/credits/types/update_credit_bundle_details_request_body.rb @@ -6,6 +6,7 @@ module Types class UpdateCreditBundleDetailsRequestBody < Internal::Types::Model field :bundle_id, -> { String }, optional: false, nullable: false field :bundle_name, -> { String }, optional: false, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPriceRequestBody] }, optional: true, nullable: false field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false diff --git a/lib/schematic/planbundle/client.rb b/lib/schematic/planbundle/client.rb index f7b7abf..d4ab038 100644 --- a/lib/schematic/planbundle/client.rb +++ b/lib/schematic/planbundle/client.rb @@ -81,19 +81,19 @@ def create_plan_bundle(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :plan_bundle_id + # @option params [String] :plan_id # # @return [Schematic::Planbundle::Types::UpdatePlanBundleResponse] def update_plan_bundle(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Planbundle::Types::UpdatePlanBundleRequestBody.new(params).to_h - non_body_param_names = ["plan_bundle_id"] + non_body_param_names = ["plan_id"] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", - path: "plan-bundles/#{URI.encode_uri_component(params[:plan_bundle_id].to_s)}", + path: "plan-bundles/#{URI.encode_uri_component(params[:plan_id].to_s)}", body: body, request_options: request_options ) diff --git a/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb b/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb index adb83d9..f6c9473 100644 --- a/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb +++ b/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb @@ -4,7 +4,7 @@ module Schematic module Planbundle module Types class UpdatePlanBundleRequestBody < Internal::Types::Model - field :plan_bundle_id, -> { String }, optional: false, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false field :billing_product, -> { Schematic::Types::UpsertBillingProductRequestBody }, optional: true, nullable: false field :credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanBundleCreditGrantRequestBody] }, optional: true, nullable: false field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false diff --git a/lib/schematic/plangroups/types/create_plan_group_request_body.rb b/lib/schematic/plangroups/types/create_plan_group_request_body.rb index 365bc52..389692c 100644 --- a/lib/schematic/plangroups/types/create_plan_group_request_body.rb +++ b/lib/schematic/plangroups/types/create_plan_group_request_body.rb @@ -6,9 +6,11 @@ module Types class CreatePlanGroupRequestBody < Internal::Types::Model field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlans] }, optional: true, nullable: false field :add_on_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :checkout_bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false field :checkout_collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false field :checkout_collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false field :checkout_collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout_collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldInput] }, optional: true, nullable: false field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false field :custom_plan_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/plangroups/types/update_plan_group_request_body.rb b/lib/schematic/plangroups/types/update_plan_group_request_body.rb index 9a38079..dc986ce 100644 --- a/lib/schematic/plangroups/types/update_plan_group_request_body.rb +++ b/lib/schematic/plangroups/types/update_plan_group_request_body.rb @@ -7,9 +7,11 @@ class UpdatePlanGroupRequestBody < Internal::Types::Model field :plan_group_id, -> { String }, optional: false, nullable: false field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlans] }, optional: true, nullable: false field :add_on_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :checkout_bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false field :checkout_collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false field :checkout_collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false field :checkout_collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout_collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldInput] }, optional: true, nullable: false field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false field :custom_plan_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/planmigrations/types/create_migration_input.rb b/lib/schematic/planmigrations/types/create_migration_input.rb index f619424..174c35a 100644 --- a/lib/schematic/planmigrations/types/create_migration_input.rb +++ b/lib/schematic/planmigrations/types/create_migration_input.rb @@ -4,11 +4,12 @@ module Schematic module Planmigrations module Types class CreateMigrationInput < Internal::Types::Model - field :company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false - field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :plan_id, -> { String }, optional: false, nullable: false field :plan_version_id_to, -> { String }, optional: false, nullable: false - field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false field :strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false field :target_plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false end diff --git a/lib/schematic/planmigrations/types/preview_migration_request_body.rb b/lib/schematic/planmigrations/types/preview_migration_request_body.rb index 6702f2f..ea1192b 100644 --- a/lib/schematic/planmigrations/types/preview_migration_request_body.rb +++ b/lib/schematic/planmigrations/types/preview_migration_request_body.rb @@ -4,9 +4,10 @@ module Schematic module Planmigrations module Types class PreviewMigrationRequestBody < Internal::Types::Model - field :company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :plan_id, -> { String }, optional: false, nullable: false field :plan_version_id_to, -> { String }, optional: false, nullable: false + field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :target_plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/client.rb b/lib/schematic/plans/client.rb index d742098..8763f87 100644 --- a/lib/schematic/plans/client.rb +++ b/lib/schematic/plans/client.rb @@ -17,19 +17,19 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :company_plan_id + # @option params [String] :company_id # # @return [Schematic::Plans::Types::UpdateCompanyPlansResponse] def update_company_plans(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Plans::Types::UpdateCompanyPlansRequestBody.new(params).to_h - non_body_param_names = ["company_plan_id"] + non_body_param_names = ["company_id"] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", - path: "company-plans/#{URI.encode_uri_component(params[:company_plan_id].to_s)}", + path: "company-plans/#{URI.encode_uri_component(params[:company_id].to_s)}", body: body, request_options: request_options ) @@ -56,6 +56,7 @@ def update_company_plans(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String, nil] :company_id # @option params [String, nil] :plan_id + # @option params [Schematic::Types::PlanBillingSource, nil] :plan_billing_source # @option params [Schematic::Types::CustomPlanBillingStatus, nil] :status # @option params [Schematic::Types::CustomPlanBillingStatus, nil] :statuses # @option params [Integer, nil] :limit @@ -64,10 +65,11 @@ def update_company_plans(request_options: {}, **params) # @return [Schematic::Plans::Types::ListCustomPlanBillingsResponse] def list_custom_plan_billings(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id plan_id status statuses limit offset] + query_param_names = %i[company_id plan_id plan_billing_source status statuses limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) + query_params["plan_billing_source"] = params[:plan_billing_source] if params.key?(:plan_billing_source) query_params["status"] = params[:status] if params.key?(:status) query_params["statuses"] = params[:statuses] if params.key?(:statuses) query_params["limit"] = params[:limit] if params.key?(:limit) @@ -673,7 +675,7 @@ def list_plan_issues(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :plan_id + # @option params [String] :plan_version_id # @option params [Boolean, nil] :promote_archived_version # # @return [Schematic::Plans::Types::DeletePlanVersionResponse] @@ -687,7 +689,7 @@ def delete_plan_version(request_options: {}, **params) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "DELETE", - path: "plans/version/#{URI.encode_uri_component(params[:plan_id].to_s)}", + path: "plans/version/#{URI.encode_uri_component(params[:plan_version_id].to_s)}", query: query_params, request_options: request_options ) @@ -712,19 +714,19 @@ def delete_plan_version(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :plan_id + # @option params [String] :plan_version_id # # @return [Schematic::Plans::Types::PublishPlanVersionResponse] def publish_plan_version(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Plans::Types::PublishPlanVersionRequestBody.new(params).to_h - non_body_param_names = ["plan_id"] + non_body_param_names = ["plan_version_id"] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", - path: "plans/version/#{URI.encode_uri_component(params[:plan_id].to_s)}/publish", + path: "plans/version/#{URI.encode_uri_component(params[:plan_version_id].to_s)}/publish", body: body, request_options: request_options ) diff --git a/lib/schematic/plans/types/delete_plan_version_request.rb b/lib/schematic/plans/types/delete_plan_version_request.rb index 39b7a6e..ad478ab 100644 --- a/lib/schematic/plans/types/delete_plan_version_request.rb +++ b/lib/schematic/plans/types/delete_plan_version_request.rb @@ -4,7 +4,7 @@ module Schematic module Plans module Types class DeletePlanVersionRequest < Internal::Types::Model - field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: false, nullable: false field :promote_archived_version, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/list_custom_plan_billings_params.rb b/lib/schematic/plans/types/list_custom_plan_billings_params.rb index 15feea5..47ca5b1 100644 --- a/lib/schematic/plans/types/list_custom_plan_billings_params.rb +++ b/lib/schematic/plans/types/list_custom_plan_billings_params.rb @@ -8,6 +8,7 @@ class ListCustomPlanBillingsParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false + field :plan_billing_source, -> { Schematic::Types::PlanBillingSource }, optional: true, nullable: false field :plan_id, -> { String }, optional: true, nullable: false field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false field :statuses, -> { Internal::Types::Array[Schematic::Types::CustomPlanBillingStatus] }, optional: true, nullable: false diff --git a/lib/schematic/plans/types/list_custom_plan_billings_request.rb b/lib/schematic/plans/types/list_custom_plan_billings_request.rb index 70347fd..7f24148 100644 --- a/lib/schematic/plans/types/list_custom_plan_billings_request.rb +++ b/lib/schematic/plans/types/list_custom_plan_billings_request.rb @@ -6,6 +6,7 @@ module Types class ListCustomPlanBillingsRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false field :plan_id, -> { String }, optional: true, nullable: false + field :plan_billing_source, -> { Schematic::Types::PlanBillingSource }, optional: true, nullable: false field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false field :statuses, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/plans/types/publish_plan_version_request_body.rb b/lib/schematic/plans/types/publish_plan_version_request_body.rb index cf4c3e9..ddf9490 100644 --- a/lib/schematic/plans/types/publish_plan_version_request_body.rb +++ b/lib/schematic/plans/types/publish_plan_version_request_body.rb @@ -4,7 +4,7 @@ module Schematic module Plans module Types class PublishPlanVersionRequestBody < Internal::Types::Model - field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: false, nullable: false field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false field :coupon_external_id, -> { String }, optional: true, nullable: false @@ -14,6 +14,7 @@ class PublishPlanVersionRequestBody < Internal::Types::Model field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :migration_strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false field :phone, -> { String }, optional: true, nullable: false + field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false field :tax_id, -> { Schematic::Types::TaxIdInput }, optional: true, nullable: false end diff --git a/lib/schematic/plans/types/update_company_plans_request_body.rb b/lib/schematic/plans/types/update_company_plans_request_body.rb index 008372f..1137514 100644 --- a/lib/schematic/plans/types/update_company_plans_request_body.rb +++ b/lib/schematic/plans/types/update_company_plans_request_body.rb @@ -4,7 +4,7 @@ module Schematic module Plans module Types class UpdateCompanyPlansRequestBody < Internal::Types::Model - field :company_plan_id, -> { String }, optional: false, nullable: false + field :company_id, -> { String }, optional: false, nullable: false field :add_on_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :base_plan_id, -> { String }, optional: true, nullable: false end diff --git a/lib/schematic/types/billing_collection_method.rb b/lib/schematic/types/billing_collection_method.rb new file mode 100644 index 0000000..2ee03d5 --- /dev/null +++ b/lib/schematic/types/billing_collection_method.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module BillingCollectionMethod + extend Schematic::Internal::Types::Enum + + CHARGE_AUTOMATICALLY = "charge_automatically" + SEND_INVOICE = "send_invoice" + end + end +end diff --git a/lib/schematic/types/billing_credit_bundle_response_data.rb b/lib/schematic/types/billing_credit_bundle_response_data.rb index fc3cb70..668dbdb 100644 --- a/lib/schematic/types/billing_credit_bundle_response_data.rb +++ b/lib/schematic/types/billing_credit_bundle_response_data.rb @@ -5,6 +5,7 @@ module Types class BillingCreditBundleResponseData < Internal::Types::Model field :billing_invoice_id, -> { String }, optional: true, nullable: false field :bundle_type, -> { String }, optional: false, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit_description, -> { String }, optional: true, nullable: false field :credit_icon, -> { String }, 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 acb62e3..7a8197d 100644 --- a/lib/schematic/types/billing_credit_bundle_view.rb +++ b/lib/schematic/types/billing_credit_bundle_view.rb @@ -4,6 +4,7 @@ module Schematic module Types class BillingCreditBundleView < Internal::Types::Model field :bundle_type, -> { String }, optional: false, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit_description, -> { String }, optional: true, nullable: false field :credit_icon, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/billing_credit_grant_response_data.rb b/lib/schematic/types/billing_credit_grant_response_data.rb index 99621af..5bc93be 100644 --- a/lib/schematic/types/billing_credit_grant_response_data.rb +++ b/lib/schematic/types/billing_credit_grant_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class BillingCreditGrantResponseData < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :company_license_id, -> { String }, optional: true, nullable: false field :company_name, -> { String }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit_icon, -> { String }, optional: true, nullable: false @@ -13,6 +14,7 @@ class BillingCreditGrantResponseData < Internal::Types::Model field :expires_at, -> { String }, optional: true, nullable: false field :grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false + field :license_name, -> { String }, optional: true, nullable: false field :plan_id, -> { String }, optional: true, nullable: false field :plan_name, -> { String }, optional: true, nullable: false field :price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, 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 2f9800b..6a0a9a3 100644 --- a/lib/schematic/types/billing_plan_credit_grant_response_data.rb +++ b/lib/schematic/types/billing_plan_credit_grant_response_data.rb @@ -14,6 +14,7 @@ class BillingPlanCreditGrantResponseData < Internal::Types::Model field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_credit_amount, -> { Integer }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit, -> { Schematic::Types::BillingCreditResponseData }, optional: true, nullable: false field :credit_amount, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/checkout_bundle_purchase_behavior.rb b/lib/schematic/types/checkout_bundle_purchase_behavior.rb new file mode 100644 index 0000000..1d603c6 --- /dev/null +++ b/lib/schematic/types/checkout_bundle_purchase_behavior.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module CheckoutBundlePurchaseBehavior + extend Schematic::Internal::Types::Enum + + INDIVIDUAL = "individual" + QUANTITY = "quantity" + end + end +end diff --git a/lib/schematic/types/checkout_settings_response_data.rb b/lib/schematic/types/checkout_settings_response_data.rb index f8739f0..a427b68 100644 --- a/lib/schematic/types/checkout_settings_response_data.rb +++ b/lib/schematic/types/checkout_settings_response_data.rb @@ -3,9 +3,11 @@ module Schematic module Types class CheckoutSettingsResponseData < Internal::Types::Model + field :bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false field :collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false field :collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false field :collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false field :opt_in_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false field :opt_in_text, -> { String }, optional: true, nullable: false field :opt_in_title, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/company_billing_checkout_settings.rb b/lib/schematic/types/company_billing_checkout_settings.rb index 1e95482..b372c4c 100644 --- a/lib/schematic/types/company_billing_checkout_settings.rb +++ b/lib/schematic/types/company_billing_checkout_settings.rb @@ -6,6 +6,7 @@ class CompanyBillingCheckoutSettings < Internal::Types::Model field :collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false field :collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false field :collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false end end end diff --git a/lib/schematic/types/company_feature_usage_export_metadata.rb b/lib/schematic/types/company_feature_usage_export_metadata.rb index c91e77c..d5fac9f 100644 --- a/lib/schematic/types/company_feature_usage_export_metadata.rb +++ b/lib/schematic/types/company_feature_usage_export_metadata.rb @@ -5,6 +5,8 @@ module Types class CompanyFeatureUsageExportMetadata < Internal::Types::Model field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :credit_type_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :entity_key_definition_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :entity_trait_definition_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/schematic/types/company_plan_credit_grant_view.rb b/lib/schematic/types/company_plan_credit_grant_view.rb index 5ce308a..d34466b 100644 --- a/lib/schematic/types/company_plan_credit_grant_view.rb +++ b/lib/schematic/types/company_plan_credit_grant_view.rb @@ -17,6 +17,7 @@ class CompanyPlanCreditGrantView < Internal::Types::Model 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 :company_credit_amount, -> { Integer }, optional: false, 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 diff --git a/lib/schematic/types/component_checkout_settings.rb b/lib/schematic/types/component_checkout_settings.rb index 6bbc6bd..b0d1f86 100644 --- a/lib/schematic/types/component_checkout_settings.rb +++ b/lib/schematic/types/component_checkout_settings.rb @@ -3,9 +3,11 @@ module Schematic module Types class ComponentCheckoutSettings < Internal::Types::Model + field :bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false field :collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false field :collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false field :collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false field :proration_behavior, -> { Schematic::Types::ProrationBehavior }, optional: false, nullable: false field :tax_collection_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false end 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 266c415..58069bf 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 @@ -15,6 +15,7 @@ class CreateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :company_credit_amount, -> { Integer }, optional: true, nullable: false field :credit_amount, -> { Integer }, optional: false, nullable: false field :credit_id, -> { String }, optional: false, nullable: false field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false diff --git a/lib/schematic/types/credit_company_grant_view.rb b/lib/schematic/types/credit_company_grant_view.rb index 9383c94..71b2818 100644 --- a/lib/schematic/types/credit_company_grant_view.rb +++ b/lib/schematic/types/credit_company_grant_view.rb @@ -6,6 +6,7 @@ class CreditCompanyGrantView < Internal::Types::Model field :billing_credit_bundle_id, -> { String }, optional: true, nullable: false field :billing_credit_id, -> { String }, optional: false, nullable: false field :company_id, -> { String }, optional: false, nullable: false + field :company_license_id, -> { String }, optional: true, nullable: false field :company_name, -> { String }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit_description, -> { String }, optional: false, nullable: false @@ -19,6 +20,7 @@ class CreditCompanyGrantView < Internal::Types::Model field :expiry_unit_count, -> { Integer }, optional: true, nullable: false field :grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false + field :license_name, -> { String }, optional: true, nullable: false field :plan_id, -> { String }, optional: true, nullable: false field :plan_name, -> { String }, optional: true, nullable: false field :plural_name, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/custom_plan_billing_response_data.rb b/lib/schematic/types/custom_plan_billing_response_data.rb index 9dc3b45..f92b01d 100644 --- a/lib/schematic/types/custom_plan_billing_response_data.rb +++ b/lib/schematic/types/custom_plan_billing_response_data.rb @@ -4,12 +4,14 @@ module Schematic module Types class CustomPlanBillingResponseData < Internal::Types::Model field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: false, nullable: false + field :billing_cycle_anchor, -> { String }, optional: true, nullable: false field :company_id, -> { String }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :days_until_due, -> { Integer }, optional: false, nullable: false field :external_invoice_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :paid_at, -> { String }, optional: true, nullable: false + field :plan_billing_source, -> { Schematic::Types::PlanBillingSource }, optional: false, nullable: false field :plan_id, -> { String }, optional: false, nullable: false field :published_at, -> { String }, optional: true, nullable: false field :send_invoice, -> { Internal::Types::Boolean }, optional: false, nullable: false diff --git a/lib/schematic/types/entity_trait_definition_usage.rb b/lib/schematic/types/entity_trait_definition_usage.rb new file mode 100644 index 0000000..ae4f323 --- /dev/null +++ b/lib/schematic/types/entity_trait_definition_usage.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Types + class EntityTraitDefinitionUsage < Internal::Types::Model + field :checkout_field_config_count, -> { Integer }, optional: false, nullable: false + field :company_override_count, -> { Integer }, optional: false, nullable: false + field :feature_count, -> { Integer }, optional: false, nullable: false + field :plan_entitlement_count, -> { Integer }, optional: false, nullable: false + field :plan_trait_count, -> { Integer }, optional: false, nullable: false + field :rule_condition_count, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/get_onboarding_state_resp.rb b/lib/schematic/types/get_onboarding_state_resp.rb new file mode 100644 index 0000000..28e90e0 --- /dev/null +++ b/lib/schematic/types/get_onboarding_state_resp.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Types + class GetOnboardingStateResp < Internal::Types::Model + field :environment_id, -> { String }, optional: true, nullable: false + field :milestones, -> { Internal::Types::Array[Schematic::Types::OnboardingMilestoneView] }, optional: false, nullable: false + field :path, -> { Schematic::Types::OnboardingPath }, optional: true, nullable: false + field :requirements, -> { Internal::Types::Array[Schematic::Types::OnboardingRequirementView] }, optional: false, nullable: false + field :suggested_next, -> { Internal::Types::Array[Schematic::Types::OnboardingRequirement] }, optional: false, nullable: false + field :track, -> { Schematic::Types::OnboardingTrack }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/manage_plan_request.rb b/lib/schematic/types/manage_plan_request.rb index 967f7d0..460f1dc 100644 --- a/lib/schematic/types/manage_plan_request.rb +++ b/lib/schematic/types/manage_plan_request.rb @@ -3,20 +3,27 @@ module Schematic module Types class ManagePlanRequest < Internal::Types::Model + field :activate_on_payment, -> { Internal::Types::Boolean }, optional: true, nullable: false field :add_on_selections, -> { Internal::Types::Array[Schematic::Types::PlanSelection] }, optional: false, nullable: false field :base_plan_id, -> { String }, optional: true, nullable: false field :base_plan_price_id, -> { String }, optional: true, nullable: false field :base_plan_version_id, -> { String }, optional: true, nullable: false + field :billing_cycle_anchor, -> { String }, optional: true, nullable: false + field :billing_email, -> { String }, optional: true, nullable: false field :billing_entity_id, -> { String }, optional: true, nullable: false field :cancel_immediately, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :collection_method, -> { Schematic::Types::BillingCollectionMethod }, optional: true, 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 field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false + field :days_until_due, -> { Integer }, optional: true, nullable: false field :pay_in_advance_entitlements, -> { Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody] }, optional: false, nullable: false field :payment_method_external_id, -> { String }, optional: true, nullable: false field :promo_code, -> { String }, optional: true, nullable: false field :prorate, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :prorate_first_period, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false field :trial_end, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/migration_proration_behavior.rb b/lib/schematic/types/migration_proration_behavior.rb new file mode 100644 index 0000000..8bcf916 --- /dev/null +++ b/lib/schematic/types/migration_proration_behavior.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module MigrationProrationBehavior + extend Schematic::Internal::Types::Enum + + ALWAYS_INVOICE = "always_invoice" + CREATE_PRORATIONS = "create_prorations" + end + end +end diff --git a/lib/schematic/types/onboarding_milestone.rb b/lib/schematic/types/onboarding_milestone.rb new file mode 100644 index 0000000..ea4071f --- /dev/null +++ b/lib/schematic/types/onboarding_milestone.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module OnboardingMilestone + extend Schematic::Internal::Types::Enum + + EVALUATED = "evaluated" + IMPLEMENTED = "implemented" + end + end +end diff --git a/lib/schematic/types/onboarding_milestone_view.rb b/lib/schematic/types/onboarding_milestone_view.rb new file mode 100644 index 0000000..880be83 --- /dev/null +++ b/lib/schematic/types/onboarding_milestone_view.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + class OnboardingMilestoneView < Internal::Types::Model + field :id, -> { Schematic::Types::OnboardingMilestone }, optional: false, nullable: false + field :missing, -> { Internal::Types::Array[Schematic::Types::OnboardingRequirement] }, optional: false, nullable: false + field :progress, -> { Integer }, optional: false, nullable: false + field :reached_at, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/onboarding_path.rb b/lib/schematic/types/onboarding_path.rb new file mode 100644 index 0000000..2c34d7e --- /dev/null +++ b/lib/schematic/types/onboarding_path.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module OnboardingPath + extend Schematic::Internal::Types::Enum + + AGENT = "agent" + APP = "app" + end + end +end diff --git a/lib/schematic/types/onboarding_requirement.rb b/lib/schematic/types/onboarding_requirement.rb new file mode 100644 index 0000000..5e35dae --- /dev/null +++ b/lib/schematic/types/onboarding_requirement.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Schematic + module Types + module OnboardingRequirement + extend Schematic::Internal::Types::Enum + + CONNECT_BILLING = "connect_billing" + CREATE_API_KEY = "create_api_key" + FIRST_FLAG_CHECK = "first_flag_check" + IMPORT_COMPANIES = "import_companies" + MODEL_PACKAGING = "model_packaging" + SEND_EVENTS = "send_events" + end + end +end diff --git a/lib/schematic/types/onboarding_requirement_status.rb b/lib/schematic/types/onboarding_requirement_status.rb new file mode 100644 index 0000000..b2b54c7 --- /dev/null +++ b/lib/schematic/types/onboarding_requirement_status.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + module OnboardingRequirementStatus + extend Schematic::Internal::Types::Enum + + AVAILABLE = "available" + BLOCKED = "blocked" + COMPLETE = "complete" + end + end +end diff --git a/lib/schematic/types/onboarding_requirement_view.rb b/lib/schematic/types/onboarding_requirement_view.rb new file mode 100644 index 0000000..d546a77 --- /dev/null +++ b/lib/schematic/types/onboarding_requirement_view.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + class OnboardingRequirementView < Internal::Types::Model + field :blocked_by, -> { Internal::Types::Array[Schematic::Types::OnboardingRequirement] }, optional: true, nullable: false + field :id, -> { Schematic::Types::OnboardingRequirement }, optional: false, nullable: false + field :satisfied_by, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::OnboardingRequirementStatus }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/onboarding_track.rb b/lib/schematic/types/onboarding_track.rb new file mode 100644 index 0000000..bd8005d --- /dev/null +++ b/lib/schematic/types/onboarding_track.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module OnboardingTrack + extend Schematic::Internal::Types::Enum + + CATALOG = "catalog" + SINGLE_PLAN = "single_plan" + end + end +end diff --git a/lib/schematic/types/plan_billing_source.rb b/lib/schematic/types/plan_billing_source.rb new file mode 100644 index 0000000..3334597 --- /dev/null +++ b/lib/schematic/types/plan_billing_source.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module PlanBillingSource + extend Schematic::Internal::Types::Enum + + CUSTOM_PLAN = "custom_plan" + MANAGE_PLAN = "manage_plan" + end + end +end diff --git a/lib/schematic/types/plan_bundle_response_data.rb b/lib/schematic/types/plan_bundle_response_data.rb index f9cb897..d34d56c 100644 --- a/lib/schematic/types/plan_bundle_response_data.rb +++ b/lib/schematic/types/plan_bundle_response_data.rb @@ -7,6 +7,7 @@ class PlanBundleResponseData < Internal::Types::Model field :credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false + field :plan_version, -> { Schematic::Types::PlanVersionResponseData }, 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 4ed4012..365a417 100644 --- a/lib/schematic/types/plan_credit_grant_view.rb +++ b/lib/schematic/types/plan_credit_grant_view.rb @@ -14,6 +14,7 @@ class PlanCreditGrantView < Internal::Types::Model 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 :billing_credit_can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_credit_amount, -> { Integer }, optional: false, 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 diff --git a/lib/schematic/types/plan_version_migration_preview_response_data.rb b/lib/schematic/types/plan_version_migration_preview_response_data.rb index b44ed27..fa48837 100644 --- a/lib/schematic/types/plan_version_migration_preview_response_data.rb +++ b/lib/schematic/types/plan_version_migration_preview_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class PlanVersionMigrationPreviewResponseData < Internal::Types::Model field :companies, -> { Internal::Types::Array[Schematic::Types::PlanVersionMigrationPreviewCompanyResponseData] }, optional: false, nullable: false + field :has_billing_changes, -> { Internal::Types::Boolean }, optional: false, nullable: false end end end diff --git a/lib/schematic/types/plan_version_migration_response_data.rb b/lib/schematic/types/plan_version_migration_response_data.rb index ed0f4e4..b2577e2 100644 --- a/lib/schematic/types/plan_version_migration_response_data.rb +++ b/lib/schematic/types/plan_version_migration_response_data.rb @@ -13,6 +13,7 @@ class PlanVersionMigrationResponseData < Internal::Types::Model field :plan_version_id_from, -> { String }, optional: true, nullable: false field :plan_version_id_to, -> { String }, optional: false, nullable: false field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false field :skipped_companies, -> { Integer }, optional: false, nullable: false field :started_at, -> { String }, optional: true, nullable: false field :status, -> { Schematic::Types::PlanVersionMigrationStatus }, optional: false, nullable: false diff --git a/lib/schematic/types/preview_subscription_finance_response_data.rb b/lib/schematic/types/preview_subscription_finance_response_data.rb index 4e7148b..9874ffd 100644 --- a/lib/schematic/types/preview_subscription_finance_response_data.rb +++ b/lib/schematic/types/preview_subscription_finance_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class PreviewSubscriptionFinanceResponseData < Internal::Types::Model field :amount_off, -> { Integer }, optional: false, nullable: false + field :discount_amount, -> { Integer }, optional: false, nullable: false field :discounts, -> { Internal::Types::Array[Schematic::Types::PreviewSubscriptionDiscountResponseData] }, optional: false, nullable: false field :due_now, -> { Integer }, optional: false, nullable: false field :new_charges, -> { Integer }, optional: false, nullable: false 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 873c93e..e4a8eb1 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 @@ -15,6 +15,7 @@ class UpdateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :company_credit_amount, -> { Integer }, optional: true, nullable: false field :credit_amount, -> { Integer }, optional: true, nullable: false field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false diff --git a/lib/schematic/types/upsert_company_request_body.rb b/lib/schematic/types/upsert_company_request_body.rb index c6a3c80..4de52f9 100644 --- a/lib/schematic/types/upsert_company_request_body.rb +++ b/lib/schematic/types/upsert_company_request_body.rb @@ -10,6 +10,7 @@ class UpsertCompanyRequestBody < Internal::Types::Model field :last_seen_at, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false field :prevent_key_remap, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :remove_keys, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false field :update_only, -> { Internal::Types::Boolean }, optional: true, nullable: false end diff --git a/lib/schematic/types/upsert_user_request_body.rb b/lib/schematic/types/upsert_user_request_body.rb index 120d875..a375f80 100644 --- a/lib/schematic/types/upsert_user_request_body.rb +++ b/lib/schematic/types/upsert_user_request_body.rb @@ -11,6 +11,7 @@ class UpsertUserRequestBody < Internal::Types::Model field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false field :last_seen_at, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false + field :remove_keys, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false field :update_only, -> { Internal::Types::Boolean }, optional: true, nullable: false end diff --git a/lib/schematic/types/upsert_user_sub_request_body.rb b/lib/schematic/types/upsert_user_sub_request_body.rb index 8e96d46..7b415cb 100644 --- a/lib/schematic/types/upsert_user_sub_request_body.rb +++ b/lib/schematic/types/upsert_user_sub_request_body.rb @@ -9,6 +9,7 @@ class UpsertUserSubRequestBody < Internal::Types::Model field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false field :last_seen_at, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false + field :remove_keys, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false field :update_only, -> { Internal::Types::Boolean }, optional: true, nullable: false end diff --git a/lib/schematic/types/who_am_i_response_data.rb b/lib/schematic/types/who_am_i_response_data.rb index 49c6fa6..554433c 100644 --- a/lib/schematic/types/who_am_i_response_data.rb +++ b/lib/schematic/types/who_am_i_response_data.rb @@ -9,6 +9,7 @@ class WhoAmIResponseData < Internal::Types::Model field :api_key_id, -> { String }, optional: true, nullable: false field :environment_id, -> { String }, optional: true, nullable: false field :environments, -> { Internal::Types::Array[Schematic::Types::EnvironmentResponseData] }, optional: false, nullable: false + field :onboarding_complete, -> { Internal::Types::Boolean }, optional: false, nullable: false field :stripe_user_id, -> { String }, optional: true, nullable: false field :user_id, -> { String }, optional: true, nullable: false field :user_name, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/version.rb b/lib/schematic/version.rb index 9db4f09..301012d 100644 --- a/lib/schematic/version.rb +++ b/lib/schematic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Schematic - VERSION = "1.4.13" + VERSION = "1.4.14" end diff --git a/reference.md b/reference.md index e1a987e..2d0f6bf 100644 --- a/reference.md +++ b/reference.md @@ -1201,6 +1201,118 @@ client.accounts.delete_environment(environment_id: "environment_id") + + + + +
client.accounts.get_onboarding_state() -> Schematic::Accounts::Types::GetOnboardingStateResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.accounts.get_onboarding_state +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `Schematic::Accounts::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.accounts.update_onboarding_state(request) -> Schematic::Accounts::Types::UpdateOnboardingStateResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.accounts.update_onboarding_state +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**path:** `Schematic::Types::OnboardingPath` + +
+
+ +
+
+ +**pricing_page_url:** `String` + +
+
+ +
+
+ +**track:** `Schematic::Types::OnboardingTrack` + +
+
+ +
+
+ +**website_url:** `String` + +
+
+ +
+
+ +**request_options:** `Schematic::Accounts::RequestOptions` + +
+
+
+
+ +
@@ -4575,6 +4687,14 @@ client.credits.create_credit_bundle(
+**compatible_plan_ids:** `Internal::Types::Array[String]` — Plans whose companies may purchase this bundle. Omitted or empty means the bundle is purchasable on every plan. + +
+
+ +
+
+ **credit_id:** `String`
@@ -4763,6 +4883,14 @@ client.credits.update_credit_bundle_details(
+**compatible_plan_ids:** `Internal::Types::Array[String]` — Plans whose companies may purchase this bundle. Omitted leaves compatibility unchanged; empty resets the bundle to purchasable on every plan. + +
+
+ +
+
+ **currency_prices:** `Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPriceRequestBody]`
@@ -9683,6 +9811,102 @@ client.companies.update_entity_trait_definition(
+ +
+ + +
client.companies.delete_entity_trait_definition(entity_trait_definition_id) -> Schematic::Companies::Types::DeleteEntityTraitDefinitionResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.companies.delete_entity_trait_definition(entity_trait_definition_id: "entity_trait_definition_id") +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_trait_definition_id:** `String` — entity_trait_definition_id + +
+
+ +
+
+ +**request_options:** `Schematic::Companies::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.companies.get_entity_trait_definition_usage(entity_trait_definition_id) -> Schematic::Companies::Types::GetEntityTraitDefinitionUsageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.companies.get_entity_trait_definition_usage(entity_trait_definition_id: "entity_trait_definition_id") +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_trait_definition_id:** `String` — entity_trait_definition_id + +
+
+ +
+
+ +**request_options:** `Schematic::Companies::RequestOptions` + +
+
+
+
+ +
@@ -9864,6 +10088,83 @@ client.companies.get_entity_trait_values( + + + + +
client.companies.count_entity_traits() -> Schematic::Companies::Types::CountEntityTraitsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.companies.count_entity_traits( + definition_id: "definition_id", + entity_type: "company", + limit: 1000000, + offset: 1000000 +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**definition_id:** `String` + +
+
+ +
+
+ +**entity_type:** `Schematic::Types::EntityType` + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `Integer` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `Schematic::Companies::RequestOptions` + +
+
+
+
+ +
@@ -9886,7 +10187,6 @@ client.companies.list_plan_changes( base_plan_action: "fallback", company_id: "company_id", company_ids: ["company_ids"], - plan_ids: ["plan_ids"], limit: 1000000, offset: 1000000 ) @@ -9936,14 +10236,6 @@ client.companies.list_plan_changes(
-**plan_ids:** `String` - -
-
- -
-
- **limit:** `Integer` — Page limit (default 100)
@@ -13705,7 +13997,7 @@ client.entitlements.get_user_usage_detail( ## plans -
client.plans.update_company_plans(company_plan_id, request) -> Schematic::Plans::Types::UpdateCompanyPlansResponse +
client.plans.update_company_plans(company_id, request) -> Schematic::Plans::Types::UpdateCompanyPlansResponse
@@ -13719,7 +14011,7 @@ client.entitlements.get_user_usage_detail( ```ruby client.plans.update_company_plans( - company_plan_id: "company_plan_id", + company_id: "company_id", add_on_ids: ["add_on_ids"] ) ``` @@ -13736,7 +14028,7 @@ client.plans.update_company_plans(
-**company_plan_id:** `String` — company_plan_id +**company_id:** `String` — company_id
@@ -13788,6 +14080,7 @@ client.plans.update_company_plans( client.plans.list_custom_plan_billings( company_id: "company_id", plan_id: "plan_id", + plan_billing_source: "custom_plan", status: "active", statuses: ["active"], limit: 1000000, @@ -13823,6 +14116,14 @@ client.plans.list_custom_plan_billings(
+**plan_billing_source:** `Schematic::Types::PlanBillingSource` — Filter by the flow that created the billing record. Defaults to custom_plan. + +
+
+ +
+
+ **status:** `Schematic::Types::CustomPlanBillingStatus` — Filter by billing status
@@ -15074,7 +15375,7 @@ client.plans.list_plan_issues(
-
client.plans.delete_plan_version(plan_id) -> Schematic::Plans::Types::DeletePlanVersionResponse +
client.plans.delete_plan_version(plan_version_id) -> Schematic::Plans::Types::DeletePlanVersionResponse
@@ -15088,7 +15389,7 @@ client.plans.list_plan_issues( ```ruby client.plans.delete_plan_version( - plan_id: "plan_id", + plan_version_id: "plan_version_id", promote_archived_version: true ) ``` @@ -15105,7 +15406,7 @@ client.plans.delete_plan_version(
-**plan_id:** `String` — plan_id +**plan_version_id:** `String` — plan_version_id
@@ -15133,7 +15434,7 @@ client.plans.delete_plan_version(
-
client.plans.publish_plan_version(plan_id, request) -> Schematic::Plans::Types::PublishPlanVersionResponse +
client.plans.publish_plan_version(plan_version_id, request) -> Schematic::Plans::Types::PublishPlanVersionResponse
@@ -15147,7 +15448,7 @@ client.plans.delete_plan_version( ```ruby client.plans.publish_plan_version( - plan_id: "plan_id", + plan_version_id: "plan_version_id", excluded_company_ids: ["excluded_company_ids"], migration_strategy: "immediate" ) @@ -15165,7 +15466,7 @@ client.plans.publish_plan_version(
-**plan_id:** `String` — plan_id +**plan_version_id:** `String` — plan_version_id
@@ -15245,6 +15546,14 @@ client.plans.publish_plan_version(
+**proration_behavior:** `Schematic::Types::MigrationProrationBehavior` + +
+
+ +
+
+ **send_invoice:** `Internal::Types::Boolean` — Whether Stripe emails the invoice when it is finalized. Defaults to true.
@@ -15917,7 +16226,7 @@ client.planbundle.create_plan_bundle(entitlements: [{
-
client.planbundle.update_plan_bundle(plan_bundle_id, request) -> Schematic::Planbundle::Types::UpdatePlanBundleResponse +
client.planbundle.update_plan_bundle(plan_id, request) -> Schematic::Planbundle::Types::UpdatePlanBundleResponse
@@ -15931,7 +16240,7 @@ client.planbundle.create_plan_bundle(entitlements: [{ ```ruby client.planbundle.update_plan_bundle( - plan_bundle_id: "plan_bundle_id", + plan_id: "plan_id", entitlements: [{ action: "create" }] @@ -15950,7 +16259,7 @@ client.planbundle.update_plan_bundle(
-**plan_bundle_id:** `String` — plan_bundle_id +**plan_id:** `String` — plan_id
@@ -19158,9 +19467,11 @@ client.plangroups.get_plan_group(include_company_counts: true) ```ruby client.plangroups.create_plan_group( add_on_ids: ["add_on_ids"], + checkout_bundle_purchase_behavior: "individual", checkout_collect_address: true, checkout_collect_email: true, checkout_collect_phone: true, + checkout_collect_tax_id: true, enable_tax_collection: true, opt_in_enabled: true, ordered_add_ons: [{ @@ -19213,6 +19524,14 @@ client.plangroups.create_plan_group(
+**checkout_bundle_purchase_behavior:** `Schematic::Types::CheckoutBundlePurchaseBehavior` + +
+
+ +
+
+ **checkout_collect_address:** `Internal::Types::Boolean`
@@ -19237,6 +19556,14 @@ client.plangroups.create_plan_group(
+**checkout_collect_tax_id:** `Internal::Types::Boolean` + +
+
+ +
+
+ **custom_checkout_fields:** `Internal::Types::Array[Schematic::Types::CheckoutFieldInput]`
@@ -19513,9 +19840,11 @@ client.plangroups.create_plan_group( client.plangroups.update_plan_group( plan_group_id: "plan_group_id", add_on_ids: ["add_on_ids"], + checkout_bundle_purchase_behavior: "individual", checkout_collect_address: true, checkout_collect_email: true, checkout_collect_phone: true, + checkout_collect_tax_id: true, enable_tax_collection: true, opt_in_enabled: true, ordered_add_ons: [{ @@ -19576,6 +19905,14 @@ client.plangroups.update_plan_group(
+**checkout_bundle_purchase_behavior:** `Schematic::Types::CheckoutBundlePurchaseBehavior` + +
+
+ +
+
+ **checkout_collect_address:** `Internal::Types::Boolean`
@@ -19600,6 +19937,14 @@ client.plangroups.update_plan_group(
+**checkout_collect_tax_id:** `Internal::Types::Boolean` + +
+
+ +
+
+ **custom_checkout_fields:** `Internal::Types::Array[Schematic::Types::CheckoutFieldInput]`
@@ -20172,11 +20517,8 @@ client.planmigrations.list_migrations( ```ruby client.planmigrations.create_migration( - company_ids: ["company_ids"], - excluded_company_ids: ["excluded_company_ids"], plan_id: "plan_id", plan_version_id_to: "plan_version_id_to", - plan_version_ids_from: ["plan_version_ids_from"], strategy: "immediate", target_plan_type: "plan" ) @@ -20234,6 +20576,14 @@ client.planmigrations.create_migration(
+**proration_behavior:** `Schematic::Types::MigrationProrationBehavior` + +
+
+ +
+
+ **strategy:** `Schematic::Types::PlanVersionMigrationStrategy`
@@ -20460,7 +20810,6 @@ client.planmigrations.count_migrations( ```ruby client.planmigrations.preview_migration( - company_ids: ["company_ids"], plan_id: "plan_id", plan_version_id_to: "plan_version_id_to", target_plan_type: "plan" @@ -20503,6 +20852,14 @@ client.planmigrations.preview_migration(
+**plan_version_ids_from:** `Internal::Types::Array[String]` + +
+
+ +
+
+ **target_plan_type:** `Schematic::Types::PlanType`
diff --git a/test/rules_engine_clock_test.rb b/test/rules_engine_clock_test.rb deleted file mode 100644 index 8711b5e..0000000 --- a/test/rules_engine_clock_test.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -require_relative "test_helper" -require "minitest/autorun" - -# Regression for SCHY-471. -# -# A company-override entitlement rule whose metric condition uses a -# calendar/billing metric period drives the engine into the metric-period-reset -# code path, which needs a wall clock. On the raw wasm32-unknown-unknown build -# that path used to trap (+wasm unreachable+); the flag then wrongly fell back to -# its default value for a company that is legitimately entitled. The host now -# injects the current time via +setCurrentTimeMillis+ so this evaluates cleanly. -class RulesEngineClockTest < Minitest::Test - def setup - @engine = Schematic::RulesEngine.new - @engine.initialize! - # The wasm binary is fetched via scripts/download-wasm.sh and may be absent - # (or the wasmtime gem missing) in some environments — skip rather than fail. - skip "WASM rules engine unavailable (wasm binary or wasmtime gem missing)" unless @engine.initialized? - end - - def flag - { - "id" => "flag1", "key" => "mcp-access", "account_id" => "acc_1", - "environment_id" => "env_1", "default_value" => false, "rules" => [] - } - end - - # Usage 40 < allocation 100, so the override grants the feature. - def entitled_company - { - "id" => "co_entitled", "account_id" => "acc_1", "environment_id" => "env_1", - "keys" => { "id" => "co_entitled" }, - "metrics" => [{ - "account_id" => "acc_1", "environment_id" => "env_1", "company_id" => "co_entitled", - "event_subtype" => "api-calls", "period" => "current_month", - "month_reset" => "billing_cycle", "value" => 40, "created_at" => "2023-01-01T00:00:00Z" - }], - "rules" => [{ - "id" => "rule_override", "flag_id" => "flag1", "account_id" => "acc_1", - "environment_id" => "env_1", "name" => "Company Override", - "rule_type" => "company_override", "priority" => 0, "value" => true, - "condition_groups" => [], - "conditions" => [ - { - "id" => "cond_company", "account_id" => "acc_1", "environment_id" => "env_1", - "condition_type" => "company", "operator" => "eq", - "resource_ids" => ["co_entitled"], "trait_value" => "" - }, - { - "id" => "cond_metric", "account_id" => "acc_1", "environment_id" => "env_1", - "condition_type" => "metric", "operator" => "lt", "event_subtype" => "api-calls", - "metric_value" => 100, "metric_period" => "current_month", - "metric_period_month_reset" => "billing_cycle", "trait_value" => "100" - } - ] - }] - } - end - - def test_billing_metric_override_evaluates_without_trapping - result = @engine.check_flag(flag, entitled_company) - - assert result[:value], "company override should grant the flag, not fall back to default false" - assert_match(/override/i, result[:reason].to_s) - end - - def test_billing_metric_override_populates_reset_at - result = @engine.check_flag(flag, entitled_company) - - refute_nil result[:feature_usage_reset_at], - "reset-at should be computed from the injected host time" - end -end From 0da49a7ab73d35e8d5ced98fd1762cf4a11d3f65 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 10:12:04 +0000 Subject: [PATCH 2/2] [fern-replay] Applied customizations Patches applied (2): - patch-5da692c2: inject host time into datastream wasm rules engine (SCHY-471) - patch-ee61788c: fix rubocop offenses in clock regression test (SCHY-471) --- .fern/replay.lock | 12 ++++-- test/rules_engine_clock_test.rb | 75 +++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 test/rules_engine_clock_test.rb diff --git a/.fern/replay.lock b/.fern/replay.lock index 42a5f7f..6deee73 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -60,14 +60,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-ruby-sdk: 1.1.13 -current_generation: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e + - commit_sha: 25497874a46bed5955dc9fcb6effc4d6bfafea9b + tree_hash: 111ecbe19a029b291a029131dffdff707a48d5af + timestamp: 2026-08-17T10:12:00.906Z + cli_version: unknown + generator_versions: + fernapi/fern-ruby-sdk: 1.1.13 +current_generation: 25497874a46bed5955dc9fcb6effc4d6bfafea9b patches: - id: patch-5da692c2 content_hash: sha256:e652287219a0a709e16112ced444e6472c6fa8bdfe888edf868caaf9769a9472 original_commit: 5da692c20aef08577d900f9a860b5f78a549418e original_message: inject host time into datastream wasm rules engine (SCHY-471) original_author: Christopher Brady - base_generation: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e + base_generation: 25497874a46bed5955dc9fcb6effc4d6bfafea9b files: - test/rules_engine_clock_test.rb patch_content: | @@ -235,7 +241,7 @@ patches: original_commit: ee61788c5a83fce5dd5768b2536391459550d176 original_message: fix rubocop offenses in clock regression test (SCHY-471) original_author: Christopher Brady - base_generation: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e + base_generation: 25497874a46bed5955dc9fcb6effc4d6bfafea9b files: - test/rules_engine_clock_test.rb patch_content: | diff --git a/test/rules_engine_clock_test.rb b/test/rules_engine_clock_test.rb new file mode 100644 index 0000000..8711b5e --- /dev/null +++ b/test/rules_engine_clock_test.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +require_relative "test_helper" +require "minitest/autorun" + +# Regression for SCHY-471. +# +# A company-override entitlement rule whose metric condition uses a +# calendar/billing metric period drives the engine into the metric-period-reset +# code path, which needs a wall clock. On the raw wasm32-unknown-unknown build +# that path used to trap (+wasm unreachable+); the flag then wrongly fell back to +# its default value for a company that is legitimately entitled. The host now +# injects the current time via +setCurrentTimeMillis+ so this evaluates cleanly. +class RulesEngineClockTest < Minitest::Test + def setup + @engine = Schematic::RulesEngine.new + @engine.initialize! + # The wasm binary is fetched via scripts/download-wasm.sh and may be absent + # (or the wasmtime gem missing) in some environments — skip rather than fail. + skip "WASM rules engine unavailable (wasm binary or wasmtime gem missing)" unless @engine.initialized? + end + + def flag + { + "id" => "flag1", "key" => "mcp-access", "account_id" => "acc_1", + "environment_id" => "env_1", "default_value" => false, "rules" => [] + } + end + + # Usage 40 < allocation 100, so the override grants the feature. + def entitled_company + { + "id" => "co_entitled", "account_id" => "acc_1", "environment_id" => "env_1", + "keys" => { "id" => "co_entitled" }, + "metrics" => [{ + "account_id" => "acc_1", "environment_id" => "env_1", "company_id" => "co_entitled", + "event_subtype" => "api-calls", "period" => "current_month", + "month_reset" => "billing_cycle", "value" => 40, "created_at" => "2023-01-01T00:00:00Z" + }], + "rules" => [{ + "id" => "rule_override", "flag_id" => "flag1", "account_id" => "acc_1", + "environment_id" => "env_1", "name" => "Company Override", + "rule_type" => "company_override", "priority" => 0, "value" => true, + "condition_groups" => [], + "conditions" => [ + { + "id" => "cond_company", "account_id" => "acc_1", "environment_id" => "env_1", + "condition_type" => "company", "operator" => "eq", + "resource_ids" => ["co_entitled"], "trait_value" => "" + }, + { + "id" => "cond_metric", "account_id" => "acc_1", "environment_id" => "env_1", + "condition_type" => "metric", "operator" => "lt", "event_subtype" => "api-calls", + "metric_value" => 100, "metric_period" => "current_month", + "metric_period_month_reset" => "billing_cycle", "trait_value" => "100" + } + ] + }] + } + end + + def test_billing_metric_override_evaluates_without_trapping + result = @engine.check_flag(flag, entitled_company) + + assert result[:value], "company override should grant the flag, not fall back to default false" + assert_match(/override/i, result[:reason].to_s) + end + + def test_billing_metric_override_populates_reset_at + result = @engine.check_flag(flag, entitled_company) + + refute_nil result[:feature_usage_reset_at], + "reset-at should be computed from the injected host time" + end +end