schematichq 1.4.13 → 1.4.14

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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +2 -2
  3. data/.fern/replay.lock +9 -3
  4. data/WASM_VERSION +1 -1
  5. data/lib/schematic/accounts/client.rb +63 -0
  6. data/lib/schematic/accounts/types/get_onboarding_state_response.rb +12 -0
  7. data/lib/schematic/accounts/types/update_onboarding_state_request_body.rb +14 -0
  8. data/lib/schematic/accounts/types/update_onboarding_state_response.rb +12 -0
  9. data/lib/schematic/client.rb +1 -1
  10. data/lib/schematic/companies/client.rb +109 -3
  11. data/lib/schematic/companies/types/count_entity_traits_params.rb +15 -0
  12. data/lib/schematic/companies/types/count_entity_traits_request.rb +14 -0
  13. data/lib/schematic/companies/types/count_entity_traits_response.rb +12 -0
  14. data/lib/schematic/companies/types/delete_entity_trait_definition_response.rb +12 -0
  15. data/lib/schematic/companies/types/get_entity_trait_definition_usage_response.rb +12 -0
  16. data/lib/schematic/companies/types/list_plan_changes_params.rb +0 -1
  17. data/lib/schematic/companies/types/list_plan_changes_request.rb +0 -1
  18. data/lib/schematic/credits/types/create_credit_bundle_request_body.rb +1 -0
  19. data/lib/schematic/credits/types/update_credit_bundle_details_request_body.rb +1 -0
  20. data/lib/schematic/planbundle/client.rb +3 -3
  21. data/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb +1 -1
  22. data/lib/schematic/plangroups/types/create_plan_group_request_body.rb +2 -0
  23. data/lib/schematic/plangroups/types/update_plan_group_request_body.rb +2 -0
  24. data/lib/schematic/planmigrations/types/create_migration_input.rb +4 -3
  25. data/lib/schematic/planmigrations/types/preview_migration_request_body.rb +2 -1
  26. data/lib/schematic/plans/client.rb +11 -9
  27. data/lib/schematic/plans/types/delete_plan_version_request.rb +1 -1
  28. data/lib/schematic/plans/types/list_custom_plan_billings_params.rb +1 -0
  29. data/lib/schematic/plans/types/list_custom_plan_billings_request.rb +1 -0
  30. data/lib/schematic/plans/types/publish_plan_version_request_body.rb +2 -1
  31. data/lib/schematic/plans/types/update_company_plans_request_body.rb +1 -1
  32. data/lib/schematic/types/billing_collection_method.rb +12 -0
  33. data/lib/schematic/types/billing_credit_bundle_response_data.rb +1 -0
  34. data/lib/schematic/types/billing_credit_bundle_view.rb +1 -0
  35. data/lib/schematic/types/billing_credit_grant_response_data.rb +2 -0
  36. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +1 -0
  37. data/lib/schematic/types/checkout_bundle_purchase_behavior.rb +12 -0
  38. data/lib/schematic/types/checkout_settings_response_data.rb +2 -0
  39. data/lib/schematic/types/company_billing_checkout_settings.rb +1 -0
  40. data/lib/schematic/types/company_feature_usage_export_metadata.rb +2 -0
  41. data/lib/schematic/types/company_plan_credit_grant_view.rb +1 -0
  42. data/lib/schematic/types/component_checkout_settings.rb +2 -0
  43. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +1 -0
  44. data/lib/schematic/types/credit_company_grant_view.rb +2 -0
  45. data/lib/schematic/types/custom_plan_billing_response_data.rb +2 -0
  46. data/lib/schematic/types/entity_trait_definition_usage.rb +14 -0
  47. data/lib/schematic/types/get_onboarding_state_resp.rb +14 -0
  48. data/lib/schematic/types/manage_plan_request.rb +7 -0
  49. data/lib/schematic/types/migration_proration_behavior.rb +12 -0
  50. data/lib/schematic/types/onboarding_milestone.rb +12 -0
  51. data/lib/schematic/types/onboarding_milestone_view.rb +12 -0
  52. data/lib/schematic/types/onboarding_path.rb +12 -0
  53. data/lib/schematic/types/onboarding_requirement.rb +16 -0
  54. data/lib/schematic/types/onboarding_requirement_status.rb +13 -0
  55. data/lib/schematic/types/onboarding_requirement_view.rb +12 -0
  56. data/lib/schematic/types/onboarding_track.rb +12 -0
  57. data/lib/schematic/types/plan_billing_source.rb +12 -0
  58. data/lib/schematic/types/plan_bundle_response_data.rb +1 -0
  59. data/lib/schematic/types/plan_credit_grant_view.rb +1 -0
  60. data/lib/schematic/types/plan_version_migration_preview_response_data.rb +1 -0
  61. data/lib/schematic/types/plan_version_migration_response_data.rb +1 -0
  62. data/lib/schematic/types/preview_subscription_finance_response_data.rb +1 -0
  63. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +1 -0
  64. data/lib/schematic/types/upsert_company_request_body.rb +1 -0
  65. data/lib/schematic/types/upsert_user_request_body.rb +1 -0
  66. data/lib/schematic/types/upsert_user_sub_request_body.rb +1 -0
  67. data/lib/schematic/types/who_am_i_response_data.rb +1 -0
  68. data/lib/schematic/version.rb +1 -1
  69. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  70. data/lib/schematic.rb +21 -0
  71. data/reference.md +382 -25
  72. metadata +23 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0becf4f97a567470a17bca32a31305233a5bfd4cb85b3bcf328efe48df033bbc
