schematichq 1.4.7 → 1.4.8

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +2 -2
  3. data/lib/schematic/billing/types/create_billing_subscription_request_body.rb +1 -0
  4. data/lib/schematic/client.rb +1 -1
  5. data/lib/schematic/companies/client.rb +76 -0
  6. data/lib/schematic/companies/types/get_billing_entity_child_subscriptions_params.rb +12 -0
  7. data/lib/schematic/companies/types/get_billing_entity_child_subscriptions_request.rb +11 -0
  8. data/lib/schematic/companies/types/get_billing_entity_child_subscriptions_response.rb +12 -0
  9. data/lib/schematic/companies/types/get_company_billing_entity_params.rb +12 -0
  10. data/lib/schematic/companies/types/get_company_billing_entity_request.rb +11 -0
  11. data/lib/schematic/companies/types/get_company_billing_entity_response.rb +12 -0
  12. data/lib/schematic/types/billing_credit_auto_topup_availability.rb +13 -0
  13. data/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb +2 -0
  14. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +2 -0
  15. data/lib/schematic/types/change_subscription_internal_request_body.rb +1 -0
  16. data/lib/schematic/types/change_subscription_request_body.rb +1 -0
  17. data/lib/schematic/types/company_billing_entity_response_data.rb +10 -0
  18. data/lib/schematic/types/company_billing_entity_subscription_response_data.rb +26 -0
  19. data/lib/schematic/types/company_plan_credit_grant_view.rb +2 -0
  20. data/lib/schematic/types/company_plan_detail_response_data.rb +2 -0
  21. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +2 -0
  22. data/lib/schematic/types/integrations_list_response_data.rb +1 -0
  23. data/lib/schematic/types/manage_plan_request.rb +1 -0
  24. data/lib/schematic/types/metronome_integration_config.rb +3 -1
  25. data/lib/schematic/types/plan_credit_grant_view.rb +2 -0
  26. data/lib/schematic/types/plan_detail_response_data.rb +2 -0
  27. data/lib/schematic/types/plan_group_plan_detail_response_data.rb +2 -0
  28. data/lib/schematic/types/plan_view_public_response_data.rb +2 -0
  29. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +2 -0
  30. data/lib/schematic/version.rb +1 -1
  31. data/lib/schematic.rb +9 -0
  32. data/reference.md +104 -0
  33. metadata +11 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 147ed2b231e426be9baeb193b6df03a45085146282a4aeca5458de1e69961c9a
4
- data.tar.gz: d9fec704e684f3afbedbd53bb6dd8ff3c6d6fd8f57a264b7436b6d9b1f086faa
3
+ metadata.gz: 36bcd47c40d3cd4cf1406cd9c468fdb825e820ea052dd6375b06fd0fd2a28026
4
+ data.tar.gz: a9469ee307dcd2f19271d563a948b33d8abafffae8efa933b80eeeaa71c3708e
5
5
  SHA512:
6
- metadata.gz: a6870cce9b8a40d6cd349c00501c7bed7bffc544fc33dbcc921325e729d58d0b4c64608cdf9dc4a85c6e412596364a386659b7dedca44dbaeb0acf0dd02b2a46
7
- data.tar.gz: 0dab7ee072ece36d58913ae28968ca640033e1c4e76e644584e960a53122bbe1883f338291984f3730ab49c661fd81d66aa6d1e24f98f5948d6630354af15b5a
6
+ metadata.gz: 266d456ba8ee109c9e666fd1754b4f88f2b2de54cd893a5f1341265e58dd5da8b399dcf217c56e875fed6db60cbbeee34c400a30a47afdcd4828da9644e5d582
7
+ data.tar.gz: 18a408a807a8c49766a96bf2fa84633810ec06119552298e67afc991ce66d1cedb44203d75a247ae8d79c2d12c22f9d32632febff24102bc0a7808d00bbdee58
data/.fern/metadata.json CHANGED
@@ -13,6 +13,6 @@
13
13
  "webrick": ">= 1.0"
