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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +2 -2
  3. data/.fern/replay.lock +15 -3
  4. data/lib/schematic/accounts/client.rb +6 -2
  5. data/lib/schematic/accounts/types/count_account_members_params.rb +1 -0
  6. data/lib/schematic/accounts/types/count_account_members_request.rb +1 -0
  7. data/lib/schematic/accounts/types/create_api_key_request_body.rb +1 -0
  8. data/lib/schematic/accounts/types/list_account_members_params.rb +1 -0
  9. data/lib/schematic/accounts/types/list_account_members_request.rb +1 -0
  10. data/lib/schematic/accounts/types/update_api_key_request_body.rb +1 -0
  11. data/lib/schematic/billing/client.rb +6 -2
  12. data/lib/schematic/billing/types/list_billing_prices_params.rb +1 -0
  13. data/lib/schematic/billing/types/list_billing_prices_request.rb +1 -0
  14. data/lib/schematic/billing/types/list_billing_product_prices_params.rb +1 -0
  15. data/lib/schematic/billing/types/list_billing_product_prices_request.rb +1 -0
  16. data/lib/schematic/catalogs/types/create_catalog_request_body.rb +0 -1
  17. data/lib/schematic/checkout/types/update_company_billing_details_request_body.rb +1 -0
  18. data/lib/schematic/client.rb +6 -1
  19. data/lib/schematic/entitlements/client.rb +88 -0
  20. data/lib/schematic/entitlements/types/get_user_usage_by_company_params.rb +15 -0
  21. data/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb +14 -0
  22. data/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb +12 -0
  23. data/lib/schematic/entitlements/types/get_user_usage_detail_params.rb +15 -0
  24. data/lib/schematic/entitlements/types/get_user_usage_detail_request.rb +14 -0
  25. data/lib/schematic/entitlements/types/get_user_usage_detail_response.rb +12 -0
  26. data/lib/schematic/licenses/client.rb +138 -0
  27. data/lib/schematic/licenses/types/count_licenses_params.rb +16 -0
  28. data/lib/schematic/licenses/types/count_licenses_request.rb +15 -0
  29. data/lib/schematic/licenses/types/count_licenses_response.rb +12 -0
  30. data/lib/schematic/licenses/types/get_single_license_response.rb +12 -0
  31. data/lib/schematic/licenses/types/list_licenses_params.rb +16 -0
  32. data/lib/schematic/licenses/types/list_licenses_request.rb +15 -0
  33. data/lib/schematic/licenses/types/list_licenses_response.rb +12 -0
  34. data/lib/schematic/planmigrations/client.rb +32 -0
  35. data/lib/schematic/planmigrations/types/preview_migration_request_body.rb +14 -0
  36. data/lib/schematic/planmigrations/types/preview_migration_response.rb +12 -0
  37. data/lib/schematic/plans/types/publish_plan_version_request_body.rb +5 -0
  38. data/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +1 -0
  39. data/lib/schematic/types/api_key_create_response_data.rb +1 -0
  40. data/lib/schematic/types/api_key_response_data.rb +1 -0
  41. data/lib/schematic/types/billing_credit_grant_zeroed_out_reason.rb +1 -0
  42. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +2 -0
  43. data/lib/schematic/types/catalog_config_ordered_entitlement.rb +1 -1
  44. data/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb +1 -1
  45. data/lib/schematic/types/catalog_response_data.rb +0 -1
  46. data/lib/schematic/types/company_billing_details_response_data.rb +1 -0
  47. data/lib/schematic/types/company_billing_details_view.rb +1 -0
  48. data/lib/schematic/types/company_plan_credit_grant_view.rb +2 -0
  49. data/lib/schematic/types/company_plan_detail_response_data.rb +1 -1
  50. data/lib/schematic/types/company_tax_id_view.rb +13 -0
  51. data/lib/schematic/types/component_checkout_settings.rb +1 -0
  52. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +2 -0
  53. data/lib/schematic/types/custom_plan_billing_response_data.rb +1 -0
  54. data/lib/schematic/types/feature_detail_response_data.rb +3 -0
  55. data/lib/schematic/types/feature_in_plan_response_data.rb +2 -0
  56. data/lib/schematic/types/feature_response_data.rb +2 -0
  57. data/lib/schematic/types/feature_type.rb +1 -0
  58. data/lib/schematic/types/feature_view.rb +2 -0
  59. data/lib/schematic/types/license_response_data.rb +12 -0
  60. data/lib/schematic/types/plan_credit_grant_scaling.rb +12 -0
  61. data/lib/schematic/types/plan_credit_grant_view.rb +2 -0
  62. data/lib/schematic/types/plan_detail_response_data.rb +1 -1
  63. data/lib/schematic/types/plan_group_plan_detail_response_data.rb +1 -1
  64. data/lib/schematic/types/plan_version_migration_preview_company_response_data.rb +14 -0
  65. data/lib/schematic/types/plan_version_migration_preview_response_data.rb +9 -0
  66. data/lib/schematic/types/plan_view_public_response_data.rb +1 -1
  67. data/lib/schematic/types/tax_id_input.rb +10 -0
  68. data/lib/schematic/types/tax_id_type.rb +48 -0
  69. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +2 -0
  70. data/lib/schematic/types/user_credit_usage_response_data.rb +14 -0
  71. data/lib/schematic/types/user_daily_credit_point_response_data.rb +10 -0
  72. data/lib/schematic/types/user_daily_usage_point_response_data.rb +11 -0
  73. data/lib/schematic/types/user_feature_usage_response_data.rb +14 -0
  74. data/lib/schematic/types/user_usage_by_company_response_data.rb +12 -0
  75. data/lib/schematic/types/user_usage_detail_response_data.rb +15 -0
  76. data/lib/schematic/version.rb +1 -1
  77. data/lib/schematic.rb +31 -2
  78. data/reference.md +565 -16
  79. metadata +31 -2
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Licenses
5
+ module Types
6
+ class CountLicensesResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Licenses::Types::CountLicensesParams }, 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 Licenses
5
+ module Types
6
+ class GetSingleLicenseResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::LicenseResponseData }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ 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 ListLicensesParams < 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 ListLicensesRequest < 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
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Licenses
5
+ module Types
6
+ class ListLicensesResponse < Internal::Types::Model
7
+ field :data, -> { Internal::Types::Array[Schematic::Types::LicenseResponseData] }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Licenses::Types::ListLicensesParams }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -322,6 +322,38 @@ module Schematic
322
322
  raise error_class.new(response.body, code: code)
