schematichq 1.5.3 → 1.5.5
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 +13 -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 +748 -34
- data/lib/schematic/billing/types/count_native_invoices_params.rb +20 -0
- data/lib/schematic/billing/types/count_native_invoices_request.rb +19 -0
- data/lib/schematic/billing/types/count_native_invoices_response.rb +13 -0
- 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/finalize_native_invoice_response.rb +13 -0
- data/lib/schematic/billing/types/get_billing_settings_response.rb +13 -0
- data/lib/schematic/billing/types/get_company_native_subscription_response.rb +13 -0
- data/lib/schematic/billing/types/get_native_invoice_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/list_native_invoices_params.rb +20 -0
- data/lib/schematic/billing/types/list_native_invoices_request.rb +19 -0
- data/lib/schematic/billing/types/list_native_invoices_response.rb +13 -0
- data/lib/schematic/billing/types/mark_invoice_paid_request_body.rb +19 -0
- data/lib/schematic/billing/types/mark_native_invoice_paid_response.rb +13 -0
- 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/billing/types/void_native_invoice_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 -20
- 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 +9 -4
- data/lib/schematic/internal/iterators/cursor_page_iterator.rb +78 -15
- data/lib/schematic/internal/iterators/item_iterator.rb +70 -15
- data/lib/schematic/internal/iterators/offset_item_iterator.rb +9 -4
- data/lib/schematic/internal/iterators/offset_page_iterator.rb +71 -14
- 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 +24 -4
- 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 +274 -28
- 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/list_custom_plan_billings_params.rb +4 -0
- data/lib/schematic/plans/types/list_custom_plan_billings_request.rb +4 -0
- data/lib/schematic/plans/types/preview_publish_plan_version_response.rb +13 -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/amendment_proration_lands_on.rb +13 -0
- 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_invoice_detail_response_data.rb +49 -0
- data/lib/schematic/types/billing_invoice_line_response_data.rb +27 -0
- data/lib/schematic/types/billing_invoice_response_data.rb +43 -0
- data/lib/schematic/types/billing_invoice_settlement_response_data.rb +17 -0
- data/lib/schematic/types/billing_invoice_terms_response_data.rb +19 -0
- data/lib/schematic/types/billing_native_subscription_change_response_data.rb +15 -0
- data/lib/schematic/types/billing_native_subscription_line_response_data.rb +47 -0
- data/lib/schematic/types/billing_native_subscription_response_data.rb +31 -0
- 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_statement_line_response_data.rb +21 -0
- data/lib/schematic/types/billing_statement_response_data.rb +19 -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/charge_timing.rb +12 -0
- 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/collector.rb +13 -0
- data/lib/schematic/types/company_billing_entity_subscription_response_data.rb +1 -1
- data/lib/schematic/types/company_billing_profile_response_data.rb +12 -0
- data/lib/schematic/types/company_credit_balance.rb +7 -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_flag_request_body.rb +1 -1
- data/lib/schematic/types/create_or_update_condition_request_body.rb +1 -1
- data/lib/schematic/types/create_or_update_flag_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 +4 -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/event_body_inference.rb +4 -0
- 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/flag_detail_response_data.rb +1 -1
- data/lib/schematic/types/flag_in_plan_response_data.rb +1 -1
- data/lib/schematic/types/flag_response_data.rb +1 -1
- data/lib/schematic/types/insights_summary_response_data.rb +1 -1
- data/lib/schematic/types/invoice_collection_state.rb +17 -0
- data/lib/schematic/types/invoice_document_state.rb +14 -0
- data/lib/schematic/types/invoice_line_kind.rb +15 -0
- data/lib/schematic/types/invoice_request_body.rb +1 -1
- data/lib/schematic/types/invoice_response_data.rb +1 -1
- data/lib/schematic/types/line_kind.rb +13 -0
- 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/payment_gating.rb +12 -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_event_quantities_request_body.rb +13 -0
- data/lib/schematic/types/preflight_request_body.rb +3 -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/publish_plan_version_request_body.rb +43 -0
- data/lib/schematic/types/publish_preview_pay_in_advance_response_data.rb +15 -0
- data/lib/schematic/types/publish_preview_payment_method_response_data.rb +15 -0
- data/lib/schematic/types/publish_preview_proration_line_response_data.rb +19 -0
- data/lib/schematic/types/publish_preview_response_data.rb +53 -0
- 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 +4 -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/subscription_change_action.rb +14 -0
- 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 +80 -8
- data/reference.md +892 -113
- metadata +75 -3
- data/lib/schematic/plans/types/publish_plan_version_request_body.rb +0 -45
|
@@ -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
|
|
|
@@ -399,7 +462,6 @@ module Schematic
|
|
|
399
462
|
#
|
|
400
463
|
# @example
|
|
401
464
|
# client.features.create_flag(
|
|
402
|
-
# default_value: true,
|
|
403
465
|
# description: "description",
|
|
404
466
|
# flag_type: "boolean",
|
|
405
467
|
# key: "key",
|
|
@@ -426,7 +488,15 @@ module Schematic
|
|
|
426
488
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CreateFlagResponse.load(response.body))
|
|
427
489
|
else
|
|
428
490
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
429
|
-
|
|
491
|
+
error_types = {
|
|
492
|
+
400 => Schematic::Types::ApiError,
|
|
493
|
+
401 => Schematic::Types::ApiError,
|
|
494
|
+
403 => Schematic::Types::ApiError,
|
|
495
|
+
404 => Schematic::Types::ApiError,
|
|
496
|
+
500 => Schematic::Types::ApiError
|
|
497
|
+
}
|
|
498
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
499
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
430
500
|
end
|
|
431
501
|
end
|
|
432
502
|
|
|
@@ -461,7 +531,14 @@ module Schematic
|
|
|
461
531
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::GetFlagResponse.load(response.body))
|
|
462
532
|
else
|
|
463
533
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
464
|
-
|
|
534
|
+
error_types = {
|
|
535
|
+
401 => Schematic::Types::ApiError,
|
|
536
|
+
403 => Schematic::Types::ApiError,
|
|
537
|
+
404 => Schematic::Types::ApiError,
|
|
538
|
+
500 => Schematic::Types::ApiError
|
|
539
|
+
}
|
|
540
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
541
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
465
542
|
end
|
|
466
543
|
end
|
|
467
544
|
|
|
@@ -477,7 +554,6 @@ module Schematic
|
|
|
477
554
|
# @example
|
|
478
555
|
# client.features.update_flag(
|
|
479
556
|
# flag_id: "flag_id",
|
|
480
|
-
# default_value: true,
|
|
481
557
|
# description: "description",
|
|
482
558
|
# flag_type: "boolean",
|
|
483
559
|
# key: "key",
|
|
@@ -507,7 +583,15 @@ module Schematic
|
|
|
507
583
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpdateFlagResponse.load(response.body))
|
|
508
584
|
else
|
|
509
585
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
510
|
-
|
|
586
|
+
error_types = {
|
|
587
|
+
400 => Schematic::Types::ApiError,
|
|
588
|
+
401 => Schematic::Types::ApiError,
|
|
589
|
+
403 => Schematic::Types::ApiError,
|
|
590
|
+
404 => Schematic::Types::ApiError,
|
|
591
|
+
500 => Schematic::Types::ApiError
|
|
592
|
+
}
|
|
593
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
594
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
511
595
|
end
|
|
512
596
|
end
|
|
513
597
|
|
|
@@ -542,7 +626,15 @@ module Schematic
|
|
|
542
626
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::DeleteFlagResponse.load(response.body))
|
|
543
627
|
else
|
|
544
628
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
545
|
-
|
|
629
|
+
error_types = {
|
|
630
|
+
400 => Schematic::Types::ApiError,
|
|
631
|
+
401 => Schematic::Types::ApiError,
|
|
632
|
+
403 => Schematic::Types::ApiError,
|
|
633
|
+
404 => Schematic::Types::ApiError,
|
|
634
|
+
500 => Schematic::Types::ApiError
|
|
635
|
+
}
|
|
636
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
637
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
546
638
|
end
|
|
547
639
|
end
|
|
548
640
|
|
|
@@ -601,7 +693,15 @@ module Schematic
|
|
|
601
693
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::UpdateFlagRulesResponse.load(response.body))
|
|
602
694
|
else
|
|
603
695
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
604
|
-
|
|
696
|
+
error_types = {
|
|
697
|
+
400 => Schematic::Types::ApiError,
|
|
698
|
+
401 => Schematic::Types::ApiError,
|
|
699
|
+
403 => Schematic::Types::ApiError,
|
|
700
|
+
404 => Schematic::Types::ApiError,
|
|
701
|
+
500 => Schematic::Types::ApiError
|
|
702
|
+
}
|
|
703
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
704
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
605
705
|
end
|
|
606
706
|
end
|
|
607
707
|
|
|
@@ -640,7 +740,15 @@ module Schematic
|
|
|
640
740
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckFlagResponse.load(response.body))
|
|
641
741
|
else
|
|
642
742
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
643
|
-
|
|
743
|
+
error_types = {
|
|
744
|
+
400 => Schematic::Types::ApiError,
|
|
745
|
+
401 => Schematic::Types::ApiError,
|
|
746
|
+
403 => Schematic::Types::ApiError,
|
|
747
|
+
404 => Schematic::Types::ApiError,
|
|
748
|
+
500 => Schematic::Types::ApiError
|
|
749
|
+
}
|
|
750
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
751
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
644
752
|
end
|
|
645
753
|
end
|
|
646
754
|
|
|
@@ -680,7 +788,15 @@ module Schematic
|
|
|
680
788
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckAndReserveFlagResponse.load(response.body))
|
|
681
789
|
else
|
|
682
790
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
683
|
-
|
|
791
|
+
error_types = {
|
|
792
|
+
400 => Schematic::Types::ApiError,
|
|
793
|
+
401 => Schematic::Types::ApiError,
|
|
794
|
+
403 => Schematic::Types::ApiError,
|
|
795
|
+
404 => Schematic::Types::ApiError,
|
|
796
|
+
500 => Schematic::Types::ApiError
|
|
797
|
+
}
|
|
798
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
799
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
684
800
|
end
|
|
685
801
|
end
|
|
686
802
|
|
|
@@ -715,7 +831,15 @@ module Schematic
|
|
|
715
831
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckFlagsResponse.load(response.body))
|
|
716
832
|
else
|
|
717
833
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
718
|
-
|
|
834
|
+
error_types = {
|
|
835
|
+
400 => Schematic::Types::ApiError,
|
|
836
|
+
401 => Schematic::Types::ApiError,
|
|
837
|
+
403 => Schematic::Types::ApiError,
|
|
838
|
+
404 => Schematic::Types::ApiError,
|
|
839
|
+
500 => Schematic::Types::ApiError
|
|
840
|
+
}
|
|
841
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
842
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
719
843
|
end
|
|
720
844
|
end
|
|
721
845
|
|
|
@@ -750,7 +874,15 @@ module Schematic
|
|
|
750
874
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CheckFlagsBulkResponse.load(response.body))
|
|
751
875
|
else
|
|
752
876
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
753
|
-
|
|
877
|
+
error_types = {
|
|
878
|
+
400 => Schematic::Types::ApiError,
|
|
879
|
+
401 => Schematic::Types::ApiError,
|
|
880
|
+
403 => Schematic::Types::ApiError,
|
|
881
|
+
404 => Schematic::Types::ApiError,
|
|
882
|
+
500 => Schematic::Types::ApiError
|
|
883
|
+
}
|
|
884
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
885
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
754
886
|
end
|
|
755
887
|
end
|
|
756
888
|
|
|
@@ -803,7 +935,15 @@ module Schematic
|
|
|
803
935
|
(response.body.to_s.empty? ? nil : Schematic::Features::Types::CountFlagsResponse.load(response.body))
|
|
804
936
|
else
|
|
805
937
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
806
|
-
|
|
938
|
+
error_types = {
|
|
939
|
+
400 => Schematic::Types::ApiError,
|
|
940
|
+
401 => Schematic::Types::ApiError,
|
|
941
|
+
403 => Schematic::Types::ApiError,
|
|
942
|
+
404 => Schematic::Types::ApiError,
|
|
943
|
+
500 => Schematic::Types::ApiError
|
|
944
|
+
}
|
|
945
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
946
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
807
947
|
end
|
|
808
948
|
end
|
|
809
949
|
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
|