14
14
  }
15
15
  },
16
- "originGitCommit": "deb8532a1f84f6daa08b5c611a66a5ec92f53f0e",
17
- "sdkVersion": "1.4.7"
16
+ "originGitCommit": "1c3370c354acf100ad68319d09b964e93635a3d5",
17
+ "sdkVersion": "1.4.8"
18
18
  }
@@ -7,6 +7,7 @@ module Schematic
7
7
  field :application_id, -> { String }, optional: true, nullable: false
8
8
  field :cancel_at, -> { Integer }, optional: true, nullable: false
9
9
  field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false
10
+ field :company_id, -> { String }, optional: true, nullable: false
10
11
  field :currency, -> { String }, optional: false, nullable: false
11
12
  field :customer_external_id, -> { String }, optional: false, nullable: false
12
13
  field :default_payment_method_external_id, -> { String }, optional: true, nullable: false
@@ -10,7 +10,7 @@ module Schematic
10
10
  @raw_client = Schematic::Internal::Http::RawClient.new(
11
11
  base_url: base_url || Schematic::Environment::DEFAULT,
12
12
  headers: {
13
- "User-Agent" => "schematichq/1.4.7",
13
+ "User-Agent" => "schematichq/1.4.8",
14
14
  "X-Fern-Language" => "Ruby",
15
15
  "X-Schematic-Api-Key" => api_key.to_s
16
16
  }
@@ -375,6 +375,82 @@ module Schematic
375
375
  end
376
376
  end
377
377
 
378
+ # @param request_options [Hash]
379
+ # @param params [Hash]
380
+ # @option request_options [String] :base_url
381
+ # @option request_options [Hash{String => Object}] :additional_headers
382
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
383
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
384
+ # @option request_options [Integer] :timeout_in_seconds
385
+ # @option params [String, nil] :company_id
386
+ #
387
+ # @return [Schematic::Companies::Types::GetCompanyBillingEntityResponse]
388
+ def get_company_billing_entity(request_options: {}, **params)
389
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
390
+ query_param_names = %i[company_id]
391
+ query_params = {}
392
+ query_params["company_id"] = params[:company_id] if params.key?(:company_id)
393
+ params.except(*query_param_names)
394
+
395
+ request = Schematic::Internal::JSON::Request.new(
396
+ base_url: request_options[:base_url],
397
+ method: "GET",
398
+ path: "company-billing-entity",
399
+ query: query_params,
400
+ request_options: request_options
401
+ )
402
+ begin
403
+ response = @client.send(request)
404
+ rescue Net::HTTPRequestTimeout
405
+ raise Schematic::Errors::TimeoutError
406
+ end
407
+ code = response.code.to_i
408
+ if code.between?(200, 299)
409
+ Schematic::Companies::Types::GetCompanyBillingEntityResponse.load(response.body)
410
+ else
411
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
412
+ raise error_class.new(response.body, code: code)
413
+ end
414
+ end
415
+
416
+ # @param request_options [Hash]
417
+ # @param params [Hash]
418
+ # @option request_options [String] :base_url
419
+ # @option request_options [Hash{String => Object}] :additional_headers
420
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
421
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
422
+ # @option request_options [Integer] :timeout_in_seconds
423
+ # @option params [String, nil] :company_id
424
+ #
425
+ # @return [Schematic::Companies::Types::GetBillingEntityChildSubscriptionsResponse]
426
+ def get_billing_entity_child_subscriptions(request_options: {}, **params)
427
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
428
+ query_param_names = %i[company_id]
429
+ query_params = {}
430
+ query_params["company_id"] = params[:company_id] if params.key?(:company_id)
431
+ params.except(*query_param_names)
432
+
433
+ request = Schematic::Internal::JSON::Request.new(
434
+ base_url: request_options[:base_url],
435
+ method: "GET",
436
+ path: "company-billing-entity-subscriptions",
437
+ query: query_params,
438
+ request_options: request_options
439
+ )
440
+ begin
441
+ response = @client.send(request)
442
+ rescue Net::HTTPRequestTimeout
443
+ raise Schematic::Errors::TimeoutError
444
+ end
445
+ code = response.code.to_i
446
+ if code.between?(200, 299)
447
+ Schematic::Companies::Types::GetBillingEntityChildSubscriptionsResponse.load(response.body)
448
+ else
449
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
450
+ raise error_class.new(response.body, code: code)
451
+ end
452
+ end
453
+
378
454
  # @param request_options [Hash]
379
455
  # @param params [Hash]
380
456
  # @option request_options [String] :base_url
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ # Input parameters
7
+ class GetBillingEntityChildSubscriptionsParams < Internal::Types::Model
8
+ field :company_id, -> { String }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class GetBillingEntityChildSubscriptionsRequest < Internal::Types::Model
7
+ field :company_id, -> { String }, optional: true, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class GetBillingEntityChildSubscriptionsResponse < Internal::Types::Model
7
+ field :data, -> { Internal::Types::Array[Schematic::Types::CompanyBillingEntitySubscriptionResponseData] }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Companies::Types::GetBillingEntityChildSubscriptionsParams }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ # Input parameters
7
+ class GetCompanyBillingEntityParams < Internal::Types::Model
8
+ field :company_id, -> { String }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class GetCompanyBillingEntityRequest < Internal::Types::Model
7
+ field :company_id, -> { String }, optional: true, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class GetCompanyBillingEntityResponse < Internal::Types::Model
7
+ field :data, -> { Internal::Types::Array[Schematic::Types::CompanyBillingEntityResponseData] }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Companies::Types::GetCompanyBillingEntityParams }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module BillingCreditAutoTopupAvailability
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ OFF = "off"
9
+ AUTOMATIC = "automatic"
10
+ USER_CONTROLLED = "user_controlled"
11
+ end
12
+ end
13
+ end
@@ -5,7 +5,9 @@ module Schematic
5
5
  module BillingCreditGrantZeroedOutReason
