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
|
@@ -5,7 +5,7 @@ module Schematic
|
|
|
5
5
|
class PreviewSubscriptionFinanceResponseData < Internal::Types::Model
|
|
6
6
|
field :amount_off, -> { Integer }, optional: false, nullable: false
|
|
7
7
|
|
|
8
|
-
field :currency, -> {
|
|
8
|
+
field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
|
|
9
9
|
|
|
10
10
|
field :discount_amount, -> { Integer }, optional: false, nullable: false
|
|
11
11
|
|
|
@@ -15,7 +15,7 @@ module Schematic
|
|
|
15
15
|
|
|
16
16
|
field :new_charges, -> { Integer }, optional: false, nullable: false
|
|
17
17
|
|
|
18
|
-
field :percent_off, -> {
|
|
18
|
+
field :percent_off, -> { Float }, optional: false, nullable: false
|
|
19
19
|
|
|
20
20
|
field :period_end, -> { String }, optional: false, nullable: false
|
|
21
21
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class PublishPlanVersionRequestBody < Internal::Types::Model
|
|
6
|
+
field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :billing_cycle_anchor, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :billing_start_date, -> { String }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :collection_method, -> { Schematic::Types::BillingCollectionMethod }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :coupon_external_id, -> { String }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: true, nullable: false
|
|
19
|
+
|
|
20
|
+
field :customer_email, -> { String }, optional: true, nullable: false
|
|
21
|
+
|
|
22
|
+
field :days_until_due, -> { Integer }, optional: true, nullable: false
|
|
23
|
+
|
|
24
|
+
field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
25
|
+
|
|
26
|
+
field :migration_strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false
|
|
27
|
+
|
|
28
|
+
field :phone, -> { String }, optional: true, nullable: false
|
|
29
|
+
|
|
30
|
+
field :prorate_first_period, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
31
|
+
|
|
32
|
+
field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false
|
|
33
|
+
|
|
34
|
+
field :require_no_migration, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
35
|
+
|
|
36
|
+
field :scheduled_at, -> { String }, optional: true, nullable: false
|
|
37
|
+
|
|
38
|
+
field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
39
|
+
|
|
40
|
+
field :tax_id, -> { Schematic::Types::TaxIdInput }, optional: true, nullable: false
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class PublishPreviewPayInAdvanceResponseData < Internal::Types::Model
|
|
6
|
+
field :committed_quantity, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :current_quantity, -> { Integer }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :effective_quantity, -> { Integer }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :feature_id, -> { String }, optional: false, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class PublishPreviewPaymentMethodResponseData < Internal::Types::Model
|
|
6
|
+
field :card_brand, -> { String }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :card_last_4, -> { String }, optional: true, nullable: false, api_name: "card_last4"
|
|
9
|
+
|
|
10
|
+
field :has_default, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :payment_method_type, -> { String }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class PublishPreviewProrationLineResponseData < Internal::Types::Model
|
|
6
|
+
field :amount, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :description, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :period_end, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :period_start, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :price_external_id, -> { String }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :quantity, -> { Integer }, optional: false, nullable: false
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class PublishPreviewResponseData < Internal::Types::Model
|
|
6
|
+
field :billing_email, -> { String }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :current_period_end, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :current_period_start, -> { String }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :default_collection_method, -> { Schematic::Types::BillingCollectionMethod }, optional: false, nullable: false
|
|
15
|
+
|
|
16
|
+
field :default_days_until_due, -> { Integer }, optional: false, nullable: false
|
|
17
|
+
|
|
18
|
+
field :default_send_invoice, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
19
|
+
|
|
20
|
+
field :effective_at, -> { String }, optional: true, nullable: false
|
|
21
|
+
|
|
22
|
+
field :has_billing_changes, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
23
|
+
|
|
24
|
+
field :immediate_invoice_amount, -> { Integer }, optional: true, nullable: false
|
|
25
|
+
|
|
26
|
+
field :lands_on, -> { Schematic::Types::AmendmentProrationLandsOn }, optional: false, nullable: false
|
|
27
|
+
|
|
28
|
+
field :new_recurring_amount, -> { Integer }, optional: true, nullable: false
|
|
29
|
+
|
|
30
|
+
field :next_invoice_amount, -> { Integer }, optional: true, nullable: false
|
|
31
|
+
|
|
32
|
+
field :next_invoice_at, -> { String }, optional: true, nullable: false
|
|
33
|
+
|
|
34
|
+
field :note, -> { String }, optional: true, nullable: false
|
|
35
|
+
|
|
36
|
+
field :pay_in_advance, -> { Internal::Types::Array[Schematic::Types::PublishPreviewPayInAdvanceResponseData] }, optional: false, nullable: false
|
|
37
|
+
|
|
38
|
+
field :payment_method, -> { Schematic::Types::PublishPreviewPaymentMethodResponseData }, optional: false, nullable: false
|
|
39
|
+
|
|
40
|
+
field :proration_charge, -> { Integer }, optional: false, nullable: false
|
|
41
|
+
|
|
42
|
+
field :proration_credit, -> { Integer }, optional: false, nullable: false
|
|
43
|
+
|
|
44
|
+
field :proration_lines, -> { Internal::Types::Array[Schematic::Types::PublishPreviewProrationLineResponseData] }, optional: false, nullable: false
|
|
45
|
+
|
|
46
|
+
field :proration_total, -> { Integer }, optional: false, nullable: false
|
|
47
|
+
|
|
48
|
+
field :will_update_subscription, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
49
|
+
|
|
50
|
+
field :would_fail, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -9,7 +9,7 @@ module Schematic
|
|
|
9
9
|
|
|
10
10
|
field :billing_product_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
11
11
|
|
|
12
|
-
field :credit_balances, -> { Internal::Types::Hash[String,
|
|
12
|
+
field :credit_balances, -> { Internal::Types::Hash[String, Float] }, optional: false, nullable: false
|
|
13
13
|
|
|
14
14
|
field :credit_postpaid, -> { Internal::Types::Hash[String, Schematic::Types::RulesengineCreditPostpaidConfig] }, optional: true, nullable: false
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ module Schematic
|
|
|
9
9
|
|
|
10
10
|
field :condition_type, -> { Schematic::Types::RulesengineConditionType }, optional: false, nullable: false
|
|
11
11
|
|
|
12
|
-
field :consumption_rate, -> {
|
|
12
|
+
field :consumption_rate, -> { Float }, optional: true, nullable: false
|
|
13
13
|
|
|
14
14
|
field :credit_id, -> { String }, optional: true, nullable: false
|
|
15
15
|
|
|
@@ -27,6 +27,8 @@ module Schematic
|
|
|
27
27
|
|
|
28
28
|
field :operator, -> { Schematic::Types::RulesengineComparableOperator }, optional: false, nullable: false
|
|
29
29
|
|
|
30
|
+
field :quantity_rates, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
|
|
31
|
+
|
|
30
32
|
field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
31
33
|
|
|
32
34
|
field :trait_definition, -> { Schematic::Types::RulesengineTraitDefinition }, optional: true, nullable: false
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Types
|
|
5
5
|
class RulesengineCreditSpendPolicy < Internal::Types::Model
|
|
6
|
-
field :
|
|
6
|
+
field :company_id, -> { String }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :consumed, -> { Float }, optional: true, nullable: false
|
|
7
9
|
|
|
8
10
|
field :credit_id, -> { String }, optional: false, nullable: false
|
|
9
11
|
|
|
@@ -13,7 +15,7 @@ module Schematic
|
|
|
13
15
|
|
|
14
16
|
field :label, -> { String }, optional: true, nullable: false
|
|
15
17
|
|
|
16
|
-
field :limit, -> {
|
|
18
|
+
field :limit, -> { Float }, optional: false, nullable: false
|
|
17
19
|
|
|
18
20
|
field :resets_at, -> { String }, optional: true, nullable: false
|
|
19
21
|
|
|
@@ -5,19 +5,19 @@ module Schematic
|
|
|
5
5
|
class RulesengineFeatureEntitlement < Internal::Types::Model
|
|
6
6
|
field :allocation, -> { Integer }, optional: true, nullable: false
|
|
7
7
|
|
|
8
|
-
field :consumption_rate, -> {
|
|
8
|
+
field :consumption_rate, -> { Float }, optional: true, nullable: false
|
|
9
9
|
|
|
10
10
|
field :credit_id, -> { String }, optional: true, nullable: false
|
|
11
11
|
|
|
12
|
-
field :credit_remaining, -> {
|
|
12
|
+
field :credit_remaining, -> { Float }, optional: true, nullable: false
|
|
13
13
|
|
|
14
|
-
field :credit_reserved, -> {
|
|
14
|
+
field :credit_reserved, -> { Float }, optional: true, nullable: false
|
|
15
15
|
|
|
16
|
-
field :credit_settled, -> {
|
|
16
|
+
field :credit_settled, -> { Float }, optional: true, nullable: false
|
|
17
17
|
|
|
18
|
-
field :credit_total, -> {
|
|
18
|
+
field :credit_total, -> { Float }, optional: true, nullable: false
|
|
19
19
|
|
|
20
|
-
field :credit_used, -> {
|
|
20
|
+
field :credit_used, -> { Float }, optional: true, nullable: false
|
|
21
21
|
|
|
22
22
|
field :event_name, -> { String }, optional: true, nullable: false
|
|
23
23
|
|
|
@@ -33,6 +33,8 @@ module Schematic
|
|
|
33
33
|
|
|
34
34
|
field :month_reset, -> { Schematic::Types::RulesengineMetricPeriodMonthReset }, optional: true, nullable: false
|
|
35
35
|
|
|
36
|
+
field :quantity_rates, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
|
|
37
|
+
|
|
36
38
|
field :soft_limit, -> { Integer }, optional: true, nullable: false
|
|
37
39
|
|
|
38
40
|
field :usage, -> { Integer }, optional: true, nullable: false
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Types
|
|
5
5
|
class ScheduledDowngradeResponseData < Internal::Types::Model
|
|
6
|
-
field :currency, -> {
|
|
6
|
+
field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
|
|
7
7
|
|
|
8
8
|
field :effective_after, -> { String }, optional: false, nullable: false
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Types
|
|
5
5
|
class TopFeatureByUsageResponseData < Internal::Types::Model
|
|
6
|
-
field :change_pct, -> {
|
|
6
|
+
field :change_pct, -> { Float }, optional: true, nullable: false
|
|
7
7
|
|
|
8
8
|
field :feature_id, -> { String }, optional: false, nullable: false
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ module Schematic
|
|
|
15
15
|
|
|
16
16
|
field :created_at, -> { String }, optional: false, nullable: false
|
|
17
17
|
|
|
18
|
-
field :currency, -> {
|
|
18
|
+
field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
|
|
19
19
|
|
|
20
20
|
field :customer_external_id, -> { String }, optional: false, nullable: false
|
|
21
21
|
|
|
@@ -45,7 +45,7 @@ module Schematic
|
|
|
45
45
|
|
|
46
46
|
field :license_id, -> { String }, optional: true, nullable: false
|
|
47
47
|
|
|
48
|
-
field :overdraft_limit, -> {
|
|
48
|
+
field :overdraft_limit, -> { Float }, optional: true, nullable: false
|
|
49
49
|
|
|
50
50
|
field :postpaid_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
51
51
|
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Types
|
|
5
5
|
class UpdateEntitlementReqCommon < Internal::Types::Model
|
|
6
|
-
field :credit_consumption_rate, -> {
|
|
6
|
+
field :credit_consumption_rate, -> { Float }, optional: true, nullable: false
|
|
7
7
|
|
|
8
8
|
field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false
|
|
9
9
|
|
|
10
10
|
field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false
|
|
11
11
|
|
|
12
|
+
field :quantity_rates, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
|
|
13
|
+
|
|
12
14
|
field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
13
15
|
|
|
14
16
|
field :value_credit_id, -> { String }, optional: true, nullable: false
|
|
@@ -9,7 +9,7 @@ module Schematic
|
|
|
9
9
|
|
|
10
10
|
field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false
|
|
11
11
|
|
|
12
|
-
field :currency, -> {
|
|
12
|
+
field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
|
|
13
13
|
|
|
14
14
|
field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPriceRequestBody] }, optional: true, nullable: false
|
|
15
15
|
|
|
@@ -7,7 +7,7 @@ module Schematic
|
|
|
7
7
|
|
|
8
8
|
field :billing_threshold, -> { Integer }, optional: true, nullable: false
|
|
9
9
|
|
|
10
|
-
field :currency, -> {
|
|
10
|
+
field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
|
|
11
11
|
|
|
12
12
|
field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@ module Schematic
|
|
|
5
5
|
class UsageBasedEntitlementResponseData < Internal::Types::Model
|
|
6
6
|
field :billing_threshold, -> { Integer }, optional: true, nullable: false
|
|
7
7
|
|
|
8
|
-
field :consumption_rate, -> {
|
|
8
|
+
field :consumption_rate, -> { Float }, optional: true, nullable: false
|
|
9
9
|
|
|
10
10
|
field :feature_id, -> { String }, optional: false, nullable: false
|
|
11
11
|
|
|
@@ -7,9 +7,9 @@ module Schematic
|
|
|
7
7
|
|
|
8
8
|
field :credit_name, -> { String }, optional: false, nullable: false
|
|
9
9
|
|
|
10
|
-
field :credits_used, -> {
|
|
10
|
+
field :credits_used, -> { Float }, optional: false, nullable: false
|
|
11
11
|
|
|
12
|
-
field :share, -> {
|
|
12
|
+
field :share, -> { Float }, optional: false, nullable: false
|
|
13
13
|
|
|
14
14
|
field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false
|
|
15
15
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Types
|
|
5
5
|
class UserDailyCreditPointResponseData < Internal::Types::Model
|
|
6
|
-
field :credits_used, -> {
|
|
6
|
+
field :credits_used, -> { Float }, optional: false, nullable: false
|
|
7
7
|
|
|
8
8
|
field :date, -> { String }, optional: false, nullable: false
|
|
9
9
|
end
|
|
@@ -7,7 +7,7 @@ module Schematic
|
|
|
7
7
|
|
|
8
8
|
field :last_seen, -> { String }, optional: false, nullable: false
|
|
9
9
|
|
|
10
|
-
field :share, -> {
|
|
10
|
+
field :share, -> { Float }, optional: false, nullable: false
|
|
11
11
|
|
|
12
12
|
field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false
|
|
13
13
|
|
data/lib/schematic/version.rb
CHANGED
|
Binary file
|
|
@@ -59,7 +59,15 @@ module Schematic
|
|
|
59
59
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::ListWebhookEventsResponse.load(response.body))
|
|
60
60
|
else
|
|
61
61
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
62
|
-
|
|
62
|
+
error_types = {
|
|
63
|
+
400 => Schematic::Types::ApiError,
|
|
64
|
+
401 => Schematic::Types::ApiError,
|
|
65
|
+
403 => Schematic::Types::ApiError,
|
|
66
|
+
404 => Schematic::Types::ApiError,
|
|
67
|
+
500 => Schematic::Types::ApiError
|
|
68
|
+
}
|
|
69
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
70
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
63
71
|
end
|
|
64
72
|
end
|
|
65
73
|
|
|
@@ -94,7 +102,14 @@ module Schematic
|
|
|
94
102
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::GetWebhookEventResponse.load(response.body))
|
|
95
103
|
else
|
|
96
104
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
97
|
-
|
|
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)
|
|
98
113
|
end
|
|
99
114
|
end
|
|
100
115
|
|
|
@@ -147,7 +162,15 @@ module Schematic
|
|
|
147
162
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::CountWebhookEventsResponse.load(response.body))
|
|
148
163
|
else
|
|
149
164
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
150
|
-
|
|
165
|
+
error_types = {
|
|
166
|
+
400 => Schematic::Types::ApiError,
|
|
167
|
+
401 => Schematic::Types::ApiError,
|
|
168
|
+
403 => Schematic::Types::ApiError,
|
|
169
|
+
404 => Schematic::Types::ApiError,
|
|
170
|
+
500 => Schematic::Types::ApiError
|
|
171
|
+
}
|
|
172
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
173
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
151
174
|
end
|
|
152
175
|
end
|
|
153
176
|
|
|
@@ -194,7 +217,15 @@ module Schematic
|
|
|
194
217
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::ListWebhooksResponse.load(response.body))
|
|
195
218
|
else
|
|
196
219
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
197
|
-
|
|
220
|
+
error_types = {
|
|
221
|
+
400 => Schematic::Types::ApiError,
|
|
222
|
+
401 => Schematic::Types::ApiError,
|
|
223
|
+
403 => Schematic::Types::ApiError,
|
|
224
|
+
404 => Schematic::Types::ApiError,
|
|
225
|
+
500 => Schematic::Types::ApiError
|
|
226
|
+
}
|
|
227
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
228
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
198
229
|
end
|
|
199
230
|
end
|
|
200
231
|
|
|
@@ -233,7 +264,15 @@ module Schematic
|
|
|
233
264
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::CreateWebhookResponse.load(response.body))
|
|
234
265
|
else
|
|
235
266
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
236
|
-
|
|
267
|
+
error_types = {
|
|
268
|
+
400 => Schematic::Types::ApiError,
|
|
269
|
+
401 => Schematic::Types::ApiError,
|
|
270
|
+
403 => Schematic::Types::ApiError,
|
|
271
|
+
404 => Schematic::Types::ApiError,
|
|
272
|
+
500 => Schematic::Types::ApiError
|
|
273
|
+
}
|
|
274
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
275
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
237
276
|
end
|
|
238
277
|
end
|
|
239
278
|
|
|
@@ -268,7 +307,14 @@ module Schematic
|
|
|
268
307
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::GetWebhookResponse.load(response.body))
|
|
269
308
|
else
|
|
270
309
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
271
|
-
|
|
310
|
+
error_types = {
|
|
311
|
+
401 => Schematic::Types::ApiError,
|
|
312
|
+
403 => Schematic::Types::ApiError,
|
|
313
|
+
404 => Schematic::Types::ApiError,
|
|
314
|
+
500 => Schematic::Types::ApiError
|
|
315
|
+
}
|
|
316
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
317
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
272
318
|
end
|
|
273
319
|
end
|
|
274
320
|
|
|
@@ -308,7 +354,15 @@ module Schematic
|
|
|
308
354
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::UpdateWebhookResponse.load(response.body))
|
|
309
355
|
else
|
|
310
356
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
311
|
-
|
|
357
|
+
error_types = {
|
|
358
|
+
400 => Schematic::Types::ApiError,
|
|
359
|
+
401 => Schematic::Types::ApiError,
|
|
360
|
+
403 => Schematic::Types::ApiError,
|
|
361
|
+
404 => Schematic::Types::ApiError,
|
|
362
|
+
500 => Schematic::Types::ApiError
|
|
363
|
+
}
|
|
364
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
365
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
312
366
|
end
|
|
313
367
|
end
|
|
314
368
|
|
|
@@ -343,7 +397,15 @@ module Schematic
|
|
|
343
397
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::DeleteWebhookResponse.load(response.body))
|
|
344
398
|
else
|
|
345
399
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
346
|
-
|
|
400
|
+
error_types = {
|
|
401
|
+
400 => Schematic::Types::ApiError,
|
|
402
|
+
401 => Schematic::Types::ApiError,
|
|
403
|
+
403 => Schematic::Types::ApiError,
|
|
404
|
+
404 => Schematic::Types::ApiError,
|
|
405
|
+
500 => Schematic::Types::ApiError
|
|
406
|
+
}
|
|
407
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
408
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
347
409
|
end
|
|
348
410
|
end
|
|
349
411
|
|
|
@@ -386,7 +448,15 @@ module Schematic
|
|
|
386
448
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::SendTestWebhookActionResponse.load(response.body))
|
|
387
449
|
else
|
|
388
450
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
389
|
-
|
|
451
|
+
error_types = {
|
|
452
|
+
400 => Schematic::Types::ApiError,
|
|
453
|
+
401 => Schematic::Types::ApiError,
|
|
454
|
+
403 => Schematic::Types::ApiError,
|
|
455
|
+
404 => Schematic::Types::ApiError,
|
|
456
|
+
500 => Schematic::Types::ApiError
|
|
457
|
+
}
|
|
458
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
459
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
390
460
|
end
|
|
391
461
|
end
|
|
392
462
|
|
|
@@ -433,7 +503,15 @@ module Schematic
|
|
|
433
503
|
(response.body.to_s.empty? ? nil : Schematic::Webhooks::Types::CountWebhooksResponse.load(response.body))
|
|
434
504
|
else
|
|
435
505
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
436
|
-
|
|
506
|
+
error_types = {
|
|
507
|
+
400 => Schematic::Types::ApiError,
|
|
508
|
+
401 => Schematic::Types::ApiError,
|
|
509
|
+
403 => Schematic::Types::ApiError,
|
|
510
|
+
404 => Schematic::Types::ApiError,
|
|
511
|
+
500 => Schematic::Types::ApiError
|
|
512
|
+
}
|
|
513
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
514
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
437
515
|
end
|
|
438
516
|
end
|
|
439
517
|
end
|