4
- data.tar.gz: 728b9b45b42ffa8a4ab8cd59cedf51ac1edd36c99f8594a6892f261f04ce435b
3
+ metadata.gz: 53f25b95e0e3d5093612fa858644502bb95dd1ef3169165aa150b0a70d09840d
4
+ data.tar.gz: b402ed5695207946b63d65e928a28a57d1c3b3b89dd4356c6203520d870b996b
5
5
  SHA512:
6
- metadata.gz: 26dc88335c2f7e3df6bc2c37439f41446be2949f46b7af3d83af57faf93479e0a367423e2d17a40c0f0b96c366ba4fd2cde16bd10a32364430e44b86faa3257d
7
- data.tar.gz: a9398c4e481d5d395753e060891b6c5406a745da1f270845688cc7871ec373fe0822c95f7ce96210fc5a05a56810e2cf773be552102ee1051bb666fe927ef0fa
6
+ metadata.gz: e181a61dc6e7b6181a0695e5d097ac80860a20a5fd61bb355055c27ec04270814d0b308193588130702191a57ee74d2742052648b1d7fa3ed63ea438cdd86cd6
7
+ data.tar.gz: 5fea6bbdfc528cfb9c3973385e3c8e749a7103b9ec8b6803722a88a26dcc0ebfc9e78ff9636f2d82dccdc936e3e813ff5ba6cc53989d8df1c36a0f64ea71aebc
data/.fern/metadata.json CHANGED
@@ -13,6 +13,6 @@
13
13
  "webrick": ">= 1.0"
14
14
  }
15
15
  },
16
- "originGitCommit": "8cfe954dda14329fc30a4f80b915db0acf608382",
17
- "sdkVersion": "1.4.13"
16
+ "originGitCommit": "1ab5d36abb4de887dde605f8b82a71dce464a26b",
17
+ "sdkVersion": "1.4.14"
18
18
  }
data/.fern/replay.lock CHANGED
@@ -60,14 +60,20 @@ generations:
60
60
  cli_version: unknown
61
61
  generator_versions:
62
62
  fernapi/fern-ruby-sdk: 1.1.13
63
- current_generation: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e
63
+ - commit_sha: 25497874a46bed5955dc9fcb6effc4d6bfafea9b
64
+ tree_hash: 111ecbe19a029b291a029131dffdff707a48d5af
65
+ timestamp: 2026-08-17T10:12:00.906Z
66
+ cli_version: unknown
67
+ generator_versions:
68
+ fernapi/fern-ruby-sdk: 1.1.13
69
+ current_generation: 25497874a46bed5955dc9fcb6effc4d6bfafea9b
64
70
  patches:
65
71
  - id: patch-5da692c2
66
72
  content_hash: sha256:e652287219a0a709e16112ced444e6472c6fa8bdfe888edf868caaf9769a9472
67
73
  original_commit: 5da692c20aef08577d900f9a860b5f78a549418e