6
6
  extend Schematic::Internal::Types::Enum
7
7
 
8
+ CUSTOMER_ARCHIVED = "customer_archived"
8
9
  EXPIRED = "expired"
10
+ INTEGRATION_UNINSTALLED = "integration_uninstalled"
9
11
  MANUAL = "manual"
10
12
  PLAN_CHANGE = "plan_change"
11
13
  PLAN_PERIOD_RESET = "plan_period_reset"
@@ -5,6 +5,7 @@ module Schematic
5
5
  class BillingPlanCreditGrantResponseData < Internal::Types::Model
6
6
  field :auto_topup_amount, -> { Integer }, optional: true, nullable: false
7
7
  field :auto_topup_amount_type, -> { String }, optional: true, nullable: false
8
+ field :auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: false, nullable: false
8
9
  field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
10
  field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
10
11
  field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
@@ -12,6 +13,7 @@ module Schematic
12
13
  field :auto_topup_self_service, -> { Internal::Types::Boolean }, optional: false, nullable: false
13
14
  field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false
14
15
  field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false
16
+ field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false
15
17
  field :created_at, -> { String }, optional: false, nullable: false
16
18
  field :credit, -> { Schematic::Types::BillingCreditResponseData }, optional: true, nullable: false
17
19
  field :credit_amount, -> { Integer }, optional: false, nullable: false
@@ -5,6 +5,7 @@ module Schematic
5
5
  class ChangeSubscriptionInternalRequestBody < Internal::Types::Model
6
6
  field :add_on_ids, -> { Internal::Types::Array[Schematic::Types::UpdateAddOnRequestBody] }, optional: false, nullable: false
