schematichq 1.4.3 → 1.4.4

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +2 -2
  3. data/WASM_VERSION +1 -1
  4. data/lib/schematic/accounts/client.rb +44 -0
  5. data/lib/schematic/accounts/types/count_account_members_params.rb +15 -0
  6. data/lib/schematic/accounts/types/count_account_members_request.rb +14 -0
  7. data/lib/schematic/accounts/types/count_account_members_response.rb +12 -0
  8. data/lib/schematic/client.rb +1 -1
  9. data/lib/schematic/integrationsapi/client.rb +99 -3
  10. data/lib/schematic/integrationsapi/types/assume_stripe_installed_response.rb +12 -0
  11. data/lib/schematic/integrationsapi/types/install_integration_response.rb +12 -0
  12. data/lib/schematic/integrationsapi/types/install_stripe_response.rb +12 -0
  13. data/lib/schematic/integrationsapi/types/{load_sample_data_set_v_2_response.rb → load_sample_data_set_response.rb} +1 -1
  14. data/lib/schematic/plangroups/types/create_plan_group_request_body.rb +1 -0
  15. data/lib/schematic/plangroups/types/update_plan_group_request_body.rb +1 -0
  16. data/lib/schematic/types/account_member_response_data.rb +2 -0
  17. data/lib/schematic/types/billing_credit_grant_reason.rb +1 -0
  18. data/lib/schematic/types/billing_credit_grant_response_data.rb +3 -0
  19. data/lib/schematic/types/billing_credit_ledger_authority.rb +13 -0
  20. data/lib/schematic/types/billing_credit_view.rb +1 -0
  21. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +1 -0
  22. data/lib/schematic/types/billing_provider_type.rb +1 -0
  23. data/lib/schematic/types/change_subscription_internal_request_body.rb +1 -0
  24. data/lib/schematic/types/change_subscription_request_body.rb +1 -0
  25. data/lib/schematic/types/checkout_data_response_data.rb +1 -0
  26. data/lib/schematic/types/checkout_field_input.rb +14 -0
  27. data/lib/schematic/types/checkout_field_response_data.rb +18 -0
  28. data/lib/schematic/types/checkout_field_value.rb +10 -0
  29. data/lib/schematic/types/checkout_field_with_value.rb +15 -0
  30. data/lib/schematic/types/company_credit_balance_response_data.rb +2 -0
  31. data/lib/schematic/types/company_plan_credit_grant_view.rb +1 -0
  32. data/lib/schematic/types/component_hydrate_response_data.rb +1 -0
  33. data/lib/schematic/types/component_preview_response_data.rb +1 -0
  34. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +1 -0
  35. data/lib/schematic/types/credit_company_grant_view.rb +3 -0
  36. data/lib/schematic/types/credit_event_ledger_response_data.rb +1 -0
  37. data/lib/schematic/types/credit_usage_reason.rb +15 -0
  38. data/lib/schematic/types/event_detail_response_data.rb +1 -0
  39. data/lib/schematic/types/event_response_data.rb +1 -0
  40. data/lib/schematic/types/install_integration_request_body.rb +14 -0
  41. data/lib/schematic/types/integration_config.rb +1 -0
  42. data/lib/schematic/types/integration_install_config.rb +18 -0
  43. data/lib/schematic/types/integration_install_response_data.rb +11 -0
  44. data/lib/schematic/types/integration_type.rb +1 -0
  45. data/lib/schematic/types/manage_plan_request.rb +1 -0
  46. data/lib/schematic/types/metronome_integration_config.rb +7 -0
  47. data/lib/schematic/types/migration_error_code.rb +1 -0
  48. data/lib/schematic/types/plan_credit_grant_view.rb +1 -0
  49. data/lib/schematic/types/plan_group_detail_response_data.rb +1 -0
  50. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +1 -0
  51. data/lib/schematic/version.rb +1 -1
  52. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  53. data/lib/schematic.rb +20 -4
  54. data/reference.md +268 -15
  55. metadata +19 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52c3520cf93bf33b5709b843536791c05f1f79cde2521fed583179802ea01a13
