diff --git a/.fern/metadata.json b/.fern/metadata.json index f90f9ad..168e99f 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -13,6 +13,6 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "340529eacf4f1dcc5522e771872c1dd94b9c4891", - "sdkVersion": "1.4.11" + "originGitCommit": "a9fc73b97dcfa602bff97a7d41d980a55c9c9030", + "sdkVersion": "1.4.12" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock index 8978bef..dfc8ec1 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -48,14 +48,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-ruby-sdk: 1.1.13 -current_generation: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf + - commit_sha: 4c98e0c88a5af9323ad047925ea28dec7a8bf762 + tree_hash: 5938d855931f4f2f06decd637d97c2d609434891 + timestamp: 2026-08-03T11:04:40.862Z + cli_version: unknown + generator_versions: + fernapi/fern-ruby-sdk: 1.1.13 +current_generation: 4c98e0c88a5af9323ad047925ea28dec7a8bf762 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: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf + base_generation: 4c98e0c88a5af9323ad047925ea28dec7a8bf762 files: - test/rules_engine_clock_test.rb patch_content: | @@ -223,7 +229,7 @@ patches: original_commit: ee61788c5a83fce5dd5768b2536391459550d176 original_message: fix rubocop offenses in clock regression test (SCHY-471) original_author: Christopher Brady - base_generation: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf + base_generation: 4c98e0c88a5af9323ad047925ea28dec7a8bf762 files: - test/rules_engine_clock_test.rb patch_content: | diff --git a/Gemfile.lock b/Gemfile.lock index 1c897e5..fed6652 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - schematichq (1.4.11) + schematichq (1.4.12) wasmtime (>= 19.0) websocket (>= 1.2) @@ -18,7 +18,7 @@ GEM rexml hashdiff (1.2.1) io-console (0.8.2) - json (2.21.1) + json (2.21.2) language_server-protocol (3.17.0.6) lint_roller (1.1.0) method_source (1.1.0) diff --git a/lib/schematic.rb b/lib/schematic.rb index 5e1d384..147e8eb 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -188,6 +188,7 @@ require_relative "schematic/types/billing_credit_auto_topup_availability" require_relative "schematic/types/billing_plan_credit_grant_reset_start" require_relative "schematic/types/billing_plan_credit_grant_reset_type" +require_relative "schematic/types/plan_credit_grant_scaling" require_relative "schematic/types/preview_object_response_data" require_relative "schematic/types/billing_plan_credit_grant_response_data" require_relative "schematic/credits/types/list_billing_plan_credit_grants_response" @@ -313,6 +314,7 @@ require_relative "schematic/checkout/types/preview_checkout_internal_response" require_relative "schematic/types/company_billing_address_view" require_relative "schematic/types/company_billing_checkout_settings" +require_relative "schematic/types/company_tax_id_view" require_relative "schematic/types/company_billing_details_response_data" require_relative "schematic/checkout/types/get_company_billing_details_response" require_relative "schematic/checkout/types/update_company_billing_details_response" @@ -444,6 +446,16 @@ require_relative "schematic/entitlements/types/duplicate_plan_entitlements_response" require_relative "schematic/entitlements/types/get_feature_usage_by_company_params" require_relative "schematic/entitlements/types/get_feature_usage_by_company_response" +require_relative "schematic/entitlements/types/get_user_usage_by_company_params" +require_relative "schematic/types/user_credit_usage_response_data" +require_relative "schematic/types/user_feature_usage_response_data" +require_relative "schematic/types/user_usage_by_company_response_data" +require_relative "schematic/entitlements/types/get_user_usage_by_company_response" +require_relative "schematic/entitlements/types/get_user_usage_detail_params" +require_relative "schematic/types/user_daily_credit_point_response_data" +require_relative "schematic/types/user_daily_usage_point_response_data" +require_relative "schematic/types/user_usage_detail_response_data" +require_relative "schematic/entitlements/types/get_user_usage_detail_response" require_relative "schematic/plans/types/update_company_plans_response" require_relative "schematic/plans/types/list_custom_plan_billings_params" require_relative "schematic/plans/types/list_custom_plan_billings_response" @@ -493,6 +505,7 @@ require_relative "schematic/types/company_plan_detail_response_data" require_relative "schematic/types/compatible_plans" require_relative "schematic/types/component_capabilities" +require_relative "schematic/types/proration_behavior" require_relative "schematic/types/component_checkout_settings" require_relative "schematic/types/component_display_settings" require_relative "schematic/types/credit_transfer_view" @@ -762,7 +775,6 @@ require_relative "schematic/types/plan_bundle_credit_grant_request_body" require_relative "schematic/types/plan_bundle_entitlement_request_body" require_relative "schematic/types/plan_currency_price_request_body" -require_relative "schematic/types/proration_behavior" require_relative "schematic/types/release_credit_lease_request_body" require_relative "schematic/types/rule_condition_group_response_data" require_relative "schematic/types/rule_condition_response_data" @@ -789,6 +801,8 @@ require_relative "schematic/types/rulesengine_flag" require_relative "schematic/types/rulesengine_user" require_relative "schematic/types/scheduled_downgrade_config_behavior" +require_relative "schematic/types/tax_id_type" +require_relative "schematic/types/tax_id_input" require_relative "schematic/types/temporary_access_token_response_data" require_relative "schematic/types/update_entitlement_req_common" require_relative "schematic/types/update_plan_request_body" @@ -912,6 +926,8 @@ require_relative "schematic/entitlements/types/count_plan_entitlements_request" require_relative "schematic/entitlements/types/duplicate_plan_entitlements_request_body" require_relative "schematic/entitlements/types/get_feature_usage_by_company_request" +require_relative "schematic/entitlements/types/get_user_usage_by_company_request" +require_relative "schematic/entitlements/types/get_user_usage_detail_request" require_relative "schematic/plans/client" require_relative "schematic/plans/types/update_company_plans_request_body" require_relative "schematic/plans/types/list_custom_plan_billings_request" diff --git a/lib/schematic/accounts/types/create_api_key_request_body.rb b/lib/schematic/accounts/types/create_api_key_request_body.rb index 1e30ca8..c0b2b6c 100644 --- a/lib/schematic/accounts/types/create_api_key_request_body.rb +++ b/lib/schematic/accounts/types/create_api_key_request_body.rb @@ -7,6 +7,7 @@ class CreateApiKeyRequestBody < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false field :environment_id, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false + field :rate_limit_percent, -> { Integer }, optional: true, nullable: false field :readonly, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/update_api_key_request_body.rb b/lib/schematic/accounts/types/update_api_key_request_body.rb index 64b03bb..e07db1f 100644 --- a/lib/schematic/accounts/types/update_api_key_request_body.rb +++ b/lib/schematic/accounts/types/update_api_key_request_body.rb @@ -7,6 +7,7 @@ class UpdateApiKeyRequestBody < Internal::Types::Model field :api_key_id, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false + field :rate_limit_percent, -> { Integer }, optional: true, nullable: false end end end diff --git a/lib/schematic/billing/client.rb b/lib/schematic/billing/client.rb index c0da2c7..f86d1a6 100644 --- a/lib/schematic/billing/client.rb +++ b/lib/schematic/billing/client.rb @@ -582,6 +582,7 @@ def delete_payment_method_by_external_id(request_options: {}, **params) # @option params [Boolean, nil] :for_trial_expiry_plan # @option params [String, nil] :ids # @option params [String, nil] :interval + # @option params [Integer, nil] :interval_count # @option params [Boolean, nil] :is_active # @option params [String, nil] :plan_version_id # @option params [Integer, nil] :price @@ -598,13 +599,14 @@ def delete_payment_method_by_external_id(request_options: {}, **params) # @return [Schematic::Billing::Types::ListBillingPricesResponse] def list_billing_prices(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset] + query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval interval_count is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset] query_params = {} query_params["currency"] = params[:currency] if params.key?(:currency) query_params["for_initial_plan"] = params[:for_initial_plan] if params.key?(:for_initial_plan) query_params["for_trial_expiry_plan"] = params[:for_trial_expiry_plan] if params.key?(:for_trial_expiry_plan) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["interval"] = params[:interval] if params.key?(:interval) + query_params["interval_count"] = params[:interval_count] if params.key?(:interval_count) query_params["is_active"] = params[:is_active] if params.key?(:is_active) query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["price"] = params[:price] if params.key?(:price) @@ -716,6 +718,7 @@ def delete_billing_product(request_options: {}, **params) # @option params [Boolean, nil] :for_trial_expiry_plan # @option params [String, nil] :ids # @option params [String, nil] :interval + # @option params [Integer, nil] :interval_count # @option params [Boolean, nil] :is_active # @option params [String, nil] :plan_version_id # @option params [Integer, nil] :price @@ -732,13 +735,14 @@ def delete_billing_product(request_options: {}, **params) # @return [Schematic::Billing::Types::ListBillingProductPricesResponse] def list_billing_product_prices(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset] + query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval interval_count is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset] query_params = {} query_params["currency"] = params[:currency] if params.key?(:currency) query_params["for_initial_plan"] = params[:for_initial_plan] if params.key?(:for_initial_plan) query_params["for_trial_expiry_plan"] = params[:for_trial_expiry_plan] if params.key?(:for_trial_expiry_plan) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["interval"] = params[:interval] if params.key?(:interval) + query_params["interval_count"] = params[:interval_count] if params.key?(:interval_count) query_params["is_active"] = params[:is_active] if params.key?(:is_active) query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["price"] = params[:price] if params.key?(:price) diff --git a/lib/schematic/billing/types/list_billing_prices_params.rb b/lib/schematic/billing/types/list_billing_prices_params.rb index d94a838..4e92fba 100644 --- a/lib/schematic/billing/types/list_billing_prices_params.rb +++ b/lib/schematic/billing/types/list_billing_prices_params.rb @@ -10,6 +10,7 @@ class ListBillingPricesParams < Internal::Types::Model field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :interval, -> { String }, optional: true, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/billing/types/list_billing_prices_request.rb b/lib/schematic/billing/types/list_billing_prices_request.rb index 9c86a3b..b113650 100644 --- a/lib/schematic/billing/types/list_billing_prices_request.rb +++ b/lib/schematic/billing/types/list_billing_prices_request.rb @@ -9,6 +9,7 @@ class ListBillingPricesRequest < Internal::Types::Model field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :ids, -> { String }, optional: true, nullable: false field :interval, -> { String }, optional: true, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false field :price, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/billing/types/list_billing_product_prices_params.rb b/lib/schematic/billing/types/list_billing_product_prices_params.rb index 8499c91..48b1db3 100644 --- a/lib/schematic/billing/types/list_billing_product_prices_params.rb +++ b/lib/schematic/billing/types/list_billing_product_prices_params.rb @@ -10,6 +10,7 @@ class ListBillingProductPricesParams < Internal::Types::Model field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :interval, -> { String }, optional: true, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/billing/types/list_billing_product_prices_request.rb b/lib/schematic/billing/types/list_billing_product_prices_request.rb index f6e4d5c..522f938 100644 --- a/lib/schematic/billing/types/list_billing_product_prices_request.rb +++ b/lib/schematic/billing/types/list_billing_product_prices_request.rb @@ -9,6 +9,7 @@ class ListBillingProductPricesRequest < Internal::Types::Model field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false field :ids, -> { String }, optional: true, nullable: false field :interval, -> { String }, optional: true, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false field :price, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/catalogs/types/create_catalog_request_body.rb b/lib/schematic/catalogs/types/create_catalog_request_body.rb index da0fed6..7a9d4da 100644 --- a/lib/schematic/catalogs/types/create_catalog_request_body.rb +++ b/lib/schematic/catalogs/types/create_catalog_request_body.rb @@ -5,7 +5,6 @@ module Catalogs module Types class CreateCatalogRequestBody < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false - field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/update_company_billing_details_request_body.rb b/lib/schematic/checkout/types/update_company_billing_details_request_body.rb index 7d45960..1fa49ef 100644 --- a/lib/schematic/checkout/types/update_company_billing_details_request_body.rb +++ b/lib/schematic/checkout/types/update_company_billing_details_request_body.rb @@ -8,6 +8,7 @@ class UpdateCompanyBillingDetailsRequestBody < Internal::Types::Model field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false field :email, -> { String }, optional: true, nullable: false field :phone, -> { String }, optional: true, nullable: false + field :tax_id, -> { Schematic::Types::TaxIdInput }, optional: true, nullable: false field :values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false end end diff --git a/lib/schematic/client.rb b/lib/schematic/client.rb index ce3376b..6ebf58b 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.11", + "User-Agent" => "schematichq/1.4.12", "X-Fern-Language" => "Ruby", "X-Schematic-Api-Key" => api_key.to_s } diff --git a/lib/schematic/entitlements/client.rb b/lib/schematic/entitlements/client.rb index dc0b9fd..afbd8ff 100644 --- a/lib/schematic/entitlements/client.rb +++ b/lib/schematic/entitlements/client.rb @@ -931,6 +931,94 @@ def get_feature_usage_by_company(request_options: {}, **params) 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] :company_id + # @option params [String, nil] :end_time + # @option params [String, nil] :feature_id + # @option params [String, nil] :start_time + # + # @return [Schematic::Entitlements::Types::GetUserUsageByCompanyResponse] + def get_user_usage_by_company(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[company_id end_time feature_id start_time] + query_params = {} + query_params["company_id"] = params[:company_id] if params.key?(:company_id) + query_params["end_time"] = params[:end_time] if params.key?(:end_time) + query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) + query_params["start_time"] = params[:start_time] if params.key?(:start_time) + params.except(*query_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "user-usage-by-company", + 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::Entitlements::Types::GetUserUsageByCompanyResponse.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] :company_id + # @option params [String, nil] :end_time + # @option params [String, nil] :start_time + # @option params [String] :user_id + # + # @return [Schematic::Entitlements::Types::GetUserUsageDetailResponse] + def get_user_usage_detail(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[company_id end_time start_time user_id] + query_params = {} + query_params["company_id"] = params[:company_id] if params.key?(:company_id) + query_params["end_time"] = params[:end_time] if params.key?(:end_time) + query_params["start_time"] = params[:start_time] if params.key?(:start_time) + query_params["user_id"] = params[:user_id] if params.key?(:user_id) + params.except(*query_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "user-usage-detail", + 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::Entitlements::Types::GetUserUsageDetailResponse.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/entitlements/types/get_user_usage_by_company_params.rb b/lib/schematic/entitlements/types/get_user_usage_by_company_params.rb new file mode 100644 index 0000000..d9e0e46 --- /dev/null +++ b/lib/schematic/entitlements/types/get_user_usage_by_company_params.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + # Input parameters + class GetUserUsageByCompanyParams < Internal::Types::Model + field :company_id, -> { String }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb b/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb new file mode 100644 index 0000000..afd2d68 --- /dev/null +++ b/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + class GetUserUsageByCompanyRequest < Internal::Types::Model + field :company_id, -> { String }, optional: false, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb b/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb new file mode 100644 index 0000000..59df4cf --- /dev/null +++ b/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + class GetUserUsageByCompanyResponse < Internal::Types::Model + field :data, -> { Schematic::Types::UserUsageByCompanyResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::GetUserUsageByCompanyParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/entitlements/types/get_user_usage_detail_params.rb b/lib/schematic/entitlements/types/get_user_usage_detail_params.rb new file mode 100644 index 0000000..01b4396 --- /dev/null +++ b/lib/schematic/entitlements/types/get_user_usage_detail_params.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + # Input parameters + class GetUserUsageDetailParams < Internal::Types::Model + field :company_id, -> { String }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/entitlements/types/get_user_usage_detail_request.rb b/lib/schematic/entitlements/types/get_user_usage_detail_request.rb new file mode 100644 index 0000000..ef2087b --- /dev/null +++ b/lib/schematic/entitlements/types/get_user_usage_detail_request.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + class GetUserUsageDetailRequest < Internal::Types::Model + field :company_id, -> { String }, optional: false, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/entitlements/types/get_user_usage_detail_response.rb b/lib/schematic/entitlements/types/get_user_usage_detail_response.rb new file mode 100644 index 0000000..6cdd6f8 --- /dev/null +++ b/lib/schematic/entitlements/types/get_user_usage_detail_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + class GetUserUsageDetailResponse < Internal::Types::Model + field :data, -> { Schematic::Types::UserUsageDetailResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::GetUserUsageDetailParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/plans/types/publish_plan_version_request_body.rb b/lib/schematic/plans/types/publish_plan_version_request_body.rb index 42f4fb8..cf4c3e9 100644 --- a/lib/schematic/plans/types/publish_plan_version_request_body.rb +++ b/lib/schematic/plans/types/publish_plan_version_request_body.rb @@ -6,11 +6,16 @@ module Types class PublishPlanVersionRequestBody < Internal::Types::Model field :plan_id, -> { String }, optional: false, nullable: false field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false + field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false field :coupon_external_id, -> { String }, optional: true, nullable: false + field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: true, nullable: false field :customer_email, -> { String }, optional: true, nullable: false field :days_until_due, -> { Integer }, optional: true, nullable: false field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :migration_strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false + field :phone, -> { String }, optional: true, nullable: false + field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :tax_id, -> { Schematic::Types::TaxIdInput }, optional: true, nullable: false end end end diff --git a/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb b/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb index 3160ed6..e8fa24e 100644 --- a/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +++ b/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb @@ -8,6 +8,7 @@ class RetryCustomPlanBillingRequestBody < Internal::Types::Model field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false field :customer_email, -> { String }, optional: false, nullable: false field :days_until_due, -> { Integer }, optional: true, nullable: false + field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/api_key_create_response_data.rb b/lib/schematic/types/api_key_create_response_data.rb index 168b3e5..868c8d8 100644 --- a/lib/schematic/types/api_key_create_response_data.rb +++ b/lib/schematic/types/api_key_create_response_data.rb @@ -11,6 +11,7 @@ class ApiKeyCreateResponseData < Internal::Types::Model field :integration, -> { Schematic::Types::ApiKeyIntegrationResponseData }, optional: true, nullable: false field :last_used_at, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false + field :rate_limit_percent, -> { Integer }, optional: true, nullable: false field :readonly, -> { Internal::Types::Boolean }, optional: false, nullable: false field :scopes, -> { Internal::Types::Array[Schematic::Types::ApiKeyScope] }, optional: false, nullable: false field :secret, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/api_key_response_data.rb b/lib/schematic/types/api_key_response_data.rb index 457bf49..1097c8a 100644 --- a/lib/schematic/types/api_key_response_data.rb +++ b/lib/schematic/types/api_key_response_data.rb @@ -11,6 +11,7 @@ class ApiKeyResponseData < Internal::Types::Model field :integration, -> { Schematic::Types::ApiKeyIntegrationResponseData }, optional: true, nullable: false field :last_used_at, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false + field :rate_limit_percent, -> { Integer }, optional: true, nullable: false field :readonly, -> { Internal::Types::Boolean }, optional: false, nullable: false field :scopes, -> { Internal::Types::Array[Schematic::Types::ApiKeyScope] }, optional: false, nullable: false field :updated_at, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/billing_plan_credit_grant_response_data.rb b/lib/schematic/types/billing_plan_credit_grant_response_data.rb index 113dc01..2f9800b 100644 --- a/lib/schematic/types/billing_plan_credit_grant_response_data.rb +++ b/lib/schematic/types/billing_plan_credit_grant_response_data.rb @@ -25,6 +25,7 @@ class BillingPlanCreditGrantResponseData < Internal::Types::Model field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false field :expiry_unit_count, -> { Integer }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false field :plan, -> { Schematic::Types::PreviewObjectResponseData }, optional: true, nullable: false field :plan_id, -> { String }, optional: false, nullable: false field :plan_name, -> { String }, optional: false, nullable: false @@ -33,6 +34,7 @@ class BillingPlanCreditGrantResponseData < Internal::Types::Model field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false field :rollover_percentage, -> { Integer }, optional: false, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/catalog_config_ordered_entitlement.rb b/lib/schematic/types/catalog_config_ordered_entitlement.rb index 8369110..ddaa6de 100644 --- a/lib/schematic/types/catalog_config_ordered_entitlement.rb +++ b/lib/schematic/types/catalog_config_ordered_entitlement.rb @@ -3,7 +3,7 @@ module Schematic module Types class CatalogConfigOrderedEntitlement < Internal::Types::Model - field :plan_entitlement_id, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false field :visible, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb b/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb index 8133a55..c9f15c2 100644 --- a/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb +++ b/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb @@ -3,7 +3,7 @@ module Schematic module Types class CatalogConfigOrderedEntitlementResponseData < Internal::Types::Model - field :plan_entitlement_id, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false field :visible, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/catalog_response_data.rb b/lib/schematic/types/catalog_response_data.rb index b149fc1..6bb93db 100644 --- a/lib/schematic/types/catalog_response_data.rb +++ b/lib/schematic/types/catalog_response_data.rb @@ -10,7 +10,6 @@ class CatalogResponseData < Internal::Types::Model field :custom_plan_price_text, -> { String }, optional: true, nullable: false field :custom_plans_visible, -> { Internal::Types::Boolean }, optional: false, nullable: false field :description, -> { String }, optional: true, nullable: false - field :environment_id, -> { String }, optional: false, nullable: false field :id, -> { String }, optional: false, nullable: false field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false field :name, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/company_billing_details_response_data.rb b/lib/schematic/types/company_billing_details_response_data.rb index 194a046..6364343 100644 --- a/lib/schematic/types/company_billing_details_response_data.rb +++ b/lib/schematic/types/company_billing_details_response_data.rb @@ -8,6 +8,7 @@ class CompanyBillingDetailsResponseData < Internal::Types::Model field :custom_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false field :email, -> { String }, optional: true, nullable: false field :phone, -> { String }, optional: true, nullable: false + field :tax_ids, -> { Internal::Types::Array[Schematic::Types::CompanyTaxIdView] }, optional: false, nullable: false end end end diff --git a/lib/schematic/types/company_billing_details_view.rb b/lib/schematic/types/company_billing_details_view.rb index f745e5a..3910fb3 100644 --- a/lib/schematic/types/company_billing_details_view.rb +++ b/lib/schematic/types/company_billing_details_view.rb @@ -8,6 +8,7 @@ class CompanyBillingDetailsView < Internal::Types::Model field :custom_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false field :email, -> { String }, optional: true, nullable: false field :phone, -> { String }, optional: true, nullable: false + field :tax_ids, -> { Internal::Types::Array[Schematic::Types::CompanyTaxIdView] }, optional: false, nullable: false end end end diff --git a/lib/schematic/types/company_plan_credit_grant_view.rb b/lib/schematic/types/company_plan_credit_grant_view.rb index 8ed4501..5ce308a 100644 --- a/lib/schematic/types/company_plan_credit_grant_view.rb +++ b/lib/schematic/types/company_plan_credit_grant_view.rb @@ -28,6 +28,7 @@ class CompanyPlanCreditGrantView < Internal::Types::Model field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false field :expiry_unit_count, -> { Integer }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false field :plan, -> { Schematic::Types::GenericPreviewObject }, optional: true, nullable: false field :plan_id, -> { String }, optional: false, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false @@ -36,6 +37,7 @@ class CompanyPlanCreditGrantView < Internal::Types::Model field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: false, nullable: false field :rollover_percentage, -> { Integer }, optional: false, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false field :singular_name, -> { String }, optional: true, nullable: false field :updated_at, -> { String }, optional: false, nullable: false end diff --git a/lib/schematic/types/company_plan_detail_response_data.rb b/lib/schematic/types/company_plan_detail_response_data.rb index f80c3a3..2077bf9 100644 --- a/lib/schematic/types/company_plan_detail_response_data.rb +++ b/lib/schematic/types/company_plan_detail_response_data.rb @@ -35,7 +35,7 @@ class CompanyPlanDetailResponseData < Internal::Types::Model field :invalid_reason, -> { Schematic::Types::CompanyPlanInvalidReason }, optional: true, nullable: false field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false - field :is_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/company_tax_id_view.rb b/lib/schematic/types/company_tax_id_view.rb new file mode 100644 index 0000000..f1df16a --- /dev/null +++ b/lib/schematic/types/company_tax_id_view.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CompanyTaxIdView < Internal::Types::Model + field :country, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :type, -> { String }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false + field :verification_status, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/component_checkout_settings.rb b/lib/schematic/types/component_checkout_settings.rb index fb222fe..6bbc6bd 100644 --- a/lib/schematic/types/component_checkout_settings.rb +++ b/lib/schematic/types/component_checkout_settings.rb @@ -6,6 +6,7 @@ class ComponentCheckoutSettings < Internal::Types::Model field :collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false field :collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false field :collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :proration_behavior, -> { Schematic::Types::ProrationBehavior }, optional: false, nullable: false field :tax_collection_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb b/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb index 8d590da..266c415 100644 --- a/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +++ b/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb @@ -20,12 +20,14 @@ class CreateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :license_id, -> { String }, optional: true, nullable: false field :plan_id, -> { String }, optional: false, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false field :rollover_percentage, -> { Integer }, optional: true, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/custom_plan_billing_response_data.rb b/lib/schematic/types/custom_plan_billing_response_data.rb index c01f7e0..9dc3b45 100644 --- a/lib/schematic/types/custom_plan_billing_response_data.rb +++ b/lib/schematic/types/custom_plan_billing_response_data.rb @@ -12,6 +12,7 @@ class CustomPlanBillingResponseData < Internal::Types::Model field :paid_at, -> { String }, optional: true, nullable: false field :plan_id, -> { String }, optional: false, nullable: false field :published_at, -> { String }, optional: true, nullable: false + field :send_invoice, -> { Internal::Types::Boolean }, optional: false, nullable: false field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: false, nullable: false field :stripe_invoice_url, -> { String }, optional: true, nullable: false field :updated_at, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_credit_grant_scaling.rb b/lib/schematic/types/plan_credit_grant_scaling.rb new file mode 100644 index 0000000..b81c330 --- /dev/null +++ b/lib/schematic/types/plan_credit_grant_scaling.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module PlanCreditGrantScaling + extend Schematic::Internal::Types::Enum + + FIXED = "fixed" + PER_LICENSE = "per_license" + end + end +end diff --git a/lib/schematic/types/plan_credit_grant_view.rb b/lib/schematic/types/plan_credit_grant_view.rb index 5e18889..4ed4012 100644 --- a/lib/schematic/types/plan_credit_grant_view.rb +++ b/lib/schematic/types/plan_credit_grant_view.rb @@ -25,6 +25,7 @@ class PlanCreditGrantView < Internal::Types::Model field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false field :expiry_unit_count, -> { Integer }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false field :plan, -> { Schematic::Types::GenericPreviewObject }, optional: true, nullable: false field :plan_id, -> { String }, optional: false, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false @@ -33,6 +34,7 @@ class PlanCreditGrantView < Internal::Types::Model field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: false, nullable: false field :rollover_percentage, -> { Integer }, optional: false, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false field :singular_name, -> { String }, optional: true, nullable: false field :updated_at, -> { String }, optional: false, nullable: false end diff --git a/lib/schematic/types/plan_detail_response_data.rb b/lib/schematic/types/plan_detail_response_data.rb index 36b1ad0..f7429a5 100644 --- a/lib/schematic/types/plan_detail_response_data.rb +++ b/lib/schematic/types/plan_detail_response_data.rb @@ -27,7 +27,7 @@ class PlanDetailResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false - field :is_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false field :name, -> { String }, optional: false, 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 a46ab23..a85e079 100644 --- a/lib/schematic/types/plan_group_plan_detail_response_data.rb +++ b/lib/schematic/types/plan_group_plan_detail_response_data.rb @@ -31,7 +31,7 @@ class PlanGroupPlanDetailResponseData < Internal::Types::Model field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false - field :is_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false field :name, -> { String }, 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 1f3a185..4a3305d 100644 --- a/lib/schematic/types/plan_view_public_response_data.rb +++ b/lib/schematic/types/plan_view_public_response_data.rb @@ -32,7 +32,7 @@ class PlanViewPublicResponseData < Internal::Types::Model field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantView] }, optional: false, nullable: false field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false - field :is_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false field :name, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/tax_id_input.rb b/lib/schematic/types/tax_id_input.rb new file mode 100644 index 0000000..8d7679e --- /dev/null +++ b/lib/schematic/types/tax_id_input.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Schematic + module Types + class TaxIdInput < Internal::Types::Model + field :type, -> { Schematic::Types::TaxIdType }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/tax_id_type.rb b/lib/schematic/types/tax_id_type.rb new file mode 100644 index 0000000..83022dd --- /dev/null +++ b/lib/schematic/types/tax_id_type.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +module Schematic + module Types + module TaxIdType + extend Schematic::Internal::Types::Enum + + AE_TRN = "ae_trn" + AU_ABN = "au_abn" + AU_ARN = "au_arn" + BR_CNPJ = "br_cnpj" + BR_CPF = "br_cpf" + CA_BN = "ca_bn" + CA_GST_HST = "ca_gst_hst" + CA_PST_BC = "ca_pst_bc" + CA_PST_MB = "ca_pst_mb" + CA_PST_SK = "ca_pst_sk" + CA_QST = "ca_qst" + CH_UID = "ch_uid" + CH_VAT = "ch_vat" + EU_VAT = "eu_vat" + GB_VAT = "gb_vat" + HK_BR = "hk_br" + ID_NPWP = "id_npwp" + IL_VAT = "il_vat" + IN_GST = "in_gst" + JP_CN = "jp_cn" + JP_RN = "jp_rn" + JP_TRN = "jp_trn" + KR_BRN = "kr_brn" + MX_RFC = "mx_rfc" + MY_FRP = "my_frp" + MY_ITN = "my_itn" + MY_SST = "my_sst" + NO_VAT = "no_vat" + NZ_GST = "nz_gst" + PH_TIN = "ph_tin" + SA_VAT = "sa_vat" + SG_GST = "sg_gst" + SG_UEN = "sg_uen" + TH_VAT = "th_vat" + TR_TIN = "tr_tin" + TW_VAT = "tw_vat" + US_EIN = "us_ein" + ZA_VAT = "za_vat" + end + end +end diff --git a/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb b/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb index 9783ae2..873c93e 100644 --- a/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +++ b/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb @@ -19,10 +19,12 @@ class UpdateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :license_id, -> { String }, optional: true, nullable: false field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false field :rollover_percentage, -> { Integer }, optional: true, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/user_credit_usage_response_data.rb b/lib/schematic/types/user_credit_usage_response_data.rb new file mode 100644 index 0000000..d8a3768 --- /dev/null +++ b/lib/schematic/types/user_credit_usage_response_data.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Types + class UserCreditUsageResponseData < Internal::Types::Model + field :billing_credit_id, -> { String }, optional: false, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :credits_used, -> { Integer }, optional: false, nullable: false + field :share, -> { Integer }, optional: false, nullable: false + field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/user_daily_credit_point_response_data.rb b/lib/schematic/types/user_daily_credit_point_response_data.rb new file mode 100644 index 0000000..6b4a703 --- /dev/null +++ b/lib/schematic/types/user_daily_credit_point_response_data.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Schematic + module Types + class UserDailyCreditPointResponseData < Internal::Types::Model + field :credits_used, -> { Integer }, optional: false, nullable: false + field :date, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/user_daily_usage_point_response_data.rb b/lib/schematic/types/user_daily_usage_point_response_data.rb new file mode 100644 index 0000000..074bd8e --- /dev/null +++ b/lib/schematic/types/user_daily_usage_point_response_data.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Types + class UserDailyUsagePointResponseData < Internal::Types::Model + field :date, -> { String }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :value, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/user_feature_usage_response_data.rb b/lib/schematic/types/user_feature_usage_response_data.rb new file mode 100644 index 0000000..05452c7 --- /dev/null +++ b/lib/schematic/types/user_feature_usage_response_data.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Schematic + module Types + class UserFeatureUsageResponseData < Internal::Types::Model + field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :last_seen, -> { String }, optional: false, nullable: false + field :share, -> { Integer }, optional: false, nullable: false + field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :value, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/user_usage_by_company_response_data.rb b/lib/schematic/types/user_usage_by_company_response_data.rb new file mode 100644 index 0000000..400a87e --- /dev/null +++ b/lib/schematic/types/user_usage_by_company_response_data.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + class UserUsageByCompanyResponseData < Internal::Types::Model + field :credits, -> { Internal::Types::Array[Schematic::Types::UserCreditUsageResponseData] }, optional: false, nullable: false + field :end_time, -> { String }, optional: false, nullable: false + field :rows, -> { Internal::Types::Array[Schematic::Types::UserFeatureUsageResponseData] }, optional: false, nullable: false + field :start_time, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/user_usage_detail_response_data.rb b/lib/schematic/types/user_usage_detail_response_data.rb new file mode 100644 index 0000000..43c7eee --- /dev/null +++ b/lib/schematic/types/user_usage_detail_response_data.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Types + class UserUsageDetailResponseData < Internal::Types::Model + field :credits, -> { Internal::Types::Array[Schematic::Types::UserCreditUsageResponseData] }, optional: false, nullable: false + field :daily_credit_points, -> { Internal::Types::Array[Schematic::Types::UserDailyCreditPointResponseData] }, optional: false, nullable: false + field :daily_points, -> { Internal::Types::Array[Schematic::Types::UserDailyUsagePointResponseData] }, optional: false, nullable: false + field :end_time, -> { String }, optional: false, nullable: false + field :feature_totals, -> { Internal::Types::Array[Schematic::Types::UserFeatureUsageResponseData] }, optional: false, nullable: false + field :start_time, -> { String }, optional: false, nullable: false + field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/version.rb b/lib/schematic/version.rb index 514dae7..f625f9e 100644 --- a/lib/schematic/version.rb +++ b/lib/schematic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Schematic - VERSION = "1.4.11" + VERSION = "1.4.12" end diff --git a/reference.md b/reference.md index 843d1e3..d387a29 100644 --- a/reference.md +++ b/reference.md @@ -389,6 +389,14 @@ client.accounts.create_api_key(name: "name")
+**rate_limit_percent:** `Integer` + +
+
+ +
+
+ **readonly:** `Internal::Types::Boolean`
@@ -509,6 +517,14 @@ client.accounts.update_api_key(api_key_id: "api_key_id")
+**rate_limit_percent:** `Integer` + +
+
+ +
+
+ **request_options:** `Schematic::Accounts::RequestOptions`
@@ -2596,6 +2612,7 @@ client.billing.list_billing_prices( for_trial_expiry_plan: true, ids: ["ids"], interval: "interval", + interval_count: 1000000, is_active: true, plan_version_id: "plan_version_id", price: 1000000, @@ -2663,6 +2680,14 @@ client.billing.list_billing_prices(
+**interval_count:** `Integer` — Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) + +
+
+ +
+
+ **is_active:** `Internal::Types::Boolean` — Filter for active prices on active products (defaults to true if not specified)
@@ -3027,6 +3052,7 @@ client.billing.list_billing_product_prices( for_trial_expiry_plan: true, ids: ["ids"], interval: "interval", + interval_count: 1000000, is_active: true, plan_version_id: "plan_version_id", price: 1000000, @@ -3094,6 +3120,14 @@ client.billing.list_billing_product_prices(
+**interval_count:** `Integer` — Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) + +
+
+ +
+
+ **is_active:** `Internal::Types::Boolean` — Filter for active prices on active products (defaults to true if not specified)
@@ -6514,10 +6548,7 @@ client.catalogs.list_catalogs(
```ruby -client.catalogs.create_catalog( - is_default: true, - name: "name" -) +client.catalogs.create_catalog(name: "name") ```
@@ -6540,14 +6571,6 @@ client.catalogs.create_catalog(
-**is_default:** `Internal::Types::Boolean` - -
-
- -
-
- **name:** `String`
@@ -7607,6 +7630,14 @@ client.checkout.update_company_billing_details(
+**tax_id:** `Schematic::Types::TaxIdInput` + +
+
+ +
+
+ **values:** `Internal::Types::Array[Schematic::Types::CheckoutFieldValue]`
@@ -13390,6 +13421,160 @@ client.entitlements.get_feature_usage_by_company(keys: {
+ +
+ + +
client.entitlements.get_user_usage_by_company() -> Schematic::Entitlements::Types::GetUserUsageByCompanyResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.entitlements.get_user_usage_by_company( + company_id: "company_id", + end_time: "2024-01-15T09:30:00Z", + feature_id: "feature_id", + start_time: "2024-01-15T09:30:00Z" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `String` — Company to break usage down for + +
+
+ +
+
+ +**end_time:** `String` — End of the usage window (exclusive); defaults to now + +
+
+ +
+
+ +**feature_id:** `String` — Restrict to a single event-based feature + +
+
+ +
+
+ +**start_time:** `String` — Start of the usage window; defaults to 30 days before the end + +
+
+ +
+
+ +**request_options:** `Schematic::Entitlements::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.entitlements.get_user_usage_detail() -> Schematic::Entitlements::Types::GetUserUsageDetailResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.entitlements.get_user_usage_detail( + company_id: "company_id", + end_time: "2024-01-15T09:30:00Z", + start_time: "2024-01-15T09:30:00Z", + user_id: "user_id" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `String` — Company the user belongs to + +
+
+ +
+
+ +**end_time:** `String` — End of the usage window (exclusive); defaults to now + +
+
+ +
+
+ +**start_time:** `String` — Start of the usage window; defaults to 30 days before the end + +
+
+ +
+
+ +**user_id:** `String` — User to break usage down for + +
+
+ +
+
+ +**request_options:** `Schematic::Entitlements::RequestOptions` + +
+
+
+
+ +
@@ -13679,6 +13864,14 @@ client.plans.retry_custom_plan_billing(
+**send_invoice:** `Internal::Types::Boolean` — Whether Stripe emails the invoice when it is finalized. Defaults to true. + +
+
+ +
+
+ **request_options:** `Schematic::Plans::RequestOptions`
@@ -14863,6 +15056,14 @@ client.plans.publish_plan_version(
+**address:** `Schematic::Types::CustomerBillingAddress` + +
+
+ +
+
+ **coupon_external_id:** `String`
@@ -14871,6 +15072,14 @@ client.plans.publish_plan_version(
+**custom_field_values:** `Internal::Types::Array[Schematic::Types::CheckoutFieldValue]` + +
+
+ +
+
+ **customer_email:** `String`
@@ -14903,6 +15112,30 @@ client.plans.publish_plan_version(
+**phone:** `String` + +
+
+ +
+
+ +**send_invoice:** `Internal::Types::Boolean` — Whether Stripe emails the invoice when it is finalized. Defaults to true. + +
+
+ +
+
+ +**tax_id:** `Schematic::Types::TaxIdInput` + +
+
+ +
+
+ **request_options:** `Schematic::Plans::RequestOptions`