7
7
  field :auto_topup_overrides, -> { Internal::Types::Array[Schematic::Types::UpdateAutoTopupOverrideRequestBody] }, optional: false, nullable: false
8
+ field :billing_entity_id, -> { String }, optional: true, nullable: false
8
9
  field :company_id, -> { String }, optional: false, nullable: false
9
10
  field :coupon_external_id, -> { String }, optional: true, nullable: false
10
11
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false
@@ -5,6 +5,7 @@ module Schematic
5
5
  class ChangeSubscriptionRequestBody < Internal::Types::Model
6
6
  field :add_on_ids, -> { Internal::Types::Array[Schematic::Types::UpdateAddOnRequestBody] }, optional: false, nullable: false
7
7
  field :auto_topup_overrides, -> { Internal::Types::Array[Schematic::Types::UpdateAutoTopupOverrideRequestBody] }, optional: false, nullable: false
8
+ field :billing_entity_id, -> { String }, optional: true, nullable: false
8
9
  field :coupon_external_id, -> { String }, optional: true, nullable: false
9
10
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false
10
11
  field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CompanyBillingEntityResponseData < Internal::Types::Model
6
+ field :billing_entity, -> { Schematic::Types::CompanyResponseData }, optional: true, nullable: false
7
+ field :has_own_stripe_customer, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CompanyBillingEntitySubscriptionResponseData < Internal::Types::Model
6
+ field :cancel_at, -> { String }, optional: true, nullable: false
7
+ field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ field :company, -> { Schematic::Types::CompanyResponseData }, optional: true, nullable: false
9
+ field :currency, -> { String }, optional: false, nullable: false
10
+ field :customer_external_id, -> { String }, optional: false, nullable: false
11
+ field :discounts, -> { Internal::Types::Array[Schematic::Types::BillingSubscriptionDiscountView] }, optional: false, nullable: false
12
+ field :expired_at, -> { String }, optional: true, nullable: false
13
+ field :interval, -> { String }, optional: false, nullable: false
14
+ field :is_initial, -> { Internal::Types::Boolean }, optional: false, nullable: false
15
+ field :latest_invoice, -> { Schematic::Types::InvoiceResponseData }, optional: true, nullable: false
16
+ field :payment_method, -> { Schematic::Types::PaymentMethodResponseData }, optional: true, nullable: false
17
+ field :plan_name, -> { String }, optional: false, nullable: false
18
+ field :products, -> { Internal::Types::Array[Schematic::Types::BillingProductForSubscriptionResponseData] }, optional: false, nullable: false
19
+ field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false
20
+ field :status, -> { String }, optional: false, nullable: false
21
+ field :subscription_external_id, -> { String }, optional: false, nullable: false
22
+ field :total_price, -> { Integer }, optional: false, nullable: false
23
+ field :trial_end, -> { String }, optional: true, nullable: false
24
+ end
25
+ end
26
+ end
@@ -5,6 +5,7 @@ module Schematic
5
5
  class CompanyPlanCreditGrantView < Internal::Types::Model
6
6
  field :billing_credit_auto_topup_amount, -> { Integer }, optional: true, nullable: false
7
7
  field :billing_credit_auto_topup_amount_type, -> { String }, optional: true, nullable: false
8
+ field :billing_credit_auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false
8
9
  field :billing_credit_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
10
  field :billing_credit_auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
10
11
  field :billing_credit_auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
@@ -12,6 +13,7 @@ module Schematic
12
13
  field :billing_credit_auto_topup_self_service, -> { Internal::Types::Boolean }, optional: false, nullable: false
13
14
  field :billing_credit_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false
14
15
  field :billing_credit_auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false
16
+ field :billing_credit_can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false
15
17
  field :company_auto_topup_amount, -> { Integer }, optional: true, nullable: false
16
18
  field :company_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
17
19
  field :company_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false