323
323
  end
324
324
  end
325
+
326
+ # @param request_options [Hash]
327
+ # @param params [Schematic::Planmigrations::Types::PreviewMigrationRequestBody]
328
+ # @option request_options [String] :base_url
329
+ # @option request_options [Hash{String => Object}] :additional_headers
330
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
331
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
332
+ # @option request_options [Integer] :timeout_in_seconds
333
+ #
334
+ # @return [Schematic::Planmigrations::Types::PreviewMigrationResponse]
335
+ def preview_migration(request_options: {}, **params)
336
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
337
+ request = Schematic::Internal::JSON::Request.new(
338
+ base_url: request_options[:base_url],
339
+ method: "POST",
340
+ path: "plan-version-migrations/preview",
341
+ body: Schematic::Planmigrations::Types::PreviewMigrationRequestBody.new(params).to_h,
342
+ request_options: request_options
343
+ )
344
+ begin
345
+ response = @client.send(request)
346
+ rescue Net::HTTPRequestTimeout
347
+ raise Schematic::Errors::TimeoutError
348
+ end
349
+ code = response.code.to_i
350
+ if code.between?(200, 299)
351
+ Schematic::Planmigrations::Types::PreviewMigrationResponse.load(response.body)
352
+ else
353
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
354
+ raise error_class.new(response.body, code: code)
355
+ end
356
+ end
325
357
  end
326
358
  end
