schematichq 1.4.10 → 1.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.fern/metadata.json +2 -2
- data/.fern/replay.lock +15 -3
- data/lib/schematic/accounts/client.rb +6 -2
- data/lib/schematic/accounts/types/count_account_members_params.rb +1 -0
- data/lib/schematic/accounts/types/count_account_members_request.rb +1 -0
- data/lib/schematic/accounts/types/create_api_key_request_body.rb +1 -0
- data/lib/schematic/accounts/types/list_account_members_params.rb +1 -0
- data/lib/schematic/accounts/types/list_account_members_request.rb +1 -0
- data/lib/schematic/accounts/types/update_api_key_request_body.rb +1 -0
- data/lib/schematic/billing/client.rb +6 -2
- data/lib/schematic/billing/types/list_billing_prices_params.rb +1 -0
- data/lib/schematic/billing/types/list_billing_prices_request.rb +1 -0
- data/lib/schematic/billing/types/list_billing_product_prices_params.rb +1 -0
- data/lib/schematic/billing/types/list_billing_product_prices_request.rb +1 -0
- data/lib/schematic/catalogs/types/create_catalog_request_body.rb +0 -1
- data/lib/schematic/checkout/types/update_company_billing_details_request_body.rb +1 -0
- data/lib/schematic/client.rb +6 -1
- data/lib/schematic/entitlements/client.rb +88 -0
- data/lib/schematic/entitlements/types/get_user_usage_by_company_params.rb +15 -0
- data/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb +14 -0
- data/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb +12 -0
- data/lib/schematic/entitlements/types/get_user_usage_detail_params.rb +15 -0
- data/lib/schematic/entitlements/types/get_user_usage_detail_request.rb +14 -0
- data/lib/schematic/entitlements/types/get_user_usage_detail_response.rb +12 -0
- data/lib/schematic/licenses/client.rb +138 -0
- data/lib/schematic/licenses/types/count_licenses_params.rb +16 -0
- data/lib/schematic/licenses/types/count_licenses_request.rb +15 -0
- data/lib/schematic/licenses/types/count_licenses_response.rb +12 -0
- data/lib/schematic/licenses/types/get_single_license_response.rb +12 -0
- data/lib/schematic/licenses/types/list_licenses_params.rb +16 -0
- data/lib/schematic/licenses/types/list_licenses_request.rb +15 -0
- data/lib/schematic/licenses/types/list_licenses_response.rb +12 -0
- data/lib/schematic/planmigrations/client.rb +32 -0
- data/lib/schematic/planmigrations/types/preview_migration_request_body.rb +14 -0
- data/lib/schematic/planmigrations/types/preview_migration_response.rb +12 -0
- data/lib/schematic/plans/types/publish_plan_version_request_body.rb +5 -0
- data/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +1 -0
- data/lib/schematic/types/api_key_create_response_data.rb +1 -0
- data/lib/schematic/types/api_key_response_data.rb +1 -0
- data/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb +1 -0
- data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +2 -0
- data/lib/schematic/types/catalog_config_ordered_entitlement.rb +1 -1
- data/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb +1 -1
- data/lib/schematic/types/catalog_response_data.rb +0 -1
- data/lib/schematic/types/company_billing_details_response_data.rb +1 -0
- data/lib/schematic/types/company_billing_details_view.rb +1 -0
- data/lib/schematic/types/company_plan_credit_grant_view.rb +2 -0
- data/lib/schematic/types/company_plan_detail_response_data.rb +1 -1
- data/lib/schematic/types/company_tax_id_view.rb +13 -0
- data/lib/schematic/types/component_checkout_settings.rb +1 -0
- data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +2 -0
- data/lib/schematic/types/custom_plan_billing_response_data.rb +1 -0
- data/lib/schematic/types/feature_detail_response_data.rb +3 -0
- data/lib/schematic/types/feature_in_plan_response_data.rb +2 -0
- data/lib/schematic/types/feature_response_data.rb +2 -0
- data/lib/schematic/types/feature_type.rb +1 -0
- data/lib/schematic/types/feature_view.rb +2 -0
- data/lib/schematic/types/license_response_data.rb +12 -0
- data/lib/schematic/types/plan_credit_grant_scaling.rb +12 -0
- data/lib/schematic/types/plan_credit_grant_view.rb +2 -0
- data/lib/schematic/types/plan_detail_response_data.rb +1 -1
- data/lib/schematic/types/plan_group_plan_detail_response_data.rb +1 -1
- data/lib/schematic/types/plan_version_migration_preview_company_response_data.rb +14 -0
- data/lib/schematic/types/plan_version_migration_preview_response_data.rb +9 -0
- data/lib/schematic/types/plan_view_public_response_data.rb +1 -1
- data/lib/schematic/types/tax_id_input.rb +10 -0
- data/lib/schematic/types/tax_id_type.rb +48 -0
- data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +2 -0
- data/lib/schematic/types/user_credit_usage_response_data.rb +14 -0
- data/lib/schematic/types/user_daily_credit_point_response_data.rb +10 -0
- data/lib/schematic/types/user_daily_usage_point_response_data.rb +11 -0
- data/lib/schematic/types/user_feature_usage_response_data.rb +14 -0
- data/lib/schematic/types/user_usage_by_company_response_data.rb +12 -0
- data/lib/schematic/types/user_usage_detail_response_data.rb +15 -0
- data/lib/schematic/version.rb +1 -1
- data/lib/schematic.rb +31 -2
- data/reference.md +565 -16
- metadata +31 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2bee308305df6ae2bdceab646e7829b09ece5d767cb302c6c978997f97c1e9bf
|
|
4
|
+
data.tar.gz: 030c6a99cd7125ccabbfd07c6255ee4a95767e931e11a063c82574eb8f50362d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1edd9a610f4dd418f16e5fbccab154a711e2b2d8d4d72c9c9c0d90b24ae8e23eddfb373bc9b4299a6bb8885585a0250edfa71e5c0e7c4441de5095275bf59c97
|
|
7
|
+
data.tar.gz: 8fb4d4546c3a0eddeee495d9bc6dd1de45259b32e60e7eb297eeba5d69a4fc4e12c496d143ad63f84258556baf601bfb4658f629c28e254e69c669852bdf1000
|
data/.fern/metadata.json
CHANGED
data/.fern/replay.lock
CHANGED
|
@@ -42,14 +42,26 @@ generations:
|
|
|
42
42
|
cli_version: unknown
|
|
43
43
|
generator_versions:
|
|
44
44
|
fernapi/fern-ruby-sdk: 1.1.13
|
|
45
|
-
|
|
45
|
+
- commit_sha: 6d4bb962eb2a83ad3a76662f58edbd07cc5fdadf
|
|
46
|
+
tree_hash: 9ec72264899730d464919a3605eb3a6667ba9464
|
|
47
|
+
timestamp: 2026-07-27T18:37:54.168Z
|
|
48
|
+
cli_version: unknown
|
|
49
|
+
generator_versions:
|
|
50
|
+
fernapi/fern-ruby-sdk: 1.1.13
|
|
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
|
+
current_generation: 4c98e0c88a5af9323ad047925ea28dec7a8bf762
|
|
46
58
|
patches:
|
|
47
59
|
- id: patch-5da692c2
|
|
48
60
|
content_hash: sha256:e652287219a0a709e16112ced444e6472c6fa8bdfe888edf868caaf9769a9472
|
|
49
61
|
original_commit: 5da692c20aef08577d900f9a860b5f78a549418e
|
|
50
62
|
original_message: inject host time into datastream wasm rules engine (SCHY-471)
|
|
51
63
|
original_author: Christopher Brady <chris@schematichq.com>
|
|
52
|
-
base_generation:
|
|
64
|
+
base_generation: 4c98e0c88a5af9323ad047925ea28dec7a8bf762
|
|
53
65
|
files:
|
|
54
66
|
- test/rules_engine_clock_test.rb
|
|
55
67
|
patch_content: |
|
|
@@ -217,7 +229,7 @@ patches:
|
|
|
217
229
|
original_commit: ee61788c5a83fce5dd5768b2536391459550d176
|
|
218
230
|
original_message: fix rubocop offenses in clock regression test (SCHY-471)
|
|
219
231
|
original_author: Christopher Brady <chris@schematichq.com>
|
|
220
|
-
base_generation:
|
|
232
|
+
base_generation: 4c98e0c88a5af9323ad047925ea28dec7a8bf762
|
|
221
233
|
files:
|
|
222
234
|
- test/rules_engine_clock_test.rb
|
|
223
235
|
patch_content: |
|
|
@@ -19,16 +19,18 @@ module Schematic
|
|
|
19
19
|
# @option request_options [Integer] :timeout_in_seconds
|
|
20
20
|
# @option params [String, nil] :ids
|
|
21
21
|
# @option params [String, nil] :q
|
|
22
|
+
# @option params [Schematic::Types::AccountMemberRole, nil] :role
|
|
22
23
|
# @option params [Integer, nil] :limit
|
|
23
24
|
# @option params [Integer, nil] :offset
|
|
24
25
|
#
|
|
25
26
|
# @return [Schematic::Accounts::Types::ListAccountMembersResponse]
|
|
26
27
|
def list_account_members(request_options: {}, **params)
|
|
27
28
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
28
|
-
query_param_names = %i[ids q limit offset]
|
|
29
|
+
query_param_names = %i[ids q role limit offset]
|
|
29
30
|
query_params = {}
|
|
30
31
|
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
31
32
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
33
|
+
query_params["role"] = params[:role] if params.key?(:role)
|
|
32
34
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
33
35
|
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
34
36
|
params.except(*query_param_names)
|
|
@@ -95,16 +97,18 @@ module Schematic
|
|
|
95
97
|
# @option request_options [Integer] :timeout_in_seconds
|
|
96
98
|
# @option params [String, nil] :ids
|
|
97
99
|
# @option params [String, nil] :q
|
|
100
|
+
# @option params [Schematic::Types::AccountMemberRole, nil] :role
|
|
98
101
|
# @option params [Integer, nil] :limit
|
|
99
102
|
# @option params [Integer, nil] :offset
|
|
100
103
|
#
|
|
101
104
|
# @return [Schematic::Accounts::Types::CountAccountMembersResponse]
|
|
102
105
|
def count_account_members(request_options: {}, **params)
|
|
103
106
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
104
|
-
query_param_names = %i[ids q limit offset]
|
|
107
|
+
query_param_names = %i[ids q role limit offset]
|
|
105
108
|
query_params = {}
|
|
106
109
|
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
107
110
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
111
|
+
query_params["role"] = params[:role] if params.key?(:role)
|
|
108
112
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
109
113
|
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
110
114
|
params.except(*query_param_names)
|
|
@@ -9,6 +9,7 @@ module Schematic
|
|
|
9
9
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
10
10
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
11
11
|
field :q, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
end
|
|
@@ -6,6 +6,7 @@ module Schematic
|
|
|
6
6
|
class CountAccountMembersRequest < Internal::Types::Model
|
|
7
7
|
field :ids, -> { String }, optional: true, nullable: false
|
|
8
8
|
field :q, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false
|
|
9
10
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
10
11
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
11
12
|
end
|
|
@@ -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
|
|
@@ -9,6 +9,7 @@ module Schematic
|
|
|
9
9
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
10
10
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
11
11
|
field :q, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
end
|
|
@@ -6,6 +6,7 @@ module Schematic
|
|
|
6
6
|
class ListAccountMembersRequest < Internal::Types::Model
|
|
7
7
|
field :ids, -> { String }, optional: true, nullable: false
|
|
8
8
|
field :q, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false
|
|
9
10
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
10
11
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
11
12
|
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
|
data/lib/schematic/client.rb
CHANGED
|
@@ -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.
|
|
13
|
+
"User-Agent" => "schematichq/1.4.12",
|
|
14
14
|
"X-Fern-Language" => "Ruby",
|
|
15
15
|
"X-Schematic-Api-Key" => api_key.to_s
|
|
16
16
|
}
|
|
@@ -92,6 +92,11 @@ module Schematic
|
|
|
92
92
|
@integrationsapi ||= Schematic::Integrationsapi::Client.new(client: @raw_client)
|
|
93
93
|
end
|
|
94
94
|
|
|
95
|
+
# @return [Schematic::Licenses::Client]
|
|
96
|
+
def licenses
|
|
97
|
+
@licenses ||= Schematic::Licenses::Client.new(client: @raw_client)
|
|
98
|
+
end
|
|
99
|
+
|
|
95
100
|
# @return [Schematic::Plangroups::Client]
|
|
96
101
|
def plangroups
|
|
97
102
|
@plangroups ||= Schematic::Plangroups::Client.new(client: @raw_client)
|
|
@@ -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
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Licenses
|
|
5
|
+
class Client
|
|
6
|
+
# @param client [Schematic::Internal::Http::RawClient]
|
|
7
|
+
#
|
|
8
|
+
# @return [void]
|
|
9
|
+
def initialize(client:)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# @param request_options [Hash]
|
|
14
|
+
# @param params [Hash]
|
|
15
|
+
# @option request_options [String] :base_url
|
|
16
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
17
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
18
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
19
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
20
|
+
# @option params [String, nil] :feature_ids
|
|
21
|
+
# @option params [String, nil] :ids
|
|
22
|
+
# @option params [String, nil] :name
|
|
23
|
+
# @option params [Integer, nil] :limit
|
|
24
|
+
# @option params [Integer, nil] :offset
|
|
25
|
+
#
|
|
26
|
+
# @return [Schematic::Licenses::Types::ListLicensesResponse]
|
|
27
|
+
def list_licenses(request_options: {}, **params)
|
|
28
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
29
|
+
query_param_names = %i[feature_ids ids name limit offset]
|
|
30
|
+
query_params = {}
|
|
31
|
+
query_params["feature_ids"] = params[:feature_ids] if params.key?(:feature_ids)
|
|
32
|
+
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
33
|
+
query_params["name"] = params[:name] if params.key?(:name)
|
|
34
|
+
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
35
|
+
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
36
|
+
params.except(*query_param_names)
|
|
37
|
+
|
|
38
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
39
|
+
base_url: request_options[:base_url],
|
|
40
|
+
method: "GET",
|
|
41
|
+
path: "licenses",
|
|
42
|
+
query: query_params,
|
|
43
|
+
request_options: request_options
|
|
44
|
+
)
|
|
45
|
+
begin
|
|
46
|
+
response = @client.send(request)
|
|
47
|
+
rescue Net::HTTPRequestTimeout
|
|
48
|
+
raise Schematic::Errors::TimeoutError
|
|
49
|
+
end
|
|
50
|
+
code = response.code.to_i
|
|
51
|
+
if code.between?(200, 299)
|
|
52
|
+
Schematic::Licenses::Types::ListLicensesResponse.load(response.body)
|
|
53
|
+
else
|
|
54
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
55
|
+
raise error_class.new(response.body, code: code)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# @param request_options [Hash]
|
|
60
|
+
# @param params [Hash]
|
|
61
|
+
# @option request_options [String] :base_url
|
|
62
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
63
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
64
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
65
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
66
|
+
# @option params [String] :license_id
|
|
67
|
+
#
|
|
68
|
+
# @return [Schematic::Licenses::Types::GetSingleLicenseResponse]
|
|
69
|
+
def get_single_license(request_options: {}, **params)
|
|
70
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
71
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
72
|
+
base_url: request_options[:base_url],
|
|
73
|
+
method: "GET",
|
|
74
|
+
path: "licenses/#{URI.encode_uri_component(params[:license_id].to_s)}",
|
|
75
|
+
request_options: request_options
|
|
76
|
+
)
|
|
77
|
+
begin
|
|
78
|
+
response = @client.send(request)
|
|
79
|
+
rescue Net::HTTPRequestTimeout
|
|
80
|
+
raise Schematic::Errors::TimeoutError
|
|
81
|
+
end
|
|
82
|
+
code = response.code.to_i
|
|
83
|
+
if code.between?(200, 299)
|
|
84
|
+
Schematic::Licenses::Types::GetSingleLicenseResponse.load(response.body)
|
|
85
|
+
else
|
|
86
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
87
|
+
raise error_class.new(response.body, code: code)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# @param request_options [Hash]
|
|
92
|
+
# @param params [Hash]
|
|
93
|
+
# @option request_options [String] :base_url
|
|
94
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
95
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
96
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
97
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
98
|
+
# @option params [String, nil] :feature_ids
|
|
99
|
+
# @option params [String, nil] :ids
|
|
100
|
+
# @option params [String, nil] :name
|
|
101
|
+
# @option params [Integer, nil] :limit
|
|
102
|
+
# @option params [Integer, nil] :offset
|
|
103
|
+
#
|
|
104
|
+
# @return [Schematic::Licenses::Types::CountLicensesResponse]
|
|
105
|
+
def count_licenses(request_options: {}, **params)
|
|
106
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
107
|
+
query_param_names = %i[feature_ids ids name limit offset]
|
|
108
|
+
query_params = {}
|
|
109
|
+
query_params["feature_ids"] = params[:feature_ids] if params.key?(:feature_ids)
|
|
110
|
+
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
111
|
+
query_params["name"] = params[:name] if params.key?(:name)
|
|
112
|
+
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
113
|
+
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
114
|
+
params.except(*query_param_names)
|
|
115
|
+
|
|
116
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
117
|
+
base_url: request_options[:base_url],
|
|
118
|
+
method: "GET",
|
|
119
|
+
path: "licenses/count",
|
|
120
|
+
query: query_params,
|
|
121
|
+
request_options: request_options
|
|
122
|
+
)
|
|
123
|
+
begin
|
|
124
|
+
response = @client.send(request)
|
|
125
|
+
rescue Net::HTTPRequestTimeout
|
|
126
|
+
raise Schematic::Errors::TimeoutError
|
|
127
|
+
end
|
|
128
|
+
code = response.code.to_i
|
|
129
|
+
if code.between?(200, 299)
|
|
130
|
+
Schematic::Licenses::Types::CountLicensesResponse.load(response.body)
|
|
131
|
+
else
|
|
132
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
133
|
+
raise error_class.new(response.body, code: code)
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Licenses
|
|
5
|
+
module Types
|
|
6
|
+
# Input parameters
|
|
7
|
+
class CountLicensesParams < Internal::Types::Model
|
|
8
|
+
field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
9
|
+
field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
10
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
11
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :offset, -> { Integer }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Licenses
|
|
5
|
+
module Types
|
|
6
|
+
class CountLicensesRequest < Internal::Types::Model
|
|
7
|
+
field :feature_ids, -> { String }, optional: true, nullable: false
|
|
8
|
+
field :ids, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :name, -> { String }, 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
|