@@ -13,11 +13,13 @@ module Schematic
13
13
  field :company_can_trial, -> { Internal::Types::Boolean }, optional: false, nullable: false
14
14
  field :company_count, -> { Integer }, optional: false, nullable: false
15
15
  field :company_id, -> { String }, optional: true, nullable: false
16
+ field :company_logo_url, -> { String }, optional: true, nullable: false
16
17
  field :company_name, -> { String }, optional: true, nullable: false
17
18
  field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
18
19
  field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false
19
20
  field :copied_from_plan_id, -> { String }, optional: true, nullable: false
20
21
  field :created_at, -> { String }, optional: false, nullable: false
22
+ field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false
21
23
  field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false
22
24
  field :current, -> { Internal::Types::Boolean }, optional: false, nullable: false
23
25
  field :custom, -> { Internal::Types::Boolean }, optional: false, nullable: false
@@ -6,6 +6,7 @@ module Schematic
6
6
  field :apply_to_existing, -> { Internal::Types::Boolean }, optional: true, nullable: false
7
7
  field :auto_topup_amount, -> { Integer }, optional: true, nullable: false
8
8
  field :auto_topup_amount_type, -> { String }, optional: true, nullable: false
9
+ field :auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false
9
10
  field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
10
11
  field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
11
12
  field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
@@ -13,6 +14,7 @@ module Schematic
13
14
  field :auto_topup_self_service, -> { Internal::Types::Boolean }, optional: true, nullable: false
14
15
  field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false
15
16
  field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false
17
+ field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false
16
18
  field :credit_amount, -> { Integer }, optional: false, nullable: false
17
19
  field :credit_id, -> { String }, optional: false, nullable: false
18
20
  field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
@@ -8,6 +8,7 @@ module Schematic
8
8
  field :id, -> { String }, optional: false, nullable: false
9
9
  field :is_app_install, -> { Internal::Types::Boolean }, optional: false, nullable: false
10
10
  field :is_connect_install, -> { Internal::Types::Boolean }, optional: false, nullable: false
11
+ field :last_webhook_received_at, -> { String }, optional: true, nullable: false
11
12
  field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false
12
13
  field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false
13
14
  end
@@ -7,6 +7,7 @@ module Schematic
7
7
  field :base_plan_id, -> { String }, optional: true, nullable: false
8
8
  field :base_plan_price_id, -> { String }, optional: true, nullable: false
9
9
  field :base_plan_version_id, -> { String }, optional: true, nullable: false
10
+ field :billing_entity_id, -> { String }, optional: true, nullable: false
10
11
  field :cancel_immediately, -> { Internal::Types::Boolean }, optional: true, nullable: false
11
12
  field :company_id, -> { String }, optional: false, nullable: false
12
13
  field :coupon_external_id, -> { String }, optional: true, nullable: false
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Schematic
4
4
  module Types
5
- class MetronomeIntegrationConfig < Internal::Types::Model; end
5
+ class MetronomeIntegrationConfig < Internal::Types::Model
6
+ field :external_customer_id_key, -> { String }, optional: true, nullable: false
7
+ end
6
8
  end
7
9
  end
@@ -5,6 +5,7 @@ module Schematic
5
5
  class PlanCreditGrantView < Internal::Types::Model
6
6
  field :billing_credit_auto_topup_amount, -> { Integer }, optional: true, nullable: false
7
7
  field :billing_credit_auto_topup_amount_type, -> { String }, optional: true, nullable: false
8
+ field :billing_credit_auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false
8
9
  field :billing_credit_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
10
  field :billing_credit_auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
10
11
  field :billing_credit_auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
@@ -12,6 +13,7 @@ module Schematic
12
13
  field :billing_credit_auto_topup_self_service, -> { Internal::Types::Boolean }, optional: false, nullable: false
13
14
  field :billing_credit_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false
14
15
  field :billing_credit_auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false
16
+ field :billing_credit_can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false
15
17
  field :created_at, -> { String }, optional: false, nullable: false