68
74
  original_message: inject host time into datastream wasm rules engine (SCHY-471)
69
75
  original_author: Christopher Brady <chris@schematichq.com>
70
- base_generation: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e
76
+ base_generation: 25497874a46bed5955dc9fcb6effc4d6bfafea9b
71
77
  files:
72
78
  - test/rules_engine_clock_test.rb
73
79
  patch_content: |
@@ -235,7 +241,7 @@ patches:
235
241
  original_commit: ee61788c5a83fce5dd5768b2536391459550d176
236
242
  original_message: fix rubocop offenses in clock regression test (SCHY-471)
237
243
  original_author: Christopher Brady <chris@schematichq.com>
238
- base_generation: 08bb53f51fc9cf2cc4e0b0b303167d8d1e6fbf0e
244
+ base_generation: 25497874a46bed5955dc9fcb6effc4d6bfafea9b
239
245
  files:
240
246
  - test/rules_engine_clock_test.rb
241
247
  patch_content: |
data/WASM_VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.7.0
@@ -662,6 +662,69 @@ module Schematic
662
662
  end
663
663
  end
664
664
 
665
+ # @param request_options [Hash]
666
+ # @param params [Hash]
667
+ # @option request_options [String] :base_url
668
+ # @option request_options [Hash{String => Object}] :additional_headers
669
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
670
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
671
+ # @option request_options [Integer] :timeout_in_seconds
672
+ #
673
+ # @return [Schematic::Accounts::Types::GetOnboardingStateResponse]
674
+ def get_onboarding_state(request_options: {}, **params)
675
+ Schematic::Internal::Types::Utils.normalize_keys(params)
676
+ request = Schematic::Internal::JSON::Request.new(
677
+ base_url: request_options[:base_url],
678
+ method: "GET",
679
+ path: "onboarding-state",
680
+ request_options: request_options
681
+ )
682
+ begin
683
+ response = @client.send(request)
684
+ rescue Net::HTTPRequestTimeout
685
+ raise Schematic::Errors::TimeoutError
686
+ end
687
+ code = response.code.to_i
688
+ if code.between?(200, 299)
689
+ Schematic::Accounts::Types::GetOnboardingStateResponse.load(response.body)
690
+ else
691
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
692
+ raise error_class.new(response.body, code: code)
693
+ end
694
+ end
695
+
696
+ # @param request_options [Hash]
697
+ # @param params [Schematic::Accounts::Types::UpdateOnboardingStateRequestBody]
698
+ # @option request_options [String] :base_url
699
+ # @option request_options [Hash{String => Object}] :additional_headers
700
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
701
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
702
+ # @option request_options [Integer] :timeout_in_seconds
703
+ #
704
+ # @return [Schematic::Accounts::Types::UpdateOnboardingStateResponse]
705
+ def update_onboarding_state(request_options: {}, **params)
706
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
707
+ request = Schematic::Internal::JSON::Request.new(
708
+ base_url: request_options[:base_url],
709
+ method: "POST",
710
+ path: "onboarding-state",
711
+ body: Schematic::Accounts::Types::UpdateOnboardingStateRequestBody.new(params).to_h,
712
+ request_options: request_options
713
+ )
714
+ begin
715
+ response = @client.send(request)
716
+ rescue Net::HTTPRequestTimeout
717
+ raise Schematic::Errors::TimeoutError
718
+ end
719
+ code = response.code.to_i
720
+ if code.between?(200, 299)
721
+ Schematic::Accounts::Types::UpdateOnboardingStateResponse.load(response.body)
722
+ else
723
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
724
+ raise error_class.new(response.body, code: code)
725
+ end
726
+ end
727
+
665
728
  # @param request_options [Hash]
666
729
  # @param params [Hash]
