Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "5.6.0",
"cliVersion": "5.50.0",
"generatorName": "fernapi/fern-ruby-sdk",
"generatorVersion": "1.1.13",
"generatorConfig": {
Expand All @@ -13,6 +13,6 @@
"webrick": ">= 1.0"
}
},
"originGitCommit": "1c3370c354acf100ad68319d09b964e93635a3d5",
"sdkVersion": "1.4.8"
"originGitCommit": "19cafdf92ab056ef6ba803bf1e352b0422a8ec45",
"sdkVersion": "1.4.9"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
schematichq (1.4.8)
schematichq (1.4.9)
wasmtime (>= 19.0)
websocket (>= 1.2)

Expand All @@ -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)
Expand All @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions lib/schematic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions lib/schematic/billing/types/create_invoice_request_body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/schematic/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/schematic/types/account_member_permission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/schematic/types/event_body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 22 additions & 0 deletions lib/schematic/types/event_body_inference.rb
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions lib/schematic/types/event_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module EventType

FLAG_CHECK = "flag_check"
IDENTIFY = "identify"
INFERENCE = "inference"
TRACK = "track"
end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/schematic/types/invoice_request_body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lib/schematic/types/invoice_response_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion lib/schematic/types/plan_bundle_response_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions lib/schematic/types/plan_entitlement_response_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions lib/schematic/types/warning_tier_request_body.rb
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions lib/schematic/types/warning_tier_response_data.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion lib/schematic/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Schematic
VERSION = "1.4.8"
VERSION = "1.4.9"
end
56 changes: 40 additions & 16 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,14 @@ client.billing.upsert_invoice(
<dl>
<dd>

**ending_balance:** `Integer`

</dd>
</dl>

<dl>
<dd>

**external_id:** `String`

</dd>
Expand All @@ -2033,6 +2041,14 @@ client.billing.upsert_invoice(
<dl>
<dd>

**starting_balance:** `Integer`

</dd>
</dl>

<dl>
<dd>

**status:** `Schematic::Types::InvoiceStatus`

</dd>
Expand Down Expand Up @@ -11335,6 +11351,14 @@ client.entitlements.create_plan_entitlement(
<dl>
<dd>

**warning_tiers:** `Internal::Types::Array[Schematic::Types::WarningTierRequestBody]`

</dd>
</dl>

<dl>
<dd>

**yearly_metered_price_id:** `String`

</dd>
Expand Down Expand Up @@ -11674,6 +11698,14 @@ client.entitlements.update_plan_entitlement(
<dl>
<dd>

**warning_tiers:** `Internal::Types::Array[Schematic::Types::WarningTierRequestBody]`

</dd>
</dl>

<dl>
<dd>

**yearly_metered_price_id:** `String`

</dd>
Expand Down Expand Up @@ -12048,6 +12080,14 @@ client.entitlements.upsert_plan_entitlement_for_billing_product(
<dl>
<dd>

**warning_tiers:** `Internal::Types::Array[Schematic::Types::WarningTierRequestBody]`

</dd>
</dl>

<dl>
<dd>

**yearly_metered_price_id:** `String`

</dd>
Expand Down Expand Up @@ -14430,14 +14470,6 @@ client.planbundle.create_plan_bundle(entitlements: [{
<dl>
<dd>

**traits:** `Internal::Types::Array[Schematic::Types::UpdatePlanTraitTraitRequestBody]`

</dd>
</dl>

<dl>
<dd>

**request_options:** `Schematic::Planbundle::RequestOptions`

</dd>
Expand Down Expand Up @@ -14531,14 +14563,6 @@ client.planbundle.update_plan_bundle(
<dl>
<dd>

**traits:** `Internal::Types::Array[Schematic::Types::UpdatePlanTraitTraitRequestBody]`

</dd>
</dl>

<dl>
<dd>

**request_options:** `Schematic::Planbundle::RequestOptions`

</dd>
Expand Down