16
18
  field :credit, -> { Schematic::Types::BillingCreditView }, optional: true, nullable: false
17
19
  field :credit_amount, -> { Integer }, optional: false, nullable: false
@@ -11,10 +11,12 @@ module Schematic
11
11
  field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false
12
12
  field :company_count, -> { Integer }, optional: false, nullable: false
13
13
  field :company_id, -> { String }, optional: true, nullable: false
14
+ field :company_logo_url, -> { String }, optional: true, nullable: false
14
15
  field :company_name, -> { String }, optional: true, nullable: false
15
16
  field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false
16
17
  field :copied_from_plan_id, -> { String }, optional: true, nullable: false
17
18
  field :created_at, -> { String }, optional: false, nullable: false
19
+ field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false
18
20
  field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false
19
21
  field :description, -> { String }, optional: false, nullable: false
20
22
  field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false
@@ -12,11 +12,13 @@ module Schematic
12
12
  field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false
13
13
  field :company_count, -> { Integer }, optional: false, nullable: false
14
14
  field :company_id, -> { String }, optional: true, nullable: false
15
+ field :company_logo_url, -> { String }, optional: true, nullable: false
15
16
  field :company_name, -> { String }, optional: true, nullable: false
16
17
  field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
17
18
  field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false
18
19
  field :copied_from_plan_id, -> { String }, optional: true, nullable: false
19
20
  field :created_at, -> { String }, optional: false, nullable: false
21
+ field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false
20
22
  field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false
21
23
  field :custom_plan_config, -> { Schematic::Types::CustomPlanViewConfigResponseData }, optional: true, nullable: false
22
24
  field :description, -> { String }, optional: false, nullable: false
@@ -12,11 +12,13 @@ module Schematic
12
12
  field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false
13
13
  field :company_count, -> { Integer }, optional: false, nullable: false
14
14
  field :company_id, -> { String }, optional: true, nullable: false
15
+ field :company_logo_url, -> { String }, optional: true, nullable: false
15
16
  field :company_name, -> { String }, optional: true, nullable: false
16
17
  field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
17
18
  field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false
18
19
  field :copied_from_plan_id, -> { String }, optional: true, nullable: false
19
20
  field :created_at, -> { String }, optional: false, nullable: false
21
+ field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false
20
22
  field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false
21
23
  field :custom, -> { Internal::Types::Boolean }, optional: false, nullable: false
22
24
  field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false
@@ -6,6 +6,7 @@ module Schematic
6
6
  field :apply_to_existing, -> { Internal::Types::Boolean }, optional: true, nullable: false
7
7
  field :auto_topup_amount, -> { Integer }, optional: true, nullable: false
8
8
  field :auto_topup_amount_type, -> { String }, optional: true, nullable: false
9
+ field :auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false
9
10
  field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
10
11
  field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
11
12
  field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
@@ -13,6 +14,7 @@ module Schematic
13
14
  field :auto_topup_self_service, -> { Internal::Types::Boolean }, optional: true, nullable: false
14
15
  field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false
15
16
  field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false
17
+ field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false
16
18
  field :credit_amount, -> { Integer }, optional: true, nullable: false
17
19
  field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
18
20
  field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Schematic
4
- VERSION = "1.4.7"
4
+ VERSION = "1.4.8"
5
5
  end
data/lib/schematic.rb CHANGED
@@ -185,6 +185,7 @@ require_relative "schematic/credits/types/acquire_credit_lease_response"
185
185
  require_relative "schematic/credits/types/extend_credit_lease_response"
186
186
  require_relative "schematic/credits/types/release_credit_lease_response"
187
187
  require_relative "schematic/credits/types/list_billing_plan_credit_grants_params"
188
+ require_relative "schematic/types/billing_credit_auto_topup_availability"
188
189
  require_relative "schematic/types/billing_plan_credit_grant_reset_start"