4
- data.tar.gz: b321618dcbe10659189f72554ee428638e022fc8afb044a11cc87fc59c441624
3
+ metadata.gz: beede11cf31a32d41acacecfcf43f24d415952cc1bfc02ae762593885d804030
4
+ data.tar.gz: ca42025157214fcc6b06ce6313ce591ed78d7f9e49f033f6aad432dcef691097
5
5
  SHA512:
6
- metadata.gz: c3c953562cb84790a3bd211f88eac886330a71e20c2d83d815a5216883a6eade2981e34df357c923dd9bae64571203600528855b747df3798e7e1d11ef9051b8
7
- data.tar.gz: 2c3cead033c8c600ef24f886541fa8102b6cff15299aef884225f58e292793eedb356305ebc5c80fc0cdd4f5288ddd1cd33b29dca4284a999a1e904a25129bb9
6
+ metadata.gz: f36aa806e79e4dc3c547fd9580b021f616c1b187c659eb7f0784e28983cc5a1bf74f6c32b32edbca0234d0df3372b34aefb6974c0f2e21a059c6bfd56e91682d
7
+ data.tar.gz: e8fb63d038eedf92d7fd992b18cd94931d599abe632640cb44b482eada7161392c8a373e18494b44c5acfbba3909ef1b4b61d3120763538630d68c0ceb9a7105
data/.fern/metadata.json CHANGED
@@ -13,6 +13,6 @@
13
13
  "webrick": ">= 1.0"
14
14
  }
15
15
  },
16
- "originGitCommit": "a3057c10aa6a1daa708dc714c89ce943f67a722a",
17
- "sdkVersion": "1.4.3"
16
+ "originGitCommit": "ad1cc528e658e3693935b819c9d22eed02d49017",
17
+ "sdkVersion": "1.4.4"
18
18
  }
data/WASM_VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -86,6 +86,50 @@ module Schematic
86
86
  end
87
87
  end
88
88
 
89
+ # @param request_options [Hash]
90
+ # @param params [Hash]
91
+ # @option request_options [String] :base_url
92
+ # @option request_options [Hash{String => Object}] :additional_headers
93
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
94
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
95
+ # @option request_options [Integer] :timeout_in_seconds
96
+ # @option params [String, nil] :ids
97
+ # @option params [String, nil] :q
98
+ # @option params [Integer, nil] :limit
99
+ # @option params [Integer, nil] :offset
100
+ #
101
+ # @return [Schematic::Accounts::Types::CountAccountMembersResponse]
102
+ def count_account_members(request_options: {}, **params)
103
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
104
+ query_param_names = %i[ids q limit offset]
105
+ query_params = {}
106
+ query_params["ids"] = params[:ids] if params.key?(:ids)
107
+ query_params["q"] = params[:q] if params.key?(:q)
108
+ query_params["limit"] = params[:limit] if params.key?(:limit)
109
+ query_params["offset"] = params[:offset] if params.key?(:offset)
110
+ params.except(*query_param_names)
111
+
112
+ request = Schematic::Internal::JSON::Request.new(
113
+ base_url: request_options[:base_url],
114
+ method: "GET",
115
+ path: "account-members/count",
116
+ query: query_params,
117
+ request_options: request_options
118
+ )
119
+ begin
120
+ response = @client.send(request)
121
+ rescue Net::HTTPRequestTimeout
122
+ raise Schematic::Errors::TimeoutError
123
+ end
124
+ code = response.code.to_i
125
+ if code.between?(200, 299)
126
+ Schematic::Accounts::Types::CountAccountMembersResponse.load(response.body)
127
+ else
128
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
129
+ raise error_class.new(response.body, code: code)
130
+ end
131
+ end
132
+
89
133
  # @param request_options [Hash]
90
134
  # @param params [Hash]
91
135
  # @option request_options [String] :base_url
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Accounts
5
+ module Types
6
+ # Input parameters
7
+ class CountAccountMembersParams < Internal::Types::Model
8
+ field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
9
+ field :limit, -> { Integer }, optional: true, nullable: false
10
+ field :offset, -> { Integer }, optional: true, nullable: false
11
+ field :q, -> { String }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Accounts
5
+ module Types
6
+ class CountAccountMembersRequest < Internal::Types::Model
7
+ field :ids, -> { String }, optional: true, nullable: false
8
+ field :q, -> { String }, 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 Accounts
5
+ module Types
6
+ class CountAccountMembersResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Accounts::Types::CountAccountMembersParams }, 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.3",
13
+ "User-Agent" => "schematichq/1.4.4",
14
14
  "X-Fern-Language" => "Ruby",
