diff --git a/.fern/metadata.json b/.fern/metadata.json index 82d6fbf..57980af 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -13,6 +13,6 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "a0658700ca9b3d362ce6594c0740c41d9286e429", - "sdkVersion": "1.4.1" + "originGitCommit": "3dc12b536625ca1efbb649f6c55df7da258c7e05", + "sdkVersion": "1.4.2" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock new file mode 100644 index 0000000..3c55877 --- /dev/null +++ b/.fern/replay.lock @@ -0,0 +1,10 @@ +# DO NOT EDIT MANUALLY - Managed by Fern Replay +version: "1.0" +generations: + - commit_sha: 298b1d0ee88b6637d99742bff32b353cfbd5b32e + tree_hash: 5e94ea993931a768a9df010fe0bccdf52d154846 + timestamp: 2026-05-19T19:48:36.665Z + cli_version: unknown + generator_versions: {} +current_generation: 298b1d0ee88b6637d99742bff32b353cfbd5b32e +patches: [] diff --git a/.fernignore b/.fernignore index 817ddb7..5c25235 100644 --- a/.fernignore +++ b/.fernignore @@ -19,3 +19,6 @@ lib/schematichq.rb scripts/ test/custom.test.rb testapp/ +.fern/replay.lock +.fern/replay.yml +.gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..74928d6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.fern/replay.lock linguist-generated=true diff --git a/Gemfile.lock b/Gemfile.lock index 9b1f365..f22d5c3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - schematichq (1.4.1) + schematichq (1.4.2) wasmtime (>= 19.0) websocket (>= 1.2) diff --git a/lib/schematic.rb b/lib/schematic.rb index 607861b..9d5d8fc 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -208,6 +208,7 @@ require_relative "schematic/types/billing_credit_view" require_relative "schematic/types/billing_linked_resource_response_data" require_relative "schematic/types/billing_product_for_subscription_response_data" +require_relative "schematic/types/billing_strategy" require_relative "schematic/types/billing_subscription_discount_view" require_relative "schematic/types/billing_subscription_view" require_relative "schematic/types/charge_type" diff --git a/lib/schematic/client.rb b/lib/schematic/client.rb index f9e60e1..52a2b04 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.1", + "User-Agent" => "schematichq/1.4.2", "X-Fern-Language" => "Ruby", "X-Schematic-Api-Key" => api_key.to_s } diff --git a/lib/schematic/types/billing_product_plan_response_data.rb b/lib/schematic/types/billing_product_plan_response_data.rb index 8db6aca..ae0161a 100644 --- a/lib/schematic/types/billing_product_plan_response_data.rb +++ b/lib/schematic/types/billing_product_plan_response_data.rb @@ -5,6 +5,7 @@ module Types class BillingProductPlanResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false field :billing_product_id, -> { String }, 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 :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false field :environment_id, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/billing_strategy.rb b/lib/schematic/types/billing_strategy.rb new file mode 100644 index 0000000..3bed394 --- /dev/null +++ b/lib/schematic/types/billing_strategy.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + module BillingStrategy + extend Schematic::Internal::Types::Enum + + SCHEMATIC_MANAGED = "schematic_managed" + PROVIDER_MANAGED = "provider_managed" + NO_BILLING = "no_billing" + end + end +end diff --git a/lib/schematic/types/charge_type.rb b/lib/schematic/types/charge_type.rb index 236c84b..4f606cd 100644 --- a/lib/schematic/types/charge_type.rb +++ b/lib/schematic/types/charge_type.rb @@ -6,6 +6,7 @@ module ChargeType extend Schematic::Internal::Types::Enum FREE = "free" + NONE = "none" ONE_TIME = "one_time" RECURRING = "recurring" end diff --git a/lib/schematic/types/company_plan_detail_response_data.rb b/lib/schematic/types/company_plan_detail_response_data.rb index 286a161..472c523 100644 --- a/lib/schematic/types/company_plan_detail_response_data.rb +++ b/lib/schematic/types/company_plan_detail_response_data.rb @@ -7,6 +7,7 @@ class CompanyPlanDetailResponseData < Internal::Types::Model field :audience_type, -> { String }, optional: true, nullable: false field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_can_trial, -> { Internal::Types::Boolean }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/create_event_request_body.rb b/lib/schematic/types/create_event_request_body.rb index 7eacfb9..6fb0950 100644 --- a/lib/schematic/types/create_event_request_body.rb +++ b/lib/schematic/types/create_event_request_body.rb @@ -3,10 +3,12 @@ module Schematic module Types class CreateEventRequestBody < Internal::Types::Model + field :backfill, -> { Internal::Types::Boolean }, optional: true, nullable: false field :body, -> { Schematic::Types::EventBody }, optional: true, nullable: false field :event_type, -> { Schematic::Types::EventType }, optional: false, nullable: false field :idempotency_key, -> { String }, optional: true, nullable: false field :sent_at, -> { String }, optional: true, nullable: false + field :trusted_client_clock, -> { Internal::Types::Boolean }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/data_event_payload.rb b/lib/schematic/types/data_event_payload.rb index e2913d5..3c6b7fc 100644 --- a/lib/schematic/types/data_event_payload.rb +++ b/lib/schematic/types/data_event_payload.rb @@ -4,9 +4,11 @@ module Schematic module Types class DataEventPayload < Internal::Types::Model field :api_key, -> { String }, optional: false, nullable: false + field :backfill, -> { Internal::Types::Boolean }, optional: true, nullable: false field :body, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false field :idempotency_key, -> { String }, optional: true, nullable: false field :sent_at, -> { String }, optional: true, nullable: false + field :trusted_client_clock, -> { Internal::Types::Boolean }, optional: true, nullable: false field :type, -> { Schematic::Types::EventType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_detail_response_data.rb b/lib/schematic/types/plan_detail_response_data.rb index 2c3ed7d..aa1b769 100644 --- a/lib/schematic/types/plan_detail_response_data.rb +++ b/lib/schematic/types/plan_detail_response_data.rb @@ -7,6 +7,7 @@ class PlanDetailResponseData < Internal::Types::Model field :audience_type, -> { String }, optional: true, nullable: false field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false field :company_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/plan_group_plan_detail_response_data.rb b/lib/schematic/types/plan_group_plan_detail_response_data.rb index 3a926b6..1324387 100644 --- a/lib/schematic/types/plan_group_plan_detail_response_data.rb +++ b/lib/schematic/types/plan_group_plan_detail_response_data.rb @@ -7,6 +7,7 @@ class PlanGroupPlanDetailResponseData < Internal::Types::Model field :audience_type, -> { String }, optional: true, nullable: false field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false field :company_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/plan_view_public_response_data.rb b/lib/schematic/types/plan_view_public_response_data.rb index 1bafd84..11136a3 100644 --- a/lib/schematic/types/plan_view_public_response_data.rb +++ b/lib/schematic/types/plan_view_public_response_data.rb @@ -7,6 +7,7 @@ class PlanViewPublicResponseData < Internal::Types::Model field :audience_type, -> { String }, optional: true, nullable: false field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false field :company_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/upsert_billing_product_request_body.rb b/lib/schematic/types/upsert_billing_product_request_body.rb index 5522aff..9ba6a6e 100644 --- a/lib/schematic/types/upsert_billing_product_request_body.rb +++ b/lib/schematic/types/upsert_billing_product_request_body.rb @@ -4,6 +4,7 @@ module Schematic module Types class UpsertBillingProductRequestBody < Internal::Types::Model field :billing_product_id, -> { String }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: true, nullable: false field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :currency, -> { String }, optional: true, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPriceRequestBody] }, optional: true, nullable: false diff --git a/lib/schematic/version.rb b/lib/schematic/version.rb index 5d3ed84..75d879a 100644 --- a/lib/schematic/version.rb +++ b/lib/schematic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Schematic - VERSION = "1.4.1" + VERSION = "1.4.2" end