327
359
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Planmigrations
5
+ module Types
6
+ class PreviewMigrationRequestBody < Internal::Types::Model
7
+ field :company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
8
+ field :plan_id, -> { String }, optional: false, nullable: false
9
+ field :plan_version_id_to, -> { String }, optional: false, nullable: false
10
+ field :target_plan_type, -> { Schematic::Types::PlanType }, 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 Planmigrations
5
+ module Types
6
+ class PreviewMigrationResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::PlanVersionMigrationPreviewResponseData }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, 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
@@ -8,6 +8,7 @@ module Schematic
8
8
  CUSTOMER_ARCHIVED = "customer_archived"
9
9
  EXPIRED = "expired"
10
10
  INTEGRATION_UNINSTALLED = "integration_uninstalled"
11
+ LICENSE_RETIRED = "license_retired"
11
12
  MANUAL = "manual"
12
13
  PLAN_CHANGE = "plan_change"
13
14
  PLAN_PERIOD_RESET = "plan_period_reset"
@@ -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
@@ -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
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CatalogConfigOrderedEntitlementResponseData < 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: false, nullable: false
8
8
  end
9
9
  end
@@ -10,7 +10,6 @@ module Schematic
10
10
  field :custom_plan_price_text, -> { String }, optional: true, nullable: false
11
11
  field :custom_plans_visible, -> { Internal::Types::Boolean }, optional: false, nullable: false
12
12
  field :description, -> { String }, optional: true, nullable: false
13
- field :environment_id, -> { String }, optional: false, nullable: false
14
13
  field :id, -> { String }, optional: false, nullable: false
15
14
  field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false
16
15
  field :name, -> { String }, optional: false, nullable: false
@@ -8,6 +8,7 @@ module Schematic
8
8
  field :custom_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false
9
9
  field :email, -> { String }, optional: true, nullable: false
10
10
  field :phone, -> { String }, optional: true, nullable: false
11
+ field :tax_ids, -> { Internal::Types::Array[Schematic::Types::CompanyTaxIdView] }, optional: false, nullable: false
11
12
  end
12
13
  end
13
14
  end
@@ -8,6 +8,7 @@ module Schematic
8
8
  field :custom_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false
9
9
  field :email, -> { String }, optional: true, nullable: false
10
10
  field :phone, -> { String }, optional: true, nullable: false
11
+ field :tax_ids, -> { Internal::Types::Array[Schematic::Types::CompanyTaxIdView] }, optional: false, nullable: false
11
12
  end
12
13
  end
13
14
  end
@@ -28,6 +28,7 @@ module Schematic
28
28
  field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
29
29
  field :expiry_unit_count, -> { Integer }, optional: true, nullable: false
30
30
  field :id, -> { String }, optional: false, nullable: false
31
+ field :license_id, -> { String }, optional: true, nullable: false
31
32
  field :plan, -> { Schematic::Types::GenericPreviewObject }, optional: true, nullable: false
32
33
  field :plan_id, -> { String }, optional: false, nullable: false
33
34
  field :plan_version_id, -> { String }, optional: true, nullable: false
@@ -36,6 +37,7 @@ module Schematic
36
37
  field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false
37
38
  field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: false, nullable: false
38
39
  field :rollover_percentage, -> { Integer }, optional: false, nullable: false
40
+ field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false
39
41
  field :singular_name, -> { String }, optional: true, nullable: false
40
42
  field :updated_at, -> { String }, optional: false, nullable: false
41
43
  end
@@ -35,7 +35,7 @@ module Schematic
35
35
  field :invalid_reason, -> { Schematic::Types::CompanyPlanInvalidReason }, optional: true, nullable: false
36
36
  field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false
37
37
  field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false
38
- field :is_free, -> { Internal::Types::Boolean }, optional: false, nullable: false
38
+ field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false
39
39
  field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false
40
40
  field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false
