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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52c3520cf93bf33b5709b843536791c05f1f79cde2521fed583179802ea01a13
|
|
4
|
+
data.tar.gz: b321618dcbe10659189f72554ee428638e022fc8afb044a11cc87fc59c441624
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3c953562cb84790a3bd211f88eac886330a71e20c2d83d815a5216883a6eade2981e34df357c923dd9bae64571203600528855b747df3798e7e1d11ef9051b8
|
|
7
|
+
data.tar.gz: 2c3cead033c8c600ef24f886541fa8102b6cff15299aef884225f58e292793eedb356305ebc5c80fc0cdd4f5288ddd1cd33b29dca4284a999a1e904a25129bb9
|
data/.fern/metadata.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cliVersion": "
|
|
2
|
+
"cliVersion": "5.6.0",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
4
|
"generatorVersion": "1.1.13",
|
|
5
5
|
"generatorConfig": {
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"webrick": ">= 1.0"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"originGitCommit": "
|
|
17
|
-
"sdkVersion": "1.4.
|
|
16
|
+
"originGitCommit": "a3057c10aa6a1daa708dc714c89ce943f67a722a",
|
|
17
|
+
"sdkVersion": "1.4.3"
|
|
18
18
|
}
|
data/.fern/replay.lock
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# DO NOT EDIT MANUALLY - Managed by Fern Replay
|
|
2
|
+
version: "1.0"
|
|
3
|
+
generations:
|
|
4
|
+
- commit_sha: 298b1d0ee88b6637d99742bff32b353cfbd5b32e
|
|
5
|
+
tree_hash: 5e94ea993931a768a9df010fe0bccdf52d154846
|
|
6
|
+
timestamp: 2026-05-19T19:48:36.665Z
|
|
7
|
+
cli_version: unknown
|
|
8
|
+
generator_versions: {}
|
|
9
|
+
current_generation: 298b1d0ee88b6637d99742bff32b353cfbd5b32e
|
|
10
|
+
patches: []
|
data/.fernignore
CHANGED
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Schematic Ruby SDK
|
|
2
2
|
|
|
3
3
|
## Installation and Setup
|
|
4
4
|
|
|
@@ -127,7 +127,7 @@ client = Schematic::SchematicClient.new(
|
|
|
127
127
|
client.close
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
You can also adjust the log level of the built-in console logger:
|
|
130
|
+
You can also adjust the log level of the built-in console logger via the `log_level` option:
|
|
131
131
|
|
|
132
132
|
```ruby
|
|
133
133
|
require "schematichq"
|
|
@@ -135,11 +135,11 @@ require "schematichq"
|
|
|
135
135
|
api_key = ENV["SCHEMATIC_API_KEY"]
|
|
136
136
|
client = Schematic::SchematicClient.new(
|
|
137
137
|
api_key: api_key,
|
|
138
|
-
|
|
138
|
+
log_level: :debug
|
|
139
139
|
)
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
If no logger is provided, the client will use a default console logger at the `:
|
|
142
|
+
If no logger is provided, the client will use a default console logger at the `:warn` level that outputs to stderr. The `log_level` option only applies to this built-in logger; when you supply your own `logger`, its level is left untouched.
|
|
143
143
|
|
|
144
144
|
## Usage Examples
|
|
145
145
|
|
|
@@ -216,6 +216,36 @@ client.track({
|
|
|
216
216
|
})
|
|
217
217
|
```
|
|
218
218
|
|
|
219
|
+
#### Event options
|
|
220
|
+
|
|
221
|
+
Both `track` and `identify` accept an `options:` keyword for optional event metadata. Only fields you set are sent.
|
|
222
|
+
|
|
223
|
+
```ruby
|
|
224
|
+
client.track(
|
|
225
|
+
{ event: "query-tokens", company: { "id" => "your-company-id" }, quantity: 1500 },
|
|
226
|
+
options: {
|
|
227
|
+
# Dedupe key. Duplicate events with the same key are dropped
|
|
228
|
+
# server-side for 24 hours.
|
|
229
|
+
idempotency_key: "evt_2026_05_21_query_tokens",
|
|
230
|
+
# Timestamp the event occurred (Time or ISO 8601 String). Required
|
|
231
|
+
# when trusted_client_clock is true.
|
|
232
|
+
sent_at: Time.now.utc,
|
|
233
|
+
# Use sent_at as the effective event time instead of server receipt
|
|
234
|
+
# time. Requires a secret API key and sent_at.
|
|
235
|
+
trusted_client_clock: true,
|
|
236
|
+
# Import historical data without affecting billing. Requires a secret
|
|
237
|
+
# API key and trusted_client_clock.
|
|
238
|
+
backfill: false
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
client.identify(
|
|
243
|
+
{ keys: { "user_id" => "your-user-id" }, name: "Wile E. Coyote" },
|
|
244
|
+
# identify only supports idempotency_key.
|
|
245
|
+
options: { idempotency_key: "ident_your-user-id" }
|
|
246
|
+
)
|
|
247
|
+
```
|
|
248
|
+
|
|
219
249
|
### Creating and updating companies
|
|
220
250
|
|
|
221
251
|
Although it is faster to create companies and users via identify events, if you need to handle a response, you can use the companies API to upsert companies. Because you use your own identifiers to identify companies, rather than a Schematic company ID, creating and updating companies are both done via the same upsert operation:
|
data/WASM_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.2.0
|
|
@@ -442,6 +442,38 @@ module Schematic
|
|
|
442
442
|
end
|
|
443
443
|
end
|
|
444
444
|
|
|
445
|
+
# @param request_options [Hash]
|
|
446
|
+
# @param params [Hash]
|
|
447
|
+
# @option request_options [String] :base_url
|
|
448
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
449
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
450
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
451
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
452
|
+
# @option params [String] :billing_id
|
|
453
|
+
#
|
|
454
|
+
# @return [Schematic::Billing::Types::DeletePaymentMethodByExternalIdResponse]
|
|
455
|
+
def delete_payment_method_by_external_id(request_options: {}, **params)
|
|
456
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
457
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
458
|
+
base_url: request_options[:base_url],
|
|
459
|
+
method: "DELETE",
|
|
460
|
+
path: "billing/payment-methods/#{URI.encode_uri_component(params[:billing_id].to_s)}",
|
|
461
|
+
request_options: request_options
|
|
462
|
+
)
|
|
463
|
+
begin
|
|
464
|
+
response = @client.send(request)
|
|
465
|
+
rescue Net::HTTPRequestTimeout
|
|
466
|
+
raise Schematic::Errors::TimeoutError
|
|
467
|
+
end
|
|
468
|
+
code = response.code.to_i
|
|
469
|
+
if code.between?(200, 299)
|
|
470
|
+
Schematic::Billing::Types::DeletePaymentMethodByExternalIdResponse.load(response.body)
|
|
471
|
+
else
|
|
472
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
473
|
+
raise error_class.new(response.body, code: code)
|
|
474
|
+
end
|
|
475
|
+
end
|
|
476
|
+
|
|
445
477
|
# @param request_options [Hash]
|
|
446
478
|
# @param params [Hash]
|
|
447
479
|
# @option request_options [String] :base_url
|
|
@@ -719,6 +751,7 @@ module Schematic
|
|
|
719
751
|
# @option params [Schematic::Types::BillingPriceUsageType, nil] :price_usage_type
|
|
720
752
|
# @option params [Schematic::Types::BillingProviderType, nil] :provider_type
|
|
721
753
|
# @option params [String, nil] :q
|
|
754
|
+
# @option params [Boolean, nil] :recurring_charges_only
|
|
722
755
|
# @option params [Boolean, nil] :with_one_time_charges
|
|
723
756
|
# @option params [Boolean, nil] :with_prices_only
|
|
724
757
|
# @option params [Boolean, nil] :with_zero_price
|
|
@@ -729,7 +762,7 @@ module Schematic
|
|
|
729
762
|
# @return [Schematic::Billing::Types::ListBillingProductsResponse]
|
|
730
763
|
def list_billing_products(request_options: {}, **params)
|
|
731
764
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
732
|
-
query_param_names = %i[ids is_active name price_usage_type provider_type q with_one_time_charges with_prices_only with_zero_price without_linked_to_plan limit offset]
|
|
765
|
+
query_param_names = %i[ids is_active name price_usage_type provider_type q recurring_charges_only with_one_time_charges with_prices_only with_zero_price without_linked_to_plan limit offset]
|
|
733
766
|
query_params = {}
|
|
734
767
|
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
735
768
|
query_params["is_active"] = params[:is_active] if params.key?(:is_active)
|
|
@@ -737,6 +770,7 @@ module Schematic
|
|
|
737
770
|
query_params["price_usage_type"] = params[:price_usage_type] if params.key?(:price_usage_type)
|
|
738
771
|
query_params["provider_type"] = params[:provider_type] if params.key?(:provider_type)
|
|
739
772
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
773
|
+
query_params["recurring_charges_only"] = params[:recurring_charges_only] if params.key?(:recurring_charges_only)
|
|
740
774
|
query_params["with_one_time_charges"] = params[:with_one_time_charges] if params.key?(:with_one_time_charges)
|
|
741
775
|
query_params["with_prices_only"] = params[:with_prices_only] if params.key?(:with_prices_only)
|
|
742
776
|
query_params["with_zero_price"] = params[:with_zero_price] if params.key?(:with_zero_price)
|
|
@@ -779,6 +813,7 @@ module Schematic
|
|
|
779
813
|
# @option params [Schematic::Types::BillingPriceUsageType, nil] :price_usage_type
|
|
780
814
|
# @option params [Schematic::Types::BillingProviderType, nil] :provider_type
|
|
781
815
|
# @option params [String, nil] :q
|
|
816
|
+
# @option params [Boolean, nil] :recurring_charges_only
|
|
782
817
|
# @option params [Boolean, nil] :with_one_time_charges
|
|
783
818
|
# @option params [Boolean, nil] :with_prices_only
|
|
784
819
|
# @option params [Boolean, nil] :with_zero_price
|
|
@@ -789,7 +824,7 @@ module Schematic
|
|
|
789
824
|
# @return [Schematic::Billing::Types::CountBillingProductsResponse]
|
|
790
825
|
def count_billing_products(request_options: {}, **params)
|
|
791
826
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
792
|
-
query_param_names = %i[ids is_active name price_usage_type provider_type q with_one_time_charges with_prices_only with_zero_price without_linked_to_plan limit offset]
|
|
827
|
+
query_param_names = %i[ids is_active name price_usage_type provider_type q recurring_charges_only with_one_time_charges with_prices_only with_zero_price without_linked_to_plan limit offset]
|
|
793
828
|
query_params = {}
|
|
794
829
|
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
795
830
|
query_params["is_active"] = params[:is_active] if params.key?(:is_active)
|
|
@@ -797,6 +832,7 @@ module Schematic
|
|
|
797
832
|
query_params["price_usage_type"] = params[:price_usage_type] if params.key?(:price_usage_type)
|
|
798
833
|
query_params["provider_type"] = params[:provider_type] if params.key?(:provider_type)
|
|
799
834
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
835
|
+
query_params["recurring_charges_only"] = params[:recurring_charges_only] if params.key?(:recurring_charges_only)
|
|
800
836
|
query_params["with_one_time_charges"] = params[:with_one_time_charges] if params.key?(:with_one_time_charges)
|
|
801
837
|
query_params["with_prices_only"] = params[:with_prices_only] if params.key?(:with_prices_only)
|
|
802
838
|
query_params["with_zero_price"] = params[:with_zero_price] if params.key?(:with_zero_price)
|
|
@@ -13,6 +13,7 @@ module Schematic
|
|
|
13
13
|
field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false
|
|
14
14
|
field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
15
15
|
field :q, -> { String }, optional: true, nullable: false
|
|
16
|
+
field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
16
17
|
field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
17
18
|
field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
18
19
|
field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -10,6 +10,7 @@ module Schematic
|
|
|
10
10
|
field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false
|
|
11
11
|
field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
12
12
|
field :q, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
13
14
|
field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
15
|
field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
15
16
|
field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -8,6 +8,7 @@ module Schematic
|
|
|
8
8
|
field :currency, -> { String }, optional: false, nullable: false
|
|
9
9
|
field :external_account_id, -> { String }, optional: false, nullable: false
|
|
10
10
|
field :interval, -> { String }, optional: false, nullable: false
|
|
11
|
+
field :interval_count, -> { Integer }, optional: true, nullable: false
|
|
11
12
|
field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
12
13
|
field :meter_id, -> { String }, optional: true, nullable: false
|
|
13
14
|
field :nickname, -> { String }, optional: true, nullable: false
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Billing
|
|
5
|
+
module Types
|
|
6
|
+
class DeletePaymentMethodByExternalIdResponse < 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
|
|
@@ -13,6 +13,7 @@ module Schematic
|
|
|
13
13
|
field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false
|
|
14
14
|
field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
15
15
|
field :q, -> { String }, optional: true, nullable: false
|
|
16
|
+
field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
16
17
|
field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
17
18
|
field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
18
19
|
field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -10,6 +10,7 @@ module Schematic
|
|
|
10
10
|
field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false
|
|
11
11
|
field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
|
|
12
12
|
field :q, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
13
14
|
field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
15
|
field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
15
16
|
field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
data/lib/schematic/client.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Schematic
|
|
|
10
10
|
@raw_client = Schematic::Internal::Http::RawClient.new(
|
|
11
11
|
base_url: base_url || Schematic::Environment::DEFAULT,
|
|
12
12
|
headers: {
|
|
13
|
-
"User-Agent" => "schematichq/1.4.
|
|
13
|
+
"User-Agent" => "schematichq/1.4.3",
|
|
14
14
|
"X-Fern-Language" => "Ruby",
|
|
15
15
|
"X-Schematic-Api-Key" => api_key.to_s
|
|
16
16
|
}
|
|
@@ -57,6 +57,11 @@ module Schematic
|
|
|
57
57
|
@components ||= Schematic::Components::Client.new(client: @raw_client)
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
+
# @return [Schematic::Planbundle::Client]
|
|
61
|
+
def planbundle
|
|
62
|
+
@planbundle ||= Schematic::Planbundle::Client.new(client: @raw_client)
|
|
63
|
+
end
|
|
64
|
+
|
|
60
65
|
# @return [Schematic::Dataexports::Client]
|
|
61
66
|
def dataexports
|
|
62
67
|
@dataexports ||= Schematic::Dataexports::Client.new(client: @raw_client)
|
|
@@ -82,11 +87,6 @@ module Schematic
|
|
|
82
87
|
@integrationsapi ||= Schematic::Integrationsapi::Client.new(client: @raw_client)
|
|
83
88
|
end
|
|
84
89
|
|
|
85
|
-
# @return [Schematic::Planbundle::Client]
|
|
86
|
-
def planbundle
|
|
87
|
-
@planbundle ||= Schematic::Planbundle::Client.new(client: @raw_client)
|
|
88
|
-
end
|
|
89
|
-
|
|
90
90
|
# @return [Schematic::Plangroups::Client]
|
|
91
91
|
def plangroups
|
|
92
92
|
@plangroups ||= Schematic::Plangroups::Client.new(client: @raw_client)
|
|
@@ -24,6 +24,7 @@ module Schematic
|
|
|
24
24
|
# @option params [String, nil] :plan_id
|
|
25
25
|
# @option params [String, nil] :plan_ids
|
|
26
26
|
# @option params [String, nil] :plan_version_id
|
|
27
|
+
# @option params [String, nil] :plan_version_ids
|
|
27
28
|
# @option params [String, nil] :q
|
|
28
29
|
# @option params [String, nil] :sort_order_column
|
|
29
30
|
# @option params [Schematic::Types::SortDirection, nil] :sort_order_direction
|
|
@@ -40,7 +41,7 @@ module Schematic
|
|
|
40
41
|
# @return [Schematic::Companies::Types::ListCompaniesResponse]
|
|
41
42
|
def list_companies(request_options: {}, **params)
|
|
42
43
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
43
|
-
query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset]
|
|
44
|
+
query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id plan_version_ids q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset]
|
|
44
45
|
query_params = {}
|
|
45
46
|
query_params["credit_type_ids"] = params[:credit_type_ids] if params.key?(:credit_type_ids)
|
|
46
47
|
query_params["has_scheduled_downgrade"] = params[:has_scheduled_downgrade] if params.key?(:has_scheduled_downgrade)
|
|
@@ -49,6 +50,7 @@ module Schematic
|
|
|
49
50
|
query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id)
|
|
50
51
|
query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids)
|
|
51
52
|
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
53
|
+
query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids)
|
|
52
54
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
53
55
|
query_params["sort_order_column"] = params[:sort_order_column] if params.key?(:sort_order_column)
|
|
54
56
|
query_params["sort_order_direction"] = params[:sort_order_direction] if params.key?(:sort_order_direction)
|
|
@@ -203,6 +205,7 @@ module Schematic
|
|
|
203
205
|
# @option params [String, nil] :plan_id
|
|
204
206
|
# @option params [String, nil] :plan_ids
|
|
205
207
|
# @option params [String, nil] :plan_version_id
|
|
208
|
+
# @option params [String, nil] :plan_version_ids
|
|
206
209
|
# @option params [String, nil] :q
|
|
207
210
|
# @option params [String, nil] :sort_order_column
|
|
208
211
|
# @option params [Schematic::Types::SortDirection, nil] :sort_order_direction
|
|
@@ -219,7 +222,7 @@ module Schematic
|
|
|
219
222
|
# @return [Schematic::Companies::Types::CountCompaniesResponse]
|
|
220
223
|
def count_companies(request_options: {}, **params)
|
|
221
224
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
222
|
-
query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset]
|
|
225
|
+
query_param_names = %i[credit_type_ids has_scheduled_downgrade ids monetized_subscriptions plan_id plan_ids plan_version_id plan_version_ids q sort_order_column sort_order_direction subscription_statuses subscription_types with_entitlement_for without_feature_override_for without_plan without_subscription with_subscription limit offset]
|
|
223
226
|
query_params = {}
|
|
224
227
|
query_params["credit_type_ids"] = params[:credit_type_ids] if params.key?(:credit_type_ids)
|
|
225
228
|
query_params["has_scheduled_downgrade"] = params[:has_scheduled_downgrade] if params.key?(:has_scheduled_downgrade)
|
|
@@ -228,6 +231,7 @@ module Schematic
|
|
|
228
231
|
query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id)
|
|
229
232
|
query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids)
|
|
230
233
|
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
234
|
+
query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids)
|
|
231
235
|
query_params["q"] = params[:q] if params.key?(:q)
|
|
232
236
|
query_params["sort_order_column"] = params[:sort_order_column] if params.key?(:sort_order_column)
|
|
233
237
|
query_params["sort_order_direction"] = params[:sort_order_direction] if params.key?(:sort_order_direction)
|
|
@@ -14,6 +14,7 @@ module Schematic
|
|
|
14
14
|
field :plan_id, -> { String }, optional: true, nullable: false
|
|
15
15
|
field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
16
16
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
17
|
+
field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
17
18
|
field :q, -> { String }, optional: true, nullable: false
|
|
18
19
|
field :sort_order_column, -> { String }, optional: true, nullable: false
|
|
19
20
|
field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false
|
|
@@ -11,6 +11,7 @@ module Schematic
|
|
|
11
11
|
field :plan_id, -> { String }, optional: true, nullable: false
|
|
12
12
|
field :plan_ids, -> { String }, optional: true, nullable: false
|
|
13
13
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :plan_version_ids, -> { String }, optional: true, nullable: false
|
|
14
15
|
field :q, -> { String }, optional: true, nullable: false
|
|
15
16
|
field :sort_order_column, -> { String }, optional: true, nullable: false
|
|
16
17
|
field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false
|
|
@@ -14,6 +14,7 @@ module Schematic
|
|
|
14
14
|
field :plan_id, -> { String }, optional: true, nullable: false
|
|
15
15
|
field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
16
16
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
17
|
+
field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
17
18
|
field :q, -> { String }, optional: true, nullable: false
|
|
18
19
|
field :sort_order_column, -> { String }, optional: true, nullable: false
|
|
19
20
|
field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false
|
|
@@ -11,6 +11,7 @@ module Schematic
|
|
|
11
11
|
field :plan_id, -> { String }, optional: true, nullable: false
|
|
12
12
|
field :plan_ids, -> { String }, optional: true, nullable: false
|
|
13
13
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :plan_version_ids, -> { String }, optional: true, nullable: false
|
|
14
15
|
field :q, -> { String }, optional: true, nullable: false
|
|
15
16
|
field :sort_order_column, -> { String }, optional: true, nullable: false
|
|
16
17
|
field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false
|
|
@@ -747,6 +747,108 @@ module Schematic
|
|
|
747
747
|
end
|
|
748
748
|
end
|
|
749
749
|
|
|
750
|
+
# @param request_options [Hash]
|
|
751
|
+
# @param params [Schematic::Credits::Types::AcquireCreditLeaseRequestBody]
|
|
752
|
+
# @option request_options [String] :base_url
|
|
753
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
754
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
755
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
756
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
757
|
+
#
|
|
758
|
+
# @return [Schematic::Credits::Types::AcquireCreditLeaseResponse]
|
|
759
|
+
def acquire_credit_lease(request_options: {}, **params)
|
|
760
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
761
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
762
|
+
base_url: request_options[:base_url],
|
|
763
|
+
method: "POST",
|
|
764
|
+
path: "billing/credits/lease",
|
|
765
|
+
body: Schematic::Credits::Types::AcquireCreditLeaseRequestBody.new(params).to_h,
|
|
766
|
+
request_options: request_options
|
|
767
|
+
)
|
|
768
|
+
begin
|
|
769
|
+
response = @client.send(request)
|
|
770
|
+
rescue Net::HTTPRequestTimeout
|
|
771
|
+
raise Schematic::Errors::TimeoutError
|
|
772
|
+
end
|
|
773
|
+
code = response.code.to_i
|
|
774
|
+
if code.between?(200, 299)
|
|
775
|
+
Schematic::Credits::Types::AcquireCreditLeaseResponse.load(response.body)
|
|
776
|
+
else
|
|
777
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
778
|
+
raise error_class.new(response.body, code: code)
|
|
779
|
+
end
|
|
780
|
+
end
|
|
781
|
+
|
|
782
|
+
# @param request_options [Hash]
|
|
783
|
+
# @param params [Schematic::Credits::Types::ExtendCreditLeaseRequestBody]
|
|
784
|
+
# @option request_options [String] :base_url
|
|
785
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
786
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
787
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
788
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
789
|
+
# @option params [String] :lease_id
|
|
790
|
+
#
|
|
791
|
+
# @return [Schematic::Credits::Types::ExtendCreditLeaseResponse]
|
|
792
|
+
def extend_credit_lease(request_options: {}, **params)
|
|
793
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
794
|
+
request_data = Schematic::Credits::Types::ExtendCreditLeaseRequestBody.new(params).to_h
|
|
795
|
+
non_body_param_names = ["lease_id"]
|
|
796
|
+
body = request_data.except(*non_body_param_names)
|
|
797
|
+
|
|
798
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
799
|
+
base_url: request_options[:base_url],
|
|
800
|
+
method: "PUT",
|
|
801
|
+
path: "billing/credits/lease/#{URI.encode_uri_component(params[:lease_id].to_s)}/extend",
|
|
802
|
+
body: body,
|
|
803
|
+
request_options: request_options
|
|
804
|
+
)
|
|
805
|
+
begin
|
|
806
|
+
response = @client.send(request)
|
|
807
|
+
rescue Net::HTTPRequestTimeout
|
|
808
|
+
raise Schematic::Errors::TimeoutError
|
|
809
|
+
end
|
|
810
|
+
code = response.code.to_i
|
|
811
|
+
if code.between?(200, 299)
|
|
812
|
+
Schematic::Credits::Types::ExtendCreditLeaseResponse.load(response.body)
|
|
813
|
+
else
|
|
814
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
815
|
+
raise error_class.new(response.body, code: code)
|
|
816
|
+
end
|
|
817
|
+
end
|
|
818
|
+
|
|
819
|
+
# @param request_options [Hash]
|
|
820
|
+
# @param params [Schematic::Types::ReleaseCreditLeaseRequestBody]
|
|
821
|
+
# @option request_options [String] :base_url
|
|
822
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
823
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
824
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
825
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
826
|
+
# @option params [String] :lease_id
|
|
827
|
+
#
|
|
828
|
+
# @return [Schematic::Credits::Types::ReleaseCreditLeaseResponse]
|
|
829
|
+
def release_credit_lease(request_options: {}, **params)
|
|
830
|
+
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
831
|
+
request = Schematic::Internal::JSON::Request.new(
|
|
832
|
+
base_url: request_options[:base_url],
|
|
833
|
+
method: "PUT",
|
|
834
|
+
path: "billing/credits/lease/#{URI.encode_uri_component(params[:lease_id].to_s)}/release",
|
|
835
|
+
body: params,
|
|
836
|
+
request_options: request_options
|
|
837
|
+
)
|
|
838
|
+
begin
|
|
839
|
+
response = @client.send(request)
|
|
840
|
+
rescue Net::HTTPRequestTimeout
|
|
841
|
+
raise Schematic::Errors::TimeoutError
|
|
842
|
+
end
|
|
843
|
+
code = response.code.to_i
|
|
844
|
+
if code.between?(200, 299)
|
|
845
|
+
Schematic::Credits::Types::ReleaseCreditLeaseResponse.load(response.body)
|
|
846
|
+
else
|
|
847
|
+
error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
|
|
848
|
+
raise error_class.new(response.body, code: code)
|
|
849
|
+
end
|
|
850
|
+
end
|
|
851
|
+
|
|
750
852
|
# @param request_options [Hash]
|
|
751
853
|
# @param params [Hash]
|
|
752
854
|
# @option request_options [String] :base_url
|
|
@@ -863,19 +965,21 @@ module Schematic
|
|
|
863
965
|
# @option params [String, nil] :plan_id
|
|
864
966
|
# @option params [String, nil] :plan_ids
|
|
865
967
|
# @option params [String, nil] :plan_version_id
|
|
968
|
+
# @option params [String, nil] :plan_version_ids
|
|
866
969
|
# @option params [Integer, nil] :limit
|
|
867
970
|
# @option params [Integer, nil] :offset
|
|
868
971
|
#
|
|
869
972
|
# @return [Schematic::Credits::Types::ListBillingPlanCreditGrantsResponse]
|
|
870
973
|
def list_billing_plan_credit_grants(request_options: {}, **params)
|
|
871
974
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
872
|
-
query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id limit offset]
|
|
975
|
+
query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id plan_version_ids limit offset]
|
|
873
976
|
query_params = {}
|
|
874
977
|
query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id)
|
|
875
978
|
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
876
979
|
query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id)
|
|
877
980
|
query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids)
|
|
878
981
|
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
982
|
+
query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids)
|
|
879
983
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
880
984
|
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
881
985
|
params.except(*query_param_names)
|
|
@@ -1049,19 +1153,21 @@ module Schematic
|
|
|
1049
1153
|
# @option params [String, nil] :plan_id
|
|
1050
1154
|
# @option params [String, nil] :plan_ids
|
|
1051
1155
|
# @option params [String, nil] :plan_version_id
|
|
1156
|
+
# @option params [String, nil] :plan_version_ids
|
|
1052
1157
|
# @option params [Integer, nil] :limit
|
|
1053
1158
|
# @option params [Integer, nil] :offset
|
|
1054
1159
|
#
|
|
1055
1160
|
# @return [Schematic::Credits::Types::CountBillingPlanCreditGrantsResponse]
|
|
1056
1161
|
def count_billing_plan_credit_grants(request_options: {}, **params)
|
|
1057
1162
|
params = Schematic::Internal::Types::Utils.normalize_keys(params)
|
|
1058
|
-
query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id limit offset]
|
|
1163
|
+
query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id plan_version_ids limit offset]
|
|
1059
1164
|
query_params = {}
|
|
1060
1165
|
query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id)
|
|
1061
1166
|
query_params["ids"] = params[:ids] if params.key?(:ids)
|
|
1062
1167
|
query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id)
|
|
1063
1168
|
query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids)
|
|
1064
1169
|
query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id)
|
|
1170
|
+
query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids)
|
|
1065
1171
|
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
1066
1172
|
query_params["offset"] = params[:offset] if params.key?(:offset)
|
|
1067
1173
|
params.except(*query_param_names)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Credits
|
|
5
|
+
module Types
|
|
6
|
+
class AcquireCreditLeaseRequestBody < Internal::Types::Model
|
|
7
|
+
field :company_id, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :credit_type_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :expires_at, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :requested_amount, -> { Integer }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Credits
|
|
5
|
+
module Types
|
|
6
|
+
class AcquireCreditLeaseResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::CreditLeaseResponseData }, optional: false, nullable: false
|
|
8
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -12,6 +12,7 @@ module Schematic
|
|
|
12
12
|
field :plan_id, -> { String }, optional: true, nullable: false
|
|
13
13
|
field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
14
14
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
15
|
+
field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
end
|
|
@@ -9,6 +9,7 @@ module Schematic
|
|
|
9
9
|
field :plan_id, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :plan_ids, -> { String }, optional: true, nullable: false
|
|
11
11
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :plan_version_ids, -> { String }, optional: true, nullable: false
|
|
12
13
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
13
14
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
14
15
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Schematic
|
|
4
|
+
module Credits
|
|
5
|
+
module Types
|
|
6
|
+
class ExtendCreditLeaseRequestBody < Internal::Types::Model
|
|
7
|
+
field :lease_id, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :additional_amount, -> { Integer }, optional: false, nullable: false
|
|
9
|
+
field :expires_at, -> { String }, 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 Credits
|
|
5
|
+
module Types
|
|
6
|
+
class ExtendCreditLeaseResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Schematic::Types::CreditLeaseResponseData }, optional: false, nullable: false
|
|
8
|
+
field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -12,6 +12,7 @@ module Schematic
|
|
|
12
12
|
field :plan_id, -> { String }, optional: true, nullable: false
|
|
13
13
|
field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
14
14
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
15
|
+
field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
end
|
|
@@ -9,6 +9,7 @@ module Schematic
|
|
|
9
9
|
field :plan_id, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :plan_ids, -> { String }, optional: true, nullable: false
|
|
11
11
|
field :plan_version_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :plan_version_ids, -> { String }, optional: true, nullable: false
|
|
12
13
|
field :limit, -> { Integer }, optional: true, nullable: false
|
|
13
14
|
field :offset, -> { Integer }, optional: true, nullable: false
|
|
14
15
|
end
|