15
15
  "X-Schematic-Api-Key" => api_key.to_s
16
16
  }
@@ -124,6 +124,38 @@ module Schematic
124
124
  end
125
125
  end
126
126
 
127
+ # @param request_options [Hash]
128
+ # @param params [Schematic::Types::InstallIntegrationRequestBody]
129
+ # @option request_options [String] :base_url
130
+ # @option request_options [Hash{String => Object}] :additional_headers
131
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
132
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
133
+ # @option request_options [Integer] :timeout_in_seconds
134
+ #
135
+ # @return [Schematic::Integrationsapi::Types::InstallIntegrationResponse]
136
+ def install_integration(request_options: {}, **params)
137
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
138
+ request = Schematic::Internal::JSON::Request.new(
139
+ base_url: request_options[:base_url],
140
+ method: "POST",
141
+ path: "integrations/install",
142
+ body: Schematic::Types::InstallIntegrationRequestBody.new(params).to_h,
143
+ request_options: request_options
144
+ )
145
+ begin
146
+ response = @client.send(request)
147
+ rescue Net::HTTPRequestTimeout
148
+ raise Schematic::Errors::TimeoutError
149
+ end
150
+ code = response.code.to_i
151
+ if code.between?(200, 299)
152
+ Schematic::Integrationsapi::Types::InstallIntegrationResponse.load(response.body)
153
+ else
154
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
155
+ raise error_class.new(response.body, code: code)
156
+ end
157
+ end
158
+
127
159
  # @param request_options [Hash]
128
160
  # @param params [Schematic::Integrationsapi::Types::StartDataImportRequestBody]
129
161
  # @option request_options [String] :base_url
@@ -164,8 +196,8 @@ module Schematic
164
196
  # @option request_options [Hash{String => Object}] :additional_body_parameters
165
197
  # @option request_options [Integer] :timeout_in_seconds
166
198
  #
167
- # @return [Schematic::Integrationsapi::Types::LoadSampleDataSetV2Response]
168
- def load_sample_data_set_v_2(request_options: {}, **params)
199
+ # @return [Schematic::Integrationsapi::Types::LoadSampleDataSetResponse]
200
+ def load_sample_data_set(request_options: {}, **params)
169
201
  Schematic::Internal::Types::Utils.normalize_keys(params)
