schematichq 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.fern/metadata.json +4 -4
- data/.fern/replay.lock +15 -3
- data/lib/schematic/client.rb +1 -1
- data/lib/schematic/credits/types/extend_credit_lease_request_body.rb +2 -0
- data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +4 -0
- data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +4 -0
- data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +4 -0
- data/lib/schematic/errors/server_error.rb +1 -1
- data/lib/schematic/features/types/check_and_reserve_flag_request_body.rb +2 -0
- data/lib/schematic/planmigrations/client.rb +8 -2
- data/lib/schematic/planmigrations/types/count_migrations_params.rb +2 -0
- data/lib/schematic/planmigrations/types/count_migrations_request.rb +3 -1
- data/lib/schematic/planmigrations/types/list_migrations_params.rb +2 -0
- data/lib/schematic/planmigrations/types/list_migrations_request.rb +3 -1
- data/lib/schematic/plans/client.rb +12 -0
- data/lib/schematic/plans/types/count_plans_params.rb +4 -0
- data/lib/schematic/plans/types/count_plans_request.rb +4 -0
- data/lib/schematic/plans/types/list_plans_params.rb +4 -0
- data/lib/schematic/plans/types/list_plans_request.rb +4 -0
- data/lib/schematic/types/billing_arrears_cadence.rb +1 -0
- data/lib/schematic/types/billing_credit_grant_reason.rb +3 -0
- data/lib/schematic/types/billing_credit_response_data.rb +2 -0
- data/lib/schematic/types/billing_plan_credit_grant_billing_mode.rb +12 -0
- data/lib/schematic/types/billing_plan_credit_grant_price_tier_response_data.rb +15 -0
- data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +12 -0
- data/lib/schematic/types/company_plan_credit_grant_view.rb +6 -0
- data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +10 -0
- data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +4 -0
- data/lib/schematic/types/credit_event_ledger_response_data.rb +2 -0
- data/lib/schematic/types/credit_grant_price_tier_request_body.rb +13 -0
- data/lib/schematic/types/credit_transfer_reason.rb +14 -0
- data/lib/schematic/types/plan_credit_grant_view.rb +6 -0
- data/lib/schematic/types/plan_entitlement_response_data.rb +4 -0
- data/lib/schematic/types/plan_version_migration_response_data.rb +4 -0
- data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +10 -0
- data/lib/schematic/types/usage_based_entitlement_request_body.rb +4 -0
- data/lib/schematic/version.rb +1 -1
- data/lib/schematic.rb +5 -1
- data/reference.md +122 -4
- data/scripts/e2e-pack.sh +74 -0
- data/testapp/app.rb +11 -1
- metadata +7 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4a148154577d68e12ccdcd07a3546ec7ed187e39dd3768a0cd7c9519297e08f4
|
|
4
|
+
data.tar.gz: b5ff4f21ce1fdd2c20e98f9b89c83e253fb7e7aef795537fee19db16f15888d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1313a590626a5f2414d9b7191282d72ce5ae846f4ec45f3c12c1dfee8e9f89c251724365170eaace986e72da8365f4eae993f52f0fc2fc30c264ca3be1b654dd
|
|
7
|
+
data.tar.gz: 9599cf974ed63293f84e6b58bb8f5aac39904f981b8fde146b1b52e3d92cd6a0cca90146074d1dbe5bd533ba0f8cc2d6f9801e1f6a00e54ea2322fa56d297ed3
|
data/.fern/metadata.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"cliVersion": "5.50.0",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
|
-
"generatorVersion": "1.
|
|
4
|
+
"generatorVersion": "1.25.0",
|
|
5
5
|
"generatorConfig": {
|
|
6
6
|
"module": "SchematicHQ",
|
|
7
7
|
"rubocopVariableNumberStyle": "disabled",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"webrick": ">= 1.0"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"originGitCommit": "
|
|
16
|
+
"originGitCommit": "1d6a1c9cf0e1d72ea8ede6e7e8f84d35ffbd8be3",
|
|
17
17
|
"originGitCommitIsDirty": false,
|
|
18
18
|
"invokedBy": "ci",
|
|
19
|
-
"requestedVersion": "1.5.
|
|
19
|
+
"requestedVersion": "1.5.1",
|
|
20
20
|
"ciProvider": "github",
|
|
21
|
-
"sdkVersion": "1.5.
|
|
21
|
+
"sdkVersion": "1.5.1"
|
|
22
22
|
}
|
data/.fern/replay.lock
CHANGED
|
@@ -96,14 +96,26 @@ generations:
|
|
|
96
96
|
cli_version: unknown
|
|
97
97
|
generator_versions:
|
|
98
98
|
fernapi/fern-ruby-sdk: 1.24.1
|
|
99
|
-
|
|
99
|
+
- commit_sha: d5a92851233562e02f773dcdeda66fb4f7cc8845
|
|
100
|
+
tree_hash: 462667173c7123dc20e867b1337e7dc812db70ac
|
|
101
|
+
timestamp: 2026-09-17T06:09:25.350Z
|
|
102
|
+
cli_version: unknown
|
|
103
|
+
generator_versions:
|
|
104
|
+
fernapi/fern-ruby-sdk: 1.25.0
|
|
105
|
+
- commit_sha: e22ae14fff5d0a5d3222b98154a1d1bc42b99dd8
|
|
106
|
+
tree_hash: 5897e521ec8b157b12d16cf557e268a84c0f2ffa
|
|
107
|
+
timestamp: 2026-09-21T10:02:18.804Z
|
|
108
|
+
cli_version: unknown
|
|
109
|
+
generator_versions:
|
|
110
|
+
fernapi/fern-ruby-sdk: 1.25.0
|
|
111
|
+
current_generation: e22ae14fff5d0a5d3222b98154a1d1bc42b99dd8
|
|
100
112
|
patches:
|
|
101
113
|
- id: patch-5da692c2
|
|
102
114
|
content_hash: sha256:e652287219a0a709e16112ced444e6472c6fa8bdfe888edf868caaf9769a9472
|
|
103
115
|
original_commit: 5da692c20aef08577d900f9a860b5f78a549418e
|
|
104
116
|
original_message: inject host time into datastream wasm rules engine (SCHY-471)
|
|
105
117
|
original_author: Christopher Brady <chris@schematichq.com>
|
|
106
|
-
base_generation:
|
|
118
|
+
base_generation: e22ae14fff5d0a5d3222b98154a1d1bc42b99dd8
|
|
107
119
|
files:
|
|
108
120
|
- test/rules_engine_clock_test.rb
|
|
109
121
|
patch_content: |
|
|
@@ -271,7 +283,7 @@ patches:
|
|
|
271
283
|
original_commit: ee61788c5a83fce5dd5768b2536391459550d176
|
|
272
284
|
original_message: fix rubocop offenses in clock regression test (SCHY-471)
|
|
273
285
|
original_author: Christopher Brady <chris@schematichq.com>
|
|
274
|
-
base_generation:
|
|
286
|
+
base_generation: e22ae14fff5d0a5d3222b98154a1d1bc42b99dd8
|
|
275
287
|
files:
|
|
276
288
|
- test/rules_engine_clock_test.rb
|
|
277
289
|
patch_content: |
|
data/lib/schematic/client.rb
CHANGED
|
@@ -42,7 +42,7 @@ module Schematic
|
|
|
42
42
|
@raw_client = Schematic::Internal::Http::RawClient.new(
|
|
43
43
|
base_url: base_url || Schematic::Environment::DEFAULT,
|
|
44
44
|
headers: {
|
|
45
|
-
"User-Agent" => "schematichq/1.5.
|
|
45
|
+
"User-Agent" => "schematichq/1.5.1",
|
|
46
46
|
"X-Fern-Language" => "Ruby",
|
|
47
47
|
"X-Schematic-Api-Key" => api_key.to_s
|
|
48
48
|
},
|
|
@@ -9,6 +9,8 @@ module Schematic
|
|
|
9
9
|
field :additional_amount, -> { Integer }, optional: false, nullable: false
|
|
10
10
|
|
|
11
11
|
field :expires_at, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :idempotency_key, -> { String }, optional: true, nullable: false
|
|
12
14
|
end
|
|
13
15
|
end
|
|
14
16
|
end
|
data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb
CHANGED
|
@@ -32,8 +32,12 @@ module Schematic
|
|
|
32
32
|
|
|
33
33
|
field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
34
34
|
|
|
35
|
+
field :overage_billing_cadence, -> { Schematic::Types::BillingArrearsCadence }, optional: true, nullable: false
|
|
36
|
+
|
|
35
37
|
field :overage_billing_product_id, -> { String }, optional: true, nullable: false
|
|
36
38
|
|
|
39
|
+
field :overage_invoice_anchor, -> { Schematic::Types::BillingArrearsAnchor }, optional: true, nullable: false
|
|
40
|
+
|
|
37
41
|
field :plan_id, -> { String }, optional: false, nullable: false
|
|
38
42
|
|
|
39
43
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
@@ -28,8 +28,12 @@ module Schematic
|
|
|
28
28
|
|
|
29
29
|
field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
30
30
|
|
|
31
|
+
field :overage_billing_cadence, -> { Schematic::Types::BillingArrearsCadence }, optional: true, nullable: false
|
|
32
|
+
|
|
31
33
|
field :overage_billing_product_id, -> { String }, optional: true, nullable: false
|
|
32
34
|
|
|
35
|
+
field :overage_invoice_anchor, -> { Schematic::Types::BillingArrearsAnchor }, optional: true, nullable: false
|
|
36
|
+
|
|
33
37
|
field :plan_id, -> { String }, optional: false, nullable: false
|
|
34
38
|
|
|
35
39
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
@@ -28,8 +28,12 @@ module Schematic
|
|
|
28
28
|
|
|
29
29
|
field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
30
30
|
|
|
31
|
+
field :overage_billing_cadence, -> { Schematic::Types::BillingArrearsCadence }, optional: true, nullable: false
|
|
32
|
+
|
|
31
33
|
field :overage_billing_product_id, -> { String }, optional: true, nullable: false
|
|
32
34
|
|
|
35
|
+
field :overage_invoice_anchor, -> { Schematic::Types::BillingArrearsAnchor }, optional: true, nullable: false
|
|
36
|
+
|
|
33
37
|
field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false
|
|
34
38
|
|
|
35
39
|
field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
|
|
@@ -10,6 +10,8 @@ module Schematic
|
|
|
10
10
|
|
|
11
11
|
field :expires_at, -> { String }, optional: true, nullable: false
|
|
12
12
|
|
|
13
|
+
field :idempotency_key, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
13
15
|
field :preflight, -> { Schematic::Types::PreflightRequestBody }, optional: true, nullable: false
|
|
14
16
|
|
|
15
17
|
field :quantity, -> { Integer }, optional: true, nullable: false
|
|
@@ -158,13 +158,15 @@ module Schematic
|
|
|
158
158
|
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
159
159
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
160
160
|
# @option request_options [Integer] :timeout_in_seconds
|
|
161
|
-
# @option params [String] :
|
|
161
|
+
# @option params [String, nil] :feature_id
|
|
162
|
+
# @option params [String, nil] :plan_version_id
|
|
162
163
|
# @option params [Schematic::Types::PlanVersionMigrationStatus, nil] :status
|
|
163
164
|
# @option params [Integer, nil] :limit
|
|
164
165
|
# @option params [Integer, nil] :offset
|
|
165
166
|
#
|
|
166
167
|
# @example
|
|
167
168
|
# client.planmigrations.list_migrations(
|
|
169
|
+
# feature_id: "feature_id",
|
|
168
170
|
# plan_version_id: "plan_version_id",
|
|
169
171
|
# status: "cancelled",
|
|
170
172
|
# limit: 1000000,
|
|
@@ -175,6 +177,7 @@ module Schematic
|
|
|
175
177
|
def list_migrations(request_options: {}, **params)
|
|
176
178
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
177
179
|
query_params = {}
|
|
180
|
+
query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id)
|
|
178
181
|
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
179
182
|
query_params["status"] = params[:status] if params.key?(:status)
|
|
180
183
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
@@ -401,13 +404,15 @@ module Schematic
|
|
|
401
404
|
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
402
405
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
403
406
|
# @option request_options [Integer] :timeout_in_seconds
|
|
404
|
-
# @option params [String] :
|
|
407
|
+
# @option params [String, nil] :feature_id
|
|
408
|
+
# @option params [String, nil] :plan_version_id
|
|
405
409
|
# @option params [Schematic::Types::PlanVersionMigrationStatus, nil] :status
|
|
406
410
|
# @option params [Integer, nil] :limit
|
|
407
411
|
# @option params [Integer, nil] :offset
|
|
408
412
|
#
|
|
409
413
|
# @example
|
|
410
414
|
# client.planmigrations.count_migrations(
|
|
415
|
+
# feature_id: "feature_id",
|
|
411
416
|
# plan_version_id: "plan_version_id",
|
|
412
417
|
# status: "cancelled",
|
|
413
418
|
# limit: 1000000,
|
|
@@ -418,6 +423,7 @@ module Schematic
|
|
|
418
423
|
def count_migrations(request_options: {}, **params)
|
|
419
424
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
420
425
|
query_params = {}
|
|
426
|
+
query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id)
|
|
421
427
|
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
422
428
|
query_params["status"] = params[:status] if params.key?(:status)
|
|
423
429
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
@@ -5,6 +5,8 @@ module Schematic
|
|
|
5
5
|
module Types
|
|
6
6
|
# Input parameters
|
|
7
7
|
class CountMigrationsParams < Internal::Types::Model
|
|
8
|
+
field :feature_id, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
8
10
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
9
11
|
|
|
10
12
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
@@ -4,7 +4,9 @@ module Schematic
|
|
|
4
4
|
module Planmigrations
|
|
5
5
|
module Types
|
|
6
6
|
class CountMigrationsRequest < Internal::Types::Model
|
|
7
|
-
field :
|
|
7
|
+
field :feature_id, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
8
10
|
|
|
9
11
|
field :status, -> { Schematic::Types::PlanVersionMigrationStatus }, optional: true, nullable: false
|
|
10
12
|
|
|
@@ -5,6 +5,8 @@ module Schematic
|
|
|
5
5
|
module Types
|
|
6
6
|
# Input parameters
|
|
7
7
|
class ListMigrationsParams < Internal::Types::Model
|
|
8
|
+
field :feature_id, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
8
10
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
9
11
|
|
|
10
12
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
@@ -4,7 +4,9 @@ module Schematic
|
|
|
4
4
|
module Planmigrations
|
|
5
5
|
module Types
|
|
6
6
|
class ListMigrationsRequest < Internal::Types::Model
|
|
7
|
-
field :
|
|
7
|
+
field :feature_id, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
8
10
|
|
|
9
11
|
field :status, -> { Schematic::Types::PlanVersionMigrationStatus }, optional: true, nullable: false
|
|
10
12
|
|
|
@@ -258,6 +258,8 @@ module Schematic
|
|
|
258
258
|
# @option params [String, nil] :q
|
|
259
259
|
# @option params [String, nil] :scoped_to_company_id
|
|
260
260
|
# @option params [Boolean, nil] :with_entitlements
|
|
261
|
+
# @option params [Boolean, nil] :with_published_version
|
|
262
|
+
# @option params [Boolean, nil] :without_entitlement_for_include_drafts
|
|
261
263
|
# @option params [String, nil] :without_entitlement_for
|
|
262
264
|
# @option params [Boolean, nil] :without_paid_product_id
|
|
263
265
|
# @option params [Integer, nil] :limit
|
|
@@ -279,6 +281,8 @@ module Schematic
|
|
|
279
281
|
# q: "q",
|
|
280
282
|
# scoped_to_company_id: "scoped_to_company_id",
|
|
281
283
|
# with_entitlements: true,
|
|
284
|
+
# with_published_version: true,
|
|
285
|
+
# without_entitlement_for_include_drafts: true,
|
|
282
286
|
# without_entitlement_for: "without_entitlement_for",
|
|
283
287
|
# without_paid_product_id: true,
|
|
284
288
|
# limit: 1000000,
|
|
@@ -303,6 +307,8 @@ module Schematic
|
|
|
303
307
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
304
308
|
query_params["scoped_to_company_id"] = params[:scoped_to_company_id] if params.key?(:scoped_to_company_id)
|
|
305
309
|
query_params["with_entitlements"] = params[:with_entitlements] if params.key?(:with_entitlements)
|
|
310
|
+
query_params["with_published_version"] = params[:with_published_version] if params.key?(:with_published_version)
|
|
311
|
+
query_params["without_entitlement_for_include_drafts"] = params[:without_entitlement_for_include_drafts] if params.key?(:without_entitlement_for_include_drafts)
|
|
306
312
|
query_params["without_entitlement_for"] = params[:without_entitlement_for] if params.key?(:without_entitlement_for)
|
|
307
313
|
query_params["without_paid_product_id"] = params[:without_paid_product_id] if params.key?(:without_paid_product_id)
|
|
308
314
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
@@ -691,6 +697,8 @@ module Schematic
|
|
|
691
697
|
# @option params [String, nil] :q
|
|
692
698
|
# @option params [String, nil] :scoped_to_company_id
|
|
693
699
|
# @option params [Boolean, nil] :with_entitlements
|
|
700
|
+
# @option params [Boolean, nil] :with_published_version
|
|
701
|
+
# @option params [Boolean, nil] :without_entitlement_for_include_drafts
|
|
694
702
|
# @option params [String, nil] :without_entitlement_for
|
|
695
703
|
# @option params [Boolean, nil] :without_paid_product_id
|
|
696
704
|
# @option params [Integer, nil] :limit
|
|
@@ -712,6 +720,8 @@ module Schematic
|
|
|
712
720
|
# q: "q",
|
|
713
721
|
# scoped_to_company_id: "scoped_to_company_id",
|
|
714
722
|
# with_entitlements: true,
|
|
723
|
+
# with_published_version: true,
|
|
724
|
+
# without_entitlement_for_include_drafts: true,
|
|
715
725
|
# without_entitlement_for: "without_entitlement_for",
|
|
716
726
|
# without_paid_product_id: true,
|
|
717
727
|
# limit: 1000000,
|
|
@@ -736,6 +746,8 @@ module Schematic
|
|
|
736
746
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
737
747
|
query_params["scoped_to_company_id"] = params[:scoped_to_company_id] if params.key?(:scoped_to_company_id)
|
|
738
748
|
query_params["with_entitlements"] = params[:with_entitlements] if params.key?(:with_entitlements)
|
|
749
|
+
query_params["with_published_version"] = params[:with_published_version] if params.key?(:with_published_version)
|
|
750
|
+
query_params["without_entitlement_for_include_drafts"] = params[:without_entitlement_for_include_drafts] if params.key?(:without_entitlement_for_include_drafts)
|
|
739
751
|
query_params["without_entitlement_for"] = params[:without_entitlement_for] if params.key?(:without_entitlement_for)
|
|
740
752
|
query_params["without_paid_product_id"] = params[:without_paid_product_id] if params.key?(:without_paid_product_id)
|
|
741
753
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
@@ -37,8 +37,12 @@ module Schematic
|
|
|
37
37
|
|
|
38
38
|
field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
39
39
|
|
|
40
|
+
field :with_published_version, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
41
|
+
|
|
40
42
|
field :without_entitlement_for, -> { String }, optional: true, nullable: false
|
|
41
43
|
|
|
44
|
+
field :without_entitlement_for_include_drafts, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
45
|
+
|
|
42
46
|
field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
43
47
|
end
|
|
44
48
|
end
|
|
@@ -32,6 +32,10 @@ module Schematic
|
|
|
32
32
|
|
|
33
33
|
field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
34
34
|
|
|
35
|
+
field :with_published_version, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
36
|
+
|
|
37
|
+
field :without_entitlement_for_include_drafts, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
38
|
+
|
|
35
39
|
field :without_entitlement_for, -> { String }, optional: true, nullable: false
|
|
36
40
|
|
|
37
41
|
field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -37,8 +37,12 @@ module Schematic
|
|
|
37
37
|
|
|
38
38
|
field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
39
39
|
|
|
40
|
+
field :with_published_version, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
41
|
+
|
|
40
42
|
field :without_entitlement_for, -> { String }, optional: true, nullable: false
|
|
41
43
|
|
|
44
|
+
field :without_entitlement_for_include_drafts, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
45
|
+
|
|
42
46
|
field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
43
47
|
end
|
|
44
48
|
end
|
|
@@ -32,6 +32,10 @@ module Schematic
|
|
|
32
32
|
|
|
33
33
|
field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
34
34
|
|
|
35
|
+
field :with_published_version, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
36
|
+
|
|
37
|
+
field :without_entitlement_for_include_drafts, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
38
|
+
|
|
35
39
|
field :without_entitlement_for, -> { String }, optional: true, nullable: false
|
|
36
40
|
|
|
37
41
|
field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -9,6 +9,9 @@ module Schematic
|
|
|
9
9
|
BILLING_CREDIT_AUTO_TOPUP = "billing_credit_auto_topup"
|
|
10
10
|
FREE = "free"
|
|
11
11
|
PLAN = "plan"
|
|
12
|
+
POSTPAID_FORGIVEN = "postpaid_forgiven"
|
|
13
|
+
POSTPAID_OVERDRAFT = "postpaid_overdraft"
|
|
14
|
+
POSTPAID_SETTLEMENT = "postpaid_settlement"
|
|
12
15
|
PURCHASED = "purchased"
|
|
13
16
|
ROLLOVER = "rollover"
|
|
14
17
|
end
|
|
@@ -23,6 +23,8 @@ module Schematic
|
|
|
23
23
|
|
|
24
24
|
field :id, -> { String }, optional: false, nullable: false
|
|
25
25
|
|
|
26
|
+
field :ledger_authority, -> { Schematic::Types::BillingCreditLedgerAuthority }, optional: false, nullable: false
|
|
27
|
+
|
|
26
28
|
field :name, -> { String }, optional: false, nullable: false
|
|
27
29
|
|
|
28
30
|
field :plural_name, -> { String }, optional: true, nullable: false
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class BillingPlanCreditGrantPriceTierResponseData < Internal::Types::Model
|
|
6
|
+
field :from, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :per_unit_price, -> { Integer }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :per_unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :to, -> { Integer }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -27,6 +27,8 @@ module Schematic
|
|
|
27
27
|
|
|
28
28
|
field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false
|
|
29
29
|
|
|
30
|
+
field :billing_mode, -> { Schematic::Types::BillingPlanCreditGrantBillingMode }, optional: false, nullable: false
|
|
31
|
+
|
|
30
32
|
field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
31
33
|
|
|
32
34
|
field :company_credit_amount, -> { Integer }, optional: false, nullable: false
|
|
@@ -71,6 +73,10 @@ module Schematic
|
|
|
71
73
|
|
|
72
74
|
field :postpaid_rate_per_unit_decimal, -> { String }, optional: true, nullable: false
|
|
73
75
|
|
|
76
|
+
field :price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false
|
|
77
|
+
|
|
78
|
+
field :price_tiers, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantPriceTierResponseData] }, optional: false, nullable: false
|
|
79
|
+
|
|
74
80
|
field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false
|
|
75
81
|
|
|
76
82
|
field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false
|
|
@@ -81,6 +87,12 @@ module Schematic
|
|
|
81
87
|
|
|
82
88
|
field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false
|
|
83
89
|
|
|
90
|
+
field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false
|
|
91
|
+
|
|
92
|
+
field :unit_price, -> { Integer }, optional: true, nullable: false
|
|
93
|
+
|
|
94
|
+
field :unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
95
|
+
|
|
84
96
|
field :updated_at, -> { String }, optional: false, nullable: false
|
|
85
97
|
end
|
|
86
98
|
end
|
|
@@ -37,6 +37,10 @@ module Schematic
|
|
|
37
37
|
|
|
38
38
|
field :billing_credit_postpaid_rate_per_unit_decimal, -> { String }, optional: true, nullable: false
|
|
39
39
|
|
|
40
|
+
field :billing_mode, -> { Schematic::Types::BillingPlanCreditGrantBillingMode }, optional: false, nullable: false
|
|
41
|
+
|
|
42
|
+
field :billing_product_price_id, -> { String }, optional: true, nullable: false
|
|
43
|
+
|
|
40
44
|
field :company_auto_topup_amount, -> { Integer }, optional: true, nullable: false
|
|
41
45
|
|
|
42
46
|
field :company_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -77,6 +81,8 @@ module Schematic
|
|
|
77
81
|
|
|
78
82
|
field :plural_name, -> { String }, optional: true, nullable: false
|
|
79
83
|
|
|
84
|
+
field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false
|
|
85
|
+
|
|
80
86
|
field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false
|
|
81
87
|
|
|
82
88
|
field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false
|
|
@@ -29,6 +29,8 @@ module Schematic
|
|
|
29
29
|
|
|
30
30
|
field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false
|
|
31
31
|
|
|
32
|
+
field :billing_mode, -> { Schematic::Types::BillingPlanCreditGrantBillingMode }, optional: true, nullable: false
|
|
33
|
+
|
|
32
34
|
field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
33
35
|
|
|
34
36
|
field :company_credit_amount, -> { Integer }, optional: true, nullable: false
|
|
@@ -57,6 +59,8 @@ module Schematic
|
|
|
57
59
|
|
|
58
60
|
field :postpaid_rate_per_unit_decimal, -> { String }, optional: true, nullable: false
|
|
59
61
|
|
|
62
|
+
field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreditGrantPriceTierRequestBody] }, optional: true, nullable: false
|
|
63
|
+
|
|
60
64
|
field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false
|
|
61
65
|
|
|
62
66
|
field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false
|
|
@@ -66,6 +70,12 @@ module Schematic
|
|
|
66
70
|
field :rollover_percentage, -> { Integer }, optional: true, nullable: false
|
|
67
71
|
|
|
68
72
|
field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: true, nullable: false
|
|
73
|
+
|
|
74
|
+
field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false
|
|
75
|
+
|
|
76
|
+
field :unit_price, -> { Integer }, optional: true, nullable: false
|
|
77
|
+
|
|
78
|
+
field :unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
69
79
|
end
|
|
70
80
|
end
|
|
71
81
|
end
|
|
@@ -27,8 +27,12 @@ module Schematic
|
|
|
27
27
|
|
|
28
28
|
field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
29
29
|
|
|
30
|
+
field :overage_billing_cadence, -> { Schematic::Types::BillingArrearsCadence }, optional: true, nullable: false
|
|
31
|
+
|
|
30
32
|
field :overage_billing_product_id, -> { String }, optional: true, nullable: false
|
|
31
33
|
|
|
34
|
+
field :overage_invoice_anchor, -> { Schematic::Types::BillingArrearsAnchor }, optional: true, nullable: false
|
|
35
|
+
|
|
32
36
|
field :plan_id, -> { String }, optional: false, nullable: false
|
|
33
37
|
|
|
34
38
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
@@ -61,6 +61,8 @@ module Schematic
|
|
|
61
61
|
|
|
62
62
|
field :to_grant_id, -> { String }, optional: true, nullable: false
|
|
63
63
|
|
|
64
|
+
field :transfer_reason, -> { Schematic::Types::CreditTransferReason }, optional: true, nullable: false
|
|
65
|
+
|
|
64
66
|
field :usage_event_id, -> { String }, optional: true, nullable: false
|
|
65
67
|
|
|
66
68
|
field :usage_reason, -> { Schematic::Types::CreditUsageReason }, optional: true, nullable: false
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class CreditGrantPriceTierRequestBody < Internal::Types::Model
|
|
6
|
+
field :per_unit_price, -> { Integer }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :per_unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :up_to, -> { Integer }, optional: true, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
module CreditTransferReason
|
|
6
|
+
extend Schematic::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
OVERDRAFT_RECOVERY = "overdraft_recovery"
|
|
9
|
+
POSTPAID_DEBT_MOVED = "postpaid_debt_moved"
|
|
10
|
+
POSTPAID_FORGIVEN = "postpaid_forgiven"
|
|
11
|
+
POSTPAID_PAID = "postpaid_paid"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -37,6 +37,10 @@ module Schematic
|
|
|
37
37
|
|
|
38
38
|
field :billing_credit_postpaid_rate_per_unit_decimal, -> { String }, optional: true, nullable: false
|
|
39
39
|
|
|
40
|
+
field :billing_mode, -> { Schematic::Types::BillingPlanCreditGrantBillingMode }, optional: false, nullable: false
|
|
41
|
+
|
|
42
|
+
field :billing_product_price_id, -> { String }, optional: true, nullable: false
|
|
43
|
+
|
|
40
44
|
field :company_credit_amount, -> { Integer }, optional: false, nullable: false
|
|
41
45
|
|
|
42
46
|
field :created_at, -> { String }, optional: false, nullable: false
|
|
@@ -71,6 +75,8 @@ module Schematic
|
|
|
71
75
|
|
|
72
76
|
field :plural_name, -> { String }, optional: true, nullable: false
|
|
73
77
|
|
|
78
|
+
field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false
|
|
79
|
+
|
|
74
80
|
field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false
|
|
75
81
|
|
|
76
82
|
field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false
|
|
@@ -31,6 +31,10 @@ module Schematic
|
|
|
31
31
|
|
|
32
32
|
field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false
|
|
33
33
|
|
|
34
|
+
field :overage_billing_cadence, -> { Schematic::Types::BillingArrearsCadence }, optional: true, nullable: false
|
|
35
|
+
|
|
36
|
+
field :overage_invoice_anchor, -> { Schematic::Types::BillingArrearsAnchor }, optional: true, nullable: false
|
|
37
|
+
|
|
34
38
|
field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false
|
|
35
39
|
|
|
36
40
|
field :plan_id, -> { String }, optional: false, nullable: false
|
|
@@ -13,6 +13,10 @@ module Schematic
|
|
|
13
13
|
|
|
14
14
|
field :failed_companies, -> { Integer }, optional: false, nullable: false
|
|
15
15
|
|
|
16
|
+
field :feature_id, -> { String }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :feature_plan_rollout_id, -> { String }, optional: true, nullable: false
|
|
19
|
+
|
|
16
20
|
field :id, -> { String }, optional: false, nullable: false
|
|
17
21
|
|
|
18
22
|
field :next_due_at, -> { String }, optional: true, nullable: false
|
|
@@ -29,6 +29,8 @@ module Schematic
|
|
|
29
29
|
|
|
30
30
|
field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false
|
|
31
31
|
|
|
32
|
+
field :billing_mode, -> { Schematic::Types::BillingPlanCreditGrantBillingMode }, optional: true, nullable: false
|
|
33
|
+
|
|
32
34
|
field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
33
35
|
|
|
34
36
|
field :company_credit_amount, -> { Integer }, optional: true, nullable: false
|
|
@@ -51,6 +53,8 @@ module Schematic
|
|
|
51
53
|
|
|
52
54
|
field :postpaid_rate_per_unit_decimal, -> { String }, optional: true, nullable: false
|
|
53
55
|
|
|
56
|
+
field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreditGrantPriceTierRequestBody] }, optional: true, nullable: false
|
|
57
|
+
|
|
54
58
|
field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false
|
|
55
59
|
|
|
56
60
|
field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false
|
|
@@ -60,6 +64,12 @@ module Schematic
|
|
|
60
64
|
field :rollover_percentage, -> { Integer }, optional: true, nullable: false
|
|
61
65
|
|
|
62
66
|
field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: true, nullable: false
|
|
67
|
+
|
|
68
|
+
field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false
|
|
69
|
+
|
|
70
|
+
field :unit_price, -> { Integer }, optional: true, nullable: false
|
|
71
|
+
|
|
72
|
+
field :unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
63
73
|
end
|
|
64
74
|
end
|
|
65
75
|
end
|
|
@@ -19,8 +19,12 @@ module Schematic
|
|
|
19
19
|
|
|
20
20
|
field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false
|
|
21
21
|
|
|
22
|
+
field :overage_billing_cadence, -> { Schematic::Types::BillingArrearsCadence }, optional: true, nullable: false
|
|
23
|
+
|
|
22
24
|
field :overage_billing_product_id, -> { String }, optional: true, nullable: false
|
|
23
25
|
|
|
26
|
+
field :overage_invoice_anchor, -> { Schematic::Types::BillingArrearsAnchor }, optional: true, nullable: false
|
|
27
|
+
|
|
24
28
|
field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false
|
|
25
29
|
|
|
26
30
|
field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
|
data/lib/schematic/version.rb
CHANGED
data/lib/schematic.rb
CHANGED
|
@@ -157,6 +157,7 @@ require_relative "schematic/billing/types/upsert_billing_subscription_response"
|
|
|
157
157
|
require_relative "schematic/credits/types/list_billing_credits_params"
|
|
158
158
|
require_relative "schematic/types/billing_credit_burn_strategy"
|
|
159
159
|
require_relative "schematic/types/billing_credit_expiry_unit"
|
|
160
|
+
require_relative "schematic/types/billing_credit_ledger_authority"
|
|
160
161
|
require_relative "schematic/types/billing_credit_rollover_policy"
|
|
161
162
|
require_relative "schematic/types/credit_currency_price_response_data"
|
|
162
163
|
require_relative "schematic/types/billing_credit_response_data"
|
|
@@ -208,6 +209,8 @@ require_relative "schematic/credits/types/list_billing_plan_credit_grants_params
|
|
|
208
209
|
require_relative "schematic/types/billing_arrears_anchor"
|
|
209
210
|
require_relative "schematic/types/billing_arrears_cadence"
|
|
210
211
|
require_relative "schematic/types/billing_credit_auto_topup_availability"
|
|
212
|
+
require_relative "schematic/types/billing_plan_credit_grant_billing_mode"
|
|
213
|
+
require_relative "schematic/types/billing_plan_credit_grant_price_tier_response_data"
|
|
211
214
|
require_relative "schematic/types/billing_plan_credit_grant_reset_start"
|
|
212
215
|
require_relative "schematic/types/billing_plan_credit_grant_reset_type"
|
|
213
216
|
require_relative "schematic/types/plan_credit_grant_scaling"
|
|
@@ -238,6 +241,7 @@ require_relative "schematic/types/credit_event_type"
|
|
|
238
241
|
require_relative "schematic/credits/types/list_credit_event_ledger_params"
|
|
239
242
|
require_relative "schematic/types/billing_credit_ledger_response_data"
|
|
240
243
|
require_relative "schematic/types/company_ledger_response_data"
|
|
244
|
+
require_relative "schematic/types/credit_transfer_reason"
|
|
241
245
|
require_relative "schematic/types/credit_usage_reason"
|
|
242
246
|
require_relative "schematic/types/feature_ledger_response_data"
|
|
243
247
|
require_relative "schematic/types/credit_event_ledger_response_data"
|
|
@@ -304,7 +308,6 @@ require_relative "schematic/types/catalog_plan_i_ds_response_data"
|
|
|
304
308
|
require_relative "schematic/catalogs/types/get_plans_in_catalog_response"
|
|
305
309
|
require_relative "schematic/types/checkout_subscription"
|
|
306
310
|
require_relative "schematic/checkout/types/checkout_internal_response"
|
|
307
|
-
require_relative "schematic/types/billing_credit_ledger_authority"
|
|
308
311
|
require_relative "schematic/types/billing_product_record_response_data"
|
|
309
312
|
require_relative "schematic/types/credit_currency_price"
|
|
310
313
|
require_relative "schematic/types/billing_credit_view"
|
|
@@ -798,6 +801,7 @@ require_relative "schematic/types/condition_group_view"
|
|
|
798
801
|
require_relative "schematic/types/condition_response_data"
|
|
799
802
|
require_relative "schematic/types/coupon_request_body"
|
|
800
803
|
require_relative "schematic/types/credit_auto_topup_amount_type"
|
|
804
|
+
require_relative "schematic/types/credit_grant_price_tier_request_body"
|
|
801
805
|
require_relative "schematic/types/create_billing_plan_credit_grant_request_body"
|
|
802
806
|
require_relative "schematic/types/create_billing_price_tier_request_body"
|
|
803
807
|
require_relative "schematic/types/create_custom_plan_bundle_plan_request_body"
|
data/reference.md
CHANGED
|
@@ -5975,7 +5975,7 @@ client.credits.acquire_credit_lease(
|
|
|
5975
5975
|
<dl>
|
|
5976
5976
|
<dd>
|
|
5977
5977
|
|
|
5978
|
-
**expires_at:** `String`
|
|
5978
|
+
**expires_at:** `String` — When the hold lapses if the lease is never released; defaults to five minutes from now and may be at most one hour out. The unspent hold is refunded on expiry
|
|
5979
5979
|
|
|
5980
5980
|
</dd>
|
|
5981
5981
|
</dl>
|
|
@@ -6050,7 +6050,15 @@ client.credits.extend_credit_lease(
|
|
|
6050
6050
|
<dl>
|
|
6051
6051
|
<dd>
|
|
6052
6052
|
|
|
6053
|
-
**expires_at:** `String`
|
|
6053
|
+
**expires_at:** `String` — Pushes the lease's expiry out; may be at most one hour from now. Leave unset to keep the expiry the lease already has
|
|
6054
|
+
|
|
6055
|
+
</dd>
|
|
6056
|
+
</dl>
|
|
6057
|
+
|
|
6058
|
+
<dl>
|
|
6059
|
+
<dd>
|
|
6060
|
+
|
|
6061
|
+
**idempotency_key:** `String` — A caller-chosen key for safe retries: a second request with the same key returns the lease as it stands instead of growing it again. Keys are unique per environment across every extend
|
|
6054
6062
|
|
|
6055
6063
|
</dd>
|
|
6056
6064
|
</dl>
|
|
@@ -13587,6 +13595,14 @@ client.entitlements.create_plan_entitlement(
|
|
|
13587
13595
|
<dl>
|
|
13588
13596
|
<dd>
|
|
13589
13597
|
|
|
13598
|
+
**overage_billing_cadence:** `Schematic::Types::BillingArrearsCadence` — How often overage charges are assessed and invoiced. Defaults to end_of_billing_period, where the billing provider aggregates usage over the subscription's own period and bills it at period end. Set to monthly or quarterly to have overage assessed each month or quarter and billed on its own invoice, which is the point of the setting on annual plans. A quarter charges each month's usage against that month's allowance. Only applies to overage price behavior.
|
|
13599
|
+
|
|
13600
|
+
</dd>
|
|
13601
|
+
</dl>
|
|
13602
|
+
|
|
13603
|
+
<dl>
|
|
13604
|
+
<dd>
|
|
13605
|
+
|
|
13590
13606
|
**overage_billing_product_id:** `String`
|
|
13591
13607
|
|
|
13592
13608
|
</dd>
|
|
@@ -13595,6 +13611,14 @@ client.entitlements.create_plan_entitlement(
|
|
|
13595
13611
|
<dl>
|
|
13596
13612
|
<dd>
|
|
13597
13613
|
|
|
13614
|
+
**overage_invoice_anchor:** `Schematic::Types::BillingArrearsAnchor` — Which boundary closes a monthly or quarterly overage window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Quarterly windows run in three-month blocks from the billing period start, held to the subscription's own period, or in calendar quarters at month_end. Only applies when overage_billing_cadence is monthly or quarterly, and must match metric_period_month_reset so each window closes when the allowance resets: billing_period_start for billing_cycle, month_end for first_of_month. Defaults to the anchor that matches the reset.
|
|
13615
|
+
|
|
13616
|
+
</dd>
|
|
13617
|
+
</dl>
|
|
13618
|
+
|
|
13619
|
+
<dl>
|
|
13620
|
+
<dd>
|
|
13621
|
+
|
|
13598
13622
|
**plan_id:** `String`
|
|
13599
13623
|
|
|
13600
13624
|
</dd>
|
|
@@ -13950,6 +13974,14 @@ client.entitlements.update_plan_entitlement(
|
|
|
13950
13974
|
<dl>
|
|
13951
13975
|
<dd>
|
|
13952
13976
|
|
|
13977
|
+
**overage_billing_cadence:** `Schematic::Types::BillingArrearsCadence` — How often overage charges are assessed and invoiced. Defaults to end_of_billing_period, where the billing provider aggregates usage over the subscription's own period and bills it at period end. Set to monthly or quarterly to have overage assessed each month or quarter and billed on its own invoice, which is the point of the setting on annual plans. A quarter charges each month's usage against that month's allowance. Only applies to overage price behavior.
|
|
13978
|
+
|
|
13979
|
+
</dd>
|
|
13980
|
+
</dl>
|
|
13981
|
+
|
|
13982
|
+
<dl>
|
|
13983
|
+
<dd>
|
|
13984
|
+
|
|
13953
13985
|
**overage_billing_product_id:** `String`
|
|
13954
13986
|
|
|
13955
13987
|
</dd>
|
|
@@ -13958,6 +13990,14 @@ client.entitlements.update_plan_entitlement(
|
|
|
13958
13990
|
<dl>
|
|
13959
13991
|
<dd>
|
|
13960
13992
|
|
|
13993
|
+
**overage_invoice_anchor:** `Schematic::Types::BillingArrearsAnchor` — Which boundary closes a monthly or quarterly overage window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Quarterly windows run in three-month blocks from the billing period start, held to the subscription's own period, or in calendar quarters at month_end. Only applies when overage_billing_cadence is monthly or quarterly, and must match metric_period_month_reset so each window closes when the allowance resets: billing_period_start for billing_cycle, month_end for first_of_month. Defaults to the anchor that matches the reset.
|
|
13994
|
+
|
|
13995
|
+
</dd>
|
|
13996
|
+
</dl>
|
|
13997
|
+
|
|
13998
|
+
<dl>
|
|
13999
|
+
<dd>
|
|
14000
|
+
|
|
13961
14001
|
**price_behavior:** `Schematic::Types::EntitlementPriceBehavior`
|
|
13962
14002
|
|
|
13963
14003
|
</dd>
|
|
@@ -14316,6 +14356,14 @@ client.entitlements.upsert_plan_entitlement_for_billing_product(
|
|
|
14316
14356
|
<dl>
|
|
14317
14357
|
<dd>
|
|
14318
14358
|
|
|
14359
|
+
**overage_billing_cadence:** `Schematic::Types::BillingArrearsCadence` — How often overage charges are assessed and invoiced. Defaults to end_of_billing_period, where the billing provider aggregates usage over the subscription's own period and bills it at period end. Set to monthly or quarterly to have overage assessed each month or quarter and billed on its own invoice, which is the point of the setting on annual plans. A quarter charges each month's usage against that month's allowance. Only applies to overage price behavior.
|
|
14360
|
+
|
|
14361
|
+
</dd>
|
|
14362
|
+
</dl>
|
|
14363
|
+
|
|
14364
|
+
<dl>
|
|
14365
|
+
<dd>
|
|
14366
|
+
|
|
14319
14367
|
**overage_billing_product_id:** `String`
|
|
14320
14368
|
|
|
14321
14369
|
</dd>
|
|
@@ -14324,6 +14372,14 @@ client.entitlements.upsert_plan_entitlement_for_billing_product(
|
|
|
14324
14372
|
<dl>
|
|
14325
14373
|
<dd>
|
|
14326
14374
|
|
|
14375
|
+
**overage_invoice_anchor:** `Schematic::Types::BillingArrearsAnchor` — Which boundary closes a monthly or quarterly overage window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Quarterly windows run in three-month blocks from the billing period start, held to the subscription's own period, or in calendar quarters at month_end. Only applies when overage_billing_cadence is monthly or quarterly, and must match metric_period_month_reset so each window closes when the allowance resets: billing_period_start for billing_cycle, month_end for first_of_month. Defaults to the anchor that matches the reset.
|
|
14376
|
+
|
|
14377
|
+
</dd>
|
|
14378
|
+
</dl>
|
|
14379
|
+
|
|
14380
|
+
<dl>
|
|
14381
|
+
<dd>
|
|
14382
|
+
|
|
14327
14383
|
**plan_id:** `String`
|
|
14328
14384
|
|
|
14329
14385
|
</dd>
|
|
@@ -15358,6 +15414,8 @@ client.plans.list_plans(
|
|
|
15358
15414
|
q: "q",
|
|
15359
15415
|
scoped_to_company_id: "scoped_to_company_id",
|
|
15360
15416
|
with_entitlements: true,
|
|
15417
|
+
with_published_version: true,
|
|
15418
|
+
without_entitlement_for_include_drafts: true,
|
|
15361
15419
|
without_entitlement_for: "without_entitlement_for",
|
|
15362
15420
|
without_paid_product_id: true,
|
|
15363
15421
|
limit: 1000000,
|
|
@@ -15489,6 +15547,22 @@ client.plans.list_plans(
|
|
|
15489
15547
|
<dl>
|
|
15490
15548
|
<dd>
|
|
15491
15549
|
|
|
15550
|
+
**with_published_version:** `Internal::Types::Boolean` — Only return plans that have a published version
|
|
15551
|
+
|
|
15552
|
+
</dd>
|
|
15553
|
+
</dl>
|
|
15554
|
+
|
|
15555
|
+
<dl>
|
|
15556
|
+
<dd>
|
|
15557
|
+
|
|
15558
|
+
**without_entitlement_for_include_drafts:** `Internal::Types::Boolean` — With without_entitlement_for, also treat an entitlement on a plan's draft version as existing
|
|
15559
|
+
|
|
15560
|
+
</dd>
|
|
15561
|
+
</dl>
|
|
15562
|
+
|
|
15563
|
+
<dl>
|
|
15564
|
+
<dd>
|
|
15565
|
+
|
|
15492
15566
|
**without_entitlement_for:** `String` — Filter out plans that already have a plan entitlement for the specified feature ID
|
|
15493
15567
|
|
|
15494
15568
|
</dd>
|
|
@@ -16093,6 +16167,8 @@ client.plans.count_plans(
|
|
|
16093
16167
|
q: "q",
|
|
16094
16168
|
scoped_to_company_id: "scoped_to_company_id",
|
|
16095
16169
|
with_entitlements: true,
|
|
16170
|
+
with_published_version: true,
|
|
16171
|
+
without_entitlement_for_include_drafts: true,
|
|
16096
16172
|
without_entitlement_for: "without_entitlement_for",
|
|
16097
16173
|
without_paid_product_id: true,
|
|
16098
16174
|
limit: 1000000,
|
|
@@ -16224,6 +16300,22 @@ client.plans.count_plans(
|
|
|
16224
16300
|
<dl>
|
|
16225
16301
|
<dd>
|
|
16226
16302
|
|
|
16303
|
+
**with_published_version:** `Internal::Types::Boolean` — Only return plans that have a published version
|
|
16304
|
+
|
|
16305
|
+
</dd>
|
|
16306
|
+
</dl>
|
|
16307
|
+
|
|
16308
|
+
<dl>
|
|
16309
|
+
<dd>
|
|
16310
|
+
|
|
16311
|
+
**without_entitlement_for_include_drafts:** `Internal::Types::Boolean` — With without_entitlement_for, also treat an entitlement on a plan's draft version as existing
|
|
16312
|
+
|
|
16313
|
+
</dd>
|
|
16314
|
+
</dl>
|
|
16315
|
+
|
|
16316
|
+
<dl>
|
|
16317
|
+
<dd>
|
|
16318
|
+
|
|
16227
16319
|
**without_entitlement_for:** `String` — Filter out plans that already have a plan entitlement for the specified feature ID
|
|
16228
16320
|
|
|
16229
16321
|
</dd>
|
|
@@ -19351,7 +19443,7 @@ client.features.check_and_reserve_flag(key: "key")
|
|
|
19351
19443
|
<dl>
|
|
19352
19444
|
<dd>
|
|
19353
19445
|
|
|
19354
|
-
**
|
|
19446
|
+
**idempotency_key:** `String` — A caller-chosen key for safe retries: a second request with the same key returns the original reservation instead of taking another hold
|
|
19355
19447
|
|
|
19356
19448
|
</dd>
|
|
19357
19449
|
</dl>
|
|
@@ -19359,7 +19451,15 @@ client.features.check_and_reserve_flag(key: "key")
|
|
|
19359
19451
|
<dl>
|
|
19360
19452
|
<dd>
|
|
19361
19453
|
|
|
19362
|
-
**
|
|
19454
|
+
**preflight:** `Schematic::Types::PreflightRequestBody` — Hypothetical usage to evaluate the flag against. When credit_cost names the entitlement's credit, that cost is what gets held; otherwise the hold is the entitlement's consumption rate times quantity, or, when quantity is omitted, times the usage stated here
|
|
19455
|
+
|
|
19456
|
+
</dd>
|
|
19457
|
+
</dl>
|
|
19458
|
+
|
|
19459
|
+
<dl>
|
|
19460
|
+
<dd>
|
|
19461
|
+
|
|
19462
|
+
**quantity:** `Integer` — Units of the feature the operation will consume. Sets the hold size together with the entitlement's consumption rate, and is echoed back on the reservation for the settling track event. When it is omitted the units come from preflight.event_usage.quantity, if that event subtype is the entitlement's, else from preflight.usage, else 1
|
|
19363
19463
|
|
|
19364
19464
|
</dd>
|
|
19365
19465
|
</dl>
|
|
@@ -21937,6 +22037,7 @@ client.planmigrations.count_company_migrations(
|
|
|
21937
22037
|
|
|
21938
22038
|
```ruby
|
|
21939
22039
|
client.planmigrations.list_migrations(
|
|
22040
|
+
feature_id: "feature_id",
|
|
21940
22041
|
plan_version_id: "plan_version_id",
|
|
21941
22042
|
status: "cancelled",
|
|
21942
22043
|
limit: 1000000,
|
|
@@ -21956,6 +22057,14 @@ client.planmigrations.list_migrations(
|
|
|
21956
22057
|
<dl>
|
|
21957
22058
|
<dd>
|
|
21958
22059
|
|
|
22060
|
+
**feature_id:** `String`
|
|
22061
|
+
|
|
22062
|
+
</dd>
|
|
22063
|
+
</dl>
|
|
22064
|
+
|
|
22065
|
+
<dl>
|
|
22066
|
+
<dd>
|
|
22067
|
+
|
|
21959
22068
|
**plan_version_id:** `String`
|
|
21960
22069
|
|
|
21961
22070
|
</dd>
|
|
@@ -22334,6 +22443,7 @@ client.planmigrations.retry_migration(
|
|
|
22334
22443
|
|
|
22335
22444
|
```ruby
|
|
22336
22445
|
client.planmigrations.count_migrations(
|
|
22446
|
+
feature_id: "feature_id",
|
|
22337
22447
|
plan_version_id: "plan_version_id",
|
|
22338
22448
|
status: "cancelled",
|
|
22339
22449
|
limit: 1000000,
|
|
@@ -22353,6 +22463,14 @@ client.planmigrations.count_migrations(
|
|
|
22353
22463
|
<dl>
|
|
22354
22464
|
<dd>
|
|
22355
22465
|
|
|
22466
|
+
**feature_id:** `String`
|
|
22467
|
+
|
|
22468
|
+
</dd>
|
|
22469
|
+
</dl>
|
|
22470
|
+
|
|
22471
|
+
<dl>
|
|
22472
|
+
<dd>
|
|
22473
|
+
|
|
22356
22474
|
**plan_version_id:** `String`
|
|
22357
22475
|
|
|
22358
22476
|
</dd>
|
data/scripts/e2e-pack.sh
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Builds and installs the schematichq gem from the working tree, for the SDK E2E
|
|
5
|
+
# harness running with SDK_SOURCE=pack.
|
|
6
|
+
#
|
|
7
|
+
# `local` mode loads the SDK straight from lib/ and so never exercises packaging:
|
|
8
|
+
# the gemspec file list, and the gitignored WASM binary that custom.gemspec.rb
|
|
9
|
+
# appends to it. This script builds the real gem, verifies the WASM binary is
|
|
10
|
+
# inside it, and installs it, so `ruby testapp/app.rb` resolves the installed gem
|
|
11
|
+
# the way an end user would. A gem that would be broken once published fails here
|
|
12
|
+
# instead.
|
|
13
|
+
#
|
|
14
|
+
# Usage (from anywhere):
|
|
15
|
+
# ./scripts/e2e-pack.sh
|
|
16
|
+
|
|
17
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
18
|
+
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
19
|
+
cd "$REPO_ROOT"
|
|
20
|
+
|
|
21
|
+
WASM_FILE="lib/schematic/wasm/rulesengine.wasm"
|
|
22
|
+
ARTIFACT_DIR="artifacts"
|
|
23
|
+
GEM_FILE="$ARTIFACT_DIR/schematichq-e2e.gem"
|
|
24
|
+
|
|
25
|
+
# --- WASM binary ---
|
|
26
|
+
|
|
27
|
+
if [ -f "$WASM_FILE" ]; then
|
|
28
|
+
echo "WASM binary already present at $WASM_FILE, skipping download."
|
|
29
|
+
else
|
|
30
|
+
echo "WASM binary missing at $WASM_FILE, downloading..."
|
|
31
|
+
./scripts/download-wasm.sh
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
if [ ! -f "$WASM_FILE" ]; then
|
|
35
|
+
echo "ERROR: $WASM_FILE still missing after ./scripts/download-wasm.sh"
|
|
36
|
+
exit 1
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# --- Build ---
|
|
40
|
+
|
|
41
|
+
mkdir -p "$ARTIFACT_DIR"
|
|
42
|
+
rm -f "$GEM_FILE"
|
|
43
|
+
echo "Building gem -> $GEM_FILE"
|
|
44
|
+
gem build schematic.gemspec -o "$GEM_FILE"
|
|
45
|
+
|
|
46
|
+
# --- Verify the WASM binary made it into the gem ---
|
|
47
|
+
#
|
|
48
|
+
# It is gitignored, so it is in the gem only because custom.gemspec.rb appends it.
|
|
49
|
+
# Without it the installed gem cannot run the rules engine.
|
|
50
|
+
|
|
51
|
+
echo "Verifying $GEM_FILE contains $WASM_FILE..."
|
|
52
|
+
GEM_CONTENTS="$(tar -xOf "$GEM_FILE" data.tar.gz | tar -tzf -)"
|
|
53
|
+
|
|
54
|
+
if ! printf '%s\n' "$GEM_CONTENTS" | grep -qF "$WASM_FILE"; then
|
|
55
|
+
echo "ERROR: $GEM_FILE does not contain $WASM_FILE."
|
|
56
|
+
echo "The published gem would be unable to load the rules engine."
|
|
57
|
+
echo "Check that custom.gemspec.rb still appends the binary, and that"
|
|
58
|
+
echo "$WASM_FILE exists when 'gem build' runs."
|
|
59
|
+
echo "Gem contents:"
|
|
60
|
+
printf '%s\n' "$GEM_CONTENTS"
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
echo "OK: $WASM_FILE is in the gem."
|
|
65
|
+
|
|
66
|
+
# --- Install ---
|
|
67
|
+
|
|
68
|
+
echo "Installing $GEM_FILE..."
|
|
69
|
+
gem install --local "$GEM_FILE"
|
|
70
|
+
|
|
71
|
+
echo "Installing test app dependencies..."
|
|
72
|
+
(cd testapp && bundle install)
|
|
73
|
+
|
|
74
|
+
echo "Done. Run the test app with: SDK_SOURCE=pack ruby testapp/app.rb"
|
data/testapp/app.rb
CHANGED
|
@@ -11,12 +11,18 @@
|
|
|
11
11
|
#
|
|
12
12
|
# SDK source is controlled by SDK_SOURCE env var:
|
|
13
13
|
# - "local" (default): loads from ../lib
|
|
14
|
+
# - "pack": requires the 'schematichq' gem built from this working tree and
|
|
15
|
+
# installed by ./scripts/e2e-pack.sh
|
|
14
16
|
# - "published": requires the 'schematichq' gem from RubyGems
|
|
15
17
|
#
|
|
16
18
|
# Usage:
|
|
17
19
|
# # Local build (default)
|
|
18
20
|
# ruby testapp/app.rb
|
|
19
21
|
#
|
|
22
|
+
# # Gem built from this working tree
|
|
23
|
+
# ./scripts/e2e-pack.sh
|
|
24
|
+
# SDK_SOURCE=pack ruby testapp/app.rb
|
|
25
|
+
#
|
|
20
26
|
# # Published version
|
|
21
27
|
# cd testapp && bundle install
|
|
22
28
|
# SDK_SOURCE=published ruby app.rb
|
|
@@ -28,7 +34,11 @@ require "redis"
|
|
|
28
34
|
|
|
29
35
|
# --- SDK Loading ---
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
# Only "local" (the default) loads the SDK from the working tree. "pack" and
|
|
38
|
+
# "published" must resolve the installed gem, the way an end user would.
|
|
39
|
+
sdk_source = ENV["SDK_SOURCE"].to_s
|
|
40
|
+
sdk_source = "local" if sdk_source.empty?
|
|
41
|
+
$LOAD_PATH.unshift(File.join(__dir__, "..", "lib")) if sdk_source == "local"
|
|
32
42
|
require "schematichq"
|
|
33
43
|
|
|
34
44
|
# --- Constants ---
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: schematichq
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Schematic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: wasmtime
|
|
@@ -716,6 +716,8 @@ files:
|
|
|
716
716
|
- lib/schematic/types/billing_customer_with_subscriptions_response_data.rb
|
|
717
717
|
- lib/schematic/types/billing_linked_resource_response_data.rb
|
|
718
718
|
- lib/schematic/types/billing_meter_response_data.rb
|
|
719
|
+
- lib/schematic/types/billing_plan_credit_grant_billing_mode.rb
|
|
720
|
+
- lib/schematic/types/billing_plan_credit_grant_price_tier_response_data.rb
|
|
719
721
|
- lib/schematic/types/billing_plan_credit_grant_reset_cadence.rb
|
|
720
722
|
- lib/schematic/types/billing_plan_credit_grant_reset_start.rb
|
|
721
723
|
- lib/schematic/types/billing_plan_credit_grant_reset_type.rb
|
|
@@ -847,11 +849,13 @@ files:
|
|
|
847
849
|
- lib/schematic/types/credit_event_type.rb
|
|
848
850
|
- lib/schematic/types/credit_grant_detail.rb
|
|
849
851
|
- lib/schematic/types/credit_grant_expiry_request_body.rb
|
|
852
|
+
- lib/schematic/types/credit_grant_price_tier_request_body.rb
|
|
850
853
|
- lib/schematic/types/credit_grant_sort_order.rb
|
|
851
854
|
- lib/schematic/types/credit_lease_response_data.rb
|
|
852
855
|
- lib/schematic/types/credit_reservation_response_data.rb
|
|
853
856
|
- lib/schematic/types/credit_spend_policy_response_data.rb
|
|
854
857
|
- lib/schematic/types/credit_spend_policy_scope.rb
|
|
858
|
+
- lib/schematic/types/credit_transfer_reason.rb
|
|
855
859
|
- lib/schematic/types/credit_transfer_response_data.rb
|
|
856
860
|
- lib/schematic/types/credit_transfer_view.rb
|
|
857
861
|
- lib/schematic/types/credit_trigger_config.rb
|
|
@@ -1175,6 +1179,7 @@ files:
|
|
|
1175
1179
|
- lib/schematichq.rb
|
|
1176
1180
|
- reference.md
|
|
1177
1181
|
- scripts/download-wasm.sh
|
|
1182
|
+
- scripts/e2e-pack.sh
|
|
1178
1183
|
- scripts/webhook_test_server.rb
|
|
1179
1184
|
- testapp/Gemfile
|
|
1180
1185
|
- testapp/app.rb
|