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
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
# Input parameters
|
|
7
|
+
class CountNativeInvoicesParams < Internal::Types::Model
|
|
8
|
+
field :company_id, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :contract_id, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :offset, -> { Integer }, optional: true, nullable: false
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class CountNativeInvoicesRequest < Internal::Types::Model
|
|
7
|
+
field :company_id, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :contract_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :offset, -> { Integer }, optional: true, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class CountNativeInvoicesResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Schematic::Billing::Types::CountNativeInvoicesParams }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -6,7 +6,7 @@ module Schematic
|
|
|
6
6
|
class CreateBillingPriceRequestBody < Internal::Types::Model
|
|
7
7
|
field :billing_scheme, -> { Schematic::Types::BillingPriceScheme }, optional: false, nullable: false
|
|
8
8
|
|
|
9
|
-
field :currency, -> {
|
|
9
|
+
field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
|
|
10
10
|
|
|
11
11
|
field :external_account_id, -> { String }, optional: false, nullable: false
|
|
12
12
|
|
|
@@ -10,7 +10,7 @@ module Schematic
|
|
|
10
10
|
|
|
11
11
|
field :name, -> { String }, optional: true, nullable: false
|
|
12
12
|
|
|
13
|
-
field :price, -> {
|
|
13
|
+
field :price, -> { Float }, optional: false, nullable: false
|
|
14
14
|
|
|
15
15
|
field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
16
16
|
end
|
|
@@ -12,7 +12,7 @@ module Schematic
|
|
|
12
12
|
|
|
13
13
|
field :company_id, -> { String }, optional: true, nullable: false
|
|
14
14
|
|
|
15
|
-
field :currency, -> {
|
|
15
|
+
field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
|
|
16
16
|
|
|
17
17
|
field :customer_external_id, -> { String }, optional: false, nullable: false
|
|
18
18
|
|
|
@@ -6,7 +6,7 @@ module Schematic
|
|
|
6
6
|
class CreateCouponRequestBody < Internal::Types::Model
|
|
7
7
|
field :amount_off, -> { Integer }, optional: false, nullable: false
|
|
8
8
|
|
|
9
|
-
field :currency, -> {
|
|
9
|
+
field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
|
|
10
10
|
|
|
11
11
|
field :duration, -> { String }, optional: false, nullable: false
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ module Schematic
|
|
|
18
18
|
|
|
19
19
|
field :name, -> { String }, optional: false, nullable: false
|
|
20
20
|
|
|
21
|
-
field :percent_off, -> {
|
|
21
|
+
field :percent_off, -> { Float }, optional: false, nullable: false
|
|
22
22
|
|
|
23
23
|
field :times_redeemed, -> { Integer }, optional: false, nullable: false
|
|
24
24
|
end
|
|
@@ -12,7 +12,7 @@ module Schematic
|
|
|
12
12
|
|
|
13
13
|
field :collection_method, -> { String }, optional: false, nullable: false
|
|
14
14
|
|
|
15
|
-
field :currency, -> {
|
|
15
|
+
field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
|
|
16
16
|
|
|
17
17
|
field :customer_external_id, -> { String }, optional: false, nullable: false
|
|
18
18
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class FinalizeNativeInvoiceResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::BillingInvoiceDetailResponseData }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class GetBillingSettingsResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::BillingSettingsResponseData }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class GetCompanyNativeSubscriptionResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::BillingNativeSubscriptionResponseData }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class GetNativeInvoiceResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::BillingInvoiceDetailResponseData }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -5,7 +5,7 @@ module Schematic
|
|
|
5
5
|
module Types
|
|
6
6
|
# Input parameters
|
|
7
7
|
class ListBillingPricesParams < Internal::Types::Model
|
|
8
|
-
field :currency, -> {
|
|
8
|
+
field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
|
|
9
9
|
|
|
10
10
|
field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
11
11
|
|
|
@@ -4,7 +4,7 @@ module Schematic
|
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
6
|
class ListBillingPricesRequest < Internal::Types::Model
|
|
7
|
-
field :currency, -> {
|
|
7
|
+
field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
|
|
8
8
|
|
|
9
9
|
field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ module Schematic
|
|
|
5
5
|
module Types
|
|
6
6
|
# Input parameters
|
|
7
7
|
class ListBillingProductPricesParams < Internal::Types::Model
|
|
8
|
-
field :currency, -> {
|
|
8
|
+
field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
|
|
9
9
|
|
|
10
10
|
field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
11
11
|
|
|
@@ -4,7 +4,7 @@ module Schematic
|
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
6
|
class ListBillingProductPricesRequest < Internal::Types::Model
|
|
7
|
-
field :currency, -> {
|
|
7
|
+
field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
|
|
8
8
|
|
|
9
9
|
field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
10
10
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
# Input parameters
|
|
7
|
+
class ListNativeInvoicesParams < Internal::Types::Model
|
|
8
|
+
field :company_id, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :contract_id, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :offset, -> { Integer }, optional: true, nullable: false
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class ListNativeInvoicesRequest < Internal::Types::Model
|
|
7
|
+
field :company_id, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :contract_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :offset, -> { Integer }, optional: true, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class ListNativeInvoicesResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Internal::Types::Array[Schematic::Types::BillingInvoiceResponseData] }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Schematic::Billing::Types::ListNativeInvoicesParams }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class MarkInvoicePaidRequestBody < Internal::Types::Model
|
|
7
|
+
field :invoice_id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :amount, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :idempotency_key, -> { String }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :reference, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :settled_at, -> { String }, optional: true, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class MarkNativeInvoicePaidResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::BillingInvoiceDetailResponseData }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class UpdateBillingSettingsRequestBody < Internal::Types::Model
|
|
7
|
+
field :default_provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class UpdateBillingSettingsResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::BillingSettingsResponseData }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class VoidNativeInvoiceResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::BillingInvoiceDetailResponseData }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -56,7 +56,15 @@ module Schematic
|
|
|
56
56
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::ListCatalogsResponse.load(response.body))
|
|
57
57
|
else
|
|
58
58
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
59
|
-
|
|
59
|
+
error_types = {
|
|
60
|
+
400 => Schematic::Types::ApiError,
|
|
61
|
+
401 => Schematic::Types::ApiError,
|
|
62
|
+
403 => Schematic::Types::ApiError,
|
|
63
|
+
404 => Schematic::Types::ApiError,
|
|
64
|
+
500 => Schematic::Types::ApiError
|
|
65
|
+
}
|
|
66
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
67
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
60
68
|
end
|
|
61
69
|
end
|
|
62
70
|
|
|
@@ -91,7 +99,15 @@ module Schematic
|
|
|
91
99
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::CreateCatalogResponse.load(response.body))
|
|
92
100
|
else
|
|
93
101
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
94
|
-
|
|
102
|
+
error_types = {
|
|
103
|
+
400 => Schematic::Types::ApiError,
|
|
104
|
+
401 => Schematic::Types::ApiError,
|
|
105
|
+
403 => Schematic::Types::ApiError,
|
|
106
|
+
404 => Schematic::Types::ApiError,
|
|
107
|
+
500 => Schematic::Types::ApiError
|
|
108
|
+
}
|
|
109
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
110
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
95
111
|
end
|
|
96
112
|
end
|
|
97
113
|
|
|
@@ -126,7 +142,14 @@ module Schematic
|
|
|
126
142
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetCatalogResponse.load(response.body))
|
|
127
143
|
else
|
|
128
144
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
129
|
-
|
|
145
|
+
error_types = {
|
|
146
|
+
401 => Schematic::Types::ApiError,
|
|
147
|
+
403 => Schematic::Types::ApiError,
|
|
148
|
+
404 => Schematic::Types::ApiError,
|
|
149
|
+
500 => Schematic::Types::ApiError
|
|
150
|
+
}
|
|
151
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
152
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
130
153
|
end
|
|
131
154
|
end
|
|
132
155
|
|
|
@@ -166,7 +189,15 @@ module Schematic
|
|
|
166
189
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::UpdateCatalogResponse.load(response.body))
|
|
167
190
|
else
|
|
168
191
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
169
|
-
|
|
192
|
+
error_types = {
|
|
193
|
+
400 => Schematic::Types::ApiError,
|
|
194
|
+
401 => Schematic::Types::ApiError,
|
|
195
|
+
403 => Schematic::Types::ApiError,
|
|
196
|
+
404 => Schematic::Types::ApiError,
|
|
197
|
+
500 => Schematic::Types::ApiError
|
|
198
|
+
}
|
|
199
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
200
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
170
201
|
end
|
|
171
202
|
end
|
|
172
203
|
|
|
@@ -201,7 +232,15 @@ module Schematic
|
|
|
201
232
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::DeleteCatalogResponse.load(response.body))
|
|
202
233
|
else
|
|
203
234
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
204
|
-
|
|
235
|
+
error_types = {
|
|
236
|
+
400 => Schematic::Types::ApiError,
|
|
237
|
+
401 => Schematic::Types::ApiError,
|
|
238
|
+
403 => Schematic::Types::ApiError,
|
|
239
|
+
404 => Schematic::Types::ApiError,
|
|
240
|
+
500 => Schematic::Types::ApiError
|
|
241
|
+
}
|
|
242
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
243
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
205
244
|
end
|
|
206
245
|
end
|
|
207
246
|
|
|
@@ -236,7 +275,14 @@ module Schematic
|
|
|
236
275
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetConfigurationResponse.load(response.body))
|
|
237
276
|
else
|
|
238
277
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
239
|
-
|
|
278
|
+
error_types = {
|
|
279
|
+
401 => Schematic::Types::ApiError,
|
|
280
|
+
403 => Schematic::Types::ApiError,
|
|
281
|
+
404 => Schematic::Types::ApiError,
|
|
282
|
+
500 => Schematic::Types::ApiError
|
|
283
|
+
}
|
|
284
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
285
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
240
286
|
end
|
|
241
287
|
end
|
|
242
288
|
|
|
@@ -276,7 +322,15 @@ module Schematic
|
|
|
276
322
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::UpdateConfigurationResponse.load(response.body))
|
|
277
323
|
else
|
|
278
324
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
279
|
-
|
|
325
|
+
error_types = {
|
|
326
|
+
400 => Schematic::Types::ApiError,
|
|
327
|
+
401 => Schematic::Types::ApiError,
|
|
328
|
+
403 => Schematic::Types::ApiError,
|
|
329
|
+
404 => Schematic::Types::ApiError,
|
|
330
|
+
500 => Schematic::Types::ApiError
|
|
331
|
+
}
|
|
332
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
333
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
280
334
|
end
|
|
281
335
|
end
|
|
282
336
|
|
|
@@ -311,7 +365,14 @@ module Schematic
|
|
|
311
365
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetCreditBundlesInCatalogResponse.load(response.body))
|
|
312
366
|
else
|
|
313
367
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
314
|
-
|
|
368
|
+
error_types = {
|
|
369
|
+
401 => Schematic::Types::ApiError,
|
|
370
|
+
403 => Schematic::Types::ApiError,
|
|
371
|
+
404 => Schematic::Types::ApiError,
|
|
372
|
+
500 => Schematic::Types::ApiError
|
|
373
|
+
}
|
|
374
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
375
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
315
376
|
end
|
|
316
377
|
end
|
|
317
378
|
|
|
@@ -349,7 +410,15 @@ module Schematic
|
|
|
349
410
|
return if code.between?(200, 299)
|
|
350
411
|
|
|
351
412
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
352
|
-
|
|
413
|
+
error_types = {
|
|
414
|
+
400 => Schematic::Types::ApiError,
|
|
415
|
+
401 => Schematic::Types::ApiError,
|
|
416
|
+
403 => Schematic::Types::ApiError,
|
|
417
|
+
404 => Schematic::Types::ApiError,
|
|
418
|
+
500 => Schematic::Types::ApiError
|
|
419
|
+
}
|
|
420
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
421
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
353
422
|
end
|
|
354
423
|
|
|
355
424
|
# @param request_options [Hash]
|
|
@@ -386,7 +455,15 @@ module Schematic
|
|
|
386
455
|
return if code.between?(200, 299)
|
|
387
456
|
|
|
388
457
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
389
|
-
|
|
458
|
+
error_types = {
|
|
459
|
+
400 => Schematic::Types::ApiError,
|
|
460
|
+
401 => Schematic::Types::ApiError,
|
|
461
|
+
403 => Schematic::Types::ApiError,
|
|
462
|
+
404 => Schematic::Types::ApiError,
|
|
463
|
+
500 => Schematic::Types::ApiError
|
|
464
|
+
}
|
|
465
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
466
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
390
467
|
end
|
|
391
468
|
|
|
392
469
|
# @param request_options [Hash]
|
|
@@ -420,7 +497,14 @@ module Schematic
|
|
|
420
497
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetDerivedFeaturesResponse.load(response.body))
|
|
421
498
|
else
|
|
422
499
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
423
|
-
|
|
500
|
+
error_types = {
|
|
501
|
+
401 => Schematic::Types::ApiError,
|
|
502
|
+
403 => Schematic::Types::ApiError,
|
|
503
|
+
404 => Schematic::Types::ApiError,
|
|
504
|
+
500 => Schematic::Types::ApiError
|
|
505
|
+
}
|
|
506
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
507
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
424
508
|
end
|
|
425
509
|
end
|
|
426
510
|
|
|
@@ -455,7 +539,14 @@ module Schematic
|
|
|
455
539
|
(response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetPlansInCatalogResponse.load(response.body))
|
|
456
540
|
else
|
|
457
541
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
458
|
-
|
|
542
|
+
error_types = {
|
|
543
|
+
401 => Schematic::Types::ApiError,
|
|
544
|
+
403 => Schematic::Types::ApiError,
|
|
545
|
+
404 => Schematic::Types::ApiError,
|
|
546
|
+
500 => Schematic::Types::ApiError
|
|
547
|
+
}
|
|
548
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
549
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
459
550
|
end
|
|
460
551
|
end
|
|
461
552
|
|
|
@@ -493,7 +584,15 @@ module Schematic
|
|
|
493
584
|
return if code.between?(200, 299)
|
|
494
585
|
|
|
495
586
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
496
|
-
|
|
587
|
+
error_types = {
|
|
588
|
+
400 => Schematic::Types::ApiError,
|
|
589
|
+
401 => Schematic::Types::ApiError,
|
|
590
|
+
403 => Schematic::Types::ApiError,
|
|
591
|
+
404 => Schematic::Types::ApiError,
|
|
592
|
+
500 => Schematic::Types::ApiError
|
|
593
|
+
}
|
|
594
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
595
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
497
596
|
end
|
|
498
597
|
|
|
499
598
|
# @param request_options [Hash]
|
|
@@ -530,7 +629,15 @@ module Schematic
|
|
|
530
629
|
return if code.between?(200, 299)
|
|
531
630
|
|
|
532
631
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
533
|
-
|
|
632
|
+
error_types = {
|
|
633
|
+
400 => Schematic::Types::ApiError,
|
|
634
|
+
401 => Schematic::Types::ApiError,
|
|
635
|
+
403 => Schematic::Types::ApiError,
|
|
636
|
+
404 => Schematic::Types::ApiError,
|
|
637
|
+
500 => Schematic::Types::ApiError
|
|
638
|
+
}
|
|
639
|
+
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
640
|
+
raise error_class.new(response.body, code: code, body: error_body)
|
|
534
641
|
end
|
|
535
642
|
end
|
|
536
643
|
end
|