170
202
  request = Schematic::Internal::JSON::Request.new(
171
203
  base_url: request_options[:base_url],
@@ -180,7 +212,71 @@ module Schematic
180
212
  end
181
213
  code = response.code.to_i
182
214
  if code.between?(200, 299)
183
- Schematic::Integrationsapi::Types::LoadSampleDataSetV2Response.load(response.body)
215
+ Schematic::Integrationsapi::Types::LoadSampleDataSetResponse.load(response.body)
216
+ else
217
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
218
+ raise error_class.new(response.body, code: code)
219
+ end
220
+ end
221
+
222
+ # @param request_options [Hash]
223
+ # @param params [Schematic::Types::InstallIntegrationRequestBody]
224
+ # @option request_options [String] :base_url
225
+ # @option request_options [Hash{String => Object}] :additional_headers
226
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
227
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
228
+ # @option request_options [Integer] :timeout_in_seconds
229
+ #
230
+ # @return [Schematic::Integrationsapi::Types::AssumeStripeInstalledResponse]
231
+ def assume_stripe_installed(request_options: {}, **params)
232
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
233
+ request = Schematic::Internal::JSON::Request.new(
234
+ base_url: request_options[:base_url],
235
+ method: "POST",
236
+ path: "integrations/stripe/v2/assume-installed",
237
+ body: Schematic::Types::InstallIntegrationRequestBody.new(params).to_h,
238
+ request_options: request_options
239
+ )
240
+ begin
241
+ response = @client.send(request)
242
+ rescue Net::HTTPRequestTimeout
243
+ raise Schematic::Errors::TimeoutError
244
+ end
245
+ code = response.code.to_i
246
+ if code.between?(200, 299)
247
+ Schematic::Integrationsapi::Types::AssumeStripeInstalledResponse.load(response.body)
248
+ else
249
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
250
+ raise error_class.new(response.body, code: code)
251
+ end
252
+ end
253
+
254
+ # @param request_options [Hash]
255
+ # @param params [Schematic::Types::InstallIntegrationRequestBody]
256
+ # @option request_options [String] :base_url
257
+ # @option request_options [Hash{String => Object}] :additional_headers
258
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
259
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
260
+ # @option request_options [Integer] :timeout_in_seconds
261
+ #
262
+ # @return [Schematic::Integrationsapi::Types::InstallStripeResponse]
263
+ def install_stripe(request_options: {}, **params)
264
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
265
+ request = Schematic::Internal::JSON::Request.new(
266
+ base_url: request_options[:base_url],
267
+ method: "POST",
268
+ path: "integrations/stripe/v2/install",
269
+ body: Schematic::Types::InstallIntegrationRequestBody.new(params).to_h,
270
+ request_options: request_options
271
+ )
272
+ begin
273
+ response = @client.send(request)
274
+ rescue Net::HTTPRequestTimeout
275
+ raise Schematic::Errors::TimeoutError
276
+ end
277
+ code = response.code.to_i
278
+ if code.between?(200, 299)
279
+ Schematic::Integrationsapi::Types::InstallStripeResponse.load(response.body)
184
280
  else
185
281
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
186
282
  raise error_class.new(response.body, code: code)
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Integrationsapi
5
+ module Types
6
+ class AssumeStripeInstalledResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::IntegrationInstallResponseData }, 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 Integrationsapi
5
+ module Types
6
+ class InstallIntegrationResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::IntegrationInstallResponseData }, 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 Integrationsapi
5
+ module Types
6
+ class InstallStripeResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::IntegrationInstallResponseData }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Integrationsapi
5
5
  module Types
6
- class LoadSampleDataSetV2Response < Internal::Types::Model
6
+ class LoadSampleDataSetResponse < Internal::Types::Model
7
7
  field :data, -> { Schematic::Types::IntegrationsDataSetResponseData }, optional: false, nullable: false
8
8
  field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
9
  end
@@ -9,6 +9,7 @@ module Schematic
9
9
  field :checkout_collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false
10
10
  field :checkout_collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false
11
11
  field :checkout_collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false
12
+ field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldInput] }, optional: true, nullable: false
12
13
  field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false
13
14
  field :custom_plan_id, -> { String }, optional: true, nullable: false
14
15
  field :enable_tax_collection, -> { Internal::Types::Boolean }, optional: false, nullable: false
@@ -10,6 +10,7 @@ module Schematic
10
10
  field :checkout_collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false
11
11
  field :checkout_collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false
12
12
  field :checkout_collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false
13
+ field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldInput] }, optional: true, nullable: false
13
14
  field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false
14
15
  field :custom_plan_id, -> { String }, optional: true, nullable: false
15
16
  field :enable_tax_collection, -> { Internal::Types::Boolean }, optional: false, nullable: false
@@ -5,8 +5,10 @@ module Schematic
5
5
  class AccountMemberResponseData < Internal::Types::Model
6
6
  field :created_at, -> { String }, optional: false, nullable: false
7
7
  field :email, -> { String }, optional: true, nullable: false
8
+ field :first_name, -> { String }, optional: true, nullable: false
8
9
  field :id, -> { String }, optional: false, nullable: false
9
10
  field :image_url, -> { String }, optional: true, nullable: false
11
+ field :last_name, -> { String }, optional: true, nullable: false
10
12
  field :name, -> { String }, optional: true, nullable: false
11
13
  field :permissions, -> { Internal::Types::Hash[String, Internal::Types::Array[Schematic::Types::AccountMemberPermission]] }, optional: false, nullable: false
12
14
  field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false
@@ -10,6 +10,7 @@ module Schematic
10
10
  FREE = "free"
11
11
  PLAN = "plan"
12
12
  PURCHASED = "purchased"
13
+ ROLLOVER = "rollover"
13
14
  end
14
15
  end
15
16
  end
