schematichq 1.5.3 → 1.5.4
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 +7 -1
- data/.fernignore +2 -0
- data/.rubocop.yml +4 -0
- data/README.md +1 -1
- data/WASM_VERSION +1 -1
- data/lib/schematic/accesstokens/client.rb +9 -1
- data/lib/schematic/accounts/client.rb +183 -21
- data/lib/schematic/billing/client.rb +325 -34
- data/lib/schematic/billing/types/create_billing_price_request_body.rb +1 -1
- data/lib/schematic/billing/types/create_billing_product_request_body.rb +1 -1
- data/lib/schematic/billing/types/create_billing_subscription_request_body.rb +1 -1
- data/lib/schematic/billing/types/create_coupon_request_body.rb +2 -2
- data/lib/schematic/billing/types/create_invoice_request_body.rb +1 -1
- data/lib/schematic/billing/types/get_billing_settings_response.rb +13 -0
- data/lib/schematic/billing/types/list_billing_prices_params.rb +1 -1
- data/lib/schematic/billing/types/list_billing_prices_request.rb +1 -1
- data/lib/schematic/billing/types/list_billing_product_prices_params.rb +1 -1
- data/lib/schematic/billing/types/list_billing_product_prices_request.rb +1 -1
- data/lib/schematic/billing/types/update_billing_settings_request_body.rb +11 -0
- data/lib/schematic/billing/types/update_billing_settings_response.rb +13 -0
- data/lib/schematic/catalogs/client.rb +121 -14
- data/lib/schematic/checkout/client.rb +80 -9
- data/lib/schematic/checkout/types/checkout_data_request_body.rb +1 -1
- data/lib/schematic/client.rb +5 -3
- data/lib/schematic/companies/client.rb +380 -44
- data/lib/schematic/components/client.rb +70 -8
- data/lib/schematic/components/types/create_component_request_body.rb +1 -1
- data/lib/schematic/components/types/update_component_request_body.rb +1 -1
- data/lib/schematic/componentspublic/client.rb +8 -1
- data/lib/schematic/credits/client.rb +409 -41
- data/lib/schematic/credits/types/acquire_credit_lease_request_body.rb +1 -1
- data/lib/schematic/credits/types/create_billing_credit_request_body.rb +1 -1
- data/lib/schematic/credits/types/create_company_credit_grant.rb +1 -1
- data/lib/schematic/credits/types/create_credit_bundle_request_body.rb +1 -1
- data/lib/schematic/credits/types/create_credit_spend_policy_request_body.rb +2 -2
- data/lib/schematic/credits/types/extend_credit_lease_request_body.rb +1 -1
- data/lib/schematic/credits/types/get_credit_balance_time_series_params.rb +18 -0
- data/lib/schematic/credits/types/get_credit_balance_time_series_request.rb +17 -0
- data/lib/schematic/credits/types/get_credit_balance_time_series_response.rb +13 -0
- data/lib/schematic/credits/types/reserve_credits_request_body.rb +1 -1
- data/lib/schematic/credits/types/update_credit_spend_policy_request_body.rb +2 -2
- data/lib/schematic/dataexports/client.rb +36 -6
- data/lib/schematic/entitlements/client.rb +244 -28
- data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +4 -2
- data/lib/schematic/entitlements/types/create_company_override_request_body.rb +3 -1
- data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +4 -2
- data/lib/schematic/entitlements/types/update_company_override_request_body.rb +3 -1
- data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +4 -2
- data/lib/schematic/errors/connection_error.rb +11 -0
- data/lib/schematic/errors/response_error.rb +23 -2
- data/lib/schematic/events/client.rb +78 -9
- data/lib/schematic/features/client.rb +160 -18
- data/lib/schematic/features/types/check_and_reserve_flag_request_body.rb +1 -1
- data/lib/schematic/features/types/create_billing_linked_feature_request_body.rb +2 -0
- data/lib/schematic/features/types/create_feature_request_body.rb +2 -0
- data/lib/schematic/features/types/update_feature_request_body.rb +2 -0
- data/lib/schematic/insights/client.rb +48 -6
- data/lib/schematic/integrationsapi/client.rb +120 -14
- data/lib/schematic/internal/http/base_request.rb +30 -0
- data/lib/schematic/internal/http/raw_client.rb +35 -5
- data/lib/schematic/internal/iterators/cursor_item_iterator.rb +7 -2
- data/lib/schematic/internal/iterators/cursor_page_iterator.rb +68 -14
- data/lib/schematic/internal/iterators/item_iterator.rb +61 -15
- data/lib/schematic/internal/iterators/offset_item_iterator.rb +7 -2
- data/lib/schematic/internal/iterators/offset_page_iterator.rb +57 -9
- data/lib/schematic/internal/json/request.rb +11 -2
- data/lib/schematic/internal/multipart/multipart_request.rb +1 -0
- data/lib/schematic/internal/types/model.rb +7 -3
- data/lib/schematic/internal/types/utils.rb +7 -0
- data/lib/schematic/licenses/client.rb +26 -3
- data/lib/schematic/planbundle/client.rb +27 -3
- data/lib/schematic/plangroups/client.rb +26 -3
- data/lib/schematic/planmigrations/client.rb +98 -11
- data/lib/schematic/plans/client.rb +213 -23
- data/lib/schematic/plans/types/get_plan_version_diff_params.rb +12 -0
- data/lib/schematic/plans/types/get_plan_version_diff_request.rb +13 -0
- data/lib/schematic/plans/types/get_plan_version_diff_response.rb +13 -0
- data/lib/schematic/plans/types/publish_plan_version_request_body.rb +2 -0
- data/lib/schematic/rules_engine.rb +14 -2
- data/lib/schematic/scheduledcheckout/client.rb +35 -4
- data/lib/schematic/schematic_client.rb +22 -11
- data/lib/schematic/types/billing_coupon_response_data.rb +2 -2
- data/lib/schematic/types/billing_credit_grant_response_data.rb +8 -8
- data/lib/schematic/types/billing_customer_subscription.rb +1 -1
- data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +1 -1
- data/lib/schematic/types/billing_price_response_data.rb +1 -1
- data/lib/schematic/types/billing_price_view.rb +1 -1
- data/lib/schematic/types/billing_product_detail_response_data.rb +2 -2
- data/lib/schematic/types/billing_product_for_subscription_response_data.rb +2 -2
- data/lib/schematic/types/billing_product_price_response_data.rb +1 -1
- data/lib/schematic/types/billing_product_pricing.rb +1 -1
- data/lib/schematic/types/billing_product_response_data.rb +2 -2
- data/lib/schematic/types/billing_settings_response_data.rb +9 -0
- data/lib/schematic/types/billing_subscription_discount_view.rb +2 -2
- data/lib/schematic/types/billing_subscription_response_data.rb +1 -1
- data/lib/schematic/types/billing_subscription_view.rb +1 -1
- data/lib/schematic/types/catalog_config_ordered_plan.rb +2 -0
- data/lib/schematic/types/catalog_config_ordered_plan_response_data.rb +2 -0
- data/lib/schematic/types/catalog_config_plan_credit.rb +11 -0
- data/lib/schematic/types/catalog_config_plan_credit_response_data.rb +11 -0
- data/lib/schematic/types/change_subscription_internal_request_body.rb +1 -1
- data/lib/schematic/types/change_subscription_request_body.rb +1 -1
- data/lib/schematic/types/checkout_problem_code.rb +54 -0
- data/lib/schematic/types/checkout_problem_response_data.rb +31 -0
- data/lib/schematic/types/checkout_problem_source.rb +13 -0
- data/lib/schematic/types/checkout_subscription.rb +1 -1
- data/lib/schematic/types/company_billing_entity_subscription_response_data.rb +1 -1
- data/lib/schematic/types/company_credit_balance.rb +3 -3
- data/lib/schematic/types/company_credit_balance_response_data.rb +4 -4
- data/lib/schematic/types/company_detail_response_data.rb +1 -1
- data/lib/schematic/types/company_override_response_data.rb +3 -1
- data/lib/schematic/types/company_plan_credit_grant_view.rb +1 -1
- data/lib/schematic/types/company_plan_detail_response_data.rb +2 -0
- data/lib/schematic/types/company_subscription_response_data.rb +1 -1
- data/lib/schematic/types/company_user_usage_response_data.rb +2 -2
- data/lib/schematic/types/company_user_usage_row_response_data.rb +2 -2
- data/lib/schematic/types/component_response_data.rb +1 -1
- data/lib/schematic/types/condition.rb +3 -1
- data/lib/schematic/types/condition_response_data.rb +3 -1
- data/lib/schematic/types/condition_view.rb +3 -1
- data/lib/schematic/types/coupon_request_body.rb +2 -2
- data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +1 -1
- data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +4 -2
- data/lib/schematic/types/create_entitlement_req_common.rb +3 -1
- data/lib/schematic/types/create_or_update_condition_request_body.rb +1 -1
- data/lib/schematic/types/credit_balance_event_response_data.rb +21 -0
- data/lib/schematic/types/credit_balance_feature_consumption_response_data.rb +13 -0
- data/lib/schematic/types/credit_balance_point_response_data.rb +15 -0
- data/lib/schematic/types/credit_balance_time_series_response_data.rb +15 -0
- data/lib/schematic/types/credit_bundle_currency_price.rb +1 -1
- data/lib/schematic/types/credit_bundle_currency_price_request_body.rb +1 -1
- data/lib/schematic/types/credit_bundle_currency_price_response_data.rb +1 -1
- data/lib/schematic/types/credit_burn_breakdown_line.rb +15 -0
- data/lib/schematic/types/credit_company_grant_view.rb +8 -8
- data/lib/schematic/types/credit_currency_price.rb +1 -1
- data/lib/schematic/types/credit_currency_price_request_body.rb +1 -1
- data/lib/schematic/types/credit_currency_price_response_data.rb +1 -1
- data/lib/schematic/types/credit_event_ledger_response_data.rb +10 -6
- data/lib/schematic/types/credit_grant_detail.rb +1 -1
- data/lib/schematic/types/credit_lease_response_data.rb +2 -2
- data/lib/schematic/types/credit_reservation_response_data.rb +2 -2
- data/lib/schematic/types/credit_spend_policy.rb +2 -2
- data/lib/schematic/types/credit_spend_policy_response_data.rb +4 -4
- data/lib/schematic/types/credit_transfer_response_data.rb +1 -1
- data/lib/schematic/types/credit_transfer_view.rb +1 -1
- data/lib/schematic/types/credit_usage.rb +5 -5
- data/lib/schematic/types/credit_usage_aggregation.rb +4 -4
- data/lib/schematic/types/credit_usage_reason.rb +1 -0
- data/lib/schematic/types/credits_in_plan.rb +11 -0
- data/lib/schematic/types/currency.rb +144 -0
- data/lib/schematic/types/currency_price_request_body.rb +1 -1
- data/lib/schematic/types/custom_plan_billing_response_data.rb +6 -0
- data/lib/schematic/types/entitlement_currency_prices_response_data.rb +1 -1
- data/lib/schematic/types/estimated_plan_total.rb +1 -1
- data/lib/schematic/types/feature_company_response_data.rb +7 -7
- data/lib/schematic/types/feature_detail_response_data.rb +2 -0
- data/lib/schematic/types/feature_entitlement.rb +8 -6
- data/lib/schematic/types/feature_event_source.rb +12 -0
- data/lib/schematic/types/feature_in_plan_response_data.rb +2 -0
- data/lib/schematic/types/feature_response_data.rb +2 -0
- data/lib/schematic/types/feature_usage_response_data.rb +7 -7
- data/lib/schematic/types/feature_view.rb +2 -0
- data/lib/schematic/types/flag_check_reservation_response_data.rb +3 -3
- data/lib/schematic/types/insights_summary_response_data.rb +1 -1
- data/lib/schematic/types/invoice_request_body.rb +1 -1
- data/lib/schematic/types/invoice_response_data.rb +1 -1
- data/lib/schematic/types/manage_plan_preview_response_response_data.rb +2 -0
- data/lib/schematic/types/manage_plan_request.rb +3 -1
- data/lib/schematic/types/manage_plan_response_response_data.rb +4 -0
- data/lib/schematic/types/mrr_response_data.rb +1 -1
- data/lib/schematic/types/onboarding_milestone_view.rb +1 -1
- data/lib/schematic/types/ordered_plans_in_group.rb +2 -0
- data/lib/schematic/types/plan_billing_source.rb +1 -0
- data/lib/schematic/types/plan_change_action.rb +1 -0
- data/lib/schematic/types/plan_change_amendment_status.rb +15 -0
- data/lib/schematic/types/plan_change_response_data.rb +4 -0
- data/lib/schematic/types/plan_credit_grant_view.rb +1 -1
- data/lib/schematic/types/plan_credit_order.rb +11 -0
- data/lib/schematic/types/plan_credit_visibility.rb +11 -0
- data/lib/schematic/types/plan_currency_price_request_body.rb +1 -1
- data/lib/schematic/types/plan_currency_prices_response_data.rb +1 -1
- data/lib/schematic/types/plan_entitlement_response_data.rb +3 -1
- data/lib/schematic/types/plan_group_plan_entitlements_order.rb +2 -0
- data/lib/schematic/types/plan_version_billing_product_change_response_data.rb +11 -0
- data/lib/schematic/types/plan_version_credit_grant_change_response_data.rb +17 -0
- data/lib/schematic/types/plan_version_diff_change_type.rb +13 -0
- data/lib/schematic/types/plan_version_diff_price_cadence.rb +14 -0
- data/lib/schematic/types/plan_version_diff_response_data.rb +23 -0
- data/lib/schematic/types/plan_version_entitlement_change_response_data.rb +17 -0
- data/lib/schematic/types/plan_version_field_change_response_data.rb +13 -0
- data/lib/schematic/types/plan_version_price_change_response_data.rb +15 -0
- data/lib/schematic/types/plan_view_public_response_data.rb +2 -0
- data/lib/schematic/types/preflight_request_body.rb +1 -1
- data/lib/schematic/types/preview_subscription_change_response_data.rb +3 -1
- data/lib/schematic/types/preview_subscription_discount_response_data.rb +2 -2
- data/lib/schematic/types/preview_subscription_finance_response_data.rb +2 -2
- data/lib/schematic/types/rulesengine_company.rb +1 -1
- data/lib/schematic/types/rulesengine_condition.rb +3 -1
- data/lib/schematic/types/rulesengine_credit_postpaid_config.rb +1 -1
- data/lib/schematic/types/rulesengine_credit_spend_policy.rb +2 -2
- data/lib/schematic/types/rulesengine_feature_entitlement.rb +8 -6
- data/lib/schematic/types/scheduled_downgrade_response_data.rb +1 -1
- data/lib/schematic/types/top_feature_by_usage_response_data.rb +1 -1
- data/lib/schematic/types/upcoming_invoice_response_data.rb +1 -1
- data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +1 -1
- data/lib/schematic/types/update_entitlement_req_common.rb +3 -1
- data/lib/schematic/types/upsert_billing_product_request_body.rb +1 -1
- data/lib/schematic/types/usage_based_entitlement_request_body.rb +1 -1
- data/lib/schematic/types/usage_based_entitlement_response_data.rb +1 -1
- data/lib/schematic/types/user_credit_usage_response_data.rb +2 -2
- data/lib/schematic/types/user_daily_credit_point_response_data.rb +1 -1
- data/lib/schematic/types/user_feature_usage_response_data.rb +1 -1
- data/lib/schematic/version.rb +1 -1
- data/lib/schematic/wasm/rulesengine.wasm +0 -0
- data/lib/schematic/webhooks/client.rb +88 -10
- data/lib/schematic.rb +38 -3
- data/reference.md +340 -44
- metadata +37 -2
|
@@ -43,7 +43,15 @@ module Schematic
|
|
|
43
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
|
+
error_types = {
|
|
47
|
+
400 => Schematic::Types::ApiError,
|
|
48
|
+
401 => Schematic::Types::ApiError,
|
|
49
|
+
403 => Schematic::Types::ApiError,
|
|
50
|
+
404 => Schematic::Types::ApiError,
|
|
51
|
+
500 => Schematic::Types::ApiError
|
|
52
|
+
}
|
|
53
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
54
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
47
55
|
end
|
|
48
56
|
end
|
|
49
57
|
|
|
@@ -93,7 +101,15 @@ module Schematic
|
|
|
93
101
|
(response.body.to_s.empty? ? nil : Schematic::Events::Types::GetEventSummariesResponse.load(response.body))
|
|
94
102
|
else
|
|
95
103
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
96
|
-
|
|
104
|
+
error_types = {
|
|
105
|
+
400 => Schematic::Types::ApiError,
|
|
106
|
+
401 => Schematic::Types::ApiError,
|
|
107
|
+
403 => Schematic::Types::ApiError,
|
|
108
|
+
404 => Schematic::Types::ApiError,
|
|
109
|
+
500 => Schematic::Types::ApiError
|
|
110
|
+
}
|
|
111
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
112
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
97
113
|
end
|
|
98
114
|
end
|
|
99
115
|
|
|
@@ -155,7 +171,15 @@ module Schematic
|
|
|
155
171
|
(response.body.to_s.empty? ? nil : Schematic::Events::Types::ListEventsResponse.load(response.body))
|
|
156
172
|
else
|
|
157
173
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
158
|
-
|
|
174
|
+
error_types = {
|
|
175
|
+
400 => Schematic::Types::ApiError,
|
|
176
|
+
401 => Schematic::Types::ApiError,
|
|
177
|
+
403 => Schematic::Types::ApiError,
|
|
178
|
+
404 => Schematic::Types::ApiError,
|
|
179
|
+
500 => Schematic::Types::ApiError
|
|
180
|
+
}
|
|
181
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
182
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
159
183
|
end
|
|
160
184
|
end
|
|
161
185
|
|
|
@@ -190,7 +214,15 @@ module Schematic
|
|
|
190
214
|
(response.body.to_s.empty? ? nil : Schematic::Events::Types::CreateEventResponse.load(response.body))
|
|
191
215
|
else
|
|
192
216
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
193
|
-
|
|
217
|
+
error_types = {
|
|
218
|
+
400 => Schematic::Types::ApiError,
|
|
219
|
+
401 => Schematic::Types::ApiError,
|
|
220
|
+
403 => Schematic::Types::ApiError,
|
|
221
|
+
404 => Schematic::Types::ApiError,
|
|
222
|
+
500 => Schematic::Types::ApiError
|
|
223
|
+
}
|
|
224
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
225
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
194
226
|
end
|
|
195
227
|
end
|
|
196
228
|
|
|
@@ -225,7 +257,14 @@ module Schematic
|
|
|
225
257
|
(response.body.to_s.empty? ? nil : Schematic::Events::Types::GetEventResponse.load(response.body))
|
|
226
258
|
else
|
|
227
259
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
228
|
-
|
|
260
|
+
error_types = {
|
|
261
|
+
401 => Schematic::Types::ApiError,
|
|
262
|
+
403 => Schematic::Types::ApiError,
|
|
263
|
+
404 => Schematic::Types::ApiError,
|
|
264
|
+
500 => Schematic::Types::ApiError
|
|
265
|
+
}
|
|
266
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
267
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
229
268
|
end
|
|
230
269
|
end
|
|
231
270
|
|
|
@@ -258,7 +297,14 @@ module Schematic
|
|
|
258
297
|
(response.body.to_s.empty? ? nil : Schematic::Events::Types::GetOtlpEnvironmentSettingsResponse.load(response.body))
|
|
259
298
|
else
|
|
260
299
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
261
|
-
|
|
300
|
+
error_types = {
|
|
301
|
+
401 => Schematic::Types::ApiError,
|
|
302
|
+
403 => Schematic::Types::ApiError,
|
|
303
|
+
404 => Schematic::Types::ApiError,
|
|
304
|
+
500 => Schematic::Types::ApiError
|
|
305
|
+
}
|
|
306
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
307
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
262
308
|
end
|
|
263
309
|
end
|
|
264
310
|
|
|
@@ -293,7 +339,15 @@ module Schematic
|
|
|
293
339
|
(response.body.to_s.empty? ? nil : Schematic::Events::Types::UpsertOtlpEnvironmentSettingsResponse.load(response.body))
|
|
294
340
|
else
|
|
295
341
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
296
|
-
|
|
342
|
+
error_types = {
|
|
343
|
+
400 => Schematic::Types::ApiError,
|
|
344
|
+
401 => Schematic::Types::ApiError,
|
|
345
|
+
403 => Schematic::Types::ApiError,
|
|
346
|
+
404 => Schematic::Types::ApiError,
|
|
347
|
+
500 => Schematic::Types::ApiError
|
|
348
|
+
}
|
|
349
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
350
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
297
351
|
end
|
|
298
352
|
end
|
|
299
353
|
|
|
@@ -326,7 +380,15 @@ module Schematic
|
|
|
326
380
|
(response.body.to_s.empty? ? nil : Schematic::Events::Types::DeleteOtlpEnvironmentSettingsResponse.load(response.body))
|
|
327
381
|
else
|
|
328
382
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
329
|
-
|
|
383
|
+
error_types = {
|
|
384
|
+
400 => Schematic::Types::ApiError,
|
|
385
|
+
401 => Schematic::Types::ApiError,
|
|
386
|
+
403 => Schematic::Types::ApiError,
|
|
387
|
+
404 => Schematic::Types::ApiError,
|
|
388
|
+
500 => Schematic::Types::ApiError
|
|
389
|
+
}
|
|
390
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
391
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
330
392
|
end
|
|
331
393
|
end
|
|
332
394
|
|
|
@@ -359,7 +421,14 @@ module Schematic
|
|
|
359
421
|
(response.body.to_s.empty? ? nil : Schematic::Events::Types::GetSegmentIntegrationStatusResponse.load(response.body))
|
|
360
422
|
else
|
|
361
423
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
362
|
-
|
|
424
|
+
error_types = {
|
|
425
|
+
401 => Schematic::Types::ApiError,
|
|
426
|
+
403 => Schematic::Types::ApiError,
|
|
427
|
+
404 => Schematic::Types::ApiError,
|
|
428
|
+
500 => Schematic::Types::ApiError
|
|
429
|
+
}
|
|
430
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
431
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
363
432
|
end
|
|
364
433
|
end
|
|
365
434
|
end
|
|
@@ -74,7 +74,15 @@ module Schematic
|
|
|
74
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
|
+
error_types = {
|
|
78
|
+
400 => Schematic::Types::ApiError,
|
|
79
|
+
401 => Schematic::Types::ApiError,
|
|
80
|
+
403 => Schematic::Types::ApiError,
|
|
81
|
+
404 => Schematic::Types::ApiError,
|
|
82
|
+
500 => Schematic::Types::ApiError
|
|
83
|
+
}
|
|
84
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
85
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
78
86
|
end
|
|
79
87
|
end
|
|
80
88
|
|
|
@@ -113,7 +121,15 @@ module Schematic
|
|
|
113
121
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CreateFeatureResponse.load(response.body))
|
|
114
122
|
else
|
|
115
123
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
116
|
-
|
|
124
|
+
error_types = {
|
|
125
|
+
400 => Schematic::Types::ApiError,
|
|
126
|
+
401 => Schematic::Types::ApiError,
|
|
127
|
+
403 => Schematic::Types::ApiError,
|
|
128
|
+
404 => Schematic::Types::ApiError,
|
|
129
|
+
500 => Schematic::Types::ApiError
|
|
130
|
+
}
|
|
131
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
132
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
117
133
|
end
|
|
118
134
|
end
|
|
119
135
|
|
|
@@ -148,7 +164,14 @@ module Schematic
|
|
|
148
164
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::GetFeatureResponse.load(response.body))
|
|
149
165
|
else
|
|
150
166
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
151
|
-
|
|
167
|
+
error_types = {
|
|
168
|
+
401 => Schematic::Types::ApiError,
|
|
169
|
+
403 => Schematic::Types::ApiError,
|
|
170
|
+
404 => Schematic::Types::ApiError,
|
|
171
|
+
500 => Schematic::Types::ApiError
|
|
172
|
+
}
|
|
173
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
174
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
152
175
|
end
|
|
153
176
|
end
|
|
154
177
|
|
|
@@ -188,7 +211,15 @@ module Schematic
|
|
|
188
211
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpdateFeatureResponse.load(response.body))
|
|
189
212
|
else
|
|
190
213
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
191
|
-
|
|
214
|
+
error_types = {
|
|
215
|
+
400 => Schematic::Types::ApiError,
|
|
216
|
+
401 => Schematic::Types::ApiError,
|
|
217
|
+
403 => Schematic::Types::ApiError,
|
|
218
|
+
404 => Schematic::Types::ApiError,
|
|
219
|
+
500 => Schematic::Types::ApiError
|
|
220
|
+
}
|
|
221
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
222
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
192
223
|
end
|
|
193
224
|
end
|
|
194
225
|
|
|
@@ -223,7 +254,15 @@ module Schematic
|
|
|
223
254
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::DeleteFeatureResponse.load(response.body))
|
|
224
255
|
else
|
|
225
256
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
226
|
-
|
|
257
|
+
error_types = {
|
|
258
|
+
400 => Schematic::Types::ApiError,
|
|
259
|
+
401 => Schematic::Types::ApiError,
|
|
260
|
+
403 => Schematic::Types::ApiError,
|
|
261
|
+
404 => Schematic::Types::ApiError,
|
|
262
|
+
500 => Schematic::Types::ApiError
|
|
263
|
+
}
|
|
264
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
265
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
227
266
|
end
|
|
228
267
|
end
|
|
229
268
|
|
|
@@ -264,7 +303,15 @@ module Schematic
|
|
|
264
303
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpsertFeatureForBillingProductResponse.load(response.body))
|
|
265
304
|
else
|
|
266
305
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
267
|
-
|
|
306
|
+
error_types = {
|
|
307
|
+
400 => Schematic::Types::ApiError,
|
|
308
|
+
401 => Schematic::Types::ApiError,
|
|
309
|
+
403 => Schematic::Types::ApiError,
|
|
310
|
+
404 => Schematic::Types::ApiError,
|
|
311
|
+
500 => Schematic::Types::ApiError
|
|
312
|
+
}
|
|
313
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
314
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
268
315
|
end
|
|
269
316
|
end
|
|
270
317
|
|
|
@@ -332,7 +379,15 @@ module Schematic
|
|
|
332
379
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CountFeaturesResponse.load(response.body))
|
|
333
380
|
else
|
|
334
381
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
335
|
-
|
|
382
|
+
error_types = {
|
|
383
|
+
400 => Schematic::Types::ApiError,
|
|
384
|
+
401 => Schematic::Types::ApiError,
|
|
385
|
+
403 => Schematic::Types::ApiError,
|
|
386
|
+
404 => Schematic::Types::ApiError,
|
|
387
|
+
500 => Schematic::Types::ApiError
|
|
388
|
+
}
|
|
389
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
390
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
336
391
|
end
|
|
337
392
|
end
|
|
338
393
|
|
|
@@ -385,7 +440,15 @@ module Schematic
|
|
|
385
440
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::ListFlagsResponse.load(response.body))
|
|
386
441
|
else
|
|
387
442
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
388
|
-
|
|
443
|
+
error_types = {
|
|
444
|
+
400 => Schematic::Types::ApiError,
|
|
445
|
+
401 => Schematic::Types::ApiError,
|
|
446
|
+
403 => Schematic::Types::ApiError,
|
|
447
|
+
404 => Schematic::Types::ApiError,
|
|
448
|
+
500 => Schematic::Types::ApiError
|
|
449
|
+
}
|
|
450
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
451
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
389
452
|
end
|
|
390
453
|
end
|
|
391
454
|
|
|
@@ -426,7 +489,15 @@ module Schematic
|
|
|
426
489
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CreateFlagResponse.load(response.body))
|
|
427
490
|
else
|
|
428
491
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
429
|
-
|
|
492
|
+
error_types = {
|
|
493
|
+
400 => Schematic::Types::ApiError,
|
|
494
|
+
401 => Schematic::Types::ApiError,
|
|
495
|
+
403 => Schematic::Types::ApiError,
|
|
496
|
+
404 => Schematic::Types::ApiError,
|
|
497
|
+
500 => Schematic::Types::ApiError
|
|
498
|
+
}
|
|
499
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
500
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
430
501
|
end
|
|
431
502
|
end
|
|
432
503
|
|
|
@@ -461,7 +532,14 @@ module Schematic
|
|
|
461
532
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::GetFlagResponse.load(response.body))
|
|
462
533
|
else
|
|
463
534
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
464
|
-
|
|
535
|
+
error_types = {
|
|
536
|
+
401 => Schematic::Types::ApiError,
|
|
537
|
+
403 => Schematic::Types::ApiError,
|
|
538
|
+
404 => Schematic::Types::ApiError,
|
|
539
|
+
500 => Schematic::Types::ApiError
|
|
540
|
+
}
|
|
541
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
542
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
465
543
|
end
|
|
466
544
|
end
|
|
467
545
|
|
|
@@ -507,7 +585,15 @@ module Schematic
|
|
|
507
585
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpdateFlagResponse.load(response.body))
|
|
508
586
|
else
|
|
509
587
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
510
|
-
|
|
588
|
+
error_types = {
|
|
589
|
+
400 => Schematic::Types::ApiError,
|
|
590
|
+
401 => Schematic::Types::ApiError,
|
|
591
|
+
403 => Schematic::Types::ApiError,
|
|
592
|
+
404 => Schematic::Types::ApiError,
|
|
593
|
+
500 => Schematic::Types::ApiError
|
|
594
|
+
}
|
|
595
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
596
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
511
597
|
end
|
|
512
598
|
end
|
|
513
599
|
|
|
@@ -542,7 +628,15 @@ module Schematic
|
|
|
542
628
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::DeleteFlagResponse.load(response.body))
|
|
543
629
|
else
|
|
544
630
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
545
|
-
|
|
631
|
+
error_types = {
|
|
632
|
+
400 => Schematic::Types::ApiError,
|
|
633
|
+
401 => Schematic::Types::ApiError,
|
|
634
|
+
403 => Schematic::Types::ApiError,
|
|
635
|
+
404 => Schematic::Types::ApiError,
|
|
636
|
+
500 => Schematic::Types::ApiError
|
|
637
|
+
}
|
|
638
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
639
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
546
640
|
end
|
|
547
641
|
end
|
|
548
642
|
|
|
@@ -601,7 +695,15 @@ module Schematic
|
|
|
601
695
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpdateFlagRulesResponse.load(response.body))
|
|
602
696
|
else
|
|
603
697
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
604
|
-
|
|
698
|
+
error_types = {
|
|
699
|
+
400 => Schematic::Types::ApiError,
|
|
700
|
+
401 => Schematic::Types::ApiError,
|
|
701
|
+
403 => Schematic::Types::ApiError,
|
|
702
|
+
404 => Schematic::Types::ApiError,
|
|
703
|
+
500 => Schematic::Types::ApiError
|
|
704
|
+
}
|
|
705
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
706
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
605
707
|
end
|
|
606
708
|
end
|
|
607
709
|
|
|
@@ -640,7 +742,15 @@ module Schematic
|
|
|
640
742
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckFlagResponse.load(response.body))
|
|
641
743
|
else
|
|
642
744
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
643
|
-
|
|
745
|
+
error_types = {
|
|
746
|
+
400 => Schematic::Types::ApiError,
|
|
747
|
+
401 => Schematic::Types::ApiError,
|
|
748
|
+
403 => Schematic::Types::ApiError,
|
|
749
|
+
404 => Schematic::Types::ApiError,
|
|
750
|
+
500 => Schematic::Types::ApiError
|
|
751
|
+
}
|
|
752
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
753
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
644
754
|
end
|
|
645
755
|
end
|
|
646
756
|
|
|
@@ -680,7 +790,15 @@ module Schematic
|
|
|
680
790
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckAndReserveFlagResponse.load(response.body))
|
|
681
791
|
else
|
|
682
792
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
683
|
-
|
|
793
|
+
error_types = {
|
|
794
|
+
400 => Schematic::Types::ApiError,
|
|
795
|
+
401 => Schematic::Types::ApiError,
|
|
796
|
+
403 => Schematic::Types::ApiError,
|
|
797
|
+
404 => Schematic::Types::ApiError,
|
|
798
|
+
500 => Schematic::Types::ApiError
|
|
799
|
+
}
|
|
800
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
801
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
684
802
|
end
|
|
685
803
|
end
|
|
686
804
|
|
|
@@ -715,7 +833,15 @@ module Schematic
|
|
|
715
833
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckFlagsResponse.load(response.body))
|
|
716
834
|
else
|
|
717
835
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
718
|
-
|
|
836
|
+
error_types = {
|
|
837
|
+
400 => Schematic::Types::ApiError,
|
|
838
|
+
401 => Schematic::Types::ApiError,
|
|
839
|
+
403 => Schematic::Types::ApiError,
|
|
840
|
+
404 => Schematic::Types::ApiError,
|
|
841
|
+
500 => Schematic::Types::ApiError
|
|
842
|
+
}
|
|
843
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
844
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
719
845
|
end
|
|
720
846
|
end
|
|
721
847
|
|
|
@@ -750,7 +876,15 @@ module Schematic
|
|
|
750
876
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckFlagsBulkResponse.load(response.body))
|
|
751
877
|
else
|
|
752
878
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
753
|
-
|
|
879
|
+
error_types = {
|
|
880
|
+
400 => Schematic::Types::ApiError,
|
|
881
|
+
401 => Schematic::Types::ApiError,
|
|
882
|
+
403 => Schematic::Types::ApiError,
|
|
883
|
+
404 => Schematic::Types::ApiError,
|
|
884
|
+
500 => Schematic::Types::ApiError
|
|
885
|
+
}
|
|
886
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
887
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
754
888
|
end
|
|
755
889
|
end
|
|
756
890
|
|
|
@@ -803,7 +937,15 @@ module Schematic
|
|
|
803
937
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CountFlagsResponse.load(response.body))
|
|
804
938
|
else
|
|
805
939
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
806
|
-
|
|
940
|
+
error_types = {
|
|
941
|
+
400 => Schematic::Types::ApiError,
|
|
942
|
+
401 => Schematic::Types::ApiError,
|
|
943
|
+
403 => Schematic::Types::ApiError,
|
|
944
|
+
404 => Schematic::Types::ApiError,
|
|
945
|
+
500 => Schematic::Types::ApiError
|
|
946
|
+
}
|
|
947
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
948
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
807
949
|
end
|
|
808
950
|
end
|
|
809
951
|
end
|
|
@@ -14,7 +14,7 @@ module Schematic
|
|
|
14
14
|
|
|
15
15
|
field :preflight, -> { Schematic::Types::PreflightRequestBody }, optional: true, nullable: false
|
|
16
16
|
|
|
17
|
-
field :quantity, -> {
|
|
17
|
+
field :quantity, -> { Float }, optional: true, nullable: false
|
|
18
18
|
|
|
19
19
|
field :user, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
20
20
|
end
|
|
@@ -8,6 +8,8 @@ module Schematic
|
|
|
8
8
|
|
|
9
9
|
field :description, -> { String }, optional: false, nullable: false
|
|
10
10
|
|
|
11
|
+
field :event_source, -> { Schematic::Types::FeatureEventSource }, optional: true, nullable: false
|
|
12
|
+
|
|
11
13
|
field :event_subtype, -> { String }, optional: true, nullable: false
|
|
12
14
|
|
|
13
15
|
field :external_resource_id, -> { String }, optional: false, nullable: false
|
|
@@ -6,6 +6,8 @@ module Schematic
|
|
|
6
6
|
class CreateFeatureRequestBody < Internal::Types::Model
|
|
7
7
|
field :description, -> { String }, optional: false, nullable: false
|
|
8
8
|
|
|
9
|
+
field :event_source, -> { Schematic::Types::FeatureEventSource }, optional: true, nullable: false
|
|
10
|
+
|
|
9
11
|
field :event_subtype, -> { String }, optional: true, nullable: false
|
|
10
12
|
|
|
11
13
|
field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false
|
|
@@ -8,6 +8,8 @@ module Schematic
|
|
|
8
8
|
|
|
9
9
|
field :description, -> { String }, optional: true, nullable: false
|
|
10
10
|
|
|
11
|
+
field :event_source, -> { Schematic::Types::FeatureEventSource }, optional: true, nullable: false
|
|
12
|
+
|
|
11
13
|
field :event_subtype, -> { String }, optional: true, nullable: false
|
|
12
14
|
|
|
13
15
|
field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false
|
|
@@ -45,7 +45,14 @@ module Schematic
|
|
|
45
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
|
+
error_types = {
|
|
49
|
+
401 => Schematic::Types::ApiError,
|
|
50
|
+
403 => Schematic::Types::ApiError,
|
|
51
|
+
404 => Schematic::Types::ApiError,
|
|
52
|
+
500 => Schematic::Types::ApiError
|
|
53
|
+
}
|
|
54
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
55
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
49
56
|
end
|
|
50
57
|
end
|
|
51
58
|
|
|
@@ -95,7 +102,14 @@ module Schematic
|
|
|
95
102
|
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetEnvironmentFeatureUsageTimeSeriesResponse.load(response.body))
|
|
96
103
|
else
|
|
97
104
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
98
|
-
|
|
105
|
+
error_types = {
|
|
106
|
+
401 => Schematic::Types::ApiError,
|
|
107
|
+
403 => Schematic::Types::ApiError,
|
|
108
|
+
404 => Schematic::Types::ApiError,
|
|
109
|
+
500 => Schematic::Types::ApiError
|
|
110
|
+
}
|
|
111
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
112
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
99
113
|
end
|
|
100
114
|
end
|
|
101
115
|
|
|
@@ -134,7 +148,14 @@ module Schematic
|
|
|
134
148
|
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetPlanGrowthResponse.load(response.body))
|
|
135
149
|
else
|
|
136
150
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
137
|
-
|
|
151
|
+
error_types = {
|
|
152
|
+
401 => Schematic::Types::ApiError,
|
|
153
|
+
403 => Schematic::Types::ApiError,
|
|
154
|
+
404 => Schematic::Types::ApiError,
|
|
155
|
+
500 => Schematic::Types::ApiError
|
|
156
|
+
}
|
|
157
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
158
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
138
159
|
end
|
|
139
160
|
end
|
|
140
161
|
|
|
@@ -167,7 +188,14 @@ module Schematic
|
|
|
167
188
|
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetSummaryResponse.load(response.body))
|
|
168
189
|
else
|
|
169
190
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
170
|
-
|
|
191
|
+
error_types = {
|
|
192
|
+
401 => Schematic::Types::ApiError,
|
|
193
|
+
403 => Schematic::Types::ApiError,
|
|
194
|
+
404 => Schematic::Types::ApiError,
|
|
195
|
+
500 => Schematic::Types::ApiError
|
|
196
|
+
}
|
|
197
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
198
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
171
199
|
end
|
|
172
200
|
end
|
|
173
201
|
|
|
@@ -214,7 +242,14 @@ module Schematic
|
|
|
214
242
|
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetTopFeaturesByUsageResponse.load(response.body))
|
|
215
243
|
else
|
|
216
244
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
217
|
-
|
|
245
|
+
error_types = {
|
|
246
|
+
401 => Schematic::Types::ApiError,
|
|
247
|
+
403 => Schematic::Types::ApiError,
|
|
248
|
+
404 => Schematic::Types::ApiError,
|
|
249
|
+
500 => Schematic::Types::ApiError
|
|
250
|
+
}
|
|
251
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
252
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
218
253
|
end
|
|
219
254
|
end
|
|
220
255
|
|
|
@@ -264,7 +299,14 @@ module Schematic
|
|
|
264
299
|
(response.body.to_s.empty? ? nil : Schematic::Insights::Types::GetEnvironmentTraitUsageTimeSeriesResponse.load(response.body))
|
|
265
300
|
else
|
|
266
301
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
267
|
-
|
|
302
|
+
error_types = {
|
|
303
|
+
401 => Schematic::Types::ApiError,
|
|
304
|
+
403 => Schematic::Types::ApiError,
|
|
305
|
+
404 => Schematic::Types::ApiError,
|
|
306
|
+
500 => Schematic::Types::ApiError
|
|
307
|
+
}
|
|
308
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
309
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
268
310
|
end
|
|
269
311
|
end
|
|
270
312
|
end
|