diff --git a/.fern/metadata.json b/.fern/metadata.json index 98b6f0b..52502b3 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -13,6 +13,6 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "deb8532a1f84f6daa08b5c611a66a5ec92f53f0e", - "sdkVersion": "1.4.7" + "originGitCommit": "1c3370c354acf100ad68319d09b964e93635a3d5", + "sdkVersion": "1.4.8" } \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index b6a2a93..08b539c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - schematichq (1.4.7) + schematichq (1.4.8) wasmtime (>= 19.0) websocket (>= 1.2) @@ -19,7 +19,7 @@ GEM hashdiff (1.2.1) io-console (0.8.2) json (2.20.0) - language_server-protocol (3.17.0.5) + language_server-protocol (3.17.0.6) lint_roller (1.1.0) method_source (1.1.0) minitest (5.27.0) @@ -42,7 +42,7 @@ GEM reline (0.6.3) io-console (~> 0.5) rexml (3.4.4) - rubocop (1.88.0) + rubocop (1.88.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -53,7 +53,7 @@ GEM rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.49.1) + rubocop-ast (1.50.0) parser (>= 3.3.7.2) prism (~> 1.7) rubocop-minitest (0.39.1) diff --git a/lib/schematic.rb b/lib/schematic.rb index 82f4591..5e5eabe 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -185,6 +185,7 @@ require_relative "schematic/credits/types/extend_credit_lease_response" require_relative "schematic/credits/types/release_credit_lease_response" require_relative "schematic/credits/types/list_billing_plan_credit_grants_params" +require_relative "schematic/types/billing_credit_auto_topup_availability" require_relative "schematic/types/billing_plan_credit_grant_reset_start" require_relative "schematic/types/billing_plan_credit_grant_reset_type" require_relative "schematic/types/preview_object_response_data" @@ -304,6 +305,12 @@ require_relative "schematic/companies/types/delete_company_by_keys_response" require_relative "schematic/companies/types/lookup_company_params" require_relative "schematic/companies/types/lookup_company_response" +require_relative "schematic/companies/types/get_company_billing_entity_params" +require_relative "schematic/types/company_billing_entity_response_data" +require_relative "schematic/companies/types/get_company_billing_entity_response" +require_relative "schematic/companies/types/get_billing_entity_child_subscriptions_params" +require_relative "schematic/types/company_billing_entity_subscription_response_data" +require_relative "schematic/companies/types/get_billing_entity_child_subscriptions_response" require_relative "schematic/companies/types/list_company_memberships_params" require_relative "schematic/types/company_membership_detail_response_data" require_relative "schematic/companies/types/list_company_memberships_response" @@ -804,6 +811,8 @@ require_relative "schematic/companies/types/delete_company_request" require_relative "schematic/companies/types/count_companies_request" require_relative "schematic/companies/types/lookup_company_request" +require_relative "schematic/companies/types/get_company_billing_entity_request" +require_relative "schematic/companies/types/get_billing_entity_child_subscriptions_request" require_relative "schematic/companies/types/list_company_memberships_request" require_relative "schematic/companies/types/get_or_create_company_membership_request_body" require_relative "schematic/companies/types/get_active_company_subscription_request" diff --git a/lib/schematic/billing/types/create_billing_subscription_request_body.rb b/lib/schematic/billing/types/create_billing_subscription_request_body.rb index 2324931..0e50ff7 100644 --- a/lib/schematic/billing/types/create_billing_subscription_request_body.rb +++ b/lib/schematic/billing/types/create_billing_subscription_request_body.rb @@ -7,6 +7,7 @@ class CreateBillingSubscriptionRequestBody < Internal::Types::Model field :application_id, -> { String }, optional: true, nullable: false field :cancel_at, -> { Integer }, optional: true, nullable: false field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false field :currency, -> { String }, optional: false, nullable: false field :customer_external_id, -> { String }, optional: false, nullable: false field :default_payment_method_external_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/client.rb b/lib/schematic/client.rb index 3ffa35a..a65dc1a 100644 --- a/lib/schematic/client.rb +++ b/lib/schematic/client.rb @@ -10,7 +10,7 @@ def initialize(api_key:, base_url: nil) @raw_client = Schematic::Internal::Http::RawClient.new( base_url: base_url || Schematic::Environment::DEFAULT, headers: { - "User-Agent" => "schematichq/1.4.7", + "User-Agent" => "schematichq/1.4.8", "X-Fern-Language" => "Ruby", "X-Schematic-Api-Key" => api_key.to_s } diff --git a/lib/schematic/companies/client.rb b/lib/schematic/companies/client.rb index 468217e..897c049 100644 --- a/lib/schematic/companies/client.rb +++ b/lib/schematic/companies/client.rb @@ -375,6 +375,82 @@ def lookup_company(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :company_id + # + # @return [Schematic::Companies::Types::GetCompanyBillingEntityResponse] + def get_company_billing_entity(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[company_id] + query_params = {} + query_params["company_id"] = params[:company_id] if params.key?(:company_id) + params.except(*query_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "company-billing-entity", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Companies::Types::GetCompanyBillingEntityResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :company_id + # + # @return [Schematic::Companies::Types::GetBillingEntityChildSubscriptionsResponse] + def get_billing_entity_child_subscriptions(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_param_names = %i[company_id] + query_params = {} + query_params["company_id"] = params[:company_id] if params.key?(:company_id) + params.except(*query_param_names) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "company-billing-entity-subscriptions", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Companies::Types::GetBillingEntityChildSubscriptionsResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url diff --git a/lib/schematic/companies/types/get_billing_entity_child_subscriptions_params.rb b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_params.rb new file mode 100644 index 0000000..af19c38 --- /dev/null +++ b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_params.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + # Input parameters + class GetBillingEntityChildSubscriptionsParams < Internal::Types::Model + field :company_id, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/companies/types/get_billing_entity_child_subscriptions_request.rb b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_request.rb new file mode 100644 index 0000000..dacfe34 --- /dev/null +++ b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_request.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + class GetBillingEntityChildSubscriptionsRequest < Internal::Types::Model + field :company_id, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/companies/types/get_billing_entity_child_subscriptions_response.rb b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_response.rb new file mode 100644 index 0000000..27fa9d8 --- /dev/null +++ b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + class GetBillingEntityChildSubscriptionsResponse < Internal::Types::Model + field :data, -> { Internal::Types::Array[Schematic::Types::CompanyBillingEntitySubscriptionResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::GetBillingEntityChildSubscriptionsParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/companies/types/get_company_billing_entity_params.rb b/lib/schematic/companies/types/get_company_billing_entity_params.rb new file mode 100644 index 0000000..504d2a3 --- /dev/null +++ b/lib/schematic/companies/types/get_company_billing_entity_params.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + # Input parameters + class GetCompanyBillingEntityParams < Internal::Types::Model + field :company_id, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/companies/types/get_company_billing_entity_request.rb b/lib/schematic/companies/types/get_company_billing_entity_request.rb new file mode 100644 index 0000000..ad748b3 --- /dev/null +++ b/lib/schematic/companies/types/get_company_billing_entity_request.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + class GetCompanyBillingEntityRequest < Internal::Types::Model + field :company_id, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/companies/types/get_company_billing_entity_response.rb b/lib/schematic/companies/types/get_company_billing_entity_response.rb new file mode 100644 index 0000000..20b9b9a --- /dev/null +++ b/lib/schematic/companies/types/get_company_billing_entity_response.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Schematic + module Companies + module Types + class GetCompanyBillingEntityResponse < Internal::Types::Model + field :data, -> { Internal::Types::Array[Schematic::Types::CompanyBillingEntityResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::GetCompanyBillingEntityParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/types/billing_credit_auto_topup_availability.rb b/lib/schematic/types/billing_credit_auto_topup_availability.rb new file mode 100644 index 0000000..29064a2 --- /dev/null +++ b/lib/schematic/types/billing_credit_auto_topup_availability.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + module BillingCreditAutoTopupAvailability + extend Schematic::Internal::Types::Enum + + OFF = "off" + AUTOMATIC = "automatic" + USER_CONTROLLED = "user_controlled" + end + end +end diff --git a/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb b/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb index 2952c76..4a1d5a3 100644 --- a/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb +++ b/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb @@ -5,7 +5,9 @@ module Types module BillingCreditGrantZeroedOutReason extend Schematic::Internal::Types::Enum + CUSTOMER_ARCHIVED = "customer_archived" EXPIRED = "expired" + INTEGRATION_UNINSTALLED = "integration_uninstalled" MANUAL = "manual" PLAN_CHANGE = "plan_change" PLAN_PERIOD_RESET = "plan_period_reset" diff --git a/lib/schematic/types/billing_plan_credit_grant_response_data.rb b/lib/schematic/types/billing_plan_credit_grant_response_data.rb index 4c4b7a7..113dc01 100644 --- a/lib/schematic/types/billing_plan_credit_grant_response_data.rb +++ b/lib/schematic/types/billing_plan_credit_grant_response_data.rb @@ -5,6 +5,7 @@ module Types class BillingPlanCreditGrantResponseData < Internal::Types::Model field :auto_topup_amount, -> { Integer }, optional: true, nullable: false field :auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: false, nullable: false field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false @@ -12,6 +13,7 @@ class BillingPlanCreditGrantResponseData < Internal::Types::Model field :auto_topup_self_service, -> { Internal::Types::Boolean }, optional: false, nullable: false field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit, -> { Schematic::Types::BillingCreditResponseData }, optional: true, nullable: false field :credit_amount, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/change_subscription_internal_request_body.rb b/lib/schematic/types/change_subscription_internal_request_body.rb index c5a5fb0..6273b3b 100644 --- a/lib/schematic/types/change_subscription_internal_request_body.rb +++ b/lib/schematic/types/change_subscription_internal_request_body.rb @@ -5,6 +5,7 @@ module Types class ChangeSubscriptionInternalRequestBody < Internal::Types::Model field :add_on_ids, -> { Internal::Types::Array[Schematic::Types::UpdateAddOnRequestBody] }, optional: false, nullable: false field :auto_topup_overrides, -> { Internal::Types::Array[Schematic::Types::UpdateAutoTopupOverrideRequestBody] }, optional: false, nullable: false + field :billing_entity_id, -> { String }, optional: true, nullable: false field :company_id, -> { String }, optional: false, nullable: false field :coupon_external_id, -> { String }, optional: true, nullable: false field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false diff --git a/lib/schematic/types/change_subscription_request_body.rb b/lib/schematic/types/change_subscription_request_body.rb index 9f3ee23..38c70ae 100644 --- a/lib/schematic/types/change_subscription_request_body.rb +++ b/lib/schematic/types/change_subscription_request_body.rb @@ -5,6 +5,7 @@ module Types class ChangeSubscriptionRequestBody < Internal::Types::Model field :add_on_ids, -> { Internal::Types::Array[Schematic::Types::UpdateAddOnRequestBody] }, optional: false, nullable: false field :auto_topup_overrides, -> { Internal::Types::Array[Schematic::Types::UpdateAutoTopupOverrideRequestBody] }, optional: false, nullable: false + field :billing_entity_id, -> { String }, optional: true, nullable: false field :coupon_external_id, -> { String }, optional: true, nullable: false field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false diff --git a/lib/schematic/types/company_billing_entity_response_data.rb b/lib/schematic/types/company_billing_entity_response_data.rb new file mode 100644 index 0000000..936bd92 --- /dev/null +++ b/lib/schematic/types/company_billing_entity_response_data.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CompanyBillingEntityResponseData < Internal::Types::Model + field :billing_entity, -> { Schematic::Types::CompanyResponseData }, optional: true, nullable: false + field :has_own_stripe_customer, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/company_billing_entity_subscription_response_data.rb b/lib/schematic/types/company_billing_entity_subscription_response_data.rb new file mode 100644 index 0000000..676f898 --- /dev/null +++ b/lib/schematic/types/company_billing_entity_subscription_response_data.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module Schematic + module Types + class CompanyBillingEntitySubscriptionResponseData < Internal::Types::Model + field :cancel_at, -> { String }, optional: true, nullable: false + field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company, -> { Schematic::Types::CompanyResponseData }, optional: true, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :discounts, -> { Internal::Types::Array[Schematic::Types::BillingSubscriptionDiscountView] }, optional: false, nullable: false + field :expired_at, -> { String }, optional: true, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :is_initial, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :latest_invoice, -> { Schematic::Types::InvoiceResponseData }, optional: true, nullable: false + field :payment_method, -> { Schematic::Types::PaymentMethodResponseData }, optional: true, nullable: false + field :plan_name, -> { String }, optional: false, nullable: false + field :products, -> { Internal::Types::Array[Schematic::Types::BillingProductForSubscriptionResponseData] }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :status, -> { String }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: false, nullable: false + field :total_price, -> { Integer }, optional: false, nullable: false + field :trial_end, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/company_plan_credit_grant_view.rb b/lib/schematic/types/company_plan_credit_grant_view.rb index 5c5b34b..8ed4501 100644 --- a/lib/schematic/types/company_plan_credit_grant_view.rb +++ b/lib/schematic/types/company_plan_credit_grant_view.rb @@ -5,6 +5,7 @@ module Types class CompanyPlanCreditGrantView < Internal::Types::Model field :billing_credit_auto_topup_amount, -> { Integer }, optional: true, nullable: false field :billing_credit_auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :billing_credit_auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false field :billing_credit_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false field :billing_credit_auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :billing_credit_auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false @@ -12,6 +13,7 @@ class CompanyPlanCreditGrantView < Internal::Types::Model field :billing_credit_auto_topup_self_service, -> { Internal::Types::Boolean }, optional: false, nullable: false field :billing_credit_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :billing_credit_auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :billing_credit_can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false field :company_auto_topup_amount, -> { Integer }, optional: true, nullable: false field :company_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false field :company_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false diff --git a/lib/schematic/types/company_plan_detail_response_data.rb b/lib/schematic/types/company_plan_detail_response_data.rb index 9d4c56d..bfa4e2c 100644 --- a/lib/schematic/types/company_plan_detail_response_data.rb +++ b/lib/schematic/types/company_plan_detail_response_data.rb @@ -13,11 +13,13 @@ class CompanyPlanDetailResponseData < Internal::Types::Model field :company_can_trial, -> { Internal::Types::Boolean }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false field :company_id, -> { String }, optional: true, nullable: false + field :company_logo_url, -> { String }, optional: true, nullable: false field :company_name, -> { String }, optional: true, nullable: false field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false field :copied_from_plan_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false + field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false field :current, -> { Internal::Types::Boolean }, optional: false, nullable: false field :custom, -> { Internal::Types::Boolean }, optional: false, nullable: false diff --git a/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb b/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb index 5699cec..8d590da 100644 --- a/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +++ b/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb @@ -6,6 +6,7 @@ class CreateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :apply_to_existing, -> { Internal::Types::Boolean }, optional: true, nullable: false field :auto_topup_amount, -> { Integer }, optional: true, nullable: false field :auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false @@ -13,6 +14,7 @@ class CreateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :auto_topup_self_service, -> { Internal::Types::Boolean }, optional: true, nullable: false field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false field :credit_amount, -> { Integer }, optional: false, nullable: false field :credit_id, -> { String }, optional: false, nullable: false field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false diff --git a/lib/schematic/types/integrations_list_response_data.rb b/lib/schematic/types/integrations_list_response_data.rb index d58d58d..edfd46b 100644 --- a/lib/schematic/types/integrations_list_response_data.rb +++ b/lib/schematic/types/integrations_list_response_data.rb @@ -8,6 +8,7 @@ class IntegrationsListResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false field :is_app_install, -> { Internal::Types::Boolean }, optional: false, nullable: false field :is_connect_install, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :last_webhook_received_at, -> { String }, optional: true, nullable: false field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false end diff --git a/lib/schematic/types/manage_plan_request.rb b/lib/schematic/types/manage_plan_request.rb index 3e5a652..967f7d0 100644 --- a/lib/schematic/types/manage_plan_request.rb +++ b/lib/schematic/types/manage_plan_request.rb @@ -7,6 +7,7 @@ class ManagePlanRequest < Internal::Types::Model field :base_plan_id, -> { String }, optional: true, nullable: false field :base_plan_price_id, -> { String }, optional: true, nullable: false field :base_plan_version_id, -> { String }, optional: true, nullable: false + field :billing_entity_id, -> { String }, optional: true, nullable: false field :cancel_immediately, -> { Internal::Types::Boolean }, optional: true, nullable: false field :company_id, -> { String }, optional: false, nullable: false field :coupon_external_id, -> { String }, optional: true, nullable: false diff --git a/lib/schematic/types/metronome_integration_config.rb b/lib/schematic/types/metronome_integration_config.rb index 2ce7d00..c7eb040 100644 --- a/lib/schematic/types/metronome_integration_config.rb +++ b/lib/schematic/types/metronome_integration_config.rb @@ -2,6 +2,8 @@ module Schematic module Types - class MetronomeIntegrationConfig < Internal::Types::Model; end + class MetronomeIntegrationConfig < Internal::Types::Model + field :external_customer_id_key, -> { String }, optional: true, nullable: false + end end end diff --git a/lib/schematic/types/plan_credit_grant_view.rb b/lib/schematic/types/plan_credit_grant_view.rb index cf16e36..5e18889 100644 --- a/lib/schematic/types/plan_credit_grant_view.rb +++ b/lib/schematic/types/plan_credit_grant_view.rb @@ -5,6 +5,7 @@ module Types class PlanCreditGrantView < Internal::Types::Model field :billing_credit_auto_topup_amount, -> { Integer }, optional: true, nullable: false field :billing_credit_auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :billing_credit_auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false field :billing_credit_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false field :billing_credit_auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :billing_credit_auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false @@ -12,6 +13,7 @@ class PlanCreditGrantView < Internal::Types::Model field :billing_credit_auto_topup_self_service, -> { Internal::Types::Boolean }, optional: false, nullable: false field :billing_credit_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :billing_credit_auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :billing_credit_can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false field :created_at, -> { String }, optional: false, nullable: false field :credit, -> { Schematic::Types::BillingCreditView }, optional: true, nullable: false field :credit_amount, -> { Integer }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_detail_response_data.rb b/lib/schematic/types/plan_detail_response_data.rb index 4f52851..81b680d 100644 --- a/lib/schematic/types/plan_detail_response_data.rb +++ b/lib/schematic/types/plan_detail_response_data.rb @@ -11,10 +11,12 @@ class PlanDetailResponseData < Internal::Types::Model field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false field :company_id, -> { String }, optional: true, nullable: false + field :company_logo_url, -> { String }, optional: true, nullable: false field :company_name, -> { String }, optional: true, nullable: false field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false field :copied_from_plan_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false + field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false field :description, -> { String }, optional: false, nullable: false field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false diff --git a/lib/schematic/types/plan_group_plan_detail_response_data.rb b/lib/schematic/types/plan_group_plan_detail_response_data.rb index bdc0374..da72382 100644 --- a/lib/schematic/types/plan_group_plan_detail_response_data.rb +++ b/lib/schematic/types/plan_group_plan_detail_response_data.rb @@ -12,11 +12,13 @@ class PlanGroupPlanDetailResponseData < Internal::Types::Model field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false field :company_id, -> { String }, optional: true, nullable: false + field :company_logo_url, -> { String }, optional: true, nullable: false field :company_name, -> { String }, optional: true, nullable: false field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false field :copied_from_plan_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false + field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false field :custom_plan_config, -> { Schematic::Types::CustomPlanViewConfigResponseData }, optional: true, nullable: false field :description, -> { String }, optional: false, nullable: false diff --git a/lib/schematic/types/plan_view_public_response_data.rb b/lib/schematic/types/plan_view_public_response_data.rb index 7d726ab..ee7162a 100644 --- a/lib/schematic/types/plan_view_public_response_data.rb +++ b/lib/schematic/types/plan_view_public_response_data.rb @@ -12,11 +12,13 @@ class PlanViewPublicResponseData < Internal::Types::Model field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false field :company_count, -> { Integer }, optional: false, nullable: false field :company_id, -> { String }, optional: true, nullable: false + field :company_logo_url, -> { String }, optional: true, nullable: false field :company_name, -> { String }, optional: true, nullable: false field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false field :copied_from_plan_id, -> { String }, optional: true, nullable: false field :created_at, -> { String }, optional: false, nullable: false + field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false field :custom, -> { Internal::Types::Boolean }, optional: false, nullable: false field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false diff --git a/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb b/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb index 0014c49..9783ae2 100644 --- a/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +++ b/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb @@ -6,6 +6,7 @@ class UpdateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :apply_to_existing, -> { Internal::Types::Boolean }, optional: true, nullable: false field :auto_topup_amount, -> { Integer }, optional: true, nullable: false field :auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false @@ -13,6 +14,7 @@ class UpdateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :auto_topup_self_service, -> { Internal::Types::Boolean }, optional: true, nullable: false field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false field :credit_amount, -> { Integer }, optional: true, nullable: false field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false diff --git a/lib/schematic/version.rb b/lib/schematic/version.rb index dc70e40..c3c9dd8 100644 --- a/lib/schematic/version.rb +++ b/lib/schematic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Schematic - VERSION = "1.4.7" + VERSION = "1.4.8" end diff --git a/reference.md b/reference.md index 430093f..b93d621 100644 --- a/reference.md +++ b/reference.md @@ -3689,6 +3689,14 @@ client.billing.upsert_billing_subscription(
client.companies.get_company_billing_entity() -> Schematic::Companies::Types::GetCompanyBillingEntityResponseclient.companies.get_billing_entity_child_subscriptions() -> Schematic::Companies::Types::GetBillingEntityChildSubscriptionsResponse