189
190
  require_relative "schematic/types/billing_plan_credit_grant_reset_type"
190
191
  require_relative "schematic/types/preview_object_response_data"
@@ -304,6 +305,12 @@ require_relative "schematic/types/company_response_data"
304
305
  require_relative "schematic/companies/types/delete_company_by_keys_response"
305
306
  require_relative "schematic/companies/types/lookup_company_params"
306
307
  require_relative "schematic/companies/types/lookup_company_response"
308
+ require_relative "schematic/companies/types/get_company_billing_entity_params"
309
+ require_relative "schematic/types/company_billing_entity_response_data"
310
+ require_relative "schematic/companies/types/get_company_billing_entity_response"
311
+ require_relative "schematic/companies/types/get_billing_entity_child_subscriptions_params"
312
+ require_relative "schematic/types/company_billing_entity_subscription_response_data"
313
+ require_relative "schematic/companies/types/get_billing_entity_child_subscriptions_response"
307
314
  require_relative "schematic/companies/types/list_company_memberships_params"
308
315
  require_relative "schematic/types/company_membership_detail_response_data"
309
316
  require_relative "schematic/companies/types/list_company_memberships_response"
@@ -804,6 +811,8 @@ require_relative "schematic/companies/types/list_companies_request"
804
811
  require_relative "schematic/companies/types/delete_company_request"
805
812
  require_relative "schematic/companies/types/count_companies_request"
806
813
  require_relative "schematic/companies/types/lookup_company_request"
814
+ require_relative "schematic/companies/types/get_company_billing_entity_request"
815
+ require_relative "schematic/companies/types/get_billing_entity_child_subscriptions_request"
807
816
  require_relative "schematic/companies/types/list_company_memberships_request"
808
817
  require_relative "schematic/companies/types/get_or_create_company_membership_request_body"
809
818
  require_relative "schematic/companies/types/get_active_company_subscription_request"
