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
|
@@ -68,7 +68,7 @@ module Schematic
|
|
|
68
68
|
end
|
|
69
69
|
code = response.code.to_i
|
|
70
70
|
if code.between?(200, 299)
|
|
71
|
-
Schematic::Entitlements::Types::ListCompanyOverridesResponse.load(response.body)
|
|
71
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::ListCompanyOverridesResponse.load(response.body))
|
|
72
72
|
else
|
|
73
73
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
74
74
|
raise error_class.new(response.body, code: code)
|
|
@@ -107,7 +107,7 @@ module Schematic
|
|
|
107
107
|
end
|
|
108
108
|
code = response.code.to_i
|
|
109
109
|
if code.between?(200, 299)
|
|
110
|
-
Schematic::Entitlements::Types::CreateCompanyOverrideResponse.load(response.body)
|
|
110
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::CreateCompanyOverrideResponse.load(response.body))
|
|
111
111
|
else
|
|
112
112
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
113
113
|
raise error_class.new(response.body, code: code)
|
|
@@ -142,7 +142,7 @@ module Schematic
|
|
|
142
142
|
end
|
|
143
143
|
code = response.code.to_i
|
|
144
144
|
if code.between?(200, 299)
|
|
145
|
-
Schematic::Entitlements::Types::GetCompanyOverrideResponse.load(response.body)
|
|
145
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::GetCompanyOverrideResponse.load(response.body))
|
|
146
146
|
else
|
|
147
147
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
148
148
|
raise error_class.new(response.body, code: code)
|
|
@@ -185,7 +185,7 @@ module Schematic
|
|
|
185
185
|
end
|
|
186
186
|
code = response.code.to_i
|
|
187
187
|
if code.between?(200, 299)
|
|
188
|
-
Schematic::Entitlements::Types::UpdateCompanyOverrideResponse.load(response.body)
|
|
188
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::UpdateCompanyOverrideResponse.load(response.body))
|
|
189
189
|
else
|
|
190
190
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
191
191
|
raise error_class.new(response.body, code: code)
|
|
@@ -220,7 +220,7 @@ module Schematic
|
|
|
220
220
|
end
|
|
221
221
|
code = response.code.to_i
|
|
222
222
|
if code.between?(200, 299)
|
|
223
|
-
Schematic::Entitlements::Types::DeleteCompanyOverrideResponse.load(response.body)
|
|
223
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::DeleteCompanyOverrideResponse.load(response.body))
|
|
224
224
|
else
|
|
225
225
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
226
226
|
raise error_class.new(response.body, code: code)
|
|
@@ -285,7 +285,7 @@ module Schematic
|
|
|
285
285
|
end
|
|
286
286
|
code = response.code.to_i
|
|
287
287
|
if code.between?(200, 299)
|
|
288
|
-
Schematic::Entitlements::Types::CountCompanyOverridesResponse.load(response.body)
|
|
288
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::CountCompanyOverridesResponse.load(response.body))
|
|
289
289
|
else
|
|
290
290
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
291
291
|
raise error_class.new(response.body, code: code)
|
|
@@ -335,7 +335,7 @@ module Schematic
|
|
|
335
335
|
end
|
|
336
336
|
code = response.code.to_i
|
|
337
337
|
if code.between?(200, 299)
|
|
338
|
-
Schematic::Entitlements::Types::ListFeatureCompaniesResponse.load(response.body)
|
|
338
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::ListFeatureCompaniesResponse.load(response.body))
|
|
339
339
|
else
|
|
340
340
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
341
341
|
raise error_class.new(response.body, code: code)
|
|
@@ -385,7 +385,7 @@ module Schematic
|
|
|
385
385
|
end
|
|
386
386
|
code = response.code.to_i
|
|
387
387
|
if code.between?(200, 299)
|
|
388
|
-
Schematic::Entitlements::Types::CountFeatureCompaniesResponse.load(response.body)
|
|
388
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::CountFeatureCompaniesResponse.load(response.body))
|
|
389
389
|
else
|
|
390
390
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
391
391
|
raise error_class.new(response.body, code: code)
|
|
@@ -449,7 +449,7 @@ module Schematic
|
|
|
449
449
|
end
|
|
450
450
|
code = response.code.to_i
|
|
451
451
|
if code.between?(200, 299)
|
|
452
|
-
Schematic::Entitlements::Types::ListFeatureUsageResponse.load(response.body)
|
|
452
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::ListFeatureUsageResponse.load(response.body))
|
|
453
453
|
else
|
|
454
454
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
455
455
|
raise error_class.new(response.body, code: code)
|
|
@@ -508,7 +508,7 @@ module Schematic
|
|
|
508
508
|
end
|
|
509
509
|
code = response.code.to_i
|
|
510
510
|
if code.between?(200, 299)
|
|
511
|
-
Schematic::Entitlements::Types::ListFeatureUsageHistoryResponse.load(response.body)
|
|
511
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::ListFeatureUsageHistoryResponse.load(response.body))
|
|
512
512
|
else
|
|
513
513
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
514
514
|
raise error_class.new(response.body, code: code)
|
|
@@ -561,7 +561,7 @@ module Schematic
|
|
|
561
561
|
end
|
|
562
562
|
code = response.code.to_i
|
|
563
563
|
if code.between?(200, 299)
|
|
564
|
-
Schematic::Entitlements::Types::GetFeatureUsageTimeSeriesResponse.load(response.body)
|
|
564
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::GetFeatureUsageTimeSeriesResponse.load(response.body))
|
|
565
565
|
else
|
|
566
566
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
567
567
|
raise error_class.new(response.body, code: code)
|
|
@@ -625,7 +625,7 @@ module Schematic
|
|
|
625
625
|
end
|
|
626
626
|
code = response.code.to_i
|
|
627
627
|
if code.between?(200, 299)
|
|
628
|
-
Schematic::Entitlements::Types::CountFeatureUsageResponse.load(response.body)
|
|
628
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::CountFeatureUsageResponse.load(response.body))
|
|
629
629
|
else
|
|
630
630
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
631
631
|
raise error_class.new(response.body, code: code)
|
|
@@ -675,7 +675,7 @@ module Schematic
|
|
|
675
675
|
end
|
|
676
676
|
code = response.code.to_i
|
|
677
677
|
if code.between?(200, 299)
|
|
678
|
-
Schematic::Entitlements::Types::ListFeatureUsersResponse.load(response.body)
|
|
678
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::ListFeatureUsersResponse.load(response.body))
|
|
679
679
|
else
|
|
680
680
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
681
681
|
raise error_class.new(response.body, code: code)
|
|
@@ -725,7 +725,7 @@ module Schematic
|
|
|
725
725
|
end
|
|
726
726
|
code = response.code.to_i
|
|
727
727
|
if code.between?(200, 299)
|
|
728
|
-
Schematic::Entitlements::Types::CountFeatureUsersResponse.load(response.body)
|
|
728
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::CountFeatureUsersResponse.load(response.body))
|
|
729
729
|
else
|
|
730
730
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
731
731
|
raise error_class.new(response.body, code: code)
|
|
@@ -796,7 +796,7 @@ module Schematic
|
|
|
796
796
|
end
|
|
797
797
|
code = response.code.to_i
|
|
798
798
|
if code.between?(200, 299)
|
|
799
|
-
Schematic::Entitlements::Types::ListPlanEntitlementsResponse.load(response.body)
|
|
799
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::ListPlanEntitlementsResponse.load(response.body))
|
|
800
800
|
else
|
|
801
801
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
802
802
|
raise error_class.new(response.body, code: code)
|
|
@@ -835,7 +835,7 @@ module Schematic
|
|
|
835
835
|
end
|
|
836
836
|
code = response.code.to_i
|
|
837
837
|
if code.between?(200, 299)
|
|
838
|
-
Schematic::Entitlements::Types::CreatePlanEntitlementResponse.load(response.body)
|
|
838
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::CreatePlanEntitlementResponse.load(response.body))
|
|
839
839
|
else
|
|
840
840
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
841
841
|
raise error_class.new(response.body, code: code)
|
|
@@ -870,7 +870,7 @@ module Schematic
|
|
|
870
870
|
end
|
|
871
871
|
code = response.code.to_i
|
|
872
872
|
if code.between?(200, 299)
|
|
873
|
-
Schematic::Entitlements::Types::GetPlanEntitlementResponse.load(response.body)
|
|
873
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::GetPlanEntitlementResponse.load(response.body))
|
|
874
874
|
else
|
|
875
875
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
876
876
|
raise error_class.new(response.body, code: code)
|
|
@@ -913,7 +913,7 @@ module Schematic
|
|
|
913
913
|
end
|
|
914
914
|
code = response.code.to_i
|
|
915
915
|
if code.between?(200, 299)
|
|
916
|
-
Schematic::Entitlements::Types::UpdatePlanEntitlementResponse.load(response.body)
|
|
916
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::UpdatePlanEntitlementResponse.load(response.body))
|
|
917
917
|
else
|
|
918
918
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
919
919
|
raise error_class.new(response.body, code: code)
|
|
@@ -948,7 +948,7 @@ module Schematic
|
|
|
948
948
|
end
|
|
949
949
|
code = response.code.to_i
|
|
950
950
|
if code.between?(200, 299)
|
|
951
|
-
Schematic::Entitlements::Types::DeletePlanEntitlementResponse.load(response.body)
|
|
951
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::DeletePlanEntitlementResponse.load(response.body))
|
|
952
952
|
else
|
|
953
953
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
954
954
|
raise error_class.new(response.body, code: code)
|
|
@@ -989,7 +989,7 @@ module Schematic
|
|
|
989
989
|
end
|
|
990
990
|
code = response.code.to_i
|
|
991
991
|
if code.between?(200, 299)
|
|
992
|
-
Schematic::Entitlements::Types::UpsertPlanEntitlementForBillingProductResponse.load(response.body)
|
|
992
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::UpsertPlanEntitlementForBillingProductResponse.load(response.body))
|
|
993
993
|
else
|
|
994
994
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
995
995
|
raise error_class.new(response.body, code: code)
|
|
@@ -1060,7 +1060,7 @@ module Schematic
|
|
|
1060
1060
|
end
|
|
1061
1061
|
code = response.code.to_i
|
|
1062
1062
|
if code.between?(200, 299)
|
|
1063
|
-
Schematic::Entitlements::Types::CountPlanEntitlementsResponse.load(response.body)
|
|
1063
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::CountPlanEntitlementsResponse.load(response.body))
|
|
1064
1064
|
else
|
|
1065
1065
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
1066
1066
|
raise error_class.new(response.body, code: code)
|
|
@@ -1098,7 +1098,7 @@ module Schematic
|
|
|
1098
1098
|
end
|
|
1099
1099
|
code = response.code.to_i
|
|
1100
1100
|
if code.between?(200, 299)
|
|
1101
|
-
Schematic::Entitlements::Types::DuplicatePlanEntitlementsResponse.load(response.body)
|
|
1101
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::DuplicatePlanEntitlementsResponse.load(response.body))
|
|
1102
1102
|
else
|
|
1103
1103
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
1104
1104
|
raise error_class.new(response.body, code: code)
|
|
@@ -1139,7 +1139,7 @@ module Schematic
|
|
|
1139
1139
|
end
|
|
1140
1140
|
code = response.code.to_i
|
|
1141
1141
|
if code.between?(200, 299)
|
|
1142
|
-
Schematic::Entitlements::Types::GetFeatureUsageByCompanyResponse.load(response.body)
|
|
1142
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::GetFeatureUsageByCompanyResponse.load(response.body))
|
|
1143
1143
|
else
|
|
1144
1144
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
1145
1145
|
raise error_class.new(response.body, code: code)
|
|
@@ -1189,7 +1189,7 @@ module Schematic
|
|
|
1189
1189
|
end
|
|
1190
1190
|
code = response.code.to_i
|
|
1191
1191
|
if code.between?(200, 299)
|
|
1192
|
-
Schematic::Entitlements::Types::GetUserUsageByCompanyResponse.load(response.body)
|
|
1192
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::GetUserUsageByCompanyResponse.load(response.body))
|
|
1193
1193
|
else
|
|
1194
1194
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
1195
1195
|
raise error_class.new(response.body, code: code)
|
|
@@ -1239,7 +1239,7 @@ module Schematic
|
|
|
1239
1239
|
end
|
|
1240
1240
|
code = response.code.to_i
|
|
1241
1241
|
if code.between?(200, 299)
|
|
1242
|
-
Schematic::Entitlements::Types::GetUserUsageDetailResponse.load(response.body)
|
|
1242
|
+
(response.body.to_s.empty? ? nil : Schematic::Entitlements::Types::GetUserUsageDetailResponse.load(response.body))
|
|
1243
1243
|
else
|
|
1244
1244
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
1245
1245
|
raise error_class.new(response.body, code: code)
|
|
@@ -40,7 +40,7 @@ module Schematic
|
|
|
40
40
|
end
|
|
41
41
|
code = response.code.to_i
|
|
42
42
|
if code.between?(200, 299)
|
|
43
|
-
Schematic::Events::Types::CreateEventBatchResponse.load(response.body)
|
|
43
|
+
(response.body.to_s.empty? ? nil : Schematic::Events::Types::CreateEventBatchResponse.load(response.body))
|
|
44
44
|
else
|
|
45
45
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
46
46
|
raise error_class.new(response.body, code: code)
|
|
@@ -90,7 +90,7 @@ module Schematic
|
|
|
90
90
|
end
|
|
91
91
|
code = response.code.to_i
|
|
92
92
|
if code.between?(200, 299)
|
|
93
|
-
Schematic::Events::Types::GetEventSummariesResponse.load(response.body)
|
|
93
|
+
(response.body.to_s.empty? ? nil : Schematic::Events::Types::GetEventSummariesResponse.load(response.body))
|
|
94
94
|
else
|
|
95
95
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
96
96
|
raise error_class.new(response.body, code: code)
|
|
@@ -152,7 +152,7 @@ module Schematic
|
|
|
152
152
|
end
|
|
153
153
|
code = response.code.to_i
|
|
154
154
|
if code.between?(200, 299)
|
|
155
|
-
Schematic::Events::Types::ListEventsResponse.load(response.body)
|
|
155
|
+
(response.body.to_s.empty? ? nil : Schematic::Events::Types::ListEventsResponse.load(response.body))
|
|
156
156
|
else
|
|
157
157
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
158
158
|
raise error_class.new(response.body, code: code)
|
|
@@ -187,7 +187,7 @@ module Schematic
|
|
|
187
187
|
end
|
|
188
188
|
code = response.code.to_i
|
|
189
189
|
if code.between?(200, 299)
|
|
190
|
-
Schematic::Events::Types::CreateEventResponse.load(response.body)
|
|
190
|
+
(response.body.to_s.empty? ? nil : Schematic::Events::Types::CreateEventResponse.load(response.body))
|
|
191
191
|
else
|
|
192
192
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
193
193
|
raise error_class.new(response.body, code: code)
|
|
@@ -222,7 +222,7 @@ module Schematic
|
|
|
222
222
|
end
|
|
223
223
|
code = response.code.to_i
|
|
224
224
|
if code.between?(200, 299)
|
|
225
|
-
Schematic::Events::Types::GetEventResponse.load(response.body)
|
|
225
|
+
(response.body.to_s.empty? ? nil : Schematic::Events::Types::GetEventResponse.load(response.body))
|
|
226
226
|
else
|
|
227
227
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
228
228
|
raise error_class.new(response.body, code: code)
|
|
@@ -255,7 +255,7 @@ module Schematic
|
|
|
255
255
|
end
|
|
256
256
|
code = response.code.to_i
|
|
257
257
|
if code.between?(200, 299)
|
|
258
|
-
Schematic::Events::Types::GetOtlpEnvironmentSettingsResponse.load(response.body)
|
|
258
|
+
(response.body.to_s.empty? ? nil : Schematic::Events::Types::GetOtlpEnvironmentSettingsResponse.load(response.body))
|
|
259
259
|
else
|
|
260
260
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
261
261
|
raise error_class.new(response.body, code: code)
|
|
@@ -290,7 +290,7 @@ module Schematic
|
|
|
290
290
|
end
|
|
291
291
|
code = response.code.to_i
|
|
292
292
|
if code.between?(200, 299)
|
|
293
|
-
Schematic::Events::Types::UpsertOtlpEnvironmentSettingsResponse.load(response.body)
|
|
293
|
+
(response.body.to_s.empty? ? nil : Schematic::Events::Types::UpsertOtlpEnvironmentSettingsResponse.load(response.body))
|
|
294
294
|
else
|
|
295
295
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
296
296
|
raise error_class.new(response.body, code: code)
|
|
@@ -323,7 +323,7 @@ module Schematic
|
|
|
323
323
|
end
|
|
324
324
|
code = response.code.to_i
|
|
325
325
|
if code.between?(200, 299)
|
|
326
|
-
Schematic::Events::Types::DeleteOtlpEnvironmentSettingsResponse.load(response.body)
|
|
326
|
+
(response.body.to_s.empty? ? nil : Schematic::Events::Types::DeleteOtlpEnvironmentSettingsResponse.load(response.body))
|
|
327
327
|
else
|
|
328
328
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
329
329
|
raise error_class.new(response.body, code: code)
|
|
@@ -356,7 +356,7 @@ module Schematic
|
|
|
356
356
|
end
|
|
357
357
|
code = response.code.to_i
|
|
358
358
|
if code.between?(200, 299)
|
|
359
|
-
Schematic::Events::Types::GetSegmentIntegrationStatusResponse.load(response.body)
|
|
359
|
+
(response.body.to_s.empty? ? nil : Schematic::Events::Types::GetSegmentIntegrationStatusResponse.load(response.body))
|
|
360
360
|
else
|
|
361
361
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
362
362
|
raise error_class.new(response.body, code: code)
|
|
@@ -71,7 +71,7 @@ module Schematic
|
|
|
71
71
|
end
|
|
72
72
|
code = response.code.to_i
|
|
73
73
|
if code.between?(200, 299)
|
|
74
|
-
Schematic::Features::Types::ListFeaturesResponse.load(response.body)
|
|
74
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::ListFeaturesResponse.load(response.body))
|
|
75
75
|
else
|
|
76
76
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
77
77
|
raise error_class.new(response.body, code: code)
|
|
@@ -110,7 +110,7 @@ module Schematic
|
|
|
110
110
|
end
|
|
111
111
|
code = response.code.to_i
|
|
112
112
|
if code.between?(200, 299)
|
|
113
|
-
Schematic::Features::Types::CreateFeatureResponse.load(response.body)
|
|
113
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CreateFeatureResponse.load(response.body))
|
|
114
114
|
else
|
|
115
115
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
116
116
|
raise error_class.new(response.body, code: code)
|
|
@@ -145,7 +145,7 @@ module Schematic
|
|
|
145
145
|
end
|
|
146
146
|
code = response.code.to_i
|
|
147
147
|
if code.between?(200, 299)
|
|
148
|
-
Schematic::Features::Types::GetFeatureResponse.load(response.body)
|
|
148
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::GetFeatureResponse.load(response.body))
|
|
149
149
|
else
|
|
150
150
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
151
151
|
raise error_class.new(response.body, code: code)
|
|
@@ -185,7 +185,7 @@ module Schematic
|
|
|
185
185
|
end
|
|
186
186
|
code = response.code.to_i
|
|
187
187
|
if code.between?(200, 299)
|
|
188
|
-
Schematic::Features::Types::UpdateFeatureResponse.load(response.body)
|
|
188
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpdateFeatureResponse.load(response.body))
|
|
189
189
|
else
|
|
190
190
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
191
191
|
raise error_class.new(response.body, code: code)
|
|
@@ -220,7 +220,7 @@ module Schematic
|
|
|
220
220
|
end
|
|
221
221
|
code = response.code.to_i
|
|
222
222
|
if code.between?(200, 299)
|
|
223
|
-
Schematic::Features::Types::DeleteFeatureResponse.load(response.body)
|
|
223
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::DeleteFeatureResponse.load(response.body))
|
|
224
224
|
else
|
|
225
225
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
226
226
|
raise error_class.new(response.body, code: code)
|
|
@@ -261,7 +261,7 @@ module Schematic
|
|
|
261
261
|
end
|
|
262
262
|
code = response.code.to_i
|
|
263
263
|
if code.between?(200, 299)
|
|
264
|
-
Schematic::Features::Types::UpsertFeatureForBillingProductResponse.load(response.body)
|
|
264
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpsertFeatureForBillingProductResponse.load(response.body))
|
|
265
265
|
else
|
|
266
266
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
267
267
|
raise error_class.new(response.body, code: code)
|
|
@@ -329,7 +329,7 @@ module Schematic
|
|
|
329
329
|
end
|
|
330
330
|
code = response.code.to_i
|
|
331
331
|
if code.between?(200, 299)
|
|
332
|
-
Schematic::Features::Types::CountFeaturesResponse.load(response.body)
|
|
332
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CountFeaturesResponse.load(response.body))
|
|
333
333
|
else
|
|
334
334
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
335
335
|
raise error_class.new(response.body, code: code)
|
|
@@ -382,7 +382,7 @@ module Schematic
|
|
|
382
382
|
end
|
|
383
383
|
code = response.code.to_i
|
|
384
384
|
if code.between?(200, 299)
|
|
385
|
-
Schematic::Features::Types::ListFlagsResponse.load(response.body)
|
|
385
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::ListFlagsResponse.load(response.body))
|
|
386
386
|
else
|
|
387
387
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
388
388
|
raise error_class.new(response.body, code: code)
|
|
@@ -423,7 +423,7 @@ module Schematic
|
|
|
423
423
|
end
|
|
424
424
|
code = response.code.to_i
|
|
425
425
|
if code.between?(200, 299)
|
|
426
|
-
Schematic::Features::Types::CreateFlagResponse.load(response.body)
|
|
426
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CreateFlagResponse.load(response.body))
|
|
427
427
|
else
|
|
428
428
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
429
429
|
raise error_class.new(response.body, code: code)
|
|
@@ -458,7 +458,7 @@ module Schematic
|
|
|
458
458
|
end
|
|
459
459
|
code = response.code.to_i
|
|
460
460
|
if code.between?(200, 299)
|
|
461
|
-
Schematic::Features::Types::GetFlagResponse.load(response.body)
|
|
461
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::GetFlagResponse.load(response.body))
|
|
462
462
|
else
|
|
463
463
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
464
464
|
raise error_class.new(response.body, code: code)
|
|
@@ -504,7 +504,7 @@ module Schematic
|
|
|
504
504
|
end
|
|
505
505
|
code = response.code.to_i
|
|
506
506
|
if code.between?(200, 299)
|
|
507
|
-
Schematic::Features::Types::UpdateFlagResponse.load(response.body)
|
|
507
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpdateFlagResponse.load(response.body))
|
|
508
508
|
else
|
|
509
509
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
510
510
|
raise error_class.new(response.body, code: code)
|
|
@@ -539,7 +539,7 @@ module Schematic
|
|
|
539
539
|
end
|
|
540
540
|
code = response.code.to_i
|
|
541
541
|
if code.between?(200, 299)
|
|
542
|
-
Schematic::Features::Types::DeleteFlagResponse.load(response.body)
|
|
542
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::DeleteFlagResponse.load(response.body))
|
|
543
543
|
else
|
|
544
544
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
545
545
|
raise error_class.new(response.body, code: code)
|
|
@@ -598,7 +598,7 @@ module Schematic
|
|
|
598
598
|
end
|
|
599
599
|
code = response.code.to_i
|
|
600
600
|
if code.between?(200, 299)
|
|
601
|
-
Schematic::Features::Types::UpdateFlagRulesResponse.load(response.body)
|
|
601
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpdateFlagRulesResponse.load(response.body))
|
|
602
602
|
else
|
|
603
603
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
604
604
|
raise error_class.new(response.body, code: code)
|
|
@@ -637,7 +637,47 @@ module Schematic
|
|
|
637
637
|
end
|
|
638
638
|
code = response.code.to_i
|
|
639
639
|
if code.between?(200, 299)
|
|
640
|
-
Schematic::Features::Types::CheckFlagResponse.load(response.body)
|
|
640
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckFlagResponse.load(response.body))
|
|
641
|
+
else
|
|
642
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
643
|
+
raise error_class.new(response.body, code: code)
|
|
644
|
+
end
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
# @param request_options [Hash]
|
|
648
|
+
# @param params [Schematic::Features::Types::CheckAndReserveFlagRequestBody]
|
|
649
|
+
# @option request_options [String] :base_url
|
|
650
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
651
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
652
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
653
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
654
|
+
# @option params [String] :key
|
|
655
|
+
#
|
|
656
|
+
# @example
|
|
657
|
+
# client.features.check_and_reserve_flag(key: "key")
|
|
658
|
+
#
|
|
659
|
+
# @return [Schematic::Features::Types::CheckAndReserveFlagResponse]
|
|
660
|
+
def check_and_reserve_flag(request_options: {}, **params)
|
|
661
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
662
|
+
request_data = Schematic::Features::Types::CheckAndReserveFlagRequestBody.new(params).to_h
|
|
663
|
+
non_body_param_names = %w[key]
|
|
664
|
+
body = request_data.except(*non_body_param_names)
|
|
665
|
+
|
|
666
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
667
|
+
base_url: request_options[:base_url],
|
|
668
|
+
method: "POST",
|
|
669
|
+
path: "flags/#{URI.encode_uri_component(params[:key].to_s)}/check-and-reserve",
|
|
670
|
+
body: body,
|
|
671
|
+
request_options: request_options
|
|
672
|
+
)
|
|
673
|
+
begin
|
|
674
|
+
response = @client.send(request)
|
|
675
|
+
rescue Net::HTTPRequestTimeout
|
|
676
|
+
raise Schematic::Errors::TimeoutError
|
|
677
|
+
end
|
|
678
|
+
code = response.code.to_i
|
|
679
|
+
if code.between?(200, 299)
|
|
680
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckAndReserveFlagResponse.load(response.body))
|
|
641
681
|
else
|
|
642
682
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
643
683
|
raise error_class.new(response.body, code: code)
|
|
@@ -672,7 +712,7 @@ module Schematic
|
|
|
672
712
|
end
|
|
673
713
|
code = response.code.to_i
|
|
674
714
|
if code.between?(200, 299)
|
|
675
|
-
Schematic::Features::Types::CheckFlagsResponse.load(response.body)
|
|
715
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckFlagsResponse.load(response.body))
|
|
676
716
|
else
|
|
677
717
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
678
718
|
raise error_class.new(response.body, code: code)
|
|
@@ -707,7 +747,7 @@ module Schematic
|
|
|
707
747
|
end
|
|
708
748
|
code = response.code.to_i
|
|
709
749
|
if code.between?(200, 299)
|
|
710
|
-
Schematic::Features::Types::CheckFlagsBulkResponse.load(response.body)
|
|
750
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckFlagsBulkResponse.load(response.body))
|
|
711
751
|
else
|
|
712
752
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
713
753
|
raise error_class.new(response.body, code: code)
|
|
@@ -760,7 +800,7 @@ module Schematic
|
|
|
760
800
|
end
|
|
761
801
|
code = response.code.to_i
|
|
762
802
|
if code.between?(200, 299)
|
|
763
|
-
Schematic::Features::Types::CountFlagsResponse.load(response.body)
|
|
803
|
+
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CountFlagsResponse.load(response.body))
|
|
764
804
|
else
|
|
765
805
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
766
806
|
raise error_class.new(response.body, code: code)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Features
|
|
5
|
+
module Types
|
|
6
|
+
class CheckAndReserveFlagRequestBody < Internal::Types::Model
|
|
7
|
+
field :key, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :company, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :expires_at, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :preflight, -> { Schematic::Types::PreflightRequestBody }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :quantity, -> { Integer }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :user, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Features
|
|
5
|
+
module Types
|
|
6
|
+
class CheckAndReserveFlagResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::CheckAndReserveFlagResponseData }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -42,7 +42,7 @@ module Schematic
|
|
|
42
42
|
end
|
|
43
43
|
code = response.code.to_i
|
|
44
44
|
if code.between?(200, 299)
|
|
45
|
-
Schematic::Insights::Types::GetActivityResponse.load(response.body)
|
|
45
|
+
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetActivityResponse.load(response.body))
|
|
46
46
|
else
|
|
47
47
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
48
48
|
raise error_class.new(response.body, code: code)
|
|
@@ -92,7 +92,7 @@ module Schematic
|
|
|
92
92
|
end
|
|
93
93
|
code = response.code.to_i
|
|
94
94
|
if code.between?(200, 299)
|
|
95
|
-
Schematic::Insights::Types::GetEnvironmentFeatureUsageTimeSeriesResponse.load(response.body)
|
|
95
|
+
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetEnvironmentFeatureUsageTimeSeriesResponse.load(response.body))
|
|
96
96
|
else
|
|
97
97
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
98
98
|
raise error_class.new(response.body, code: code)
|
|
@@ -131,7 +131,7 @@ module Schematic
|
|
|
131
131
|
end
|
|
132
132
|
code = response.code.to_i
|
|
133
133
|
if code.between?(200, 299)
|
|
134
|
-
Schematic::Insights::Types::GetPlanGrowthResponse.load(response.body)
|
|
134
|
+
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetPlanGrowthResponse.load(response.body))
|
|
135
135
|
else
|
|
136
136
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
137
137
|
raise error_class.new(response.body, code: code)
|
|
@@ -164,7 +164,7 @@ module Schematic
|
|
|
164
164
|
end
|
|
165
165
|
code = response.code.to_i
|
|
166
166
|
if code.between?(200, 299)
|
|
167
|
-
Schematic::Insights::Types::GetSummaryResponse.load(response.body)
|
|
167
|
+
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetSummaryResponse.load(response.body))
|
|
168
168
|
else
|
|
169
169
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
170
170
|
raise error_class.new(response.body, code: code)
|
|
@@ -211,7 +211,7 @@ module Schematic
|
|
|
211
211
|
end
|
|
212
212
|
code = response.code.to_i
|
|
213
213
|
if code.between?(200, 299)
|
|
214
|
-
Schematic::Insights::Types::GetTopFeaturesByUsageResponse.load(response.body)
|
|
214
|
+
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetTopFeaturesByUsageResponse.load(response.body))
|
|
215
215
|
else
|
|
216
216
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
217
217
|
raise error_class.new(response.body, code: code)
|
|
@@ -261,7 +261,7 @@ module Schematic
|
|
|
261
261
|
end
|
|
262
262
|
code = response.code.to_i
|
|
263
263
|
if code.between?(200, 299)
|
|
264
|
-
Schematic::Insights::Types::GetEnvironmentTraitUsageTimeSeriesResponse.load(response.body)
|
|
264
|
+
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetEnvironmentTraitUsageTimeSeriesResponse.load(response.body))
|
|
265
265
|
else
|
|
266
266
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
267
267
|
raise error_class.new(response.body, code: code)
|