667
730
  # @option request_options [String] :base_url
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Accounts
5
+ module Types
6
+ class GetOnboardingStateResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::GetOnboardingStateResp }, 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,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Accounts
5
+ module Types
6
+ class UpdateOnboardingStateRequestBody < Internal::Types::Model
7
+ field :path, -> { Schematic::Types::OnboardingPath }, optional: true, nullable: false
8
+ field :pricing_page_url, -> { String }, optional: true, nullable: false
9
+ field :track, -> { Schematic::Types::OnboardingTrack }, optional: true, nullable: false
10
+ field :website_url, -> { 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 Accounts
5
+ module Types
6
+ class UpdateOnboardingStateResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::GetOnboardingStateResp }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -10,7 +10,7 @@ module Schematic
10
10
  @raw_client = Schematic::Internal::Http::RawClient.new(
11
11
  base_url: base_url || Schematic::Environment::DEFAULT,
12
12
  headers: {
13
- "User-Agent" => "schematichq/1.4.13",
13
+ "User-Agent" => "schematichq/1.4.14",
14
14
  "X-Fern-Language" => "Ruby",
15
15
  "X-Schematic-Api-Key" => api_key.to_s
16
16
  }
@@ -954,6 +954,70 @@ module Schematic
954
954
  end
955
955
  end
956
956
 
957
+ # @param request_options [Hash]
958
+ # @param params [Hash]
959
+ # @option request_options [String] :base_url
960
+ # @option request_options [Hash{String => Object}] :additional_headers
961
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
962
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
963
+ # @option request_options [Integer] :timeout_in_seconds
964
+ # @option params [String] :entity_trait_definition_id
965
+ #
966
+ # @return [Schematic::Companies::Types::DeleteEntityTraitDefinitionResponse]
967
+ def delete_entity_trait_definition(request_options: {}, **params)
968
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
969
+ request = Schematic::Internal::JSON::Request.new(
970
+ base_url: request_options[:base_url],
971
+ method: "DELETE",
972
+ path: "entity-trait-definitions/#{URI.encode_uri_component(params[:entity_trait_definition_id].to_s)}",
973
+ request_options: request_options
974
+ )
975
+ begin
976
+ response = @client.send(request)
977
+ rescue Net::HTTPRequestTimeout
978
+ raise Schematic::Errors::TimeoutError
979
+ end
980
+ code = response.code.to_i
981
+ if code.between?(200, 299)
982
+ Schematic::Companies::Types::DeleteEntityTraitDefinitionResponse.load(response.body)
983
+ else
984
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
985
+ raise error_class.new(response.body, code: code)
986
+ end
987
+ end
988
+
989
+ # @param request_options [Hash]
990
+ # @param params [Hash]
991
+ # @option request_options [String] :base_url
992
+ # @option request_options [Hash{String => Object}] :additional_headers
993
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
994
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
995
+ # @option request_options [Integer] :timeout_in_seconds
996
+ # @option params [String] :entity_trait_definition_id
997
+ #
998
+ # @return [Schematic::Companies::Types::GetEntityTraitDefinitionUsageResponse]
999
+ def get_entity_trait_definition_usage(request_options: {}, **params)
1000
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
1001
+ request = Schematic::Internal::JSON::Request.new(
1002
+ base_url: request_options[:base_url],
1003
+ method: "GET",
1004
+ path: "entity-trait-definitions/#{URI.encode_uri_component(params[:entity_trait_definition_id].to_s)}/usage",
1005
+ request_options: request_options
1006
+ )
1007
+ begin
1008
+ response = @client.send(request)
1009
+ rescue Net::HTTPRequestTimeout
1010
+ raise Schematic::Errors::TimeoutError
1011
+ end
1012
+ code = response.code.to_i
1013
+ if code.between?(200, 299)
1014
+ Schematic::Companies::Types::GetEntityTraitDefinitionUsageResponse.load(response.body)
1015
+ else
1016
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
1017
+ raise error_class.new(response.body, code: code)
1018
+ end
1019
+ end
1020
+
957
1021
  # @param request_options [Hash]
958
1022
  # @param params [Hash]
959
1023
  # @option request_options [String] :base_url
@@ -1048,6 +1112,50 @@ module Schematic
1048
1112
  end
1049
1113
  end
1050
1114
 
1115
+ # @param request_options [Hash]
1116
+ # @param params [Hash]
1117
+ # @option request_options [String] :base_url
1118
+ # @option request_options [Hash{String => Object}] :additional_headers
1119
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
1120
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
1121
+ # @option request_options [Integer] :timeout_in_seconds
1122
+ # @option params [String, nil] :definition_id
1123
+ # @option params [Schematic::Types::EntityType, nil] :entity_type
1124
+ # @option params [Integer, nil] :limit
1125
+ # @option params [Integer, nil] :offset
1126
+ #
1127
+ # @return [Schematic::Companies::Types::CountEntityTraitsResponse]
1128
+ def count_entity_traits(request_options: {}, **params)
1129
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
1130
+ query_param_names = %i[definition_id entity_type limit offset]
1131
+ query_params = {}
1132
+ query_params["definition_id"] = params[:definition_id] if params.key?(:definition_id)
1133
+ query_params["entity_type"] = params[:entity_type] if params.key?(:entity_type)
1134
+ query_params["limit"] = params[:limit] if params.key?(:limit)
1135
+ query_params["offset"] = params[:offset] if params.key?(:offset)
1136
+ params.except(*query_param_names)
1137
+
1138
+ request = Schematic::Internal::JSON::Request.new(
1139
+ base_url: request_options[:base_url],
1140
+ method: "GET",
1141
+ path: "entity-traits/count",
1142
+ query: query_params,
1143
+ request_options: request_options
1144
+ )
1145
+ begin
1146
+ response = @client.send(request)
1147
+ rescue Net::HTTPRequestTimeout
1148
+ raise Schematic::Errors::TimeoutError
1149
+ end
1150
+ code = response.code.to_i
1151
+ if code.between?(200, 299)
1152
+ Schematic::Companies::Types::CountEntityTraitsResponse.load(response.body)
1153
+ else
1154
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
1155
+ raise error_class.new(response.body, code: code)
1156
+ end
1157
+ end
1158
+
1051
1159
  # @param request_options [Hash]
1052
1160
  # @param params [Hash]
1053
1161
  # @option request_options [String] :base_url
@@ -1059,20 +1167,18 @@ module Schematic
1059
1167
  # @option params [Schematic::Types::PlanChangeBasePlanAction, nil] :base_plan_action
1060
1168
  # @option params [String, nil] :company_id
1061
1169
  # @option params [String, nil] :company_ids
1062
- # @option params [String, nil] :plan_ids
1063
1170
  # @option params [Integer, nil] :limit
1064
1171
  # @option params [Integer, nil] :offset
1065
1172
  #
1066
1173
  # @return [Schematic::Companies::Types::ListPlanChangesResponse]
1067
1174
  def list_plan_changes(request_options: {}, **params)
1068
1175
  params = Schematic::Internal::Types::Utils.normalize_keys(params)
1069
- query_param_names = %i[action base_plan_action company_id company_ids plan_ids limit offset]
1176
+ query_param_names = %i[action base_plan_action company_id company_ids limit offset]
1070
1177
  query_params = {}
1071
1178
  query_params["action"] = params[:action] if params.key?(:action)
1072
1179
  query_params["base_plan_action"] = params[:base_plan_action] if params.key?(:base_plan_action)
1073
1180
  query_params["company_id"] = params[:company_id] if params.key?(:company_id)
1074
1181
  query_params["company_ids"] = params[:company_ids] if params.key?(:company_ids)
1075
- query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids)
1076
1182
  query_params["limit"] = params[:limit] if params.key?(:limit)
