diff --git a/.fern/metadata.json b/.fern/metadata.json index eb28cff..8637ea0 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { "cliVersion": "5.50.0", "generatorName": "fernapi/fern-ruby-sdk", - "generatorVersion": "1.39.1", + "generatorVersion": "1.39.2", "generatorConfig": { "module": "SchematicHQ", "rubocopVariableNumberStyle": "disabled", @@ -13,10 +13,10 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "5df5ee39faba7ee0d2fd40aa455ee0a1b1a00034", + "originGitCommit": "9c3d404a6ed3ff63811ecbef9e2814ea8607f22d", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "1.5.5", + "requestedVersion": "1.5.6", "ciProvider": "github", - "sdkVersion": "1.5.5" + "sdkVersion": "1.5.6" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock index 9da7293..e2bd55f 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -132,5 +132,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-ruby-sdk: 1.39.1 -current_generation: 60825ceebf79189539133a284ec196b6fbf2288a + - commit_sha: 0da986ad01727b881dd7be3de79dbb7875b69689 + tree_hash: 73e72e0093a7ddc623e8455f10ccbb32a00547be + timestamp: 2026-10-26T10:06:03.015Z + cli_version: unknown + generator_versions: + fernapi/fern-ruby-sdk: 1.39.2 +current_generation: 0da986ad01727b881dd7be3de79dbb7875b69689 patches: [] diff --git a/lib/schematic.rb b/lib/schematic.rb index 041c858..43d1394 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -54,12 +54,7 @@ require_relative "schematic/types/environment_response_data" require_relative "schematic/types/api_key_response_data" require_relative "schematic/accounts/types/list_api_keys_response" -require_relative "schematic/types/api_key_create_response_data" -require_relative "schematic/accounts/types/create_api_key_response" require_relative "schematic/accounts/types/get_api_key_response" -require_relative "schematic/accounts/types/update_api_key_response" -require_relative "schematic/types/delete_response" -require_relative "schematic/accounts/types/delete_api_key_response" require_relative "schematic/accounts/types/count_api_keys_params" require_relative "schematic/accounts/types/count_api_keys_response" require_relative "schematic/types/actor_type" @@ -72,11 +67,7 @@ require_relative "schematic/accounts/types/count_audit_logs_response" require_relative "schematic/accounts/types/list_environments_params" require_relative "schematic/accounts/types/list_environments_response" -require_relative "schematic/types/environment_detail_response_data" -require_relative "schematic/accounts/types/create_environment_response" require_relative "schematic/accounts/types/get_environment_response" -require_relative "schematic/accounts/types/update_environment_response" -require_relative "schematic/accounts/types/delete_environment_response" require_relative "schematic/types/onboarding_milestone" require_relative "schematic/types/onboarding_requirement" require_relative "schematic/types/onboarding_milestone_view" @@ -101,6 +92,7 @@ require_relative "schematic/types/billing_coupon_response_data" require_relative "schematic/billing/types/list_coupons_response" require_relative "schematic/billing/types/upsert_billing_coupon_response" +require_relative "schematic/types/delete_response" require_relative "schematic/billing/types/delete_billing_coupon_response" require_relative "schematic/billing/types/delete_billing_customer_response" require_relative "schematic/types/billing_customer_response_data" @@ -161,6 +153,10 @@ require_relative "schematic/types/billing_subscription_trial_end_setting" require_relative "schematic/types/billing_subscription_response_data" require_relative "schematic/billing/types/upsert_billing_subscription_response" +require_relative "schematic/types/billing_invoice_address_response_data" +require_relative "schematic/types/tax_id_type" +require_relative "schematic/types/billing_invoice_tax_id_response_data" +require_relative "schematic/types/billing_invoice_billing_details_response_data" require_relative "schematic/types/billing_invoice_terms_response_data" require_relative "schematic/types/charge_timing" require_relative "schematic/types/line_kind" @@ -175,19 +171,19 @@ require_relative "schematic/types/billing_native_subscription_response_data" require_relative "schematic/billing/types/get_company_native_subscription_response" require_relative "schematic/types/invoice_document_state" -require_relative "schematic/billing/types/list_native_invoices_params" +require_relative "schematic/billing/types/list_billing_invoices_params" require_relative "schematic/types/invoice_collection_state" require_relative "schematic/types/billing_invoice_response_data" -require_relative "schematic/billing/types/list_native_invoices_response" +require_relative "schematic/billing/types/list_billing_invoices_response" require_relative "schematic/types/billing_invoice_line_response_data" require_relative "schematic/types/billing_invoice_settlement_response_data" require_relative "schematic/types/billing_invoice_detail_response_data" -require_relative "schematic/billing/types/get_native_invoice_response" +require_relative "schematic/billing/types/get_billing_invoice_response" require_relative "schematic/billing/types/finalize_native_invoice_response" -require_relative "schematic/billing/types/mark_native_invoice_paid_response" +require_relative "schematic/billing/types/mark_billing_invoice_paid_response" require_relative "schematic/billing/types/void_native_invoice_response" -require_relative "schematic/billing/types/count_native_invoices_params" -require_relative "schematic/billing/types/count_native_invoices_response" +require_relative "schematic/billing/types/count_billing_invoices_params" +require_relative "schematic/billing/types/count_billing_invoices_response" require_relative "schematic/credits/types/list_billing_credits_params" require_relative "schematic/types/billing_credit_burn_strategy" require_relative "schematic/types/billing_credit_expiry_unit" @@ -254,6 +250,7 @@ require_relative "schematic/types/billing_plan_credit_grant_price_tier_response_data" require_relative "schematic/types/billing_plan_credit_grant_reset_start" require_relative "schematic/types/billing_plan_credit_grant_reset_type" +require_relative "schematic/types/billing_plan_credit_grant_warning_tier_response_data" 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" @@ -291,6 +288,7 @@ require_relative "schematic/types/feature_ledger_response_data" require_relative "schematic/types/credit_event_ledger_response_data" require_relative "schematic/credits/types/list_credit_event_ledger_response" +require_relative "schematic/credits/types/get_credit_event_ledger_entry_response" require_relative "schematic/credits/types/count_credit_event_ledger_params" require_relative "schematic/credits/types/count_credit_event_ledger_response" require_relative "schematic/catalogs/types/list_catalogs_params" @@ -340,6 +338,7 @@ require_relative "schematic/types/warning_tier_response_data" require_relative "schematic/types/plan_entitlement_response_data" require_relative "schematic/types/plan_price_cadence" +require_relative "schematic/types/renewal_policy" require_relative "schematic/types/plan_version_response_data" require_relative "schematic/types/plan_group_plan_detail_response_data" require_relative "schematic/types/catalog_configuration_response_data" @@ -352,6 +351,19 @@ require_relative "schematic/catalogs/types/get_derived_features_response" require_relative "schematic/types/catalog_plan_i_ds_response_data" require_relative "schematic/catalogs/types/get_plans_in_catalog_response" +require_relative "schematic/types/catalog_price_tier_response_data" +require_relative "schematic/types/catalog_price_response_data" +require_relative "schematic/types/catalog_bundle_currency_price_response_data" +require_relative "schematic/types/catalog_capabilities_response_data" +require_relative "schematic/types/catalog_credit_bundle_response_data" +require_relative "schematic/types/catalog_credit_grant_response_data" +require_relative "schematic/types/catalog_currency_prices_response_data" +require_relative "schematic/types/catalog_custom_plan_cta_response_data" +require_relative "schematic/types/catalog_plan_entitlement_response_data" +require_relative "schematic/types/catalog_plan_response_data" +require_relative "schematic/types/public_catalog_response_data" +require_relative "schematic/catalogs/types/get_public_catalog_response" +require_relative "schematic/catalogs/types/get_public_catalog_by_id_response" require_relative "schematic/types/checkout_subscription" require_relative "schematic/checkout/types/checkout_internal_response" require_relative "schematic/types/billing_product_record_response_data" @@ -400,7 +412,11 @@ require_relative "schematic/types/usage_based_entitlement_response_data" require_relative "schematic/types/checkout_data_response_data" require_relative "schematic/checkout/types/get_checkout_data_response" +require_relative "schematic/types/checkout_charge_timing" require_relative "schematic/types/preview_subscription_discount_response_data" +require_relative "schematic/types/proration_line_kind" +require_relative "schematic/types/preview_subscription_proration_line_response_data" +require_relative "schematic/types/preview_subscription_proration_response_data" require_relative "schematic/types/preview_subscription_upcoming_invoice_line_items" require_relative "schematic/types/preview_subscription_finance_response_data" require_relative "schematic/types/preview_subscription_change_response_data" @@ -815,6 +831,7 @@ require_relative "schematic/planmigrations/types/retry_migration_response" require_relative "schematic/planmigrations/types/count_migrations_params" require_relative "schematic/planmigrations/types/count_migrations_response" +require_relative "schematic/types/plan_version_migration_preview_note_response_data" require_relative "schematic/types/plan_version_migration_preview_company_response_data" require_relative "schematic/types/plan_version_migration_preview_response_data" require_relative "schematic/planmigrations/types/preview_migration_response" @@ -863,6 +880,8 @@ require_relative "schematic/types/catalog_config_ordered_entitlement" require_relative "schematic/types/catalog_config_plan_credit" require_relative "schematic/types/catalog_config_ordered_plan" +require_relative "schematic/types/catalog_detail_response_data" +require_relative "schematic/types/catalog_entitlement_response_data" require_relative "schematic/types/checkout_field_value" require_relative "schematic/types/update_add_on_request_body" require_relative "schematic/types/update_auto_topup_override_request_body" @@ -885,6 +904,7 @@ require_relative "schematic/types/coupon_request_body" require_relative "schematic/types/credit_auto_topup_amount_type" require_relative "schematic/types/credit_grant_price_tier_request_body" +require_relative "schematic/types/plan_credit_grant_warning_tier_request_body" require_relative "schematic/types/create_billing_plan_credit_grant_request_body" require_relative "schematic/types/create_billing_price_tier_request_body" require_relative "schematic/types/create_custom_plan_bundle_plan_request_body" @@ -934,13 +954,13 @@ 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_billing_details_request_body" require_relative "schematic/types/payment_method_request_body" require_relative "schematic/types/plan_bundle_action" require_relative "schematic/types/update_billing_plan_credit_grant_request_body" 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/tax_id_type" require_relative "schematic/types/tax_id_input" require_relative "schematic/types/publish_plan_version_request_body" require_relative "schematic/types/rule_condition_group_response_data" @@ -993,14 +1013,10 @@ require_relative "schematic/accounts/types/list_account_members_request" require_relative "schematic/accounts/types/count_account_members_request" require_relative "schematic/accounts/types/list_api_keys_request" -require_relative "schematic/accounts/types/create_api_key_request_body" -require_relative "schematic/accounts/types/update_api_key_request_body" require_relative "schematic/accounts/types/count_api_keys_request" require_relative "schematic/accounts/types/list_audit_logs_request" require_relative "schematic/accounts/types/count_audit_logs_request" require_relative "schematic/accounts/types/list_environments_request" -require_relative "schematic/accounts/types/create_environment_request_body" -require_relative "schematic/accounts/types/update_environment_request_body" require_relative "schematic/accounts/types/update_onboarding_state_request_body" require_relative "schematic/billing/client" require_relative "schematic/billing/types/list_coupons_request" @@ -1024,9 +1040,9 @@ require_relative "schematic/billing/types/update_company_billing_profile_request_body" require_relative "schematic/billing/types/update_billing_settings_request_body" require_relative "schematic/billing/types/create_billing_subscription_request_body" -require_relative "schematic/billing/types/list_native_invoices_request" +require_relative "schematic/billing/types/list_billing_invoices_request" require_relative "schematic/billing/types/mark_invoice_paid_request_body" -require_relative "schematic/billing/types/count_native_invoices_request" +require_relative "schematic/billing/types/count_billing_invoices_request" require_relative "schematic/credits/client" require_relative "schematic/credits/types/list_billing_credits_request" require_relative "schematic/credits/types/create_billing_credit_request_body" diff --git a/lib/schematic/accounts/client.rb b/lib/schematic/accounts/client.rb index 3ba3240..b378631 100644 --- a/lib/schematic/accounts/client.rb +++ b/lib/schematic/accounts/client.rb @@ -232,49 +232,6 @@ def list_api_keys(request_options: {}, **params) end end - # @param request_options [Hash] - # @param params [Schematic::Accounts::Types::CreateApiKeyRequestBody] - # @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 - # - # @example - # client.accounts.create_api_key(name: "name") - # - # @return [Schematic::Accounts::Types::CreateApiKeyResponse] - def create_api_key(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: "api-keys", - body: Schematic::Accounts::Types::CreateApiKeyRequestBody.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) - (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::CreateApiKeyResponse.load(response.body)) - else - error_class = Schematic::Errors::ResponseError.subclass_for_code(code) - error_types = { - 400 => Schematic::Types::ApiError, - 401 => Schematic::Types::ApiError, - 403 => Schematic::Types::ApiError, - 404 => Schematic::Types::ApiError, - 500 => Schematic::Types::ApiError - } - error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) - raise error_class.new(response.body, code: code, body: error_body) - end - end - # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url @@ -317,97 +274,6 @@ def get_api_key(request_options: {}, **params) end end - # @param request_options [Hash] - # @param params [Schematic::Accounts::Types::UpdateApiKeyRequestBody] - # @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] :api_key_id - # - # @example - # client.accounts.update_api_key(api_key_id: "api_key_id") - # - # @return [Schematic::Accounts::Types::UpdateApiKeyResponse] - def update_api_key(request_options: {}, **params) - params = Schematic::Internal::Types::Utils.normalize_keys(params) - request_data = Schematic::Accounts::Types::UpdateApiKeyRequestBody.new(params).to_h - non_body_param_names = %w[api_key_id] - body = request_data.except(*non_body_param_names) - - request = Schematic::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "PUT", - path: "api-keys/#{URI.encode_uri_component(params[:api_key_id].to_s)}", - 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) - (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::UpdateApiKeyResponse.load(response.body)) - else - error_class = Schematic::Errors::ResponseError.subclass_for_code(code) - error_types = { - 400 => Schematic::Types::ApiError, - 401 => Schematic::Types::ApiError, - 403 => Schematic::Types::ApiError, - 404 => Schematic::Types::ApiError, - 500 => Schematic::Types::ApiError - } - error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) - raise error_class.new(response.body, code: code, body: error_body) - 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] :api_key_id - # - # @example - # client.accounts.delete_api_key(api_key_id: "api_key_id") - # - # @return [Schematic::Accounts::Types::DeleteApiKeyResponse] - def delete_api_key(request_options: {}, **params) - params = Schematic::Internal::Types::Utils.normalize_keys(params) - request = Schematic::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "DELETE", - path: "api-keys/#{URI.encode_uri_component(params[:api_key_id].to_s)}", - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Schematic::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::DeleteApiKeyResponse.load(response.body)) - else - error_class = Schematic::Errors::ResponseError.subclass_for_code(code) - error_types = { - 400 => Schematic::Types::ApiError, - 401 => Schematic::Types::ApiError, - 403 => Schematic::Types::ApiError, - 404 => Schematic::Types::ApiError, - 500 => Schematic::Types::ApiError - } - error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) - raise error_class.new(response.body, code: code, body: error_body) - end - end - # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url @@ -697,52 +563,6 @@ def list_environments(request_options: {}, **params) end end - # @param request_options [Hash] - # @param params [Schematic::Accounts::Types::CreateEnvironmentRequestBody] - # @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 - # - # @example - # client.accounts.create_environment( - # environment_type: "development", - # name: "name" - # ) - # - # @return [Schematic::Accounts::Types::CreateEnvironmentResponse] - def create_environment(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: "environments", - body: Schematic::Accounts::Types::CreateEnvironmentRequestBody.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) - (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::CreateEnvironmentResponse.load(response.body)) - else - error_class = Schematic::Errors::ResponseError.subclass_for_code(code) - error_types = { - 400 => Schematic::Types::ApiError, - 401 => Schematic::Types::ApiError, - 403 => Schematic::Types::ApiError, - 404 => Schematic::Types::ApiError, - 500 => Schematic::Types::ApiError - } - error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) - raise error_class.new(response.body, code: code, body: error_body) - end - end - # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url @@ -785,97 +605,6 @@ def get_environment(request_options: {}, **params) end end - # @param request_options [Hash] - # @param params [Schematic::Accounts::Types::UpdateEnvironmentRequestBody] - # @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] :environment_id - # - # @example - # client.accounts.update_environment(environment_id: "environment_id") - # - # @return [Schematic::Accounts::Types::UpdateEnvironmentResponse] - def update_environment(request_options: {}, **params) - params = Schematic::Internal::Types::Utils.normalize_keys(params) - request_data = Schematic::Accounts::Types::UpdateEnvironmentRequestBody.new(params).to_h - non_body_param_names = %w[environment_id] - body = request_data.except(*non_body_param_names) - - request = Schematic::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "PUT", - path: "environments/#{URI.encode_uri_component(params[:environment_id].to_s)}", - 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) - (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::UpdateEnvironmentResponse.load(response.body)) - else - error_class = Schematic::Errors::ResponseError.subclass_for_code(code) - error_types = { - 400 => Schematic::Types::ApiError, - 401 => Schematic::Types::ApiError, - 403 => Schematic::Types::ApiError, - 404 => Schematic::Types::ApiError, - 500 => Schematic::Types::ApiError - } - error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) - raise error_class.new(response.body, code: code, body: error_body) - 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] :environment_id - # - # @example - # client.accounts.delete_environment(environment_id: "environment_id") - # - # @return [Schematic::Accounts::Types::DeleteEnvironmentResponse] - def delete_environment(request_options: {}, **params) - params = Schematic::Internal::Types::Utils.normalize_keys(params) - request = Schematic::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "DELETE", - path: "environments/#{URI.encode_uri_component(params[:environment_id].to_s)}", - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Schematic::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::DeleteEnvironmentResponse.load(response.body)) - else - error_class = Schematic::Errors::ResponseError.subclass_for_code(code) - error_types = { - 400 => Schematic::Types::ApiError, - 401 => Schematic::Types::ApiError, - 403 => Schematic::Types::ApiError, - 404 => Schematic::Types::ApiError, - 500 => Schematic::Types::ApiError - } - error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) - raise error_class.new(response.body, code: code, body: error_body) - end - end - # @param request_options [Hash] # @param _params [Hash] # @option request_options [String] :base_url diff --git a/lib/schematic/accounts/types/create_api_key_request_body.rb b/lib/schematic/accounts/types/create_api_key_request_body.rb deleted file mode 100644 index 29601ed..0000000 --- a/lib/schematic/accounts/types/create_api_key_request_body.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Accounts - module Types - 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 - end -end diff --git a/lib/schematic/accounts/types/create_environment_request_body.rb b/lib/schematic/accounts/types/create_environment_request_body.rb deleted file mode 100644 index e0fdecc..0000000 --- a/lib/schematic/accounts/types/create_environment_request_body.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Accounts - module Types - class CreateEnvironmentRequestBody < Internal::Types::Model - field :environment_type, -> { Schematic::Types::EnvironmentType }, optional: false, nullable: false - - field :name, -> { String }, optional: false, nullable: false - end - end - end -end diff --git a/lib/schematic/accounts/types/delete_environment_response.rb b/lib/schematic/accounts/types/delete_environment_response.rb deleted file mode 100644 index 4006075..0000000 --- a/lib/schematic/accounts/types/delete_environment_response.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Accounts - module Types - class DeleteEnvironmentResponse < Internal::Types::Model - field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false - - field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false - end - end - end -end diff --git a/lib/schematic/accounts/types/update_api_key_request_body.rb b/lib/schematic/accounts/types/update_api_key_request_body.rb deleted file mode 100644 index 1eab2fa..0000000 --- a/lib/schematic/accounts/types/update_api_key_request_body.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Accounts - module Types - 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 -end diff --git a/lib/schematic/accounts/types/update_api_key_response.rb b/lib/schematic/accounts/types/update_api_key_response.rb deleted file mode 100644 index cd47116..0000000 --- a/lib/schematic/accounts/types/update_api_key_response.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Accounts - module Types - class UpdateApiKeyResponse < Internal::Types::Model - field :data, -> { Schematic::Types::ApiKeyResponseData }, optional: false, nullable: false - - field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false - end - end - end -end diff --git a/lib/schematic/accounts/types/update_environment_request_body.rb b/lib/schematic/accounts/types/update_environment_request_body.rb deleted file mode 100644 index c5b879e..0000000 --- a/lib/schematic/accounts/types/update_environment_request_body.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Accounts - module Types - class UpdateEnvironmentRequestBody < Internal::Types::Model - field :environment_id, -> { String }, optional: false, nullable: false - - field :environment_type, -> { Schematic::Types::EnvironmentType }, optional: true, nullable: false - - field :name, -> { String }, optional: true, nullable: false - - field :require_context_signature, -> { Internal::Types::Boolean }, optional: true, nullable: false - end - end - end -end diff --git a/lib/schematic/accounts/types/update_environment_response.rb b/lib/schematic/accounts/types/update_environment_response.rb deleted file mode 100644 index e77b86d..0000000 --- a/lib/schematic/accounts/types/update_environment_response.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Accounts - module Types - class UpdateEnvironmentResponse < Internal::Types::Model - field :data, -> { Schematic::Types::EnvironmentResponseData }, optional: false, nullable: false - - field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false - end - end - end -end diff --git a/lib/schematic/billing/client.rb b/lib/schematic/billing/client.rb index 0cccd3c..ba7e2ae 100644 --- a/lib/schematic/billing/client.rb +++ b/lib/schematic/billing/client.rb @@ -1660,25 +1660,37 @@ def get_company_native_subscription(request_options: {}, **params) # @option params [String, nil] :company_id # @option params [String, nil] :contract_id # @option params [Schematic::Types::InvoiceDocumentState, nil] :document_state + # @option params [Boolean, nil] :past_due + # @option params [Schematic::Types::BillingProviderType, nil] :provider_type + # @option params [String, nil] :q + # @option params [Schematic::Types::InvoiceStatus, nil] :status # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # # @example - # client.billing.list_native_invoices( + # client.billing.list_billing_invoices( # company_id: "company_id", # contract_id: "contract_id", # document_state: "credited", + # past_due: true, + # provider_type: "metronome", + # q: "q", + # status: "draft", # limit: 1000000, # offset: 1000000 # ) # - # @return [Schematic::Billing::Types::ListNativeInvoicesResponse] - def list_native_invoices(request_options: {}, **params) + # @return [Schematic::Billing::Types::ListBillingInvoicesResponse] + def list_billing_invoices(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["contract_id"] = params[:contract_id] if params.key?(:contract_id) query_params["document_state"] = params[:document_state] if params.key?(:document_state) + query_params["past_due"] = params[:past_due] if params.key?(:past_due) + query_params["provider_type"] = params[:provider_type] if params.key?(:provider_type) + query_params["q"] = params[:q] if params.key?(:q) + query_params["status"] = params[:status] if params.key?(:status) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) @@ -1696,7 +1708,7 @@ def list_native_invoices(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListNativeInvoicesResponse.load(response.body)) + (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListBillingInvoicesResponse.load(response.body)) else error_class = Schematic::Errors::ResponseError.subclass_for_code(code) error_types = { @@ -1721,10 +1733,10 @@ def list_native_invoices(request_options: {}, **params) # @option params [String] :invoice_id # # @example - # client.billing.get_native_invoice(invoice_id: "invoice_id") + # client.billing.get_billing_invoice(invoice_id: "invoice_id") # - # @return [Schematic::Billing::Types::GetNativeInvoiceResponse] - def get_native_invoice(request_options: {}, **params) + # @return [Schematic::Billing::Types::GetBillingInvoiceResponse] + def get_billing_invoice(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1739,7 +1751,7 @@ def get_native_invoice(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - (response.body.to_s.empty? ? nil : Schematic::Billing::Types::GetNativeInvoiceResponse.load(response.body)) + (response.body.to_s.empty? ? nil : Schematic::Billing::Types::GetBillingInvoiceResponse.load(response.body)) else error_class = Schematic::Errors::ResponseError.subclass_for_code(code) error_types = { @@ -1846,13 +1858,13 @@ def finalize_native_invoice(request_options: {}, **params) # @option params [String] :invoice_id # # @example - # client.billing.mark_native_invoice_paid( + # client.billing.mark_billing_invoice_paid( # invoice_id: "invoice_id", # idempotency_key: "idempotency_key" # ) # - # @return [Schematic::Billing::Types::MarkNativeInvoicePaidResponse] - def mark_native_invoice_paid(request_options: {}, **params) + # @return [Schematic::Billing::Types::MarkBillingInvoicePaidResponse] + def mark_billing_invoice_paid(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Billing::Types::MarkInvoicePaidRequestBody.new(params).to_h non_body_param_names = %w[invoice_id] @@ -1872,7 +1884,7 @@ def mark_native_invoice_paid(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - (response.body.to_s.empty? ? nil : Schematic::Billing::Types::MarkNativeInvoicePaidResponse.load(response.body)) + (response.body.to_s.empty? ? nil : Schematic::Billing::Types::MarkBillingInvoicePaidResponse.load(response.body)) else error_class = Schematic::Errors::ResponseError.subclass_for_code(code) error_types = { @@ -1980,25 +1992,37 @@ def void_native_invoice(request_options: {}, **params) # @option params [String, nil] :company_id # @option params [String, nil] :contract_id # @option params [Schematic::Types::InvoiceDocumentState, nil] :document_state + # @option params [Boolean, nil] :past_due + # @option params [Schematic::Types::BillingProviderType, nil] :provider_type + # @option params [String, nil] :q + # @option params [Schematic::Types::InvoiceStatus, nil] :status # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # # @example - # client.billing.count_native_invoices( + # client.billing.count_billing_invoices( # company_id: "company_id", # contract_id: "contract_id", # document_state: "credited", + # past_due: true, + # provider_type: "metronome", + # q: "q", + # status: "draft", # limit: 1000000, # offset: 1000000 # ) # - # @return [Schematic::Billing::Types::CountNativeInvoicesResponse] - def count_native_invoices(request_options: {}, **params) + # @return [Schematic::Billing::Types::CountBillingInvoicesResponse] + def count_billing_invoices(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["contract_id"] = params[:contract_id] if params.key?(:contract_id) query_params["document_state"] = params[:document_state] if params.key?(:document_state) + query_params["past_due"] = params[:past_due] if params.key?(:past_due) + query_params["provider_type"] = params[:provider_type] if params.key?(:provider_type) + query_params["q"] = params[:q] if params.key?(:q) + query_params["status"] = params[:status] if params.key?(:status) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) @@ -2016,7 +2040,7 @@ def count_native_invoices(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - (response.body.to_s.empty? ? nil : Schematic::Billing::Types::CountNativeInvoicesResponse.load(response.body)) + (response.body.to_s.empty? ? nil : Schematic::Billing::Types::CountBillingInvoicesResponse.load(response.body)) else error_class = Schematic::Errors::ResponseError.subclass_for_code(code) error_types = { diff --git a/lib/schematic/billing/types/count_native_invoices_params.rb b/lib/schematic/billing/types/count_billing_invoices_params.rb similarity index 55% rename from lib/schematic/billing/types/count_native_invoices_params.rb rename to lib/schematic/billing/types/count_billing_invoices_params.rb index bdfbc2e..56b8d26 100644 --- a/lib/schematic/billing/types/count_native_invoices_params.rb +++ b/lib/schematic/billing/types/count_billing_invoices_params.rb @@ -4,7 +4,7 @@ module Schematic module Billing module Types # Input parameters - class CountNativeInvoicesParams < Internal::Types::Model + class CountBillingInvoicesParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false field :contract_id, -> { String }, optional: true, nullable: false @@ -14,6 +14,14 @@ class CountNativeInvoicesParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false + + field :past_due, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + + field :q, -> { String }, optional: true, nullable: false + + field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false end end end diff --git a/lib/schematic/billing/types/count_native_invoices_request.rb b/lib/schematic/billing/types/count_billing_invoices_request.rb similarity index 54% rename from lib/schematic/billing/types/count_native_invoices_request.rb rename to lib/schematic/billing/types/count_billing_invoices_request.rb index 66f0b28..4a49d05 100644 --- a/lib/schematic/billing/types/count_native_invoices_request.rb +++ b/lib/schematic/billing/types/count_billing_invoices_request.rb @@ -3,13 +3,21 @@ module Schematic module Billing module Types - class CountNativeInvoicesRequest < Internal::Types::Model + class CountBillingInvoicesRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false field :contract_id, -> { String }, optional: true, nullable: false field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false + field :past_due, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + + field :q, -> { String }, optional: true, nullable: false + + field :status, -> { Schematic::Types::InvoiceStatus }, 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/count_native_invoices_response.rb b/lib/schematic/billing/types/count_billing_invoices_response.rb similarity index 52% rename from lib/schematic/billing/types/count_native_invoices_response.rb rename to lib/schematic/billing/types/count_billing_invoices_response.rb index 113c65a..6907a12 100644 --- a/lib/schematic/billing/types/count_native_invoices_response.rb +++ b/lib/schematic/billing/types/count_billing_invoices_response.rb @@ -3,10 +3,10 @@ module Schematic module Billing module Types - class CountNativeInvoicesResponse < Internal::Types::Model + class CountBillingInvoicesResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false - field :params, -> { Schematic::Billing::Types::CountNativeInvoicesParams }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::CountBillingInvoicesParams }, optional: false, nullable: false end end end diff --git a/lib/schematic/billing/types/create_payment_method_request_body.rb b/lib/schematic/billing/types/create_payment_method_request_body.rb index 9da37ed..ce5b63a 100644 --- a/lib/schematic/billing/types/create_payment_method_request_body.rb +++ b/lib/schematic/billing/types/create_payment_method_request_body.rb @@ -22,6 +22,8 @@ class CreatePaymentMethodRequestBody < Internal::Types::Model field :card_last_4, -> { String }, optional: true, nullable: false, api_name: "card_last4" + field :customer_billing_details, -> { Schematic::Types::PaymentMethodBillingDetailsRequestBody }, optional: true, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false field :external_id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/billing/types/get_native_invoice_response.rb b/lib/schematic/billing/types/get_billing_invoice_response.rb similarity index 83% rename from lib/schematic/billing/types/get_native_invoice_response.rb rename to lib/schematic/billing/types/get_billing_invoice_response.rb index cba39a2..aaf7399 100644 --- a/lib/schematic/billing/types/get_native_invoice_response.rb +++ b/lib/schematic/billing/types/get_billing_invoice_response.rb @@ -3,7 +3,7 @@ module Schematic module Billing module Types - class GetNativeInvoiceResponse < Internal::Types::Model + class GetBillingInvoiceResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingInvoiceDetailResponseData }, optional: false, nullable: false field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false diff --git a/lib/schematic/billing/types/list_native_invoices_params.rb b/lib/schematic/billing/types/list_billing_invoices_params.rb similarity index 55% rename from lib/schematic/billing/types/list_native_invoices_params.rb rename to lib/schematic/billing/types/list_billing_invoices_params.rb index 973f66a..c929b5b 100644 --- a/lib/schematic/billing/types/list_native_invoices_params.rb +++ b/lib/schematic/billing/types/list_billing_invoices_params.rb @@ -4,7 +4,7 @@ module Schematic module Billing module Types # Input parameters - class ListNativeInvoicesParams < Internal::Types::Model + class ListBillingInvoicesParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false field :contract_id, -> { String }, optional: true, nullable: false @@ -14,6 +14,14 @@ class ListNativeInvoicesParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false field :offset, -> { Integer }, optional: true, nullable: false + + field :past_due, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + + field :q, -> { String }, optional: true, nullable: false + + field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false end end end diff --git a/lib/schematic/billing/types/list_native_invoices_request.rb b/lib/schematic/billing/types/list_billing_invoices_request.rb similarity index 54% rename from lib/schematic/billing/types/list_native_invoices_request.rb rename to lib/schematic/billing/types/list_billing_invoices_request.rb index 7409e2e..e911d70 100644 --- a/lib/schematic/billing/types/list_native_invoices_request.rb +++ b/lib/schematic/billing/types/list_billing_invoices_request.rb @@ -3,13 +3,21 @@ module Schematic module Billing module Types - class ListNativeInvoicesRequest < Internal::Types::Model + class ListBillingInvoicesRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false field :contract_id, -> { String }, optional: true, nullable: false field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false + field :past_due, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + + field :q, -> { String }, optional: true, nullable: false + + field :status, -> { Schematic::Types::InvoiceStatus }, 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_native_invoices_response.rb b/lib/schematic/billing/types/list_billing_invoices_response.rb similarity index 57% rename from lib/schematic/billing/types/list_native_invoices_response.rb rename to lib/schematic/billing/types/list_billing_invoices_response.rb index fe4155b..28fb7b0 100644 --- a/lib/schematic/billing/types/list_native_invoices_response.rb +++ b/lib/schematic/billing/types/list_billing_invoices_response.rb @@ -3,10 +3,10 @@ module Schematic module Billing module Types - class ListNativeInvoicesResponse < Internal::Types::Model + class ListBillingInvoicesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingInvoiceResponseData] }, optional: false, nullable: false - field :params, -> { Schematic::Billing::Types::ListNativeInvoicesParams }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::ListBillingInvoicesParams }, optional: false, nullable: false end end end diff --git a/lib/schematic/billing/types/mark_native_invoice_paid_response.rb b/lib/schematic/billing/types/mark_billing_invoice_paid_response.rb similarity index 82% rename from lib/schematic/billing/types/mark_native_invoice_paid_response.rb rename to lib/schematic/billing/types/mark_billing_invoice_paid_response.rb index 44e2abc..fbd1e20 100644 --- a/lib/schematic/billing/types/mark_native_invoice_paid_response.rb +++ b/lib/schematic/billing/types/mark_billing_invoice_paid_response.rb @@ -3,7 +3,7 @@ module Schematic module Billing module Types - class MarkNativeInvoicePaidResponse < Internal::Types::Model + class MarkBillingInvoicePaidResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingInvoiceDetailResponseData }, optional: false, nullable: false field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false diff --git a/lib/schematic/catalogs/client.rb b/lib/schematic/catalogs/client.rb index 14d3468..674042b 100644 --- a/lib/schematic/catalogs/client.rb +++ b/lib/schematic/catalogs/client.rb @@ -639,6 +639,88 @@ def remove_plan(request_options: {}, **params) error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) raise error_class.new(response.body, code: code, body: error_body) 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 + # + # @example + # client.catalogs.get_public_catalog + # + # @return [Schematic::Catalogs::Types::GetPublicCatalogResponse] + def get_public_catalog(request_options: {}, **_params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "public/catalog", + 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) + (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetPublicCatalogResponse.load(response.body)) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + error_types = { + 401 => Schematic::Types::ApiError, + 403 => Schematic::Types::ApiError, + 404 => Schematic::Types::ApiError, + 500 => Schematic::Types::ApiError + } + error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) + raise error_class.new(response.body, code: code, body: error_body) + 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] :catalog_id + # + # @example + # client.catalogs.get_public_catalog_by_id(catalog_id: "catalog_id") + # + # @return [Schematic::Catalogs::Types::GetPublicCatalogByIdResponse] + def get_public_catalog_by_id(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "public/catalogs/#{URI.encode_uri_component(params[:catalog_id].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetPublicCatalogByIdResponse.load(response.body)) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + error_types = { + 401 => Schematic::Types::ApiError, + 403 => Schematic::Types::ApiError, + 404 => Schematic::Types::ApiError, + 500 => Schematic::Types::ApiError + } + error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) + raise error_class.new(response.body, code: code, body: error_body) + end + end end end end diff --git a/lib/schematic/accounts/types/create_api_key_response.rb b/lib/schematic/catalogs/types/get_public_catalog_by_id_response.rb similarity index 50% rename from lib/schematic/accounts/types/create_api_key_response.rb rename to lib/schematic/catalogs/types/get_public_catalog_by_id_response.rb index c95453f..7072522 100644 --- a/lib/schematic/accounts/types/create_api_key_response.rb +++ b/lib/schematic/catalogs/types/get_public_catalog_by_id_response.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true module Schematic - module Accounts + module Catalogs module Types - class CreateApiKeyResponse < Internal::Types::Model - field :data, -> { Schematic::Types::ApiKeyCreateResponseData }, optional: false, nullable: false + class GetPublicCatalogByIdResponse < Internal::Types::Model + field :data, -> { Schematic::Types::PublicCatalogResponseData }, optional: false, nullable: false field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end diff --git a/lib/schematic/accounts/types/delete_api_key_response.rb b/lib/schematic/catalogs/types/get_public_catalog_response.rb similarity index 51% rename from lib/schematic/accounts/types/delete_api_key_response.rb rename to lib/schematic/catalogs/types/get_public_catalog_response.rb index a1833d9..f4c7e36 100644 --- a/lib/schematic/accounts/types/delete_api_key_response.rb +++ b/lib/schematic/catalogs/types/get_public_catalog_response.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true module Schematic - module Accounts + module Catalogs module Types - class DeleteApiKeyResponse < Internal::Types::Model - field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + class GetPublicCatalogResponse < Internal::Types::Model + field :data, -> { Schematic::Types::PublicCatalogResponseData }, optional: false, nullable: false field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end diff --git a/lib/schematic/client.rb b/lib/schematic/client.rb index 09c54af..1d1bbc4 100644 --- a/lib/schematic/client.rb +++ b/lib/schematic/client.rb @@ -2,6 +2,200 @@ module Schematic class Client + # @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 + # + # @example + # client.post_api_keys + # + # @return [untyped] + def post_api_keys(request_options: {}, **_params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "api-keys", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + return if code.between?(200, 299) + + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + 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] :api_key_id + # + # @example + # client.put_api_keys_api_key_id(api_key_id: "api_key_id") + # + # @return [untyped] + def put_api_keys_api_key_id(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: "api-keys/#{URI.encode_uri_component(params[:api_key_id].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + return if code.between?(200, 299) + + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + 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] :api_key_id + # + # @example + # client.delete_api_keys_api_key_id(api_key_id: "api_key_id") + # + # @return [untyped] + def delete_api_keys_api_key_id(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "DELETE", + path: "api-keys/#{URI.encode_uri_component(params[:api_key_id].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + return if code.between?(200, 299) + + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + 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 + # + # @example + # client.post_environments + # + # @return [untyped] + def post_environments(request_options: {}, **_params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "environments", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + return if code.between?(200, 299) + + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + 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] :environment_id + # + # @example + # client.put_environments_environment_id(environment_id: "environment_id") + # + # @return [untyped] + def put_environments_environment_id(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: "environments/#{URI.encode_uri_component(params[:environment_id].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + return if code.between?(200, 299) + + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + 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] :environment_id + # + # @example + # client.delete_environments_environment_id(environment_id: "environment_id") + # + # @return [untyped] + def delete_environments_environment_id(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "DELETE", + path: "environments/#{URI.encode_uri_component(params[:environment_id].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + return if code.between?(200, 299) + + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + # @param request_options [Hash] # @param _params [Hash] # @option request_options [String] :base_url @@ -43,7 +237,7 @@ def initialize(api_key:, base_url: nil, max_retries: 2, timeout: 60) @raw_client = Schematic::Internal::Http::RawClient.new( base_url: base_url || Schematic::Environment::DEFAULT, headers: { - "User-Agent" => "schematichq/1.5.5", + "User-Agent" => "schematichq/1.5.6", "X-Fern-Language" => "Ruby", "X-Schematic-Api-Key" => api_key.to_s }, diff --git a/lib/schematic/credits/client.rb b/lib/schematic/credits/client.rb index 90c9d23..cec5157 100644 --- a/lib/schematic/credits/client.rb +++ b/lib/schematic/credits/client.rb @@ -2005,6 +2005,7 @@ def get_credit_spend_policy_usage(request_options: {}, **params) # @option params [String, nil] :end_time # @option params [Schematic::Types::CreditEventType, nil] :event_type # @option params [String, nil] :feature_id + # @option params [String, nil] :source_event_id # @option params [String, nil] :start_time # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset @@ -2016,6 +2017,7 @@ def get_credit_spend_policy_usage(request_options: {}, **params) # end_time: "end_time", # event_type: "adjustment", # feature_id: "feature_id", + # source_event_id: "source_event_id", # start_time: "start_time", # limit: 1000000, # offset: 1000000 @@ -2030,6 +2032,7 @@ def list_credit_event_ledger(request_options: {}, **params) query_params["end_time"] = params[:end_time] if params.key?(:end_time) query_params["event_type"] = params[:event_type] if params.key?(:event_type) query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) + query_params["source_event_id"] = params[:source_event_id] if params.key?(:source_event_id) query_params["start_time"] = params[:start_time] if params.key?(:start_time) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) @@ -2063,6 +2066,48 @@ def list_credit_event_ledger(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] :ledger_entry_id + # + # @example + # client.credits.get_credit_event_ledger_entry(ledger_entry_id: "ledger_entry_id") + # + # @return [Schematic::Credits::Types::GetCreditEventLedgerEntryResponse] + def get_credit_event_ledger_entry(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "v2/billing/credits/ledger/#{URI.encode_uri_component(params[:ledger_entry_id].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Schematic::Credits::Types::GetCreditEventLedgerEntryResponse.load(response.body)) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + error_types = { + 401 => Schematic::Types::ApiError, + 403 => Schematic::Types::ApiError, + 404 => Schematic::Types::ApiError, + 500 => Schematic::Types::ApiError + } + error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types) + raise error_class.new(response.body, code: code, body: error_body) + end + end + # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url @@ -2075,6 +2120,7 @@ def list_credit_event_ledger(request_options: {}, **params) # @option params [String, nil] :end_time # @option params [Schematic::Types::CreditEventType, nil] :event_type # @option params [String, nil] :feature_id + # @option params [String, nil] :source_event_id # @option params [String, nil] :start_time # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset @@ -2086,6 +2132,7 @@ def list_credit_event_ledger(request_options: {}, **params) # end_time: "end_time", # event_type: "adjustment", # feature_id: "feature_id", + # source_event_id: "source_event_id", # start_time: "start_time", # limit: 1000000, # offset: 1000000 @@ -2100,6 +2147,7 @@ def count_credit_event_ledger(request_options: {}, **params) query_params["end_time"] = params[:end_time] if params.key?(:end_time) query_params["event_type"] = params[:event_type] if params.key?(:event_type) query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) + query_params["source_event_id"] = params[:source_event_id] if params.key?(:source_event_id) query_params["start_time"] = params[:start_time] if params.key?(:start_time) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) diff --git a/lib/schematic/credits/types/count_credit_event_ledger_params.rb b/lib/schematic/credits/types/count_credit_event_ledger_params.rb index ff9ee0e..9fbf1cd 100644 --- a/lib/schematic/credits/types/count_credit_event_ledger_params.rb +++ b/lib/schematic/credits/types/count_credit_event_ledger_params.rb @@ -19,6 +19,8 @@ class CountCreditEventLedgerParams < Internal::Types::Model field :offset, -> { Integer }, optional: true, nullable: false + field :source_event_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_credit_event_ledger_request.rb b/lib/schematic/credits/types/count_credit_event_ledger_request.rb index b5650df..e74b1c9 100644 --- a/lib/schematic/credits/types/count_credit_event_ledger_request.rb +++ b/lib/schematic/credits/types/count_credit_event_ledger_request.rb @@ -14,6 +14,8 @@ class CountCreditEventLedgerRequest < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :source_event_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/accounts/types/create_environment_response.rb b/lib/schematic/credits/types/get_credit_event_ledger_entry_response.rb similarity index 61% rename from lib/schematic/accounts/types/create_environment_response.rb rename to lib/schematic/credits/types/get_credit_event_ledger_entry_response.rb index 60e22ba..11f3c89 100644 --- a/lib/schematic/accounts/types/create_environment_response.rb +++ b/lib/schematic/credits/types/get_credit_event_ledger_entry_response.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true module Schematic - module Accounts + module Credits module Types - class CreateEnvironmentResponse < Internal::Types::Model - field :data, -> { Schematic::Types::EnvironmentDetailResponseData }, optional: false, nullable: false + class GetCreditEventLedgerEntryResponse < Internal::Types::Model + field :data, -> { Schematic::Types::CreditEventLedgerResponseData }, optional: false, nullable: false field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end diff --git a/lib/schematic/credits/types/list_credit_event_ledger_params.rb b/lib/schematic/credits/types/list_credit_event_ledger_params.rb index 9918aaa..f9b71a6 100644 --- a/lib/schematic/credits/types/list_credit_event_ledger_params.rb +++ b/lib/schematic/credits/types/list_credit_event_ledger_params.rb @@ -19,6 +19,8 @@ class ListCreditEventLedgerParams < Internal::Types::Model field :offset, -> { Integer }, optional: true, nullable: false + field :source_event_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_credit_event_ledger_request.rb b/lib/schematic/credits/types/list_credit_event_ledger_request.rb index 8036a55..1466d78 100644 --- a/lib/schematic/credits/types/list_credit_event_ledger_request.rb +++ b/lib/schematic/credits/types/list_credit_event_ledger_request.rb @@ -14,6 +14,8 @@ class ListCreditEventLedgerRequest < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :source_event_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false field :limit, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb b/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb index 6335a61..4413788 100644 --- a/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb +++ b/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb @@ -11,6 +11,8 @@ class CreateCustomPlanBundleRequestBody < Internal::Types::Model field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false field :plan, -> { Schematic::Types::CreateCustomPlanBundlePlanRequestBody }, optional: false, nullable: false + + field :renewal_policy, -> { Schematic::Types::RenewalPolicy }, optional: true, nullable: false end end end diff --git a/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb b/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb index 20d0d14..78503e3 100644 --- a/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb +++ b/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb @@ -11,6 +11,8 @@ class CreatePlanBundleRequestBody < Internal::Types::Model field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false field :plan, -> { Schematic::Types::CreatePlanRequestBody }, optional: false, nullable: false + + field :renewal_policy, -> { Schematic::Types::RenewalPolicy }, optional: true, nullable: false end end end diff --git a/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb b/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb index 2b11a3b..d5315d4 100644 --- a/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb +++ b/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb @@ -15,6 +15,8 @@ class UpdatePlanBundleRequestBody < Internal::Types::Model field :plan, -> { Schematic::Types::UpdatePlanRequestBody }, optional: false, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false + + field :renewal_policy, -> { Schematic::Types::RenewalPolicy }, 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 3f3e1e1..001464d 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 @@ -16,6 +16,8 @@ class RetryCustomPlanBillingRequestBody < Internal::Types::Model field :days_until_due, -> { Integer }, optional: true, nullable: false + field :end_date, -> { String }, optional: true, nullable: false + field :prorate_first_period, -> { Internal::Types::Boolean }, optional: true, nullable: false field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/schematic/types/api_key_create_response_data.rb b/lib/schematic/types/api_key_create_response_data.rb deleted file mode 100644 index 586924a..0000000 --- a/lib/schematic/types/api_key_create_response_data.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - class ApiKeyCreateResponseData < Internal::Types::Model - field :created_at, -> { String }, optional: false, nullable: false - - field :description, -> { String }, optional: true, nullable: false - - field :environment, -> { Schematic::Types::EnvironmentResponseData }, optional: true, nullable: false - - field :environment_id, -> { String }, optional: true, nullable: false - - field :id, -> { String }, optional: false, nullable: false - - field :integration, -> { Schematic::Types::ApiKeyIntegrationResponseData }, optional: true, nullable: false - - field :last_used_at, -> { String }, optional: true, nullable: false - - field :name, -> { String }, optional: false, nullable: false - - field :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 - - field :updated_at, -> { String }, optional: false, nullable: false - end - end -end diff --git a/lib/schematic/types/billing_invoice_address_response_data.rb b/lib/schematic/types/billing_invoice_address_response_data.rb new file mode 100644 index 0000000..577b21f --- /dev/null +++ b/lib/schematic/types/billing_invoice_address_response_data.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Schematic + module Types + class BillingInvoiceAddressResponseData < Internal::Types::Model + field :city, -> { String }, optional: false, nullable: false + + field :country, -> { String }, optional: false, nullable: false + + field :line_1, -> { String }, optional: false, nullable: false, api_name: "line1" + + field :line_2, -> { String }, optional: false, nullable: false, api_name: "line2" + + field :postal_code, -> { String }, optional: false, nullable: false + + field :state, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/billing_invoice_billing_details_response_data.rb b/lib/schematic/types/billing_invoice_billing_details_response_data.rb new file mode 100644 index 0000000..8f00e1f --- /dev/null +++ b/lib/schematic/types/billing_invoice_billing_details_response_data.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Schematic + module Types + class BillingInvoiceBillingDetailsResponseData < Internal::Types::Model + field :address, -> { Schematic::Types::BillingInvoiceAddressResponseData }, optional: true, nullable: false + + field :email, -> { String }, optional: true, nullable: false + + field :phone, -> { String }, optional: true, nullable: false + + field :tax_ids, -> { Internal::Types::Array[Schematic::Types::BillingInvoiceTaxIdResponseData] }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/billing_invoice_detail_response_data.rb b/lib/schematic/types/billing_invoice_detail_response_data.rb index b58acb5..e19646a 100644 --- a/lib/schematic/types/billing_invoice_detail_response_data.rb +++ b/lib/schematic/types/billing_invoice_detail_response_data.rb @@ -13,16 +13,20 @@ class BillingInvoiceDetailResponseData < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false - field :contract_id, -> { String }, optional: false, nullable: false + field :contract_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false - field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: false, nullable: false + field :discount, -> { Integer }, optional: false, nullable: false + + field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false field :due_at, -> { String }, optional: true, nullable: false + field :external_id, -> { String }, optional: true, nullable: false + field :finalized_at, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false @@ -31,19 +35,31 @@ class BillingInvoiceDetailResponseData < Internal::Types::Model field :number, -> { String }, optional: true, nullable: false - field :period_end, -> { String }, optional: false, nullable: false + field :pdf_url, -> { String }, optional: true, nullable: false + + field :period_end, -> { String }, optional: true, nullable: false + + field :period_start, -> { String }, optional: true, nullable: false - field :period_start, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false field :settlements, -> { Internal::Types::Array[Schematic::Types::BillingInvoiceSettlementResponseData] }, optional: false, nullable: false field :status, -> { Schematic::Types::InvoiceStatus }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: true, nullable: false + + field :subscription_id, -> { String }, optional: true, nullable: false + field :subtotal, -> { Integer }, optional: false, nullable: false + field :tax, -> { Integer }, optional: false, nullable: false + field :terms, -> { Schematic::Types::BillingInvoiceTermsResponseData }, optional: true, nullable: false field :total, -> { Integer }, optional: false, nullable: false + + field :url, -> { String }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/billing_invoice_line_response_data.rb b/lib/schematic/types/billing_invoice_line_response_data.rb index a126f2a..be4a44f 100644 --- a/lib/schematic/types/billing_invoice_line_response_data.rb +++ b/lib/schematic/types/billing_invoice_line_response_data.rb @@ -7,7 +7,11 @@ class BillingInvoiceLineResponseData < Internal::Types::Model field :charge_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false - field :id, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: true, nullable: false + + field :external_id, -> { String }, optional: true, nullable: false + + field :id, -> { String }, optional: true, nullable: false field :kind, -> { Schematic::Types::InvoiceLineKind }, optional: false, nullable: false diff --git a/lib/schematic/types/billing_invoice_response_data.rb b/lib/schematic/types/billing_invoice_response_data.rb index a62709b..0b0cbed 100644 --- a/lib/schematic/types/billing_invoice_response_data.rb +++ b/lib/schematic/types/billing_invoice_response_data.rb @@ -13,31 +13,39 @@ class BillingInvoiceResponseData < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false - field :contract_id, -> { String }, optional: false, nullable: false + field :contract_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false - field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: false, nullable: false + field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false field :due_at, -> { String }, optional: true, nullable: false + field :external_id, -> { String }, optional: true, nullable: false + field :finalized_at, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :number, -> { String }, optional: true, nullable: false - field :period_end, -> { String }, optional: false, nullable: false + field :period_end, -> { String }, optional: true, nullable: false + + field :period_start, -> { String }, optional: true, nullable: false - field :period_start, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false field :status, -> { Schematic::Types::InvoiceStatus }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: true, nullable: false + field :subtotal, -> { Integer }, optional: false, nullable: false field :total, -> { Integer }, optional: false, nullable: false + + field :url, -> { String }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/billing_invoice_settlement_response_data.rb b/lib/schematic/types/billing_invoice_settlement_response_data.rb index 3812f7b..143597a 100644 --- a/lib/schematic/types/billing_invoice_settlement_response_data.rb +++ b/lib/schematic/types/billing_invoice_settlement_response_data.rb @@ -7,7 +7,7 @@ class BillingInvoiceSettlementResponseData < Internal::Types::Model field :collector, -> { Schematic::Types::Collector }, optional: false, nullable: false - field :id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: true, nullable: false field :reference, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/billing_invoice_tax_id_response_data.rb b/lib/schematic/types/billing_invoice_tax_id_response_data.rb new file mode 100644 index 0000000..249b638 --- /dev/null +++ b/lib/schematic/types/billing_invoice_tax_id_response_data.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Types + class BillingInvoiceTaxIdResponseData < 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/billing_invoice_terms_response_data.rb b/lib/schematic/types/billing_invoice_terms_response_data.rb index 68dce8d..7cd2a94 100644 --- a/lib/schematic/types/billing_invoice_terms_response_data.rb +++ b/lib/schematic/types/billing_invoice_terms_response_data.rb @@ -3,6 +3,8 @@ module Schematic module Types class BillingInvoiceTermsResponseData < Internal::Types::Model + field :billing_details, -> { Schematic::Types::BillingInvoiceBillingDetailsResponseData }, optional: true, nullable: false + field :collection_method, -> { Schematic::Types::BillingCollectionMethod }, optional: false, nullable: false field :collector, -> { Schematic::Types::Collector }, 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 9a74fe6..caafed9 100644 --- a/lib/schematic/types/billing_plan_credit_grant_response_data.rb +++ b/lib/schematic/types/billing_plan_credit_grant_response_data.rb @@ -94,6 +94,8 @@ class BillingPlanCreditGrantResponseData < Internal::Types::Model field :unit_price_decimal, -> { String }, optional: true, nullable: false field :updated_at, -> { String }, optional: false, nullable: false + + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantWarningTierResponseData] }, optional: false, nullable: false end end end diff --git a/lib/schematic/types/billing_plan_credit_grant_warning_tier_response_data.rb b/lib/schematic/types/billing_plan_credit_grant_warning_tier_response_data.rb new file mode 100644 index 0000000..63da6e5 --- /dev/null +++ b/lib/schematic/types/billing_plan_credit_grant_warning_tier_response_data.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + class BillingPlanCreditGrantWarningTierResponseData < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :key, -> { String }, optional: false, nullable: false + + field :value, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_bundle_currency_price_response_data.rb b/lib/schematic/types/catalog_bundle_currency_price_response_data.rb new file mode 100644 index 0000000..de0b749 --- /dev/null +++ b/lib/schematic/types/catalog_bundle_currency_price_response_data.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogBundleCurrencyPriceResponseData < Internal::Types::Model + field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false + + field :price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :unit_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_capabilities_response_data.rb b/lib/schematic/types/catalog_capabilities_response_data.rb new file mode 100644 index 0000000..a036aa8 --- /dev/null +++ b/lib/schematic/types/catalog_capabilities_response_data.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogCapabilitiesResponseData < Internal::Types::Model + field :badge_visibility, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :checkout, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_credit_bundle_response_data.rb b/lib/schematic/types/catalog_credit_bundle_response_data.rb new file mode 100644 index 0000000..00755fb --- /dev/null +++ b/lib/schematic/types/catalog_credit_bundle_response_data.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogCreditBundleResponseData < Internal::Types::Model + field :bundle_type, -> { String }, optional: false, nullable: false + + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :credit_icon, -> { String }, optional: true, nullable: false + + field :credit_id, -> { String }, optional: false, nullable: false + + field :credit_name, -> { String }, optional: false, nullable: false + + field :credit_plural_name, -> { String }, optional: true, nullable: false + + field :credit_singular_name, -> { String }, optional: true, nullable: false + + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CatalogBundleCurrencyPriceResponseData] }, optional: false, nullable: false + + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: false, nullable: false + + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: false, nullable: false + + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :name, -> { String }, optional: false, nullable: false + + field :price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :quantity, -> { Integer }, optional: true, nullable: false + + field :unit_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_credit_grant_response_data.rb b/lib/schematic/types/catalog_credit_grant_response_data.rb new file mode 100644 index 0000000..2cf2b61 --- /dev/null +++ b/lib/schematic/types/catalog_credit_grant_response_data.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogCreditGrantResponseData < Internal::Types::Model + field :company_credit_amount, -> { Integer }, optional: false, nullable: false + + field :credit_amount, -> { Integer }, optional: false, nullable: false + + field :credit_icon, -> { String }, optional: true, nullable: false + + field :credit_id, -> { String }, optional: false, nullable: false + + field :credit_name, -> { String }, optional: false, nullable: false + + field :credit_plural_name, -> { String }, optional: true, nullable: false + + field :credit_singular_name, -> { String }, optional: true, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :license_id, -> { String }, optional: true, nullable: false + + field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false + + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_currency_prices_response_data.rb b/lib/schematic/types/catalog_currency_prices_response_data.rb new file mode 100644 index 0000000..0a52a1b --- /dev/null +++ b/lib/schematic/types/catalog_currency_prices_response_data.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogCurrencyPricesResponseData < Internal::Types::Model + field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false + + field :monthly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :one_time_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :quarterly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :yearly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_custom_plan_cta_response_data.rb b/lib/schematic/types/catalog_custom_plan_cta_response_data.rb new file mode 100644 index 0000000..799e40c --- /dev/null +++ b/lib/schematic/types/catalog_custom_plan_cta_response_data.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogCustomPlanCtaResponseData < Internal::Types::Model + field :cta_text, -> { String }, optional: true, nullable: false + + field :cta_url, -> { String }, optional: true, nullable: false + + field :price_text, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_detail_response_data.rb b/lib/schematic/types/catalog_detail_response_data.rb new file mode 100644 index 0000000..3735e5a --- /dev/null +++ b/lib/schematic/types/catalog_detail_response_data.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogDetailResponseData < Internal::Types::Model + field :capabilities, -> { Schematic::Types::CatalogCapabilitiesResponseData }, optional: false, nullable: false + + field :custom_plan_cta, -> { Schematic::Types::CatalogCustomPlanCtaResponseData }, optional: true, nullable: false + + field :default_currency, -> { Schematic::Types::Currency }, optional: false, nullable: false + + field :description, -> { String }, optional: true, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :name, -> { String }, optional: false, nullable: false + + field :pricing_model, -> { String }, optional: true, nullable: false + + field :pricing_url, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_entitlement_response_data.rb b/lib/schematic/types/catalog_entitlement_response_data.rb new file mode 100644 index 0000000..1edb912 --- /dev/null +++ b/lib/schematic/types/catalog_entitlement_response_data.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogEntitlementResponseData < Internal::Types::Model + field :consumption_rate, -> { Float }, optional: true, nullable: false + + field :credit_equivalent_limit, -> { Integer }, optional: true, nullable: false + + field :credit_icon, -> { String }, optional: true, nullable: false + + field :credit_id, -> { String }, optional: true, nullable: false + + field :credit_name, -> { String }, optional: true, nullable: false + + field :credit_plural_name, -> { String }, optional: true, nullable: false + + field :credit_singular_name, -> { String }, optional: true, nullable: false + + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CatalogCurrencyPricesResponseData] }, optional: false, nullable: false + + field :feature_description, -> { String }, optional: false, nullable: false + + field :feature_icon, -> { String }, optional: false, nullable: false + + field :feature_id, -> { String }, optional: false, nullable: false + + field :feature_name, -> { String }, optional: false, nullable: false + + field :feature_plural_name, -> { String }, optional: true, nullable: false + + field :feature_singular_name, -> { String }, optional: true, nullable: false + + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + + field :license_id, -> { String }, optional: true, nullable: false + + field :metered_monthly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :metered_quarterly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :metered_yearly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + + field :soft_limit, -> { 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 + + field :warning_threshold, -> { Integer }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_plan_entitlement_response_data.rb b/lib/schematic/types/catalog_plan_entitlement_response_data.rb new file mode 100644 index 0000000..6c362ca --- /dev/null +++ b/lib/schematic/types/catalog_plan_entitlement_response_data.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogPlanEntitlementResponseData < Internal::Types::Model + field :consumption_rate, -> { Float }, optional: true, nullable: false + + field :credit_equivalent_limit, -> { Integer }, optional: true, nullable: false + + field :credit_icon, -> { String }, optional: true, nullable: false + + field :credit_id, -> { String }, optional: true, nullable: false + + field :credit_name, -> { String }, optional: true, nullable: false + + field :credit_plural_name, -> { String }, optional: true, nullable: false + + field :credit_singular_name, -> { String }, optional: true, nullable: false + + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CatalogCurrencyPricesResponseData] }, optional: false, nullable: false + + field :feature_description, -> { String }, optional: false, nullable: false + + field :feature_icon, -> { String }, optional: false, nullable: false + + field :feature_id, -> { String }, optional: false, nullable: false + + field :feature_name, -> { String }, optional: false, nullable: false + + field :feature_plural_name, -> { String }, optional: true, nullable: false + + field :feature_singular_name, -> { String }, optional: true, nullable: false + + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :license_id, -> { String }, optional: true, nullable: false + + field :metered_monthly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :metered_quarterly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :metered_yearly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + + field :soft_limit, -> { 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 + + field :warning_threshold, -> { Integer }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_plan_response_data.rb b/lib/schematic/types/catalog_plan_response_data.rb new file mode 100644 index 0000000..616744b --- /dev/null +++ b/lib/schematic/types/catalog_plan_response_data.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogPlanResponseData < Internal::Types::Model + field :available_periods, -> { Internal::Types::Array[Schematic::Types::PlanPriceCadence] }, optional: false, nullable: false + + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false + + field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false + + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CatalogCurrencyPricesResponseData] }, optional: false, nullable: false + + field :description, -> { String }, optional: false, nullable: false + + field :entitlements, -> { Internal::Types::Array[Schematic::Types::CatalogPlanEntitlementResponseData] }, optional: false, nullable: false + + field :icon, -> { String }, optional: false, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::CatalogCreditGrantResponseData] }, optional: false, nullable: false + + field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :monthly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :name, -> { String }, optional: false, nullable: false + + field :one_time_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :quarterly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + + field :trial_days, -> { Integer }, optional: true, nullable: false + + field :yearly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_price_response_data.rb b/lib/schematic/types/catalog_price_response_data.rb new file mode 100644 index 0000000..f879e79 --- /dev/null +++ b/lib/schematic/types/catalog_price_response_data.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogPriceResponseData < Internal::Types::Model + field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :interval, -> { Schematic::Types::BillingProductPriceInterval }, optional: false, nullable: false + + field :interval_count, -> { Integer }, optional: false, nullable: false + + field :overage_unit_price_decimal, -> { String }, optional: true, nullable: false + + field :package_size, -> { Integer }, optional: false, nullable: false + + field :price, -> { Integer }, optional: false, nullable: false + + field :price_decimal, -> { String }, optional: true, nullable: false + + field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CatalogPriceTierResponseData] }, optional: false, nullable: false + + field :scheme, -> { Schematic::Types::BillingPriceScheme }, optional: false, nullable: false + + field :tiers_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/catalog_price_tier_response_data.rb b/lib/schematic/types/catalog_price_tier_response_data.rb new file mode 100644 index 0000000..b95819d --- /dev/null +++ b/lib/schematic/types/catalog_price_tier_response_data.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CatalogPriceTierResponseData < Internal::Types::Model + field :flat_price, -> { Integer }, optional: true, nullable: false + + field :from, -> { Integer }, optional: false, nullable: false + + field :per_unit_price, -> { Integer }, optional: true, nullable: false + + field :per_unit_price_decimal, -> { String }, optional: true, nullable: false + + field :to, -> { Integer }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/checkout_charge_timing.rb b/lib/schematic/types/checkout_charge_timing.rb new file mode 100644 index 0000000..2010ba8 --- /dev/null +++ b/lib/schematic/types/checkout_charge_timing.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + module CheckoutChargeTiming + extend Schematic::Internal::Types::Enum + + AT_RENEWAL = "at_renewal" + NONE = "none" + NOW = "now" + end + end +end diff --git a/lib/schematic/types/checkout_problem_code.rb b/lib/schematic/types/checkout_problem_code.rb index 2d5907d..b0ecf6b 100644 --- a/lib/schematic/types/checkout_problem_code.rb +++ b/lib/schematic/types/checkout_problem_code.rb @@ -18,6 +18,7 @@ module CheckoutProblemCode BILLING_START_DATE_NEEDS_RENEWAL_DATE = "billing_start_date_needs_renewal_date" BILLING_START_DATE_NOT_BEFORE_RENEWAL_DATE = "billing_start_date_not_before_renewal_date" BILLING_START_DATE_TOO_FAR_IN_PAST = "billing_start_date_too_far_in_past" + CHECKOUT_SUPERSEDED = "checkout_superseded" CREDIT_BUNDLE_INCOMPATIBLE = "credit_bundle_incompatible" CREDIT_BUNDLE_UNAVAILABLE = "credit_bundle_unavailable" CREDIT_BUNDLES_ACTIVATE_ON_PAYMENT = "credit_bundles_activate_on_payment" @@ -25,6 +26,9 @@ module CheckoutProblemCode CUSTOM_FIELD_REQUIRED = "custom_field_required" DISCOUNT_INELIGIBLE = "discount_ineligible" DOWNGRADE_NOT_PERMITTED = "downgrade_not_permitted" + END_DATE_MUST_BE_FUTURE = "end_date_must_be_future" + END_DATE_NEEDS_NEW_SUBSCRIPTION = "end_date_needs_new_subscription" + END_DATE_NOT_AFTER_RENEWAL_DATE = "end_date_not_after_renewal_date" FREE_FIRST_PERIOD_ACTIVATES_ON_PAYMENT = "free_first_period_activates_on_payment" INVOICE_EMAIL_REQUIRED = "invoice_email_required" INVOICED_SUBSCRIPTION_CONFLICTS_WITH_TRIAL = "invoiced_subscription_conflicts_with_trial" 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 bc20951..5d46254 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 @@ -76,6 +76,8 @@ class CreateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :unit_price, -> { Integer }, optional: true, nullable: false field :unit_price_decimal, -> { String }, optional: true, nullable: false + + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantWarningTierRequestBody] }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/credit_spend_window_unit.rb b/lib/schematic/types/credit_spend_window_unit.rb index 999a22d..9ba13d2 100644 --- a/lib/schematic/types/credit_spend_window_unit.rb +++ b/lib/schematic/types/credit_spend_window_unit.rb @@ -7,6 +7,8 @@ module CreditSpendWindowUnit HOUR = "hour" DAY = "day" + WEEK = "week" + MONTH = "month" BILLING_PERIOD = "billing_period" 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 ec1d6da..659f9be 100644 --- a/lib/schematic/types/custom_plan_billing_response_data.rb +++ b/lib/schematic/types/custom_plan_billing_response_data.rb @@ -17,6 +17,8 @@ class CustomPlanBillingResponseData < Internal::Types::Model field :days_until_due, -> { Integer }, optional: false, nullable: false + field :end_date, -> { String }, optional: true, nullable: false + field :external_invoice_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/entitlement_type.rb b/lib/schematic/types/entitlement_type.rb index 275c587..999d518 100644 --- a/lib/schematic/types/entitlement_type.rb +++ b/lib/schematic/types/entitlement_type.rb @@ -6,6 +6,7 @@ module EntitlementType extend Schematic::Internal::Types::Enum COMPANY_OVERRIDE = "company_override" + PLAN_CREDIT_GRANT = "plan_credit_grant" PLAN_ENTITLEMENT = "plan_entitlement" UNKNOWN = "unknown" end diff --git a/lib/schematic/types/environment_detail_response_data.rb b/lib/schematic/types/environment_detail_response_data.rb deleted file mode 100644 index 3af3db1..0000000 --- a/lib/schematic/types/environment_detail_response_data.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -module Schematic - module Types - class EnvironmentDetailResponseData < Internal::Types::Model - field :api_keys, -> { Internal::Types::Array[Schematic::Types::ApiKeyResponseData] }, optional: false, nullable: false - - field :created_at, -> { String }, optional: false, nullable: false - - field :environment_type, -> { Schematic::Types::EnvironmentType }, optional: false, nullable: false - - field :id, -> { String }, optional: false, nullable: false - - field :name, -> { String }, optional: false, nullable: false - - field :require_context_signature, -> { Internal::Types::Boolean }, optional: false, nullable: false - - field :updated_at, -> { String }, optional: false, nullable: false - end - end -end diff --git a/lib/schematic/types/event_body.rb b/lib/schematic/types/event_body.rb index 0958441..53c628b 100644 --- a/lib/schematic/types/event_body.rb +++ b/lib/schematic/types/event_body.rb @@ -5,13 +5,13 @@ module Types class EventBody < Internal::Types::Model extend Schematic::Internal::Types::Union - member -> { Schematic::Types::EventBodyTrack } + member -> { Schematic::Types::EventBodyInference } member -> { Schematic::Types::EventBodyFlagCheck } - member -> { Schematic::Types::EventBodyIdentify } + member -> { Schematic::Types::EventBodyTrack } - member -> { Schematic::Types::EventBodyInference } + member -> { Schematic::Types::EventBodyIdentify } end end end diff --git a/lib/schematic/types/payment_method_billing_details_request_body.rb b/lib/schematic/types/payment_method_billing_details_request_body.rb new file mode 100644 index 0000000..3066e8d --- /dev/null +++ b/lib/schematic/types/payment_method_billing_details_request_body.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PaymentMethodBillingDetailsRequestBody < 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 + end + end +end diff --git a/lib/schematic/types/plan_credit_grant_warning_tier_request_body.rb b/lib/schematic/types/plan_credit_grant_warning_tier_request_body.rb new file mode 100644 index 0000000..8bb71ba --- /dev/null +++ b/lib/schematic/types/plan_credit_grant_warning_tier_request_body.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PlanCreditGrantWarningTierRequestBody < Internal::Types::Model + field :key, -> { String }, optional: false, nullable: false + + field :value, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/plan_version_migration_preview_company_response_data.rb b/lib/schematic/types/plan_version_migration_preview_company_response_data.rb index e38e32e..e356785 100644 --- a/lib/schematic/types/plan_version_migration_preview_company_response_data.rb +++ b/lib/schematic/types/plan_version_migration_preview_company_response_data.rb @@ -11,6 +11,8 @@ class PlanVersionMigrationPreviewCompanyResponseData < Internal::Types::Model field :note, -> { String }, optional: true, nullable: false + field :notes, -> { Internal::Types::Array[Schematic::Types::PlanVersionMigrationPreviewNoteResponseData] }, optional: false, nullable: false + field :plan_version_id_from, -> { String }, optional: true, nullable: false field :will_update_subscription, -> { Internal::Types::Boolean }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_version_migration_preview_note_response_data.rb b/lib/schematic/types/plan_version_migration_preview_note_response_data.rb new file mode 100644 index 0000000..12135ea --- /dev/null +++ b/lib/schematic/types/plan_version_migration_preview_note_response_data.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PlanVersionMigrationPreviewNoteResponseData < Internal::Types::Model + field :blocking, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :code, -> { Schematic::Types::MigrationErrorCode }, optional: true, nullable: false + + field :message, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/plan_version_response_data.rb b/lib/schematic/types/plan_version_response_data.rb index 18e025a..9ee1430 100644 --- a/lib/schematic/types/plan_version_response_data.rb +++ b/lib/schematic/types/plan_version_response_data.rb @@ -19,6 +19,8 @@ class PlanVersionResponseData < Internal::Types::Model field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false + field :renewal_policy, -> { Schematic::Types::RenewalPolicy }, optional: false, nullable: false + field :status, -> { Schematic::Types::PlanVersionStatus }, optional: false, nullable: false field :updated_at, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/preview_subscription_finance_response_data.rb b/lib/schematic/types/preview_subscription_finance_response_data.rb index d21995c..f2a9671 100644 --- a/lib/schematic/types/preview_subscription_finance_response_data.rb +++ b/lib/schematic/types/preview_subscription_finance_response_data.rb @@ -7,6 +7,10 @@ class PreviewSubscriptionFinanceResponseData < Internal::Types::Model field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false + field :customer_balance_applied, -> { Integer }, optional: false, nullable: false + + field :customer_balance_remaining, -> { Integer }, optional: false, nullable: false + field :discount_amount, -> { Integer }, optional: false, nullable: false field :discounts, -> { Internal::Types::Array[Schematic::Types::PreviewSubscriptionDiscountResponseData] }, optional: false, nullable: false @@ -27,6 +31,8 @@ class PreviewSubscriptionFinanceResponseData < Internal::Types::Model field :proration_billed_at, -> { String }, optional: true, nullable: false + field :proration_detail, -> { Schematic::Types::PreviewSubscriptionProrationResponseData }, optional: true, nullable: false + field :tax_amount, -> { Integer }, optional: true, nullable: false field :tax_display_name, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/preview_subscription_proration_line_response_data.rb b/lib/schematic/types/preview_subscription_proration_line_response_data.rb new file mode 100644 index 0000000..1e0dfdd --- /dev/null +++ b/lib/schematic/types/preview_subscription_proration_line_response_data.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PreviewSubscriptionProrationLineResponseData < Internal::Types::Model + field :amount, -> { Integer }, optional: false, nullable: false + + field :kind, -> { Schematic::Types::ProrationLineKind }, optional: false, nullable: false + + field :period_end, -> { String }, optional: true, nullable: false + + field :period_start, -> { String }, optional: true, nullable: false + + field :plan_id, -> { String }, optional: true, nullable: false + + field :price_id, -> { String }, optional: true, nullable: false + + field :quantity, -> { Integer }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/preview_subscription_proration_response_data.rb b/lib/schematic/types/preview_subscription_proration_response_data.rb new file mode 100644 index 0000000..54ddb08 --- /dev/null +++ b/lib/schematic/types/preview_subscription_proration_response_data.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PreviewSubscriptionProrationResponseData < Internal::Types::Model + field :billed_at, -> { String }, optional: true, nullable: false + + field :charge, -> { Integer }, optional: false, nullable: false + + field :credit, -> { Integer }, optional: false, nullable: false + + field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false + + field :lines, -> { Internal::Types::Array[Schematic::Types::PreviewSubscriptionProrationLineResponseData] }, optional: false, nullable: false + + field :timing, -> { Schematic::Types::CheckoutChargeTiming }, optional: false, nullable: false + + field :total, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/proration_line_kind.rb b/lib/schematic/types/proration_line_kind.rb new file mode 100644 index 0000000..3af6210 --- /dev/null +++ b/lib/schematic/types/proration_line_kind.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Types + module ProrationLineKind + extend Schematic::Internal::Types::Enum + + CHARGE = "charge" + CREDIT = "credit" + end + end +end diff --git a/lib/schematic/types/public_catalog_response_data.rb b/lib/schematic/types/public_catalog_response_data.rb new file mode 100644 index 0000000..a4ad8a6 --- /dev/null +++ b/lib/schematic/types/public_catalog_response_data.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PublicCatalogResponseData < Internal::Types::Model + field :add_ons, -> { Internal::Types::Array[Schematic::Types::CatalogPlanResponseData] }, optional: false, nullable: false + + field :capabilities, -> { Schematic::Types::CatalogCapabilitiesResponseData }, optional: false, nullable: false + + field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::CatalogCreditBundleResponseData] }, optional: false, nullable: false + + field :custom_plan_cta, -> { Schematic::Types::CatalogCustomPlanCtaResponseData }, optional: true, nullable: false + + field :default_currency, -> { Schematic::Types::Currency }, optional: false, nullable: false + + field :description, -> { String }, optional: true, nullable: false + + field :id, -> { String }, optional: false, nullable: false + + field :name, -> { String }, optional: false, nullable: false + + field :plans, -> { Internal::Types::Array[Schematic::Types::CatalogPlanResponseData] }, optional: false, nullable: false + + field :pricing_model, -> { String }, optional: true, nullable: false + + field :pricing_url, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/publish_plan_version_request_body.rb b/lib/schematic/types/publish_plan_version_request_body.rb index cfe9ab4..30a7712 100644 --- a/lib/schematic/types/publish_plan_version_request_body.rb +++ b/lib/schematic/types/publish_plan_version_request_body.rb @@ -21,6 +21,8 @@ class PublishPlanVersionRequestBody < Internal::Types::Model field :days_until_due, -> { Integer }, optional: true, nullable: false + field :end_date, -> { String }, 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 diff --git a/lib/schematic/types/publish_preview_response_data.rb b/lib/schematic/types/publish_preview_response_data.rb index 2c9bcdf..ca19e0f 100644 --- a/lib/schematic/types/publish_preview_response_data.rb +++ b/lib/schematic/types/publish_preview_response_data.rb @@ -19,6 +19,8 @@ class PublishPreviewResponseData < Internal::Types::Model field :effective_at, -> { String }, optional: true, nullable: false + field :ends_at, -> { String }, optional: true, nullable: false + field :has_billing_changes, -> { Internal::Types::Boolean }, optional: false, nullable: false field :immediate_invoice_amount, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/types/renewal_policy.rb b/lib/schematic/types/renewal_policy.rb new file mode 100644 index 0000000..a0d8bfc --- /dev/null +++ b/lib/schematic/types/renewal_policy.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + module RenewalPolicy + extend Schematic::Internal::Types::Enum + + AUTO_RENEW = "auto_renew" + EXPIRE_TO_DEFAULT = "expire_to_default" + HOLD_WITH_GRACE = "hold_with_grace" + 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 1f8d62d..ae8eac4 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 @@ -70,6 +70,8 @@ class UpdateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :unit_price, -> { Integer }, optional: true, nullable: false field :unit_price_decimal, -> { String }, optional: true, nullable: false + + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantWarningTierRequestBody] }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/webhook_request_type.rb b/lib/schematic/types/webhook_request_type.rb index d81b0cf..5733ca7 100644 --- a/lib/schematic/types/webhook_request_type.rb +++ b/lib/schematic/types/webhook_request_type.rb @@ -18,6 +18,7 @@ module WebhookRequestType CREDIT_LIMIT_REACHED = "credit.limit.reached" CREDIT_LIMIT_WARNING = "credit.limit.warning" CREDIT_PURCHASE_SUCCESS = "credit.purchase.success" + CREDIT_USAGE_WARNING_REACHED = "credit.usage_warning_reached" ENTITLEMENT_LIMIT_REACHED = "entitlement.limit.reached" ENTITLEMENT_LIMIT_WARNING = "entitlement.limit.warning" ENTITLEMENT_SOFT_LIMIT_REACHED = "entitlement.soft_limit.reached" diff --git a/lib/schematic/version.rb b/lib/schematic/version.rb index eba69ba..1f13082 100644 --- a/lib/schematic/version.rb +++ b/lib/schematic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Schematic - VERSION = "1.5.5" + VERSION = "1.5.6" end diff --git a/reference.md b/reference.md index 7441430..fac9683 100644 --- a/reference.md +++ b/reference.md @@ -1,5 +1,5 @@ # Reference -
client.get_credit_ledger() -> +
client.post_api_keys() ->
@@ -12,7 +12,7 @@
```ruby -client.get_credit_ledger +client.post_api_keys ```
@@ -39,8 +39,7 @@ client.get_credit_ledger
-## accounts -
client.accounts.list_account_members() -> Schematic::Accounts::Types::ListAccountMembersResponse +
client.put_api_keys_api_key_id(api_key_id:) ->
@@ -53,13 +52,7 @@ client.get_credit_ledger
```ruby -client.accounts.list_account_members( - ids: ["ids"], - q: "q", - role: "admin", - limit: 1000000, - offset: 1000000 -) +client.put_api_keys_api_key_id(api_key_id: "api_key_id") ```
@@ -74,15 +67,7 @@ client.accounts.list_account_members(
-**ids:** `String` - -
-
- -
-
- -**q:** `String` — Search filter +**api_key_id:** `String`
@@ -90,31 +75,7 @@ client.accounts.list_account_members(
-**role:** `Schematic::Types::AccountMemberRole` — Filter by member role - -
-
- -
-
- -**limit:** `Integer` — Page limit (default 100) - -
-
- -
-
- -**offset:** `Integer` — Page offset (default 0) - -
-
- -
-
- -**request_options:** `Schematic::Accounts::RequestOptions` +**request_options:** `Schematic::RequestOptions`
@@ -126,7 +87,7 @@ client.accounts.list_account_members(
-
client.accounts.get_account_member(account_member_id:) -> Schematic::Accounts::Types::GetAccountMemberResponse +
client.delete_api_keys_api_key_id(api_key_id:) ->
@@ -139,7 +100,7 @@ client.accounts.list_account_members(
```ruby -client.accounts.get_account_member(account_member_id: "account_member_id") +client.delete_api_keys_api_key_id(api_key_id: "api_key_id") ```
@@ -154,7 +115,7 @@ client.accounts.get_account_member(account_member_id: "account_member_id")
-**account_member_id:** `String` — account_member_id +**api_key_id:** `String`
@@ -162,7 +123,7 @@ client.accounts.get_account_member(account_member_id: "account_member_id")
-**request_options:** `Schematic::Accounts::RequestOptions` +**request_options:** `Schematic::RequestOptions`
@@ -174,7 +135,7 @@ client.accounts.get_account_member(account_member_id: "account_member_id")
-
client.accounts.count_account_members() -> Schematic::Accounts::Types::CountAccountMembersResponse +
client.post_environments() ->
@@ -187,13 +148,7 @@ client.accounts.get_account_member(account_member_id: "account_member_id")
```ruby -client.accounts.count_account_members( - ids: ["ids"], - q: "q", - role: "admin", - limit: 1000000, - offset: 1000000 -) +client.post_environments ```
@@ -208,39 +163,47 @@ client.accounts.count_account_members(
-**ids:** `String` +**request_options:** `Schematic::RequestOptions`
+ + -
-
-**q:** `String` — Search filter -
+
+
client.put_environments_environment_id(environment_id:) ->
-**role:** `Schematic::Types::AccountMemberRole` — Filter by member role - -
-
+#### 🔌 Usage
-**limit:** `Integer` — Page limit (default 100) - +
+
+ +```ruby +client.put_environments_environment_id(environment_id: "environment_id") +``` +
+
+#### ⚙️ Parameters +
-**offset:** `Integer` — Page offset (default 0) +
+
+ +**environment_id:** `String`
@@ -248,7 +211,7 @@ client.accounts.count_account_members(
-**request_options:** `Schematic::Accounts::RequestOptions` +**request_options:** `Schematic::RequestOptions`
@@ -260,7 +223,7 @@ client.accounts.count_account_members(
-
client.accounts.list_api_keys() -> Schematic::Accounts::Types::ListApiKeysResponse +
client.delete_environments_environment_id(environment_id:) ->
@@ -273,12 +236,7 @@ client.accounts.count_account_members(
```ruby -client.accounts.list_api_keys( - environment_id: "environment_id", - require_environment: true, - limit: 1000000, - offset: 1000000 -) +client.delete_environments_environment_id(environment_id: "environment_id") ```
@@ -301,31 +259,47 @@ client.accounts.list_api_keys(
-**require_environment:** `Internal::Types::Boolean` +**request_options:** `Schematic::RequestOptions`
+ + -
-
-**limit:** `Integer` — Page limit (default 100) -
+
+
client.get_credit_ledger() ->
-**offset:** `Integer` — Page offset (default 0) - +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.get_credit_ledger +```
+
+
+ +#### ⚙️ Parameters
-**request_options:** `Schematic::Accounts::RequestOptions` +
+
+ +**request_options:** `Schematic::RequestOptions`
@@ -337,7 +311,8 @@ client.accounts.list_api_keys(
-
client.accounts.create_api_key(request) -> Schematic::Accounts::Types::CreateApiKeyResponse +## accounts +
client.accounts.list_account_members() -> Schematic::Accounts::Types::ListAccountMembersResponse
@@ -350,7 +325,13 @@ client.accounts.list_api_keys(
```ruby -client.accounts.create_api_key(name: "name") +client.accounts.list_account_members( + ids: ["ids"], + q: "q", + role: "admin", + limit: 1000000, + offset: 1000000 +) ```
@@ -365,7 +346,7 @@ client.accounts.create_api_key(name: "name")
-**description:** `String` +**ids:** `String`
@@ -373,7 +354,7 @@ client.accounts.create_api_key(name: "name")
-**environment_id:** `String` +**q:** `String` — Search filter
@@ -381,7 +362,7 @@ client.accounts.create_api_key(name: "name")
-**name:** `String` +**role:** `Schematic::Types::AccountMemberRole` — Filter by member role
@@ -389,7 +370,7 @@ client.accounts.create_api_key(name: "name")
-**rate_limit_percent:** `Integer` +**limit:** `Integer` — Page limit (default 100)
@@ -397,7 +378,7 @@ client.accounts.create_api_key(name: "name")
-**readonly:** `Internal::Types::Boolean` +**offset:** `Integer` — Page offset (default 0)
@@ -417,7 +398,7 @@ client.accounts.create_api_key(name: "name")
-
client.accounts.get_api_key(api_key_id:) -> Schematic::Accounts::Types::GetApiKeyResponse +
client.accounts.get_account_member(account_member_id:) -> Schematic::Accounts::Types::GetAccountMemberResponse
@@ -430,7 +411,7 @@ client.accounts.create_api_key(name: "name")
```ruby -client.accounts.get_api_key(api_key_id: "api_key_id") +client.accounts.get_account_member(account_member_id: "account_member_id") ```
@@ -445,7 +426,7 @@ client.accounts.get_api_key(api_key_id: "api_key_id")
-**api_key_id:** `String` — api_key_id +**account_member_id:** `String` — account_member_id
@@ -465,7 +446,7 @@ client.accounts.get_api_key(api_key_id: "api_key_id")
-
client.accounts.update_api_key(api_key_id:, request) -> Schematic::Accounts::Types::UpdateApiKeyResponse +
client.accounts.count_account_members() -> Schematic::Accounts::Types::CountAccountMembersResponse
@@ -478,7 +459,13 @@ client.accounts.get_api_key(api_key_id: "api_key_id")
```ruby -client.accounts.update_api_key(api_key_id: "api_key_id") +client.accounts.count_account_members( + ids: ["ids"], + q: "q", + role: "admin", + limit: 1000000, + offset: 1000000 +) ```
@@ -493,15 +480,7 @@ client.accounts.update_api_key(api_key_id: "api_key_id")
-**api_key_id:** `String` — api_key_id - -
-
- -
-
- -**description:** `String` +**ids:** `String`
@@ -509,7 +488,7 @@ client.accounts.update_api_key(api_key_id: "api_key_id")
-**name:** `String` +**q:** `String` — Search filter
@@ -517,7 +496,7 @@ client.accounts.update_api_key(api_key_id: "api_key_id")
-**rate_limit_percent:** `Integer` +**role:** `Schematic::Types::AccountMemberRole` — Filter by member role
@@ -525,47 +504,15 @@ client.accounts.update_api_key(api_key_id: "api_key_id")
-**request_options:** `Schematic::Accounts::RequestOptions` +**limit:** `Integer` — Page limit (default 100)
- - - - - - -
- -
client.accounts.delete_api_key(api_key_id:) -> Schematic::Accounts::Types::DeleteApiKeyResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```ruby -client.accounts.delete_api_key(api_key_id: "api_key_id") -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
-**api_key_id:** `String` — api_key_id +**offset:** `Integer` — Page offset (default 0)
@@ -585,7 +532,7 @@ client.accounts.delete_api_key(api_key_id: "api_key_id")
-
client.accounts.count_api_keys() -> Schematic::Accounts::Types::CountApiKeysResponse +
client.accounts.list_api_keys() -> Schematic::Accounts::Types::ListApiKeysResponse
@@ -598,7 +545,7 @@ client.accounts.delete_api_key(api_key_id: "api_key_id")
```ruby -client.accounts.count_api_keys( +client.accounts.list_api_keys( environment_id: "environment_id", require_environment: true, limit: 1000000, @@ -662,7 +609,7 @@ client.accounts.count_api_keys(
-
client.accounts.list_audit_logs() -> Schematic::Accounts::Types::ListAuditLogsResponse +
client.accounts.get_api_key(api_key_id:) -> Schematic::Accounts::Types::GetApiKeyResponse
@@ -675,15 +622,7 @@ client.accounts.count_api_keys(
```ruby -client.accounts.list_audit_logs( - actor_type: "api_key", - end_time: "2024-01-15T09:30:00Z", - environment_id: "environment_id", - q: "q", - start_time: "2024-01-15T09:30:00Z", - limit: 1000000, - offset: 1000000 -) +client.accounts.get_api_key(api_key_id: "api_key_id") ```
@@ -698,15 +637,7 @@ client.accounts.list_audit_logs(
-**actor_type:** `Schematic::Types::ActorType` - -
-
- -
-
- -**end_time:** `String` +**api_key_id:** `String` — api_key_id
@@ -714,87 +645,76 @@ client.accounts.list_audit_logs(
-**environment_id:** `String` +**request_options:** `Schematic::Accounts::RequestOptions`
- -
-
- -**q:** `String` -
-
-
-**start_time:** `String` -
+
+
client.accounts.count_api_keys() -> Schematic::Accounts::Types::CountApiKeysResponse
-**limit:** `Integer` — Page limit (default 100) - -
-
+#### 🔌 Usage
-**offset:** `Integer` — Page offset (default 0) - -
-
-
-**request_options:** `Schematic::Accounts::RequestOptions` - +```ruby +client.accounts.count_api_keys( + environment_id: "environment_id", + require_environment: true, + limit: 1000000, + offset: 1000000 +) +```
+#### ⚙️ Parameters - - -
- -
client.accounts.get_audit_log(audit_log_id:) -> Schematic::Accounts::Types::GetAuditLogResponse
-#### 🔌 Usage -
+**environment_id:** `String` + +
+
+
-```ruby -client.accounts.get_audit_log(audit_log_id: "audit_log_id") -``` -
-
+**require_environment:** `Internal::Types::Boolean` +
-#### ⚙️ Parameters -
+**limit:** `Integer` — Page limit (default 100) + +
+
+
-**audit_log_id:** `String` — audit_log_id +**offset:** `Integer` — Page offset (default 0)
@@ -814,7 +734,7 @@ client.accounts.get_audit_log(audit_log_id: "audit_log_id")
-
client.accounts.count_audit_logs() -> Schematic::Accounts::Types::CountAuditLogsResponse +
client.accounts.list_audit_logs() -> Schematic::Accounts::Types::ListAuditLogsResponse
@@ -827,7 +747,7 @@ client.accounts.get_audit_log(audit_log_id: "audit_log_id")
```ruby -client.accounts.count_audit_logs( +client.accounts.list_audit_logs( actor_type: "api_key", end_time: "2024-01-15T09:30:00Z", environment_id: "environment_id", @@ -918,7 +838,7 @@ client.accounts.count_audit_logs(
-
client.accounts.list_environments() -> Schematic::Accounts::Types::ListEnvironmentsResponse +
client.accounts.get_audit_log(audit_log_id:) -> Schematic::Accounts::Types::GetAuditLogResponse
@@ -931,11 +851,7 @@ client.accounts.count_audit_logs(
```ruby -client.accounts.list_environments( - ids: ["ids"], - limit: 1000000, - offset: 1000000 -) +client.accounts.get_audit_log(audit_log_id: "audit_log_id") ```
@@ -950,23 +866,7 @@ client.accounts.list_environments(
-**ids:** `String` - -
-
- -
-
- -**limit:** `Integer` — Page limit (default 100) - -
-
- -
-
- -**offset:** `Integer` — Page offset (default 0) +**audit_log_id:** `String` — audit_log_id
@@ -986,7 +886,7 @@ client.accounts.list_environments(
-
client.accounts.create_environment(request) -> Schematic::Accounts::Types::CreateEnvironmentResponse +
client.accounts.count_audit_logs() -> Schematic::Accounts::Types::CountAuditLogsResponse
@@ -999,9 +899,14 @@ client.accounts.list_environments(
```ruby -client.accounts.create_environment( - environment_type: "development", - name: "name" +client.accounts.count_audit_logs( + actor_type: "api_key", + end_time: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + q: "q", + start_time: "2024-01-15T09:30:00Z", + limit: 1000000, + offset: 1000000 ) ```
@@ -1017,7 +922,7 @@ client.accounts.create_environment(
-**environment_type:** `Schematic::Types::EnvironmentType` +**actor_type:** `Schematic::Types::ActorType`
@@ -1025,7 +930,7 @@ client.accounts.create_environment(
-**name:** `String` +**end_time:** `String`
@@ -1033,47 +938,39 @@ client.accounts.create_environment(
-**request_options:** `Schematic::Accounts::RequestOptions` +**environment_id:** `String`
- -
+
+
+**q:** `String` +
-
-
client.accounts.get_environment(environment_id:) -> Schematic::Accounts::Types::GetEnvironmentResponse
-#### 🔌 Usage - -
-
+**start_time:** `String` + +
+
-```ruby -client.accounts.get_environment(environment_id: "environment_id") -``` -
-
+**limit:** `Integer` — Page limit (default 100) +
-#### ⚙️ Parameters - -
-
-
-**environment_id:** `String` — environment_id +**offset:** `Integer` — Page offset (default 0)
@@ -1093,7 +990,7 @@ client.accounts.get_environment(environment_id: "environment_id")
-
client.accounts.update_environment(environment_id:, request) -> Schematic::Accounts::Types::UpdateEnvironmentResponse +
client.accounts.list_environments() -> Schematic::Accounts::Types::ListEnvironmentsResponse
@@ -1106,7 +1003,11 @@ client.accounts.get_environment(environment_id: "environment_id")
```ruby -client.accounts.update_environment(environment_id: "environment_id") +client.accounts.list_environments( + ids: ["ids"], + limit: 1000000, + offset: 1000000 +) ```
@@ -1121,15 +1022,7 @@ client.accounts.update_environment(environment_id: "environment_id")
-**environment_id:** `String` — environment_id - -
-
- -
-
- -**environment_type:** `Schematic::Types::EnvironmentType` +**ids:** `String`
@@ -1137,7 +1030,7 @@ client.accounts.update_environment(environment_id: "environment_id")
-**name:** `String` +**limit:** `Integer` — Page limit (default 100)
@@ -1145,7 +1038,7 @@ client.accounts.update_environment(environment_id: "environment_id")
-**require_context_signature:** `Internal::Types::Boolean` +**offset:** `Integer` — Page offset (default 0)
@@ -1165,7 +1058,7 @@ client.accounts.update_environment(environment_id: "environment_id")
-
client.accounts.delete_environment(environment_id:) -> Schematic::Accounts::Types::DeleteEnvironmentResponse +
client.accounts.get_environment(environment_id:) -> Schematic::Accounts::Types::GetEnvironmentResponse
@@ -1178,7 +1071,7 @@ client.accounts.update_environment(environment_id: "environment_id")
```ruby -client.accounts.delete_environment(environment_id: "environment_id") +client.accounts.get_environment(environment_id: "environment_id") ```
@@ -2653,6 +2546,14 @@ client.billing.upsert_payment_method(
+**customer_billing_details:** `Schematic::Types::PaymentMethodBillingDetailsRequestBody` + +
+
+ +
+
+ **customer_external_id:** `String`
@@ -4386,7 +4287,7 @@ client.billing.get_company_native_subscription(company_id: "company_id")
-
client.billing.list_native_invoices() -> Schematic::Billing::Types::ListNativeInvoicesResponse +
client.billing.list_billing_invoices() -> Schematic::Billing::Types::ListBillingInvoicesResponse
@@ -4399,10 +4300,14 @@ client.billing.get_company_native_subscription(company_id: "company_id")
```ruby -client.billing.list_native_invoices( +client.billing.list_billing_invoices( company_id: "company_id", contract_id: "contract_id", document_state: "credited", + past_due: true, + provider_type: "metronome", + q: "q", + status: "draft", limit: 1000000, offset: 1000000 ) @@ -4444,6 +4349,38 @@ client.billing.list_native_invoices(
+**past_due:** `Internal::Types::Boolean` — Only open invoices with an amount left to pay whose due date has passed. + +
+
+ +
+
+ +**provider_type:** `Schematic::Types::BillingProviderType` — Only invoices from this billing provider. Leave empty for invoices from Schematic and Stripe. + +
+
+ +
+
+ +**q:** `String` — Search by invoice number, provider invoice ID or company name. + +
+
+ +
+
+ +**status:** `Schematic::Types::InvoiceStatus` + +
+
+ +
+
+ **limit:** `Integer` — Page limit (default 100)
@@ -4472,7 +4409,7 @@ client.billing.list_native_invoices(
-
client.billing.get_native_invoice(invoice_id:) -> Schematic::Billing::Types::GetNativeInvoiceResponse +
client.billing.get_billing_invoice(invoice_id:) -> Schematic::Billing::Types::GetBillingInvoiceResponse
@@ -4485,7 +4422,7 @@ client.billing.list_native_invoices(
```ruby -client.billing.get_native_invoice(invoice_id: "invoice_id") +client.billing.get_billing_invoice(invoice_id: "invoice_id") ```
@@ -4616,7 +4553,7 @@ client.billing.finalize_native_invoice(invoice_id: "invoice_id")
-
client.billing.mark_native_invoice_paid(invoice_id:, request) -> Schematic::Billing::Types::MarkNativeInvoicePaidResponse +
client.billing.mark_billing_invoice_paid(invoice_id:, request) -> Schematic::Billing::Types::MarkBillingInvoicePaidResponse
@@ -4629,7 +4566,7 @@ client.billing.finalize_native_invoice(invoice_id: "invoice_id")
```ruby -client.billing.mark_native_invoice_paid( +client.billing.mark_billing_invoice_paid( invoice_id: "invoice_id", idempotency_key: "idempotency_key" ) @@ -4795,7 +4732,7 @@ client.billing.void_native_invoice(invoice_id: "invoice_id")
-
client.billing.count_native_invoices() -> Schematic::Billing::Types::CountNativeInvoicesResponse +
client.billing.count_billing_invoices() -> Schematic::Billing::Types::CountBillingInvoicesResponse
@@ -4808,10 +4745,14 @@ client.billing.void_native_invoice(invoice_id: "invoice_id")
```ruby -client.billing.count_native_invoices( +client.billing.count_billing_invoices( company_id: "company_id", contract_id: "contract_id", document_state: "credited", + past_due: true, + provider_type: "metronome", + q: "q", + status: "draft", limit: 1000000, offset: 1000000 ) @@ -4853,6 +4794,38 @@ client.billing.count_native_invoices(
+**past_due:** `Internal::Types::Boolean` — Only open invoices with an amount left to pay whose due date has passed. + +
+
+ +
+
+ +**provider_type:** `Schematic::Types::BillingProviderType` — Only invoices from this billing provider. Leave empty for invoices from Schematic and Stripe. + +
+
+ +
+
+ +**q:** `String` — Search by invoice number, provider invoice ID or company name. + +
+
+ +
+
+ +**status:** `Schematic::Types::InvoiceStatus` + +
+
+ +
+
+ **limit:** `Integer` — Page limit (default 100)
@@ -7625,7 +7598,7 @@ client.credits.create_credit_spend_policy(billing_credit_id: "billing_credit_id"
-**window_unit:** `Schematic::Types::CreditSpendWindowUnit` — The window that window_amount applies to: one UTC hour or one UTC day. Required with window_amount. +**window_unit:** `Schematic::Types::CreditSpendWindowUnit` — The window that window_amount applies to: one UTC hour, one UTC day, one week from Monday 00:00 UTC, one calendar month from the 1st 00:00 UTC, or the company's current billing period. billing_period applies to company policies only, and a company without an active subscription falls back to the calendar month. Required with window_amount.
@@ -8012,6 +7985,7 @@ client.credits.list_credit_event_ledger( end_time: "end_time", event_type: "adjustment", feature_id: "feature_id", + source_event_id: "source_event_id", start_time: "start_time", limit: 1000000, offset: 1000000 @@ -8070,6 +8044,14 @@ client.credits.list_credit_event_ledger(
+**source_event_id:** `String` — Return only entries drawn by this track or inference event. Pass the event ID that POST /events returned for it. + +
+
+ +
+
+ **start_time:** `String`
@@ -8102,6 +8084,54 @@ client.credits.list_credit_event_ledger(
+
+
+
+ +
client.credits.get_credit_event_ledger_entry(ledger_entry_id:) -> Schematic::Credits::Types::GetCreditEventLedgerEntryResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.credits.get_credit_event_ledger_entry(ledger_entry_id: "ledger_entry_id") +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ledger_entry_id:** `String` — ledger_entry_id + +
+
+ +
+
+ +**request_options:** `Schematic::Credits::RequestOptions` + +
+
+
+
+ +
@@ -8125,6 +8155,7 @@ client.credits.count_credit_event_ledger( end_time: "end_time", event_type: "adjustment", feature_id: "feature_id", + source_event_id: "source_event_id", start_time: "start_time", limit: 1000000, offset: 1000000 @@ -8183,6 +8214,14 @@ client.credits.count_credit_event_ledger(
+**source_event_id:** `String` — Return only entries drawn by this track or inference event. Pass the event ID that POST /events returned for it. + +
+
+ +
+
+ **start_time:** `String`
@@ -9065,6 +9104,94 @@ client.catalogs.remove_plan(
+ + +
+ +
client.catalogs.get_public_catalog() -> Schematic::Catalogs::Types::GetPublicCatalogResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.catalogs.get_public_catalog +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `Schematic::Catalogs::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.catalogs.get_public_catalog_by_id(catalog_id:) -> Schematic::Catalogs::Types::GetPublicCatalogByIdResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.catalogs.get_public_catalog_by_id(catalog_id: "catalog_id") +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**catalog_id:** `String` — catalog_id + +
+
+ +
+
+ +**request_options:** `Schematic::Catalogs::RequestOptions` + +
+
+
+
+ +
@@ -16446,6 +16573,14 @@ client.plans.retry_custom_plan_billing(
+**end_date:** `String` — When a plan that doesn't renew ends. Moved back to the last renewal on or before it. When omitted, the end date set at finalize is reissued. Only honored when the retry creates a subscription. + +
+
+ +
+
+ **prorate_first_period:** `Internal::Types::Boolean` — When true, the partial period between the subscription starting and its renewal date is billed pro rata straight away. When false that period is free and no invoice is raised until the renewal date. Only applies alongside billing_cycle_anchor. Defaults to true.
@@ -18404,6 +18539,14 @@ client.planbundle.create_custom_plan_bundle(
+**renewal_policy:** `Schematic::Types::RenewalPolicy` + +
+
+ +
+
+ **request_options:** `Schematic::Planbundle::RequestOptions`
@@ -18484,6 +18627,14 @@ client.planbundle.create_plan_bundle(
+**renewal_policy:** `Schematic::Types::RenewalPolicy` + +
+
+ +
+
+ **request_options:** `Schematic::Planbundle::RequestOptions`
@@ -18580,6 +18731,14 @@ client.planbundle.update_plan_bundle(
+**renewal_policy:** `Schematic::Types::RenewalPolicy` + +
+
+ +
+
+ **request_options:** `Schematic::Planbundle::RequestOptions`