41
41
  field :name, -> { String }, optional: false, nullable: false
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CompanyTaxIdView < Internal::Types::Model
6
+ field :country, -> { String }, optional: false, nullable: false
7
+ field :id, -> { String }, optional: false, nullable: false
8
+ field :type, -> { String }, optional: false, nullable: false
9
+ field :value, -> { String }, optional: false, nullable: false
10
+ field :verification_status, -> { String }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
@@ -6,6 +6,7 @@ module Schematic
6
6
  field :collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false
7
7
  field :collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
8
  field :collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
+ field :proration_behavior, -> { Schematic::Types::ProrationBehavior }, optional: false, nullable: false
9
10
  field :tax_collection_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
10
11
  end
11
12
  end
@@ -20,12 +20,14 @@ module Schematic
20
20
  field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
21
21
  field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
22
22
  field :expiry_unit_count, -> { Integer }, optional: true, nullable: false
23
+ field :license_id, -> { String }, optional: true, nullable: false
23
24
  field :plan_id, -> { String }, optional: false, nullable: false
24
25
  field :plan_version_id, -> { String }, optional: true, nullable: false
25
26
  field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false
26
27
  field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false
27
28
  field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false
28
29
  field :rollover_percentage, -> { Integer }, optional: true, nullable: false
30
+ field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: true, nullable: false
29
31
  end
30
32
  end
31
33
  end
@@ -12,6 +12,7 @@ module Schematic
12
12
  field :paid_at, -> { String }, optional: true, nullable: false
13
13
  field :plan_id, -> { String }, optional: false, nullable: false
14
14
  field :published_at, -> { String }, optional: true, nullable: false
15
+ field :send_invoice, -> { Internal::Types::Boolean }, optional: false, nullable: false
15
16
  field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: false, nullable: false
16
17
  field :stripe_invoice_url, -> { String }, optional: true, nullable: false
17
18
  field :updated_at, -> { String }, optional: false, nullable: false
@@ -4,6 +4,7 @@ module Schematic
4
4
  module Types
5
5
  class FeatureDetailResponseData < Internal::Types::Model
6
6
  field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false
7
+ field :billing_product, -> { Schematic::Types::BillingProductResponseData }, optional: true, nullable: false
7
8
  field :created_at, -> { String }, optional: false, nullable: false
8
9
  field :description, -> { String }, optional: false, nullable: false
9
10
  field :event_subtype, -> { String }, optional: true, nullable: false
@@ -12,6 +13,7 @@ module Schematic
12
13
  field :flags, -> { Internal::Types::Array[Schematic::Types::FlagDetailResponseData] }, optional: false, nullable: false
13
14
  field :icon, -> { String }, optional: false, nullable: false
14
15
  field :id, -> { String }, optional: false, nullable: false
16
+ field :license_id, -> { String }, optional: true, nullable: false
15
17
  field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false
16
18
  field :maintainer, -> { Schematic::Types::AccountMemberResponseData }, optional: true, nullable: false
17
19
  field :maintainer_account_member_id, -> { String }, optional: true, nullable: false
@@ -22,6 +24,7 @@ module Schematic
22
24
  field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false
23
25
  field :trait_id, -> { String }, optional: true, nullable: false
24
26
  field :updated_at, -> { String }, optional: false, nullable: false
27
+ field :usage_limit_trait_id, -> { String }, optional: true, nullable: false
25
28
  end
26
29
  end
27
30
  end
@@ -12,6 +12,7 @@ module Schematic
12
12
  field :flags, -> { Internal::Types::Array[Schematic::Types::FlagInPlanResponseData] }, optional: false, nullable: false
13
13
  field :icon, -> { String }, optional: false, nullable: false
14
14
  field :id, -> { String }, optional: false, nullable: false
15
+ field :license_id, -> { String }, optional: true, nullable: false
15
16
  field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false
16
17
  field :maintainer_account_member_id, -> { String }, optional: true, nullable: false
17
18
  field :name, -> { String }, optional: false, nullable: false
@@ -21,6 +22,7 @@ module Schematic
21
22
  field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false
22
23
  field :trait_id, -> { String }, optional: true, nullable: false
23
24
  field :updated_at, -> { String }, optional: false, nullable: false
