schematichq 1.5.0 → 1.5.2

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/.fern/replay.lock +21 -3
  4. data/WASM_VERSION +1 -1
  5. data/lib/schematic/billing/types/create_invoice_request_body.rb +2 -0
  6. data/lib/schematic/client.rb +1 -1
  7. data/lib/schematic/credits/types/extend_credit_lease_request_body.rb +2 -0
  8. data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +4 -0
  9. data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +4 -0
  10. data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +4 -0
  11. data/lib/schematic/errors/server_error.rb +1 -1
  12. data/lib/schematic/features/types/check_and_reserve_flag_request_body.rb +2 -0
  13. data/lib/schematic/planmigrations/client.rb +8 -2
  14. data/lib/schematic/planmigrations/types/count_migrations_params.rb +2 -0
  15. data/lib/schematic/planmigrations/types/count_migrations_request.rb +3 -1
  16. data/lib/schematic/planmigrations/types/list_migrations_params.rb +2 -0
  17. data/lib/schematic/planmigrations/types/list_migrations_request.rb +3 -1
  18. data/lib/schematic/plans/client.rb +12 -0
  19. data/lib/schematic/plans/types/count_plans_params.rb +4 -0
  20. data/lib/schematic/plans/types/count_plans_request.rb +4 -0
  21. data/lib/schematic/plans/types/list_plans_params.rb +4 -0
  22. data/lib/schematic/plans/types/list_plans_request.rb +4 -0
  23. data/lib/schematic/types/billing_arrears_cadence.rb +1 -0
  24. data/lib/schematic/types/billing_credit_grant_reason.rb +3 -0
  25. data/lib/schematic/types/billing_credit_response_data.rb +2 -0
  26. data/lib/schematic/types/billing_plan_credit_grant_billing_mode.rb +12 -0
  27. data/lib/schematic/types/billing_plan_credit_grant_price_tier_response_data.rb +15 -0
  28. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +12 -0
  29. data/lib/schematic/types/change_subscription_internal_request_body.rb +2 -0
  30. data/lib/schematic/types/change_subscription_request_body.rb +2 -0
  31. data/lib/schematic/types/company_feature_usage_export_metadata_visible_columns_item.rb +1 -0
  32. data/lib/schematic/types/company_plan_credit_grant_view.rb +6 -0
  33. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +10 -0
  34. data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +4 -0
  35. data/lib/schematic/types/credit_event_ledger_response_data.rb +4 -0
  36. data/lib/schematic/types/credit_grant_price_tier_request_body.rb +13 -0
  37. data/lib/schematic/types/credit_transfer_reason.rb +14 -0
  38. data/lib/schematic/types/invoice_request_body.rb +2 -0
  39. data/lib/schematic/types/invoice_response_data.rb +2 -0
  40. data/lib/schematic/types/manage_plan_request.rb +2 -0
  41. data/lib/schematic/types/plan_credit_grant_view.rb +6 -0
  42. data/lib/schematic/types/plan_entitlement_response_data.rb +4 -0
  43. data/lib/schematic/types/plan_version_migration_response_data.rb +4 -0
  44. data/lib/schematic/types/preview_subscription_finance_response_data.rb +2 -0
  45. data/lib/schematic/types/rulesengine_comparable_operator.rb +18 -0
  46. data/lib/schematic/types/rulesengine_condition.rb +1 -1
  47. data/lib/schematic/types/upcoming_invoice_response_data.rb +2 -0
  48. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +10 -0
  49. data/lib/schematic/types/usage_based_entitlement_request_body.rb +4 -0
  50. data/lib/schematic/version.rb +1 -1
  51. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  52. data/lib/schematic.rb +6 -1
  53. data/reference.md +133 -7
  54. data/scripts/e2e-pack.sh +74 -0
  55. data/testapp/app.rb +11 -1
  56. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 387b9e1797224dd91fe745e03f2bb53c108b3cbd2745f34f6a86d1749d6dccf4
