schematichq 1.4.11 → 1.4.13

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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +2 -2
  3. data/.fern/replay.lock +15 -3
  4. data/README.md +1 -1
  5. data/lib/schematic/accounts/types/create_api_key_request_body.rb +1 -0
  6. data/lib/schematic/accounts/types/update_api_key_request_body.rb +1 -0
  7. data/lib/schematic/billing/client.rb +6 -2
  8. data/lib/schematic/billing/types/list_billing_prices_params.rb +1 -0
  9. data/lib/schematic/billing/types/list_billing_prices_request.rb +1 -0
  10. data/lib/schematic/billing/types/list_billing_product_prices_params.rb +1 -0
  11. data/lib/schematic/billing/types/list_billing_product_prices_request.rb +1 -0
  12. data/lib/schematic/catalogs/types/create_catalog_request_body.rb +0 -1
  13. data/lib/schematic/checkout/types/update_company_billing_details_request_body.rb +1 -0
  14. data/lib/schematic/client.rb +1 -1
  15. data/lib/schematic/companies/client.rb +76 -0
  16. data/lib/schematic/companies/types/count_entity_keys_params.rb +15 -0
  17. data/lib/schematic/companies/types/count_entity_keys_request.rb +14 -0
  18. data/lib/schematic/companies/types/count_entity_keys_response.rb +12 -0
  19. data/lib/schematic/companies/types/delete_entity_key_definition_response.rb +12 -0
  20. data/lib/schematic/entitlements/client.rb +88 -0
  21. data/lib/schematic/entitlements/types/get_user_usage_by_company_params.rb +15 -0
  22. data/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb +14 -0
  23. data/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb +12 -0
  24. data/lib/schematic/entitlements/types/get_user_usage_detail_params.rb +15 -0
  25. data/lib/schematic/entitlements/types/get_user_usage_detail_request.rb +14 -0
  26. data/lib/schematic/entitlements/types/get_user_usage_detail_response.rb +12 -0
  27. data/lib/schematic/plans/types/publish_plan_version_request_body.rb +5 -0
  28. data/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +1 -0
  29. data/lib/schematic/types/api_key_create_response_data.rb +1 -0
  30. data/lib/schematic/types/api_key_response_data.rb +1 -0
  31. data/lib/schematic/types/billing_credit_view.rb +1 -1
  32. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +2 -0
  33. data/lib/schematic/types/billing_product_record_response_data.rb +17 -0
  34. data/lib/schematic/types/catalog_config_ordered_entitlement.rb +1 -1
  35. data/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb +1 -1
  36. data/lib/schematic/types/catalog_response_data.rb +0 -1
  37. data/lib/schematic/types/company_billing_details_response_data.rb +1 -0
  38. data/lib/schematic/types/company_billing_details_view.rb +1 -0
  39. data/lib/schematic/types/company_feature_usage_export_metadata.rb +4 -1
  40. data/lib/schematic/types/company_feature_usage_export_metadata_sort_order_direction.rb +12 -0
  41. data/lib/schematic/types/company_feature_usage_export_metadata_visible_columns_item.rb +14 -0
  42. data/lib/schematic/types/company_plan_credit_grant_view.rb +2 -0
  43. data/lib/schematic/types/company_plan_detail_response_data.rb +1 -1
  44. data/lib/schematic/types/company_tax_id_view.rb +13 -0
  45. data/lib/schematic/types/component_checkout_settings.rb +1 -0
  46. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +2 -0
  47. data/lib/schematic/types/custom_plan_billing_response_data.rb +1 -0
  48. data/lib/schematic/types/data_export_metadata.rb +1 -0
  49. data/lib/schematic/types/data_export_type.rb +1 -0
  50. data/lib/schematic/types/event_export_metadata.rb +16 -0
  51. data/lib/schematic/types/event_export_metadata_event_types_item.rb +14 -0
  52. data/lib/schematic/types/feature_view.rb +1 -1
  53. data/lib/schematic/types/plan_credit_grant_scaling.rb +12 -0
  54. data/lib/schematic/types/plan_credit_grant_view.rb +2 -0
  55. data/lib/schematic/types/plan_detail_response_data.rb +1 -1
  56. data/lib/schematic/types/plan_group_plan_detail_response_data.rb +1 -1
  57. data/lib/schematic/types/plan_view_public_response_data.rb +1 -1
  58. data/lib/schematic/types/tax_id_input.rb +10 -0
  59. data/lib/schematic/types/tax_id_type.rb +48 -0
  60. data/lib/schematic/types/test_webhook_response_data.rb +1 -0
  61. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +2 -0
  62. data/lib/schematic/types/user_credit_usage_response_data.rb +14 -0
  63. data/lib/schematic/types/user_daily_credit_point_response_data.rb +10 -0
  64. data/lib/schematic/types/user_daily_usage_point_response_data.rb +11 -0
  65. data/lib/schematic/types/user_feature_usage_response_data.rb +14 -0
  66. data/lib/schematic/types/user_usage_by_company_response_data.rb +12 -0
  67. data/lib/schematic/types/user_usage_detail_response_data.rb +15 -0
  68. data/lib/schematic/version.rb +1 -1
  69. data/lib/schematic.rb +26 -1
  70. data/reference.md +370 -12
  71. metadata +27 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a42d012076b989e91c5c9019e981ee2af4e4f5f7115aaa1b304bed519c44a454