@@ -21,6 +21,9 @@ module Schematic
21
21
  field :quantity_used, -> { Integer }, optional: false, nullable: false
22
22
  field :renewal_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
23
23
  field :renewal_period, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false
24
+ field :reserved, -> { Integer }, optional: true, nullable: false
25
+ field :settled, -> { Integer }, optional: true, nullable: false
26
+ field :source_grant_id, -> { String }, optional: true, nullable: false
24
27
  field :source_label, -> { String }, optional: false, nullable: false
25
28
  field :transfers, -> { Internal::Types::Array[Schematic::Types::CreditTransferResponseData] }, optional: true, nullable: false
26
29
  field :updated_at, -> { String }, optional: false, nullable: false
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module BillingCreditLedgerAuthority
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ SCHEMATIC_AUTHORITATIVE = "schematic_authoritative"
9
+ EXTERNAL_MIRROR = "external_mirror"
10
+ EXTERNAL_RATED = "external_rated"
11
+ end
12
+ end
13
+ end
@@ -15,6 +15,7 @@ module Schematic
15
15
  field :environment_id, -> { String }, optional: false, nullable: false
16
16
  field :icon, -> { String }, optional: true, nullable: false
17
17
  field :id, -> { String }, optional: false, nullable: false
18
+ field :ledger_authority, -> { Schematic::Types::BillingCreditLedgerAuthority }, optional: false, nullable: false
18
19
  field :name, -> { String }, optional: false, nullable: false
19
20
  field :plural_name, -> { String }, optional: true, nullable: false
20
21
  field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false
@@ -30,6 +30,7 @@ module Schematic
30
30
  field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false
31
31
  field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false
32
32
  field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false
33
+ field :rollover_percentage, -> { Integer }, optional: false, nullable: false
33
34
  field :updated_at, -> { String }, optional: false, nullable: false
34
35
  end
35
36
  end
@@ -5,6 +5,7 @@ module Schematic
5
5
  module BillingProviderType
6
6
  extend Schematic::Internal::Types::Enum
7
7
 
8
+ METRONOME = "metronome"
8
9
  ORB = "orb"
9
10
  SCHEMATIC = "schematic"
10
11
  STRIPE = "stripe"
@@ -8,6 +8,7 @@ module Schematic
8
8
  field :company_id, -> { String }, optional: false, nullable: false
9
9
  field :coupon_external_id, -> { String }, optional: true, nullable: false
10
10
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false
11
+ field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false
11
12
  field :new_plan_id, -> { String }, optional: false, nullable: false
12
13
  field :new_price_id, -> { String }, optional: false, nullable: false
13
14
  field :pay_in_advance, -> { Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody] }, optional: false, nullable: false
@@ -7,6 +7,7 @@ module Schematic
7
7
  field :auto_topup_overrides, -> { Internal::Types::Array[Schematic::Types::UpdateAutoTopupOverrideRequestBody] }, optional: false, nullable: false
8
8
  field :coupon_external_id, -> { String }, optional: true, nullable: false
9
9
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false
10
+ field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false
10
11
  field :new_plan_id, -> { String }, optional: false, nullable: false
11
12
  field :new_price_id, -> { String }, optional: false, nullable: false
12
13
  field :pay_in_advance, -> { Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody] }, optional: false, nullable: false
@@ -8,6 +8,7 @@ module Schematic
8
8
  field :active_usage_based_entitlements, -> { Internal::Types::Array[Schematic::Types::UsageBasedEntitlementResponseData] }, optional: false, nullable: false
9
9
  field :available_credit_bundles, -> { Internal::Types::Array[Schematic::Types::BillingCreditBundleResponseData] }, optional: false, nullable: false
10
10
  field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false
11
+ field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false
11
12
  field :feature_usage, -> { Schematic::Types::FeatureUsageDetailResponseData }, optional: true, nullable: false
12
13
  field :selected_credit_bundles, -> { Internal::Types::Array[Schematic::Types::CreditBundlePurchaseResponseData] }, optional: false, nullable: false
