schematichq 1.4.17 → 1.5.0
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/.fernignore +1 -0
- data/CONTRIBUTING.md +2 -2
- data/README.md +23 -0
- data/WASM_VERSION +1 -1
- data/lib/schematic/accesstokens/client.rb +1 -1
- data/lib/schematic/accounts/client.rb +21 -21
- data/lib/schematic/billing/client.rb +26 -26
- data/lib/schematic/billing/types/create_billing_subscription_request_body.rb +2 -0
- data/lib/schematic/catalogs/client.rb +10 -10
- data/lib/schematic/checkout/client.rb +9 -9
- data/lib/schematic/client.rb +1 -1
- data/lib/schematic/companies/client.rb +43 -43
- data/lib/schematic/components/client.rb +8 -8
- data/lib/schematic/componentspublic/client.rb +1 -1
- data/lib/schematic/credits/client.rb +112 -47
- data/lib/schematic/credits/types/create_company_credit_grant.rb +2 -0
- data/lib/schematic/credits/types/release_credit_reservation_response.rb +13 -0
- data/lib/schematic/credits/types/reserve_credits_request_body.rb +19 -0
- data/lib/schematic/credits/types/reserve_credits_response.rb +13 -0
- data/lib/schematic/dataexports/client.rb +3 -3
- data/lib/schematic/datastream/client.rb +5 -2
- data/lib/schematic/datastream/websocket_client.rb +59 -1
- data/lib/schematic/entitlements/client.rb +25 -25
- data/lib/schematic/events/client.rb +9 -9
- data/lib/schematic/features/client.rb +57 -17
- data/lib/schematic/features/types/check_and_reserve_flag_request_body.rb +21 -0
- data/lib/schematic/features/types/check_and_reserve_flag_response.rb +13 -0
- data/lib/schematic/insights/client.rb +6 -6
- data/lib/schematic/integrationsapi/client.rb +14 -14
- data/lib/schematic/internal/multipart/multipart_form_data.rb +8 -3
- data/lib/schematic/internal/types/model.rb +14 -6
- data/lib/schematic/licenses/client.rb +3 -3
- data/lib/schematic/planbundle/client.rb +3 -3
- data/lib/schematic/plangroups/client.rb +3 -3
- data/lib/schematic/plangroups/types/create_plan_group_request_body.rb +2 -0
- data/lib/schematic/plangroups/types/update_plan_group_request_body.rb +2 -0
- data/lib/schematic/planmigrations/client.rb +11 -11
- data/lib/schematic/plans/client.rb +24 -18
- data/lib/schematic/plans/types/count_plans_params.rb +2 -0
- data/lib/schematic/plans/types/count_plans_request.rb +2 -0
- data/lib/schematic/plans/types/list_plans_params.rb +2 -0
- data/lib/schematic/plans/types/list_plans_request.rb +2 -0
- data/lib/schematic/scheduledcheckout/client.rb +4 -4
- data/lib/schematic/schematic_client.rb +4 -0
- data/lib/schematic/types/billing_arrears_anchor.rb +12 -0
- data/lib/schematic/types/billing_arrears_cadence.rb +12 -0
- data/lib/schematic/types/billing_credit_grant_response_data.rb +8 -0
- data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +12 -0
- data/lib/schematic/types/check_and_reserve_flag_response_data.rb +39 -0
- data/lib/schematic/types/checkout_data_response_data.rb +4 -0
- data/lib/schematic/types/company_plan_credit_grant_view.rb +12 -0
- data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +12 -0
- data/lib/schematic/types/credit_company_grant_view.rb +14 -0
- data/lib/schematic/types/credit_reservation_response_data.rb +25 -0
- data/lib/schematic/types/credit_usage_reason.rb +2 -0
- data/lib/schematic/types/event_body_track.rb +2 -0
- data/lib/schematic/types/event_detail_response_data.rb +2 -0
- data/lib/schematic/types/event_response_data.rb +2 -0
- data/lib/schematic/types/flag_check_reservation_response_data.rb +23 -0
- data/lib/schematic/types/get_onboarding_state_resp.rb +4 -0
- data/lib/schematic/types/issue_temporary_access_token_response_data.rb +3 -1
- data/lib/schematic/types/onboarding_requirement.rb +1 -0
- data/lib/schematic/types/onboarding_roadmap_view.rb +11 -0
- data/lib/schematic/types/plan_credit_grant_view.rb +12 -0
- data/lib/schematic/types/plan_group_detail_response_data.rb +2 -0
- data/lib/schematic/types/plan_group_response_data.rb +2 -0
- data/lib/schematic/types/rules_engine_schema_version.rb +1 -1
- data/lib/schematic/types/rulesengine_company.rb +2 -0
- data/lib/schematic/types/rulesengine_credit_postpaid_config.rb +9 -0
- data/lib/schematic/types/slack_connect_invite_status.rb +15 -0
- data/lib/schematic/types/slack_connect_invite_view.rb +15 -0
- data/lib/schematic/types/temporary_access_token_issuer_type.rb +12 -0
- data/lib/schematic/types/temporary_access_token_response_data.rb +3 -1
- data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +12 -0
- data/lib/schematic/types/webhook_event_detail_response_data.rb +2 -0
- data/lib/schematic/types/webhook_event_response_data.rb +2 -0
- data/lib/schematic/version.rb +1 -1
- data/lib/schematic/wasm/rulesengine.wasm +0 -0
- data/lib/schematic/webhooks/client.rb +10 -10
- data/lib/schematic.rb +15 -1
- data/reference.md +272 -15
- data/testapp/app.rb +8 -1
- metadata +17 -3
- data/lib/schematic/types/release_credit_lease_request_body.rb +0 -23
|
@@ -56,7 +56,7 @@ module Schematic
|
|
|
56
56
|
end
|
|
57
57
|
code = response.code.to_i
|
|
58
58
|
if code.between?(200, 299)
|
|
59
|
-
Schematic::Webhooks::Types::ListWebhookEventsResponse.load(response.body)
|
|
59
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::ListWebhookEventsResponse.load(response.body))
|
|
60
60
|
else
|
|
61
61
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
62
62
|
raise error_class.new(response.body, code: code)
|
|
@@ -91,7 +91,7 @@ module Schematic
|
|
|
91
91
|
end
|
|
92
92
|
code = response.code.to_i
|
|
93
93
|
if code.between?(200, 299)
|
|
94
|
-
Schematic::Webhooks::Types::GetWebhookEventResponse.load(response.body)
|
|
94
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::GetWebhookEventResponse.load(response.body))
|
|
95
95
|
else
|
|
96
96
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
97
97
|
raise error_class.new(response.body, code: code)
|
|
@@ -144,7 +144,7 @@ module Schematic
|
|
|
144
144
|
end
|
|
145
145
|
code = response.code.to_i
|
|
146
146
|
if code.between?(200, 299)
|
|
147
|
-
Schematic::Webhooks::Types::CountWebhookEventsResponse.load(response.body)
|
|
147
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::CountWebhookEventsResponse.load(response.body))
|
|
148
148
|
else
|
|
149
149
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
150
150
|
raise error_class.new(response.body, code: code)
|
|
@@ -191,7 +191,7 @@ module Schematic
|
|
|
191
191
|
end
|
|
192
192
|
code = response.code.to_i
|
|
193
193
|
if code.between?(200, 299)
|
|
194
|
-
Schematic::Webhooks::Types::ListWebhooksResponse.load(response.body)
|
|
194
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::ListWebhooksResponse.load(response.body))
|
|
195
195
|
else
|
|
196
196
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
197
197
|
raise error_class.new(response.body, code: code)
|
|
@@ -230,7 +230,7 @@ module Schematic
|
|
|
230
230
|
end
|
|
231
231
|
code = response.code.to_i
|
|
232
232
|
if code.between?(200, 299)
|
|
233
|
-
Schematic::Webhooks::Types::CreateWebhookResponse.load(response.body)
|
|
233
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::CreateWebhookResponse.load(response.body))
|
|
234
234
|
else
|
|
235
235
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
236
236
|
raise error_class.new(response.body, code: code)
|
|
@@ -265,7 +265,7 @@ module Schematic
|
|
|
265
265
|
end
|
|
266
266
|
code = response.code.to_i
|
|
267
267
|
if code.between?(200, 299)
|
|
268
|
-
Schematic::Webhooks::Types::GetWebhookResponse.load(response.body)
|
|
268
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::GetWebhookResponse.load(response.body))
|
|
269
269
|
else
|
|
270
270
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
271
271
|
raise error_class.new(response.body, code: code)
|
|
@@ -305,7 +305,7 @@ module Schematic
|
|
|
305
305
|
end
|
|
306
306
|
code = response.code.to_i
|
|
307
307
|
if code.between?(200, 299)
|
|
308
|
-
Schematic::Webhooks::Types::UpdateWebhookResponse.load(response.body)
|
|
308
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::UpdateWebhookResponse.load(response.body))
|
|
309
309
|
else
|
|
310
310
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
311
311
|
raise error_class.new(response.body, code: code)
|
|
@@ -340,7 +340,7 @@ module Schematic
|
|
|
340
340
|
end
|
|
341
341
|
code = response.code.to_i
|
|
342
342
|
if code.between?(200, 299)
|
|
343
|
-
Schematic::Webhooks::Types::DeleteWebhookResponse.load(response.body)
|
|
343
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::DeleteWebhookResponse.load(response.body))
|
|
344
344
|
else
|
|
345
345
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
346
346
|
raise error_class.new(response.body, code: code)
|
|
@@ -383,7 +383,7 @@ module Schematic
|
|
|
383
383
|
end
|
|
384
384
|
code = response.code.to_i
|
|
385
385
|
if code.between?(200, 299)
|
|
386
|
-
Schematic::Webhooks::Types::SendTestWebhookActionResponse.load(response.body)
|
|
386
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::SendTestWebhookActionResponse.load(response.body))
|
|
387
387
|
else
|
|
388
388
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
389
389
|
raise error_class.new(response.body, code: code)
|
|
@@ -430,7 +430,7 @@ module Schematic
|
|
|
430
430
|
end
|
|
431
431
|
code = response.code.to_i
|
|
432
432
|
if code.between?(200, 299)
|
|
433
|
-
Schematic::Webhooks::Types::CountWebhooksResponse.load(response.body)
|
|
433
|
+
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::CountWebhooksResponse.load(response.body))
|
|
434
434
|
else
|
|
435
435
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
436
436
|
raise error_class.new(response.body, code: code)
|
data/lib/schematic.rb
CHANGED
|
@@ -82,8 +82,11 @@ require_relative "schematic/types/onboarding_milestone_view"
|
|
|
82
82
|
require_relative "schematic/types/onboarding_path"
|
|
83
83
|
require_relative "schematic/types/onboarding_requirement_status"
|
|
84
84
|
require_relative "schematic/types/onboarding_requirement_view"
|
|
85
|
+
require_relative "schematic/types/onboarding_roadmap_view"
|
|
85
86
|
require_relative "schematic/types/onboarding_stripe_import"
|
|
86
87
|
require_relative "schematic/types/onboarding_track"
|
|
88
|
+
require_relative "schematic/types/slack_connect_invite_status"
|
|
89
|
+
require_relative "schematic/types/slack_connect_invite_view"
|
|
87
90
|
require_relative "schematic/types/get_onboarding_state_resp"
|
|
88
91
|
require_relative "schematic/accounts/types/get_onboarding_state_response"
|
|
89
92
|
require_relative "schematic/accounts/types/update_onboarding_state_response"
|
|
@@ -202,6 +205,8 @@ require_relative "schematic/credits/types/acquire_credit_lease_response"
|
|
|
202
205
|
require_relative "schematic/credits/types/extend_credit_lease_response"
|
|
203
206
|
require_relative "schematic/credits/types/release_credit_lease_response"
|
|
204
207
|
require_relative "schematic/credits/types/list_billing_plan_credit_grants_params"
|
|
208
|
+
require_relative "schematic/types/billing_arrears_anchor"
|
|
209
|
+
require_relative "schematic/types/billing_arrears_cadence"
|
|
205
210
|
require_relative "schematic/types/billing_credit_auto_topup_availability"
|
|
206
211
|
require_relative "schematic/types/billing_plan_credit_grant_reset_start"
|
|
207
212
|
require_relative "schematic/types/billing_plan_credit_grant_reset_type"
|
|
@@ -216,6 +221,9 @@ require_relative "schematic/credits/types/delete_billing_plan_credit_grant_param
|
|
|
216
221
|
require_relative "schematic/credits/types/delete_billing_plan_credit_grant_response"
|
|
217
222
|
require_relative "schematic/credits/types/count_billing_plan_credit_grants_params"
|
|
218
223
|
require_relative "schematic/credits/types/count_billing_plan_credit_grants_response"
|
|
224
|
+
require_relative "schematic/types/credit_reservation_response_data"
|
|
225
|
+
require_relative "schematic/credits/types/reserve_credits_response"
|
|
226
|
+
require_relative "schematic/credits/types/release_credit_reservation_response"
|
|
219
227
|
require_relative "schematic/types/credit_spend_policy_scope"
|
|
220
228
|
require_relative "schematic/credits/types/list_credit_spend_policies_params"
|
|
221
229
|
require_relative "schematic/types/credit_spend_policy_response_data"
|
|
@@ -614,6 +622,9 @@ require_relative "schematic/types/rules_detail_response_data"
|
|
|
614
622
|
require_relative "schematic/features/types/update_flag_rules_response"
|
|
615
623
|
require_relative "schematic/types/check_flag_response_data"
|
|
616
624
|
require_relative "schematic/features/types/check_flag_response"
|
|
625
|
+
require_relative "schematic/types/flag_check_reservation_response_data"
|
|
626
|
+
require_relative "schematic/types/check_and_reserve_flag_response_data"
|
|
627
|
+
require_relative "schematic/features/types/check_and_reserve_flag_response"
|
|
617
628
|
require_relative "schematic/types/company_credit_balance"
|
|
618
629
|
require_relative "schematic/types/datastream_company_plan"
|
|
619
630
|
require_relative "schematic/types/check_flags_response_data"
|
|
@@ -733,6 +744,7 @@ require_relative "schematic/scheduledcheckout/types/list_scheduled_checkouts_res
|
|
|
733
744
|
require_relative "schematic/scheduledcheckout/types/create_scheduled_checkout_response"
|
|
734
745
|
require_relative "schematic/scheduledcheckout/types/get_scheduled_checkout_response"
|
|
735
746
|
require_relative "schematic/scheduledcheckout/types/update_scheduled_checkout_response"
|
|
747
|
+
require_relative "schematic/types/temporary_access_token_issuer_type"
|
|
736
748
|
require_relative "schematic/types/temporary_access_token_resource_type"
|
|
737
749
|
require_relative "schematic/types/issue_temporary_access_token_response_data"
|
|
738
750
|
require_relative "schematic/accesstokens/types/issue_temporary_access_token_response"
|
|
@@ -841,7 +853,6 @@ require_relative "schematic/types/update_billing_plan_credit_grant_request_body"
|
|
|
841
853
|
require_relative "schematic/types/plan_bundle_credit_grant_request_body"
|
|
842
854
|
require_relative "schematic/types/plan_bundle_entitlement_request_body"
|
|
843
855
|
require_relative "schematic/types/plan_currency_price_request_body"
|
|
844
|
-
require_relative "schematic/types/release_credit_lease_request_body"
|
|
845
856
|
require_relative "schematic/types/rule_condition_group_response_data"
|
|
846
857
|
require_relative "schematic/types/rule_condition_response_data"
|
|
847
858
|
require_relative "schematic/types/rule_response_data"
|
|
@@ -860,6 +871,7 @@ require_relative "schematic/types/rulesengine_trait_definition_comparable_type"
|
|
|
860
871
|
require_relative "schematic/types/rulesengine_trait_definition"
|
|
861
872
|
require_relative "schematic/types/rulesengine_condition"
|
|
862
873
|
require_relative "schematic/types/rulesengine_condition_group"
|
|
874
|
+
require_relative "schematic/types/rulesengine_credit_postpaid_config"
|
|
863
875
|
require_relative "schematic/types/rulesengine_rule"
|
|
864
876
|
require_relative "schematic/types/rulesengine_subscription"
|
|
865
877
|
require_relative "schematic/types/rulesengine_trait"
|
|
@@ -940,6 +952,7 @@ require_relative "schematic/credits/types/extend_credit_lease_request_body"
|
|
|
940
952
|
require_relative "schematic/credits/types/list_billing_plan_credit_grants_request"
|
|
941
953
|
require_relative "schematic/credits/types/delete_billing_plan_credit_grant_request"
|
|
942
954
|
require_relative "schematic/credits/types/count_billing_plan_credit_grants_request"
|
|
955
|
+
require_relative "schematic/credits/types/reserve_credits_request_body"
|
|
943
956
|
require_relative "schematic/credits/types/list_credit_spend_policies_request"
|
|
944
957
|
require_relative "schematic/credits/types/create_credit_spend_policy_request_body"
|
|
945
958
|
require_relative "schematic/credits/types/update_credit_spend_policy_request_body"
|
|
@@ -1045,6 +1058,7 @@ require_relative "schematic/features/types/create_billing_linked_feature_request
|
|
|
1045
1058
|
require_relative "schematic/features/types/count_features_request"
|
|
1046
1059
|
require_relative "schematic/features/types/list_flags_request"
|
|
1047
1060
|
require_relative "schematic/features/types/update_flag_rules_request_body"
|
|
1061
|
+
require_relative "schematic/features/types/check_and_reserve_flag_request_body"
|
|
1048
1062
|
require_relative "schematic/features/types/check_flags_bulk_request_body"
|
|
1049
1063
|
require_relative "schematic/features/types/count_flags_request"
|
|
1050
1064
|
require_relative "schematic/insights/client"
|
data/reference.md
CHANGED
|
@@ -4174,6 +4174,14 @@ client.billing.upsert_billing_subscription(
|
|
|
4174
4174
|
<dl>
|
|
4175
4175
|
<dd>
|
|
4176
4176
|
|
|
4177
|
+
**started_at:** `String`
|
|
4178
|
+
|
|
4179
|
+
</dd>
|
|
4180
|
+
</dl>
|
|
4181
|
+
|
|
4182
|
+
<dl>
|
|
4183
|
+
<dd>
|
|
4184
|
+
|
|
4177
4185
|
**status:** `String`
|
|
4178
4186
|
|
|
4179
4187
|
</dd>
|
|
@@ -5493,6 +5501,14 @@ client.credits.grant_billing_credits_to_company(
|
|
|
5493
5501
|
<dl>
|
|
5494
5502
|
<dd>
|
|
5495
5503
|
|
|
5504
|
+
**credit_bundle_id:** `String`
|
|
5505
|
+
|
|
5506
|
+
</dd>
|
|
5507
|
+
</dl>
|
|
5508
|
+
|
|
5509
|
+
<dl>
|
|
5510
|
+
<dd>
|
|
5511
|
+
|
|
5496
5512
|
**credit_id:** `String`
|
|
5497
5513
|
|
|
5498
5514
|
</dd>
|
|
@@ -6054,7 +6070,7 @@ client.credits.extend_credit_lease(
|
|
|
6054
6070
|
</dl>
|
|
6055
6071
|
</details>
|
|
6056
6072
|
|
|
6057
|
-
<details><summary><code>client.credits.<a href="/lib/schematic/credits/client.rb">release_credit_lease</a>(lease_id
|
|
6073
|
+
<details><summary><code>client.credits.<a href="/lib/schematic/credits/client.rb">release_credit_lease</a>(lease_id:) -> Schematic::Credits::Types::ReleaseCreditLeaseResponse</code></summary>
|
|
6058
6074
|
<dl>
|
|
6059
6075
|
<dd>
|
|
6060
6076
|
|
|
@@ -6067,12 +6083,7 @@ client.credits.extend_credit_lease(
|
|
|
6067
6083
|
<dd>
|
|
6068
6084
|
|
|
6069
6085
|
```ruby
|
|
6070
|
-
client.credits.release_credit_lease(
|
|
6071
|
-
lease_id: "lease_id",
|
|
6072
|
-
request: {
|
|
6073
|
-
key: "value"
|
|
6074
|
-
}
|
|
6075
|
-
)
|
|
6086
|
+
client.credits.release_credit_lease(lease_id: "lease_id")
|
|
6076
6087
|
```
|
|
6077
6088
|
</dd>
|
|
6078
6089
|
</dl>
|
|
@@ -6095,14 +6106,6 @@ client.credits.release_credit_lease(
|
|
|
6095
6106
|
<dl>
|
|
6096
6107
|
<dd>
|
|
6097
6108
|
|
|
6098
|
-
**request:** `Internal::Types::Hash[String, Object]`
|
|
6099
|
-
|
|
6100
|
-
</dd>
|
|
6101
|
-
</dl>
|
|
6102
|
-
|
|
6103
|
-
<dl>
|
|
6104
|
-
<dd>
|
|
6105
|
-
|
|
6106
6109
|
**request_options:** `Schematic::Credits::RequestOptions`
|
|
6107
6110
|
|
|
6108
6111
|
</dd>
|
|
@@ -6558,6 +6561,138 @@ client.credits.count_billing_plan_credit_grants(
|
|
|
6558
6561
|
</dl>
|
|
6559
6562
|
|
|
6560
6563
|
|
|
6564
|
+
</dd>
|
|
6565
|
+
</dl>
|
|
6566
|
+
</details>
|
|
6567
|
+
|
|
6568
|
+
<details><summary><code>client.credits.<a href="/lib/schematic/credits/client.rb">reserve_credits</a>(request) -> Schematic::Credits::Types::ReserveCreditsResponse</code></summary>
|
|
6569
|
+
<dl>
|
|
6570
|
+
<dd>
|
|
6571
|
+
|
|
6572
|
+
#### 🔌 Usage
|
|
6573
|
+
|
|
6574
|
+
<dl>
|
|
6575
|
+
<dd>
|
|
6576
|
+
|
|
6577
|
+
<dl>
|
|
6578
|
+
<dd>
|
|
6579
|
+
|
|
6580
|
+
```ruby
|
|
6581
|
+
client.credits.reserve_credits(
|
|
6582
|
+
amount: 1.1,
|
|
6583
|
+
company_id: "company_id",
|
|
6584
|
+
credit_type_id: "credit_type_id"
|
|
6585
|
+
)
|
|
6586
|
+
```
|
|
6587
|
+
</dd>
|
|
6588
|
+
</dl>
|
|
6589
|
+
</dd>
|
|
6590
|
+
</dl>
|
|
6591
|
+
|
|
6592
|
+
#### ⚙️ Parameters
|
|
6593
|
+
|
|
6594
|
+
<dl>
|
|
6595
|
+
<dd>
|
|
6596
|
+
|
|
6597
|
+
<dl>
|
|
6598
|
+
<dd>
|
|
6599
|
+
|
|
6600
|
+
**amount:** `Integer` — Credits to hold for the operation. The full amount must be available; a partial hold is never taken
|
|
6601
|
+
|
|
6602
|
+
</dd>
|
|
6603
|
+
</dl>
|
|
6604
|
+
|
|
6605
|
+
<dl>
|
|
6606
|
+
<dd>
|
|
6607
|
+
|
|
6608
|
+
**company_id:** `String`
|
|
6609
|
+
|
|
6610
|
+
</dd>
|
|
6611
|
+
</dl>
|
|
6612
|
+
|
|
6613
|
+
<dl>
|
|
6614
|
+
<dd>
|
|
6615
|
+
|
|
6616
|
+
**credit_type_id:** `String`
|
|
6617
|
+
|
|
6618
|
+
</dd>
|
|
6619
|
+
</dl>
|
|
6620
|
+
|
|
6621
|
+
<dl>
|
|
6622
|
+
<dd>
|
|
6623
|
+
|
|
6624
|
+
**expires_at:** `String` — When the hold lapses if no track event settles it; defaults to one minute from now and may be at most one hour out. The unspent hold is refunded on expiry
|
|
6625
|
+
|
|
6626
|
+
</dd>
|
|
6627
|
+
</dl>
|
|
6628
|
+
|
|
6629
|
+
<dl>
|
|
6630
|
+
<dd>
|
|
6631
|
+
|
|
6632
|
+
**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
|
|
6633
|
+
|
|
6634
|
+
</dd>
|
|
6635
|
+
</dl>
|
|
6636
|
+
|
|
6637
|
+
<dl>
|
|
6638
|
+
<dd>
|
|
6639
|
+
|
|
6640
|
+
**request_options:** `Schematic::Credits::RequestOptions`
|
|
6641
|
+
|
|
6642
|
+
</dd>
|
|
6643
|
+
</dl>
|
|
6644
|
+
</dd>
|
|
6645
|
+
</dl>
|
|
6646
|
+
|
|
6647
|
+
|
|
6648
|
+
</dd>
|
|
6649
|
+
</dl>
|
|
6650
|
+
</details>
|
|
6651
|
+
|
|
6652
|
+
<details><summary><code>client.credits.<a href="/lib/schematic/credits/client.rb">release_credit_reservation</a>(reservation_id:) -> Schematic::Credits::Types::ReleaseCreditReservationResponse</code></summary>
|
|
6653
|
+
<dl>
|
|
6654
|
+
<dd>
|
|
6655
|
+
|
|
6656
|
+
#### 🔌 Usage
|
|
6657
|
+
|
|
6658
|
+
<dl>
|
|
6659
|
+
<dd>
|
|
6660
|
+
|
|
6661
|
+
<dl>
|
|
6662
|
+
<dd>
|
|
6663
|
+
|
|
6664
|
+
```ruby
|
|
6665
|
+
client.credits.release_credit_reservation(reservation_id: "reservation_id")
|
|
6666
|
+
```
|
|
6667
|
+
</dd>
|
|
6668
|
+
</dl>
|
|
6669
|
+
</dd>
|
|
6670
|
+
</dl>
|
|
6671
|
+
|
|
6672
|
+
#### ⚙️ Parameters
|
|
6673
|
+
|
|
6674
|
+
<dl>
|
|
6675
|
+
<dd>
|
|
6676
|
+
|
|
6677
|
+
<dl>
|
|
6678
|
+
<dd>
|
|
6679
|
+
|
|
6680
|
+
**reservation_id:** `String` — reservation_id
|
|
6681
|
+
|
|
6682
|
+
</dd>
|
|
6683
|
+
</dl>
|
|
6684
|
+
|
|
6685
|
+
<dl>
|
|
6686
|
+
<dd>
|
|
6687
|
+
|
|
6688
|
+
**request_options:** `Schematic::Credits::RequestOptions`
|
|
6689
|
+
|
|
6690
|
+
</dd>
|
|
6691
|
+
</dl>
|
|
6692
|
+
</dd>
|
|
6693
|
+
</dl>
|
|
6694
|
+
|
|
6695
|
+
|
|
6561
6696
|
</dd>
|
|
6562
6697
|
</dl>
|
|
6563
6698
|
</details>
|
|
@@ -15212,6 +15347,7 @@ client.plans.list_plans(
|
|
|
15212
15347
|
company_id: "company_id",
|
|
15213
15348
|
company_scoped_only: true,
|
|
15214
15349
|
exclude_company_scoped: true,
|
|
15350
|
+
exclude_unused: true,
|
|
15215
15351
|
for_fallback_plan: true,
|
|
15216
15352
|
for_initial_plan: true,
|
|
15217
15353
|
for_trial_expiry_plan: true,
|
|
@@ -15265,6 +15401,14 @@ client.plans.list_plans(
|
|
|
15265
15401
|
<dl>
|
|
15266
15402
|
<dd>
|
|
15267
15403
|
|
|
15404
|
+
**exclude_unused:** `Internal::Types::Boolean` — Exclude plans that nothing is using: no company is on the plan and it has no draft version
|
|
15405
|
+
|
|
15406
|
+
</dd>
|
|
15407
|
+
</dl>
|
|
15408
|
+
|
|
15409
|
+
<dl>
|
|
15410
|
+
<dd>
|
|
15411
|
+
|
|
15268
15412
|
**for_fallback_plan:** `Internal::Types::Boolean` — Filter for plans valid as fallback plans (not linked to billing)
|
|
15269
15413
|
|
|
15270
15414
|
</dd>
|
|
@@ -15938,6 +16082,7 @@ client.plans.count_plans(
|
|
|
15938
16082
|
company_id: "company_id",
|
|
15939
16083
|
company_scoped_only: true,
|
|
15940
16084
|
exclude_company_scoped: true,
|
|
16085
|
+
exclude_unused: true,
|
|
15941
16086
|
for_fallback_plan: true,
|
|
15942
16087
|
for_initial_plan: true,
|
|
15943
16088
|
for_trial_expiry_plan: true,
|
|
@@ -15991,6 +16136,14 @@ client.plans.count_plans(
|
|
|
15991
16136
|
<dl>
|
|
15992
16137
|
<dd>
|
|
15993
16138
|
|
|
16139
|
+
**exclude_unused:** `Internal::Types::Boolean` — Exclude plans that nothing is using: no company is on the plan and it has no draft version
|
|
16140
|
+
|
|
16141
|
+
</dd>
|
|
16142
|
+
</dl>
|
|
16143
|
+
|
|
16144
|
+
<dl>
|
|
16145
|
+
<dd>
|
|
16146
|
+
|
|
15994
16147
|
**for_fallback_plan:** `Internal::Types::Boolean` — Filter for plans valid as fallback plans (not linked to billing)
|
|
15995
16148
|
|
|
15996
16149
|
</dd>
|
|
@@ -19142,6 +19295,94 @@ client.features.check_flag(key: "key")
|
|
|
19142
19295
|
</dl>
|
|
19143
19296
|
|
|
19144
19297
|
|
|
19298
|
+
</dd>
|
|
19299
|
+
</dl>
|
|
19300
|
+
</details>
|
|
19301
|
+
|
|
19302
|
+
<details><summary><code>client.features.<a href="/lib/schematic/features/client.rb">check_and_reserve_flag</a>(key:, request) -> Schematic::Features::Types::CheckAndReserveFlagResponse</code></summary>
|
|
19303
|
+
<dl>
|
|
19304
|
+
<dd>
|
|
19305
|
+
|
|
19306
|
+
#### 🔌 Usage
|
|
19307
|
+
|
|
19308
|
+
<dl>
|
|
19309
|
+
<dd>
|
|
19310
|
+
|
|
19311
|
+
<dl>
|
|
19312
|
+
<dd>
|
|
19313
|
+
|
|
19314
|
+
```ruby
|
|
19315
|
+
client.features.check_and_reserve_flag(key: "key")
|
|
19316
|
+
```
|
|
19317
|
+
</dd>
|
|
19318
|
+
</dl>
|
|
19319
|
+
</dd>
|
|
19320
|
+
</dl>
|
|
19321
|
+
|
|
19322
|
+
#### ⚙️ Parameters
|
|
19323
|
+
|
|
19324
|
+
<dl>
|
|
19325
|
+
<dd>
|
|
19326
|
+
|
|
19327
|
+
<dl>
|
|
19328
|
+
<dd>
|
|
19329
|
+
|
|
19330
|
+
**key:** `String` — key
|
|
19331
|
+
|
|
19332
|
+
</dd>
|
|
19333
|
+
</dl>
|
|
19334
|
+
|
|
19335
|
+
<dl>
|
|
19336
|
+
<dd>
|
|
19337
|
+
|
|
19338
|
+
**company:** `Internal::Types::Hash[String, String]`
|
|
19339
|
+
|
|
19340
|
+
</dd>
|
|
19341
|
+
</dl>
|
|
19342
|
+
|
|
19343
|
+
<dl>
|
|
19344
|
+
<dd>
|
|
19345
|
+
|
|
19346
|
+
**expires_at:** `String` — When the hold lapses if no track event settles it; defaults to one minute from now and may be at most one hour out. The unspent hold is refunded on expiry
|
|
19347
|
+
|
|
19348
|
+
</dd>
|
|
19349
|
+
</dl>
|
|
19350
|
+
|
|
19351
|
+
<dl>
|
|
19352
|
+
<dd>
|
|
19353
|
+
|
|
19354
|
+
**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 quantity times the entitlement's consumption rate
|
|
19355
|
+
|
|
19356
|
+
</dd>
|
|
19357
|
+
</dl>
|
|
19358
|
+
|
|
19359
|
+
<dl>
|
|
19360
|
+
<dd>
|
|
19361
|
+
|
|
19362
|
+
**quantity:** `Integer` — Units of the feature the operation will consume; defaults to 1. Sets the hold size together with the entitlement's consumption rate, and is echoed back on the reservation for the settling track event
|
|
19363
|
+
|
|
19364
|
+
</dd>
|
|
19365
|
+
</dl>
|
|
19366
|
+
|
|
19367
|
+
<dl>
|
|
19368
|
+
<dd>
|
|
19369
|
+
|
|
19370
|
+
**user:** `Internal::Types::Hash[String, String]`
|
|
19371
|
+
|
|
19372
|
+
</dd>
|
|
19373
|
+
</dl>
|
|
19374
|
+
|
|
19375
|
+
<dl>
|
|
19376
|
+
<dd>
|
|
19377
|
+
|
|
19378
|
+
**request_options:** `Schematic::Features::RequestOptions`
|
|
19379
|
+
|
|
19380
|
+
</dd>
|
|
19381
|
+
</dl>
|
|
19382
|
+
</dd>
|
|
19383
|
+
</dl>
|
|
19384
|
+
|
|
19385
|
+
|
|
19145
19386
|
</dd>
|
|
19146
19387
|
</dl>
|
|
19147
19388
|
</details>
|
|
@@ -21029,6 +21270,14 @@ client.plangroups.create_plan_group(
|
|
|
21029
21270
|
<dl>
|
|
21030
21271
|
<dd>
|
|
21031
21272
|
|
|
21273
|
+
**trial_eligibility_per_plan:** `Internal::Types::Boolean`
|
|
21274
|
+
|
|
21275
|
+
</dd>
|
|
21276
|
+
</dl>
|
|
21277
|
+
|
|
21278
|
+
<dl>
|
|
21279
|
+
<dd>
|
|
21280
|
+
|
|
21032
21281
|
**trial_expiry_plan_id:** `String`
|
|
21033
21282
|
|
|
21034
21283
|
</dd>
|
|
@@ -21409,6 +21658,14 @@ client.plangroups.update_plan_group(
|
|
|
21409
21658
|
<dl>
|
|
21410
21659
|
<dd>
|
|
21411
21660
|
|
|
21661
|
+
**trial_eligibility_per_plan:** `Internal::Types::Boolean`
|
|
21662
|
+
|
|
21663
|
+
</dd>
|
|
21664
|
+
</dl>
|
|
21665
|
+
|
|
21666
|
+
<dl>
|
|
21667
|
+
<dd>
|
|
21668
|
+
|
|
21412
21669
|
**trial_expiry_plan_id:** `String`
|
|
21413
21670
|
|
|
21414
21671
|
</dd>
|
data/testapp/app.rb
CHANGED
|
@@ -95,9 +95,15 @@ def handle_configure(request, response)
|
|
|
95
95
|
# Build Redis client if needed (shared between cache and DataStream/replicator)
|
|
96
96
|
redis_client = config["redisUrl"] ? Redis.new(url: config["redisUrl"]) : nil
|
|
97
97
|
|
|
98
|
+
# Optional Redis key prefix, as a README-following user would set it. In
|
|
99
|
+
# replicator mode it must match the keys the replicator writes ("schematic:").
|
|
100
|
+
redis_key_prefix = config["redisKeyPrefix"]
|
|
101
|
+
redis_provider_opts = { client: redis_client, ttl: CACHE_TTL }
|
|
102
|
+
redis_provider_opts[:key_prefix] = redis_key_prefix if redis_key_prefix
|
|
103
|
+
|
|
98
104
|
# Cache provider: explicit Redis, disabled, or SDK defaults
|
|
99
105
|
cache_providers = if redis_client
|
|
100
|
-
[Schematic::RedisCacheProvider.new(
|
|
106
|
+
[Schematic::RedisCacheProvider.new(**redis_provider_opts)]
|
|
101
107
|
elsif config["noCache"]
|
|
102
108
|
[]
|
|
103
109
|
else
|
|
@@ -120,6 +126,7 @@ def handle_configure(request, response)
|
|
|
120
126
|
# (track -> update_company_metrics) would expire them.
|
|
121
127
|
datastream_opts = {}
|
|
122
128
|
datastream_opts[:redis_client] = redis_client if redis_client
|
|
129
|
+
datastream_opts[:redis_key_prefix] = redis_key_prefix if redis_key_prefix
|
|
123
130
|
|
|
124
131
|
if config["replicatorUrl"]
|
|
125
132
|
datastream_opts[:replicator_mode] = true
|
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.
|
|
4
|
+
version: 1.5.0
|
|
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-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: wasmtime
|
|
@@ -372,6 +372,9 @@ files:
|
|
|
372
372
|
- lib/schematic/credits/types/list_grants_for_credit_request.rb
|
|
373
373
|
- lib/schematic/credits/types/list_grants_for_credit_response.rb
|
|
374
374
|
- lib/schematic/credits/types/release_credit_lease_response.rb
|
|
375
|
+
- lib/schematic/credits/types/release_credit_reservation_response.rb
|
|
376
|
+
- lib/schematic/credits/types/reserve_credits_request_body.rb
|
|
377
|
+
- lib/schematic/credits/types/reserve_credits_response.rb
|
|
375
378
|
- lib/schematic/credits/types/soft_delete_billing_credit_response.rb
|
|
376
379
|
- lib/schematic/credits/types/update_billing_credit_request_body.rb
|
|
377
380
|
- lib/schematic/credits/types/update_billing_credit_response.rb
|
|
@@ -480,6 +483,8 @@ files:
|
|
|
480
483
|
- lib/schematic/events/types/upsert_otlp_environment_settings_request_body.rb
|
|
481
484
|
- lib/schematic/events/types/upsert_otlp_environment_settings_response.rb
|
|
482
485
|
- lib/schematic/features/client.rb
|
|
486
|
+
- lib/schematic/features/types/check_and_reserve_flag_request_body.rb
|
|
487
|
+
- lib/schematic/features/types/check_and_reserve_flag_response.rb
|
|
483
488
|
- lib/schematic/features/types/check_flag_response.rb
|
|
484
489
|
- lib/schematic/features/types/check_flags_bulk_request_body.rb
|
|
485
490
|
- lib/schematic/features/types/check_flags_bulk_response.rb
|
|
@@ -686,6 +691,8 @@ files:
|
|
|
686
691
|
- lib/schematic/types/audit_log_export_metadata.rb
|
|
687
692
|
- lib/schematic/types/audit_log_list_response_data.rb
|
|
688
693
|
- lib/schematic/types/audit_log_response_data.rb
|
|
694
|
+
- lib/schematic/types/billing_arrears_anchor.rb
|
|
695
|
+
- lib/schematic/types/billing_arrears_cadence.rb
|
|
689
696
|
- lib/schematic/types/billing_collection_method.rb
|
|
690
697
|
- lib/schematic/types/billing_coupon_response_data.rb
|
|
691
698
|
- lib/schematic/types/billing_credit_auto_topup_availability.rb
|
|
@@ -751,6 +758,7 @@ files:
|
|
|
751
758
|
- lib/schematic/types/change_subscription_internal_request_body.rb
|
|
752
759
|
- lib/schematic/types/change_subscription_request_body.rb
|
|
753
760
|
- lib/schematic/types/charge_type.rb
|
|
761
|
+
- lib/schematic/types/check_and_reserve_flag_response_data.rb
|
|
754
762
|
- lib/schematic/types/check_flag_request_body.rb
|
|
755
763
|
- lib/schematic/types/check_flag_response_data.rb
|
|
756
764
|
- lib/schematic/types/check_flags_bulk_response_data.rb
|
|
@@ -841,6 +849,7 @@ files:
|
|
|
841
849
|
- lib/schematic/types/credit_grant_expiry_request_body.rb
|
|
842
850
|
- lib/schematic/types/credit_grant_sort_order.rb
|
|
843
851
|
- lib/schematic/types/credit_lease_response_data.rb
|
|
852
|
+
- lib/schematic/types/credit_reservation_response_data.rb
|
|
844
853
|
- lib/schematic/types/credit_spend_policy_response_data.rb
|
|
845
854
|
- lib/schematic/types/credit_spend_policy_scope.rb
|
|
846
855
|
- lib/schematic/types/credit_transfer_response_data.rb
|
|
@@ -923,6 +932,7 @@ files:
|
|
|
923
932
|
- lib/schematic/types/feature_usage_response_data.rb
|
|
924
933
|
- lib/schematic/types/feature_usage_time_series_response_data.rb
|
|
925
934
|
- lib/schematic/types/feature_view.rb
|
|
935
|
+
- lib/schematic/types/flag_check_reservation_response_data.rb
|
|
926
936
|
- lib/schematic/types/flag_detail_response_data.rb
|
|
927
937
|
- lib/schematic/types/flag_in_plan_response_data.rb
|
|
928
938
|
- lib/schematic/types/flag_response_data.rb
|
|
@@ -967,6 +977,7 @@ files:
|
|
|
967
977
|
- lib/schematic/types/onboarding_requirement.rb
|
|
968
978
|
- lib/schematic/types/onboarding_requirement_status.rb
|
|
969
979
|
- lib/schematic/types/onboarding_requirement_view.rb
|
|
980
|
+
- lib/schematic/types/onboarding_roadmap_view.rb
|
|
970
981
|
- lib/schematic/types/onboarding_stripe_import.rb
|
|
971
982
|
- lib/schematic/types/onboarding_track.rb
|
|
972
983
|
- lib/schematic/types/orb_integration_config.rb
|
|
@@ -1031,7 +1042,6 @@ files:
|
|
|
1031
1042
|
- lib/schematic/types/quickstart_resp.rb
|
|
1032
1043
|
- lib/schematic/types/raw_event_batch_response_data.rb
|
|
1033
1044
|
- lib/schematic/types/raw_event_response_data.rb
|
|
1034
|
-
- lib/schematic/types/release_credit_lease_request_body.rb
|
|
1035
1045
|
- lib/schematic/types/rule.rb
|
|
1036
1046
|
- lib/schematic/types/rule_condition_detail_response_data.rb
|
|
1037
1047
|
- lib/schematic/types/rule_condition_group_detail_response_data.rb
|
|
@@ -1050,6 +1060,7 @@ files:
|
|
|
1050
1060
|
- lib/schematic/types/rulesengine_condition.rb
|
|
1051
1061
|
- lib/schematic/types/rulesengine_condition_group.rb
|
|
1052
1062
|
- lib/schematic/types/rulesengine_condition_type.rb
|
|
1063
|
+
- lib/schematic/types/rulesengine_credit_postpaid_config.rb
|
|
1053
1064
|
- lib/schematic/types/rulesengine_entitlement_value_type.rb
|
|
1054
1065
|
- lib/schematic/types/rulesengine_entity_type.rb
|
|
1055
1066
|
- lib/schematic/types/rulesengine_feature_entitlement.rb
|
|
@@ -1071,6 +1082,8 @@ files:
|
|
|
1071
1082
|
- lib/schematic/types/segment_status_resp.rb
|
|
1072
1083
|
- lib/schematic/types/skipped_entitlement_error_response_data.rb
|
|
1073
1084
|
- lib/schematic/types/skipped_entitlement_response_data.rb
|
|
1085
|
+
- lib/schematic/types/slack_connect_invite_status.rb
|
|
1086
|
+
- lib/schematic/types/slack_connect_invite_view.rb
|
|
1074
1087
|
- lib/schematic/types/sort_direction.rb
|
|
1075
1088
|
- lib/schematic/types/stripe_embed_info.rb
|
|
1076
1089
|
- lib/schematic/types/stripe_integration_config.rb
|
|
@@ -1083,6 +1096,7 @@ files:
|
|
|
1083
1096
|
- lib/schematic/types/subscription_type.rb
|
|
1084
1097
|
- lib/schematic/types/tax_id_input.rb
|
|
1085
1098
|
- lib/schematic/types/tax_id_type.rb
|
|
1099
|
+
- lib/schematic/types/temporary_access_token_issuer_type.rb
|
|
1086
1100
|
- lib/schematic/types/temporary_access_token_resource_type.rb
|
|
1087
1101
|
- lib/schematic/types/temporary_access_token_response_data.rb
|
|
1088
1102
|
- lib/schematic/types/test_webhook_response_data.rb
|