data/reference.md CHANGED
@@ -3689,6 +3689,14 @@ client.billing.upsert_billing_subscription(
3689
3689
  <dl>
3690
3690
  <dd>
3691
3691
 
3692
+ **company_id:** `String`
3693
+
3694
+ </dd>
3695
+ </dl>
3696
+
3697
+ <dl>
3698
+ <dd>
3699
+
3692
3700
  **currency:** `String`
3693
3701
 
3694
3702
  </dd>
@@ -7613,6 +7621,102 @@ client.companies.lookup_company(keys: {
7613
7621
  </dl>
7614
7622
 
7615
7623
 
7624
+ </dd>
7625
+ </dl>
7626
+ </details>
7627
+
7628
+ <details><summary><code>client.companies.<a href="/lib/schematic/companies/client.rb">get_company_billing_entity</a>() -> Schematic::Companies::Types::GetCompanyBillingEntityResponse</code></summary>
7629
+ <dl>
7630
+ <dd>
7631
+
7632
+ #### 🔌 Usage
7633
+
7634
+ <dl>
7635
+ <dd>
7636
+
7637
+ <dl>
7638
+ <dd>
7639
+
7640
+ ```ruby
7641
+ client.companies.get_company_billing_entity(company_id: "company_id")
7642
+ ```
7643
+ </dd>
7644
+ </dl>
7645
+ </dd>
7646
+ </dl>
7647
+
7648
+ #### ⚙️ Parameters
7649
+
7650
+ <dl>
7651
+ <dd>
7652
+
7653
+ <dl>
7654
+ <dd>
7655
+
7656
+ **company_id:** `String`
7657
+
7658
+ </dd>
7659
+ </dl>
7660
+
7661
+ <dl>
7662
+ <dd>
7663
+
7664
+ **request_options:** `Schematic::Companies::RequestOptions`
7665
+
7666
+ </dd>
7667
+ </dl>
7668
+ </dd>
7669
+ </dl>
7670
+
7671
+
7672
+ </dd>
7673
+ </dl>
7674
+ </details>
7675
+
7676
+ <details><summary><code>client.companies.<a href="/lib/schematic/companies/client.rb">get_billing_entity_child_subscriptions</a>() -> Schematic::Companies::Types::GetBillingEntityChildSubscriptionsResponse</code></summary>
7677
+ <dl>
7678
+ <dd>
7679
+
7680
+ #### 🔌 Usage
7681
+
7682
+ <dl>
7683
+ <dd>
7684
+
7685
+ <dl>
7686
+ <dd>
7687
+
7688
+ ```ruby
7689
+ client.companies.get_billing_entity_child_subscriptions(company_id: "company_id")
7690
+ ```
7691
+ </dd>
7692
+ </dl>
7693
+ </dd>
7694
+ </dl>
7695
+
7696
+ #### ⚙️ Parameters
7697
+
7698
+ <dl>
7699
+ <dd>
7700
+
7701
+ <dl>
7702
+ <dd>
7703
+
7704
+ **company_id:** `String`
7705
+
7706
+ </dd>
7707
+ </dl>
7708
+
7709
+ <dl>
7710
+ <dd>
7711
+
7712
+ **request_options:** `Schematic::Companies::RequestOptions`
7713
+
7714
+ </dd>
7715
+ </dl>
7716
+ </dd>
7717
+ </dl>
7718
+
7719
+
7616
7720
  </dd>
7617
7721
  </dl>
7618
7722
  </details>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schematichq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.7
4
+ version: 1.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Schematic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-06-30 00:00:00.000000000 Z
11
+ date: 2026-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: wasmtime
@@ -194,6 +194,12 @@ files:
194
194
  - lib/schematic/companies/types/get_active_company_subscription_params.rb
195
195
  - lib/schematic/companies/types/get_active_company_subscription_request.rb
196
196
  - lib/schematic/companies/types/get_active_company_subscription_response.rb
197
+ - lib/schematic/companies/types/get_billing_entity_child_subscriptions_params.rb
198
+ - lib/schematic/companies/types/get_billing_entity_child_subscriptions_request.rb
199
+ - lib/schematic/companies/types/get_billing_entity_child_subscriptions_response.rb
200
+ - lib/schematic/companies/types/get_company_billing_entity_params.rb
201
+ - lib/schematic/companies/types/get_company_billing_entity_request.rb
202
+ - lib/schematic/companies/types/get_company_billing_entity_response.rb
197
203
  - lib/schematic/companies/types/get_company_response.rb
198
204
  - lib/schematic/companies/types/get_entity_trait_definition_response.rb
199
205
  - lib/schematic/companies/types/get_entity_trait_values_params.rb
@@ -592,6 +598,7 @@ files:
592
598
  - lib/schematic/types/audit_log_list_response_data.rb
593
599
  - lib/schematic/types/audit_log_response_data.rb
594
600
  - lib/schematic/types/billing_coupon_response_data.rb
601
+ - lib/schematic/types/billing_credit_auto_topup_availability.rb
595
602
  - lib/schematic/types/billing_credit_bundle_response_data.rb
596
603
  - lib/schematic/types/billing_credit_bundle_status.rb
597
604
  - lib/schematic/types/billing_credit_bundle_type.rb
@@ -653,6 +660,8 @@ files:
653
660
  - lib/schematic/types/checkout_settings_response_data.rb
654
661
  - lib/schematic/types/checkout_subscription.rb
655
662
  - lib/schematic/types/clerk_integration_config.rb
663
+ - lib/schematic/types/company_billing_entity_response_data.rb
664
+ - lib/schematic/types/company_billing_entity_subscription_response_data.rb
656
665
  - lib/schematic/types/company_credit_balance.rb
657
666
  - lib/schematic/types/company_credit_balance_response_data.rb
658
667
  - lib/schematic/types/company_detail_response_data.rb