diff --git a/.fern/metadata.json b/.fern/metadata.json index 52502b3..4c7c2f4 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,5 +1,5 @@ { - "cliVersion": "5.6.0", + "cliVersion": "5.50.0", "generatorName": "fernapi/fern-ruby-sdk", "generatorVersion": "1.1.13", "generatorConfig": { @@ -13,6 +13,6 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "1c3370c354acf100ad68319d09b964e93635a3d5", - "sdkVersion": "1.4.8" + "originGitCommit": "19cafdf92ab056ef6ba803bf1e352b0422a8ec45", + "sdkVersion": "1.4.9" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock index 54a0a96..3110136 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -30,5 +30,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-ruby-sdk: 1.1.13 -current_generation: 8487841eae05855059210650ab3ee913538f1afc + - commit_sha: c93862aca1a52c6c033c908ebab873ca9ef6e401 + tree_hash: 8af2113b2953c214b34eb7360fb741106399623c + timestamp: 2026-07-14T14:45:31.832Z + cli_version: unknown + generator_versions: + fernapi/fern-ruby-sdk: 1.1.13 +current_generation: c93862aca1a52c6c033c908ebab873ca9ef6e401 patches: [] diff --git a/Gemfile.lock b/Gemfile.lock index 08b539c..c8e275a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - schematichq (1.4.8) + schematichq (1.4.9) wasmtime (>= 19.0) websocket (>= 1.2) @@ -18,7 +18,7 @@ GEM rexml hashdiff (1.2.1) io-console (0.8.2) - json (2.20.0) + json (2.21.1) language_server-protocol (3.17.0.6) lint_roller (1.1.0) method_source (1.1.0) @@ -42,7 +42,7 @@ GEM reline (0.6.3) io-console (~> 0.5) rexml (3.4.4) - rubocop (1.88.1) + rubocop (1.88.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) diff --git a/lib/schematic.rb b/lib/schematic.rb index 5e5eabe..cdfcd3d 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -270,6 +270,7 @@ require_relative "schematic/types/plan_icon" require_relative "schematic/types/plan_type" require_relative "schematic/types/plan_response_data" +require_relative "schematic/types/warning_tier_response_data" require_relative "schematic/types/plan_entitlement_response_data" require_relative "schematic/types/feature_usage_response_data" require_relative "schematic/types/feature_usage_detail_response_data" @@ -668,6 +669,7 @@ require_relative "schematic/types/event_body_flag_check" require_relative "schematic/types/event_body_identify_company" require_relative "schematic/types/event_body_identify" +require_relative "schematic/types/event_body_inference" require_relative "schematic/types/event_body_track" require_relative "schematic/types/event_body" require_relative "schematic/types/create_event_request_body" @@ -743,6 +745,7 @@ require_relative "schematic/types/upsert_user_request_body" require_relative "schematic/types/upsert_user_sub_request_body" require_relative "schematic/types/usage_based_entitlement_request_body" +require_relative "schematic/types/warning_tier_request_body" require_relative "schematic/types/web_feature_usage_webhook_output" require_relative "schematic/types/web_scheduled_downgrade_webhook_output" require_relative "schematic/types/webhook_event_response_data" diff --git a/lib/schematic/billing/types/create_invoice_request_body.rb b/lib/schematic/billing/types/create_invoice_request_body.rb index 40ba115..6b295da 100644 --- a/lib/schematic/billing/types/create_invoice_request_body.rb +++ b/lib/schematic/billing/types/create_invoice_request_body.rb @@ -11,8 +11,10 @@ class CreateInvoiceRequestBody < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false field :customer_external_id, -> { String }, optional: false, nullable: false field :due_date, -> { String }, optional: true, nullable: false + field :ending_balance, -> { Integer }, optional: true, nullable: false field :external_id, -> { String }, optional: true, nullable: false field :payment_method_external_id, -> { String }, optional: true, nullable: false + field :starting_balance, -> { Integer }, optional: true, nullable: false field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false field :subscription_external_id, -> { String }, optional: true, nullable: false field :subtotal, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/client.rb b/lib/schematic/client.rb index a65dc1a..a19d31d 100644 --- a/lib/schematic/client.rb +++ b/lib/schematic/client.rb @@ -10,7 +10,7 @@ def initialize(api_key:, base_url: nil) @raw_client = Schematic::Internal::Http::RawClient.new( base_url: base_url || Schematic::Environment::DEFAULT, headers: { - "User-Agent" => "schematichq/1.4.8", + "User-Agent" => "schematichq/1.4.9", "X-Fern-Language" => "Ruby", "X-Schematic-Api-Key" => api_key.to_s } diff --git a/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb index a2809f9..398a2b2 100644 --- a/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb @@ -35,6 +35,7 @@ class CreateBillingLinkedPlanEntitlementRequestBody < Internal::Types::Model field :value_numeric, -> { Integer }, optional: true, nullable: false field :value_trait_id, -> { String }, optional: true, nullable: false field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false field :yearly_metered_price_id, -> { String }, optional: true, nullable: false field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false field :yearly_unit_price, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb index bcf4484..08698be 100644 --- a/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb @@ -33,6 +33,7 @@ class CreatePlanEntitlementRequestBody < Internal::Types::Model field :value_numeric, -> { Integer }, optional: true, nullable: false field :value_trait_id, -> { String }, optional: true, nullable: false field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false field :yearly_metered_price_id, -> { String }, optional: true, nullable: false field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false field :yearly_unit_price, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb index 5b0aab9..1967a3e 100644 --- a/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb @@ -31,6 +31,7 @@ class UpdatePlanEntitlementRequestBody < Internal::Types::Model field :value_numeric, -> { Integer }, optional: true, nullable: false field :value_trait_id, -> { String }, optional: true, nullable: false field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false field :yearly_metered_price_id, -> { String }, optional: true, nullable: false field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false field :yearly_unit_price, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb b/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb index 112b94f..00568fa 100644 --- a/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb +++ b/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb @@ -8,7 +8,6 @@ class CreatePlanBundleRequestBody < Internal::Types::Model field :credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanBundleCreditGrantRequestBody] }, optional: true, nullable: false field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false field :plan, -> { Schematic::Types::CreatePlanRequestBody }, optional: true, nullable: false - field :traits, -> { Internal::Types::Array[Schematic::Types::UpdatePlanTraitTraitRequestBody] }, 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 dc28771..adb83d9 100644 --- a/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb +++ b/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb @@ -10,7 +10,6 @@ class UpdatePlanBundleRequestBody < Internal::Types::Model field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false field :plan, -> { Schematic::Types::UpdatePlanRequestBody }, optional: true, nullable: false field :plan_version_id, -> { String }, optional: true, nullable: false - field :traits, -> { Internal::Types::Array[Schematic::Types::UpdatePlanTraitTraitRequestBody] }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/account_member_permission.rb b/lib/schematic/types/account_member_permission.rb index 55eb18b..e82451a 100644 --- a/lib/schematic/types/account_member_permission.rb +++ b/lib/schematic/types/account_member_permission.rb @@ -8,6 +8,7 @@ module AccountMemberPermission COMPANIES_EDIT = "companies_edit" COMPANY_USERS_EDIT = "company_users_edit" COMPONENTS_EDIT = "components_edit" + CUSTOM_PLANS_EDIT = "custom_plans_edit" DATA_EXPORTS_EDIT = "data_exports_edit" FEATURES_EDIT = "features_edit" FLAG_RULES_EDIT = "flag_rules_edit" diff --git a/lib/schematic/types/billing_plan_credit_grant_reset_cadence.rb b/lib/schematic/types/billing_plan_credit_grant_reset_cadence.rb index 9479f53..9ddfde0 100644 --- a/lib/schematic/types/billing_plan_credit_grant_reset_cadence.rb +++ b/lib/schematic/types/billing_plan_credit_grant_reset_cadence.rb @@ -6,7 +6,9 @@ module BillingPlanCreditGrantResetCadence extend Schematic::Internal::Types::Enum DAILY = "daily" + EVERY_6_MONTHS = "every_6_months" MONTHLY = "monthly" + QUARTERLY = "quarterly" WEEKLY = "weekly" YEARLY = "yearly" end diff --git a/lib/schematic/types/event_body.rb b/lib/schematic/types/event_body.rb index ceb31f2..48c1dd7 100644 --- a/lib/schematic/types/event_body.rb +++ b/lib/schematic/types/event_body.rb @@ -8,6 +8,7 @@ class EventBody < Internal::Types::Model member -> { Schematic::Types::EventBodyTrack } member -> { Schematic::Types::EventBodyFlagCheck } member -> { Schematic::Types::EventBodyIdentify } + member -> { Schematic::Types::EventBodyInference } end end end diff --git a/lib/schematic/types/event_body_inference.rb b/lib/schematic/types/event_body_inference.rb new file mode 100644 index 0000000..8a81427 --- /dev/null +++ b/lib/schematic/types/event_body_inference.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Schematic + module Types + class EventBodyInference < Internal::Types::Model + field :cached_input_tokens, -> { Integer }, optional: true, nullable: false + field :company, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :cost, -> { String }, optional: true, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :event, -> { String }, optional: true, nullable: false + field :input_tokens, -> { Integer }, optional: false, nullable: false + field :operation, -> { String }, optional: true, nullable: false + field :output_tokens, -> { Integer }, optional: false, nullable: false + field :provider, -> { String }, optional: false, nullable: false + field :reasoning_tokens, -> { Integer }, optional: true, nullable: false + field :request_model, -> { String }, optional: true, nullable: false + field :requests, -> { Integer }, optional: true, nullable: false + field :response_model, -> { String }, optional: false, nullable: false + field :user, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/event_type.rb b/lib/schematic/types/event_type.rb index 9b4ad1c..88b023e 100644 --- a/lib/schematic/types/event_type.rb +++ b/lib/schematic/types/event_type.rb @@ -7,6 +7,7 @@ module EventType FLAG_CHECK = "flag_check" IDENTIFY = "identify" + INFERENCE = "inference" TRACK = "track" end end diff --git a/lib/schematic/types/invoice_request_body.rb b/lib/schematic/types/invoice_request_body.rb index ea68412..d733455 100644 --- a/lib/schematic/types/invoice_request_body.rb +++ b/lib/schematic/types/invoice_request_body.rb @@ -10,7 +10,9 @@ class InvoiceRequestBody < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false field :customer_external_id, -> { String }, optional: false, nullable: false field :due_date, -> { String }, optional: true, nullable: false + field :ending_balance, -> { Integer }, optional: true, nullable: false field :payment_method_external_id, -> { String }, optional: true, nullable: false + field :starting_balance, -> { Integer }, optional: true, nullable: false field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false field :subscription_external_id, -> { String }, optional: true, nullable: false field :subtotal, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/invoice_response_data.rb b/lib/schematic/types/invoice_response_data.rb index 0aea4f2..aae9382 100644 --- a/lib/schematic/types/invoice_response_data.rb +++ b/lib/schematic/types/invoice_response_data.rb @@ -12,11 +12,13 @@ class InvoiceResponseData < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false field :customer_external_id, -> { String }, optional: false, nullable: false field :due_date, -> { String }, optional: true, nullable: false + field :ending_balance, -> { Integer }, optional: false, nullable: false field :environment_id, -> { String }, optional: false, nullable: false field :external_id, -> { String }, optional: true, nullable: false field :id, -> { String }, optional: false, nullable: false field :payment_method_external_id, -> { String }, optional: true, nullable: false field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :starting_balance, -> { Integer }, optional: false, nullable: false field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false field :subscription_external_id, -> { String }, optional: true, nullable: false field :subtotal, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_bundle_response_data.rb b/lib/schematic/types/plan_bundle_response_data.rb index 9119378..f9cb897 100644 --- a/lib/schematic/types/plan_bundle_response_data.rb +++ b/lib/schematic/types/plan_bundle_response_data.rb @@ -7,7 +7,6 @@ class PlanBundleResponseData < Internal::Types::Model field :credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false - field :traits, -> { Internal::Types::Array[Schematic::Types::PlanTraitResponseData] }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/plan_entitlement_response_data.rb b/lib/schematic/types/plan_entitlement_response_data.rb index 78f3a95..b8b2138 100644 --- a/lib/schematic/types/plan_entitlement_response_data.rb +++ b/lib/schematic/types/plan_entitlement_response_data.rb @@ -32,6 +32,7 @@ class PlanEntitlementResponseData < Internal::Types::Model field :value_trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false field :value_trait_id, -> { String }, optional: true, nullable: false field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierResponseData] }, optional: false, nullable: false end end end diff --git a/lib/schematic/types/warning_tier_request_body.rb b/lib/schematic/types/warning_tier_request_body.rb new file mode 100644 index 0000000..1202627 --- /dev/null +++ b/lib/schematic/types/warning_tier_request_body.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Schematic + module Types + class WarningTierRequestBody < 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/warning_tier_response_data.rb b/lib/schematic/types/warning_tier_response_data.rb new file mode 100644 index 0000000..e88309f --- /dev/null +++ b/lib/schematic/types/warning_tier_response_data.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Types + class WarningTierResponseData < 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/version.rb b/lib/schematic/version.rb index c3c9dd8..dc4bf5d 100644 --- a/lib/schematic/version.rb +++ b/lib/schematic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Schematic - VERSION = "1.4.8" + VERSION = "1.4.9" end diff --git a/reference.md b/reference.md index b93d621..60809ce 100644 --- a/reference.md +++ b/reference.md @@ -2017,6 +2017,14 @@ client.billing.upsert_invoice(
+**ending_balance:** `Integer` + +
+
+ +
+
+ **external_id:** `String`
@@ -2033,6 +2041,14 @@ client.billing.upsert_invoice(
+**starting_balance:** `Integer` + +
+
+ +
+
+ **status:** `Schematic::Types::InvoiceStatus`
@@ -11335,6 +11351,14 @@ client.entitlements.create_plan_entitlement(
+**warning_tiers:** `Internal::Types::Array[Schematic::Types::WarningTierRequestBody]` + +
+
+ +
+
+ **yearly_metered_price_id:** `String`
@@ -11674,6 +11698,14 @@ client.entitlements.update_plan_entitlement(
+**warning_tiers:** `Internal::Types::Array[Schematic::Types::WarningTierRequestBody]` + +
+
+ +
+
+ **yearly_metered_price_id:** `String`
@@ -12048,6 +12080,14 @@ client.entitlements.upsert_plan_entitlement_for_billing_product(
+**warning_tiers:** `Internal::Types::Array[Schematic::Types::WarningTierRequestBody]` + +
+
+ +
+
+ **yearly_metered_price_id:** `String`
@@ -14430,14 +14470,6 @@ client.planbundle.create_plan_bundle(entitlements: [{
-**traits:** `Internal::Types::Array[Schematic::Types::UpdatePlanTraitTraitRequestBody]` - -
-
- -
-
- **request_options:** `Schematic::Planbundle::RequestOptions`
@@ -14531,14 +14563,6 @@ client.planbundle.update_plan_bundle(
-**traits:** `Internal::Types::Array[Schematic::Types::UpdatePlanTraitTraitRequestBody]` - -
-
- -
-
- **request_options:** `Schematic::Planbundle::RequestOptions`