4
- data.tar.gz: b3f58bff3d0c385c1262223ed5468cdcf60c57c0dd49b4f47569f916b970daf8
3
+ metadata.gz: d5f68b11540e455fec79249c0a3e8a6bca7279e00ae3192f855e424eba9314c9
4
+ data.tar.gz: 732ed6c93fc15dd15b453fb4b873c4f1c252db187a750e6a633a76c6088feefa
5
5
  SHA512:
6
- metadata.gz: 6877feadf2c653609d7efd24cb20ec4a56fccbf6814b6fb60fce63b506d07bcf3ee1c98db9763810f2b0332fb41b281d55026bf055772ad93f98a95b14fb7bad
7
- data.tar.gz: f5d4e167928b54798817bc7ab627da15b2ef4e0ef44550568d82c4b2fb8dd47836f3be540f9688ea98fd8e0fca2f222083f5e9c89a590e8cf3679845420a59c8
6
+ metadata.gz: 8a3063e0d0d534c99d77b4cbc98272953ccbc04292f67768e7323d99faeaddc69f520ac91922c7c9d695fdb2b4240643213ecbdbe75d03a249871385e7ec5386
7
+ data.tar.gz: 67d03301abfdbb17162052217094762e656afee2b0f2e4ed32244858f17f5a807c62a866281de236776d53838e40bc08fa1537cbb3794f0e4c7d081d2de0e12b
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.24.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": "96570a6bf7ba01ea0851f22f559b8c62c1c9b5d4",
16
+ "originGitCommit": "4ca95f7ba356ea2c3b42db5e3e78c064477b3a8d",
17
17
  "originGitCommitIsDirty": false,
18
18
  "invokedBy": "ci",
19
- "requestedVersion": "1.5.0",
19
+ "requestedVersion": "1.5.2",
20
20
  "ciProvider": "github",
21
- "sdkVersion": "1.5.0"
21
+ "sdkVersion": "1.5.2"
22
22
  }
data/.fern/replay.lock CHANGED
@@ -96,14 +96,32 @@ generations:
96
96
  cli_version: unknown
97
97
  generator_versions:
98
98
  fernapi/fern-ruby-sdk: 1.24.1
99
- current_generation: d05fffcdc7a4621681b02daf3eac12c13724b8cf
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
+ - commit_sha: ec0eabecc3325dfe0a69590f9a2f4e52c3c18ade
112
+ tree_hash: 10ac19e0d7c216b0cf04c6620979634798d2ca8a
113
+ timestamp: 2026-09-28T10:03:35.278Z
114
+ cli_version: unknown
115
+ generator_versions:
116
+ fernapi/fern-ruby-sdk: 1.25.0
117
+ current_generation: ec0eabecc3325dfe0a69590f9a2f4e52c3c18ade
100
118
  patches:
101
119
  - id: patch-5da692c2
102
120
  content_hash: sha256:e652287219a0a709e16112ced444e6472c6fa8bdfe888edf868caaf9769a9472
103
121
  original_commit: 5da692c20aef08577d900f9a860b5f78a549418e
104
122
  original_message: inject host time into datastream wasm rules engine (SCHY-471)
105
123
  original_author: Christopher Brady <chris@schematichq.com>
106
- base_generation: d05fffcdc7a4621681b02daf3eac12c13724b8cf
124
+ base_generation: ec0eabecc3325dfe0a69590f9a2f4e52c3c18ade
107
125
  files:
108
126
  - test/rules_engine_clock_test.rb
109
127
  patch_content: |
@@ -271,7 +289,7 @@ patches:
271
289
  original_commit: ee61788c5a83fce5dd5768b2536391459550d176
272
290
  original_message: fix rubocop offenses in clock regression test (SCHY-471)
273
291
  original_author: Christopher Brady <chris@schematichq.com>
274
- base_generation: d05fffcdc7a4621681b02daf3eac12c13724b8cf
292
+ base_generation: ec0eabecc3325dfe0a69590f9a2f4e52c3c18ade
275
293
  files:
276
294
  - test/rules_engine_clock_test.rb
277
295
  patch_content: |
data/WASM_VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.4
1
+ 0.9.0
@@ -32,6 +32,8 @@ module Schematic
32
32
 
33
33
  field :subtotal, -> { Integer }, optional: false, nullable: false
34
34
 
35
+ field :total, -> { Integer }, optional: true, nullable: false
36
+
35
37
  field :url, -> { String }, optional: true, nullable: false
36
38
  end
37
39
  end
@@ -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.0",
45
+ "User-Agent" => "schematichq/1.5.2",
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
@@ -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
@@ -5,7 +5,7 @@ module Schematic
5
5
  class ServerError < ResponseError
6
6
  end
7
7
 
8
- class ServiceUnavailableError < ApiError
8
+ class ServiceUnavailableError < ResponseError
9
9
  end
10
10
  end
11
11
  end
@@ -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] :plan_version_id
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] :plan_version_id
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 :plan_version_id, -> { String }, optional: false, nullable: false
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 :plan_version_id, -> { String }, optional: false, nullable: false
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
@@ -7,6 +7,7 @@ module Schematic
7
7
 
8
8
  END_OF_BILLING_PERIOD = "end_of_billing_period"
9
9
  MONTHLY = "monthly"
10
+ QUARTERLY = "quarterly"
10
11
  end
11
12
  end
12
13
  end
@@ -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,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module BillingPlanCreditGrantBillingMode
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ GRANTED = "granted"
9
+ BILLED = "billed"
10
+ end
11
+ end
12
+ end
@@ -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
@@ -15,6 +15,8 @@ module Schematic
15
15
 
16
16
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false
17
17
 
18
+ field :currency, -> { String }, optional: true, nullable: false
19
+
18
20
  field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false
19
21
 
20
22
  field :new_plan_id, -> { String }, optional: false, nullable: false
@@ -13,6 +13,8 @@ module Schematic
13
13
 
14
14
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false
15
15
 
16
+ field :currency, -> { String }, optional: true, nullable: false
17
+
16
18
  field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false
17
19
 
18
20
  field :new_plan_id, -> { String }, optional: false, nullable: false
@@ -9,6 +9,7 @@ module Schematic
9
9
  SUBSCRIPTION = "subscription"
10
10
  USERS = "users"
11
11
  LAST_SEEN_AT = "last_seen_at"
12
+ CREATED_AT = "created_at"
12
13
  end
13
14
  end
14
15
  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,10 +61,14 @@ 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
67
69
 
70
+ field :user_id, -> { String }, optional: true, nullable: false
71
+
68
72
  field :zeroed_out_reason, -> { Schematic::Types::BillingCreditGrantZeroedOutReason }, optional: true, nullable: false
69
73
  end
70
74
  end
@@ -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
@@ -29,6 +29,8 @@ module Schematic
29
29
 
30
30
  field :subtotal, -> { Integer }, optional: false, nullable: false
31
31
 
32
+ field :total, -> { Integer }, optional: true, nullable: false
33
+
32
34
  field :url, -> { String }, optional: true, nullable: false
33
35
  end
34
36
  end
@@ -41,6 +41,8 @@ module Schematic
41
41
 
42
42
  field :subtotal, -> { Integer }, optional: false, nullable: false
43
43
 
44
+ field :total, -> { Integer }, optional: true, nullable: false
45
+
44
46
  field :updated_at, -> { String }, optional: false, nullable: false
45
47
 
46
48
  field :url, -> { String }, optional: true, nullable: false
@@ -29,6 +29,8 @@ module Schematic
29
29
 
30
30
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false
31
31
 
32
+ field :currency, -> { String }, optional: true, nullable: false
33
+
32
34
  field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false
33
35
 
34
36
  field :days_until_due, -> { Integer }, optional: true, nullable: false