1077
1183
  query_params["offset"] = params[:offset] if params.key?(:offset)
1078
1184
  params.except(*query_param_names)
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ # Input parameters
7
+ class CountEntityTraitsParams < Internal::Types::Model
8
+ field :definition_id, -> { String }, optional: true, nullable: false
9
+ field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false
10
+ field :limit, -> { Integer }, optional: true, nullable: false
11
+ field :offset, -> { Integer }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class CountEntityTraitsRequest < Internal::Types::Model
7
+ field :definition_id, -> { String }, optional: true, nullable: false
8
+ field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false
9
+ field :limit, -> { Integer }, optional: true, nullable: false
10
+ field :offset, -> { Integer }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class CountEntityTraitsResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Companies::Types::CountEntityTraitsParams }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class DeleteEntityTraitDefinitionResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Companies
5
+ module Types
6
+ class GetEntityTraitDefinitionUsageResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::EntityTraitDefinitionUsage }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -11,7 +11,6 @@ module Schematic
11
11
  field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
12
12
  field :limit, -> { Integer }, optional: true, nullable: false
13
13
  field :offset, -> { Integer }, optional: true, nullable: false
14
- field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
15
14
  end
16
15
  end
17
16
  end
@@ -8,7 +8,6 @@ module Schematic
8
8
  field :base_plan_action, -> { Schematic::Types::PlanChangeBasePlanAction }, optional: true, nullable: false