4
- data.tar.gz: dd803e3554e9f425bdd2deb7f8b56b57c16483da2f86437e4f8400dae3ba1962
3
+ metadata.gz: 0becf4f97a567470a17bca32a31305233a5bfd4cb85b3bcf328efe48df033bbc
4
+ data.tar.gz: 728b9b45b42ffa8a4ab8cd59cedf51ac1edd36c99f8594a6892f261f04ce435b
5
5
  SHA512:
6
- metadata.gz: 73bac05632b13d3839a98d2fa63b207243e6fa291bb255f9750af3d1658ac56373aedd630ecb3967ec580c2af9b819af176fa60c7a27897e7b6d72a34e1d9509
7
- data.tar.gz: c014f30d286b1b01b25cafe35426efb6841c4861f6e8de6e362fbe9f2ca366f0680fb2ff2f2ea8994514f7b3f6e652bd167ca8d4a66f2de1906a0c297922fe45
6
+ metadata.gz: 26dc88335c2f7e3df6bc2c37439f41446be2949f46b7af3d83af57faf93479e0a367423e2d17a40c0f0b96c366ba4fd2cde16bd10a32364430e44b86faa3257d
7
+ data.tar.gz: a9398c4e481d5d395753e060891b6c5406a745da1f270845688cc7871ec373fe0822c95f7ce96210fc5a05a56810e2cf773be552102ee1051bb666fe927ef0fa
data/.fern/metadata.json CHANGED
@@ -13,6 +13,6 @@
13
13
  "webrick": ">= 1.0"
14
14
  }
15
15
  },
16
- "originGitCommit": "340529eacf4f1dcc5522e771872c1dd94b9c4891",
17
- "sdkVersion": "1.4.11"
16
+ "originGitCommit": "8cfe954dda14329fc30a4f80b915db0acf608382",
17
+ "sdkVersion": "1.4.13"
18
18
  }
data/.fern/replay.lock CHANGED
@@ -48,14 +48,26 @@ generations:
48
48
  cli_version: unknown
49
49
  generator_versions:
50
50
  fernapi/fern-ruby-sdk: 1.1.13
51
- current_generation: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf
51
+ - commit_sha: 4c98e0c88a5af9323ad047925ea28dec7a8bf762
52
+ tree_hash: 5938d855931f4f2f06decd637d97c2d609434891
53
+ timestamp: 2026-08-03T11:04:40.862Z
54
+ cli_version: unknown
55
+ generator_versions:
56
+ fernapi/fern-ruby-sdk: 1.1.13
57
+ - commit_sha: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e
58
+ tree_hash: 4d178b386600e95e5e5d3a0e8eca8f586421d8ec
59
+ timestamp: 2026-08-10T10:28:58.021Z
60
+ cli_version: unknown
61
+ generator_versions:
62
+ fernapi/fern-ruby-sdk: 1.1.13
63
+ current_generation: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e
52
64
  patches:
53
65
  - id: patch-5da692c2
54
66
  content_hash: sha256:e652287219a0a709e16112ced444e6472c6fa8bdfe888edf868caaf9769a9472
55
67
  original_commit: 5da692c20aef08577d900f9a860b5f78a549418e
56
68
  original_message: inject host time into datastream wasm rules engine (SCHY-471)
57
69
  original_author: Christopher Brady <chris@schematichq.com>
58
- base_generation: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf
70
+ base_generation: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e
59
71
  files:
60
72
  - test/rules_engine_clock_test.rb
61
73
  patch_content: |
@@ -223,7 +235,7 @@ patches:
223
235
  original_commit: ee61788c5a83fce5dd5768b2536391459550d176
224
236
  original_message: fix rubocop offenses in clock regression test (SCHY-471)
225
237
  original_author: Christopher Brady <chris@schematichq.com>
226
- base_generation: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf
238
+ base_generation: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e
227
239
  files:
228
240
  - test/rules_engine_clock_test.rb
229
241
  patch_content: |
data/README.md CHANGED
@@ -20,7 +20,7 @@ Then run:
20
20
  bundle install
21
21
  ```
22
22
 
23
- 2. [Issue an API key](https://docs.schematichq.com/quickstart#create-an-api-key) for the appropriate environment using the [Schematic app](https://app.schematichq.com/settings/api-keys). Be sure to capture the secret key when you issue the API key; you'll only see this key once, and this is what you'll use with schematic-ruby.
23
+ 2. [Issue an API key](https://docs.schematichq.com/quickstart/account-setup#2-create-your-api-keys) for the appropriate environment using the [Schematic app](https://app.schematichq.com/settings/api-keys). Be sure to capture the secret key when you issue the API key; you'll only see this key once, and this is what you'll use with schematic-ruby.
24
24
 
25
25
  3. Using this secret key, initialize a client in your application:
26
26
 
@@ -7,6 +7,7 @@ module Schematic
7
7
  field :description, -> { String }, optional: true, nullable: false
8
8
  field :environment_id, -> { String }, optional: true, nullable: false
9
9
  field :name, -> { String }, optional: false, nullable: false
10
+ field :rate_limit_percent, -> { Integer }, optional: true, nullable: false
10
11
  field :readonly, -> { Internal::Types::Boolean }, optional: true, nullable: false
11
12
  end
12
13
  end
@@ -7,6 +7,7 @@ module Schematic
7
7
  field :api_key_id, -> { String }, optional: false, nullable: false
8
8
  field :description, -> { String }, optional: true, nullable: false
9
9
  field :name, -> { String }, optional: true, nullable: false
10
+ field :rate_limit_percent, -> { Integer }, optional: true, nullable: false
10
11
  end
11
12
  end
12
13
  end
@@ -582,6 +582,7 @@ module Schematic
582
582
  # @option params [Boolean, nil] :for_trial_expiry_plan
583
583
  # @option params [String, nil] :ids
584
584
  # @option params [String, nil] :interval
585
+ # @option params [Integer, nil] :interval_count
585
586
  # @option params [Boolean, nil] :is_active
586
587
  # @option params [String, nil] :plan_version_id
587
588
  # @option params [Integer, nil] :price
@@ -598,13 +599,14 @@ module Schematic
598
599
  # @return [Schematic::Billing::Types::ListBillingPricesResponse]
599
600
  def list_billing_prices(request_options: {}, **params)
600
601
  params = Schematic::Internal::Types::Utils.normalize_keys(params)
601
- query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset]
602
+ query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval interval_count is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset]
602
603
  query_params = {}
603
604
  query_params["currency"] = params[:currency] if params.key?(:currency)
604
605
  query_params["for_initial_plan"] = params[:for_initial_plan] if params.key?(:for_initial_plan)
605
606
  query_params["for_trial_expiry_plan"] = params[:for_trial_expiry_plan] if params.key?(:for_trial_expiry_plan)
606
607
  query_params["ids"] = params[:ids] if params.key?(:ids)
607
608
  query_params["interval"] = params[:interval] if params.key?(:interval)
609
+ query_params["interval_count"] = params[:interval_count] if params.key?(:interval_count)
608
610
  query_params["is_active"] = params[:is_active] if params.key?(:is_active)
609
611
  query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
610
612
  query_params["price"] = params[:price] if params.key?(:price)
@@ -716,6 +718,7 @@ module Schematic
716
718
  # @option params [Boolean, nil] :for_trial_expiry_plan
717
719
  # @option params [String, nil] :ids
718
720
  # @option params [String, nil] :interval
721
+ # @option params [Integer, nil] :interval_count
719
722
  # @option params [Boolean, nil] :is_active
720
723
  # @option params [String, nil] :plan_version_id
721
724
  # @option params [Integer, nil] :price
@@ -732,13 +735,14 @@ module Schematic
732
735
  # @return [Schematic::Billing::Types::ListBillingProductPricesResponse]
733
736
  def list_billing_product_prices(request_options: {}, **params)
734
737
  params = Schematic::Internal::Types::Utils.normalize_keys(params)
735
- query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset]
738
+ query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval interval_count is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset]
736
739
  query_params = {}
737
740
  query_params["currency"] = params[:currency] if params.key?(:currency)
738
741
  query_params["for_initial_plan"] = params[:for_initial_plan] if params.key?(:for_initial_plan)
739
742
  query_params["for_trial_expiry_plan"] = params[:for_trial_expiry_plan] if params.key?(:for_trial_expiry_plan)
740
743
  query_params["ids"] = params[:ids] if params.key?(:ids)
741
744
  query_params["interval"] = params[:interval] if params.key?(:interval)
745
+ query_params["interval_count"] = params[:interval_count] if params.key?(:interval_count)
742
746
  query_params["is_active"] = params[:is_active] if params.key?(:is_active)
743
747
  query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
744
748
  query_params["price"] = params[:price] if params.key?(:price)
@@ -10,6 +10,7 @@ module Schematic
10
10
  field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false
11
11
  field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
12
12
  field :interval, -> { String }, optional: true, nullable: false
13
+ field :interval_count, -> { Integer }, optional: true, nullable: false
13
14
  field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false
14
15
  field :limit, -> { Integer }, optional: true, nullable: false
15
16
  field :offset, -> { Integer }, optional: true, nullable: false
@@ -9,6 +9,7 @@ module Schematic
9
9
  field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false
10
10
  field :ids, -> { String }, optional: true, nullable: false
11
11
  field :interval, -> { String }, optional: true, nullable: false
12
+ field :interval_count, -> { Integer }, optional: true, nullable: false
12
13
  field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false
13
14
  field :plan_version_id, -> { String }, optional: true, nullable: false
14
15
  field :price, -> { Integer }, optional: true, nullable: false
@@ -10,6 +10,7 @@ module Schematic
10
10
  field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false
11
11
  field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
12
12
  field :interval, -> { String }, optional: true, nullable: false
13
+ field :interval_count, -> { Integer }, optional: true, nullable: false
13
14
  field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false
14
15
  field :limit, -> { Integer }, optional: true, nullable: false
15
16
  field :offset, -> { Integer }, optional: true, nullable: false
@@ -9,6 +9,7 @@ module Schematic
9
9
  field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false
10
10
  field :ids, -> { String }, optional: true, nullable: false
11
11
  field :interval, -> { String }, optional: true, nullable: false
12
+ field :interval_count, -> { Integer }, optional: true, nullable: false
12
13
  field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false
13
14
  field :plan_version_id, -> { String }, optional: true, nullable: false
14
15
  field :price, -> { Integer }, optional: true, nullable: false
@@ -5,7 +5,6 @@ module Schematic
5
5
  module Types
6
6
  class CreateCatalogRequestBody < Internal::Types::Model
7
7
  field :description, -> { String }, optional: true, nullable: false
8
- field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
8
  field :name, -> { String }, optional: false, nullable: false
10
9
  end
11
10
  end
@@ -8,6 +8,7 @@ module Schematic
8
8
  field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false
9
9
  field :email, -> { String }, optional: true, nullable: false
10
10
  field :phone, -> { String }, optional: true, nullable: false
11
+ field :tax_id, -> { Schematic::Types::TaxIdInput }, optional: true, nullable: false
11
12
  field :values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false
12
13
  end
13
14
  end
@@ -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.11",
13
+ "User-Agent" => "schematichq/1.4.13",
14
14
  "X-Fern-Language" => "Ruby",
15
15
  "X-Schematic-Api-Key" => api_key.to_s
16
16
  }
@@ -681,6 +681,38 @@ module Schematic
681
681
  end
682
682
  end
683
683
 
684
+ # @param request_options [Hash]
685
+ # @param params [Hash]
686
+ # @option request_options [String] :base_url
687
+ # @option request_options [Hash{String => Object}] :additional_headers
688
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
689
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
690
+ # @option request_options [Integer] :timeout_in_seconds
691
+ # @option params [String] :entity_key_definition_id
692
+ #
693
+ # @return [Schematic::Companies::Types::DeleteEntityKeyDefinitionResponse]
694
+ def delete_entity_key_definition(request_options: {}, **params)
695
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
696
+ request = Schematic::Internal::JSON::Request.new(
697
+ base_url: request_options[:base_url],
698
+ method: "DELETE",
699
+ path: "entity-key-definitions/#{URI.encode_uri_component(params[:entity_key_definition_id].to_s)}",
700
+ request_options: request_options
701
+ )
702
+ begin
703
+ response = @client.send(request)
704
+ rescue Net::HTTPRequestTimeout
705
+ raise Schematic::Errors::TimeoutError
706
+ end
707
+ code = response.code.to_i
708
+ if code.between?(200, 299)
709
+ Schematic::Companies::Types::DeleteEntityKeyDefinitionResponse.load(response.body)
710
+ else
711
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
712
+ raise error_class.new(response.body, code: code)
713
+ end
714
+ end
715
+
684
716
  # @param request_options [Hash]
685
717
  # @param params [Hash]
686
718
  # @option request_options [String] :base_url
@@ -727,6 +759,50 @@ module Schematic
727
759
  end
728
760
  end
729
761
 
762
+ # @param request_options [Hash]
763
+ # @param params [Hash]
764
+ # @option request_options [String] :base_url
765
+ # @option request_options [Hash{String => Object}] :additional_headers
766
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
767
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
768
+ # @option request_options [Integer] :timeout_in_seconds
769
+ # @option params [String, nil] :definition_id
770
+ # @option params [Schematic::Types::EntityType, nil] :entity_type
771
+ # @option params [Integer, nil] :limit
772
+ # @option params [Integer, nil] :offset
773
+ #
774
+ # @return [Schematic::Companies::Types::CountEntityKeysResponse]
775
+ def count_entity_keys(request_options: {}, **params)
776
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
777
+ query_param_names = %i[definition_id entity_type limit offset]
778
+ query_params = {}
779
+ query_params["definition_id"] = params[:definition_id] if params.key?(:definition_id)
780
+ query_params["entity_type"] = params[:entity_type] if params.key?(:entity_type)
781
+ query_params["limit"] = params[:limit] if params.key?(:limit)
782
+ query_params["offset"] = params[:offset] if params.key?(:offset)
783
+ params.except(*query_param_names)
784
+
785
+ request = Schematic::Internal::JSON::Request.new(
786
+ base_url: request_options[:base_url],
787
+ method: "GET",
788
+ path: "entity-keys/count",
789
+ query: query_params,
790
+ request_options: request_options
791
+ )
792
+ begin
793
+ response = @client.send(request)
794
+ rescue Net::HTTPRequestTimeout
795
+ raise Schematic::Errors::TimeoutError
796
+ end
797
+ code = response.code.to_i
798
+ if code.between?(200, 299)
799
+ Schematic::Companies::Types::CountEntityKeysResponse.load(response.body)
800
+ else
801
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
802
+ raise error_class.new(response.body, code: code)
803
+ end
804
+ end
805
+
730
806
  # @param request_options [Hash]
731
807
  # @param params [Hash]
732
808
  # @option request_options [String] :base_url
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ # Input parameters
7
+ class CountEntityKeysParams < Internal::Types::Model
8
+ field :definition_id, -> { String }, optional: true, nullable: false
9
+ field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false
10
+ field :limit, -> { Integer }, optional: true, nullable: false
11
+ field :offset, -> { Integer }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class CountEntityKeysRequest < Internal::Types::Model
7
+ field :definition_id, -> { String }, optional: true, nullable: false
8
+ field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false
9
+ field :limit, -> { Integer }, optional: true, nullable: false
10
+ field :offset, -> { Integer }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class CountEntityKeysResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Companies::Types::CountEntityKeysParams }, 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
+ class DeleteEntityKeyDefinitionResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -931,6 +931,94 @@ module Schematic
931
931
  raise error_class.new(response.body, code: code)
932
932
  end
933
933
  end
934
+
935
+ # @param request_options [Hash]
936
+ # @param params [Hash]
937
+ # @option request_options [String] :base_url
938
+ # @option request_options [Hash{String => Object}] :additional_headers
939
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
940
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
941
+ # @option request_options [Integer] :timeout_in_seconds
942
+ # @option params [String] :company_id
943
+ # @option params [String, nil] :end_time
944
+ # @option params [String, nil] :feature_id
945
+ # @option params [String, nil] :start_time
946
+ #
947
+ # @return [Schematic::Entitlements::Types::GetUserUsageByCompanyResponse]
948
+ def get_user_usage_by_company(request_options: {}, **params)
949
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
950
+ query_param_names = %i[company_id end_time feature_id start_time]
951
+ query_params = {}
952
+ query_params["company_id"] = params[:company_id] if params.key?(:company_id)
953
+ query_params["end_time"] = params[:end_time] if params.key?(:end_time)
954
+ query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id)
955
+ query_params["start_time"] = params[:start_time] if params.key?(:start_time)
956
+ params.except(*query_param_names)
957
+
958
+ request = Schematic::Internal::JSON::Request.new(
959
+ base_url: request_options[:base_url],
960
+ method: "GET",
961
+ path: "user-usage-by-company",
962
+ query: query_params,
963
+ request_options: request_options
964
+ )
965
+ begin
966
+ response = @client.send(request)
967
+ rescue Net::HTTPRequestTimeout
968
+ raise Schematic::Errors::TimeoutError
969
+ end
970
+ code = response.code.to_i
971
+ if code.between?(200, 299)
972
+ Schematic::Entitlements::Types::GetUserUsageByCompanyResponse.load(response.body)
973
+ else
974
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
975
+ raise error_class.new(response.body, code: code)
976
+ end
977
+ end
978
+
979
+ # @param request_options [Hash]
980
+ # @param params [Hash]
981
+ # @option request_options [String] :base_url
982
+ # @option request_options [Hash{String => Object}] :additional_headers
983
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
984
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
985
+ # @option request_options [Integer] :timeout_in_seconds
986
+ # @option params [String] :company_id
987
+ # @option params [String, nil] :end_time
988
+ # @option params [String, nil] :start_time
989
+ # @option params [String] :user_id
990
+ #
991
+ # @return [Schematic::Entitlements::Types::GetUserUsageDetailResponse]
992
+ def get_user_usage_detail(request_options: {}, **params)
993
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
994
+ query_param_names = %i[company_id end_time start_time user_id]
995
+ query_params = {}
996
+ query_params["company_id"] = params[:company_id] if params.key?(:company_id)
997
+ query_params["end_time"] = params[:end_time] if params.key?(:end_time)
998
+ query_params["start_time"] = params[:start_time] if params.key?(:start_time)
999
+ query_params["user_id"] = params[:user_id] if params.key?(:user_id)
1000
+ params.except(*query_param_names)
1001
+
1002
+ request = Schematic::Internal::JSON::Request.new(
1003
+ base_url: request_options[:base_url],
1004
+ method: "GET",
1005
+ path: "user-usage-detail",
1006
+ query: query_params,
1007
+ request_options: request_options
1008
+ )
1009
+ begin
1010
+ response = @client.send(request)
1011
+ rescue Net::HTTPRequestTimeout
1012
+ raise Schematic::Errors::TimeoutError
1013
+ end
1014
+ code = response.code.to_i
1015
+ if code.between?(200, 299)
1016
+ Schematic::Entitlements::Types::GetUserUsageDetailResponse.load(response.body)
1017
+ else
1018
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
1019
+ raise error_class.new(response.body, code: code)
1020
+ end
1021
+ end
934
1022
  end
935
1023
  end
936
1024
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Entitlements
5
+ module Types
6
+ # Input parameters
7
+ class GetUserUsageByCompanyParams < Internal::Types::Model
8
+ field :company_id, -> { String }, optional: true, nullable: false
9
+ field :end_time, -> { String }, optional: true, nullable: false
10
+ field :feature_id, -> { String }, optional: true, nullable: false
11
+ field :start_time, -> { String }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Entitlements
5
+ module Types
6
+ class GetUserUsageByCompanyRequest < Internal::Types::Model
7
+ field :company_id, -> { String }, optional: false, nullable: false
8
+ field :end_time, -> { String }, optional: true, nullable: false
9
+ field :feature_id, -> { String }, optional: true, nullable: false
10
+ field :start_time, -> { String }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Entitlements
5
+ module Types
6
+ class GetUserUsageByCompanyResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::UserUsageByCompanyResponseData }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Entitlements::Types::GetUserUsageByCompanyParams }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Entitlements
5
+ module Types
6
+ # Input parameters
7
+ class GetUserUsageDetailParams < Internal::Types::Model
8
+ field :company_id, -> { String }, optional: true, nullable: false
9
+ field :end_time, -> { String }, optional: true, nullable: false
10
+ field :start_time, -> { String }, optional: true, nullable: false
11
+ field :user_id, -> { String }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Entitlements
5
+ module Types
6
+ class GetUserUsageDetailRequest < Internal::Types::Model
7
+ field :company_id, -> { String }, optional: false, nullable: false
8
+ field :end_time, -> { String }, optional: true, nullable: false
9
+ field :start_time, -> { String }, optional: true, nullable: false
10
+ field :user_id, -> { String }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Entitlements
5
+ module Types
6
+ class GetUserUsageDetailResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::UserUsageDetailResponseData }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Entitlements::Types::GetUserUsageDetailParams }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -6,11 +6,16 @@ module Schematic
6
6
  class PublishPlanVersionRequestBody < Internal::Types::Model
7
7
  field :plan_id, -> { String }, optional: false, nullable: false
8
8
  field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false
9
+ field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false
9
10
  field :coupon_external_id, -> { String }, optional: true, nullable: false
11
+ field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: true, nullable: false
10
12
  field :customer_email, -> { String }, optional: true, nullable: false
11
13
  field :days_until_due, -> { Integer }, optional: true, nullable: false
12
14
  field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
13
15
  field :migration_strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false
16
+ field :phone, -> { String }, optional: true, nullable: false
17
+ field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false
18
+ field :tax_id, -> { Schematic::Types::TaxIdInput }, optional: true, nullable: false
14
19
  end
15
20
  end
16
21
  end
@@ -8,6 +8,7 @@ module Schematic
8
8
  field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false
9
9
  field :customer_email, -> { String }, optional: false, nullable: false
10
10
  field :days_until_due, -> { Integer }, optional: true, nullable: false
11
+ field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false
11
12
  end
12
13
  end
13
14
  end
@@ -11,6 +11,7 @@ module Schematic
11
11
  field :integration, -> { Schematic::Types::ApiKeyIntegrationResponseData }, optional: true, nullable: false
12
12
  field :last_used_at, -> { String }, optional: true, nullable: false
13
13
  field :name, -> { String }, optional: false, nullable: false
14
+ field :rate_limit_percent, -> { Integer }, optional: true, nullable: false
14
15
  field :readonly, -> { Internal::Types::Boolean }, optional: false, nullable: false
15
16
  field :scopes, -> { Internal::Types::Array[Schematic::Types::ApiKeyScope] }, optional: false, nullable: false
16
17
  field :secret, -> { String }, optional: false, nullable: false
@@ -11,6 +11,7 @@ module Schematic
11
11
  field :integration, -> { Schematic::Types::ApiKeyIntegrationResponseData }, optional: true, nullable: false
12
12
  field :last_used_at, -> { String }, optional: true, nullable: false
13
13
  field :name, -> { String }, optional: false, nullable: false
14
+ field :rate_limit_percent, -> { Integer }, optional: true, nullable: false
14
15
  field :readonly, -> { Internal::Types::Boolean }, optional: false, nullable: false
15
16
  field :scopes, -> { Internal::Types::Array[Schematic::Types::ApiKeyScope] }, optional: false, nullable: false
16
17
  field :updated_at, -> { String }, optional: false, nullable: false
@@ -21,7 +21,7 @@ module Schematic
21
21
  field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false
22
22
  field :price_per_unit, -> { Integer }, optional: true, nullable: false
23
23
  field :price_per_unit_decimal, -> { String }, optional: true, nullable: false
24
- field :product, -> { Schematic::Types::BillingProductResponseData }, optional: true, nullable: false
24
+ field :product, -> { Schematic::Types::BillingProductRecordResponseData }, optional: true, nullable: false
25
25
  field :singular_name, -> { String }, optional: true, nullable: false
26
26
  field :updated_at, -> { String }, optional: false, nullable: false
27
27
  end
@@ -25,6 +25,7 @@ module Schematic
25
25
  field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
26
26
  field :expiry_unit_count, -> { Integer }, optional: true, nullable: false
27
27
  field :id, -> { String }, optional: false, nullable: false
28
+ field :license_id, -> { String }, optional: true, nullable: false
28
29
  field :plan, -> { Schematic::Types::PreviewObjectResponseData }, optional: true, nullable: false
29
30
  field :plan_id, -> { String }, optional: false, nullable: false
30
31
  field :plan_name, -> { String }, optional: false, nullable: false
@@ -33,6 +34,7 @@ module Schematic
33
34
  field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false
34
35
  field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false
35
36
  field :rollover_percentage, -> { Integer }, optional: false, nullable: false
37
+ field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false
36
38
  field :updated_at, -> { String }, optional: false, nullable: false
37
39
  end
38
40
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class BillingProductRecordResponseData < Internal::Types::Model
6
+ field :account_id, -> { String }, optional: false, nullable: false
7
+ field :created_at, -> { String }, optional: false, nullable: false
8
+ field :environment_id, -> { String }, optional: false, nullable: false
9
+ field :external_id, -> { String }, optional: false, nullable: false
10
+ field :id, -> { String }, optional: false, nullable: false
11
+ field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false
12
+ field :name, -> { String }, optional: false, nullable: false
13
+ field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false
14
+ field :updated_at, -> { String }, optional: false, nullable: false
15
+ end
16
+ end
17
+ end
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CatalogConfigOrderedEntitlement < Internal::Types::Model
6
- field :plan_entitlement_id, -> { String }, optional: false, nullable: false
6
+ field :feature_id, -> { String }, optional: false, nullable: false
7
7
  field :visible, -> { Internal::Types::Boolean }, optional: true, nullable: false
8
8
  end
9
9
  end