schematichq 1.5.2 → 1.5.3
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 +3 -3
- data/.fern/replay.lock +8 -338
- data/.fernignore +6 -0
- data/README.md +141 -0
- data/custom.gemspec.rb +6 -0
- data/lib/schematic/accounts/types/update_environment_request_body.rb +2 -0
- data/lib/schematic/client.rb +1 -1
- data/lib/schematic/credits/client.rb +50 -6
- data/lib/schematic/credits/leases/check.rb +477 -0
- data/lib/schematic/credits/leases/lease_manager.rb +565 -0
- data/lib/schematic/credits/leases/lease_store.rb +240 -0
- data/lib/schematic/credits/leases/redis_lease_store.rb +358 -0
- data/lib/schematic/credits/leases/redis_reservation_store.rb +326 -0
- data/lib/schematic/credits/leases/reservation_store.rb +161 -0
- data/lib/schematic/credits/leases/server_check.rb +237 -0
- data/lib/schematic/credits/leases/track.rb +66 -0
- data/lib/schematic/credits/leases/types.rb +329 -0
- data/lib/schematic/credits/leases/wire_client.rb +83 -0
- data/lib/schematic/credits/types/acquire_credit_lease_request_body.rb +2 -0
- data/lib/schematic/credits/types/create_credit_spend_policy_request_body.rb +5 -1
- data/lib/schematic/credits/types/extend_credit_lease_request_body.rb +2 -0
- data/lib/schematic/credits/types/get_credit_spend_policy_usage_params.rb +16 -0
- data/lib/schematic/credits/types/get_credit_spend_policy_usage_request.rb +15 -0
- data/lib/schematic/credits/types/get_credit_spend_policy_usage_response.rb +13 -0
- data/lib/schematic/credits/types/update_credit_spend_policy_request_body.rb +4 -0
- data/lib/schematic/datastream/client.rb +32 -2
- data/lib/schematic/entitlements/client.rb +165 -0
- data/lib/schematic/entitlements/types/count_company_user_usage_params.rb +24 -0
- data/lib/schematic/entitlements/types/count_company_user_usage_request.rb +23 -0
- data/lib/schematic/entitlements/types/count_company_user_usage_response.rb +13 -0
- data/lib/schematic/entitlements/types/get_company_user_usage_metrics_params.rb +16 -0
- data/lib/schematic/entitlements/types/get_company_user_usage_metrics_request.rb +15 -0
- data/lib/schematic/entitlements/types/get_company_user_usage_metrics_response.rb +13 -0
- data/lib/schematic/entitlements/types/list_company_user_usage_params.rb +24 -0
- data/lib/schematic/entitlements/types/list_company_user_usage_request.rb +23 -0
- data/lib/schematic/entitlements/types/list_company_user_usage_response.rb +13 -0
- data/lib/schematic/plangroups/client.rb +2 -0
- data/lib/schematic/plangroups/types/create_plan_group_request_body.rb +2 -0
- data/lib/schematic/plangroups/types/update_plan_group_request_body.rb +2 -0
- data/lib/schematic/planmigrations/client.rb +6 -0
- data/lib/schematic/planmigrations/types/count_migrations_params.rb +2 -0
- data/lib/schematic/planmigrations/types/count_migrations_request.rb +2 -0
- data/lib/schematic/planmigrations/types/create_migration_input.rb +2 -0
- data/lib/schematic/planmigrations/types/list_migrations_params.rb +2 -0
- data/lib/schematic/planmigrations/types/list_migrations_request.rb +2 -0
- data/lib/schematic/plans/types/publish_plan_version_request_body.rb +4 -0
- data/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +2 -0
- data/lib/schematic/rules_engine.rb +37 -0
- data/lib/schematic/schematic_client.rb +830 -33
- data/lib/schematic/types/capture_raw_event.rb +4 -0
- data/lib/schematic/types/check_flags_response_data.rb +2 -0
- data/lib/schematic/types/company_detail_response_data.rb +2 -0
- data/lib/schematic/types/company_plan_detail_response_data.rb +2 -0
- data/lib/schematic/types/company_user_usage_metrics_response_data.rb +15 -0
- data/lib/schematic/types/company_user_usage_response_data.rb +19 -0
- data/lib/schematic/types/company_user_usage_row_response_data.rb +17 -0
- data/lib/schematic/types/component_display_settings.rb +2 -0
- data/lib/schematic/types/component_settings_response_data.rb +2 -0
- data/lib/schematic/types/credit_event_ledger_response_data.rb +5 -1
- data/lib/schematic/types/credit_event_type.rb +3 -0
- data/lib/schematic/types/credit_ledger_entry_kind.rb +17 -0
- data/lib/schematic/types/credit_spend_policy.rb +25 -0
- data/lib/schematic/types/credit_spend_policy_response_data.rb +12 -0
- data/lib/schematic/types/credit_spend_window.rb +11 -0
- data/lib/schematic/types/credit_spend_window_unit.rb +13 -0
- data/lib/schematic/types/custom_plan_billing_response_data.rb +2 -0
- data/lib/schematic/types/environment_detail_response_data.rb +2 -0
- data/lib/schematic/types/environment_response_data.rb +2 -0
- data/lib/schematic/types/estimated_plan_total.rb +13 -0
- data/lib/schematic/types/pending_migration_response_data.rb +6 -0
- data/lib/schematic/types/plan_version_migration_response_data.rb +2 -0
- data/lib/schematic/types/plan_version_migration_strategy.rb +1 -0
- data/lib/schematic/types/rules_engine_schema_version.rb +1 -1
- data/lib/schematic/types/rulesengine_company.rb +2 -0
- data/lib/schematic/types/rulesengine_credit_spend_policy.rb +25 -0
- data/lib/schematic/types/rulesengine_credit_spend_policy_scope.rb +13 -0
- data/lib/schematic/types/rulesengine_credit_spend_window.rb +11 -0
- data/lib/schematic/types/rulesengine_user.rb +2 -0
- data/lib/schematic/types/user_usage_metric.rb +12 -0
- data/lib/schematic/version.rb +1 -1
- data/lib/schematic.rb +26 -2
- data/lib/schematichq.rb +10 -0
- data/reference.md +474 -9
- metadata +36 -2
|
@@ -5,6 +5,10 @@ module Schematic
|
|
|
5
5
|
class CaptureRawEvent < Internal::Types::Model
|
|
6
6
|
field :captured_at, -> { String }, optional: false, nullable: false
|
|
7
7
|
|
|
8
|
+
field :context_signature, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :context_signature_checked, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
11
|
+
|
|
8
12
|
field :event_id, -> { String }, optional: true, nullable: false
|
|
9
13
|
|
|
10
14
|
field :raw_bytes, -> { String }, optional: false, nullable: false
|
|
@@ -5,6 +5,8 @@ module Schematic
|
|
|
5
5
|
class CheckFlagsResponseData < Internal::Types::Model
|
|
6
6
|
field :credit_balances, -> { Internal::Types::Hash[String, Schematic::Types::CompanyCreditBalance] }, optional: true, nullable: false
|
|
7
7
|
|
|
8
|
+
field :credit_spend_policies, -> { Internal::Types::Array[Schematic::Types::CreditSpendPolicy] }, optional: false, nullable: false
|
|
9
|
+
|
|
8
10
|
field :flags, -> { Internal::Types::Array[Schematic::Types::CheckFlagResponseData] }, optional: false, nullable: false
|
|
9
11
|
|
|
10
12
|
field :plan, -> { Schematic::Types::DatastreamCompanyPlan }, optional: true, nullable: false
|
|
@@ -7,6 +7,8 @@ module Schematic
|
|
|
7
7
|
|
|
8
8
|
field :billing_credit_balances, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false
|
|
9
9
|
|
|
10
|
+
field :billing_email, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
10
12
|
field :billing_profile, -> { Schematic::Types::CompanyBillingProfileResponseData }, optional: true, nullable: false
|
|
11
13
|
|
|
12
14
|
field :billing_profiles, -> { Internal::Types::Array[Schematic::Types::CompanyBillingProfileResponseData] }, optional: true, nullable: false
|
|
@@ -53,6 +53,8 @@ module Schematic
|
|
|
53
53
|
|
|
54
54
|
field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false
|
|
55
55
|
|
|
56
|
+
field :estimated_totals, -> { Internal::Types::Array[Schematic::Types::EstimatedPlanTotal] }, optional: true, nullable: false
|
|
57
|
+
|
|
56
58
|
field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false
|
|
57
59
|
|
|
58
60
|
field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class CompanyUserUsageMetricsResponseData < Internal::Types::Model
|
|
6
|
+
field :end_time, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :features, -> { Internal::Types::Array[Schematic::Types::FeatureResponseData] }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :has_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :start_time, -> { String }, optional: false, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class CompanyUserUsageResponseData < Internal::Types::Model
|
|
6
|
+
field :end_time, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :rows, -> { Internal::Types::Array[Schematic::Types::CompanyUserUsageRowResponseData] }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :start_time, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :top_user_share, -> { Integer }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :total, -> { Integer }, optional: false, nullable: false
|
|
15
|
+
|
|
16
|
+
field :unattributed, -> { Schematic::Types::CompanyUserUsageRowResponseData }, optional: true, nullable: false
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class CompanyUserUsageRowResponseData < Internal::Types::Model
|
|
6
|
+
field :last_seen, -> { String }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :share, -> { Integer }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :user_id, -> { String }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :value, -> { Integer }, optional: false, nullable: false
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -7,6 +7,8 @@ module Schematic
|
|
|
7
7
|
|
|
8
8
|
field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
9
9
|
|
|
10
|
+
field :show_estimated_total, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
11
|
+
|
|
10
12
|
field :show_feature_description, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
11
13
|
|
|
12
14
|
field :show_hard_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
@@ -7,6 +7,8 @@ module Schematic
|
|
|
7
7
|
|
|
8
8
|
field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
9
9
|
|
|
10
|
+
field :show_estimated_total, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
11
|
+
|
|
10
12
|
field :show_feature_description, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
11
13
|
|
|
12
14
|
field :show_hard_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
@@ -9,7 +9,7 @@ module Schematic
|
|
|
9
9
|
|
|
10
10
|
field :billing_credit_bundle_id, -> { String }, optional: true, nullable: false
|
|
11
11
|
|
|
12
|
-
field :billing_credit_id, -> { String }, optional:
|
|
12
|
+
field :billing_credit_id, -> { String }, optional: true, nullable: false
|
|
13
13
|
|
|
14
14
|
field :company, -> { Schematic::Types::CompanyLedgerResponseData }, optional: true, nullable: false
|
|
15
15
|
|
|
@@ -19,6 +19,8 @@ module Schematic
|
|
|
19
19
|
|
|
20
20
|
field :credit_name, -> { String }, optional: false, nullable: false
|
|
21
21
|
|
|
22
|
+
field :currency, -> { String }, optional: true, nullable: false
|
|
23
|
+
|
|
22
24
|
field :environment_id, -> { String }, optional: false, nullable: false
|
|
23
25
|
|
|
24
26
|
field :event_at, -> { String }, optional: false, nullable: false
|
|
@@ -51,6 +53,8 @@ module Schematic
|
|
|
51
53
|
|
|
52
54
|
field :grant_valid_from, -> { String }, optional: true, nullable: false
|
|
53
55
|
|
|
56
|
+
field :kind, -> { Schematic::Types::CreditLedgerEntryKind }, optional: false, nullable: false
|
|
57
|
+
|
|
54
58
|
field :plan_id, -> { String }, optional: true, nullable: false
|
|
55
59
|
|
|
56
60
|
field :quantity_consumed, -> { Integer }, optional: true, nullable: false
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
module CreditLedgerEntryKind
|
|
6
|
+
extend Schematic::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
ADJUSTMENT = "adjustment"
|
|
9
|
+
CHARGE = "charge"
|
|
10
|
+
DRAWDOWN = "drawdown"
|
|
11
|
+
GRANT = "grant"
|
|
12
|
+
SETTLEMENT = "settlement"
|
|
13
|
+
TRANSFER = "transfer"
|
|
14
|
+
ZERO_OUT = "zero_out"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class CreditSpendPolicy < Internal::Types::Model
|
|
6
|
+
field :consumed, -> { Integer }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :credit_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :kind, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :label, -> { String }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :limit, -> { Integer }, optional: false, nullable: false
|
|
17
|
+
|
|
18
|
+
field :resets_at, -> { String }, optional: true, nullable: false
|
|
19
|
+
|
|
20
|
+
field :scope, -> { Schematic::Types::CreditSpendPolicyScope }, optional: false, nullable: false
|
|
21
|
+
|
|
22
|
+
field :window, -> { Schematic::Types::CreditSpendWindow }, optional: true, nullable: false
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -7,19 +7,31 @@ module Schematic
|
|
|
7
7
|
|
|
8
8
|
field :company_id, -> { String }, optional: true, nullable: false
|
|
9
9
|
|
|
10
|
+
field :consumed, -> { Integer }, optional: true, nullable: false
|
|
11
|
+
|
|
10
12
|
field :created_at, -> { String }, optional: false, nullable: false
|
|
11
13
|
|
|
14
|
+
field :headroom, -> { Integer }, optional: true, nullable: false
|
|
15
|
+
|
|
12
16
|
field :id, -> { String }, optional: false, nullable: false
|
|
13
17
|
|
|
14
18
|
field :label, -> { String }, optional: true, nullable: false
|
|
15
19
|
|
|
16
20
|
field :max_per_draw, -> { Integer }, optional: true, nullable: false
|
|
17
21
|
|
|
22
|
+
field :resets_at, -> { String }, optional: true, nullable: false
|
|
23
|
+
|
|
18
24
|
field :scope_type, -> { Schematic::Types::CreditSpendPolicyScope }, optional: false, nullable: false
|
|
19
25
|
|
|
20
26
|
field :updated_at, -> { String }, optional: false, nullable: false
|
|
21
27
|
|
|
22
28
|
field :user_id, -> { String }, optional: true, nullable: false
|
|
29
|
+
|
|
30
|
+
field :window_amount, -> { Integer }, optional: true, nullable: false
|
|
31
|
+
|
|
32
|
+
field :window_count, -> { Integer }, optional: false, nullable: false
|
|
33
|
+
|
|
34
|
+
field :window_unit, -> { Schematic::Types::CreditSpendWindowUnit }, optional: true, nullable: false
|
|
23
35
|
end
|
|
24
36
|
end
|
|
25
37
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class CreditSpendWindow < Internal::Types::Model
|
|
6
|
+
field :count, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :unit, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -7,6 +7,8 @@ module Schematic
|
|
|
7
7
|
|
|
8
8
|
field :billing_cycle_anchor, -> { String }, optional: true, nullable: false
|
|
9
9
|
|
|
10
|
+
field :billing_start_date, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
10
12
|
field :company_id, -> { String }, optional: false, nullable: false
|
|
11
13
|
|
|
12
14
|
field :created_at, -> { String }, optional: false, nullable: false
|
|
@@ -13,6 +13,8 @@ module Schematic
|
|
|
13
13
|
|
|
14
14
|
field :name, -> { String }, optional: false, nullable: false
|
|
15
15
|
|
|
16
|
+
field :require_context_signature, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
17
|
+
|
|
16
18
|
field :updated_at, -> { String }, optional: false, nullable: false
|
|
17
19
|
end
|
|
18
20
|
end
|
|
@@ -11,6 +11,8 @@ module Schematic
|
|
|
11
11
|
|
|
12
12
|
field :name, -> { String }, optional: false, nullable: false
|
|
13
13
|
|
|
14
|
+
field :require_context_signature, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
15
|
+
|
|
14
16
|
field :updated_at, -> { String }, optional: false, nullable: false
|
|
15
17
|
end
|
|
16
18
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class EstimatedPlanTotal < Internal::Types::Model
|
|
6
|
+
field :amount, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :currency, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :period, -> { Schematic::Types::PlanPriceCadence }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Types
|
|
5
5
|
class PendingMigrationResponseData < Internal::Types::Model
|
|
6
|
+
field :effective_at, -> { String }, optional: true, nullable: false
|
|
7
|
+
|
|
6
8
|
field :migration_id, -> { String }, optional: false, nullable: false
|
|
7
9
|
|
|
10
|
+
field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false
|
|
11
|
+
|
|
8
12
|
field :scheduled_for, -> { String }, optional: true, nullable: false
|
|
9
13
|
|
|
14
|
+
field :strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false
|
|
15
|
+
|
|
10
16
|
field :to_plan_id, -> { String }, optional: false, nullable: false
|
|
11
17
|
|
|
12
18
|
field :to_plan_name, -> { String }, optional: false, nullable: false
|
|
@@ -31,6 +31,8 @@ module Schematic
|
|
|
31
31
|
|
|
32
32
|
field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false
|
|
33
33
|
|
|
34
|
+
field :scheduled_at, -> { String }, optional: true, nullable: false
|
|
35
|
+
|
|
34
36
|
field :skipped_companies, -> { Integer }, optional: false, nullable: false
|
|
35
37
|
|
|
36
38
|
field :started_at, -> { String }, optional: true, nullable: false
|
|
@@ -13,6 +13,8 @@ module Schematic
|
|
|
13
13
|
|
|
14
14
|
field :credit_postpaid, -> { Internal::Types::Hash[String, Schematic::Types::RulesengineCreditPostpaidConfig] }, optional: true, nullable: false
|
|
15
15
|
|
|
16
|
+
field :credit_spend_policies, -> { Internal::Types::Array[Schematic::Types::RulesengineCreditSpendPolicy] }, optional: true, nullable: false
|
|
17
|
+
|
|
16
18
|
field :entitlements, -> { Internal::Types::Array[Schematic::Types::RulesengineFeatureEntitlement] }, optional: true, nullable: false
|
|
17
19
|
|
|
18
20
|
field :environment_id, -> { String }, optional: false, nullable: false
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class RulesengineCreditSpendPolicy < Internal::Types::Model
|
|
6
|
+
field :consumed, -> { Integer }, optional: true, nullable: false
|
|
7
|
+
|
|
8
|
+
field :credit_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :kind, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :label, -> { String }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :limit, -> { Integer }, optional: false, nullable: false
|
|
17
|
+
|
|
18
|
+
field :resets_at, -> { String }, optional: true, nullable: false
|
|
19
|
+
|
|
20
|
+
field :scope, -> { Schematic::Types::RulesengineCreditSpendPolicyScope }, optional: false, nullable: false
|
|
21
|
+
|
|
22
|
+
field :window, -> { Schematic::Types::RulesengineCreditSpendWindow }, optional: true, nullable: false
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Types
|
|
5
|
+
class RulesengineCreditSpendWindow < Internal::Types::Model
|
|
6
|
+
field :count, -> { Integer }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :unit, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -5,6 +5,8 @@ module Schematic
|
|
|
5
5
|
class RulesengineUser < Internal::Types::Model
|
|
6
6
|
field :account_id, -> { String }, optional: false, nullable: false
|
|
7
7
|
|
|
8
|
+
field :credit_spend_policies, -> { Internal::Types::Array[Schematic::Types::RulesengineCreditSpendPolicy] }, optional: true, nullable: false
|
|
9
|
+
|
|
8
10
|
field :environment_id, -> { String }, optional: false, nullable: false
|
|
9
11
|
|
|
10
12
|
field :id, -> { String }, optional: false, nullable: false
|
data/lib/schematic/version.rb
CHANGED
data/lib/schematic.rb
CHANGED
|
@@ -229,6 +229,7 @@ require_relative "schematic/credits/types/reserve_credits_response"
|
|
|
229
229
|
require_relative "schematic/credits/types/release_credit_reservation_response"
|
|
230
230
|
require_relative "schematic/types/credit_spend_policy_scope"
|
|
231
231
|
require_relative "schematic/credits/types/list_credit_spend_policies_params"
|
|
232
|
+
require_relative "schematic/types/credit_spend_window_unit"
|
|
232
233
|
require_relative "schematic/types/credit_spend_policy_response_data"
|
|
233
234
|
require_relative "schematic/credits/types/list_credit_spend_policies_response"
|
|
234
235
|
require_relative "schematic/credits/types/create_credit_spend_policy_response"
|
|
@@ -237,10 +238,13 @@ require_relative "schematic/credits/types/update_credit_spend_policy_response"
|
|
|
237
238
|
require_relative "schematic/credits/types/delete_credit_spend_policy_response"
|
|
238
239
|
require_relative "schematic/credits/types/count_credit_spend_policies_params"
|
|
239
240
|
require_relative "schematic/credits/types/count_credit_spend_policies_response"
|
|
241
|
+
require_relative "schematic/credits/types/get_credit_spend_policy_usage_params"
|
|
242
|
+
require_relative "schematic/credits/types/get_credit_spend_policy_usage_response"
|
|
240
243
|
require_relative "schematic/types/credit_event_type"
|
|
241
244
|
require_relative "schematic/credits/types/list_credit_event_ledger_params"
|
|
242
245
|
require_relative "schematic/types/billing_credit_ledger_response_data"
|
|
243
246
|
require_relative "schematic/types/company_ledger_response_data"
|
|
247
|
+
require_relative "schematic/types/credit_ledger_entry_kind"
|
|
244
248
|
require_relative "schematic/types/credit_transfer_reason"
|
|
245
249
|
require_relative "schematic/types/credit_usage_reason"
|
|
246
250
|
require_relative "schematic/types/feature_ledger_response_data"
|
|
@@ -332,6 +336,8 @@ require_relative "schematic/types/entity_key_detail_response_data"
|
|
|
332
336
|
require_relative "schematic/types/entity_trait_detail_response_data"
|
|
333
337
|
require_relative "schematic/types/warning_tier"
|
|
334
338
|
require_relative "schematic/types/feature_entitlement"
|
|
339
|
+
require_relative "schematic/types/migration_proration_behavior"
|
|
340
|
+
require_relative "schematic/types/plan_version_migration_strategy"
|
|
335
341
|
require_relative "schematic/types/pending_migration_response_data"
|
|
336
342
|
require_relative "schematic/types/rule"
|
|
337
343
|
require_relative "schematic/types/scheduled_downgrade_response_data"
|
|
@@ -505,6 +511,16 @@ require_relative "schematic/types/user_credit_usage_response_data"
|
|
|
505
511
|
require_relative "schematic/types/user_feature_usage_response_data"
|
|
506
512
|
require_relative "schematic/types/user_usage_by_company_response_data"
|
|
507
513
|
require_relative "schematic/entitlements/types/get_user_usage_by_company_response"
|
|
514
|
+
require_relative "schematic/entitlements/types/get_company_user_usage_metrics_params"
|
|
515
|
+
require_relative "schematic/types/company_user_usage_metrics_response_data"
|
|
516
|
+
require_relative "schematic/entitlements/types/get_company_user_usage_metrics_response"
|
|
517
|
+
require_relative "schematic/types/user_usage_metric"
|
|
518
|
+
require_relative "schematic/entitlements/types/list_company_user_usage_params"
|
|
519
|
+
require_relative "schematic/types/company_user_usage_row_response_data"
|
|
520
|
+
require_relative "schematic/types/company_user_usage_response_data"
|
|
521
|
+
require_relative "schematic/entitlements/types/list_company_user_usage_response"
|
|
522
|
+
require_relative "schematic/entitlements/types/count_company_user_usage_params"
|
|
523
|
+
require_relative "schematic/entitlements/types/count_company_user_usage_response"
|
|
508
524
|
require_relative "schematic/entitlements/types/get_user_usage_detail_params"
|
|
509
525
|
require_relative "schematic/types/user_daily_credit_point_response_data"
|
|
510
526
|
require_relative "schematic/types/user_daily_usage_point_response_data"
|
|
@@ -556,6 +572,7 @@ require_relative "schematic/types/billing_credit_bundle_view"
|
|
|
556
572
|
require_relative "schematic/types/checkout_bundle_purchase_behavior"
|
|
557
573
|
require_relative "schematic/types/company_plan_invalid_reason"
|
|
558
574
|
require_relative "schematic/types/custom_plan_config"
|
|
575
|
+
require_relative "schematic/types/estimated_plan_total"
|
|
559
576
|
require_relative "schematic/types/plan_credit_grant_view"
|
|
560
577
|
require_relative "schematic/types/company_plan_detail_response_data"
|
|
561
578
|
require_relative "schematic/types/compatible_plans"
|
|
@@ -629,6 +646,8 @@ require_relative "schematic/types/flag_check_reservation_response_data"
|
|
|
629
646
|
require_relative "schematic/types/check_and_reserve_flag_response_data"
|
|
630
647
|
require_relative "schematic/features/types/check_and_reserve_flag_response"
|
|
631
648
|
require_relative "schematic/types/company_credit_balance"
|
|
649
|
+
require_relative "schematic/types/credit_spend_window"
|
|
650
|
+
require_relative "schematic/types/credit_spend_policy"
|
|
632
651
|
require_relative "schematic/types/datastream_company_plan"
|
|
633
652
|
require_relative "schematic/types/check_flags_response_data"
|
|
634
653
|
require_relative "schematic/features/types/check_flags_response"
|
|
@@ -723,8 +742,6 @@ require_relative "schematic/planmigrations/types/count_company_migrations_params
|
|
|
723
742
|
require_relative "schematic/planmigrations/types/count_company_migrations_response"
|
|
724
743
|
require_relative "schematic/types/plan_version_migration_status"
|
|
725
744
|
require_relative "schematic/planmigrations/types/list_migrations_params"
|
|
726
|
-
require_relative "schematic/types/migration_proration_behavior"
|
|
727
|
-
require_relative "schematic/types/plan_version_migration_strategy"
|
|
728
745
|
require_relative "schematic/types/plan_version_migration_response_data"
|
|
729
746
|
require_relative "schematic/planmigrations/types/list_migrations_response"
|
|
730
747
|
require_relative "schematic/planmigrations/types/create_migration_response"
|
|
@@ -877,6 +894,9 @@ require_relative "schematic/types/rulesengine_trait_definition"
|
|
|
877
894
|
require_relative "schematic/types/rulesengine_condition"
|
|
878
895
|
require_relative "schematic/types/rulesengine_condition_group"
|
|
879
896
|
require_relative "schematic/types/rulesengine_credit_postpaid_config"
|
|
897
|
+
require_relative "schematic/types/rulesengine_credit_spend_policy_scope"
|
|
898
|
+
require_relative "schematic/types/rulesengine_credit_spend_window"
|
|
899
|
+
require_relative "schematic/types/rulesengine_credit_spend_policy"
|
|
880
900
|
require_relative "schematic/types/rulesengine_rule"
|
|
881
901
|
require_relative "schematic/types/rulesengine_subscription"
|
|
882
902
|
require_relative "schematic/types/rulesengine_trait"
|
|
@@ -962,6 +982,7 @@ require_relative "schematic/credits/types/list_credit_spend_policies_request"
|
|
|
962
982
|
require_relative "schematic/credits/types/create_credit_spend_policy_request_body"
|
|
963
983
|
require_relative "schematic/credits/types/update_credit_spend_policy_request_body"
|
|
964
984
|
require_relative "schematic/credits/types/count_credit_spend_policies_request"
|
|
985
|
+
require_relative "schematic/credits/types/get_credit_spend_policy_usage_request"
|
|
965
986
|
require_relative "schematic/credits/types/list_credit_event_ledger_request"
|
|
966
987
|
require_relative "schematic/credits/types/count_credit_event_ledger_request"
|
|
967
988
|
require_relative "schematic/catalogs/client"
|
|
@@ -1021,6 +1042,9 @@ require_relative "schematic/entitlements/types/count_plan_entitlements_request"
|
|
|
1021
1042
|
require_relative "schematic/entitlements/types/duplicate_plan_entitlements_request_body"
|
|
1022
1043
|
require_relative "schematic/entitlements/types/get_feature_usage_by_company_request"
|
|
1023
1044
|
require_relative "schematic/entitlements/types/get_user_usage_by_company_request"
|
|
1045
|
+
require_relative "schematic/entitlements/types/get_company_user_usage_metrics_request"
|
|
1046
|
+
require_relative "schematic/entitlements/types/list_company_user_usage_request"
|
|
1047
|
+
require_relative "schematic/entitlements/types/count_company_user_usage_request"
|
|
1024
1048
|
require_relative "schematic/entitlements/types/get_user_usage_detail_request"
|
|
1025
1049
|
require_relative "schematic/plans/client"
|
|
1026
1050
|
require_relative "schematic/plans/types/update_company_plans_request_body"
|
data/lib/schematichq.rb
CHANGED
|
@@ -14,4 +14,14 @@ require_relative "schematic/datastream/merge"
|
|
|
14
14
|
require_relative "schematic/datastream/resource_cache"
|
|
15
15
|
require_relative "schematic/datastream/websocket_client"
|
|
16
16
|
require_relative "schematic/datastream/client"
|
|
17
|
+
require_relative "schematic/credits/leases/types"
|
|
18
|
+
require_relative "schematic/credits/leases/lease_store"
|
|
19
|
+
require_relative "schematic/credits/leases/reservation_store"
|
|
20
|
+
require_relative "schematic/credits/leases/redis_lease_store"
|
|
21
|
+
require_relative "schematic/credits/leases/redis_reservation_store"
|
|
22
|
+
require_relative "schematic/credits/leases/wire_client"
|
|
23
|
+
require_relative "schematic/credits/leases/lease_manager"
|
|
24
|
+
require_relative "schematic/credits/leases/check"
|
|
25
|
+
require_relative "schematic/credits/leases/server_check"
|
|
26
|
+
require_relative "schematic/credits/leases/track"
|
|
17
27
|
require_relative "schematic/schematic_client"
|