9
9
  field :company_id, -> { String }, optional: true, nullable: false
10
10
  field :company_ids, -> { String }, optional: true, nullable: false
11
- field :plan_ids, -> { String }, optional: true, nullable: false
12
11
  field :limit, -> { Integer }, optional: true, nullable: false
13
12
  field :offset, -> { Integer }, optional: true, nullable: false
14
13
  end
@@ -6,6 +6,7 @@ module Schematic
6
6
  class CreateCreditBundleRequestBody < Internal::Types::Model
7
7
  field :bundle_name, -> { String }, optional: false, nullable: false
8
8
  field :bundle_type, -> { String }, optional: true, nullable: false
9
+ field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
9
10
  field :credit_id, -> { String }, optional: false, nullable: false
10
11
  field :currency, -> { String }, optional: false, nullable: false
11
12
  field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPriceRequestBody] }, optional: true, nullable: false
@@ -6,6 +6,7 @@ module Schematic
6
6
  class UpdateCreditBundleDetailsRequestBody < Internal::Types::Model
7
7
  field :bundle_id, -> { String }, optional: false, nullable: false
8
8
  field :bundle_name, -> { String }, optional: false, nullable: false
9
+ field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
9
10
  field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPriceRequestBody] }, optional: true, nullable: false
10
11
  field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
11
12
  field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false
@@ -81,19 +81,19 @@ module Schematic
81
81
  # @option request_options [Hash{String => Object}] :additional_query_parameters
82
82
  # @option request_options [Hash{String => Object}] :additional_body_parameters
83
83
  # @option request_options [Integer] :timeout_in_seconds
84
- # @option params [String] :plan_bundle_id
84
+ # @option params [String] :plan_id
85
85
  #
86
86
  # @return [Schematic::Planbundle::Types::UpdatePlanBundleResponse]
87
87
  def update_plan_bundle(request_options: {}, **params)
88
88
  params = Schematic::Internal::Types::Utils.normalize_keys(params)
89
89
  request_data = Schematic::Planbundle::Types::UpdatePlanBundleRequestBody.new(params).to_h
90
- non_body_param_names = ["plan_bundle_id"]
90
+ non_body_param_names = ["plan_id"]
91
91
  body = request_data.except(*non_body_param_names)
92
92
 
93
93
  request = Schematic::Internal::JSON::Request.new(
94
94
  base_url: request_options[:base_url],
95
95
  method: "PUT",
96
- path: "plan-bundles/#{URI.encode_uri_component(params[:plan_bundle_id].to_s)}",
96
+ path: "plan-bundles/#{URI.encode_uri_component(params[:plan_id].to_s)}",
97
97
  body: body,
98
98
  request_options: request_options
99
99
  )
@@ -4,7 +4,7 @@ module Schematic
4
4
  module Planbundle
5
5
  module Types
6
6
  class UpdatePlanBundleRequestBody < Internal::Types::Model
7
- field :plan_bundle_id, -> { String }, optional: false, nullable: false
7
+ field :plan_id, -> { String }, optional: false, nullable: false
8
8
  field :billing_product, -> { Schematic::Types::UpsertBillingProductRequestBody }, optional: true, nullable: false
9
9
  field :credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanBundleCreditGrantRequestBody] }, optional: true, nullable: false
10
10
  field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false
@@ -6,9 +6,11 @@ module Schematic
6
6
  class CreatePlanGroupRequestBody < Internal::Types::Model
7
7
  field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlans] }, optional: true, nullable: false
8
8
  field :add_on_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
9
+ field :checkout_bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false
9
10
  field :checkout_collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false
10
11
  field :checkout_collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false
11
12
  field :checkout_collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false
13
+ field :checkout_collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false
12
14
  field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldInput] }, optional: true, nullable: false
13
15
  field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false
14
16
  field :custom_plan_id, -> { String }, optional: true, nullable: false