13
14
  field :selected_plan, -> { Schematic::Types::PlanDetailResponseData }, optional: true, nullable: false
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CheckoutFieldInput < Internal::Types::Model
6
+ field :definition_id, -> { String }, optional: true, nullable: false
7
+ field :helper_text, -> { String }, optional: true, nullable: false
8
+ field :id, -> { String }, optional: true, nullable: false
9
+ field :name, -> { String }, optional: false, nullable: false
10
+ field :required, -> { Internal::Types::Boolean }, optional: false, nullable: false
11
+ field :stripe_metadata_key, -> { String }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CheckoutFieldResponseData < Internal::Types::Model
6
+ field :created_at, -> { String }, optional: false, nullable: false
7
+ field :definition_id, -> { String }, optional: false, nullable: false
8
+ field :helper_text, -> { String }, optional: true, nullable: false
9
+ field :id, -> { String }, optional: false, nullable: false
10
+ field :name, -> { String }, optional: false, nullable: false
11
+ field :position, -> { Integer }, optional: false, nullable: false
12
+ field :required, -> { Internal::Types::Boolean }, optional: false, nullable: false
13
+ field :stripe_metadata_key, -> { String }, optional: false, nullable: false
14
+ field :trait_hierarchy, -> { Internal::Types::Array[String] }, optional: false, nullable: false
15
+ field :updated_at, -> { String }, optional: false, nullable: false
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CheckoutFieldValue < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :value, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CheckoutFieldWithValue < Internal::Types::Model
6
+ field :definition_id, -> { String }, optional: false, nullable: false
7
+ field :helper_text, -> { String }, optional: true, nullable: false
8
+ field :id, -> { String }, optional: false, nullable: false
9
+ field :name, -> { String }, optional: false, nullable: false
10
+ field :required, -> { Internal::Types::Boolean }, optional: false, nullable: false
11
+ field :stripe_metadata_key, -> { String }, optional: false, nullable: false
12
+ field :value, -> { String }, optional: true, nullable: false
13
+ end
14
+ end
15
+ end
@@ -5,6 +5,8 @@ module Schematic
5
5
  class CompanyCreditBalanceResponseData < Internal::Types::Model
6
6
  field :credit_id, -> { String }, optional: false, nullable: false
7
7
  field :remaining, -> { Integer }, optional: false, nullable: false
8
+ field :reserved, -> { Integer }, optional: false, nullable: false
9
+ field :settled, -> { Integer }, optional: false, nullable: false
8
10
  field :source, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false
9
11
  field :total, -> { Integer }, optional: true, nullable: false
10
12
  end
@@ -33,6 +33,7 @@ module Schematic
33
33
  field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false
34
34
  field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false
35
35
  field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: false, nullable: false
36
+ field :rollover_percentage, -> { Integer }, optional: false, nullable: false
36
37
  field :singular_name, -> { String }, optional: true, nullable: false
37
38
  field :updated_at, -> { String }, optional: false, nullable: false
38
39
  end
@@ -13,6 +13,7 @@ module Schematic
13
13
  field :component, -> { Schematic::Types::ComponentResponseData }, optional: true, nullable: false
14
14
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::BillingCreditBundleView] }, optional: false, nullable: false
15
15
  field :credit_grants, -> { Internal::Types::Array[Schematic::Types::CreditCompanyGrantView] }, optional: false, nullable: false
16
+ field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false
16
17
  field :default_plan, -> { Schematic::Types::PlanDetailResponseData }, optional: true, nullable: false
17
18
  field :display_settings, -> { Schematic::Types::ComponentDisplaySettings }, optional: false, nullable: false
18
19
  field :feature_usage, -> { Schematic::Types::FeatureUsageDetailResponseData }, optional: true, nullable: false
@@ -13,6 +13,7 @@ module Schematic
13
13
  field :component, -> { Schematic::Types::ComponentResponseData }, optional: true, nullable: false
14
14
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::BillingCreditBundleView] }, optional: false, nullable: false
15
15
  field :credit_grants, -> { Internal::Types::Array[Schematic::Types::CreditCompanyGrantView] }, optional: false, nullable: false
16
+ field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false
16
17
  field :default_plan, -> { Schematic::Types::PlanDetailResponseData }, optional: true, nullable: false
17
18
  field :display_settings, -> { Schematic::Types::ComponentDisplaySettings }, optional: false, nullable: false
