schematichq 1.5.7 → 1.5.8
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 +4 -4
- data/.fern/replay.lock +7 -1
- data/lib/schematic/accesstokens/client.rb +1 -1
- data/lib/schematic/accounts/client.rb +15 -15
- data/lib/schematic/billing/client.rb +432 -37
- data/lib/schematic/billing/types/charge_native_invoice_response.rb +15 -0
- data/lib/schematic/billing/types/create_billing_subscription_request_body.rb +4 -0
- data/lib/schematic/billing/types/delete_contract_document_response.rb +15 -0
- data/lib/schematic/billing/types/get_company_contract_response.rb +15 -0
- data/lib/schematic/billing/types/get_company_upcoming_invoices_response.rb +15 -0
- data/lib/schematic/billing/types/move_to_default_plan_response.rb +15 -0
- data/lib/schematic/billing/types/reissue_native_invoice_link_response.rb +15 -0
- data/lib/schematic/billing/types/revoke_native_invoice_link_response.rb +15 -0
- data/lib/schematic/billing/types/update_billing_settings_request_body.rb +4 -0
- data/lib/schematic/billing/types/update_company_billing_profile_request_body.rb +6 -0
- data/lib/schematic/billing/types/upload_contract_document_request.rb +11 -0
- data/lib/schematic/billing/types/upload_contract_document_response.rb +15 -0
- data/lib/schematic/catalogs/client.rb +16 -16
- data/lib/schematic/catalogs/types/update_catalog_configuration_request_body.rb +2 -0
- data/lib/schematic/checkout/client.rb +98 -9
- data/lib/schematic/checkout/types/pause_subscription_request.rb +15 -0
- data/lib/schematic/checkout/types/pause_subscription_response.rb +15 -0
- data/lib/schematic/checkout/types/resume_subscription_request.rb +13 -0
- data/lib/schematic/checkout/types/resume_subscription_response.rb +15 -0
- data/lib/schematic/client.rb +7 -196
- data/lib/schematic/companies/client.rb +140 -44
- data/lib/schematic/companies/types/get_billing_entity_settings_response.rb +15 -0
- data/lib/schematic/companies/types/list_users_params.rb +4 -0
- data/lib/schematic/companies/types/list_users_request.rb +4 -0
- data/lib/schematic/companies/types/update_billing_entity_settings_request_body.rb +13 -0
- data/lib/schematic/companies/types/update_billing_entity_settings_response.rb +15 -0
- data/lib/schematic/components/client.rb +8 -8
- data/lib/schematic/componentspublic/client.rb +1 -1
- data/lib/schematic/credits/client.rb +41 -41
- data/lib/schematic/customplangrouprollouts/client.rb +258 -0
- data/lib/schematic/customplangrouprollouts/types/copy_custom_plan_request_body.rb +15 -0
- data/lib/schematic/customplangrouprollouts/types/copy_custom_plan_response.rb +15 -0
- data/lib/schematic/customplangrouprollouts/types/get_group_rollout_response.rb +15 -0
- data/lib/schematic/customplangrouprollouts/types/list_group_rollouts_params.rb +14 -0
- data/lib/schematic/customplangrouprollouts/types/list_group_rollouts_request.rb +11 -0
- data/lib/schematic/customplangrouprollouts/types/list_group_rollouts_response.rb +15 -0
- data/lib/schematic/customplangrouprollouts/types/preview_group_rollout_params.rb +16 -0
- data/lib/schematic/customplangrouprollouts/types/preview_group_rollout_request.rb +15 -0
- data/lib/schematic/customplangrouprollouts/types/preview_group_rollout_response.rb +15 -0
- data/lib/schematic/customplangrouprollouts/types/start_group_rollout_request_body.rb +17 -0
- data/lib/schematic/customplangrouprollouts/types/start_group_rollout_response.rb +15 -0
- data/lib/schematic/dataexports/client.rb +4 -4
- data/lib/schematic/entitlements/client.rb +28 -28
- data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +2 -0
- data/lib/schematic/entitlements/types/create_company_override_request_body.rb +2 -0
- data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +2 -0
- data/lib/schematic/entitlements/types/update_company_override_request_body.rb +2 -0
- data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +2 -0
- data/lib/schematic/errors/response_error.rb +4 -2
- data/lib/schematic/events/client.rb +213 -9
- data/lib/schematic/events/types/create_account_inference_cost_rate_request_body.rb +19 -0
- data/lib/schematic/events/types/create_account_inference_cost_rate_response.rb +15 -0
- data/lib/schematic/events/types/delete_account_inference_cost_rate_response.rb +15 -0
- data/lib/schematic/events/types/list_account_inference_cost_rates_params.rb +20 -0
- data/lib/schematic/events/types/list_account_inference_cost_rates_request.rb +17 -0
- data/lib/schematic/events/types/list_account_inference_cost_rates_response.rb +15 -0
- data/lib/schematic/events/types/update_account_inference_cost_rate_request_body.rb +13 -0
- data/lib/schematic/events/types/update_account_inference_cost_rate_response.rb +15 -0
- data/lib/schematic/features/client.rb +18 -18
- data/lib/schematic/insights/client.rb +6 -6
- data/lib/schematic/integrationsapi/client.rb +14 -14
- data/lib/schematic/internal/http/raw_client.rb +1 -1
- data/lib/schematic/licenses/client.rb +3 -3
- data/lib/schematic/planbundle/client.rb +3 -3
- data/lib/schematic/plangroups/client.rb +3 -3
- data/lib/schematic/planmigrations/client.rb +11 -11
- data/lib/schematic/plans/client.rb +20 -20
- data/lib/schematic/scheduledcheckout/client.rb +4 -4
- data/lib/schematic/types/account_inference_cost_rate_response_data.rb +29 -0
- data/lib/schematic/types/billing_invoice_billing_details_response_data.rb +2 -0
- data/lib/schematic/types/billing_invoice_detail_response_data.rb +2 -0
- data/lib/schematic/types/billing_moved_to_default_plan_response_data.rb +15 -0
- data/lib/schematic/types/billing_settings_response_data.rb +4 -0
- data/lib/schematic/types/billing_subscription_pause_behavior.rb +15 -0
- data/lib/schematic/types/billing_subscription_response_data.rb +6 -0
- data/lib/schematic/types/billing_subscription_view.rb +6 -0
- data/lib/schematic/types/billing_upcoming_invoice_response_data.rb +43 -0
- data/lib/schematic/types/billing_upcoming_invoices_response_data.rb +13 -0
- data/lib/schematic/types/catalog_configuration_response_data.rb +2 -0
- data/lib/schematic/types/catalog_plan_response_data.rb +4 -0
- data/lib/schematic/types/catalog_response_data.rb +2 -0
- data/lib/schematic/types/checkout_subscription.rb +6 -0
- data/lib/schematic/types/company_billing_entity_settings_response_data.rb +15 -0
- data/lib/schematic/types/company_billing_entity_subscription_response_data.rb +10 -0
- data/lib/schematic/types/company_billing_profile_contract_response_data.rb +55 -0
- data/lib/schematic/types/company_billing_profile_document_response_data.rb +15 -0
- data/lib/schematic/types/company_override_response_data.rb +2 -0
- data/lib/schematic/types/company_subscription_response_data.rb +10 -0
- data/lib/schematic/types/contract_billing_details_request_body.rb +19 -0
- data/lib/schematic/types/contract_postpaid_credit_response_data.rb +23 -0
- data/lib/schematic/types/contract_postpaid_response_data.rb +15 -0
- data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +2 -0
- data/lib/schematic/types/create_entitlement_req_common.rb +2 -0
- data/lib/schematic/types/credit_burn_breakdown_line.rb +4 -0
- data/lib/schematic/types/credit_model_rate.rb +17 -0
- data/lib/schematic/types/custom_plan_billing_response_data.rb +2 -0
- data/lib/schematic/types/group_rollout_change_response_data.rb +13 -0
- data/lib/schematic/types/group_rollout_changes_response_data.rb +23 -0
- data/lib/schematic/types/group_rollout_company_response_data.rb +15 -0
- data/lib/schematic/types/group_rollout_company_result_response_data.rb +19 -0
- data/lib/schematic/types/group_rollout_preview_response_data.rb +19 -0
- data/lib/schematic/types/group_rollout_response_data.rb +25 -0
- data/lib/schematic/types/group_rollout_versions_request_body.rb +13 -0
- data/lib/schematic/types/manage_plan_request.rb +2 -0
- data/lib/schematic/types/plan_change_action.rb +1 -0
- data/lib/schematic/types/plan_entitlement_response_data.rb +2 -0
- data/lib/schematic/types/publish_plan_version_request_body.rb +4 -0
- data/lib/schematic/types/publish_preview_response_data.rb +4 -0
- data/lib/schematic/types/stripe_integration_config.rb +2 -0
- data/lib/schematic/types/update_entitlement_req_common.rb +2 -0
- data/lib/schematic/version.rb +1 -1
- data/lib/schematic/webhooks/client.rb +10 -10
- data/lib/schematic.rb +66 -5
- data/reference.md +2146 -1054
- metadata +57 -2
data/lib/schematic/client.rb
CHANGED
|
@@ -2,200 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
module Schematic
|
|
4
4
|
class Client
|
|
5
|
-
# @param request_options [Hash]
|
|
6
|
-
# @param _params [Hash]
|
|
7
|
-
# @option request_options [String] :base_url
|
|
8
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
9
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
10
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
11
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
12
|
-
#
|
|
13
|
-
# @example
|
|
14
|
-
# client.post_api_keys
|
|
15
|
-
#
|
|
16
|
-
# @return [untyped]
|
|
17
|
-
def post_api_keys(request_options: {}, **_params)
|
|
18
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
19
|
-
base_url: request_options[:base_url],
|
|
20
|
-
method: "POST",
|
|
21
|
-
path: "api-keys",
|
|
22
|
-
request_options: request_options
|
|
23
|
-
)
|
|
24
|
-
begin
|
|
25
|
-
response = @client.send(request)
|
|
26
|
-
rescue Net::HTTPRequestTimeout
|
|
27
|
-
raise Schematic::Errors::TimeoutError
|
|
28
|
-
end
|
|
29
|
-
code = response.code.to_i
|
|
30
|
-
return if code.between?(200, 299)
|
|
31
|
-
|
|
32
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
33
|
-
raise error_class.new(response.body, code: code)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# @param request_options [Hash]
|
|
37
|
-
# @param params [Hash]
|
|
38
|
-
# @option request_options [String] :base_url
|
|
39
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
40
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
41
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
42
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
43
|
-
# @option params [String] :api_key_id
|
|
44
|
-
#
|
|
45
|
-
# @example
|
|
46
|
-
# client.put_api_keys_api_key_id(api_key_id: "api_key_id")
|
|
47
|
-
#
|
|
48
|
-
# @return [untyped]
|
|
49
|
-
def put_api_keys_api_key_id(request_options: {}, **params)
|
|
50
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
51
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
52
|
-
base_url: request_options[:base_url],
|
|
53
|
-
method: "PUT",
|
|
54
|
-
path: "api-keys/#{URI.encode_uri_component(params[:api_key_id].to_s)}",
|
|
55
|
-
request_options: request_options
|
|
56
|
-
)
|
|
57
|
-
begin
|
|
58
|
-
response = @client.send(request)
|
|
59
|
-
rescue Net::HTTPRequestTimeout
|
|
60
|
-
raise Schematic::Errors::TimeoutError
|
|
61
|
-
end
|
|
62
|
-
code = response.code.to_i
|
|
63
|
-
return if code.between?(200, 299)
|
|
64
|
-
|
|
65
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
66
|
-
raise error_class.new(response.body, code: code)
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
# @param request_options [Hash]
|
|
70
|
-
# @param params [Hash]
|
|
71
|
-
# @option request_options [String] :base_url
|
|
72
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
73
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
74
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
75
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
76
|
-
# @option params [String] :api_key_id
|
|
77
|
-
#
|
|
78
|
-
# @example
|
|
79
|
-
# client.delete_api_keys_api_key_id(api_key_id: "api_key_id")
|
|
80
|
-
#
|
|
81
|
-
# @return [untyped]
|
|
82
|
-
def delete_api_keys_api_key_id(request_options: {}, **params)
|
|
83
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
84
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
85
|
-
base_url: request_options[:base_url],
|
|
86
|
-
method: "DELETE",
|
|
87
|
-
path: "api-keys/#{URI.encode_uri_component(params[:api_key_id].to_s)}",
|
|
88
|
-
request_options: request_options
|
|
89
|
-
)
|
|
90
|
-
begin
|
|
91
|
-
response = @client.send(request)
|
|
92
|
-
rescue Net::HTTPRequestTimeout
|
|
93
|
-
raise Schematic::Errors::TimeoutError
|
|
94
|
-
end
|
|
95
|
-
code = response.code.to_i
|
|
96
|
-
return if code.between?(200, 299)
|
|
97
|
-
|
|
98
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
99
|
-
raise error_class.new(response.body, code: code)
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
# @param request_options [Hash]
|
|
103
|
-
# @param _params [Hash]
|
|
104
|
-
# @option request_options [String] :base_url
|
|
105
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
106
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
107
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
108
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
109
|
-
#
|
|
110
|
-
# @example
|
|
111
|
-
# client.post_environments
|
|
112
|
-
#
|
|
113
|
-
# @return [untyped]
|
|
114
|
-
def post_environments(request_options: {}, **_params)
|
|
115
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
116
|
-
base_url: request_options[:base_url],
|
|
117
|
-
method: "POST",
|
|
118
|
-
path: "environments",
|
|
119
|
-
request_options: request_options
|
|
120
|
-
)
|
|
121
|
-
begin
|
|
122
|
-
response = @client.send(request)
|
|
123
|
-
rescue Net::HTTPRequestTimeout
|
|
124
|
-
raise Schematic::Errors::TimeoutError
|
|
125
|
-
end
|
|
126
|
-
code = response.code.to_i
|
|
127
|
-
return if code.between?(200, 299)
|
|
128
|
-
|
|
129
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
130
|
-
raise error_class.new(response.body, code: code)
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
# @param request_options [Hash]
|
|
134
|
-
# @param params [Hash]
|
|
135
|
-
# @option request_options [String] :base_url
|
|
136
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
137
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
138
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
139
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
140
|
-
# @option params [String] :environment_id
|
|
141
|
-
#
|
|
142
|
-
# @example
|
|
143
|
-
# client.put_environments_environment_id(environment_id: "environment_id")
|
|
144
|
-
#
|
|
145
|
-
# @return [untyped]
|
|
146
|
-
def put_environments_environment_id(request_options: {}, **params)
|
|
147
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
148
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
149
|
-
base_url: request_options[:base_url],
|
|
150
|
-
method: "PUT",
|
|
151
|
-
path: "environments/#{URI.encode_uri_component(params[:environment_id].to_s)}",
|
|
152
|
-
request_options: request_options
|
|
153
|
-
)
|
|
154
|
-
begin
|
|
155
|
-
response = @client.send(request)
|
|
156
|
-
rescue Net::HTTPRequestTimeout
|
|
157
|
-
raise Schematic::Errors::TimeoutError
|
|
158
|
-
end
|
|
159
|
-
code = response.code.to_i
|
|
160
|
-
return if code.between?(200, 299)
|
|
161
|
-
|
|
162
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
163
|
-
raise error_class.new(response.body, code: code)
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
# @param request_options [Hash]
|
|
167
|
-
# @param params [Hash]
|
|
168
|
-
# @option request_options [String] :base_url
|
|
169
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
170
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
171
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
172
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
173
|
-
# @option params [String] :environment_id
|
|
174
|
-
#
|
|
175
|
-
# @example
|
|
176
|
-
# client.delete_environments_environment_id(environment_id: "environment_id")
|
|
177
|
-
#
|
|
178
|
-
# @return [untyped]
|
|
179
|
-
def delete_environments_environment_id(request_options: {}, **params)
|
|
180
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
181
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
182
|
-
base_url: request_options[:base_url],
|
|
183
|
-
method: "DELETE",
|
|
184
|
-
path: "environments/#{URI.encode_uri_component(params[:environment_id].to_s)}",
|
|
185
|
-
request_options: request_options
|
|
186
|
-
)
|
|
187
|
-
begin
|
|
188
|
-
response = @client.send(request)
|
|
189
|
-
rescue Net::HTTPRequestTimeout
|
|
190
|
-
raise Schematic::Errors::TimeoutError
|
|
191
|
-
end
|
|
192
|
-
code = response.code.to_i
|
|
193
|
-
return if code.between?(200, 299)
|
|
194
|
-
|
|
195
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
196
|
-
raise error_class.new(response.body, code: code)
|
|
197
|
-
end
|
|
198
|
-
|
|
199
5
|
# @param request_options [Hash]
|
|
200
6
|
# @param _params [Hash]
|
|
201
7
|
# @option request_options [String] :base_url
|
|
@@ -224,7 +30,7 @@ module Schematic
|
|
|
224
30
|
return if code.between?(200, 299)
|
|
225
31
|
|
|
226
32
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
227
|
-
raise error_class.new(response.body, code: code)
|
|
33
|
+
raise error_class.new(response.body, code: code, headers: response.to_hash)
|
|
228
34
|
end
|
|
229
35
|
|
|
230
36
|
# @param api_key [String]
|
|
@@ -237,7 +43,7 @@ module Schematic
|
|
|
237
43
|
@raw_client = Schematic::Internal::Http::RawClient.new(
|
|
238
44
|
base_url: base_url || Schematic::Environment::DEFAULT,
|
|
239
45
|
headers: {
|
|
240
|
-
"User-Agent" => "schematichq/1.5.
|
|
46
|
+
"User-Agent" => "schematichq/1.5.8",
|
|
241
47
|
"X-Fern-Language" => "Ruby",
|
|
242
48
|
"X-Schematic-Api-Key" => api_key.to_s
|
|
243
49
|
},
|
|
@@ -296,6 +102,11 @@ module Schematic
|
|
|
296
102
|
@planbundle ||= Schematic::Planbundle::Client.new(client: @raw_client)
|
|
297
103
|
end
|
|
298
104
|
|
|
105
|
+
# @return [Schematic::Customplangrouprollouts::Client]
|
|
106
|
+
def customplangrouprollouts
|
|
107
|
+
@customplangrouprollouts ||= Schematic::Customplangrouprollouts::Client.new(client: @raw_client)
|
|
108
|
+
end
|
|
109
|
+
|
|
299
110
|
# @return [Schematic::Dataexports::Client]
|
|
300
111
|
def dataexports
|
|
301
112
|
@dataexports ||= Schematic::Dataexports::Client.new(client: @raw_client)
|