@@ -7,9 +7,11 @@ module Schematic
7
7
  field :plan_group_id, -> { String }, optional: false, nullable: false
8
8
  field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlans] }, optional: true, nullable: false
9
9
  field :add_on_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
10
+ field :checkout_bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false
10
11
  field :checkout_collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false
11
12
  field :checkout_collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false
12
13
  field :checkout_collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false
14
+ field :checkout_collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false
13
15
  field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldInput] }, optional: true, nullable: false
14
16
  field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false
15
17
  field :custom_plan_id, -> { String }, optional: true, nullable: false
@@ -4,11 +4,12 @@ module Schematic
4
4
  module Planmigrations
5
5
  module Types
6
6
  class CreateMigrationInput < Internal::Types::Model
7
- field :company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
8
- field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
7
+ field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
8
+ field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
9
9
  field :plan_id, -> { String }, optional: false, nullable: false
10
10
  field :plan_version_id_to, -> { String }, optional: false, nullable: false
11
- field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: false, nullable: false
11
+ field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: true, nullable: false
12
+ field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false
12
13
  field :strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false
13
14
  field :target_plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false
14
15
  end
@@ -4,9 +4,10 @@ module Schematic
4
4
  module Planmigrations
5
5
  module Types
6
6
  class PreviewMigrationRequestBody < Internal::Types::Model
7
- field :company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
7
+ field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
8
8
  field :plan_id, -> { String }, optional: false, nullable: false
9
9
  field :plan_version_id_to, -> { String }, optional: false, nullable: false
10
+ field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: true, nullable: false
10
11
  field :target_plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false
11
12
  end
12
13
  end
@@ -17,19 +17,19 @@ module Schematic
17
17
  # @option request_options [Hash{String => Object}] :additional_query_parameters
18
18
  # @option request_options [Hash{String => Object}] :additional_body_parameters
19
19
  # @option request_options [Integer] :timeout_in_seconds
20
- # @option params [String] :company_plan_id
20
+ # @option params [String] :company_id
21
21
  #
22
22
  # @return [Schematic::Plans::Types::UpdateCompanyPlansResponse]
23
23
  def update_company_plans(request_options: {}, **params)
24
24
  params = Schematic::Internal::Types::Utils.normalize_keys(params)
25
25
  request_data = Schematic::Plans::Types::UpdateCompanyPlansRequestBody.new(params).to_h
26
- non_body_param_names = ["company_plan_id"]
26
+ non_body_param_names = ["company_id"]
27
27
  body = request_data.except(*non_body_param_names)
28
28
 
29
29
  request = Schematic::Internal::JSON::Request.new(
30
30
  base_url: request_options[:base_url],
31
31
  method: "PUT",
32
- path: "company-plans/#{URI.encode_uri_component(params[:company_plan_id].to_s)}",
32
+ path: "company-plans/#{URI.encode_uri_component(params[:company_id].to_s)}",
33
33
  body: body,
34
34
  request_options: request_options
35
35
  )
@@ -56,6 +56,7 @@ module Schematic
56
56
  # @option request_options [Integer] :timeout_in_seconds
57
57
  # @option params [String, nil] :company_id
58
58
  # @option params [String, nil] :plan_id
59
+ # @option params [Schematic::Types::PlanBillingSource, nil] :plan_billing_source
59
60
  # @option params [Schematic::Types::CustomPlanBillingStatus, nil] :status
60
61
  # @option params [Schematic::Types::CustomPlanBillingStatus, nil] :statuses
61
62
  # @option params [Integer, nil] :limit
@@ -64,10 +65,11 @@ module Schematic
64
65
  # @return [Schematic::Plans::Types::ListCustomPlanBillingsResponse]
65
66
  def list_custom_plan_billings(request_options: {}, **params)
66
67
  params = Schematic::Internal::Types::Utils.normalize_keys(params)
67
- query_param_names = %i[company_id plan_id status statuses limit offset]
68
+ query_param_names = %i[company_id plan_id plan_billing_source status statuses limit offset]
68
69
  query_params = {}
69
70
  query_params["company_id"] = params[:company_id] if params.key?(:company_id)
70
71
  query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id)
72
+ query_params["plan_billing_source"] = params[:plan_billing_source] if params.key?(:plan_billing_source)
71
73
  query_params["status"] = params[:status] if params.key?(:status)