25
+ field :usage_limit_trait_id, -> { String }, optional: true, nullable: false
24
26
  end
25
27
  end
26
28
  end
@@ -9,6 +9,7 @@ module Schematic
9
9
  field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false
10
10
  field :icon, -> { String }, optional: false, nullable: false
11
11
  field :id, -> { String }, optional: false, nullable: false
12
+ field :license_id, -> { String }, optional: true, nullable: false
12
13
  field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false
13
14
  field :maintainer_account_member_id, -> { String }, optional: true, nullable: false
14
15
  field :name, -> { String }, optional: false, nullable: false
@@ -16,6 +17,7 @@ module Schematic
16
17
  field :singular_name, -> { String }, optional: true, nullable: false
17
18
  field :trait_id, -> { String }, optional: true, nullable: false
18
19
  field :updated_at, -> { String }, optional: false, nullable: false
20
+ field :usage_limit_trait_id, -> { String }, optional: true, nullable: false
19
21
  end
20
22
  end
21
23
  end
@@ -7,6 +7,7 @@ module Schematic
7
7
 
8
8
  BOOLEAN = "boolean"
9
9
  EVENT = "event"
10
+ LICENSE = "license"
10
11
  TRAIT = "trait"
11
12
  end
12
13
  end
@@ -5,6 +5,7 @@ module Schematic
5
5
  class FeatureView < Internal::Types::Model
6
6
  field :account_id, -> { String }, optional: false, nullable: false
7
7
  field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false
8
+ field :billing_product, -> { Schematic::Types::BillingProductResponseData }, optional: true, nullable: false
8
9
  field :created_at, -> { String }, optional: false, nullable: false
9
10
  field :description, -> { String }, optional: false, nullable: false
10
11
  field :event_subtype, -> { String }, optional: true, nullable: false
@@ -13,6 +14,7 @@ module Schematic
13
14
  field :flags, -> { Internal::Types::Array[Schematic::Types::FlagView] }, optional: false, nullable: false
14
15
  field :icon, -> { String }, optional: false, nullable: false
15
16
  field :id, -> { String }, optional: false, nullable: false
17
+ field :license_id, -> { String }, optional: true, nullable: false
16
18
  field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false
17
19
  field :name, -> { String }, optional: false, nullable: false
18
20
  field :plans, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class LicenseResponseData < Internal::Types::Model
6
+ field :created_at, -> { String }, optional: false, nullable: false
7
+ field :id, -> { String }, optional: false, nullable: false
8
+ field :name, -> { String }, optional: false, nullable: false
9
+ field :updated_at, -> { String }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module PlanCreditGrantScaling
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ FIXED = "fixed"
9
+ PER_LICENSE = "per_license"
10
+ end
11
+ end
12
+ 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::GenericPreviewObject }, optional: true, nullable: false
29
30
  field :plan_id, -> { String }, optional: false, nullable: false
30
31
  field :plan_version_id, -> { String }, optional: true, 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: false, 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 :singular_name, -> { String }, optional: true, nullable: false
37
39
  field :updated_at, -> { String }, optional: false, nullable: false
38
40
  end
@@ -27,7 +27,7 @@ module Schematic
27
27
  field :id, -> { String }, optional: false, nullable: false
28
28
  field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false
29
29
  field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false
30
- field :is_free, -> { Internal::Types::Boolean }, optional: false, nullable: false
30
+ field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false
31
31
  field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false
32
32
  field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false
33
33
  field :name, -> { String }, optional: false, nullable: false
@@ -31,7 +31,7 @@ module Schematic
31
31
  field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false
32
32
  field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false
33
33
  field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false
34
- field :is_free, -> { Internal::Types::Boolean }, optional: false, nullable: false
34
+ field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false
35
35
  field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false
36
36
  field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false
