diff --git a/.fern/metadata.json b/.fern/metadata.json index f99320b..f90f9ad 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -13,6 +13,6 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "75191b40ce7af084ca4fb11f623ab59c57cf97e3", - "sdkVersion": "1.4.10" + "originGitCommit": "340529eacf4f1dcc5522e771872c1dd94b9c4891", + "sdkVersion": "1.4.11" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock index a0294a7..8978bef 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -42,14 +42,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-ruby-sdk: 1.1.13 -current_generation: dfe70dc9f1f1787aa5b55f6802739898633c35c7 + - commit_sha: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf + tree_hash: 9ec72264899730d464919a3605eb3a6667ba9464 + timestamp: 2026-07-27T18:37:54.168Z + cli_version: unknown + generator_versions: + fernapi/fern-ruby-sdk: 1.1.13 +current_generation: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf 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: dfe70dc9f1f1787aa5b55f6802739898633c35c7 + base_generation: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf files: - test/rules_engine_clock_test.rb patch_content: | @@ -217,7 +223,7 @@ patches: original_commit: ee61788c5a83fce5dd5768b2536391459550d176 original_message: fix rubocop offenses in clock regression test (SCHY-471) original_author: Christopher Brady - base_generation: dfe70dc9f1f1787aa5b55f6802739898633c35c7 + base_generation: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf files: - test/rules_engine_clock_test.rb patch_content: | diff --git a/Gemfile.lock b/Gemfile.lock index 11a70e0..1c897e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - schematichq (1.4.10) + schematichq (1.4.11) wasmtime (>= 19.0) websocket (>= 1.2) diff --git a/lib/schematic.rb b/lib/schematic.rb index b12c4ac..5e1d384 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -35,9 +35,9 @@ require_relative "schematic/internal/iterators/offset_item_iterator" require_relative "schematic/internal/iterators/cursor_page_iterator" require_relative "schematic/internal/iterators/offset_page_iterator" +require_relative "schematic/types/account_member_role" require_relative "schematic/accounts/types/list_account_members_params" require_relative "schematic/types/account_member_permission" -require_relative "schematic/types/account_member_role" require_relative "schematic/types/account_member_response_data" require_relative "schematic/accounts/types/list_account_members_response" require_relative "schematic/accounts/types/get_account_member_response" @@ -604,6 +604,12 @@ require_relative "schematic/integrationsapi/types/assume_stripe_installed_response" require_relative "schematic/integrationsapi/types/install_stripe_response" require_relative "schematic/integrationsapi/types/uninstall_integration_response" +require_relative "schematic/licenses/types/list_licenses_params" +require_relative "schematic/types/license_response_data" +require_relative "schematic/licenses/types/list_licenses_response" +require_relative "schematic/licenses/types/get_single_license_response" +require_relative "schematic/licenses/types/count_licenses_params" +require_relative "schematic/licenses/types/count_licenses_response" require_relative "schematic/plangroups/types/get_plan_group_params" require_relative "schematic/types/checkout_field_response_data" require_relative "schematic/types/checkout_settings_response_data" @@ -637,6 +643,9 @@ require_relative "schematic/planmigrations/types/retry_migration_response" require_relative "schematic/planmigrations/types/count_migrations_params" require_relative "schematic/planmigrations/types/count_migrations_response" +require_relative "schematic/types/plan_version_migration_preview_company_response_data" +require_relative "schematic/types/plan_version_migration_preview_response_data" +require_relative "schematic/planmigrations/types/preview_migration_response" require_relative "schematic/types/plan_view_public_response_data" require_relative "schematic/types/public_plans_response_data" require_relative "schematic/componentspublic/types/get_public_plans_response" @@ -954,6 +963,9 @@ require_relative "schematic/integrationsapi/client" require_relative "schematic/integrationsapi/types/list_integrations_request" require_relative "schematic/integrationsapi/types/start_data_import_request_body" +require_relative "schematic/licenses/client" +require_relative "schematic/licenses/types/list_licenses_request" +require_relative "schematic/licenses/types/count_licenses_request" require_relative "schematic/plangroups/client" require_relative "schematic/plangroups/types/get_plan_group_request" require_relative "schematic/plangroups/types/create_plan_group_request_body" @@ -965,6 +977,7 @@ require_relative "schematic/planmigrations/types/create_migration_input" require_relative "schematic/planmigrations/types/retry_migration_request_body" require_relative "schematic/planmigrations/types/count_migrations_request" +require_relative "schematic/planmigrations/types/preview_migration_request_body" require_relative "schematic/componentspublic/client" require_relative "schematic/scheduledcheckout/client" require_relative "schematic/scheduledcheckout/types/list_scheduled_checkouts_request" diff --git a/lib/schematic/accounts/client.rb b/lib/schematic/accounts/client.rb index 23ff762..5bd8384 100644 --- a/lib/schematic/accounts/client.rb +++ b/lib/schematic/accounts/client.rb @@ -19,16 +19,18 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String, nil] :ids # @option params [String, nil] :q + # @option params [Schematic::Types::AccountMemberRole, nil] :role # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # # @return [Schematic::Accounts::Types::ListAccountMembersResponse] def list_account_members(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids q limit offset] + query_param_names = %i[ids q role limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) + query_params["role"] = params[:role] if params.key?(:role) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) params.except(*query_param_names) @@ -95,16 +97,18 @@ def get_account_member(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String, nil] :ids # @option params [String, nil] :q + # @option params [Schematic::Types::AccountMemberRole, nil] :role # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # # @return [Schematic::Accounts::Types::CountAccountMembersResponse] def count_account_members(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids q limit offset] + query_param_names = %i[ids q role limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) + query_params["role"] = params[:role] if params.key?(:role) 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/accounts/types/count_account_members_params.rb b/lib/schematic/accounts/types/count_account_members_params.rb index 902bf6a..09d1e8b 100644 --- a/lib/schematic/accounts/types/count_account_members_params.rb +++ b/lib/schematic/accounts/types/count_account_members_params.rb @@ -9,6 +9,7 @@ class CountAccountMembersParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false end end end diff --git a/lib/schematic/accounts/types/count_account_members_request.rb b/lib/schematic/accounts/types/count_account_members_request.rb index 096388d..24ece72 100644 --- a/lib/schematic/accounts/types/count_account_members_request.rb +++ b/lib/schematic/accounts/types/count_account_members_request.rb @@ -6,6 +6,7 @@ module Types class CountAccountMembersRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false end diff --git a/lib/schematic/accounts/types/list_account_members_params.rb b/lib/schematic/accounts/types/list_account_members_params.rb index 3a52b8b..4d0f650 100644 --- a/lib/schematic/accounts/types/list_account_members_params.rb +++ b/lib/schematic/accounts/types/list_account_members_params.rb @@ -9,6 +9,7 @@ class ListAccountMembersParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false end end end diff --git a/lib/schematic/accounts/types/list_account_members_request.rb b/lib/schematic/accounts/types/list_account_members_request.rb index e015969..957a69e 100644 --- a/lib/schematic/accounts/types/list_account_members_request.rb +++ b/lib/schematic/accounts/types/list_account_members_request.rb @@ -6,6 +6,7 @@ module Types class ListAccountMembersRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false end diff --git a/lib/schematic/client.rb b/lib/schematic/client.rb index 8a9eb57..ce3376b 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.10", + "User-Agent" => "schematichq/1.4.11", "X-Fern-Language" => "Ruby", "X-Schematic-Api-Key" => api_key.to_s } @@ -92,6 +92,11 @@ def integrationsapi @integrationsapi ||= Schematic::Integrationsapi::Client.new(client: @raw_client) end + # @return [Schematic::Licenses::Client] + def licenses + @licenses ||= Schematic::Licenses::Client.new(client: @raw_client) + end + # @return [Schematic::Plangroups::Client] def plangroups @plangroups ||= Schematic::Plangroups::Client.new(client: @raw_client) diff --git a/lib/schematic/licenses/client.rb b/lib/schematic/licenses/client.rb new file mode 100644 index 0000000..817e817 --- /dev/null +++ b/lib/schematic/licenses/client.rb @@ -0,0 +1,138 @@ +# frozen_string_literal: true + +module Schematic + module Licenses + class Client + # @param client [Schematic::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :feature_ids + # @option params [String, nil] :ids + # @option params [String, nil] :name + # @option params [Integer, nil] :limit + # @option params [Integer, nil] :offset + # + # @return [Schematic::Licenses::Types::ListLicensesResponse] + def list_licenses(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[feature_ids ids name limit offset] + query_params = {} + query_params["feature_ids"] = params[:feature_ids] if params.key?(:feature_ids) + query_params["ids"] = params[:ids] if params.key?(:ids) + query_params["name"] = params[:name] if params.key?(:name) + 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: "licenses", + 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::Licenses::Types::ListLicensesResponse.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] :license_id + # + # @return [Schematic::Licenses::Types::GetSingleLicenseResponse] + def get_single_license(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: "licenses/#{URI.encode_uri_component(params[:license_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::Licenses::Types::GetSingleLicenseResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :feature_ids + # @option params [String, nil] :ids + # @option params [String, nil] :name + # @option params [Integer, nil] :limit + # @option params [Integer, nil] :offset + # + # @return [Schematic::Licenses::Types::CountLicensesResponse] + def count_licenses(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[feature_ids ids name limit offset] + query_params = {} + query_params["feature_ids"] = params[:feature_ids] if params.key?(:feature_ids) + query_params["ids"] = params[:ids] if params.key?(:ids) + query_params["name"] = params[:name] if params.key?(:name) + 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: "licenses/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::Licenses::Types::CountLicensesResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + end + end +end diff --git a/lib/schematic/licenses/types/count_licenses_params.rb b/lib/schematic/licenses/types/count_licenses_params.rb new file mode 100644 index 0000000..bca967f --- /dev/null +++ b/lib/schematic/licenses/types/count_licenses_params.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Schematic + module Licenses + module Types + # Input parameters + class CountLicensesParams < Internal::Types::Model + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/licenses/types/count_licenses_request.rb b/lib/schematic/licenses/types/count_licenses_request.rb new file mode 100644 index 0000000..e1b747b --- /dev/null +++ b/lib/schematic/licenses/types/count_licenses_request.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Licenses + module Types + class CountLicensesRequest < Internal::Types::Model + field :feature_ids, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/licenses/types/count_licenses_response.rb b/lib/schematic/licenses/types/count_licenses_response.rb new file mode 100644 index 0000000..1a5ee0b --- /dev/null +++ b/lib/schematic/licenses/types/count_licenses_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Licenses + module Types + class CountLicensesResponse < Internal::Types::Model + field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Licenses::Types::CountLicensesParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/licenses/types/get_single_license_response.rb b/lib/schematic/licenses/types/get_single_license_response.rb new file mode 100644 index 0000000..5371b78 --- /dev/null +++ b/lib/schematic/licenses/types/get_single_license_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Licenses + module Types + class GetSingleLicenseResponse < Internal::Types::Model + field :data, -> { Schematic::Types::LicenseResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/licenses/types/list_licenses_params.rb b/lib/schematic/licenses/types/list_licenses_params.rb new file mode 100644 index 0000000..9d7ba1b --- /dev/null +++ b/lib/schematic/licenses/types/list_licenses_params.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Schematic + module Licenses + module Types + # Input parameters + class ListLicensesParams < Internal::Types::Model + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/licenses/types/list_licenses_request.rb b/lib/schematic/licenses/types/list_licenses_request.rb new file mode 100644 index 0000000..a73af4f --- /dev/null +++ b/lib/schematic/licenses/types/list_licenses_request.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Licenses + module Types + class ListLicensesRequest < Internal::Types::Model + field :feature_ids, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/licenses/types/list_licenses_response.rb b/lib/schematic/licenses/types/list_licenses_response.rb new file mode 100644 index 0000000..e863e78 --- /dev/null +++ b/lib/schematic/licenses/types/list_licenses_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Licenses + module Types + class ListLicensesResponse < Internal::Types::Model + field :data, -> { Internal::Types::Array[Schematic::Types::LicenseResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Licenses::Types::ListLicensesParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/planmigrations/client.rb b/lib/schematic/planmigrations/client.rb index a7f15a8..db8cb8c 100644 --- a/lib/schematic/planmigrations/client.rb +++ b/lib/schematic/planmigrations/client.rb @@ -322,6 +322,38 @@ def count_migrations(request_options: {}, **params) raise error_class.new(response.body, code: code) end end + + # @param request_options [Hash] + # @param params [Schematic::Planmigrations::Types::PreviewMigrationRequestBody] + # @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::Planmigrations::Types::PreviewMigrationResponse] + def preview_migration(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "plan-version-migrations/preview", + body: Schematic::Planmigrations::Types::PreviewMigrationRequestBody.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::Planmigrations::Types::PreviewMigrationResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end end end end diff --git a/lib/schematic/planmigrations/types/preview_migration_request_body.rb b/lib/schematic/planmigrations/types/preview_migration_request_body.rb new file mode 100644 index 0000000..6702f2f --- /dev/null +++ b/lib/schematic/planmigrations/types/preview_migration_request_body.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Planmigrations + module Types + class PreviewMigrationRequestBody < Internal::Types::Model + field :company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id_to, -> { String }, optional: false, nullable: false + field :target_plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/planmigrations/types/preview_migration_response.rb b/lib/schematic/planmigrations/types/preview_migration_response.rb new file mode 100644 index 0000000..7a0ccb4 --- /dev/null +++ b/lib/schematic/planmigrations/types/preview_migration_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Planmigrations + module Types + class PreviewMigrationResponse < Internal::Types::Model + field :data, -> { Schematic::Types::PlanVersionMigrationPreviewResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb b/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb index 4a1d5a3..2370396 100644 --- a/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb +++ b/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb @@ -8,6 +8,7 @@ module BillingCreditGrantZeroedOutReason CUSTOMER_ARCHIVED = "customer_archived" EXPIRED = "expired" INTEGRATION_UNINSTALLED = "integration_uninstalled" + LICENSE_RETIRED = "license_retired" MANUAL = "manual" PLAN_CHANGE = "plan_change" PLAN_PERIOD_RESET = "plan_period_reset" diff --git a/lib/schematic/types/feature_detail_response_data.rb b/lib/schematic/types/feature_detail_response_data.rb index 957c497..cdda0fe 100644 --- a/lib/schematic/types/feature_detail_response_data.rb +++ b/lib/schematic/types/feature_detail_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class FeatureDetailResponseData < Internal::Types::Model field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :billing_product, -> { Schematic::Types::BillingProductResponseData }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: true, nullable: false @@ -12,6 +13,7 @@ class FeatureDetailResponseData < Internal::Types::Model field :flags, -> { Internal::Types::Array[Schematic::Types::FlagDetailResponseData] }, optional: false, nullable: false field :icon, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false field :maintainer, -> { Schematic::Types::AccountMemberResponseData }, optional: true, nullable: false field :maintainer_account_member_id, -> { String }, optional: true, nullable: false @@ -22,6 +24,7 @@ class FeatureDetailResponseData < Internal::Types::Model field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false field :trait_id, -> { String }, optional: true, nullable: false field :updated_at, -> { String }, optional: false, nullable: false + field :usage_limit_trait_id, -> { String }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/feature_in_plan_response_data.rb b/lib/schematic/types/feature_in_plan_response_data.rb index 83562e1..f7ea7e6 100644 --- a/lib/schematic/types/feature_in_plan_response_data.rb +++ b/lib/schematic/types/feature_in_plan_response_data.rb @@ -12,6 +12,7 @@ class FeatureInPlanResponseData < Internal::Types::Model field :flags, -> { Internal::Types::Array[Schematic::Types::FlagInPlanResponseData] }, optional: false, nullable: false field :icon, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false @@ -21,6 +22,7 @@ class FeatureInPlanResponseData < Internal::Types::Model field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false field :trait_id, -> { String }, optional: true, nullable: false field :updated_at, -> { String }, optional: false, nullable: false + field :usage_limit_trait_id, -> { String }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/feature_response_data.rb b/lib/schematic/types/feature_response_data.rb index e820c4b..563b538 100644 --- a/lib/schematic/types/feature_response_data.rb +++ b/lib/schematic/types/feature_response_data.rb @@ -9,6 +9,7 @@ class FeatureResponseData < Internal::Types::Model field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false field :icon, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false field :maintainer_account_member_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false @@ -16,6 +17,7 @@ class FeatureResponseData < Internal::Types::Model field :singular_name, -> { String }, optional: true, nullable: false field :trait_id, -> { String }, optional: true, nullable: false field :updated_at, -> { String }, optional: false, nullable: false + field :usage_limit_trait_id, -> { String }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/feature_type.rb b/lib/schematic/types/feature_type.rb index 822018b..e61197b 100644 --- a/lib/schematic/types/feature_type.rb +++ b/lib/schematic/types/feature_type.rb @@ -7,6 +7,7 @@ module FeatureType BOOLEAN = "boolean" EVENT = "event" + LICENSE = "license" TRAIT = "trait" end end diff --git a/lib/schematic/types/feature_view.rb b/lib/schematic/types/feature_view.rb index 9f0e079..b658b8a 100644 --- a/lib/schematic/types/feature_view.rb +++ b/lib/schematic/types/feature_view.rb @@ -5,6 +5,7 @@ module Types class FeatureView < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :billing_product, -> { Schematic::Types::BillingProductResponseData }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: false, nullable: false field :event_subtype, -> { String }, optional: true, nullable: false @@ -13,6 +14,7 @@ class FeatureView < Internal::Types::Model field :flags, -> { Internal::Types::Array[Schematic::Types::FlagView] }, optional: false, nullable: false field :icon, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false field :plans, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false diff --git a/lib/schematic/types/license_response_data.rb b/lib/schematic/types/license_response_data.rb new file mode 100644 index 0000000..ed6a4ce --- /dev/null +++ b/lib/schematic/types/license_response_data.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + class LicenseResponseData < Internal::Types::Model + field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/plan_version_migration_preview_company_response_data.rb b/lib/schematic/types/plan_version_migration_preview_company_response_data.rb new file mode 100644 index 0000000..07a20a1 --- /dev/null +++ b/lib/schematic/types/plan_version_migration_preview_company_response_data.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PlanVersionMigrationPreviewCompanyResponseData < Internal::Types::Model + field :company_id, -> { String }, optional: false, nullable: false + field :has_billing_changes, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :has_custom_pricing, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :note, -> { String }, optional: true, nullable: false + field :plan_version_id_from, -> { String }, optional: true, nullable: false + field :will_update_subscription, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/plan_version_migration_preview_response_data.rb b/lib/schematic/types/plan_version_migration_preview_response_data.rb new file mode 100644 index 0000000..b44ed27 --- /dev/null +++ b/lib/schematic/types/plan_version_migration_preview_response_data.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PlanVersionMigrationPreviewResponseData < Internal::Types::Model + field :companies, -> { Internal::Types::Array[Schematic::Types::PlanVersionMigrationPreviewCompanyResponseData] }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/version.rb b/lib/schematic/version.rb index 8606ac9..514dae7 100644 --- a/lib/schematic/version.rb +++ b/lib/schematic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Schematic - VERSION = "1.4.10" + VERSION = "1.4.11" end diff --git a/reference.md b/reference.md index eeb08eb..843d1e3 100644 --- a/reference.md +++ b/reference.md @@ -56,6 +56,7 @@ client.get_credit_ledger client.accounts.list_account_members( ids: ["ids"], q: "q", + role: "admin", limit: 1000000, offset: 1000000 ) @@ -89,6 +90,14 @@ client.accounts.list_account_members(
+**role:** `Schematic::Types::AccountMemberRole` — Filter by member role + +
+
+ +
+
+ **limit:** `Integer` — Page limit (default 100)
@@ -181,6 +190,7 @@ client.accounts.get_account_member(account_member_id: "account_member_id") client.accounts.count_account_members( ids: ["ids"], q: "q", + role: "admin", limit: 1000000, offset: 1000000 ) @@ -214,6 +224,14 @@ client.accounts.count_account_members(
+**role:** `Schematic::Types::AccountMemberRole` — Filter by member role + +
+
+ +
+
+ **limit:** `Integer` — Page limit (default 100)
@@ -18493,6 +18511,227 @@ client.integrationsapi.uninstall_integration(integration_id: "integration_id")
+ +
+ + +## licenses +
client.licenses.list_licenses() -> Schematic::Licenses::Types::ListLicensesResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.licenses.list_licenses( + feature_ids: ["feature_ids"], + ids: ["ids"], + name: "name", + limit: 1000000, + offset: 1000000 +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_ids:** `String` + +
+
+ +
+
+ +**ids:** `String` + +
+
+ +
+
+ +**name:** `String` + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `Integer` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `Schematic::Licenses::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.licenses.get_single_license(license_id) -> Schematic::Licenses::Types::GetSingleLicenseResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.licenses.get_single_license(license_id: "license_id") +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**license_id:** `String` — license_id + +
+
+ +
+
+ +**request_options:** `Schematic::Licenses::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.licenses.count_licenses() -> Schematic::Licenses::Types::CountLicensesResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.licenses.count_licenses( + feature_ids: ["feature_ids"], + ids: ["ids"], + name: "name", + limit: 1000000, + offset: 1000000 +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_ids:** `String` + +
+
+ +
+
+ +**ids:** `String` + +
+
+ +
+
+ +**name:** `String` + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `Integer` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `Schematic::Licenses::RequestOptions` + +
+
+
+
+ +
@@ -19845,6 +20084,83 @@ client.planmigrations.count_migrations( + + + + +
client.planmigrations.preview_migration(request) -> Schematic::Planmigrations::Types::PreviewMigrationResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```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" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_ids:** `Internal::Types::Array[String]` + +
+
+ +
+
+ +**plan_id:** `String` + +
+
+ +
+
+ +**plan_version_id_to:** `String` + +
+
+ +
+
+ +**target_plan_type:** `Schematic::Types::PlanType` + +
+
+ +
+
+ +**request_options:** `Schematic::Planmigrations::RequestOptions` + +
+
+
+
+ +