schematichq 1.5.2 → 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 +14 -338
- data/.fernignore +8 -0
- data/.rubocop.yml +4 -0
- data/README.md +141 -0
- data/WASM_VERSION +1 -1
- data/custom.gemspec.rb +6 -0
- data/lib/schematic/accesstokens/client.rb +9 -1
- data/lib/schematic/accounts/client.rb +183 -21
- data/lib/schematic/accounts/types/update_environment_request_body.rb +2 -0
- 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 +458 -46
- data/lib/schematic/credits/leases/check.rb +477 -0
- data/lib/schematic/credits/leases/lease_manager.rb +565 -0
- data/lib/schematic/credits/leases/lease_store.rb +240 -0
- data/lib/schematic/credits/leases/redis_lease_store.rb +358 -0
- data/lib/schematic/credits/leases/redis_reservation_store.rb +326 -0
- data/lib/schematic/credits/leases/reservation_store.rb +161 -0
- data/lib/schematic/credits/leases/server_check.rb +237 -0
- data/lib/schematic/credits/leases/track.rb +66 -0
- data/lib/schematic/credits/leases/types.rb +329 -0
- data/lib/schematic/credits/leases/wire_client.rb +83 -0
- data/lib/schematic/credits/types/acquire_credit_lease_request_body.rb +3 -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 +5 -1
- data/lib/schematic/credits/types/extend_credit_lease_request_body.rb +3 -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/get_credit_spend_policy_usage_params.rb +16 -0
- data/lib/schematic/credits/types/get_credit_spend_policy_usage_request.rb +15 -0
- data/lib/schematic/credits/types/get_credit_spend_policy_usage_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 +5 -1
- data/lib/schematic/dataexports/client.rb +36 -6
- data/lib/schematic/datastream/client.rb +32 -2
- data/lib/schematic/entitlements/client.rb +406 -25
- data/lib/schematic/entitlements/types/count_company_user_usage_params.rb +24 -0
- data/lib/schematic/entitlements/types/count_company_user_usage_request.rb +23 -0
- data/lib/schematic/entitlements/types/count_company_user_usage_response.rb +13 -0
- 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/get_company_user_usage_metrics_params.rb +16 -0
- data/lib/schematic/entitlements/types/get_company_user_usage_metrics_request.rb +15 -0
- data/lib/schematic/entitlements/types/get_company_user_usage_metrics_response.rb +13 -0
- data/lib/schematic/entitlements/types/list_company_user_usage_params.rb +24 -0
- data/lib/schematic/entitlements/types/list_company_user_usage_request.rb +23 -0
- data/lib/schematic/entitlements/types/list_company_user_usage_response.rb +13 -0
- 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 +28 -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 +104 -11
- data/lib/schematic/planmigrations/types/count_migrations_params.rb +2 -0
- data/lib/schematic/planmigrations/types/count_migrations_request.rb +2 -0
- data/lib/schematic/planmigrations/types/create_migration_input.rb +2 -0
- data/lib/schematic/planmigrations/types/list_migrations_params.rb +2 -0
- data/lib/schematic/planmigrations/types/list_migrations_request.rb +2 -0
- 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 +6 -0
- data/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +2 -0
- data/lib/schematic/rules_engine.rb +49 -0
- data/lib/schematic/scheduledcheckout/client.rb +35 -4
- data/lib/schematic/schematic_client.rb +841 -33
- 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/capture_raw_event.rb +4 -0
- 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/check_flags_response_data.rb +2 -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/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 +3 -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 +4 -0
- data/lib/schematic/types/company_subscription_response_data.rb +1 -1
- data/lib/schematic/types/company_user_usage_metrics_response_data.rb +15 -0
- data/lib/schematic/types/company_user_usage_response_data.rb +19 -0
- data/lib/schematic/types/company_user_usage_row_response_data.rb +17 -0
- data/lib/schematic/types/component_display_settings.rb +2 -0
- data/lib/schematic/types/component_response_data.rb +1 -1
- data/lib/schematic/types/component_settings_response_data.rb +2 -0
- 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 +14 -6
- data/lib/schematic/types/credit_event_type.rb +3 -0
- 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_ledger_entry_kind.rb +17 -0
- data/lib/schematic/types/credit_reservation_response_data.rb +2 -2
- data/lib/schematic/types/credit_spend_policy.rb +25 -0
- data/lib/schematic/types/credit_spend_policy_response_data.rb +13 -1
- data/lib/schematic/types/credit_spend_window.rb +11 -0
- data/lib/schematic/types/credit_spend_window_unit.rb +13 -0
- 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 +8 -0
- data/lib/schematic/types/entitlement_currency_prices_response_data.rb +1 -1
- data/lib/schematic/types/environment_detail_response_data.rb +2 -0
- data/lib/schematic/types/environment_response_data.rb +2 -0
- data/lib/schematic/types/estimated_plan_total.rb +13 -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/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/pending_migration_response_data.rb +6 -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_migration_response_data.rb +2 -0
- data/lib/schematic/types/plan_version_migration_strategy.rb +1 -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/rules_engine_schema_version.rb +1 -1
- data/lib/schematic/types/rulesengine_company.rb +3 -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 +25 -0
- data/lib/schematic/types/rulesengine_credit_spend_policy_scope.rb +13 -0
- data/lib/schematic/types/rulesengine_credit_spend_window.rb +11 -0
- data/lib/schematic/types/rulesengine_feature_entitlement.rb +8 -6
- data/lib/schematic/types/rulesengine_user.rb +2 -0
- 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/types/user_usage_metric.rb +12 -0
- 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 +64 -5
- data/lib/schematichq.rb +10 -0
- data/reference.md +888 -127
- metadata +71 -2
|
@@ -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
|
|
@@ -41,7 +41,14 @@ module Schematic
|
|
|
41
41
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::RunIntegrationResponse.load(response.body))
|
|
42
42
|
else
|
|
43
43
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
44
|
-
|
|
44
|
+
error_types = {
|
|
45
|
+
401 => Schematic::Types::ApiError,
|
|
46
|
+
403 => Schematic::Types::ApiError,
|
|
47
|
+
404 => Schematic::Types::ApiError,
|
|
48
|
+
500 => Schematic::Types::ApiError
|
|
49
|
+
}
|
|
50
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
51
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
45
52
|
end
|
|
46
53
|
end
|
|
47
54
|
|
|
@@ -100,7 +107,15 @@ module Schematic
|
|
|
100
107
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::ListIntegrationsResponse.load(response.body))
|
|
101
108
|
else
|
|
102
109
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
103
|
-
|
|
110
|
+
error_types = {
|
|
111
|
+
400 => Schematic::Types::ApiError,
|
|
112
|
+
401 => Schematic::Types::ApiError,
|
|
113
|
+
403 => Schematic::Types::ApiError,
|
|
114
|
+
404 => Schematic::Types::ApiError,
|
|
115
|
+
500 => Schematic::Types::ApiError
|
|
116
|
+
}
|
|
117
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
118
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
104
119
|
end
|
|
105
120
|
end
|
|
106
121
|
|
|
@@ -135,7 +150,14 @@ module Schematic
|
|
|
135
150
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::GetIntegrationWebhookUrlResponse.load(response.body))
|
|
136
151
|
else
|
|
137
152
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
138
|
-
|
|
153
|
+
error_types = {
|
|
154
|
+
401 => Schematic::Types::ApiError,
|
|
155
|
+
403 => Schematic::Types::ApiError,
|
|
156
|
+
404 => Schematic::Types::ApiError,
|
|
157
|
+
500 => Schematic::Types::ApiError
|
|
158
|
+
}
|
|
159
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
160
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
139
161
|
end
|
|
140
162
|
end
|
|
141
163
|
|
|
@@ -170,7 +192,15 @@ module Schematic
|
|
|
170
192
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::InstallIntegrationResponse.load(response.body))
|
|
171
193
|
else
|
|
172
194
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
173
|
-
|
|
195
|
+
error_types = {
|
|
196
|
+
400 => Schematic::Types::ApiError,
|
|
197
|
+
401 => Schematic::Types::ApiError,
|
|
198
|
+
403 => Schematic::Types::ApiError,
|
|
199
|
+
404 => Schematic::Types::ApiError,
|
|
200
|
+
500 => Schematic::Types::ApiError
|
|
201
|
+
}
|
|
202
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
203
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
174
204
|
end
|
|
175
205
|
end
|
|
176
206
|
|
|
@@ -205,7 +235,15 @@ module Schematic
|
|
|
205
235
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::StartDataImportResponse.load(response.body))
|
|
206
236
|
else
|
|
207
237
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
208
|
-
|
|
238
|
+
error_types = {
|
|
239
|
+
400 => Schematic::Types::ApiError,
|
|
240
|
+
401 => Schematic::Types::ApiError,
|
|
241
|
+
403 => Schematic::Types::ApiError,
|
|
242
|
+
404 => Schematic::Types::ApiError,
|
|
243
|
+
500 => Schematic::Types::ApiError
|
|
244
|
+
}
|
|
245
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
246
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
209
247
|
end
|
|
210
248
|
end
|
|
211
249
|
|
|
@@ -238,7 +276,14 @@ module Schematic
|
|
|
238
276
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::LoadSampleDataSetResponse.load(response.body))
|
|
239
277
|
else
|
|
240
278
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
241
|
-
|
|
279
|
+
error_types = {
|
|
280
|
+
401 => Schematic::Types::ApiError,
|
|
281
|
+
403 => Schematic::Types::ApiError,
|
|
282
|
+
404 => Schematic::Types::ApiError,
|
|
283
|
+
500 => Schematic::Types::ApiError
|
|
284
|
+
}
|
|
285
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
286
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
242
287
|
end
|
|
243
288
|
end
|
|
244
289
|
|
|
@@ -271,7 +316,14 @@ module Schematic
|
|
|
271
316
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::GetStripeSandboxClaimLinkResponse.load(response.body))
|
|
272
317
|
else
|
|
273
318
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
274
|
-
|
|
319
|
+
error_types = {
|
|
320
|
+
401 => Schematic::Types::ApiError,
|
|
321
|
+
403 => Schematic::Types::ApiError,
|
|
322
|
+
404 => Schematic::Types::ApiError,
|
|
323
|
+
500 => Schematic::Types::ApiError
|
|
324
|
+
}
|
|
325
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
326
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
275
327
|
end
|
|
276
328
|
end
|
|
277
329
|
|
|
@@ -304,7 +356,14 @@ module Schematic
|
|
|
304
356
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::GetStripeSandboxKeysResponse.load(response.body))
|
|
305
357
|
else
|
|
306
358
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
307
|
-
|
|
359
|
+
error_types = {
|
|
360
|
+
401 => Schematic::Types::ApiError,
|
|
361
|
+
403 => Schematic::Types::ApiError,
|
|
362
|
+
404 => Schematic::Types::ApiError,
|
|
363
|
+
500 => Schematic::Types::ApiError
|
|
364
|
+
}
|
|
365
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
366
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
308
367
|
end
|
|
309
368
|
end
|
|
310
369
|
|
|
@@ -339,7 +398,15 @@ module Schematic
|
|
|
339
398
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::ClaimStripeSandboxKeysResponse.load(response.body))
|
|
340
399
|
else
|
|
341
400
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
342
|
-
|
|
401
|
+
error_types = {
|
|
402
|
+
400 => Schematic::Types::ApiError,
|
|
403
|
+
401 => Schematic::Types::ApiError,
|
|
404
|
+
403 => Schematic::Types::ApiError,
|
|
405
|
+
404 => Schematic::Types::ApiError,
|
|
406
|
+
500 => Schematic::Types::ApiError
|
|
407
|
+
}
|
|
408
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
409
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
343
410
|
end
|
|
344
411
|
end
|
|
345
412
|
|
|
@@ -374,7 +441,15 @@ module Schematic
|
|
|
374
441
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::AssumeStripeInstalledResponse.load(response.body))
|
|
375
442
|
else
|
|
376
443
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
377
|
-
|
|
444
|
+
error_types = {
|
|
445
|
+
400 => Schematic::Types::ApiError,
|
|
446
|
+
401 => Schematic::Types::ApiError,
|
|
447
|
+
403 => Schematic::Types::ApiError,
|
|
448
|
+
404 => Schematic::Types::ApiError,
|
|
449
|
+
500 => Schematic::Types::ApiError
|
|
450
|
+
}
|
|
451
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
452
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
378
453
|
end
|
|
379
454
|
end
|
|
380
455
|
|
|
@@ -409,7 +484,15 @@ module Schematic
|
|
|
409
484
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::InstallStripeResponse.load(response.body))
|
|
410
485
|
else
|
|
411
486
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
412
|
-
|
|
487
|
+
error_types = {
|
|
488
|
+
400 => Schematic::Types::ApiError,
|
|
489
|
+
401 => Schematic::Types::ApiError,
|
|
490
|
+
403 => Schematic::Types::ApiError,
|
|
491
|
+
404 => Schematic::Types::ApiError,
|
|
492
|
+
500 => Schematic::Types::ApiError
|
|
493
|
+
}
|
|
494
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
495
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
413
496
|
end
|
|
414
497
|
end
|
|
415
498
|
|
|
@@ -444,7 +527,15 @@ module Schematic
|
|
|
444
527
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::InstallStripeClaimableSandboxResponse.load(response.body))
|
|
445
528
|
else
|
|
446
529
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
447
|
-
|
|
530
|
+
error_types = {
|
|
531
|
+
400 => Schematic::Types::ApiError,
|
|
532
|
+
401 => Schematic::Types::ApiError,
|
|
533
|
+
403 => Schematic::Types::ApiError,
|
|
534
|
+
404 => Schematic::Types::ApiError,
|
|
535
|
+
500 => Schematic::Types::ApiError
|
|
536
|
+
}
|
|
537
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
538
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
448
539
|
end
|
|
449
540
|
end
|
|
450
541
|
|
|
@@ -477,7 +568,14 @@ module Schematic
|
|
|
477
568
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::ListStripeSandboxCountriesResponse.load(response.body))
|
|
478
569
|
else
|
|
479
570
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
480
|
-
|
|
571
|
+
error_types = {
|
|
572
|
+
401 => Schematic::Types::ApiError,
|
|
573
|
+
403 => Schematic::Types::ApiError,
|
|
574
|
+
404 => Schematic::Types::ApiError,
|
|
575
|
+
500 => Schematic::Types::ApiError
|
|
576
|
+
}
|
|
577
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
578
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
481
579
|
end
|
|
482
580
|
end
|
|
483
581
|
|
|
@@ -512,7 +610,15 @@ module Schematic
|
|
|
512
610
|
(response.body.to_s.empty? ? nil : Schematic::Integrationsapi::Types::UninstallIntegrationResponse.load(response.body))
|
|
513
611
|
else
|
|
514
612
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
515
|
-
|
|
613
|
+
error_types = {
|
|
614
|
+
400 => Schematic::Types::ApiError,
|
|
615
|
+
401 => Schematic::Types::ApiError,
|
|
616
|
+
403 => Schematic::Types::ApiError,
|
|
617
|
+
404 => Schematic::Types::ApiError,
|
|
618
|
+
500 => Schematic::Types::ApiError
|
|
619
|
+
}
|
|
620
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
621
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
516
622
|
end
|
|
517
623
|
end
|
|
518
624
|
end
|