schematichq 1.5.5 → 1.5.6
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/accounts/client.rb +0 -271
- data/lib/schematic/billing/client.rb +40 -16
- data/lib/schematic/billing/types/{count_native_invoices_params.rb → count_billing_invoices_params.rb} +9 -1
- data/lib/schematic/billing/types/{count_native_invoices_request.rb → count_billing_invoices_request.rb} +9 -1
- data/lib/schematic/billing/types/{count_native_invoices_response.rb → count_billing_invoices_response.rb} +2 -2
- data/lib/schematic/billing/types/create_payment_method_request_body.rb +2 -0
- data/lib/schematic/billing/types/{get_native_invoice_response.rb → get_billing_invoice_response.rb} +1 -1
- data/lib/schematic/billing/types/{list_native_invoices_params.rb → list_billing_invoices_params.rb} +9 -1
- data/lib/schematic/billing/types/{list_native_invoices_request.rb → list_billing_invoices_request.rb} +9 -1
- data/lib/schematic/billing/types/{list_native_invoices_response.rb → list_billing_invoices_response.rb} +2 -2
- data/lib/schematic/billing/types/{mark_native_invoice_paid_response.rb → mark_billing_invoice_paid_response.rb} +1 -1
- data/lib/schematic/catalogs/client.rb +82 -0
- data/lib/schematic/{accounts/types/create_api_key_response.rb → catalogs/types/get_public_catalog_by_id_response.rb} +3 -3
- data/lib/schematic/{accounts/types/delete_api_key_response.rb → catalogs/types/get_public_catalog_response.rb} +3 -3
- data/lib/schematic/client.rb +195 -1
- data/lib/schematic/credits/client.rb +48 -0
- data/lib/schematic/credits/types/count_credit_event_ledger_params.rb +2 -0
- data/lib/schematic/credits/types/count_credit_event_ledger_request.rb +2 -0
- data/lib/schematic/{accounts/types/create_environment_response.rb → credits/types/get_credit_event_ledger_entry_response.rb} +3 -3
- data/lib/schematic/credits/types/list_credit_event_ledger_params.rb +2 -0
- data/lib/schematic/credits/types/list_credit_event_ledger_request.rb +2 -0
- data/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb +2 -0
- data/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb +2 -0
- data/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb +2 -0
- data/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +2 -0
- data/lib/schematic/types/billing_invoice_address_response_data.rb +19 -0
- data/lib/schematic/types/billing_invoice_billing_details_response_data.rb +15 -0
- data/lib/schematic/types/billing_invoice_detail_response_data.rb +20 -4
- data/lib/schematic/types/billing_invoice_line_response_data.rb +5 -1
- data/lib/schematic/types/billing_invoice_response_data.rb +12 -4
- data/lib/schematic/types/billing_invoice_settlement_response_data.rb +1 -1
- data/lib/schematic/types/billing_invoice_tax_id_response_data.rb +11 -0
- data/lib/schematic/types/billing_invoice_terms_response_data.rb +2 -0
- data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +2 -0
- data/lib/schematic/types/billing_plan_credit_grant_warning_tier_response_data.rb +13 -0
- data/lib/schematic/types/catalog_bundle_currency_price_response_data.rb +13 -0
- data/lib/schematic/types/catalog_capabilities_response_data.rb +11 -0
- data/lib/schematic/types/catalog_credit_bundle_response_data.rb +39 -0
- data/lib/schematic/types/catalog_credit_grant_response_data.rb +29 -0
- data/lib/schematic/types/catalog_currency_prices_response_data.rb +17 -0
- data/lib/schematic/types/catalog_custom_plan_cta_response_data.rb +13 -0
- data/lib/schematic/types/catalog_detail_response_data.rb +23 -0
- data/lib/schematic/types/catalog_entitlement_response_data.rb +61 -0
- data/lib/schematic/types/catalog_plan_entitlement_response_data.rb +63 -0
- data/lib/schematic/types/catalog_plan_response_data.rb +41 -0
- data/lib/schematic/types/catalog_price_response_data.rb +29 -0
- data/lib/schematic/types/catalog_price_tier_response_data.rb +17 -0
- data/lib/schematic/types/checkout_charge_timing.rb +13 -0
- data/lib/schematic/types/checkout_problem_code.rb +4 -0
- data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +2 -0
- data/lib/schematic/types/credit_spend_window_unit.rb +2 -0
- data/lib/schematic/types/custom_plan_billing_response_data.rb +2 -0
- data/lib/schematic/types/entitlement_type.rb +1 -0
- data/lib/schematic/types/event_body.rb +3 -3
- data/lib/schematic/types/payment_method_billing_details_request_body.rb +13 -0
- data/lib/schematic/types/plan_credit_grant_warning_tier_request_body.rb +11 -0
- data/lib/schematic/types/plan_version_migration_preview_company_response_data.rb +2 -0
- data/lib/schematic/types/plan_version_migration_preview_note_response_data.rb +13 -0
- data/lib/schematic/types/plan_version_response_data.rb +2 -0
- data/lib/schematic/types/preview_subscription_finance_response_data.rb +6 -0
- data/lib/schematic/types/preview_subscription_proration_line_response_data.rb +21 -0
- data/lib/schematic/types/preview_subscription_proration_response_data.rb +21 -0
- data/lib/schematic/types/proration_line_kind.rb +12 -0
- data/lib/schematic/types/public_catalog_response_data.rb +29 -0
- data/lib/schematic/types/publish_plan_version_request_body.rb +2 -0
- data/lib/schematic/types/publish_preview_response_data.rb +2 -0
- data/lib/schematic/types/renewal_policy.rb +13 -0
- data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +2 -0
- data/lib/schematic/types/webhook_request_type.rb +1 -0
- data/lib/schematic/version.rb +1 -1
- data/lib/schematic.rb +38 -22
- data/reference.md +434 -275
- metadata +38 -22
- data/lib/schematic/accounts/types/create_api_key_request_body.rb +0 -19
- data/lib/schematic/accounts/types/create_environment_request_body.rb +0 -13
- data/lib/schematic/accounts/types/delete_environment_response.rb +0 -13
- data/lib/schematic/accounts/types/update_api_key_request_body.rb +0 -17
- data/lib/schematic/accounts/types/update_api_key_response.rb +0 -13
- data/lib/schematic/accounts/types/update_environment_request_body.rb +0 -17
- data/lib/schematic/accounts/types/update_environment_response.rb +0 -13
- data/lib/schematic/types/api_key_create_response_data.rb +0 -33
- data/lib/schematic/types/environment_detail_response_data.rb +0 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a862b878399698534b16a1bf79ccebb298be7977d82d29520d29c0420ae741b4
|
|
4
|
+
data.tar.gz: 8b60a87a97fcf41ad5630836ff24f24848cd91866976f5ae6caf26315660c736
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0241c716dd93ee78db02b86efd958da5d72f81e80b9882d8091873772b1301eed2aefb2106c39cee58489aa3aa820ff32696edbb341835c85765dab1e577dd64
|
|
7
|
+
data.tar.gz: 2beb58f1af4fc20c54ece7e83c81ebf54caa583777ff6aaa34ed4df9ee83b631cf13ec136d720ba4c853cc563540231346c0f5686404d132bf2f06c7eeba30dd
|
data/.fern/metadata.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"cliVersion": "5.50.0",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
|
-
"generatorVersion": "1.39.
|
|
4
|
+
"generatorVersion": "1.39.2",
|
|
5
5
|
"generatorConfig": {
|
|
6
6
|
"module": "SchematicHQ",
|
|
7
7
|
"rubocopVariableNumberStyle": "disabled",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"webrick": ">= 1.0"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"originGitCommit": "
|
|
16
|
+
"originGitCommit": "9c3d404a6ed3ff63811ecbef9e2814ea8607f22d",
|
|
17
17
|
"originGitCommitIsDirty": false,
|
|
18
18
|
"invokedBy": "ci",
|
|
19
|
-
"requestedVersion": "1.5.
|
|
19
|
+
"requestedVersion": "1.5.6",
|
|
20
20
|
"ciProvider": "github",
|
|
21
|
-
"sdkVersion": "1.5.
|
|
21
|
+
"sdkVersion": "1.5.6"
|
|
22
22
|
}
|
data/.fern/replay.lock
CHANGED
|
@@ -132,5 +132,11 @@ generations:
|
|
|
132
132
|
cli_version: unknown
|
|
133
133
|
generator_versions:
|
|
134
134
|
fernapi/fern-ruby-sdk: 1.39.1
|
|
135
|
-
|
|
135
|
+
- commit_sha: 0da986ad01727b881dd7be3de79dbb7875b69689
|
|
136
|
+
tree_hash: 73e72e0093a7ddc623e8455f10ccbb32a00547be
|
|
137
|
+
timestamp: 2026-10-26T10:06:03.015Z
|
|
138
|
+
cli_version: unknown
|
|
139
|
+
generator_versions:
|
|
140
|
+
fernapi/fern-ruby-sdk: 1.39.2
|
|
141
|
+
current_generation: 0da986ad01727b881dd7be3de79dbb7875b69689
|
|
136
142
|
patches: []
|
|
@@ -232,49 +232,6 @@ module Schematic
|
|
|
232
232
|
end
|
|
233
233
|
end
|
|
234
234
|
|
|
235
|
-
# @param request_options [Hash]
|
|
236
|
-
# @param params [Schematic::Accounts::Types::CreateApiKeyRequestBody]
|
|
237
|
-
# @option request_options [String] :base_url
|
|
238
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
239
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
240
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
241
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
242
|
-
#
|
|
243
|
-
# @example
|
|
244
|
-
# client.accounts.create_api_key(name: "name")
|
|
245
|
-
#
|
|
246
|
-
# @return [Schematic::Accounts::Types::CreateApiKeyResponse]
|
|
247
|
-
def create_api_key(request_options: {}, **params)
|
|
248
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
249
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
250
|
-
base_url: request_options[:base_url],
|
|
251
|
-
method: "POST",
|
|
252
|
-
path: "api-keys",
|
|
253
|
-
body: Schematic::Accounts::Types::CreateApiKeyRequestBody.new(params).to_h,
|
|
254
|
-
request_options: request_options
|
|
255
|
-
)
|
|
256
|
-
begin
|
|
257
|
-
response = @client.send(request)
|
|
258
|
-
rescue Net::HTTPRequestTimeout
|
|
259
|
-
raise Schematic::Errors::TimeoutError
|
|
260
|
-
end
|
|
261
|
-
code = response.code.to_i
|
|
262
|
-
if code.between?(200, 299)
|
|
263
|
-
(response.body.to_s.empty? ? nil : Schematic::Accounts::Types::CreateApiKeyResponse.load(response.body))
|
|
264
|
-
else
|
|
265
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
266
|
-
error_types = {
|
|
267
|
-
400 => Schematic::Types::ApiError,
|
|
268
|
-
401 => Schematic::Types::ApiError,
|
|
269
|
-
403 => Schematic::Types::ApiError,
|
|
270
|
-
404 => Schematic::Types::ApiError,
|
|
271
|
-
500 => Schematic::Types::ApiError
|
|
272
|
-
}
|
|
273
|
-
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
274
|
-
raise error_class.new(response.body, code: code, body: error_body)
|
|
275
|
-
end
|
|
276
|
-
end
|
|
277
|
-
|
|
278
235
|
# @param request_options [Hash]
|
|
279
236
|
# @param params [Hash]
|
|
280
237
|
# @option request_options [String] :base_url
|
|
@@ -317,97 +274,6 @@ module Schematic
|
|
|
317
274
|
end
|
|
318
275
|
end
|
|
319
276
|
|
|
320
|
-
# @param request_options [Hash]
|
|
321
|
-
# @param params [Schematic::Accounts::Types::UpdateApiKeyRequestBody]
|
|
322
|
-
# @option request_options [String] :base_url
|
|
323
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
324
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
325
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
326
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
327
|
-
# @option params [String] :api_key_id
|
|
328
|
-
#
|
|
329
|
-
# @example
|
|
330
|
-
# client.accounts.update_api_key(api_key_id: "api_key_id")
|
|
331
|
-
#
|
|
332
|
-
# @return [Schematic::Accounts::Types::UpdateApiKeyResponse]
|
|
333
|
-
def update_api_key(request_options: {}, **params)
|
|
334
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
335
|
-
request_data = Schematic::Accounts::Types::UpdateApiKeyRequestBody.new(params).to_h
|
|
336
|
-
non_body_param_names = %w[api_key_id]
|
|
337
|
-
body = request_data.except(*non_body_param_names)
|
|
338
|
-
|
|
339
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
340
|
-
base_url: request_options[:base_url],
|
|
341
|
-
method: "PUT",
|
|
342
|
-
path: "api-keys/#{URI.encode_uri_component(params[:api_key_id].to_s)}",
|
|
343
|
-
body: body,
|
|
344
|
-
request_options: request_options
|
|
345
|
-
)
|
|
346
|
-
begin
|
|
347
|
-
response = @client.send(request)
|
|
348
|
-
rescue Net::HTTPRequestTimeout
|
|
349
|
-
raise Schematic::Errors::TimeoutError
|
|
350
|
-
end
|
|
351
|
-
code = response.code.to_i
|
|
352
|
-
if code.between?(200, 299)
|
|
353
|
-
(response.body.to_s.empty? ? nil : Schematic::Accounts::Types::UpdateApiKeyResponse.load(response.body))
|
|
354
|
-
else
|
|
355
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
356
|
-
error_types = {
|
|
357
|
-
400 => Schematic::Types::ApiError,
|
|
358
|
-
401 => Schematic::Types::ApiError,
|
|
359
|
-
403 => Schematic::Types::ApiError,
|
|
360
|
-
404 => Schematic::Types::ApiError,
|
|
361
|
-
500 => Schematic::Types::ApiError
|
|
362
|
-
}
|
|
363
|
-
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
364
|
-
raise error_class.new(response.body, code: code, body: error_body)
|
|
365
|
-
end
|
|
366
|
-
end
|
|
367
|
-
|
|
368
|
-
# @param request_options [Hash]
|
|
369
|
-
# @param params [Hash]
|
|
370
|
-
# @option request_options [String] :base_url
|
|
371
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
372
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
373
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
374
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
375
|
-
# @option params [String] :api_key_id
|
|
376
|
-
#
|
|
377
|
-
# @example
|
|
378
|
-
# client.accounts.delete_api_key(api_key_id: "api_key_id")
|
|
379
|
-
#
|
|
380
|
-
# @return [Schematic::Accounts::Types::DeleteApiKeyResponse]
|
|
381
|
-
def delete_api_key(request_options: {}, **params)
|
|
382
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
383
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
384
|
-
base_url: request_options[:base_url],
|
|
385
|
-
method: "DELETE",
|
|
386
|
-
path: "api-keys/#{URI.encode_uri_component(params[:api_key_id].to_s)}",
|
|
387
|
-
request_options: request_options
|
|
388
|
-
)
|
|
389
|
-
begin
|
|
390
|
-
response = @client.send(request)
|
|
391
|
-
rescue Net::HTTPRequestTimeout
|
|
392
|
-
raise Schematic::Errors::TimeoutError
|
|
393
|
-
end
|
|
394
|
-
code = response.code.to_i
|
|
395
|
-
if code.between?(200, 299)
|
|
396
|
-
(response.body.to_s.empty? ? nil : Schematic::Accounts::Types::DeleteApiKeyResponse.load(response.body))
|
|
397
|
-
else
|
|
398
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
399
|
-
error_types = {
|
|
400
|
-
400 => Schematic::Types::ApiError,
|
|
401
|
-
401 => Schematic::Types::ApiError,
|
|
402
|
-
403 => Schematic::Types::ApiError,
|
|
403
|
-
404 => Schematic::Types::ApiError,
|
|
404
|
-
500 => Schematic::Types::ApiError
|
|
405
|
-
}
|
|
406
|
-
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
407
|
-
raise error_class.new(response.body, code: code, body: error_body)
|
|
408
|
-
end
|
|
409
|
-
end
|
|
410
|
-
|
|
411
277
|
# @param request_options [Hash]
|
|
412
278
|
# @param params [Hash]
|
|
413
279
|
# @option request_options [String] :base_url
|
|
@@ -697,52 +563,6 @@ module Schematic
|
|
|
697
563
|
end
|
|
698
564
|
end
|
|
699
565
|
|
|
700
|
-
# @param request_options [Hash]
|
|
701
|
-
# @param params [Schematic::Accounts::Types::CreateEnvironmentRequestBody]
|
|
702
|
-
# @option request_options [String] :base_url
|
|
703
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
704
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
705
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
706
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
707
|
-
#
|
|
708
|
-
# @example
|
|
709
|
-
# client.accounts.create_environment(
|
|
710
|
-
# environment_type: "development",
|
|
711
|
-
# name: "name"
|
|
712
|
-
# )
|
|
713
|
-
#
|
|
714
|
-
# @return [Schematic::Accounts::Types::CreateEnvironmentResponse]
|
|
715
|
-
def create_environment(request_options: {}, **params)
|
|
716
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
717
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
718
|
-
base_url: request_options[:base_url],
|
|
719
|
-
method: "POST",
|
|
720
|
-
path: "environments",
|
|
721
|
-
body: Schematic::Accounts::Types::CreateEnvironmentRequestBody.new(params).to_h,
|
|
722
|
-
request_options: request_options
|
|
723
|
-
)
|
|
724
|
-
begin
|
|
725
|
-
response = @client.send(request)
|
|
726
|
-
rescue Net::HTTPRequestTimeout
|
|
727
|
-
raise Schematic::Errors::TimeoutError
|
|
728
|
-
end
|
|
729
|
-
code = response.code.to_i
|
|
730
|
-
if code.between?(200, 299)
|
|
731
|
-
(response.body.to_s.empty? ? nil : Schematic::Accounts::Types::CreateEnvironmentResponse.load(response.body))
|
|
732
|
-
else
|
|
733
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
734
|
-
error_types = {
|
|
735
|
-
400 => Schematic::Types::ApiError,
|
|
736
|
-
401 => Schematic::Types::ApiError,
|
|
737
|
-
403 => Schematic::Types::ApiError,
|
|
738
|
-
404 => Schematic::Types::ApiError,
|
|
739
|
-
500 => Schematic::Types::ApiError
|
|
740
|
-
}
|
|
741
|
-
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
742
|
-
raise error_class.new(response.body, code: code, body: error_body)
|
|
743
|
-
end
|
|
744
|
-
end
|
|
745
|
-
|
|
746
566
|
# @param request_options [Hash]
|
|
747
567
|
# @param params [Hash]
|
|
748
568
|
# @option request_options [String] :base_url
|
|
@@ -785,97 +605,6 @@ module Schematic
|
|
|
785
605
|
end
|
|
786
606
|
end
|
|
787
607
|
|
|
788
|
-
# @param request_options [Hash]
|
|
789
|
-
# @param params [Schematic::Accounts::Types::UpdateEnvironmentRequestBody]
|
|
790
|
-
# @option request_options [String] :base_url
|
|
791
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
792
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
793
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
794
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
795
|
-
# @option params [String] :environment_id
|
|
796
|
-
#
|
|
797
|
-
# @example
|
|
798
|
-
# client.accounts.update_environment(environment_id: "environment_id")
|
|
799
|
-
#
|
|
800
|
-
# @return [Schematic::Accounts::Types::UpdateEnvironmentResponse]
|
|
801
|
-
def update_environment(request_options: {}, **params)
|
|
802
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
803
|
-
request_data = Schematic::Accounts::Types::UpdateEnvironmentRequestBody.new(params).to_h
|
|
804
|
-
non_body_param_names = %w[environment_id]
|
|
805
|
-
body = request_data.except(*non_body_param_names)
|
|
806
|
-
|
|
807
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
808
|
-
base_url: request_options[:base_url],
|
|
809
|
-
method: "PUT",
|
|
810
|
-
path: "environments/#{URI.encode_uri_component(params[:environment_id].to_s)}",
|
|
811
|
-
body: body,
|
|
812
|
-
request_options: request_options
|
|
813
|
-
)
|
|
814
|
-
begin
|
|
815
|
-
response = @client.send(request)
|
|
816
|
-
rescue Net::HTTPRequestTimeout
|
|
817
|
-
raise Schematic::Errors::TimeoutError
|
|
818
|
-
end
|
|
819
|
-
code = response.code.to_i
|
|
820
|
-
if code.between?(200, 299)
|
|
821
|
-
(response.body.to_s.empty? ? nil : Schematic::Accounts::Types::UpdateEnvironmentResponse.load(response.body))
|
|
822
|
-
else
|
|
823
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
824
|
-
error_types = {
|
|
825
|
-
400 => Schematic::Types::ApiError,
|
|
826
|
-
401 => Schematic::Types::ApiError,
|
|
827
|
-
403 => Schematic::Types::ApiError,
|
|
828
|
-
404 => Schematic::Types::ApiError,
|
|
829
|
-
500 => Schematic::Types::ApiError
|
|
830
|
-
}
|
|
831
|
-
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
832
|
-
raise error_class.new(response.body, code: code, body: error_body)
|
|
833
|
-
end
|
|
834
|
-
end
|
|
835
|
-
|
|
836
|
-
# @param request_options [Hash]
|
|
837
|
-
# @param params [Hash]
|
|
838
|
-
# @option request_options [String] :base_url
|
|
839
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
840
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
841
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
842
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
843
|
-
# @option params [String] :environment_id
|
|
844
|
-
#
|
|
845
|
-
# @example
|
|
846
|
-
# client.accounts.delete_environment(environment_id: "environment_id")
|
|
847
|
-
#
|
|
848
|
-
# @return [Schematic::Accounts::Types::DeleteEnvironmentResponse]
|
|
849
|
-
def delete_environment(request_options: {}, **params)
|
|
850
|
-
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
851
|
-
request = Schematic::Internal::JSON::Request.new(
|
|
852
|
-
base_url: request_options[:base_url],
|
|
853
|
-
method: "DELETE",
|
|
854
|
-
path: "environments/#{URI.encode_uri_component(params[:environment_id].to_s)}",
|
|
855
|
-
request_options: request_options
|
|
856
|
-
)
|
|
857
|
-
begin
|
|
858
|
-
response = @client.send(request)
|
|
859
|
-
rescue Net::HTTPRequestTimeout
|
|
860
|
-
raise Schematic::Errors::TimeoutError
|
|
861
|
-
end
|
|
862
|
-
code = response.code.to_i
|
|
863
|
-
if code.between?(200, 299)
|
|
864
|
-
(response.body.to_s.empty? ? nil : Schematic::Accounts::Types::DeleteEnvironmentResponse.load(response.body))
|
|
865
|
-
else
|
|
866
|
-
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
867
|
-
error_types = {
|
|
868
|
-
400 => Schematic::Types::ApiError,
|
|
869
|
-
401 => Schematic::Types::ApiError,
|
|
870
|
-
403 => Schematic::Types::ApiError,
|
|
871
|
-
404 => Schematic::Types::ApiError,
|
|
872
|
-
500 => Schematic::Types::ApiError
|
|
873
|
-
}
|
|
874
|
-
error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
|
|
875
|
-
raise error_class.new(response.body, code: code, body: error_body)
|
|
876
|
-
end
|
|
877
|
-
end
|
|
878
|
-
|
|
879
608
|
# @param request_options [Hash]
|
|
880
609
|
# @param _params [Hash]
|
|
881
610
|
# @option request_options [String] :base_url
|
|
@@ -1660,25 +1660,37 @@ module Schematic
|
|
|
1660
1660
|
# @option params [String, nil] :company_id
|
|
1661
1661
|
# @option params [String, nil] :contract_id
|
|
1662
1662
|
# @option params [Schematic::Types::InvoiceDocumentState, nil] :document_state
|
|
1663
|
+
# @option params [Boolean, nil] :past_due
|
|
1664
|
+
# @option params [Schematic::Types::BillingProviderType, nil] :provider_type
|
|
1665
|
+
# @option params [String, nil] :q
|
|
1666
|
+
# @option params [Schematic::Types::InvoiceStatus, nil] :status
|
|
1663
1667
|
# @option params [Integer, nil] :limit
|
|
1664
1668
|
# @option params [Integer, nil] :offset
|
|
1665
1669
|
#
|
|
1666
1670
|
# @example
|
|
1667
|
-
# client.billing.
|
|
1671
|
+
# client.billing.list_billing_invoices(
|
|
1668
1672
|
# company_id: "company_id",
|
|
1669
1673
|
# contract_id: "contract_id",
|
|
1670
1674
|
# document_state: "credited",
|
|
1675
|
+
# past_due: true,
|
|
1676
|
+
# provider_type: "metronome",
|
|
1677
|
+
# q: "q",
|
|
1678
|
+
# status: "draft",
|
|
1671
1679
|
# limit: 1000000,
|
|
1672
1680
|
# offset: 1000000
|
|
1673
1681
|
# )
|
|
1674
1682
|
#
|
|
1675
|
-
# @return [Schematic::Billing::Types::
|
|
1676
|
-
def
|
|
1683
|
+
# @return [Schematic::Billing::Types::ListBillingInvoicesResponse]
|
|
1684
|
+
def list_billing_invoices(request_options: {}, **params)
|
|
1677
1685
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
1678
1686
|
query_params = {}
|
|
1679
1687
|
query_params["company_id"] = params[:company_id] if params.key?(:company_id)
|
|
1680
1688
|
query_params["contract_id"] = params[:contract_id] if params.key?(:contract_id)
|
|
1681
1689
|
query_params["document_state"] = params[:document_state] if params.key?(:document_state)
|
|
1690
|
+
query_params["past_due"] = params[:past_due] if params.key?(:past_due)
|
|
1691
|
+
query_params["provider_type"] = params[:provider_type] if params.key?(:provider_type)
|
|
1692
|
+
query_params["q"] = params[:q] if params.key?(:q)
|
|
1693
|
+
query_params["status"] = params[:status] if params.key?(:status)
|
|
1682
1694
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
1683
1695
|
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
1684
1696
|
|
|
@@ -1696,7 +1708,7 @@ module Schematic
|
|
|
1696
1708
|
end
|
|
1697
1709
|
code = response.code.to_i
|
|
1698
1710
|
if code.between?(200, 299)
|
|
1699
|
-
(response.body.to_s.empty? ? nil : Schematic::Billing::Types::
|
|
1711
|
+
(response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListBillingInvoicesResponse.load(response.body))
|
|
1700
1712
|
else
|
|
1701
1713
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
1702
1714
|
error_types = {
|
|
@@ -1721,10 +1733,10 @@ module Schematic
|
|
|
1721
1733
|
# @option params [String] :invoice_id
|
|
1722
1734
|
#
|
|
1723
1735
|
# @example
|
|
1724
|
-
# client.billing.
|
|
1736
|
+
# client.billing.get_billing_invoice(invoice_id: "invoice_id")
|
|
1725
1737
|
#
|
|
1726
|
-
# @return [Schematic::Billing::Types::
|
|
1727
|
-
def
|
|
1738
|
+
# @return [Schematic::Billing::Types::GetBillingInvoiceResponse]
|
|
1739
|
+
def get_billing_invoice(request_options: {}, **params)
|
|
1728
1740
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
1729
1741
|
request = Schematic::Internal::JSON::Request.new(
|
|
1730
1742
|
base_url: request_options[:base_url],
|
|
@@ -1739,7 +1751,7 @@ module Schematic
|
|
|
1739
1751
|
end
|
|
1740
1752
|
code = response.code.to_i
|
|
1741
1753
|
if code.between?(200, 299)
|
|
1742
|
-
(response.body.to_s.empty? ? nil : Schematic::Billing::Types::
|
|
1754
|
+
(response.body.to_s.empty? ? nil : Schematic::Billing::Types::GetBillingInvoiceResponse.load(response.body))
|
|
1743
1755
|
else
|
|
1744
1756
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
1745
1757
|
error_types = {
|
|
@@ -1846,13 +1858,13 @@ module Schematic
|
|
|
1846
1858
|
# @option params [String] :invoice_id
|
|
1847
1859
|
#
|
|
1848
1860
|
# @example
|
|
1849
|
-
# client.billing.
|
|
1861
|
+
# client.billing.mark_billing_invoice_paid(
|
|
1850
1862
|
# invoice_id: "invoice_id",
|
|
1851
1863
|
# idempotency_key: "idempotency_key"
|
|
1852
1864
|
# )
|
|
1853
1865
|
#
|
|
1854
|
-
# @return [Schematic::Billing::Types::
|
|
1855
|
-
def
|
|
1866
|
+
# @return [Schematic::Billing::Types::MarkBillingInvoicePaidResponse]
|
|
1867
|
+
def mark_billing_invoice_paid(request_options: {}, **params)
|
|
1856
1868
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
1857
1869
|
request_data = Schematic::Billing::Types::MarkInvoicePaidRequestBody.new(params).to_h
|
|
1858
1870
|
non_body_param_names = %w[invoice_id]
|
|
@@ -1872,7 +1884,7 @@ module Schematic
|
|
|
1872
1884
|
end
|
|
1873
1885
|
code = response.code.to_i
|
|
1874
1886
|
if code.between?(200, 299)
|
|
1875
|
-
(response.body.to_s.empty? ? nil : Schematic::Billing::Types::
|
|
1887
|
+
(response.body.to_s.empty? ? nil : Schematic::Billing::Types::MarkBillingInvoicePaidResponse.load(response.body))
|
|
1876
1888
|
else
|
|
1877
1889
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
1878
1890
|
error_types = {
|
|
@@ -1980,25 +1992,37 @@ module Schematic
|
|
|
1980
1992
|
# @option params [String, nil] :company_id
|
|
1981
1993
|
# @option params [String, nil] :contract_id
|
|
1982
1994
|
# @option params [Schematic::Types::InvoiceDocumentState, nil] :document_state
|
|
1995
|
+
# @option params [Boolean, nil] :past_due
|
|
1996
|
+
# @option params [Schematic::Types::BillingProviderType, nil] :provider_type
|
|
1997
|
+
# @option params [String, nil] :q
|
|
1998
|
+
# @option params [Schematic::Types::InvoiceStatus, nil] :status
|
|
1983
1999
|
# @option params [Integer, nil] :limit
|
|
1984
2000
|
# @option params [Integer, nil] :offset
|
|
1985
2001
|
#
|
|
1986
2002
|
# @example
|
|
1987
|
-
# client.billing.
|
|
2003
|
+
# client.billing.count_billing_invoices(
|
|
1988
2004
|
# company_id: "company_id",
|
|
1989
2005
|
# contract_id: "contract_id",
|
|
1990
2006
|
# document_state: "credited",
|
|
2007
|
+
# past_due: true,
|
|
2008
|
+
# provider_type: "metronome",
|
|
2009
|
+
# q: "q",
|
|
2010
|
+
# status: "draft",
|
|
1991
2011
|
# limit: 1000000,
|
|
1992
2012
|
# offset: 1000000
|
|
1993
2013
|
# )
|
|
1994
2014
|
#
|
|
1995
|
-
# @return [Schematic::Billing::Types::
|
|
1996
|
-
def
|
|
2015
|
+
# @return [Schematic::Billing::Types::CountBillingInvoicesResponse]
|
|
2016
|
+
def count_billing_invoices(request_options: {}, **params)
|
|
1997
2017
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
1998
2018
|
query_params = {}
|
|
1999
2019
|
query_params["company_id"] = params[:company_id] if params.key?(:company_id)
|
|
2000
2020
|
query_params["contract_id"] = params[:contract_id] if params.key?(:contract_id)
|
|
2001
2021
|
query_params["document_state"] = params[:document_state] if params.key?(:document_state)
|
|
2022
|
+
query_params["past_due"] = params[:past_due] if params.key?(:past_due)
|
|
2023
|
+
query_params["provider_type"] = params[:provider_type] if params.key?(:provider_type)
|
|
2024
|
+
query_params["q"] = params[:q] if params.key?(:q)
|
|
2025
|
+
query_params["status"] = params[:status] if params.key?(:status)
|
|
2002
2026
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
2003
2027
|
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
2004
2028
|
|
|
@@ -2016,7 +2040,7 @@ module Schematic
|
|
|
2016
2040
|
end
|
|
2017
2041
|
code = response.code.to_i
|
|
2018
2042
|
if code.between?(200, 299)
|
|
2019
|
-
(response.body.to_s.empty? ? nil : Schematic::Billing::Types::
|
|
2043
|
+
(response.body.to_s.empty? ? nil : Schematic::Billing::Types::CountBillingInvoicesResponse.load(response.body))
|
|
2020
2044
|
else
|
|
2021
2045
|
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
2022
2046
|
error_types = {
|
|
@@ -4,7 +4,7 @@ module Schematic
|
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
6
|
# Input parameters
|
|
7
|
-
class
|
|
7
|
+
class CountBillingInvoicesParams < Internal::Types::Model
|
|
8
8
|
field :company_id, -> { String }, optional: true, nullable: false
|
|
9
9
|
|
|
10
10
|
field :contract_id, -> { String }, optional: true, nullable: false
|
|
@@ -14,6 +14,14 @@ module Schematic
|
|
|
14
14
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
15
15
|
|
|
16
16
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :past_due, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
19
|
+
|
|
20
|
+
field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
21
|
+
|
|
22
|
+
field :q, -> { String }, optional: true, nullable: false
|
|
23
|
+
|
|
24
|
+
field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false
|
|
17
25
|
end
|
|
18
26
|
end
|
|
19
27
|
end
|
|
@@ -3,13 +3,21 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
|
-
class
|
|
6
|
+
class CountBillingInvoicesRequest < Internal::Types::Model
|
|
7
7
|
field :company_id, -> { String }, optional: true, nullable: false
|
|
8
8
|
|
|
9
9
|
field :contract_id, -> { String }, optional: true, nullable: false
|
|
10
10
|
|
|
11
11
|
field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false
|
|
12
12
|
|
|
13
|
+
field :past_due, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :q, -> { String }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false
|
|
20
|
+
|
|
13
21
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
14
22
|
|
|
15
23
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
|
-
class
|
|
6
|
+
class CountBillingInvoicesResponse < Internal::Types::Model
|
|
7
7
|
field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false
|
|
8
8
|
|
|
9
|
-
field :params, -> { Schematic::Billing::Types::
|
|
9
|
+
field :params, -> { Schematic::Billing::Types::CountBillingInvoicesParams }, optional: false, nullable: false
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
end
|
|
@@ -22,6 +22,8 @@ module Schematic
|
|
|
22
22
|
|
|
23
23
|
field :card_last_4, -> { String }, optional: true, nullable: false, api_name: "card_last4"
|
|
24
24
|
|
|
25
|
+
field :customer_billing_details, -> { Schematic::Types::PaymentMethodBillingDetailsRequestBody }, optional: true, nullable: false
|
|
26
|
+
|
|
25
27
|
field :customer_external_id, -> { String }, optional: false, nullable: false
|
|
26
28
|
|
|
27
29
|
field :external_id, -> { String }, optional: false, nullable: false
|
data/lib/schematic/billing/types/{get_native_invoice_response.rb → get_billing_invoice_response.rb}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
|
-
class
|
|
6
|
+
class GetBillingInvoiceResponse < Internal::Types::Model
|
|
7
7
|
field :data, -> { Schematic::Types::BillingInvoiceDetailResponseData }, optional: false, nullable: false
|
|
8
8
|
|
|
9
9
|
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
data/lib/schematic/billing/types/{list_native_invoices_params.rb → list_billing_invoices_params.rb}
RENAMED
|
@@ -4,7 +4,7 @@ module Schematic
|
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
6
|
# Input parameters
|
|
7
|
-
class
|
|
7
|
+
class ListBillingInvoicesParams < Internal::Types::Model
|
|
8
8
|
field :company_id, -> { String }, optional: true, nullable: false
|
|
9
9
|
|
|
10
10
|
field :contract_id, -> { String }, optional: true, nullable: false
|
|
@@ -14,6 +14,14 @@ module Schematic
|
|
|
14
14
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
15
15
|
|
|
16
16
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :past_due, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
19
|
+
|
|
20
|
+
field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
21
|
+
|
|
22
|
+
field :q, -> { String }, optional: true, nullable: false
|
|
23
|
+
|
|
24
|
+
field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false
|
|
17
25
|
end
|
|
18
26
|
end
|
|
19
27
|
end
|
|
@@ -3,13 +3,21 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
|
-
class
|
|
6
|
+
class ListBillingInvoicesRequest < Internal::Types::Model
|
|
7
7
|
field :company_id, -> { String }, optional: true, nullable: false
|
|
8
8
|
|
|
9
9
|
field :contract_id, -> { String }, optional: true, nullable: false
|
|
10
10
|
|
|
11
11
|
field :document_state, -> { Schematic::Types::InvoiceDocumentState }, optional: true, nullable: false
|
|
12
12
|
|
|
13
|
+
field :past_due, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :q, -> { String }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false
|
|
20
|
+
|
|
13
21
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
14
22
|
|
|
15
23
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
|
-
class
|
|
6
|
+
class ListBillingInvoicesResponse < Internal::Types::Model
|
|
7
7
|
field :data, -> { Internal::Types::Array[Schematic::Types::BillingInvoiceResponseData] }, optional: false, nullable: false
|
|
8
8
|
|
|
9
|
-
field :params, -> { Schematic::Billing::Types::
|
|
9
|
+
field :params, -> { Schematic::Billing::Types::ListBillingInvoicesParams }, optional: false, nullable: false
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Schematic
|
|
4
4
|
module Billing
|
|
5
5
|
module Types
|
|
6
|
-
class
|
|
6
|
+
class MarkBillingInvoicePaidResponse < Internal::Types::Model
|
|
7
7
|
field :data, -> { Schematic::Types::BillingInvoiceDetailResponseData }, optional: false, nullable: false
|
|
8
8
|
|
|
9
9
|
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|