18
19
  field :feature_usage, -> { Schematic::Types::FeatureUsageDetailResponseData }, optional: true, nullable: false
@@ -23,6 +23,7 @@ module Schematic
23
23
  field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false
24
24
  field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false
25
25
  field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false
26
+ field :rollover_percentage, -> { Integer }, optional: true, nullable: false
26
27
  end
27
28
  end
28
29
  end
@@ -28,7 +28,10 @@ module Schematic
28
28
  field :quantity_used, -> { Integer }, optional: false, nullable: false
29
29
  field :renewal_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
30
30
  field :renewal_period, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false
31
+ field :reserved, -> { Integer }, optional: true, nullable: false
32
+ field :settled, -> { Integer }, optional: true, nullable: false
31
33
  field :singular_name, -> { String }, optional: true, nullable: false
34
+ field :source_grant_id, -> { String }, optional: true, nullable: false
32
35
  field :source_label, -> { String }, optional: false, nullable: false
33
36
  field :transfers, -> { Internal::Types::Array[Schematic::Types::CreditTransferView] }, optional: true, nullable: false
34
37
  field :updated_at, -> { String }, optional: false, nullable: false
@@ -33,6 +33,7 @@ module Schematic
33
33
  field :source_id, -> { Integer }, optional: false, nullable: false
34
34
  field :to_grant_id, -> { String }, optional: true, nullable: false
35
35
  field :usage_event_id, -> { String }, optional: true, nullable: false
36
+ field :usage_reason, -> { Schematic::Types::CreditUsageReason }, optional: true, nullable: false
36
37
  field :zeroed_out_reason, -> { Schematic::Types::BillingCreditGrantZeroedOutReason }, optional: true, nullable: false
37
38
  end
38
39
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module CreditUsageReason
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ LEASE_HOLD = "lease_hold"
9
+ LEASE_RELEASE = "lease_release"
10
+ MANUAL_ADJUSTMENT = "manual_adjustment"
11
+ RECONCILIATION = "reconciliation"
12
+ TRACK = "track"
13
+ end
14
+ end
15
+ end
@@ -17,6 +17,7 @@ module Schematic
17
17
  field :features, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false
18
18
  field :id, -> { String }, optional: false, nullable: false
19
19
  field :idempotency_key, -> { String }, optional: true, nullable: false
20
+ field :lease_id, -> { String }, optional: true, nullable: false
20
21
  field :loaded_at, -> { String }, optional: true, nullable: false
21
22
  field :processed_at, -> { String }, optional: true, nullable: false
22
23
  field :quantity, -> { Integer }, optional: false, nullable: false
@@ -14,6 +14,7 @@ module Schematic
14
14
  field :feature_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
15
15
  field :id, -> { String }, optional: false, nullable: false
16
16
  field :idempotency_key, -> { String }, optional: true, nullable: false
17
+ field :lease_id, -> { String }, optional: true, nullable: false
17
18
  field :loaded_at, -> { String }, optional: true, nullable: false
18
19
  field :processed_at, -> { String }, optional: true, nullable: false
19
20
  field :quantity, -> { Integer }, optional: false, nullable: false
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class InstallIntegrationRequestBody < Internal::Types::Model
6
+ field :company_matching_criteria, -> { Schematic::Types::CompanyMatchingCriteria }, optional: true, nullable: false
7
+ field :company_matching_field, -> { String }, optional: true, nullable: false
8
+ field :config, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
9
+ field :is_sandbox, -> { Internal::Types::Boolean }, optional: true, nullable: false
10
+ field :live_mode, -> { Internal::Types::Boolean }, optional: true, nullable: false
11
+ field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
@@ -8,6 +8,7 @@ module Schematic
8
8
  discriminant :type
9
9
 
10
10
  member -> { Schematic::Types::ClerkIntegrationConfig }, key: "CLERK"
11
+ member -> { Schematic::Types::MetronomeIntegrationConfig }, key: "METRONOME"
11
12
  member -> { Schematic::Types::OrbIntegrationConfig }, key: "ORB"
12
13
  member -> { Schematic::Types::StripeIntegrationConfig }, key: "STRIPE"
13
14
  member -> { Schematic::Types::WorkOsIntegrationConfig }, key: "WORKOS"