37
37
  field :name, -> { String }, optional: false, nullable: false
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanVersionMigrationPreviewCompanyResponseData < Internal::Types::Model
6
+ field :company_id, -> { String }, optional: false, nullable: false
7
+ field :has_billing_changes, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ field :has_custom_pricing, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
+ field :note, -> { String }, optional: true, nullable: false
10
+ field :plan_version_id_from, -> { String }, optional: true, nullable: false
11
+ field :will_update_subscription, -> { Internal::Types::Boolean }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanVersionMigrationPreviewResponseData < Internal::Types::Model
6
+ field :companies, -> { Internal::Types::Array[Schematic::Types::PlanVersionMigrationPreviewCompanyResponseData] }, optional: false, nullable: false
7
+ end
8
+ end
9
+ end
@@ -32,7 +32,7 @@ module Schematic
32
32
  field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantView] }, optional: false, nullable: false
33
33
  field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false
34
34
  field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false
35
- field :is_free, -> { Internal::Types::Boolean }, optional: false, nullable: false
35
+ field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false
36
36
  field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false
37
37
  field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false
38
38
  field :name, -> { String }, optional: false, nullable: false
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class TaxIdInput < Internal::Types::Model
6
+ field :type, -> { Schematic::Types::TaxIdType }, optional: false, nullable: false
7
+ field :value, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module TaxIdType
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ AE_TRN = "ae_trn"
9
+ AU_ABN = "au_abn"
10
+ AU_ARN = "au_arn"
11
+ BR_CNPJ = "br_cnpj"
12
+ BR_CPF = "br_cpf"
13
+ CA_BN = "ca_bn"
14
+ CA_GST_HST = "ca_gst_hst"
15
+ CA_PST_BC = "ca_pst_bc"
16
+ CA_PST_MB = "ca_pst_mb"
17
+ CA_PST_SK = "ca_pst_sk"
18
+ CA_QST = "ca_qst"
19
+ CH_UID = "ch_uid"
20
+ CH_VAT = "ch_vat"
21
+ EU_VAT = "eu_vat"
22
+ GB_VAT = "gb_vat"
23
+ HK_BR = "hk_br"
24
+ ID_NPWP = "id_npwp"
25
+ IL_VAT = "il_vat"
26
+ IN_GST = "in_gst"
27
+ JP_CN = "jp_cn"
28
+ JP_RN = "jp_rn"
29
+ JP_TRN = "jp_trn"
30
+ KR_BRN = "kr_brn"
31
+ MX_RFC = "mx_rfc"
32
+ MY_FRP = "my_frp"
33
+ MY_ITN = "my_itn"
34
+ MY_SST = "my_sst"
35
+ NO_VAT = "no_vat"
36
+ NZ_GST = "nz_gst"
37
+ PH_TIN = "ph_tin"
38
+ SA_VAT = "sa_vat"
39
+ SG_GST = "sg_gst"
40
+ SG_UEN = "sg_uen"
41
+ TH_VAT = "th_vat"
42
+ TR_TIN = "tr_tin"
43
+ TW_VAT = "tw_vat"
44
+ US_EIN = "us_ein"
45
+ ZA_VAT = "za_vat"
46
+ end
47
+ end
48
+ end
@@ -19,10 +19,12 @@ module Schematic
19
19
  field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
20
20
  field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
21
21
  field :expiry_unit_count, -> { Integer }, optional: true, nullable: false
22
+ field :license_id, -> { String }, optional: true, nullable: false
22
23
  field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false
23
24
  field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false
24
25
  field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false
25
26
  field :rollover_percentage, -> { Integer }, optional: true, nullable: false
27
+ field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: true, nullable: false
26
28
  end
27
29
  end
28
30
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class UserCreditUsageResponseData < Internal::Types::Model
6
+ field :billing_credit_id, -> { String }, optional: false, nullable: false
7
+ field :credit_name, -> { String }, optional: false, nullable: false
8
+ field :credits_used, -> { Integer }, optional: false, nullable: false
9
+ field :share, -> { Integer }, optional: false, nullable: false
10
+ field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false
11
+ field :user_id, -> { String }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class UserDailyCreditPointResponseData < Internal::Types::Model
6
+ field :credits_used, -> { Integer }, optional: false, nullable: false
7
+ field :date, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end