From 4a30333e898fd0406f9938f61b6fb65f04fa226b Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 11:57:05 +0000 Subject: [PATCH] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-ruby-sdk: 1.1.13 --- .fern/metadata.json | 2 +- Gemfile.lock | 16 +- lib/schematic.rb | 10 + lib/schematic/companies/client.rb | 8 +- .../companies/types/count_companies_params.rb | 1 + .../types/count_companies_request.rb | 1 + .../companies/types/list_companies_params.rb | 1 + .../companies/types/list_companies_request.rb | 1 + ...ng_linked_plan_entitlement_request_body.rb | 1 + .../create_plan_entitlement_request_body.rb | 1 + .../update_plan_entitlement_request_body.rb | 1 + lib/schematic/planmigrations/client.rb | 101 ++++++ .../types/create_migration_input.rb | 17 + .../types/create_migration_response.rb | 12 + .../types/retry_company_migration_response.rb | 12 + .../types/retry_migration_request_body.rb | 12 + .../types/retry_migration_response.rb | 12 + lib/schematic/plans/client.rb | 41 ++- .../plans/types/count_plans_params.rb | 1 + .../plans/types/count_plans_request.rb | 1 + .../plans/types/list_plans_params.rb | 1 + .../plans/types/list_plans_request.rb | 1 + .../mark_custom_plan_billing_paid_response.rb | 12 + lib/schematic/types/checkout_subscription.rb | 1 + .../company_plan_detail_response_data.rb | 3 +- ...eate_entitlement_in_bundle_request_body.rb | 1 + .../custom_plan_billing_response_data.rb | 1 + lib/schematic/types/integration_config.rb | 1 + lib/schematic/types/integration_type.rb | 1 + ...k_custom_plan_billing_paid_request_body.rb | 23 ++ lib/schematic/types/migration_error_code.rb | 21 ++ .../types/plan_detail_response_data.rb | 1 + .../types/plan_entitlement_response_data.rb | 1 + .../plan_group_plan_detail_response_data.rb | 3 +- lib/schematic/types/plan_price_cadence.rb | 13 + ...version_company_migration_response_data.rb | 1 + .../plan_version_migration_response_data.rb | 1 + .../types/plan_view_public_response_data.rb | 3 +- .../types/stripe_integration_config.rb | 1 - .../usage_based_entitlement_request_body.rb | 1 + .../usage_based_entitlement_response_data.rb | 1 + .../types/work_os_integration_config.rb | 10 + reference.md | 330 ++++++++++++++++++ 43 files changed, 667 insertions(+), 17 deletions(-) create mode 100644 lib/schematic/planmigrations/types/create_migration_input.rb create mode 100644 lib/schematic/planmigrations/types/create_migration_response.rb create mode 100644 lib/schematic/planmigrations/types/retry_company_migration_response.rb create mode 100644 lib/schematic/planmigrations/types/retry_migration_request_body.rb create mode 100644 lib/schematic/planmigrations/types/retry_migration_response.rb create mode 100644 lib/schematic/plans/types/mark_custom_plan_billing_paid_response.rb create mode 100644 lib/schematic/types/mark_custom_plan_billing_paid_request_body.rb create mode 100644 lib/schematic/types/migration_error_code.rb create mode 100644 lib/schematic/types/plan_price_cadence.rb create mode 100644 lib/schematic/types/work_os_integration_config.rb diff --git a/.fern/metadata.json b/.fern/metadata.json index a987ba7..30df146 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -13,6 +13,6 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "470e0f433ab9bb0e88784674fa2e1efce62ebd9b", + "originGitCommit": "a3057c10aa6a1daa708dc714c89ce943f67a722a", "sdkVersion": "1.4.2" } \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index f22d5c3..9af5490 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,7 +18,7 @@ GEM rexml hashdiff (1.2.1) io-console (0.8.2) - json (2.19.5) + json (2.19.7) language_server-protocol (3.17.0.5) lint_roller (1.1.0) method_source (1.1.0) @@ -42,7 +42,7 @@ GEM reline (0.6.3) io-console (~> 0.5) rexml (3.4.4) - rubocop (1.86.2) + rubocop (1.87.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -64,12 +64,12 @@ GEM unicode-display_width (3.2.0) unicode-emoji (~> 4.1) unicode-emoji (4.2.0) - wasmtime (44.0.0-aarch64-linux) - wasmtime (44.0.0-aarch64-linux-musl) - wasmtime (44.0.0-arm64-darwin) - wasmtime (44.0.0-x86_64-darwin) - wasmtime (44.0.0-x86_64-linux) - wasmtime (44.0.0-x86_64-linux-musl) + wasmtime (45.0.0-aarch64-linux) + wasmtime (45.0.0-aarch64-linux-musl) + wasmtime (45.0.0-arm64-darwin) + wasmtime (45.0.0-x86_64-darwin) + wasmtime (45.0.0-x86_64-linux) + wasmtime (45.0.0-x86_64-linux-musl) webmock (3.26.2) addressable (>= 2.8.0) crack (>= 0.3.2) diff --git a/lib/schematic.rb b/lib/schematic.rb index 47c5d9a..7229600 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -405,6 +405,7 @@ require_relative "schematic/plans/types/update_company_plans_response" require_relative "schematic/plans/types/list_custom_plan_billings_params" require_relative "schematic/plans/types/list_custom_plan_billings_response" +require_relative "schematic/plans/types/mark_custom_plan_billing_paid_response" require_relative "schematic/plans/types/retry_custom_plan_billing_response" require_relative "schematic/plans/types/create_custom_plan_response" require_relative "schematic/plans/types/list_plans_params" @@ -446,6 +447,7 @@ require_relative "schematic/types/company_plan_invalid_reason" require_relative "schematic/types/custom_plan_config" require_relative "schematic/types/plan_credit_grant_view" +require_relative "schematic/types/plan_price_cadence" require_relative "schematic/types/company_plan_detail_response_data" require_relative "schematic/types/compatible_plans" require_relative "schematic/types/component_capabilities" @@ -536,6 +538,7 @@ require_relative "schematic/types/integration_capabilities" require_relative "schematic/types/orb_integration_config" require_relative "schematic/types/stripe_integration_config" +require_relative "schematic/types/work_os_integration_config" require_relative "schematic/types/integration_config" require_relative "schematic/types/integrations_list_response_data" require_relative "schematic/integrationsapi/types/list_integrations_response" @@ -563,8 +566,10 @@ require_relative "schematic/plangroups/types/update_plan_group_response" require_relative "schematic/types/plan_version_company_migration_status" require_relative "schematic/planmigrations/types/list_company_migrations_params" +require_relative "schematic/types/migration_error_code" require_relative "schematic/types/plan_version_company_migration_response_data" require_relative "schematic/planmigrations/types/list_company_migrations_response" +require_relative "schematic/planmigrations/types/retry_company_migration_response" require_relative "schematic/planmigrations/types/count_company_migrations_params" require_relative "schematic/planmigrations/types/count_company_migrations_response" require_relative "schematic/types/plan_version_migration_status" @@ -572,7 +577,9 @@ 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" +require_relative "schematic/planmigrations/types/create_migration_response" require_relative "schematic/planmigrations/types/get_migration_response" +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_view_public_response_data" @@ -669,6 +676,7 @@ require_relative "schematic/types/keys_request_body" require_relative "schematic/types/plan_selection" require_relative "schematic/types/manage_plan_request" +require_relative "schematic/types/mark_custom_plan_billing_paid_request_body" require_relative "schematic/types/meter_request_body" require_relative "schematic/types/payment_method_request_body" require_relative "schematic/types/plan_bundle_action" @@ -875,6 +883,8 @@ require_relative "schematic/planmigrations/types/list_company_migrations_request" require_relative "schematic/planmigrations/types/count_company_migrations_request" require_relative "schematic/planmigrations/types/list_migrations_request" +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/componentspublic/client" require_relative "schematic/scheduledcheckout/client" diff --git a/lib/schematic/companies/client.rb b/lib/schematic/companies/client.rb index a83bb71..468217e 100644 --- a/lib/schematic/companies/client.rb +++ b/lib/schematic/companies/client.rb @@ -24,6 +24,7 @@ def initialize(client:) # @option params [String, nil] :plan_id # @option params [String, nil] :plan_ids # @option params [String, nil] :plan_version_id + # @option params [String, nil] :plan_version_ids # @option params [String, nil] :q # @option params [String, nil] :sort_order_column # @option params [Schematic::Types::SortDirection, nil] :sort_order_direction @@ -40,7 +41,7 @@ def initialize(client:) # @return [Schematic::Companies::Types::ListCompaniesResponse] def list_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset] + query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id plan_version_ids q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset] query_params = {} query_params["credit_type_ids"] = params[:credit_type_ids] if params.key?(:credit_type_ids) query_params["has_scheduled_downgrade"] = params[:has_scheduled_downgrade] if params.key?(:has_scheduled_downgrade) @@ -49,6 +50,7 @@ def list_companies(request_options: {}, **params) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids) query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) + query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids) query_params["q"] = params[:q] if params.key?(:q) query_params["sort_order_column"] = params[:sort_order_column] if params.key?(:sort_order_column) query_params["sort_order_direction"] = params[:sort_order_direction] if params.key?(:sort_order_direction) @@ -203,6 +205,7 @@ def delete_company(request_options: {}, **params) # @option params [String, nil] :plan_id # @option params [String, nil] :plan_ids # @option params [String, nil] :plan_version_id + # @option params [String, nil] :plan_version_ids # @option params [String, nil] :q # @option params [String, nil] :sort_order_column # @option params [Schematic::Types::SortDirection, nil] :sort_order_direction @@ -219,7 +222,7 @@ def delete_company(request_options: {}, **params) # @return [Schematic::Companies::Types::CountCompaniesResponse] def count_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset] + query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id plan_version_ids q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset] query_params = {} query_params["credit_type_ids"] = params[:credit_type_ids] if params.key?(:credit_type_ids) query_params["has_scheduled_downgrade"] = params[:has_scheduled_downgrade] if params.key?(:has_scheduled_downgrade) @@ -228,6 +231,7 @@ def count_companies(request_options: {}, **params) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids) query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) + query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids) query_params["q"] = params[:q] if params.key?(:q) query_params["sort_order_column"] = params[:sort_order_column] if params.key?(:sort_order_column) query_params["sort_order_direction"] = params[:sort_order_direction] if params.key?(:sort_order_direction) diff --git a/lib/schematic/companies/types/count_companies_params.rb b/lib/schematic/companies/types/count_companies_params.rb index 53a90de..9c70bec 100644 --- a/lib/schematic/companies/types/count_companies_params.rb +++ b/lib/schematic/companies/types/count_companies_params.rb @@ -14,6 +14,7 @@ class CountCompaniesParams < Internal::Types::Model field :plan_id, -> { String }, optional: true, nullable: false field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :sort_order_column, -> { String }, optional: true, nullable: false field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false diff --git a/lib/schematic/companies/types/count_companies_request.rb b/lib/schematic/companies/types/count_companies_request.rb index ad66c9f..21990bb 100644 --- a/lib/schematic/companies/types/count_companies_request.rb +++ b/lib/schematic/companies/types/count_companies_request.rb @@ -11,6 +11,7 @@ class CountCompaniesRequest < Internal::Types::Model field :plan_id, -> { String }, optional: true, nullable: false field :plan_ids, -> { String }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :sort_order_column, -> { String }, optional: true, nullable: false field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false diff --git a/lib/schematic/companies/types/list_companies_params.rb b/lib/schematic/companies/types/list_companies_params.rb index 81b25c0..99f9905 100644 --- a/lib/schematic/companies/types/list_companies_params.rb +++ b/lib/schematic/companies/types/list_companies_params.rb @@ -14,6 +14,7 @@ class ListCompaniesParams < Internal::Types::Model field :plan_id, -> { String }, optional: true, nullable: false field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :sort_order_column, -> { String }, optional: true, nullable: false field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false diff --git a/lib/schematic/companies/types/list_companies_request.rb b/lib/schematic/companies/types/list_companies_request.rb index 972e70b..552f34e 100644 --- a/lib/schematic/companies/types/list_companies_request.rb +++ b/lib/schematic/companies/types/list_companies_request.rb @@ -11,6 +11,7 @@ class ListCompaniesRequest < Internal::Types::Model field :plan_id, -> { String }, optional: true, nullable: false field :plan_ids, -> { String }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :sort_order_column, -> { String }, optional: true, nullable: false field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false diff --git a/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb index 8cddac5..a2809f9 100644 --- a/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb @@ -29,6 +29,7 @@ class CreateBillingLinkedPlanEntitlementRequestBody < Internal::Types::Model field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false field :soft_limit, -> { Integer }, optional: true, nullable: false field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_credit_id, -> { String }, optional: true, nullable: false field :value_numeric, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb index d58dd2d..bcf4484 100644 --- a/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb @@ -27,6 +27,7 @@ class CreatePlanEntitlementRequestBody < Internal::Types::Model field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false field :soft_limit, -> { Integer }, optional: true, nullable: false field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_credit_id, -> { String }, optional: true, nullable: false field :value_numeric, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb index 457e4e9..5b0aab9 100644 --- a/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb @@ -25,6 +25,7 @@ class UpdatePlanEntitlementRequestBody < Internal::Types::Model field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false field :soft_limit, -> { Integer }, optional: true, nullable: false field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_credit_id, -> { String }, optional: true, nullable: false field :value_numeric, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/planmigrations/client.rb b/lib/schematic/planmigrations/client.rb index 98343b7..a7f15a8 100644 --- a/lib/schematic/planmigrations/client.rb +++ b/lib/schematic/planmigrations/client.rb @@ -56,6 +56,38 @@ def list_company_migrations(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] :plan_version_company_migration_id + # + # @return [Schematic::Planmigrations::Types::RetryCompanyMigrationResponse] + def retry_company_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-company-migrations/#{URI.encode_uri_component(params[:plan_version_company_migration_id].to_s)}/retry", + 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::RetryCompanyMigrationResponse.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 @@ -146,6 +178,38 @@ def list_migrations(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Schematic::Planmigrations::Types::CreateMigrationInput] + # @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::CreateMigrationResponse] + def create_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", + body: Schematic::Planmigrations::Types::CreateMigrationInput.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::CreateMigrationResponse.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 @@ -178,6 +242,43 @@ def get_migration(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Schematic::Planmigrations::Types::RetryMigrationRequestBody] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :plan_version_migration_id + # + # @return [Schematic::Planmigrations::Types::RetryMigrationResponse] + def retry_migration(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request_data = Schematic::Planmigrations::Types::RetryMigrationRequestBody.new(params).to_h + non_body_param_names = ["plan_version_migration_id"] + body = request_data.except(*non_body_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "plan-version-migrations/#{URI.encode_uri_component(params[:plan_version_migration_id].to_s)}/retry", + body: body, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Planmigrations::Types::RetryMigrationResponse.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/planmigrations/types/create_migration_input.rb b/lib/schematic/planmigrations/types/create_migration_input.rb new file mode 100644 index 0000000..f619424 --- /dev/null +++ b/lib/schematic/planmigrations/types/create_migration_input.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +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 :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 :strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, 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/create_migration_response.rb b/lib/schematic/planmigrations/types/create_migration_response.rb new file mode 100644 index 0000000..046ca3e --- /dev/null +++ b/lib/schematic/planmigrations/types/create_migration_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Planmigrations + module Types + class CreateMigrationResponse < Internal::Types::Model + field :data, -> { Schematic::Types::PlanVersionMigrationResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/planmigrations/types/retry_company_migration_response.rb b/lib/schematic/planmigrations/types/retry_company_migration_response.rb new file mode 100644 index 0000000..78d0c77 --- /dev/null +++ b/lib/schematic/planmigrations/types/retry_company_migration_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Planmigrations + module Types + class RetryCompanyMigrationResponse < Internal::Types::Model + field :data, -> { Schematic::Types::PlanVersionCompanyMigrationResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/planmigrations/types/retry_migration_request_body.rb b/lib/schematic/planmigrations/types/retry_migration_request_body.rb new file mode 100644 index 0000000..7a57a6e --- /dev/null +++ b/lib/schematic/planmigrations/types/retry_migration_request_body.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Planmigrations + module Types + class RetryMigrationRequestBody < Internal::Types::Model + field :plan_version_migration_id, -> { String }, optional: false, nullable: false + field :error_codes, -> { Internal::Types::Array[Schematic::Types::MigrationErrorCode] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/planmigrations/types/retry_migration_response.rb b/lib/schematic/planmigrations/types/retry_migration_response.rb new file mode 100644 index 0000000..46ea547 --- /dev/null +++ b/lib/schematic/planmigrations/types/retry_migration_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Planmigrations + module Types + class RetryMigrationResponse < Internal::Types::Model + field :data, -> { Schematic::Types::PlanVersionMigrationResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/client.rb b/lib/schematic/plans/client.rb index d2db699..d742098 100644 --- a/lib/schematic/plans/client.rb +++ b/lib/schematic/plans/client.rb @@ -95,6 +95,39 @@ def list_custom_plan_billings(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Schematic::Types::MarkCustomPlanBillingPaidRequestBody] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :custom_plan_billing_id + # + # @return [Schematic::Plans::Types::MarkCustomPlanBillingPaidResponse] + def mark_custom_plan_billing_paid(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "PUT", + path: "custom-plan-billings/#{URI.encode_uri_component(params[:custom_plan_billing_id].to_s)}/mark-paid", + body: params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Plans::Types::MarkCustomPlanBillingPaidResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @param request_options [Hash] # @param params [Schematic::Plans::Types::RetryCustomPlanBillingRequestBody] # @option request_options [String] :base_url @@ -183,6 +216,7 @@ def create_custom_plan(request_options: {}, **params) # @option params [Schematic::Types::PlanType, nil] :plan_type # @option params [String, nil] :q # @option params [String, nil] :scoped_to_company_id + # @option params [Boolean, nil] :with_entitlements # @option params [String, nil] :without_entitlement_for # @option params [Boolean, nil] :without_paid_product_id # @option params [Integer, nil] :limit @@ -191,7 +225,7 @@ def create_custom_plan(request_options: {}, **params) # @return [Schematic::Plans::Types::ListPlansResponse] def list_plans(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id company_scoped_only exclude_company_scoped for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q scoped_to_company_id without_entitlement_for without_paid_product_id limit offset] + query_param_names = %i[company_id company_scoped_only exclude_company_scoped for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q scoped_to_company_id with_entitlements without_entitlement_for without_paid_product_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_scoped_only"] = params[:company_scoped_only] if params.key?(:company_scoped_only) @@ -205,6 +239,7 @@ def list_plans(request_options: {}, **params) query_params["plan_type"] = params[:plan_type] if params.key?(:plan_type) query_params["q"] = params[:q] if params.key?(:q) query_params["scoped_to_company_id"] = params[:scoped_to_company_id] if params.key?(:scoped_to_company_id) + query_params["with_entitlements"] = params[:with_entitlements] if params.key?(:with_entitlements) query_params["without_entitlement_for"] = params[:without_entitlement_for] if params.key?(:without_entitlement_for) query_params["without_paid_product_id"] = params[:without_paid_product_id] if params.key?(:without_paid_product_id) query_params["limit"] = params[:limit] if params.key?(:limit) @@ -540,6 +575,7 @@ def count_billing_product_match_companies(request_options: {}, **params) # @option params [Schematic::Types::PlanType, nil] :plan_type # @option params [String, nil] :q # @option params [String, nil] :scoped_to_company_id + # @option params [Boolean, nil] :with_entitlements # @option params [String, nil] :without_entitlement_for # @option params [Boolean, nil] :without_paid_product_id # @option params [Integer, nil] :limit @@ -548,7 +584,7 @@ def count_billing_product_match_companies(request_options: {}, **params) # @return [Schematic::Plans::Types::CountPlansResponse] def count_plans(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id company_scoped_only exclude_company_scoped for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q scoped_to_company_id without_entitlement_for without_paid_product_id limit offset] + query_param_names = %i[company_id company_scoped_only exclude_company_scoped for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q scoped_to_company_id with_entitlements without_entitlement_for without_paid_product_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_scoped_only"] = params[:company_scoped_only] if params.key?(:company_scoped_only) @@ -562,6 +598,7 @@ def count_plans(request_options: {}, **params) query_params["plan_type"] = params[:plan_type] if params.key?(:plan_type) query_params["q"] = params[:q] if params.key?(:q) query_params["scoped_to_company_id"] = params[:scoped_to_company_id] if params.key?(:scoped_to_company_id) + query_params["with_entitlements"] = params[:with_entitlements] if params.key?(:with_entitlements) query_params["without_entitlement_for"] = params[:without_entitlement_for] if params.key?(:without_entitlement_for) query_params["without_paid_product_id"] = params[:without_paid_product_id] if params.key?(:without_paid_product_id) query_params["limit"] = params[:limit] if params.key?(:limit) diff --git a/lib/schematic/plans/types/count_plans_params.rb b/lib/schematic/plans/types/count_plans_params.rb index d07dcb2..d2b2000 100644 --- a/lib/schematic/plans/types/count_plans_params.rb +++ b/lib/schematic/plans/types/count_plans_params.rb @@ -19,6 +19,7 @@ class CountPlansParams < Internal::Types::Model field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :scoped_to_company_id, -> { String }, optional: true, nullable: false + field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false field :without_entitlement_for, -> { String }, optional: true, nullable: false field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false end diff --git a/lib/schematic/plans/types/count_plans_request.rb b/lib/schematic/plans/types/count_plans_request.rb index ade2ee1..5ec0173 100644 --- a/lib/schematic/plans/types/count_plans_request.rb +++ b/lib/schematic/plans/types/count_plans_request.rb @@ -16,6 +16,7 @@ class CountPlansRequest < Internal::Types::Model field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :scoped_to_company_id, -> { String }, optional: true, nullable: false + field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false field :without_entitlement_for, -> { String }, optional: true, nullable: false field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/plans/types/list_plans_params.rb b/lib/schematic/plans/types/list_plans_params.rb index 4a1372b..b0313c2 100644 --- a/lib/schematic/plans/types/list_plans_params.rb +++ b/lib/schematic/plans/types/list_plans_params.rb @@ -19,6 +19,7 @@ class ListPlansParams < Internal::Types::Model field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :scoped_to_company_id, -> { String }, optional: true, nullable: false + field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false field :without_entitlement_for, -> { String }, optional: true, nullable: false field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false end diff --git a/lib/schematic/plans/types/list_plans_request.rb b/lib/schematic/plans/types/list_plans_request.rb index df56a88..393211a 100644 --- a/lib/schematic/plans/types/list_plans_request.rb +++ b/lib/schematic/plans/types/list_plans_request.rb @@ -16,6 +16,7 @@ class ListPlansRequest < Internal::Types::Model field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false field :q, -> { String }, optional: true, nullable: false field :scoped_to_company_id, -> { String }, optional: true, nullable: false + field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false field :without_entitlement_for, -> { String }, optional: true, nullable: false field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/plans/types/mark_custom_plan_billing_paid_response.rb b/lib/schematic/plans/types/mark_custom_plan_billing_paid_response.rb new file mode 100644 index 0000000..c22a686 --- /dev/null +++ b/lib/schematic/plans/types/mark_custom_plan_billing_paid_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Plans + module Types + class MarkCustomPlanBillingPaidResponse < Internal::Types::Model + field :data, -> { Schematic::Types::CustomPlanBillingResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/types/checkout_subscription.rb b/lib/schematic/types/checkout_subscription.rb index 20d3309..a2cee6b 100644 --- a/lib/schematic/types/checkout_subscription.rb +++ b/lib/schematic/types/checkout_subscription.rb @@ -16,6 +16,7 @@ class CheckoutSubscription < Internal::Types::Model field :expired_at, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :interval, -> { String }, optional: false, nullable: false + field :invoice_id, -> { String }, optional: true, nullable: false field :invoice_url, -> { String }, optional: true, nullable: false field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false field :period_end, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/company_plan_detail_response_data.rb b/lib/schematic/types/company_plan_detail_response_data.rb index 472c523..9d4c56d 100644 --- a/lib/schematic/types/company_plan_detail_response_data.rb +++ b/lib/schematic/types/company_plan_detail_response_data.rb @@ -5,6 +5,7 @@ module Types class CompanyPlanDetailResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :audience_type, -> { String }, optional: true, nullable: false + field :available_periods, -> { Internal::Types::Array[Schematic::Types::PlanPriceCadence] }, optional: false, nullable: false field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false @@ -23,7 +24,7 @@ class CompanyPlanDetailResponseData < Internal::Types::Model field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false field :description, -> { String }, optional: false, nullable: false field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false - field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: false, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/create_entitlement_in_bundle_request_body.rb b/lib/schematic/types/create_entitlement_in_bundle_request_body.rb index cb00548..b37f7e3 100644 --- a/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +++ b/lib/schematic/types/create_entitlement_in_bundle_request_body.rb @@ -26,6 +26,7 @@ class CreateEntitlementInBundleRequestBody < Internal::Types::Model field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false field :soft_limit, -> { Integer }, optional: true, nullable: false field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_credit_id, -> { String }, optional: true, nullable: false field :value_numeric, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/types/custom_plan_billing_response_data.rb b/lib/schematic/types/custom_plan_billing_response_data.rb index fc5a89f..c01f7e0 100644 --- a/lib/schematic/types/custom_plan_billing_response_data.rb +++ b/lib/schematic/types/custom_plan_billing_response_data.rb @@ -7,6 +7,7 @@ class CustomPlanBillingResponseData < Internal::Types::Model 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_id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/integration_config.rb b/lib/schematic/types/integration_config.rb index 9f27edf..735dd54 100644 --- a/lib/schematic/types/integration_config.rb +++ b/lib/schematic/types/integration_config.rb @@ -10,6 +10,7 @@ class IntegrationConfig < Internal::Types::Model member -> { Schematic::Types::ClerkIntegrationConfig }, key: "CLERK" member -> { Schematic::Types::OrbIntegrationConfig }, key: "ORB" member -> { Schematic::Types::StripeIntegrationConfig }, key: "STRIPE" + member -> { Schematic::Types::WorkOsIntegrationConfig }, key: "WORKOS" end end end diff --git a/lib/schematic/types/integration_type.rb b/lib/schematic/types/integration_type.rb index 60bd2e4..8da8aa3 100644 --- a/lib/schematic/types/integration_type.rb +++ b/lib/schematic/types/integration_type.rb @@ -9,6 +9,7 @@ module IntegrationType ORB = "orb" STRIPE = "stripe" UNKNOWN = "unknown" + WORKOS = "workos" end end end diff --git a/lib/schematic/types/mark_custom_plan_billing_paid_request_body.rb b/lib/schematic/types/mark_custom_plan_billing_paid_request_body.rb new file mode 100644 index 0000000..cc400c7 --- /dev/null +++ b/lib/schematic/types/mark_custom_plan_billing_paid_request_body.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Schematic + module Types + module MarkCustomPlanBillingPaidRequestBody + # MarkCustomPlanBillingPaidRequestBody is an alias for Hash + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/schematic/types/migration_error_code.rb b/lib/schematic/types/migration_error_code.rb new file mode 100644 index 0000000..4320571 --- /dev/null +++ b/lib/schematic/types/migration_error_code.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Schematic + module Types + module MigrationErrorCode + extend Schematic::Internal::Types::Enum + + AMBIGUOUS_SUBSCRIPTION_ITEM = "ambiguous_subscription_item" + MULTIPLE_SUBSCRIPTIONS = "multiple_subscriptions" + NO_PRICE_FOR_INTERVAL = "no_price_for_interval" + NOT_ON_ORIGIN_VERSION = "not_on_origin_version" + PERMANENT_CONFIG = "permanent_config" + PERMANENT_DECLINE = "permanent_decline" + TRANSIENT_DECLINE = "transient_decline" + TRANSIENT_INFRA = "transient_infra" + TRANSIENT_STRIPE = "transient_stripe" + UNKNOWN = "unknown" + WOULD_LEAVE_EMPTY_SUBSCRIPTION = "would_leave_empty_subscription" + end + end +end diff --git a/lib/schematic/types/plan_detail_response_data.rb b/lib/schematic/types/plan_detail_response_data.rb index aa1b769..4f52851 100644 --- a/lib/schematic/types/plan_detail_response_data.rb +++ b/lib/schematic/types/plan_detail_response_data.rb @@ -18,6 +18,7 @@ class PlanDetailResponseData < Internal::Types::Model field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false field :description, -> { String }, optional: false, nullable: false field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_entitlement_response_data.rb b/lib/schematic/types/plan_entitlement_response_data.rb index e43b2f2..78f3a95 100644 --- a/lib/schematic/types/plan_entitlement_response_data.rb +++ b/lib/schematic/types/plan_entitlement_response_data.rb @@ -25,6 +25,7 @@ class PlanEntitlementResponseData < Internal::Types::Model field :soft_limit, -> { Integer }, optional: true, nullable: false field :updated_at, -> { String }, optional: false, nullable: false field :usage_based_product, -> { Schematic::Types::BillingProductResponseData }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_credit, -> { Schematic::Types::BillingCreditResponseData }, optional: true, nullable: false field :value_numeric, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/types/plan_group_plan_detail_response_data.rb b/lib/schematic/types/plan_group_plan_detail_response_data.rb index 1324387..bdc0374 100644 --- a/lib/schematic/types/plan_group_plan_detail_response_data.rb +++ b/lib/schematic/types/plan_group_plan_detail_response_data.rb @@ -5,6 +5,7 @@ module Types class PlanGroupPlanDetailResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :audience_type, -> { String }, optional: true, nullable: false + field :available_periods, -> { Internal::Types::Array[Schematic::Types::PlanPriceCadence] }, optional: false, nullable: false field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false @@ -20,7 +21,7 @@ class PlanGroupPlanDetailResponseData < Internal::Types::Model field :custom_plan_config, -> { Schematic::Types::CustomPlanViewConfigResponseData }, optional: true, nullable: false field :description, -> { String }, optional: false, nullable: false field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false - field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: false, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_price_cadence.rb b/lib/schematic/types/plan_price_cadence.rb new file mode 100644 index 0000000..20f5815 --- /dev/null +++ b/lib/schematic/types/plan_price_cadence.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + module PlanPriceCadence + extend Schematic::Internal::Types::Enum + + MONTHLY = "monthly" + QUARTERLY = "quarterly" + YEARLY = "yearly" + end + end +end diff --git a/lib/schematic/types/plan_version_company_migration_response_data.rb b/lib/schematic/types/plan_version_company_migration_response_data.rb index e035f2b..3626429 100644 --- a/lib/schematic/types/plan_version_company_migration_response_data.rb +++ b/lib/schematic/types/plan_version_company_migration_response_data.rb @@ -8,6 +8,7 @@ class PlanVersionCompanyMigrationResponseData < Internal::Types::Model field :completed_at, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :error, -> { String }, optional: true, nullable: false + field :error_code, -> { Schematic::Types::MigrationErrorCode }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :migration_id, -> { String }, optional: false, nullable: false field :plan_version_id_from, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/plan_version_migration_response_data.rb b/lib/schematic/types/plan_version_migration_response_data.rb index 9926dfd..ed0f4e4 100644 --- a/lib/schematic/types/plan_version_migration_response_data.rb +++ b/lib/schematic/types/plan_version_migration_response_data.rb @@ -12,6 +12,7 @@ class PlanVersionMigrationResponseData < Internal::Types::Model field :plan_id, -> { String }, optional: false, nullable: false 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 :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/plan_view_public_response_data.rb b/lib/schematic/types/plan_view_public_response_data.rb index 11136a3..7d726ab 100644 --- a/lib/schematic/types/plan_view_public_response_data.rb +++ b/lib/schematic/types/plan_view_public_response_data.rb @@ -5,6 +5,7 @@ module Types class PlanViewPublicResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false field :audience_type, -> { String }, optional: true, nullable: false + field :available_periods, -> { Internal::Types::Array[Schematic::Types::PlanPriceCadence] }, optional: false, nullable: false field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false @@ -21,7 +22,7 @@ class PlanViewPublicResponseData < Internal::Types::Model field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false field :description, -> { String }, optional: false, nullable: false field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false - field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: false, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/stripe_integration_config.rb b/lib/schematic/types/stripe_integration_config.rb index adf746d..66a2b32 100644 --- a/lib/schematic/types/stripe_integration_config.rb +++ b/lib/schematic/types/stripe_integration_config.rb @@ -9,7 +9,6 @@ class StripeIntegrationConfig < Internal::Types::Model field :is_sandbox, -> { Internal::Types::Boolean }, optional: false, nullable: false field :live_mode, -> { Internal::Types::Boolean }, optional: false, nullable: false field :onboard_url, -> { String }, optional: true, nullable: false - field :version, -> { Integer }, optional: false, nullable: false end end end diff --git a/lib/schematic/types/usage_based_entitlement_request_body.rb b/lib/schematic/types/usage_based_entitlement_request_body.rb index 583cb67..5aabf57 100644 --- a/lib/schematic/types/usage_based_entitlement_request_body.rb +++ b/lib/schematic/types/usage_based_entitlement_request_body.rb @@ -20,6 +20,7 @@ class UsageBasedEntitlementRequestBody < Internal::Types::Model field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false field :soft_limit, -> { Integer }, optional: true, nullable: false field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false field :yearly_metered_price_id, -> { String }, optional: true, nullable: false field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false field :yearly_unit_price, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/types/usage_based_entitlement_response_data.rb b/lib/schematic/types/usage_based_entitlement_response_data.rb index 8831415..ce34aea 100644 --- a/lib/schematic/types/usage_based_entitlement_response_data.rb +++ b/lib/schematic/types/usage_based_entitlement_response_data.rb @@ -12,6 +12,7 @@ class UsageBasedEntitlementResponseData < Internal::Types::Model field :monthly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false field :quarterly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false field :value_numeric, -> { Integer }, optional: true, nullable: false field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false diff --git a/lib/schematic/types/work_os_integration_config.rb b/lib/schematic/types/work_os_integration_config.rb new file mode 100644 index 0000000..426a165 --- /dev/null +++ b/lib/schematic/types/work_os_integration_config.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Schematic + module Types + class WorkOsIntegrationConfig < Internal::Types::Model + field :first_events_received, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :webhook_url, -> { String }, optional: true, nullable: false + end + end +end diff --git a/reference.md b/reference.md index c264cf1..1fc6be8 100644 --- a/reference.md +++ b/reference.md @@ -6785,6 +6785,7 @@ client.companies.list_companies( plan_id: "plan_id", plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", + plan_version_ids: ["plan_version_ids"], q: "q", sort_order_column: "sort_order_column", sort_order_direction: "asc", @@ -6868,6 +6869,14 @@ client.companies.list_companies(
client.plans.mark_custom_plan_billing_paid(custom_plan_billing_id, request) -> Schematic::Plans::Types::MarkCustomPlanBillingPaidResponseclient.planmigrations.retry_company_migration(plan_version_company_migration_id) -> Schematic::Planmigrations::Types::RetryCompanyMigrationResponseclient.planmigrations.create_migration(request) -> Schematic::Planmigrations::Types::CreateMigrationResponseclient.planmigrations.retry_migration(plan_version_migration_id, request) -> Schematic::Planmigrations::Types::RetryMigrationResponse