72
74
  query_params["statuses"] = params[:statuses] if params.key?(:statuses)
73
75
  query_params["limit"] = params[:limit] if params.key?(:limit)
@@ -673,7 +675,7 @@ module Schematic
673
675
  # @option request_options [Hash{String => Object}] :additional_query_parameters
674
676
  # @option request_options [Hash{String => Object}] :additional_body_parameters
675
677
  # @option request_options [Integer] :timeout_in_seconds
676
- # @option params [String] :plan_id
678
+ # @option params [String] :plan_version_id
677
679
  # @option params [Boolean, nil] :promote_archived_version
678
680
  #
679
681
  # @return [Schematic::Plans::Types::DeletePlanVersionResponse]
@@ -687,7 +689,7 @@ module Schematic
687
689
  request = Schematic::Internal::JSON::Request.new(
688
690
  base_url: request_options[:base_url],
689
691
  method: "DELETE",
690
- path: "plans/version/#{URI.encode_uri_component(params[:plan_id].to_s)}",
692
+ path: "plans/version/#{URI.encode_uri_component(params[:plan_version_id].to_s)}",
691
693
  query: query_params,
692
694
  request_options: request_options
693
695
  )
@@ -712,19 +714,19 @@ module Schematic
712
714
  # @option request_options [Hash{String => Object}] :additional_query_parameters
713
715
  # @option request_options [Hash{String => Object}] :additional_body_parameters
714
716
  # @option request_options [Integer] :timeout_in_seconds
715
- # @option params [String] :plan_id
717
+ # @option params [String] :plan_version_id
716
718
  #
717
719
  # @return [Schematic::Plans::Types::PublishPlanVersionResponse]
718
720
  def publish_plan_version(request_options: {}, **params)
719
721
  params = Schematic::Internal::Types::Utils.normalize_keys(params)
720
722
  request_data = Schematic::Plans::Types::PublishPlanVersionRequestBody.new(params).to_h
721
- non_body_param_names = ["plan_id"]
723
+ non_body_param_names = ["plan_version_id"]
722
724
  body = request_data.except(*non_body_param_names)
723
725
 
724
726
  request = Schematic::Internal::JSON::Request.new(
725
727
  base_url: request_options[:base_url],
726
728
  method: "PUT",
727
- path: "plans/version/#{URI.encode_uri_component(params[:plan_id].to_s)}/publish",
729
+ path: "plans/version/#{URI.encode_uri_component(params[:plan_version_id].to_s)}/publish",
728
730
  body: body,
729
731
  request_options: request_options
730
732
  )
@@ -4,7 +4,7 @@ module Schematic
4
4
  module Plans
5
5
  module Types
6
6
  class DeletePlanVersionRequest < Internal::Types::Model
7
- field :plan_id, -> { String }, optional: false, nullable: false
7
+ field :plan_version_id, -> { String }, optional: false, nullable: false
8
8
  field :promote_archived_version, -> { Internal::Types::Boolean }, optional: true, nullable: false
9
9
  end
10
10
  end
@@ -8,6 +8,7 @@ module Schematic
8
8
  field :company_id, -> { String }, optional: true, nullable: false
9
9
  field :limit, -> { Integer }, optional: true, nullable: false
10
10
  field :offset, -> { Integer }, optional: true, nullable: false
11
+ field :plan_billing_source, -> { Schematic::Types::PlanBillingSource }, optional: true, nullable: false
11
12
  field :plan_id, -> { String }, optional: true, nullable: false
12
13
  field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false
13
14
  field :statuses, -> { Internal::Types::Array[Schematic::Types::CustomPlanBillingStatus] }, optional: true, nullable: false
@@ -6,6 +6,7 @@ module Schematic
6
6
  class ListCustomPlanBillingsRequest < Internal::Types::Model
7
7
  field :company_id, -> { String }, optional: true, nullable: false
8
8
  field :plan_id, -> { String }, optional: true, nullable: false
9
+ field :plan_billing_source, -> { Schematic::Types::PlanBillingSource }, optional: true, nullable: false
9
10
  field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false
10
11
  field :statuses, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false
11
12
  field :limit, -> { Integer }, optional: true, nullable: false