schematichq 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.fern/metadata.json +3 -3
- data/.fern/replay.lock +10 -0
- data/.fernignore +3 -0
- data/README.md +34 -4
- data/WASM_VERSION +1 -1
- data/lib/schematic/billing/client.rb +38 -2
- data/lib/schematic/billing/types/count_billing_products_params.rb +1 -0
- data/lib/schematic/billing/types/count_billing_products_request.rb +1 -0
- data/lib/schematic/billing/types/create_billing_price_request_body.rb +1 -0
- data/lib/schematic/billing/types/delete_payment_method_by_external_id_response.rb +12 -0
- data/lib/schematic/billing/types/list_billing_products_params.rb +1 -0
- data/lib/schematic/billing/types/list_billing_products_request.rb +1 -0
- data/lib/schematic/client.rb +6 -6
- data/lib/schematic/companies/client.rb +6 -2
- data/lib/schematic/companies/types/count_companies_params.rb +1 -0
- data/lib/schematic/companies/types/count_companies_request.rb +1 -0
- data/lib/schematic/companies/types/list_companies_params.rb +1 -0
- data/lib/schematic/companies/types/list_companies_request.rb +1 -0
- data/lib/schematic/credits/client.rb +108 -2
- data/lib/schematic/credits/types/acquire_credit_lease_request_body.rb +14 -0
- data/lib/schematic/credits/types/acquire_credit_lease_response.rb +12 -0
- data/lib/schematic/credits/types/count_billing_plan_credit_grants_params.rb +1 -0
- data/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb +1 -0
- data/lib/schematic/credits/types/extend_credit_lease_request_body.rb +13 -0
- data/lib/schematic/credits/types/extend_credit_lease_response.rb +12 -0
- data/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb +1 -0
- data/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb +1 -0
- data/lib/schematic/credits/types/release_credit_lease_response.rb +12 -0
- data/lib/schematic/datastream/merge.rb +71 -0
- data/lib/schematic/datastream/websocket_client.rb +32 -1
- data/lib/schematic/entitlements/client.rb +6 -2
- data/lib/schematic/entitlements/types/count_feature_usage_params.rb +1 -0
- data/lib/schematic/entitlements/types/count_feature_usage_request.rb +1 -0
- data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +5 -0
- data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +5 -0
- data/lib/schematic/entitlements/types/list_feature_usage_params.rb +1 -0
- data/lib/schematic/entitlements/types/list_feature_usage_request.rb +1 -0
- data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +5 -0
- data/lib/schematic/event_buffer.rb +17 -3
- data/lib/schematic/events/client.rb +3 -1
- data/lib/schematic/events/types/list_events_params.rb +1 -0
- data/lib/schematic/events/types/list_events_request.rb +1 -0
- data/lib/schematic/features/client.rb +6 -2
- data/lib/schematic/features/types/count_features_params.rb +1 -0
- data/lib/schematic/features/types/count_features_request.rb +1 -0
- data/lib/schematic/features/types/list_features_params.rb +1 -0
- data/lib/schematic/features/types/list_features_request.rb +1 -0
- data/lib/schematic/integrationsapi/client.rb +177 -0
- data/lib/schematic/integrationsapi/types/list_integrations_params.rb +18 -0
- data/lib/schematic/integrationsapi/types/list_integrations_request.rb +17 -0
- data/lib/schematic/integrationsapi/types/list_integrations_response.rb +12 -0
- data/lib/schematic/integrationsapi/types/load_sample_data_set_v_2_response.rb +12 -0
- data/lib/schematic/integrationsapi/types/run_integration_response.rb +12 -0
- data/lib/schematic/integrationsapi/types/start_data_import_request_body.rb +13 -0
- data/lib/schematic/integrationsapi/types/start_data_import_response.rb +12 -0
- data/lib/schematic/integrationsapi/types/uninstall_integration_response.rb +12 -0
- data/lib/schematic/logger.rb +1 -1
- data/lib/schematic/planbundle/client.rb +32 -0
- data/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb +13 -0
- data/lib/schematic/planbundle/types/create_custom_plan_bundle_response.rb +12 -0
- data/lib/schematic/planmigrations/client.rb +101 -0
- data/lib/schematic/planmigrations/types/create_migration_input.rb +17 -0
- data/lib/schematic/planmigrations/types/create_migration_response.rb +12 -0
- data/lib/schematic/planmigrations/types/retry_company_migration_response.rb +12 -0
- data/lib/schematic/planmigrations/types/retry_migration_request_body.rb +12 -0
- data/lib/schematic/planmigrations/types/retry_migration_response.rb +12 -0
- data/lib/schematic/plans/client.rb +43 -2
- data/lib/schematic/plans/types/count_plans_params.rb +2 -0
- data/lib/schematic/plans/types/count_plans_request.rb +2 -0
- data/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb +1 -0
- data/lib/schematic/plans/types/list_plans_params.rb +2 -0
- data/lib/schematic/plans/types/list_plans_request.rb +2 -0
- data/lib/schematic/plans/types/mark_custom_plan_billing_paid_response.rb +12 -0
- data/lib/schematic/schematic_client.rb +46 -13
- data/lib/schematic/types/api_key_create_response_data.rb +1 -0
- data/lib/schematic/types/api_key_integration_response_data.rb +11 -0
- data/lib/schematic/types/api_key_response_data.rb +1 -0
- data/lib/schematic/types/audit_log_list_response_data.rb +1 -0
- data/lib/schematic/types/audit_log_response_data.rb +1 -0
- data/lib/schematic/types/billing_credit_bundle_view.rb +1 -1
- data/lib/schematic/types/billing_credit_view.rb +1 -0
- data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +1 -0
- data/lib/schematic/types/billing_price_response_data.rb +1 -0
- data/lib/schematic/types/billing_price_view.rb +1 -0
- data/lib/schematic/types/billing_product_for_subscription_response_data.rb +1 -0
- data/lib/schematic/types/billing_product_plan_response_data.rb +1 -0
- data/lib/schematic/types/billing_product_price_response_data.rb +1 -0
- data/lib/schematic/types/billing_strategy.rb +13 -0
- data/lib/schematic/types/change_subscription_internal_request_body.rb +1 -0
- data/lib/schematic/types/change_subscription_request_body.rb +1 -0
- data/lib/schematic/types/charge_type.rb +1 -0
- data/lib/schematic/types/checkout_subscription.rb +1 -0
- data/lib/schematic/types/clerk_integration_config.rb +10 -0
- data/lib/schematic/types/company_matching_criteria.rb +12 -0
- data/lib/schematic/types/company_plan_credit_grant_view.rb +40 -0
- data/lib/schematic/types/company_plan_detail_response_data.rb +4 -1
- data/lib/schematic/types/company_plan_with_billing_sub_view.rb +1 -1
- data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +1 -0
- data/lib/schematic/types/create_custom_plan_bundle_plan_request_body.rb +12 -0
- data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +5 -0
- data/lib/schematic/types/create_event_request_body.rb +3 -0
- data/lib/schematic/types/credit_currency_price.rb +10 -0
- data/lib/schematic/types/credit_lease_response_data.rb +16 -0
- data/lib/schematic/types/currency_price_request_body.rb +3 -0
- data/lib/schematic/types/custom_plan_billing_response_data.rb +1 -0
- data/lib/schematic/types/data_event_payload.rb +3 -0
- data/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb +1 -0
- data/lib/schematic/types/entitlement_currency_prices_response_data.rb +1 -0
- data/lib/schematic/types/event_body_track.rb +1 -0
- data/lib/schematic/types/event_detail_response_data.rb +2 -0
- data/lib/schematic/types/event_response_data.rb +1 -0
- data/lib/schematic/types/feature_company_response_data.rb +1 -0
- data/lib/schematic/types/feature_usage_response_data.rb +1 -0
- data/lib/schematic/types/feature_view.rb +1 -0
- data/lib/schematic/types/integration_capabilities.rb +11 -0
- data/lib/schematic/types/integration_config.rb +16 -0
- data/lib/schematic/types/integration_response_data.rb +13 -0
- data/lib/schematic/types/integration_state.rb +13 -0
- data/lib/schematic/types/integration_type.rb +1 -0
- data/lib/schematic/types/integrations_data_set_response_data.rb +9 -0
- data/lib/schematic/types/integrations_list_response_data.rb +15 -0
- data/lib/schematic/types/integrations_response_data.rb +13 -0
- data/lib/schematic/types/mark_custom_plan_billing_paid_request_body.rb +23 -0
- data/lib/schematic/types/migration_error_code.rb +21 -0
- data/lib/schematic/types/orb_integration_config.rb +9 -0
- data/lib/schematic/types/plan_credit_grant_view.rb +1 -0
- data/lib/schematic/types/plan_currency_price_request_body.rb +1 -0
- data/lib/schematic/types/plan_currency_prices_response_data.rb +1 -0
- data/lib/schematic/types/plan_detail_response_data.rb +3 -0
- data/lib/schematic/types/plan_entitlement_response_data.rb +2 -0
- data/lib/schematic/types/plan_group_plan_detail_response_data.rb +4 -1
- data/lib/schematic/types/plan_price_cadence.rb +13 -0
- data/lib/schematic/types/plan_version_company_migration_response_data.rb +1 -0
- data/lib/schematic/types/plan_version_migration_response_data.rb +1 -0
- data/lib/schematic/types/plan_view_public_response_data.rb +4 -1
- data/lib/schematic/types/release_credit_lease_request_body.rb +23 -0
- data/lib/schematic/types/rules_engine_schema_version.rb +1 -1
- data/lib/schematic/types/stripe_integration_config.rb +14 -0
- data/lib/schematic/types/update_auto_topup_override_request_body.rb +12 -0
- data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +1 -0
- data/lib/schematic/types/upsert_billing_product_request_body.rb +3 -0
- data/lib/schematic/types/usage_based_entitlement_request_body.rb +5 -0
- data/lib/schematic/types/usage_based_entitlement_response_data.rb +2 -0
- data/lib/schematic/types/work_os_integration_config.rb +10 -0
- data/lib/schematic/version.rb +1 -1
- data/lib/schematic/wasm/rulesengine.wasm +0 -0
- data/lib/schematic.rb +55 -10
- data/reference.md +1355 -188
- metadata +48 -2
|
@@ -10,6 +10,88 @@ module Schematic
|
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# @param request_options [Hash]
|
|
14
|
+
# @param params [Hash]
|
|
15
|
+
# @option request_options [String] :base_url
|
|
16
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
17
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
18
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
19
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
20
|
+
# @option params [String] :integration_id
|
|
21
|
+
#
|
|
22
|
+
# @return [Schematic::Integrationsapi::Types::RunIntegrationResponse]
|
|
23
|
+
def run_integration(request_options: {}, **params)
|
|
24
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
25
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
26
|
+
base_url: request_options[:base_url],
|
|
27
|
+
method: "GET",
|
|
28
|
+
path: "integration/start/#{URI.encode_uri_component(params[:integration_id].to_s)}",
|
|
29
|
+
request_options: request_options
|
|
30
|
+
)
|
|
31
|
+
begin
|
|
32
|
+
response = @client.send(request)
|
|
33
|
+
rescue Net::HTTPRequestTimeout
|
|
34
|
+
raise Schematic::Errors::TimeoutError
|
|
35
|
+
end
|
|
36
|
+
code = response.code.to_i
|
|
37
|
+
if code.between?(200, 299)
|
|
38
|
+
Schematic::Integrationsapi::Types::RunIntegrationResponse.load(response.body)
|
|
39
|
+
else
|
|
40
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
41
|
+
raise error_class.new(response.body, code: code)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# @param request_options [Hash]
|
|
46
|
+
# @param params [Hash]
|
|
47
|
+
# @option request_options [String] :base_url
|
|
48
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
49
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
50
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
51
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
52
|
+
# @option params [Boolean, nil] :billing_only
|
|
53
|
+
# @option params [String, nil] :exclude_ids
|
|
54
|
+
# @option params [String, nil] :id
|
|
55
|
+
# @option params [Schematic::Types::IntegrationState, nil] :state
|
|
56
|
+
# @option params [Schematic::Types::IntegrationType, nil] :type
|
|
57
|
+
# @option params [Integer, nil] :limit
|
|
58
|
+
# @option params [Integer, nil] :offset
|
|
59
|
+
#
|
|
60
|
+
# @return [Schematic::Integrationsapi::Types::ListIntegrationsResponse]
|
|
61
|
+
def list_integrations(request_options: {}, **params)
|
|
62
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
63
|
+
query_param_names = %i[billing_only exclude_ids id state type limit offset]
|
|
64
|
+
query_params = {}
|
|
65
|
+
query_params["billing_only"] = params[:billing_only] if params.key?(:billing_only)
|
|
66
|
+
query_params["exclude_ids"] = params[:exclude_ids] if params.key?(:exclude_ids)
|
|
67
|
+
query_params["id"] = params[:id] if params.key?(:id)
|
|
68
|
+
query_params["state"] = params[:state] if params.key?(:state)
|
|
69
|
+
query_params["type"] = params[:type] if params.key?(:type)
|
|
70
|
+
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
71
|
+
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
72
|
+
params.except(*query_param_names)
|
|
73
|
+
|
|
74
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
75
|
+
base_url: request_options[:base_url],
|
|
76
|
+
method: "GET",
|
|
77
|
+
path: "integrations",
|
|
78
|
+
query: query_params,
|
|
79
|
+
request_options: request_options
|
|
80
|
+
)
|
|
81
|
+
begin
|
|
82
|
+
response = @client.send(request)
|
|
83
|
+
rescue Net::HTTPRequestTimeout
|
|
84
|
+
raise Schematic::Errors::TimeoutError
|
|
85
|
+
end
|
|
86
|
+
code = response.code.to_i
|
|
87
|
+
if code.between?(200, 299)
|
|
88
|
+
Schematic::Integrationsapi::Types::ListIntegrationsResponse.load(response.body)
|
|
89
|
+
else
|
|
90
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
91
|
+
raise error_class.new(response.body, code: code)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
13
95
|
# @param request_options [Hash]
|
|
14
96
|
# @param params [Hash]
|
|
15
97
|
# @option request_options [String] :base_url
|
|
@@ -41,6 +123,101 @@ module Schematic
|
|
|
41
123
|
raise error_class.new(response.body, code: code)
|
|
42
124
|
end
|
|
43
125
|
end
|
|
126
|
+
|
|
127
|
+
# @param request_options [Hash]
|
|
128
|
+
# @param params [Schematic::Integrationsapi::Types::StartDataImportRequestBody]
|
|
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::StartDataImportResponse]
|
|
136
|
+
def start_data_import(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/start-data-import",
|
|
142
|
+
body: Schematic::Integrationsapi::Types::StartDataImportRequestBody.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::StartDataImportResponse.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
|
+
|
|
159
|
+
# @param request_options [Hash]
|
|
160
|
+
# @param params [Hash]
|
|
161
|
+
# @option request_options [String] :base_url
|
|
162
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
163
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
164
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
165
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
166
|
+
#
|
|
167
|
+
# @return [Schematic::Integrationsapi::Types::LoadSampleDataSetV2Response]
|
|
168
|
+
def load_sample_data_set_v_2(request_options: {}, **params)
|
|
169
|
+
Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
170
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
171
|
+
base_url: request_options[:base_url],
|
|
172
|
+
method: "GET",
|
|
173
|
+
path: "integrations/stripe/dataset-sample-v2",
|
|
174
|
+
request_options: request_options
|
|
175
|
+
)
|
|
176
|
+
begin
|
|
177
|
+
response = @client.send(request)
|
|
178
|
+
rescue Net::HTTPRequestTimeout
|
|
179
|
+
raise Schematic::Errors::TimeoutError
|
|
180
|
+
end
|
|
181
|
+
code = response.code.to_i
|
|
182
|
+
if code.between?(200, 299)
|
|
183
|
+
Schematic::Integrationsapi::Types::LoadSampleDataSetV2Response.load(response.body)
|
|
184
|
+
else
|
|
185
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
186
|
+
raise error_class.new(response.body, code: code)
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# @param request_options [Hash]
|
|
191
|
+
# @param params [Hash]
|
|
192
|
+
# @option request_options [String] :base_url
|
|
193
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
194
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
195
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
196
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
197
|
+
# @option params [String] :integration_id
|
|
198
|
+
#
|
|
199
|
+
# @return [Schematic::Integrationsapi::Types::UninstallIntegrationResponse]
|
|
200
|
+
def uninstall_integration(request_options: {}, **params)
|
|
201
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
202
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
203
|
+
base_url: request_options[:base_url],
|
|
204
|
+
method: "DELETE",
|
|
205
|
+
path: "integrations/uninstall/#{URI.encode_uri_component(params[:integration_id].to_s)}",
|
|
206
|
+
request_options: request_options
|
|
207
|
+
)
|
|
208
|
+
begin
|
|
209
|
+
response = @client.send(request)
|
|
210
|
+
rescue Net::HTTPRequestTimeout
|
|
211
|
+
raise Schematic::Errors::TimeoutError
|
|
212
|
+
end
|
|
213
|
+
code = response.code.to_i
|
|
214
|
+
if code.between?(200, 299)
|
|
215
|
+
Schematic::Integrationsapi::Types::UninstallIntegrationResponse.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
|
|
44
221
|
end
|
|
45
222
|
end
|
|
46
223
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Integrationsapi
|
|
5
|
+
module Types
|
|
6
|
+
# Input parameters
|
|
7
|
+
class ListIntegrationsParams < Internal::Types::Model
|
|
8
|
+
field :billing_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
9
|
+
field :exclude_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
10
|
+
field :id, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
12
|
+
field :offset, -> { Integer }, optional: true, nullable: false
|
|
13
|
+
field :state, -> { Schematic::Types::IntegrationState }, optional: true, nullable: false
|
|
14
|
+
field :type, -> { Schematic::Types::IntegrationType }, optional: true, nullable: false
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Integrationsapi
|
|
5
|
+
module Types
|
|
6
|
+
class ListIntegrationsRequest < Internal::Types::Model
|
|
7
|
+
field :billing_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
8
|
+
field :exclude_ids, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :id, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :state, -> { Schematic::Types::IntegrationState }, optional: true, nullable: false
|
|
11
|
+
field :type, -> { Schematic::Types::IntegrationType }, optional: true, nullable: false
|
|
12
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
13
|
+
field :offset, -> { Integer }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Integrationsapi
|
|
5
|
+
module Types
|
|
6
|
+
class ListIntegrationsResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Internal::Types::Array[Schematic::Types::IntegrationsListResponseData] }, optional: false, nullable: false
|
|
8
|
+
field :params, -> { Schematic::Integrationsapi::Types::ListIntegrationsParams }, 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 LoadSampleDataSetV2Response < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::IntegrationsDataSetResponseData }, 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 RunIntegrationResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::IntegrationsResponseData }, 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,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Integrationsapi
|
|
5
|
+
module Types
|
|
6
|
+
class StartDataImportRequestBody < Internal::Types::Model
|
|
7
|
+
field :company_matching_criteria, -> { Schematic::Types::CompanyMatchingCriteria }, optional: true, nullable: false
|
|
8
|
+
field :company_matching_field, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :integration_id, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Integrationsapi
|
|
5
|
+
module Types
|
|
6
|
+
class StartDataImportResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::IntegrationsResponseData }, 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 UninstallIntegrationResponse < 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
|
data/lib/schematic/logger.rb
CHANGED
|
@@ -10,6 +10,38 @@ module Schematic
|
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# @param request_options [Hash]
|
|
14
|
+
# @param params [Schematic::Planbundle::Types::CreateCustomPlanBundleRequestBody]
|
|
15
|
+
# @option request_options [String] :base_url
|
|
16
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
17
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
18
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
19
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
20
|
+
#
|
|
21
|
+
# @return [Schematic::Planbundle::Types::CreateCustomPlanBundleResponse]
|
|
22
|
+
def create_custom_plan_bundle(request_options: {}, **params)
|
|
23
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
24
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
25
|
+
base_url: request_options[:base_url],
|
|
26
|
+
method: "POST",
|
|
27
|
+
path: "custom-plan-bundles",
|
|
28
|
+
body: Schematic::Planbundle::Types::CreateCustomPlanBundleRequestBody.new(params).to_h,
|
|
29
|
+
request_options: request_options
|
|
30
|
+
)
|
|
31
|
+
begin
|
|
32
|
+
response = @client.send(request)
|
|
33
|
+
rescue Net::HTTPRequestTimeout
|
|
34
|
+
raise Schematic::Errors::TimeoutError
|
|
35
|
+
end
|
|
36
|
+
code = response.code.to_i
|
|
37
|
+
if code.between?(200, 299)
|
|
38
|
+
Schematic::Planbundle::Types::CreateCustomPlanBundleResponse.load(response.body)
|
|
39
|
+
else
|
|
40
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
41
|
+
raise error_class.new(response.body, code: code)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
13
45
|
# @param request_options [Hash]
|
|
14
46
|
# @param params [Schematic::Planbundle::Types::CreatePlanBundleRequestBody]
|
|
15
47
|
# @option request_options [String] :base_url
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Planbundle
|
|
5
|
+
module Types
|
|
6
|
+
class CreateCustomPlanBundleRequestBody < Internal::Types::Model
|
|
7
|
+
field :billing_product, -> { Schematic::Types::UpsertBillingProductRequestBody }, optional: true, nullable: false
|
|
8
|
+
field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false
|
|
9
|
+
field :plan, -> { Schematic::Types::CreateCustomPlanBundlePlanRequestBody }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Planbundle
|
|
5
|
+
module Types
|
|
6
|
+
class CreateCustomPlanBundleResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::PlanBundleResponseData }, optional: false, nullable: false
|
|
8
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -56,6 +56,38 @@ module Schematic
|
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
+
# @param request_options [Hash]
|
|
60
|
+
# @param params [Hash]
|
|
61
|
+
# @option request_options [String] :base_url
|
|
62
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
63
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
64
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
65
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
66
|
+
# @option params [String] :plan_version_company_migration_id
|
|
67
|
+
#
|
|
68
|
+
# @return [Schematic::Planmigrations::Types::RetryCompanyMigrationResponse]
|
|
69
|
+
def retry_company_migration(request_options: {}, **params)
|
|
70
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
71
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
72
|
+
base_url: request_options[:base_url],
|
|
73
|
+
method: "POST",
|
|
74
|
+
path: "plan-version-company-migrations/#{URI.encode_uri_component(params[:plan_version_company_migration_id].to_s)}/retry",
|
|
75
|
+
request_options: request_options
|
|
76
|
+
)
|
|
77
|
+
begin
|
|
78
|
+
response = @client.send(request)
|
|
79
|
+
rescue Net::HTTPRequestTimeout
|
|
80
|
+
raise Schematic::Errors::TimeoutError
|
|
81
|
+
end
|
|
82
|
+
code = response.code.to_i
|
|
83
|
+
if code.between?(200, 299)
|
|
84
|
+
Schematic::Planmigrations::Types::RetryCompanyMigrationResponse.load(response.body)
|
|
85
|
+
else
|
|
86
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
87
|
+
raise error_class.new(response.body, code: code)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
59
91
|
# @param request_options [Hash]
|
|
60
92
|
# @param params [Hash]
|
|
61
93
|
# @option request_options [String] :base_url
|
|
@@ -146,6 +178,38 @@ module Schematic
|
|
|
146
178
|
end
|
|
147
179
|
end
|
|
148
180
|
|
|
181
|
+
# @param request_options [Hash]
|
|
182
|
+
# @param params [Schematic::Planmigrations::Types::CreateMigrationInput]
|
|
183
|
+
# @option request_options [String] :base_url
|
|
184
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
185
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
186
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
187
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
188
|
+
#
|
|
189
|
+
# @return [Schematic::Planmigrations::Types::CreateMigrationResponse]
|
|
190
|
+
def create_migration(request_options: {}, **params)
|
|
191
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
192
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
193
|
+
base_url: request_options[:base_url],
|
|
194
|
+
method: "POST",
|
|
195
|
+
path: "plan-version-migrations",
|
|
196
|
+
body: Schematic::Planmigrations::Types::CreateMigrationInput.new(params).to_h,
|
|
197
|
+
request_options: request_options
|
|
198
|
+
)
|
|
199
|
+
begin
|
|
200
|
+
response = @client.send(request)
|
|
201
|
+
rescue Net::HTTPRequestTimeout
|
|
202
|
+
raise Schematic::Errors::TimeoutError
|
|
203
|
+
end
|
|
204
|
+
code = response.code.to_i
|
|
205
|
+
if code.between?(200, 299)
|
|
206
|
+
Schematic::Planmigrations::Types::CreateMigrationResponse.load(response.body)
|
|
207
|
+
else
|
|
208
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
209
|
+
raise error_class.new(response.body, code: code)
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
|
|
149
213
|
# @param request_options [Hash]
|
|
150
214
|
# @param params [Hash]
|
|
151
215
|
# @option request_options [String] :base_url
|
|
@@ -178,6 +242,43 @@ module Schematic
|
|
|
178
242
|
end
|
|
179
243
|
end
|
|
180
244
|
|
|
245
|
+
# @param request_options [Hash]
|
|
246
|
+
# @param params [Schematic::Planmigrations::Types::RetryMigrationRequestBody]
|
|
247
|
+
# @option request_options [String] :base_url
|
|
248
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
249
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
250
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
251
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
252
|
+
# @option params [String] :plan_version_migration_id
|
|
253
|
+
#
|
|
254
|
+
# @return [Schematic::Planmigrations::Types::RetryMigrationResponse]
|
|
255
|
+
def retry_migration(request_options: {}, **params)
|
|
256
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
257
|
+
request_data = Schematic::Planmigrations::Types::RetryMigrationRequestBody.new(params).to_h
|
|
258
|
+
non_body_param_names = ["plan_version_migration_id"]
|
|
259
|
+
body = request_data.except(*non_body_param_names)
|
|
260
|
+
|
|
261
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
262
|
+
base_url: request_options[:base_url],
|
|
263
|
+
method: "POST",
|
|
264
|
+
path: "plan-version-migrations/#{URI.encode_uri_component(params[:plan_version_migration_id].to_s)}/retry",
|
|
265
|
+
body: body,
|
|
266
|
+
request_options: request_options
|
|
267
|
+
)
|
|
268
|
+
begin
|
|
269
|
+
response = @client.send(request)
|
|
270
|
+
rescue Net::HTTPRequestTimeout
|
|
271
|
+
raise Schematic::Errors::TimeoutError
|
|
272
|
+
end
|
|
273
|
+
code = response.code.to_i
|
|
274
|
+
if code.between?(200, 299)
|
|
275
|
+
Schematic::Planmigrations::Types::RetryMigrationResponse.load(response.body)
|
|
276
|
+
else
|
|
277
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
278
|
+
raise error_class.new(response.body, code: code)
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
|
|
181
282
|
# @param request_options [Hash]
|
|
182
283
|
# @param params [Hash]
|
|
183
284
|
# @option request_options [String] :base_url
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Planmigrations
|
|
5
|
+
module Types
|
|
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
|
|
9
|
+
field :plan_id, -> { String }, optional: false, nullable: false
|
|
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
|
|
12
|
+
field :strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false
|
|
13
|
+
field :target_plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Planmigrations
|
|
5
|
+
module Types
|
|
6
|
+
class CreateMigrationResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::PlanVersionMigrationResponseData }, 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 Planmigrations
|
|
5
|
+
module Types
|
|
6
|
+
class RetryCompanyMigrationResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::PlanVersionCompanyMigrationResponseData }, 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 Planmigrations
|
|
5
|
+
module Types
|
|
6
|
+
class RetryMigrationRequestBody < Internal::Types::Model
|
|
7
|
+
field :plan_version_migration_id, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :error_codes, -> { Internal::Types::Array[Schematic::Types::MigrationErrorCode] }, 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 Planmigrations
|
|
5
|
+
module Types
|
|
6
|
+
class RetryMigrationResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::PlanVersionMigrationResponseData }, optional: false, nullable: false
|
|
8
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|