diff --git a/.fern/metadata.json b/.fern/metadata.json index f781251..121f216 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { "cliVersion": "5.50.0", "generatorName": "fernapi/fern-ruby-sdk", - "generatorVersion": "1.1.13", + "generatorVersion": "1.23.2", "generatorConfig": { "module": "SchematicHQ", "rubocopVariableNumberStyle": "disabled", @@ -13,6 +13,10 @@ "webrick": ">= 1.0" } }, - "originGitCommit": "1ab5d36abb4de887dde605f8b82a71dce464a26b", - "sdkVersion": "1.4.14" + "originGitCommit": "008b7147a27272499bf4b17fa96d4357ca3b62e9", + "originGitCommitIsDirty": false, + "invokedBy": "ci", + "requestedVersion": "1.4.15", + "ciProvider": "github", + "sdkVersion": "1.4.15" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock index 6deee73..baa374d 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -66,14 +66,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-ruby-sdk: 1.1.13 -current_generation: 25497874a46bed5955dc9fcb6effc4d6bfafea9b + - commit_sha: a8692cf0b5fbf1bf984d1f70375e08731b5f5482 + tree_hash: b3208580fd2babfc4431a917eba5d5028c22d74e + timestamp: 2026-08-24T10:14:16.401Z + cli_version: unknown + generator_versions: + fernapi/fern-ruby-sdk: 1.23.2 +current_generation: a8692cf0b5fbf1bf984d1f70375e08731b5f5482 patches: - id: patch-5da692c2 content_hash: sha256:e652287219a0a709e16112ced444e6472c6fa8bdfe888edf868caaf9769a9472 original_commit: 5da692c20aef08577d900f9a860b5f78a549418e original_message: inject host time into datastream wasm rules engine (SCHY-471) original_author: Christopher Brady - base_generation: 25497874a46bed5955dc9fcb6effc4d6bfafea9b + base_generation: a8692cf0b5fbf1bf984d1f70375e08731b5f5482 files: - test/rules_engine_clock_test.rb patch_content: | @@ -241,7 +247,7 @@ patches: original_commit: ee61788c5a83fce5dd5768b2536391459550d176 original_message: fix rubocop offenses in clock regression test (SCHY-471) original_author: Christopher Brady - base_generation: 25497874a46bed5955dc9fcb6effc4d6bfafea9b + base_generation: a8692cf0b5fbf1bf984d1f70375e08731b5f5482 files: - test/rules_engine_clock_test.rb patch_content: | diff --git a/.rubocop.yml b/.rubocop.yml index a5beac5..ff76b83 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -64,6 +64,39 @@ Style/FrozenStringLiteralComment: Exclude: - "dynamic-snippets/**/*" +# Indent hash elements 2 spaces from the start of the enclosing line rather than +# aligning with the preceding paren or bracket. Generated code nests hashes inside +# arrays and method calls; the "consistent" style is more readable there. Layout/FirstHashElementIndentation: + EnforcedStyle: consistent Exclude: - "dynamic-snippets/**/*" + +# Match Layout/FirstHashElementIndentation: indent the first argument 2 spaces +# from the start of the method call's line, regardless of parenthesis position. +# Dynamic snippets are code samples, not standalone Ruby files; exclude them to +# keep this config symmetric with Layout/FirstHashElementIndentation above. +Layout/FirstArgumentIndentation: + EnforcedStyle: consistent + Exclude: + - "dynamic-snippets/**/*" + +# The generator emits non-idiomatic class names (e.g. Get_With_Query, JSON_) +# derived from IR type names whose wire form contains underscores or digits. +# Rubocop never auto-corrected these (naming cops have no autocorrecter), so +# disabling the cop keeps CI green without changing customer output. Fixing at +# source would rename public types across every existing SDK and therefore +# requires a ruby-v2 major-version bump with a generator migration. +Naming/ClassAndModuleCamelCase: + Enabled: false + +# Integer literals are emitted unformatted (e.g. 1000000, not 1_000_000). +# Rubocop has an autocorrecter for this cop, but the only caller of integer +# emission is the dynamic-snippets path, which feeds customer-facing surfaces: +# (1) snippet markdown in reference docs, (2) dynamic-snippets/*.rb sample +# files. Neither is rubocop-gated (markdown isn't Ruby, dynamic-snippets/**/* +# is excluded above), so formatting integers there would change docs/dashboard +# output without any rubocop benefit. Disabling the cop keeps integers raw +# everywhere and avoids customer-visible diffs. +Style/NumericLiterals: + Enabled: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..95c10ea --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,120 @@ +# Contributing + +Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project. + +## Getting Started + +### Prerequisites + +- Ruby 3.0+ +- Bundler + +### Installation + +Install the project dependencies: + +```bash +bundle install +``` + +### Building + +Build the gem: + +```bash +gem build *.gemspec +``` + +### Testing + +Run the test suite: + +```bash +bundle exec rspec +``` + +### Linting and Formatting + +Check code style: + +```bash +bundle exec rubocop +``` + +Fix code style issues: + +```bash +bundle exec rubocop -a +``` + +## About Generated Code + +**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated. + +### Generated Files + +The following directories contain generated code: +- `lib/` - API client classes and types +- Most Ruby files in the project + +### How to Customize + +If you need to customize the SDK, you have two options: + +#### Option 1: Use `.fernignore` + +For custom code that should persist across SDK regenerations: + +1. Create a `.fernignore` file in the project root +2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax) +3. Add your custom code to those files + +Files listed in `.fernignore` will not be overwritten when the SDK is regenerated. + +For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code). + +#### Option 2: Contribute to the Generator + +If you want to change how code is generated for all users of this SDK: + +1. The Ruby SDK generator lives in the [Fern repository](https://github.com/fern-api/fern) +2. Generator code is located at `generators/ruby-v2/` +3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md) +4. Submit a pull request with your changes to the generator + +This approach is best for: +- Bug fixes in generated code +- New features that would benefit all users +- Improvements to code generation patterns + +## Making Changes + +### Workflow + +1. Create a new branch for your changes +2. Make your modifications +3. Run tests to ensure nothing breaks: `bundle exec rspec` +4. Run linting: `bundle exec rubocop` +5. Build the gem: `gem build *.gemspec` +6. Commit your changes with a clear commit message +7. Push your branch and create a pull request + +### Commit Messages + +Write clear, descriptive commit messages that explain what changed and why. + +### Code Style + +This project uses RuboCop for code formatting. Run `bundle exec rubocop` before committing to ensure your code meets the project's style guidelines. + +## Questions or Issues? + +If you have questions or run into issues: + +1. Check the [Fern documentation](https://buildwithfern.com) +2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues) +3. Open a new issue if your question hasn't been addressed + +## License + +By contributing to this project, you agree that your contributions will be licensed under the same license as the project. diff --git a/Gemfile b/Gemfile index 749b898..307c64f 100644 --- a/Gemfile +++ b/Gemfile @@ -5,18 +5,13 @@ source "https://rubygems.org" gemspec group :test, :development do - gem "rake", "~> 13.0" - gem "minitest", "~> 5.16" gem "minitest-rg" - + gem "pry" + gem "rake", "~> 13.0" gem "rubocop", "~> 1.21" gem "rubocop-minitest" - - gem "pry" - gem "webmock" - gem "webrick", ">= 1.0" end diff --git a/Gemfile.custom b/Gemfile.custom index 11bdfaf..6e90109 100644 --- a/Gemfile.custom +++ b/Gemfile.custom @@ -11,4 +11,4 @@ # gem 'custom-gem', '~> 2.0' # end -# Add your custom gem dependencies here \ No newline at end of file +# Add your custom gem dependencies here diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 7d6589c..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,100 +0,0 @@ -PATH - remote: . - specs: - schematichq (1.4.14) - wasmtime (>= 19.0) - websocket (>= 1.2) - -GEM - remote: https://rubygems.org/ - specs: - addressable (2.9.0) - public_suffix (>= 2.0.2, < 8.0) - ast (2.4.3) - bigdecimal (4.1.2) - coderay (1.1.3) - crack (1.0.1) - bigdecimal - rexml - hashdiff (1.2.1) - io-console (0.9.2) - json (2.21.2) - language_server-protocol (3.17.0.6) - lint_roller (1.1.0) - method_source (1.1.0) - minitest (5.27.0) - minitest-rg (5.4.0) - minitest (>= 5.0, < 7) - parallel (2.1.0) - parser (3.3.12.0) - ast (~> 2.4.1) - racc - prism (1.9.0) - pry (0.16.0) - coderay (~> 1.1) - method_source (~> 1.0) - reline (>= 0.6.0) - public_suffix (7.0.5) - racc (1.8.1) - rainbow (3.1.1) - rake (13.4.2) - regexp_parser (2.12.0) - reline (0.7.0) - io-console (~> 0.5) - rexml (3.4.4) - rubocop (1.89.0) - json (~> 2.3) - language_server-protocol (~> 3.17.0.2) - lint_roller (~> 1.1.0) - parallel (>= 1.10) - parser (>= 3.3.0.2) - rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.49.0, < 2.0) - ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.50.0) - parser (>= 3.3.7.2) - prism (~> 1.7) - rubocop-minitest (0.40.0) - lint_roller (~> 1.1) - rubocop (>= 1.75.0, < 2.0) - rubocop-ast (>= 1.38.0, < 2.0) - ruby-progressbar (1.13.0) - unicode-display_width (3.2.0) - unicode-emoji (~> 4.1) - unicode-emoji (4.2.0) - wasmtime (47.0.3-aarch64-linux) - wasmtime (47.0.3-aarch64-linux-musl) - wasmtime (47.0.3-arm64-darwin) - wasmtime (47.0.3-x86_64-darwin) - wasmtime (47.0.3-x86_64-linux) - wasmtime (47.0.3-x86_64-linux-musl) - webmock (3.26.2) - addressable (>= 2.8.0) - crack (>= 0.3.2) - hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.9.2) - websocket (1.2.11) - -PLATFORMS - aarch64-linux - aarch64-linux-musl - arm64-darwin - x86_64-darwin - x86_64-linux - x86_64-linux-musl - -DEPENDENCIES - minitest (~> 5.16) - minitest-rg - pry - rake (~> 13.0) - rubocop (~> 1.21) - rubocop-minitest - schematichq! - webmock - webrick (>= 1.0) - -BUNDLED WITH - 2.5.22 diff --git a/lib/schematic.rb b/lib/schematic.rb index 2aca302..db5cfbd 100644 --- a/lib/schematic.rb +++ b/lib/schematic.rb @@ -395,6 +395,7 @@ require_relative "schematic/types/plan_snapshot_view" require_relative "schematic/types/plan_version_snapshot_view" require_relative "schematic/types/subscription_trait_update" +require_relative "schematic/types/trial_status" require_relative "schematic/types/plan_change_response_data" require_relative "schematic/companies/types/list_plan_changes_response" require_relative "schematic/companies/types/get_plan_change_response" @@ -436,6 +437,9 @@ require_relative "schematic/entitlements/types/list_feature_usage_params" require_relative "schematic/entitlements/types/list_feature_usage_response" require_relative "schematic/types/time_series_granularity" +require_relative "schematic/entitlements/types/list_feature_usage_history_params" +require_relative "schematic/types/feature_usage_history_response_data" +require_relative "schematic/entitlements/types/list_feature_usage_history_response" require_relative "schematic/entitlements/types/get_feature_usage_time_series_params" require_relative "schematic/types/limit_time_series_point_response_data" require_relative "schematic/types/usage_time_series_point_response_data" @@ -532,6 +536,7 @@ require_relative "schematic/types/credit_transfer_view" require_relative "schematic/types/credit_company_grant_view" require_relative "schematic/types/stripe_embed_info" +require_relative "schematic/types/upcoming_invoice_response_data" require_relative "schematic/types/component_preview_response_data" require_relative "schematic/components/types/preview_component_data_response" require_relative "schematic/types/plan_bundle_response_data" @@ -588,7 +593,6 @@ require_relative "schematic/types/check_flag_response_data" require_relative "schematic/features/types/check_flag_response" require_relative "schematic/types/company_credit_balance" -require_relative "schematic/types/trial_status" require_relative "schematic/types/datastream_company_plan" require_relative "schematic/types/check_flags_response_data" require_relative "schematic/features/types/check_flags_response" @@ -736,6 +740,8 @@ require_relative "schematic/types/update_pay_in_advance_request_body" require_relative "schematic/types/change_subscription_internal_request_body" require_relative "schematic/types/change_subscription_request_body" +require_relative "schematic/types/preflight_event_usage_request_body" +require_relative "schematic/types/preflight_request_body" require_relative "schematic/types/check_flag_request_body" require_relative "schematic/types/checkout_field_input" require_relative "schematic/types/company_billing_details_view" @@ -945,6 +951,7 @@ require_relative "schematic/entitlements/types/list_feature_companies_request" require_relative "schematic/entitlements/types/count_feature_companies_request" require_relative "schematic/entitlements/types/list_feature_usage_request" +require_relative "schematic/entitlements/types/list_feature_usage_history_request" require_relative "schematic/entitlements/types/get_feature_usage_time_series_request" require_relative "schematic/entitlements/types/count_feature_usage_request" require_relative "schematic/entitlements/types/list_feature_users_request" diff --git a/lib/schematic/accesstokens/client.rb b/lib/schematic/accesstokens/client.rb index 377b628..062785d 100644 --- a/lib/schematic/accesstokens/client.rb +++ b/lib/schematic/accesstokens/client.rb @@ -18,6 +18,14 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.accesstokens.issue_temporary_access_token( + # lookup: { + # key: "value" + # }, + # resource_type: "company" + # ) + # # @return [Schematic::Accesstokens::Types::IssueTemporaryAccessTokenResponse] def issue_temporary_access_token(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/schematic/accesstokens/types/issue_temporary_access_token_request_body.rb b/lib/schematic/accesstokens/types/issue_temporary_access_token_request_body.rb index b485eee..bb923e9 100644 --- a/lib/schematic/accesstokens/types/issue_temporary_access_token_request_body.rb +++ b/lib/schematic/accesstokens/types/issue_temporary_access_token_request_body.rb @@ -5,6 +5,7 @@ module Accesstokens module Types class IssueTemporaryAccessTokenRequestBody < Internal::Types::Model field :lookup, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :resource_type, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/accesstokens/types/issue_temporary_access_token_response.rb b/lib/schematic/accesstokens/types/issue_temporary_access_token_response.rb index f8cd17b..2c19428 100644 --- a/lib/schematic/accesstokens/types/issue_temporary_access_token_response.rb +++ b/lib/schematic/accesstokens/types/issue_temporary_access_token_response.rb @@ -5,6 +5,7 @@ module Accesstokens module Types class IssueTemporaryAccessTokenResponse < Internal::Types::Model field :data, -> { Schematic::Types::IssueTemporaryAccessTokenResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/client.rb b/lib/schematic/accounts/client.rb index 03efa4f..9d40251 100644 --- a/lib/schematic/accounts/client.rb +++ b/lib/schematic/accounts/client.rb @@ -23,17 +23,24 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.accounts.list_account_members( + # ids: ["ids"], + # q: "q", + # role: "admin", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Accounts::Types::ListAccountMembersResponse] def list_account_members(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids q role limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) query_params["role"] = params[:role] if params.key?(:role) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -65,6 +72,9 @@ def list_account_members(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :account_member_id # + # @example + # client.accounts.get_account_member(account_member_id: "account_member_id") + # # @return [Schematic::Accounts::Types::GetAccountMemberResponse] def get_account_member(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -101,17 +111,24 @@ def get_account_member(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.accounts.count_account_members( + # ids: ["ids"], + # q: "q", + # role: "admin", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Accounts::Types::CountAccountMembersResponse] def count_account_members(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids q role limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) query_params["role"] = params[:role] if params.key?(:role) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -146,16 +163,22 @@ def count_account_members(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.accounts.list_api_keys( + # environment_id: "environment_id", + # require_environment: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Accounts::Types::ListApiKeysResponse] def list_api_keys(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[environment_id require_environment limit offset] query_params = {} query_params["environment_id"] = params[:environment_id] if params.key?(:environment_id) query_params["require_environment"] = params[:require_environment] if params.key?(:require_environment) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -186,6 +209,9 @@ def list_api_keys(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.accounts.create_api_key(name: "name") + # # @return [Schematic::Accounts::Types::CreateApiKeyResponse] def create_api_key(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -219,6 +245,9 @@ def create_api_key(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :api_key_id # + # @example + # client.accounts.get_api_key(api_key_id: "api_key_id") + # # @return [Schematic::Accounts::Types::GetApiKeyResponse] def get_api_key(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -251,11 +280,14 @@ def get_api_key(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :api_key_id # + # @example + # client.accounts.update_api_key(api_key_id: "api_key_id") + # # @return [Schematic::Accounts::Types::UpdateApiKeyResponse] def update_api_key(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Accounts::Types::UpdateApiKeyRequestBody.new(params).to_h - non_body_param_names = ["api_key_id"] + non_body_param_names = %w[api_key_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -288,6 +320,9 @@ def update_api_key(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :api_key_id # + # @example + # client.accounts.delete_api_key(api_key_id: "api_key_id") + # # @return [Schematic::Accounts::Types::DeleteApiKeyResponse] def delete_api_key(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -323,16 +358,22 @@ def delete_api_key(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.accounts.count_api_keys( + # environment_id: "environment_id", + # require_environment: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Accounts::Types::CountApiKeysResponse] def count_api_keys(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[environment_id require_environment limit offset] query_params = {} query_params["environment_id"] = params[:environment_id] if params.key?(:environment_id) query_params["require_environment"] = params[:require_environment] if params.key?(:require_environment) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -370,10 +411,20 @@ def count_api_keys(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.accounts.list_audit_logs( + # actor_type: "api_key", + # end_time: "2024-01-15T09:30:00Z", + # environment_id: "environment_id", + # q: "q", + # start_time: "2024-01-15T09:30:00Z", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Accounts::Types::ListAuditLogsResponse] def list_audit_logs(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[actor_type end_time environment_id q start_time limit offset] query_params = {} query_params["actor_type"] = params[:actor_type] if params.key?(:actor_type) query_params["end_time"] = params[:end_time] if params.key?(:end_time) @@ -382,7 +433,6 @@ def list_audit_logs(request_options: {}, **params) query_params["start_time"] = params[:start_time] if params.key?(:start_time) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -414,6 +464,9 @@ def list_audit_logs(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :audit_log_id # + # @example + # client.accounts.get_audit_log(audit_log_id: "audit_log_id") + # # @return [Schematic::Accounts::Types::GetAuditLogResponse] def get_audit_log(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -452,10 +505,20 @@ def get_audit_log(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.accounts.count_audit_logs( + # actor_type: "api_key", + # end_time: "2024-01-15T09:30:00Z", + # environment_id: "environment_id", + # q: "q", + # start_time: "2024-01-15T09:30:00Z", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Accounts::Types::CountAuditLogsResponse] def count_audit_logs(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[actor_type end_time environment_id q start_time limit offset] query_params = {} query_params["actor_type"] = params[:actor_type] if params.key?(:actor_type) query_params["end_time"] = params[:end_time] if params.key?(:end_time) @@ -464,7 +527,6 @@ def count_audit_logs(request_options: {}, **params) query_params["start_time"] = params[:start_time] if params.key?(:start_time) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -498,15 +560,20 @@ def count_audit_logs(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.accounts.list_environments( + # ids: ["ids"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Accounts::Types::ListEnvironmentsResponse] def list_environments(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -537,6 +604,12 @@ def list_environments(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.accounts.create_environment( + # environment_type: "development", + # name: "name" + # ) + # # @return [Schematic::Accounts::Types::CreateEnvironmentResponse] def create_environment(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -570,6 +643,9 @@ def create_environment(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :environment_id # + # @example + # client.accounts.get_environment(environment_id: "environment_id") + # # @return [Schematic::Accounts::Types::GetEnvironmentResponse] def get_environment(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -602,11 +678,14 @@ def get_environment(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :environment_id # + # @example + # client.accounts.update_environment(environment_id: "environment_id") + # # @return [Schematic::Accounts::Types::UpdateEnvironmentResponse] def update_environment(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Accounts::Types::UpdateEnvironmentRequestBody.new(params).to_h - non_body_param_names = ["environment_id"] + non_body_param_names = %w[environment_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -639,6 +718,9 @@ def update_environment(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :environment_id # + # @example + # client.accounts.delete_environment(environment_id: "environment_id") + # # @return [Schematic::Accounts::Types::DeleteEnvironmentResponse] def delete_environment(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -663,16 +745,18 @@ def delete_environment(request_options: {}, **params) end # @param request_options [Hash] - # @param params [Hash] + # @param _params [Hash] # @option request_options [String] :base_url # @option request_options [Hash{String => Object}] :additional_headers # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.accounts.get_onboarding_state + # # @return [Schematic::Accounts::Types::GetOnboardingStateResponse] - def get_onboarding_state(request_options: {}, **params) - Schematic::Internal::Types::Utils.normalize_keys(params) + def get_onboarding_state(request_options: {}, **_params) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "GET", @@ -701,6 +785,9 @@ def get_onboarding_state(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.accounts.update_onboarding_state + # # @return [Schematic::Accounts::Types::UpdateOnboardingStateResponse] def update_onboarding_state(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -726,16 +813,18 @@ def update_onboarding_state(request_options: {}, **params) end # @param request_options [Hash] - # @param params [Hash] + # @param _params [Hash] # @option request_options [String] :base_url # @option request_options [Hash{String => Object}] :additional_headers # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.accounts.quickstart + # # @return [Schematic::Accounts::Types::QuickstartResponse] - def quickstart(request_options: {}, **params) - Schematic::Internal::Types::Utils.normalize_keys(params) + def quickstart(request_options: {}, **_params) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "POST", @@ -757,16 +846,18 @@ def quickstart(request_options: {}, **params) end # @param request_options [Hash] - # @param params [Hash] + # @param _params [Hash] # @option request_options [String] :base_url # @option request_options [Hash{String => Object}] :additional_headers # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.accounts.get_who_am_i + # # @return [Schematic::Accounts::Types::GetWhoAmIResponse] - def get_who_am_i(request_options: {}, **params) - Schematic::Internal::Types::Utils.normalize_keys(params) + def get_who_am_i(request_options: {}, **_params) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "GET", diff --git a/lib/schematic/accounts/types/count_account_members_params.rb b/lib/schematic/accounts/types/count_account_members_params.rb index 09d1e8b..24179ed 100644 --- a/lib/schematic/accounts/types/count_account_members_params.rb +++ b/lib/schematic/accounts/types/count_account_members_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class CountAccountMembersParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/count_account_members_request.rb b/lib/schematic/accounts/types/count_account_members_request.rb index 24ece72..53adb5e 100644 --- a/lib/schematic/accounts/types/count_account_members_request.rb +++ b/lib/schematic/accounts/types/count_account_members_request.rb @@ -5,9 +5,13 @@ module Accounts module Types class CountAccountMembersRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/count_account_members_response.rb b/lib/schematic/accounts/types/count_account_members_response.rb index 605e9ce..fcb2018 100644 --- a/lib/schematic/accounts/types/count_account_members_response.rb +++ b/lib/schematic/accounts/types/count_account_members_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class CountAccountMembersResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Accounts::Types::CountAccountMembersParams }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/count_api_keys_params.rb b/lib/schematic/accounts/types/count_api_keys_params.rb index 72f8a82..99d0446 100644 --- a/lib/schematic/accounts/types/count_api_keys_params.rb +++ b/lib/schematic/accounts/types/count_api_keys_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class CountApiKeysParams < Internal::Types::Model field :environment_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :require_environment, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/count_api_keys_request.rb b/lib/schematic/accounts/types/count_api_keys_request.rb index dac9a84..44972ae 100644 --- a/lib/schematic/accounts/types/count_api_keys_request.rb +++ b/lib/schematic/accounts/types/count_api_keys_request.rb @@ -5,8 +5,11 @@ module Accounts module Types class CountApiKeysRequest < Internal::Types::Model field :environment_id, -> { String }, optional: true, nullable: false + field :require_environment, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/count_api_keys_response.rb b/lib/schematic/accounts/types/count_api_keys_response.rb index 0d626af..17d1dcc 100644 --- a/lib/schematic/accounts/types/count_api_keys_response.rb +++ b/lib/schematic/accounts/types/count_api_keys_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class CountApiKeysResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Accounts::Types::CountApiKeysParams }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/count_audit_logs_params.rb b/lib/schematic/accounts/types/count_audit_logs_params.rb index c5c8f5e..32ecff4 100644 --- a/lib/schematic/accounts/types/count_audit_logs_params.rb +++ b/lib/schematic/accounts/types/count_audit_logs_params.rb @@ -6,11 +6,17 @@ module Types # Input parameters class CountAuditLogsParams < Internal::Types::Model field :actor_type, -> { Schematic::Types::ActorType }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/count_audit_logs_request.rb b/lib/schematic/accounts/types/count_audit_logs_request.rb index 0e61895..d565569 100644 --- a/lib/schematic/accounts/types/count_audit_logs_request.rb +++ b/lib/schematic/accounts/types/count_audit_logs_request.rb @@ -5,11 +5,17 @@ module Accounts module Types class CountAuditLogsRequest < Internal::Types::Model field :actor_type, -> { Schematic::Types::ActorType }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/count_audit_logs_response.rb b/lib/schematic/accounts/types/count_audit_logs_response.rb index 705908c..e5146b9 100644 --- a/lib/schematic/accounts/types/count_audit_logs_response.rb +++ b/lib/schematic/accounts/types/count_audit_logs_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class CountAuditLogsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Accounts::Types::CountAuditLogsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/create_api_key_request_body.rb b/lib/schematic/accounts/types/create_api_key_request_body.rb index c0b2b6c..29601ed 100644 --- a/lib/schematic/accounts/types/create_api_key_request_body.rb +++ b/lib/schematic/accounts/types/create_api_key_request_body.rb @@ -5,9 +5,13 @@ module Accounts module Types class CreateApiKeyRequestBody < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :rate_limit_percent, -> { Integer }, optional: true, nullable: false + field :readonly, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/create_api_key_response.rb b/lib/schematic/accounts/types/create_api_key_response.rb index 0e346df..c95453f 100644 --- a/lib/schematic/accounts/types/create_api_key_response.rb +++ b/lib/schematic/accounts/types/create_api_key_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class CreateApiKeyResponse < Internal::Types::Model field :data, -> { Schematic::Types::ApiKeyCreateResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/create_environment_request_body.rb b/lib/schematic/accounts/types/create_environment_request_body.rb index 5a4f555..e0fdecc 100644 --- a/lib/schematic/accounts/types/create_environment_request_body.rb +++ b/lib/schematic/accounts/types/create_environment_request_body.rb @@ -5,6 +5,7 @@ module Accounts module Types class CreateEnvironmentRequestBody < Internal::Types::Model field :environment_type, -> { Schematic::Types::EnvironmentType }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/create_environment_response.rb b/lib/schematic/accounts/types/create_environment_response.rb index 323519b..60e22ba 100644 --- a/lib/schematic/accounts/types/create_environment_response.rb +++ b/lib/schematic/accounts/types/create_environment_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class CreateEnvironmentResponse < Internal::Types::Model field :data, -> { Schematic::Types::EnvironmentDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/delete_api_key_response.rb b/lib/schematic/accounts/types/delete_api_key_response.rb index a572d09..a1833d9 100644 --- a/lib/schematic/accounts/types/delete_api_key_response.rb +++ b/lib/schematic/accounts/types/delete_api_key_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class DeleteApiKeyResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/delete_environment_response.rb b/lib/schematic/accounts/types/delete_environment_response.rb index b6a261a..4006075 100644 --- a/lib/schematic/accounts/types/delete_environment_response.rb +++ b/lib/schematic/accounts/types/delete_environment_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class DeleteEnvironmentResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/get_account_member_response.rb b/lib/schematic/accounts/types/get_account_member_response.rb index 95916a9..c280c68 100644 --- a/lib/schematic/accounts/types/get_account_member_response.rb +++ b/lib/schematic/accounts/types/get_account_member_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class GetAccountMemberResponse < Internal::Types::Model field :data, -> { Schematic::Types::AccountMemberResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/get_api_key_response.rb b/lib/schematic/accounts/types/get_api_key_response.rb index be9c3e1..3efe389 100644 --- a/lib/schematic/accounts/types/get_api_key_response.rb +++ b/lib/schematic/accounts/types/get_api_key_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class GetApiKeyResponse < Internal::Types::Model field :data, -> { Schematic::Types::ApiKeyResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/get_audit_log_response.rb b/lib/schematic/accounts/types/get_audit_log_response.rb index 93365be..2f1077e 100644 --- a/lib/schematic/accounts/types/get_audit_log_response.rb +++ b/lib/schematic/accounts/types/get_audit_log_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class GetAuditLogResponse < Internal::Types::Model field :data, -> { Schematic::Types::AuditLogResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/get_environment_response.rb b/lib/schematic/accounts/types/get_environment_response.rb index b527e9e..1504ffb 100644 --- a/lib/schematic/accounts/types/get_environment_response.rb +++ b/lib/schematic/accounts/types/get_environment_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class GetEnvironmentResponse < Internal::Types::Model field :data, -> { Schematic::Types::EnvironmentResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/get_onboarding_state_response.rb b/lib/schematic/accounts/types/get_onboarding_state_response.rb index 697638e..bf64187 100644 --- a/lib/schematic/accounts/types/get_onboarding_state_response.rb +++ b/lib/schematic/accounts/types/get_onboarding_state_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class GetOnboardingStateResponse < Internal::Types::Model field :data, -> { Schematic::Types::GetOnboardingStateResp }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/get_who_am_i_response.rb b/lib/schematic/accounts/types/get_who_am_i_response.rb index 93f6a01..80a53f9 100644 --- a/lib/schematic/accounts/types/get_who_am_i_response.rb +++ b/lib/schematic/accounts/types/get_who_am_i_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class GetWhoAmIResponse < Internal::Types::Model field :data, -> { Schematic::Types::WhoAmIResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/list_account_members_params.rb b/lib/schematic/accounts/types/list_account_members_params.rb index 4d0f650..50b4442 100644 --- a/lib/schematic/accounts/types/list_account_members_params.rb +++ b/lib/schematic/accounts/types/list_account_members_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class ListAccountMembersParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/list_account_members_request.rb b/lib/schematic/accounts/types/list_account_members_request.rb index 957a69e..d4d5911 100644 --- a/lib/schematic/accounts/types/list_account_members_request.rb +++ b/lib/schematic/accounts/types/list_account_members_request.rb @@ -5,9 +5,13 @@ module Accounts module Types class ListAccountMembersRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/list_account_members_response.rb b/lib/schematic/accounts/types/list_account_members_response.rb index be9566b..490b3a0 100644 --- a/lib/schematic/accounts/types/list_account_members_response.rb +++ b/lib/schematic/accounts/types/list_account_members_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class ListAccountMembersResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::AccountMemberResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Accounts::Types::ListAccountMembersParams }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/list_api_keys_params.rb b/lib/schematic/accounts/types/list_api_keys_params.rb index 9a6b8d9..5416ef3 100644 --- a/lib/schematic/accounts/types/list_api_keys_params.rb +++ b/lib/schematic/accounts/types/list_api_keys_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListApiKeysParams < Internal::Types::Model field :environment_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :require_environment, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/list_api_keys_request.rb b/lib/schematic/accounts/types/list_api_keys_request.rb index 8691ff3..a6db543 100644 --- a/lib/schematic/accounts/types/list_api_keys_request.rb +++ b/lib/schematic/accounts/types/list_api_keys_request.rb @@ -5,8 +5,11 @@ module Accounts module Types class ListApiKeysRequest < Internal::Types::Model field :environment_id, -> { String }, optional: true, nullable: false + field :require_environment, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/list_api_keys_response.rb b/lib/schematic/accounts/types/list_api_keys_response.rb index 2c738d5..e32a341 100644 --- a/lib/schematic/accounts/types/list_api_keys_response.rb +++ b/lib/schematic/accounts/types/list_api_keys_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class ListApiKeysResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::ApiKeyResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Accounts::Types::ListApiKeysParams }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/list_audit_logs_params.rb b/lib/schematic/accounts/types/list_audit_logs_params.rb index cfdd30b..451ae07 100644 --- a/lib/schematic/accounts/types/list_audit_logs_params.rb +++ b/lib/schematic/accounts/types/list_audit_logs_params.rb @@ -6,11 +6,17 @@ module Types # Input parameters class ListAuditLogsParams < Internal::Types::Model field :actor_type, -> { Schematic::Types::ActorType }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/list_audit_logs_request.rb b/lib/schematic/accounts/types/list_audit_logs_request.rb index 5e97ba2..5578a50 100644 --- a/lib/schematic/accounts/types/list_audit_logs_request.rb +++ b/lib/schematic/accounts/types/list_audit_logs_request.rb @@ -5,11 +5,17 @@ module Accounts module Types class ListAuditLogsRequest < Internal::Types::Model field :actor_type, -> { Schematic::Types::ActorType }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/list_audit_logs_response.rb b/lib/schematic/accounts/types/list_audit_logs_response.rb index 7b18b0e..a724283 100644 --- a/lib/schematic/accounts/types/list_audit_logs_response.rb +++ b/lib/schematic/accounts/types/list_audit_logs_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class ListAuditLogsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::AuditLogListResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Accounts::Types::ListAuditLogsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/list_environments_params.rb b/lib/schematic/accounts/types/list_environments_params.rb index 6af27e5..5c73afa 100644 --- a/lib/schematic/accounts/types/list_environments_params.rb +++ b/lib/schematic/accounts/types/list_environments_params.rb @@ -6,7 +6,9 @@ module Types # Input parameters class ListEnvironmentsParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/list_environments_request.rb b/lib/schematic/accounts/types/list_environments_request.rb index fb5d965..2f25006 100644 --- a/lib/schematic/accounts/types/list_environments_request.rb +++ b/lib/schematic/accounts/types/list_environments_request.rb @@ -5,7 +5,9 @@ module Accounts module Types class ListEnvironmentsRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/list_environments_response.rb b/lib/schematic/accounts/types/list_environments_response.rb index 0b4f0a3..114370e 100644 --- a/lib/schematic/accounts/types/list_environments_response.rb +++ b/lib/schematic/accounts/types/list_environments_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class ListEnvironmentsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::EnvironmentResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Accounts::Types::ListEnvironmentsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/quickstart_response.rb b/lib/schematic/accounts/types/quickstart_response.rb index e8a71b1..e28905d 100644 --- a/lib/schematic/accounts/types/quickstart_response.rb +++ b/lib/schematic/accounts/types/quickstart_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class QuickstartResponse < Internal::Types::Model field :data, -> { Schematic::Types::QuickstartResp }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/update_api_key_request_body.rb b/lib/schematic/accounts/types/update_api_key_request_body.rb index e07db1f..1eab2fa 100644 --- a/lib/schematic/accounts/types/update_api_key_request_body.rb +++ b/lib/schematic/accounts/types/update_api_key_request_body.rb @@ -5,8 +5,11 @@ module Accounts module Types class UpdateApiKeyRequestBody < Internal::Types::Model field :api_key_id, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :rate_limit_percent, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/update_api_key_response.rb b/lib/schematic/accounts/types/update_api_key_response.rb index 2aa7b04..cd47116 100644 --- a/lib/schematic/accounts/types/update_api_key_response.rb +++ b/lib/schematic/accounts/types/update_api_key_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class UpdateApiKeyResponse < Internal::Types::Model field :data, -> { Schematic::Types::ApiKeyResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/update_environment_request_body.rb b/lib/schematic/accounts/types/update_environment_request_body.rb index 55cd01a..868f1e6 100644 --- a/lib/schematic/accounts/types/update_environment_request_body.rb +++ b/lib/schematic/accounts/types/update_environment_request_body.rb @@ -5,7 +5,9 @@ module Accounts module Types class UpdateEnvironmentRequestBody < Internal::Types::Model field :environment_id, -> { String }, optional: false, nullable: false + field :environment_type, -> { Schematic::Types::EnvironmentType }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/update_environment_response.rb b/lib/schematic/accounts/types/update_environment_response.rb index 34ceaf9..e77b86d 100644 --- a/lib/schematic/accounts/types/update_environment_response.rb +++ b/lib/schematic/accounts/types/update_environment_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class UpdateEnvironmentResponse < Internal::Types::Model field :data, -> { Schematic::Types::EnvironmentResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/accounts/types/update_onboarding_state_request_body.rb b/lib/schematic/accounts/types/update_onboarding_state_request_body.rb index 17909b0..e36430b 100644 --- a/lib/schematic/accounts/types/update_onboarding_state_request_body.rb +++ b/lib/schematic/accounts/types/update_onboarding_state_request_body.rb @@ -5,8 +5,11 @@ module Accounts module Types class UpdateOnboardingStateRequestBody < Internal::Types::Model field :path, -> { Schematic::Types::OnboardingPath }, optional: true, nullable: false + field :pricing_page_url, -> { String }, optional: true, nullable: false + field :track, -> { Schematic::Types::OnboardingTrack }, optional: true, nullable: false + field :website_url, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/accounts/types/update_onboarding_state_response.rb b/lib/schematic/accounts/types/update_onboarding_state_response.rb index 440c5df..b2ccc32 100644 --- a/lib/schematic/accounts/types/update_onboarding_state_response.rb +++ b/lib/schematic/accounts/types/update_onboarding_state_response.rb @@ -5,6 +5,7 @@ module Accounts module Types class UpdateOnboardingStateResponse < Internal::Types::Model field :data, -> { Schematic::Types::GetOnboardingStateResp }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/client.rb b/lib/schematic/billing/client.rb index f86d1a6..fe33483 100644 --- a/lib/schematic/billing/client.rb +++ b/lib/schematic/billing/client.rb @@ -22,16 +22,22 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.list_coupons( + # is_active: true, + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::ListCouponsResponse] def list_coupons(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[is_active q limit offset] query_params = {} query_params["is_active"] = params[:is_active] if params.key?(:is_active) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -62,6 +68,18 @@ def list_coupons(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.billing.upsert_billing_coupon( + # amount_off: 1000000, + # duration: "duration", + # duration_in_months: 1000000, + # external_id: "external_id", + # max_redemptions: 1000000, + # name: "name", + # percent_off: 1.1, + # times_redeemed: 1000000 + # ) + # # @return [Schematic::Billing::Types::UpsertBillingCouponResponse] def upsert_billing_coupon(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -95,6 +113,9 @@ def upsert_billing_coupon(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :billing_id # + # @example + # client.billing.delete_billing_coupon(billing_id: "billing_id") + # # @return [Schematic::Billing::Types::DeleteBillingCouponResponse] def delete_billing_coupon(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -127,6 +148,9 @@ def delete_billing_coupon(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :billing_id # + # @example + # client.billing.delete_billing_customer(billing_id: "billing_id") + # # @return [Schematic::Billing::Types::DeleteBillingCustomerResponse] def delete_billing_customer(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -158,6 +182,16 @@ def delete_billing_customer(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.billing.upsert_billing_customer( + # email: "email", + # external_id: "external_id", + # meta: { + # key: "value" + # }, + # name: "name" + # ) + # # @return [Schematic::Billing::Types::UpsertBillingCustomerResponse] def upsert_billing_customer(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -196,10 +230,19 @@ def upsert_billing_customer(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.list_customers_with_subscriptions( + # company_ids: ["company_ids"], + # name: "name", + # provider_type: "metronome", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::ListCustomersWithSubscriptionsResponse] def list_customers_with_subscriptions(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_ids name provider_type q limit offset] query_params = {} query_params["company_ids"] = params[:company_ids] if params.key?(:company_ids) query_params["name"] = params[:name] if params.key?(:name) @@ -207,7 +250,6 @@ def list_customers_with_subscriptions(request_options: {}, **params) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -244,10 +286,19 @@ def list_customers_with_subscriptions(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.count_customers( + # company_ids: ["company_ids"], + # name: "name", + # provider_type: "metronome", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::CountCustomersResponse] def count_customers(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_ids name provider_type q limit offset] query_params = {} query_params["company_ids"] = params[:company_ids] if params.key?(:company_ids) query_params["name"] = params[:name] if params.key?(:name) @@ -255,7 +306,6 @@ def count_customers(request_options: {}, **params) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -291,17 +341,24 @@ def count_customers(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.list_invoices( + # company_id: "company_id", + # customer_external_id: "customer_external_id", + # subscription_external_id: "subscription_external_id", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::ListInvoicesResponse] def list_invoices(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id customer_external_id subscription_external_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["customer_external_id"] = params[:customer_external_id] if params.key?(:customer_external_id) query_params["subscription_external_id"] = params[:subscription_external_id] if params.key?(:subscription_external_id) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -332,6 +389,17 @@ def list_invoices(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.billing.upsert_invoice( + # amount_due: 1000000, + # amount_paid: 1000000, + # amount_remaining: 1000000, + # collection_method: "collection_method", + # currency: "currency", + # customer_external_id: "customer_external_id", + # subtotal: 1000000 + # ) + # # @return [Schematic::Billing::Types::UpsertInvoiceResponse] def upsert_invoice(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -365,6 +433,9 @@ def upsert_invoice(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :billing_id # + # @example + # client.billing.delete_billing_invoice(billing_id: "billing_id") + # # @return [Schematic::Billing::Types::DeleteBillingInvoiceResponse] def delete_billing_invoice(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -399,15 +470,20 @@ def delete_billing_invoice(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.list_meters( + # display_name: "display_name", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::ListMetersResponse] def list_meters(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[display_name limit offset] query_params = {} query_params["display_name"] = params[:display_name] if params.key?(:display_name) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -438,6 +514,14 @@ def list_meters(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.billing.upsert_billing_meter( + # display_name: "display_name", + # event_name: "event_name", + # event_payload_key: "event_payload_key", + # external_id: "external_id" + # ) + # # @return [Schematic::Billing::Types::UpsertBillingMeterResponse] def upsert_billing_meter(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -474,16 +558,22 @@ def upsert_billing_meter(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.list_payment_methods( + # company_id: "company_id", + # customer_external_id: "customer_external_id", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::ListPaymentMethodsResponse] def list_payment_methods(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id customer_external_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["customer_external_id"] = params[:customer_external_id] if params.key?(:customer_external_id) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -514,6 +604,13 @@ def list_payment_methods(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.billing.upsert_payment_method( + # customer_external_id: "customer_external_id", + # external_id: "external_id", + # payment_method_type: "payment_method_type" + # ) + # # @return [Schematic::Billing::Types::UpsertPaymentMethodResponse] def upsert_payment_method(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -547,6 +644,9 @@ def upsert_payment_method(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :billing_id # + # @example + # client.billing.delete_payment_method_by_external_id(billing_id: "billing_id") + # # @return [Schematic::Billing::Types::DeletePaymentMethodByExternalIdResponse] def delete_payment_method_by_external_id(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -596,10 +696,31 @@ def delete_payment_method_by_external_id(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.list_billing_prices( + # currency: "currency", + # for_initial_plan: true, + # for_trial_expiry_plan: true, + # ids: ["ids"], + # interval: "interval", + # interval_count: 1000000, + # is_active: true, + # plan_version_id: "plan_version_id", + # price: 1000000, + # product_id: "product_id", + # product_ids: ["product_ids"], + # provider_type: "metronome", + # q: "q", + # tiers_mode: "graduated", + # usage_type: "licensed", + # with_meter: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::ListBillingPricesResponse] def list_billing_prices(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval interval_count is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset] query_params = {} query_params["currency"] = params[:currency] if params.key?(:currency) query_params["for_initial_plan"] = params[:for_initial_plan] if params.key?(:for_initial_plan) @@ -619,7 +740,6 @@ def list_billing_prices(request_options: {}, **params) query_params["with_meter"] = params[:with_meter] if params.key?(:with_meter) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -650,6 +770,22 @@ def list_billing_prices(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.billing.upsert_billing_price( + # billing_scheme: "per_unit", + # currency: "currency", + # external_account_id: "external_account_id", + # interval: "interval", + # is_active: true, + # price: 1000000, + # price_external_id: "price_external_id", + # price_tiers: [{ + # price_external_id: "price_external_id" + # }], + # product_external_id: "product_external_id", + # usage_type: "licensed" + # ) + # # @return [Schematic::Billing::Types::UpsertBillingPriceResponse] def upsert_billing_price(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -683,6 +819,9 @@ def upsert_billing_price(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :billing_id # + # @example + # client.billing.delete_billing_product(billing_id: "billing_id") + # # @return [Schematic::Billing::Types::DeleteBillingProductResponse] def delete_billing_product(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -732,10 +871,31 @@ def delete_billing_product(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.list_billing_product_prices( + # currency: "currency", + # for_initial_plan: true, + # for_trial_expiry_plan: true, + # ids: ["ids"], + # interval: "interval", + # interval_count: 1000000, + # is_active: true, + # plan_version_id: "plan_version_id", + # price: 1000000, + # product_id: "product_id", + # product_ids: ["product_ids"], + # provider_type: "metronome", + # q: "q", + # tiers_mode: "graduated", + # usage_type: "licensed", + # with_meter: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::ListBillingProductPricesResponse] def list_billing_product_prices(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[currency for_initial_plan for_trial_expiry_plan ids interval interval_count is_active plan_version_id price product_id product_ids provider_type q tiers_mode usage_type with_meter limit offset] query_params = {} query_params["currency"] = params[:currency] if params.key?(:currency) query_params["for_initial_plan"] = params[:for_initial_plan] if params.key?(:for_initial_plan) @@ -755,7 +915,6 @@ def list_billing_product_prices(request_options: {}, **params) query_params["with_meter"] = params[:with_meter] if params.key?(:with_meter) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -787,6 +946,9 @@ def list_billing_product_prices(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :billing_id # + # @example + # client.billing.delete_product_price(billing_id: "billing_id") + # # @return [Schematic::Billing::Types::DeleteProductPriceResponse] def delete_product_price(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -818,6 +980,12 @@ def delete_product_price(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.billing.upsert_billing_product( + # external_id: "external_id", + # price: 1.1 + # ) + # # @return [Schematic::Billing::Types::UpsertBillingProductResponse] def upsert_billing_product(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -863,10 +1031,26 @@ def upsert_billing_product(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.list_billing_products( + # ids: ["ids"], + # is_active: true, + # name: "name", + # price_usage_type: "licensed", + # provider_type: "metronome", + # q: "q", + # recurring_charges_only: true, + # with_one_time_charges: true, + # with_prices_only: true, + # with_zero_price: true, + # without_linked_to_plan: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::ListBillingProductsResponse] def list_billing_products(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - 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] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["is_active"] = params[:is_active] if params.key?(:is_active) @@ -881,7 +1065,6 @@ def list_billing_products(request_options: {}, **params) query_params["without_linked_to_plan"] = params[:without_linked_to_plan] if params.key?(:without_linked_to_plan) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -925,10 +1108,26 @@ def list_billing_products(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.billing.count_billing_products( + # ids: ["ids"], + # is_active: true, + # name: "name", + # price_usage_type: "licensed", + # provider_type: "metronome", + # q: "q", + # recurring_charges_only: true, + # with_one_time_charges: true, + # with_prices_only: true, + # with_zero_price: true, + # without_linked_to_plan: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Billing::Types::CountBillingProductsResponse] def count_billing_products(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - 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] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["is_active"] = params[:is_active] if params.key?(:is_active) @@ -943,7 +1142,6 @@ def count_billing_products(request_options: {}, **params) query_params["without_linked_to_plan"] = params[:without_linked_to_plan] if params.key?(:without_linked_to_plan) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -974,6 +1172,31 @@ def count_billing_products(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.billing.upsert_billing_subscription( + # cancel_at_period_end: true, + # currency: "currency", + # customer_external_id: "customer_external_id", + # discounts: [{ + # coupon_external_id: "coupon_external_id", + # external_id: "external_id", + # is_active: true, + # started_at: "2024-01-15T09:30:00Z" + # }], + # expired_at: "2024-01-15T09:30:00Z", + # product_external_ids: [{ + # currency: "currency", + # interval: "interval", + # price: 1000000, + # price_external_id: "price_external_id", + # product_external_id: "product_external_id", + # quantity: 1000000, + # usage_type: "licensed" + # }], + # subscription_external_id: "subscription_external_id", + # total_price: 1000000 + # ) + # # @return [Schematic::Billing::Types::UpsertBillingSubscriptionResponse] def upsert_billing_subscription(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/schematic/billing/types/count_billing_products_params.rb b/lib/schematic/billing/types/count_billing_products_params.rb index d135476..4184057 100644 --- a/lib/schematic/billing/types/count_billing_products_params.rb +++ b/lib/schematic/billing/types/count_billing_products_params.rb @@ -6,17 +6,29 @@ module Types # Input parameters class CountBillingProductsParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_linked_to_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/count_billing_products_request.rb b/lib/schematic/billing/types/count_billing_products_request.rb index 04c413d..0e6d5fb 100644 --- a/lib/schematic/billing/types/count_billing_products_request.rb +++ b/lib/schematic/billing/types/count_billing_products_request.rb @@ -5,17 +5,29 @@ module Billing module Types class CountBillingProductsRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_linked_to_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/count_billing_products_response.rb b/lib/schematic/billing/types/count_billing_products_response.rb index 6c7766e..4d1628d 100644 --- a/lib/schematic/billing/types/count_billing_products_response.rb +++ b/lib/schematic/billing/types/count_billing_products_response.rb @@ -5,6 +5,7 @@ module Billing module Types class CountBillingProductsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::CountBillingProductsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/count_customers_params.rb b/lib/schematic/billing/types/count_customers_params.rb index 3987f23..89b2a00 100644 --- a/lib/schematic/billing/types/count_customers_params.rb +++ b/lib/schematic/billing/types/count_customers_params.rb @@ -6,10 +6,15 @@ module Types # Input parameters class CountCustomersParams < Internal::Types::Model field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/count_customers_request.rb b/lib/schematic/billing/types/count_customers_request.rb index df8a4a5..0a1512c 100644 --- a/lib/schematic/billing/types/count_customers_request.rb +++ b/lib/schematic/billing/types/count_customers_request.rb @@ -5,10 +5,15 @@ module Billing module Types class CountCustomersRequest < Internal::Types::Model field :company_ids, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/count_customers_response.rb b/lib/schematic/billing/types/count_customers_response.rb index 56f79c4..08ea938 100644 --- a/lib/schematic/billing/types/count_customers_response.rb +++ b/lib/schematic/billing/types/count_customers_response.rb @@ -5,6 +5,7 @@ module Billing module Types class CountCustomersResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::CountCustomersParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/create_billing_customer_request_body.rb b/lib/schematic/billing/types/create_billing_customer_request_body.rb index 2d2d6cb..cadbe9b 100644 --- a/lib/schematic/billing/types/create_billing_customer_request_body.rb +++ b/lib/schematic/billing/types/create_billing_customer_request_body.rb @@ -5,11 +5,17 @@ module Billing module Types class CreateBillingCustomerRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :default_payment_method_id, -> { String }, optional: true, nullable: false + field :email, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :meta, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/create_billing_price_request_body.rb b/lib/schematic/billing/types/create_billing_price_request_body.rb index 5a5b3b2..f722924 100644 --- a/lib/schematic/billing/types/create_billing_price_request_body.rb +++ b/lib/schematic/billing/types/create_billing_price_request_body.rb @@ -5,21 +5,37 @@ module Billing module Types class CreateBillingPriceRequestBody < Internal::Types::Model field :billing_scheme, -> { Schematic::Types::BillingPriceScheme }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :external_account_id, -> { String }, optional: false, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :meter_id, -> { String }, optional: true, nullable: false + field :nickname, -> { String }, optional: true, nullable: false + field :package_size, -> { Integer }, optional: true, nullable: false + field :price, -> { Integer }, optional: false, nullable: false + field :price_decimal, -> { String }, optional: true, nullable: false + field :price_external_id, -> { String }, optional: false, nullable: false + field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreateBillingPriceTierRequestBody] }, optional: false, nullable: false + field :product_external_id, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :tiers_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/create_billing_product_request_body.rb b/lib/schematic/billing/types/create_billing_product_request_body.rb index 6712695..1b590ab 100644 --- a/lib/schematic/billing/types/create_billing_product_request_body.rb +++ b/lib/schematic/billing/types/create_billing_product_request_body.rb @@ -5,9 +5,13 @@ module Billing module Types class CreateBillingProductRequestBody < Internal::Types::Model field :external_id, -> { String }, optional: false, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :price, -> { Integer }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/create_billing_subscription_request_body.rb b/lib/schematic/billing/types/create_billing_subscription_request_body.rb index 0e50ff7..ea434b5 100644 --- a/lib/schematic/billing/types/create_billing_subscription_request_body.rb +++ b/lib/schematic/billing/types/create_billing_subscription_request_body.rb @@ -5,25 +5,45 @@ module Billing module Types class CreateBillingSubscriptionRequestBody < Internal::Types::Model field :application_id, -> { String }, optional: true, nullable: false + field :cancel_at, -> { Integer }, optional: true, nullable: false + field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :default_payment_method_external_id, -> { String }, optional: true, nullable: false + field :default_payment_method_id, -> { String }, optional: true, nullable: false + field :discounts, -> { Internal::Types::Array[Schematic::Types::BillingSubscriptionDiscount] }, optional: false, nullable: false + field :expired_at, -> { String }, optional: false, nullable: false + field :interval, -> { String }, optional: true, nullable: false + field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :period_end, -> { Integer }, optional: true, nullable: false + field :period_start, -> { Integer }, optional: true, nullable: false + field :product_external_ids, -> { Internal::Types::Array[Schematic::Types::BillingProductPricing] }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :status, -> { String }, optional: true, nullable: false + field :subscription_external_id, -> { String }, optional: false, nullable: false + field :total_price, -> { Integer }, optional: false, nullable: false + field :trial_end, -> { Integer }, optional: true, nullable: false + field :trial_end_setting, -> { Schematic::Types::BillingSubscriptionTrialEndSetting }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/create_coupon_request_body.rb b/lib/schematic/billing/types/create_coupon_request_body.rb index ec73b5c..71f8b37 100644 --- a/lib/schematic/billing/types/create_coupon_request_body.rb +++ b/lib/schematic/billing/types/create_coupon_request_body.rb @@ -5,13 +5,21 @@ module Billing module Types class CreateCouponRequestBody < Internal::Types::Model field :amount_off, -> { Integer }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :duration, -> { String }, optional: false, nullable: false + field :duration_in_months, -> { Integer }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :max_redemptions, -> { Integer }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :percent_off, -> { Integer }, optional: false, nullable: false + field :times_redeemed, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/create_invoice_request_body.rb b/lib/schematic/billing/types/create_invoice_request_body.rb index 6b295da..12c6e9f 100644 --- a/lib/schematic/billing/types/create_invoice_request_body.rb +++ b/lib/schematic/billing/types/create_invoice_request_body.rb @@ -5,19 +5,33 @@ module Billing module Types class CreateInvoiceRequestBody < Internal::Types::Model field :amount_due, -> { Integer }, optional: false, nullable: false + field :amount_paid, -> { Integer }, optional: false, nullable: false + field :amount_remaining, -> { Integer }, optional: false, nullable: false + field :collection_method, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :due_date, -> { String }, optional: true, nullable: false + field :ending_balance, -> { Integer }, optional: true, nullable: false + field :external_id, -> { String }, optional: true, nullable: false + field :payment_method_external_id, -> { String }, optional: true, nullable: false + field :starting_balance, -> { Integer }, optional: true, nullable: false + field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false + field :subscription_external_id, -> { String }, optional: true, nullable: false + field :subtotal, -> { Integer }, optional: false, nullable: false + field :url, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/create_meter_request_body.rb b/lib/schematic/billing/types/create_meter_request_body.rb index 1877a65..220d321 100644 --- a/lib/schematic/billing/types/create_meter_request_body.rb +++ b/lib/schematic/billing/types/create_meter_request_body.rb @@ -5,9 +5,13 @@ module Billing module Types class CreateMeterRequestBody < Internal::Types::Model field :display_name, -> { String }, optional: false, nullable: false + field :event_name, -> { String }, optional: false, nullable: false + field :event_payload_key, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/create_payment_method_request_body.rb b/lib/schematic/billing/types/create_payment_method_request_body.rb index ed32c09..9da37ed 100644 --- a/lib/schematic/billing/types/create_payment_method_request_body.rb +++ b/lib/schematic/billing/types/create_payment_method_request_body.rb @@ -5,16 +5,27 @@ module Billing module Types class CreatePaymentMethodRequestBody < Internal::Types::Model field :account_last_4, -> { String }, optional: true, nullable: false, api_name: "account_last4" + field :account_name, -> { String }, optional: true, nullable: false + field :bank_name, -> { String }, optional: true, nullable: false + field :billing_email, -> { String }, optional: true, nullable: false + field :billing_name, -> { String }, optional: true, nullable: false + field :card_brand, -> { String }, optional: true, nullable: false + field :card_exp_month, -> { Integer }, optional: true, nullable: false + field :card_exp_year, -> { Integer }, optional: true, nullable: false + field :card_last_4, -> { String }, optional: true, nullable: false, api_name: "card_last4" + field :customer_external_id, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :payment_method_type, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/delete_billing_coupon_response.rb b/lib/schematic/billing/types/delete_billing_coupon_response.rb index d7d6dbb..d96826d 100644 --- a/lib/schematic/billing/types/delete_billing_coupon_response.rb +++ b/lib/schematic/billing/types/delete_billing_coupon_response.rb @@ -5,6 +5,7 @@ module Billing module Types class DeleteBillingCouponResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/delete_billing_customer_response.rb b/lib/schematic/billing/types/delete_billing_customer_response.rb index 4d8bd80..8a9d8a1 100644 --- a/lib/schematic/billing/types/delete_billing_customer_response.rb +++ b/lib/schematic/billing/types/delete_billing_customer_response.rb @@ -5,6 +5,7 @@ module Billing module Types class DeleteBillingCustomerResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/delete_billing_invoice_response.rb b/lib/schematic/billing/types/delete_billing_invoice_response.rb index 0b7f525..98c6ab6 100644 --- a/lib/schematic/billing/types/delete_billing_invoice_response.rb +++ b/lib/schematic/billing/types/delete_billing_invoice_response.rb @@ -5,6 +5,7 @@ module Billing module Types class DeleteBillingInvoiceResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/delete_billing_product_response.rb b/lib/schematic/billing/types/delete_billing_product_response.rb index e588276..732bad9 100644 --- a/lib/schematic/billing/types/delete_billing_product_response.rb +++ b/lib/schematic/billing/types/delete_billing_product_response.rb @@ -5,6 +5,7 @@ module Billing module Types class DeleteBillingProductResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/delete_payment_method_by_external_id_response.rb b/lib/schematic/billing/types/delete_payment_method_by_external_id_response.rb index ba0031a..a6fb097 100644 --- a/lib/schematic/billing/types/delete_payment_method_by_external_id_response.rb +++ b/lib/schematic/billing/types/delete_payment_method_by_external_id_response.rb @@ -5,6 +5,7 @@ module Billing module Types class DeletePaymentMethodByExternalIdResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/delete_product_price_response.rb b/lib/schematic/billing/types/delete_product_price_response.rb index 033394b..c046d32 100644 --- a/lib/schematic/billing/types/delete_product_price_response.rb +++ b/lib/schematic/billing/types/delete_product_price_response.rb @@ -5,6 +5,7 @@ module Billing module Types class DeleteProductPriceResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/list_billing_prices_params.rb b/lib/schematic/billing/types/list_billing_prices_params.rb index 4e92fba..b0287a7 100644 --- a/lib/schematic/billing/types/list_billing_prices_params.rb +++ b/lib/schematic/billing/types/list_billing_prices_params.rb @@ -6,22 +6,39 @@ module Types # Input parameters class ListBillingPricesParams < Internal::Types::Model field :currency, -> { String }, optional: true, nullable: false + field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :interval, -> { String }, optional: true, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :price, -> { Integer }, optional: true, nullable: false + field :product_id, -> { String }, optional: true, nullable: false + field :product_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :tiers_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false + field :with_meter, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_billing_prices_request.rb b/lib/schematic/billing/types/list_billing_prices_request.rb index b113650..d9f0126 100644 --- a/lib/schematic/billing/types/list_billing_prices_request.rb +++ b/lib/schematic/billing/types/list_billing_prices_request.rb @@ -5,22 +5,39 @@ module Billing module Types class ListBillingPricesRequest < Internal::Types::Model field :currency, -> { String }, optional: true, nullable: false + field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :interval, -> { String }, optional: true, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :price, -> { Integer }, optional: true, nullable: false + field :product_id, -> { String }, optional: true, nullable: false + field :product_ids, -> { String }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :tiers_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false + field :with_meter, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_billing_prices_response.rb b/lib/schematic/billing/types/list_billing_prices_response.rb index 44a94b9..f7a050b 100644 --- a/lib/schematic/billing/types/list_billing_prices_response.rb +++ b/lib/schematic/billing/types/list_billing_prices_response.rb @@ -5,6 +5,7 @@ module Billing module Types class ListBillingPricesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingPriceView] }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::ListBillingPricesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/list_billing_product_prices_params.rb b/lib/schematic/billing/types/list_billing_product_prices_params.rb index 48b1db3..83fc94f 100644 --- a/lib/schematic/billing/types/list_billing_product_prices_params.rb +++ b/lib/schematic/billing/types/list_billing_product_prices_params.rb @@ -6,22 +6,39 @@ module Types # Input parameters class ListBillingProductPricesParams < Internal::Types::Model field :currency, -> { String }, optional: true, nullable: false + field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :interval, -> { String }, optional: true, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :price, -> { Integer }, optional: true, nullable: false + field :product_id, -> { String }, optional: true, nullable: false + field :product_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :tiers_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false + field :with_meter, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_billing_product_prices_request.rb b/lib/schematic/billing/types/list_billing_product_prices_request.rb index 522f938..89f22e4 100644 --- a/lib/schematic/billing/types/list_billing_product_prices_request.rb +++ b/lib/schematic/billing/types/list_billing_product_prices_request.rb @@ -5,22 +5,39 @@ module Billing module Types class ListBillingProductPricesRequest < Internal::Types::Model field :currency, -> { String }, optional: true, nullable: false + field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :interval, -> { String }, optional: true, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :price, -> { Integer }, optional: true, nullable: false + field :product_id, -> { String }, optional: true, nullable: false + field :product_ids, -> { String }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :tiers_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false + field :with_meter, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_billing_product_prices_response.rb b/lib/schematic/billing/types/list_billing_product_prices_response.rb index 9be7eb5..3604536 100644 --- a/lib/schematic/billing/types/list_billing_product_prices_response.rb +++ b/lib/schematic/billing/types/list_billing_product_prices_response.rb @@ -5,6 +5,7 @@ module Billing module Types class ListBillingProductPricesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingPriceView] }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::ListBillingProductPricesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/list_billing_products_params.rb b/lib/schematic/billing/types/list_billing_products_params.rb index de3e746..e2d8b5c 100644 --- a/lib/schematic/billing/types/list_billing_products_params.rb +++ b/lib/schematic/billing/types/list_billing_products_params.rb @@ -6,17 +6,29 @@ module Types # Input parameters class ListBillingProductsParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_linked_to_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_billing_products_request.rb b/lib/schematic/billing/types/list_billing_products_request.rb index b217b1b..e770b32 100644 --- a/lib/schematic/billing/types/list_billing_products_request.rb +++ b/lib/schematic/billing/types/list_billing_products_request.rb @@ -5,17 +5,29 @@ module Billing module Types class ListBillingProductsRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :price_usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :recurring_charges_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_one_time_charges, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_prices_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_zero_price, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_linked_to_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_billing_products_response.rb b/lib/schematic/billing/types/list_billing_products_response.rb index 488c559..95522a5 100644 --- a/lib/schematic/billing/types/list_billing_products_response.rb +++ b/lib/schematic/billing/types/list_billing_products_response.rb @@ -5,6 +5,7 @@ module Billing module Types class ListBillingProductsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingProductDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::ListBillingProductsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/list_coupons_params.rb b/lib/schematic/billing/types/list_coupons_params.rb index 17339d4..25a996d 100644 --- a/lib/schematic/billing/types/list_coupons_params.rb +++ b/lib/schematic/billing/types/list_coupons_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListCouponsParams < Internal::Types::Model field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_coupons_request.rb b/lib/schematic/billing/types/list_coupons_request.rb index b412e5e..4bd8cab 100644 --- a/lib/schematic/billing/types/list_coupons_request.rb +++ b/lib/schematic/billing/types/list_coupons_request.rb @@ -5,8 +5,11 @@ module Billing module Types class ListCouponsRequest < Internal::Types::Model field :is_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_coupons_response.rb b/lib/schematic/billing/types/list_coupons_response.rb index 94cdbbd..0bcfc2a 100644 --- a/lib/schematic/billing/types/list_coupons_response.rb +++ b/lib/schematic/billing/types/list_coupons_response.rb @@ -5,6 +5,7 @@ module Billing module Types class ListCouponsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingCouponResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::ListCouponsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/list_customers_with_subscriptions_params.rb b/lib/schematic/billing/types/list_customers_with_subscriptions_params.rb index f0a53d9..2b6f486 100644 --- a/lib/schematic/billing/types/list_customers_with_subscriptions_params.rb +++ b/lib/schematic/billing/types/list_customers_with_subscriptions_params.rb @@ -6,10 +6,15 @@ module Types # Input parameters class ListCustomersWithSubscriptionsParams < Internal::Types::Model field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_customers_with_subscriptions_request.rb b/lib/schematic/billing/types/list_customers_with_subscriptions_request.rb index 600c44c..8170eb0 100644 --- a/lib/schematic/billing/types/list_customers_with_subscriptions_request.rb +++ b/lib/schematic/billing/types/list_customers_with_subscriptions_request.rb @@ -5,10 +5,15 @@ module Billing module Types class ListCustomersWithSubscriptionsRequest < Internal::Types::Model field :company_ids, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_customers_with_subscriptions_response.rb b/lib/schematic/billing/types/list_customers_with_subscriptions_response.rb index 121f022..0f3854e 100644 --- a/lib/schematic/billing/types/list_customers_with_subscriptions_response.rb +++ b/lib/schematic/billing/types/list_customers_with_subscriptions_response.rb @@ -5,6 +5,7 @@ module Billing module Types class ListCustomersWithSubscriptionsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingCustomerWithSubscriptionsResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::ListCustomersWithSubscriptionsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/list_invoices_params.rb b/lib/schematic/billing/types/list_invoices_params.rb index c9ae1ca..91ab7c2 100644 --- a/lib/schematic/billing/types/list_invoices_params.rb +++ b/lib/schematic/billing/types/list_invoices_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class ListInvoicesParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :customer_external_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :subscription_external_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_invoices_request.rb b/lib/schematic/billing/types/list_invoices_request.rb index 671d874..29e154a 100644 --- a/lib/schematic/billing/types/list_invoices_request.rb +++ b/lib/schematic/billing/types/list_invoices_request.rb @@ -5,9 +5,13 @@ module Billing module Types class ListInvoicesRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: false, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_invoices_response.rb b/lib/schematic/billing/types/list_invoices_response.rb index bc96c69..f2af1c2 100644 --- a/lib/schematic/billing/types/list_invoices_response.rb +++ b/lib/schematic/billing/types/list_invoices_response.rb @@ -5,6 +5,7 @@ module Billing module Types class ListInvoicesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::InvoiceResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::ListInvoicesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/list_meters_params.rb b/lib/schematic/billing/types/list_meters_params.rb index f25ce1c..d0617a6 100644 --- a/lib/schematic/billing/types/list_meters_params.rb +++ b/lib/schematic/billing/types/list_meters_params.rb @@ -6,7 +6,9 @@ module Types # Input parameters class ListMetersParams < Internal::Types::Model field :display_name, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_meters_request.rb b/lib/schematic/billing/types/list_meters_request.rb index a86322a..a50d092 100644 --- a/lib/schematic/billing/types/list_meters_request.rb +++ b/lib/schematic/billing/types/list_meters_request.rb @@ -5,7 +5,9 @@ module Billing module Types class ListMetersRequest < Internal::Types::Model field :display_name, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_meters_response.rb b/lib/schematic/billing/types/list_meters_response.rb index d6af500..f4cd198 100644 --- a/lib/schematic/billing/types/list_meters_response.rb +++ b/lib/schematic/billing/types/list_meters_response.rb @@ -5,6 +5,7 @@ module Billing module Types class ListMetersResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingMeterResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::ListMetersParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/list_payment_methods_params.rb b/lib/schematic/billing/types/list_payment_methods_params.rb index 13c4fdb..0438329 100644 --- a/lib/schematic/billing/types/list_payment_methods_params.rb +++ b/lib/schematic/billing/types/list_payment_methods_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListPaymentMethodsParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :customer_external_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_payment_methods_request.rb b/lib/schematic/billing/types/list_payment_methods_request.rb index e88228b..6fe9b63 100644 --- a/lib/schematic/billing/types/list_payment_methods_request.rb +++ b/lib/schematic/billing/types/list_payment_methods_request.rb @@ -5,8 +5,11 @@ module Billing module Types class ListPaymentMethodsRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/billing/types/list_payment_methods_response.rb b/lib/schematic/billing/types/list_payment_methods_response.rb index 702e8ce..ca085c5 100644 --- a/lib/schematic/billing/types/list_payment_methods_response.rb +++ b/lib/schematic/billing/types/list_payment_methods_response.rb @@ -5,6 +5,7 @@ module Billing module Types class ListPaymentMethodsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PaymentMethodResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Billing::Types::ListPaymentMethodsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/upsert_billing_coupon_response.rb b/lib/schematic/billing/types/upsert_billing_coupon_response.rb index 2704ffe..cdbdfc1 100644 --- a/lib/schematic/billing/types/upsert_billing_coupon_response.rb +++ b/lib/schematic/billing/types/upsert_billing_coupon_response.rb @@ -5,6 +5,7 @@ module Billing module Types class UpsertBillingCouponResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCouponResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/upsert_billing_customer_response.rb b/lib/schematic/billing/types/upsert_billing_customer_response.rb index adeb5c1..9dd99b9 100644 --- a/lib/schematic/billing/types/upsert_billing_customer_response.rb +++ b/lib/schematic/billing/types/upsert_billing_customer_response.rb @@ -5,6 +5,7 @@ module Billing module Types class UpsertBillingCustomerResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCustomerResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/upsert_billing_meter_response.rb b/lib/schematic/billing/types/upsert_billing_meter_response.rb index 71d7283..d92599e 100644 --- a/lib/schematic/billing/types/upsert_billing_meter_response.rb +++ b/lib/schematic/billing/types/upsert_billing_meter_response.rb @@ -5,6 +5,7 @@ module Billing module Types class UpsertBillingMeterResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingMeterResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/upsert_billing_price_response.rb b/lib/schematic/billing/types/upsert_billing_price_response.rb index 44ab14b..49f0c35 100644 --- a/lib/schematic/billing/types/upsert_billing_price_response.rb +++ b/lib/schematic/billing/types/upsert_billing_price_response.rb @@ -5,6 +5,7 @@ module Billing module Types class UpsertBillingPriceResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingPriceResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/upsert_billing_product_response.rb b/lib/schematic/billing/types/upsert_billing_product_response.rb index 01ab3db..1ab596d 100644 --- a/lib/schematic/billing/types/upsert_billing_product_response.rb +++ b/lib/schematic/billing/types/upsert_billing_product_response.rb @@ -5,6 +5,7 @@ module Billing module Types class UpsertBillingProductResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingProductResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/upsert_billing_subscription_response.rb b/lib/schematic/billing/types/upsert_billing_subscription_response.rb index d3a98a1..b62a352 100644 --- a/lib/schematic/billing/types/upsert_billing_subscription_response.rb +++ b/lib/schematic/billing/types/upsert_billing_subscription_response.rb @@ -5,6 +5,7 @@ module Billing module Types class UpsertBillingSubscriptionResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingSubscriptionResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/upsert_invoice_response.rb b/lib/schematic/billing/types/upsert_invoice_response.rb index c633a82..b2d1633 100644 --- a/lib/schematic/billing/types/upsert_invoice_response.rb +++ b/lib/schematic/billing/types/upsert_invoice_response.rb @@ -5,6 +5,7 @@ module Billing module Types class UpsertInvoiceResponse < Internal::Types::Model field :data, -> { Schematic::Types::InvoiceResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/billing/types/upsert_payment_method_response.rb b/lib/schematic/billing/types/upsert_payment_method_response.rb index 79f46ba..2fb8ff2 100644 --- a/lib/schematic/billing/types/upsert_payment_method_response.rb +++ b/lib/schematic/billing/types/upsert_payment_method_response.rb @@ -5,6 +5,7 @@ module Billing module Types class UpsertPaymentMethodResponse < Internal::Types::Model field :data, -> { Schematic::Types::PaymentMethodResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/client.rb b/lib/schematic/catalogs/client.rb index c1fa475..4bb309b 100644 --- a/lib/schematic/catalogs/client.rb +++ b/lib/schematic/catalogs/client.rb @@ -22,16 +22,22 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.catalogs.list_catalogs( + # is_default: true, + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Catalogs::Types::ListCatalogsResponse] def list_catalogs(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[is_default q limit offset] query_params = {} query_params["is_default"] = params[:is_default] if params.key?(:is_default) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -62,6 +68,9 @@ def list_catalogs(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.catalogs.create_catalog(name: "name") + # # @return [Schematic::Catalogs::Types::CreateCatalogResponse] def create_catalog(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -95,6 +104,9 @@ def create_catalog(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :catalog_id # + # @example + # client.catalogs.get_catalog(catalog_id: "catalog_id") + # # @return [Schematic::Catalogs::Types::GetCatalogResponse] def get_catalog(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -127,11 +139,14 @@ def get_catalog(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :catalog_id # + # @example + # client.catalogs.update_catalog(catalog_id: "catalog_id") + # # @return [Schematic::Catalogs::Types::UpdateCatalogResponse] def update_catalog(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Catalogs::Types::UpdateCatalogRequestBody.new(params).to_h - non_body_param_names = ["catalog_id"] + non_body_param_names = %w[catalog_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -164,6 +179,9 @@ def update_catalog(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :catalog_id # + # @example + # client.catalogs.delete_catalog(catalog_id: "catalog_id") + # # @return [Schematic::Catalogs::Types::DeleteCatalogResponse] def delete_catalog(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -196,6 +214,9 @@ def delete_catalog(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :catalog_id # + # @example + # client.catalogs.get_configuration(catalog_id: "catalog_id") + # # @return [Schematic::Catalogs::Types::GetConfigurationResponse] def get_configuration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -228,11 +249,14 @@ def get_configuration(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :catalog_id # + # @example + # client.catalogs.update_configuration(catalog_id: "catalog_id") + # # @return [Schematic::Catalogs::Types::UpdateConfigurationResponse] def update_configuration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Catalogs::Types::UpdateCatalogConfigurationRequestBody.new(params).to_h - non_body_param_names = ["catalog_id"] + non_body_param_names = %w[catalog_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -265,6 +289,9 @@ def update_configuration(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :catalog_id # + # @example + # client.catalogs.get_credit_bundles_in_catalog(catalog_id: "catalog_id") + # # @return [Schematic::Catalogs::Types::GetCreditBundlesInCatalogResponse] def get_credit_bundles_in_catalog(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -298,6 +325,12 @@ def get_credit_bundles_in_catalog(request_options: {}, **params) # @option params [String] :catalog_id # @option params [String] :credit_bundle_id # + # @example + # client.catalogs.add_credit_bundle( + # catalog_id: "catalog_id", + # credit_bundle_id: "credit_bundle_id" + # ) + # # @return [untyped] def add_credit_bundle(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -329,6 +362,12 @@ def add_credit_bundle(request_options: {}, **params) # @option params [String] :catalog_id # @option params [String] :credit_bundle_id # + # @example + # client.catalogs.remove_credit_bundle( + # catalog_id: "catalog_id", + # credit_bundle_id: "credit_bundle_id" + # ) + # # @return [untyped] def remove_credit_bundle(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -359,6 +398,9 @@ def remove_credit_bundle(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :catalog_id # + # @example + # client.catalogs.get_derived_features(catalog_id: "catalog_id") + # # @return [Schematic::Catalogs::Types::GetDerivedFeaturesResponse] def get_derived_features(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -391,6 +433,9 @@ def get_derived_features(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :catalog_id # + # @example + # client.catalogs.get_plans_in_catalog(catalog_id: "catalog_id") + # # @return [Schematic::Catalogs::Types::GetPlansInCatalogResponse] def get_plans_in_catalog(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -424,6 +469,12 @@ def get_plans_in_catalog(request_options: {}, **params) # @option params [String] :catalog_id # @option params [String] :plan_id # + # @example + # client.catalogs.add_plan( + # catalog_id: "catalog_id", + # plan_id: "plan_id" + # ) + # # @return [untyped] def add_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -455,6 +506,12 @@ def add_plan(request_options: {}, **params) # @option params [String] :catalog_id # @option params [String] :plan_id # + # @example + # client.catalogs.remove_plan( + # catalog_id: "catalog_id", + # plan_id: "plan_id" + # ) + # # @return [untyped] def remove_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/schematic/catalogs/types/create_catalog_request_body.rb b/lib/schematic/catalogs/types/create_catalog_request_body.rb index 7a9d4da..16a3a09 100644 --- a/lib/schematic/catalogs/types/create_catalog_request_body.rb +++ b/lib/schematic/catalogs/types/create_catalog_request_body.rb @@ -5,6 +5,7 @@ module Catalogs module Types class CreateCatalogRequestBody < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/create_catalog_response.rb b/lib/schematic/catalogs/types/create_catalog_response.rb index d8f519e..97e1384 100644 --- a/lib/schematic/catalogs/types/create_catalog_response.rb +++ b/lib/schematic/catalogs/types/create_catalog_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class CreateCatalogResponse < Internal::Types::Model field :data, -> { Schematic::Types::CatalogResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/delete_catalog_response.rb b/lib/schematic/catalogs/types/delete_catalog_response.rb index 8db8d6e..ac27eb7 100644 --- a/lib/schematic/catalogs/types/delete_catalog_response.rb +++ b/lib/schematic/catalogs/types/delete_catalog_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class DeleteCatalogResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/get_catalog_response.rb b/lib/schematic/catalogs/types/get_catalog_response.rb index 97d881a..4fe6cd5 100644 --- a/lib/schematic/catalogs/types/get_catalog_response.rb +++ b/lib/schematic/catalogs/types/get_catalog_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class GetCatalogResponse < Internal::Types::Model field :data, -> { Schematic::Types::CatalogResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/get_configuration_response.rb b/lib/schematic/catalogs/types/get_configuration_response.rb index e87e12e..e6e011d 100644 --- a/lib/schematic/catalogs/types/get_configuration_response.rb +++ b/lib/schematic/catalogs/types/get_configuration_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class GetConfigurationResponse < Internal::Types::Model field :data, -> { Schematic::Types::CatalogConfigurationResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/get_credit_bundles_in_catalog_response.rb b/lib/schematic/catalogs/types/get_credit_bundles_in_catalog_response.rb index 3312e50..2d194f5 100644 --- a/lib/schematic/catalogs/types/get_credit_bundles_in_catalog_response.rb +++ b/lib/schematic/catalogs/types/get_credit_bundles_in_catalog_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class GetCreditBundlesInCatalogResponse < Internal::Types::Model field :data, -> { Schematic::Types::CatalogCreditBundleIDsResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/get_derived_features_response.rb b/lib/schematic/catalogs/types/get_derived_features_response.rb index dc3bae8..81d9bb2 100644 --- a/lib/schematic/catalogs/types/get_derived_features_response.rb +++ b/lib/schematic/catalogs/types/get_derived_features_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class GetDerivedFeaturesResponse < Internal::Types::Model field :data, -> { Schematic::Types::CatalogDerivedFeaturesResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/get_plans_in_catalog_response.rb b/lib/schematic/catalogs/types/get_plans_in_catalog_response.rb index 85e01f5..8e3f39c 100644 --- a/lib/schematic/catalogs/types/get_plans_in_catalog_response.rb +++ b/lib/schematic/catalogs/types/get_plans_in_catalog_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class GetPlansInCatalogResponse < Internal::Types::Model field :data, -> { Schematic::Types::CatalogPlanIDsResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/list_catalogs_params.rb b/lib/schematic/catalogs/types/list_catalogs_params.rb index 23305c2..5e0885c 100644 --- a/lib/schematic/catalogs/types/list_catalogs_params.rb +++ b/lib/schematic/catalogs/types/list_catalogs_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListCatalogsParams < Internal::Types::Model field :is_default, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/catalogs/types/list_catalogs_request.rb b/lib/schematic/catalogs/types/list_catalogs_request.rb index 7a3a489..fd8d4bb 100644 --- a/lib/schematic/catalogs/types/list_catalogs_request.rb +++ b/lib/schematic/catalogs/types/list_catalogs_request.rb @@ -5,8 +5,11 @@ module Catalogs module Types class ListCatalogsRequest < Internal::Types::Model field :is_default, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/catalogs/types/list_catalogs_response.rb b/lib/schematic/catalogs/types/list_catalogs_response.rb index 6b4e352..626c49f 100644 --- a/lib/schematic/catalogs/types/list_catalogs_response.rb +++ b/lib/schematic/catalogs/types/list_catalogs_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class ListCatalogsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CatalogResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Catalogs::Types::ListCatalogsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/update_catalog_configuration_request_body.rb b/lib/schematic/catalogs/types/update_catalog_configuration_request_body.rb index 010506e..2f11922 100644 --- a/lib/schematic/catalogs/types/update_catalog_configuration_request_body.rb +++ b/lib/schematic/catalogs/types/update_catalog_configuration_request_body.rb @@ -5,14 +5,23 @@ module Catalogs module Types class UpdateCatalogConfigurationRequestBody < Internal::Types::Model field :catalog_id, -> { String }, optional: false, nullable: false + field :custom_plan_cta_text, -> { String }, optional: true, nullable: false + field :custom_plan_cta_url, -> { String }, optional: true, nullable: false + field :custom_plan_price_text, -> { String }, optional: true, nullable: false + field :custom_plans_visible, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ordered_add_ons, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedPlan] }, optional: true, nullable: false + field :ordered_bundles, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedBundle] }, optional: true, nullable: false + field :ordered_plans, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedPlan] }, optional: true, nullable: false + field :pricing_model, -> { String }, optional: true, nullable: false + field :pricing_url, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/catalogs/types/update_catalog_request_body.rb b/lib/schematic/catalogs/types/update_catalog_request_body.rb index a060055..fc9f981 100644 --- a/lib/schematic/catalogs/types/update_catalog_request_body.rb +++ b/lib/schematic/catalogs/types/update_catalog_request_body.rb @@ -5,8 +5,11 @@ module Catalogs module Types class UpdateCatalogRequestBody < Internal::Types::Model field :catalog_id, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: true, nullable: false + field :is_default, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/catalogs/types/update_catalog_response.rb b/lib/schematic/catalogs/types/update_catalog_response.rb index 47bb28a..f616f04 100644 --- a/lib/schematic/catalogs/types/update_catalog_response.rb +++ b/lib/schematic/catalogs/types/update_catalog_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class UpdateCatalogResponse < Internal::Types::Model field :data, -> { Schematic::Types::CatalogResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/catalogs/types/update_configuration_response.rb b/lib/schematic/catalogs/types/update_configuration_response.rb index 66783a5..59b4224 100644 --- a/lib/schematic/catalogs/types/update_configuration_response.rb +++ b/lib/schematic/catalogs/types/update_configuration_response.rb @@ -5,6 +5,7 @@ module Catalogs module Types class UpdateConfigurationResponse < Internal::Types::Model field :data, -> { Schematic::Types::CatalogResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/client.rb b/lib/schematic/checkout/client.rb index 99b697e..82e291b 100644 --- a/lib/schematic/checkout/client.rb +++ b/lib/schematic/checkout/client.rb @@ -18,6 +18,33 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.checkout.internal( + # add_on_ids: [{ + # add_on_id: "add_on_id", + # price_id: "price_id" + # }], + # auto_topup_overrides: [{ + # plan_credit_grant_id: "plan_credit_grant_id" + # }], + # company_id: "company_id", + # credit_bundles: [{ + # bundle_id: "bundle_id", + # quantity: 1000000 + # }], + # custom_field_values: [{ + # id: "id", + # value: "value" + # }], + # new_plan_id: "new_plan_id", + # new_price_id: "new_price_id", + # pay_in_advance: [{ + # price_id: "price_id", + # quantity: 1000000 + # }], + # skip_trial: true + # ) + # # @return [Schematic::Checkout::Types::CheckoutInternalResponse] def internal(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -50,6 +77,9 @@ def internal(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.checkout.get_checkout_data(company_id: "company_id") + # # @return [Schematic::Checkout::Types::GetCheckoutDataResponse] def get_checkout_data(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -82,6 +112,33 @@ def get_checkout_data(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.checkout.preview_checkout_internal( + # add_on_ids: [{ + # add_on_id: "add_on_id", + # price_id: "price_id" + # }], + # auto_topup_overrides: [{ + # plan_credit_grant_id: "plan_credit_grant_id" + # }], + # company_id: "company_id", + # credit_bundles: [{ + # bundle_id: "bundle_id", + # quantity: 1000000 + # }], + # custom_field_values: [{ + # id: "id", + # value: "value" + # }], + # new_plan_id: "new_plan_id", + # new_price_id: "new_price_id", + # pay_in_advance: [{ + # price_id: "price_id", + # quantity: 1000000 + # }], + # skip_trial: true + # ) + # # @return [Schematic::Checkout::Types::PreviewCheckoutInternalResponse] def preview_checkout_internal(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -115,6 +172,9 @@ def preview_checkout_internal(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :company_id # + # @example + # client.checkout.get_company_billing_details(company_id: "company_id") + # # @return [Schematic::Checkout::Types::GetCompanyBillingDetailsResponse] def get_company_billing_details(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -147,11 +207,20 @@ def get_company_billing_details(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :company_id # + # @example + # client.checkout.update_company_billing_details( + # company_id: "company_id", + # values: [{ + # id: "id", + # value: "value" + # }] + # ) + # # @return [Schematic::Checkout::Types::UpdateCompanyBillingDetailsResponse] def update_company_billing_details(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Checkout::Types::UpdateCompanyBillingDetailsRequestBody.new(params).to_h - non_body_param_names = ["company_id"] + non_body_param_names = %w[company_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -183,6 +252,26 @@ def update_company_billing_details(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.checkout.manage_plan( + # add_on_selections: [{ + # plan_id: "plan_id" + # }], + # company_id: "company_id", + # credit_bundles: [{ + # bundle_id: "bundle_id", + # quantity: 1000000 + # }], + # custom_field_values: [{ + # id: "id", + # value: "value" + # }], + # pay_in_advance_entitlements: [{ + # price_id: "price_id", + # quantity: 1000000 + # }] + # ) + # # @return [Schematic::Checkout::Types::ManagePlanResponse] def manage_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -215,6 +304,26 @@ def manage_plan(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.checkout.preview_manage_plan( + # add_on_selections: [{ + # plan_id: "plan_id" + # }], + # company_id: "company_id", + # credit_bundles: [{ + # bundle_id: "bundle_id", + # quantity: 1000000 + # }], + # custom_field_values: [{ + # id: "id", + # value: "value" + # }], + # pay_in_advance_entitlements: [{ + # price_id: "price_id", + # quantity: 1000000 + # }] + # ) + # # @return [Schematic::Checkout::Types::PreviewManagePlanResponse] def preview_manage_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -247,6 +356,9 @@ def preview_manage_plan(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.checkout.cancel_subscription(company_id: "company_id") + # # @return [Schematic::Checkout::Types::CancelSubscriptionResponse] def cancel_subscription(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -280,11 +392,14 @@ def cancel_subscription(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :subscription_id # + # @example + # client.checkout.update_customer_subscription_trial_end(subscription_id: "subscription_id") + # # @return [Schematic::Checkout::Types::UpdateCustomerSubscriptionTrialEndResponse] def update_customer_subscription_trial_end(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Checkout::Types::UpdateTrialEndRequestBody.new(params).to_h - non_body_param_names = ["subscription_id"] + non_body_param_names = %w[subscription_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( diff --git a/lib/schematic/checkout/types/cancel_subscription_request.rb b/lib/schematic/checkout/types/cancel_subscription_request.rb index f1cfa60..7f07c1f 100644 --- a/lib/schematic/checkout/types/cancel_subscription_request.rb +++ b/lib/schematic/checkout/types/cancel_subscription_request.rb @@ -5,7 +5,9 @@ module Checkout module Types class CancelSubscriptionRequest < Internal::Types::Model field :cancel_immediately, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :prorate, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/checkout/types/cancel_subscription_response.rb b/lib/schematic/checkout/types/cancel_subscription_response.rb index d11e6c5..39479e9 100644 --- a/lib/schematic/checkout/types/cancel_subscription_response.rb +++ b/lib/schematic/checkout/types/cancel_subscription_response.rb @@ -5,6 +5,7 @@ module Checkout module Types class CancelSubscriptionResponse < Internal::Types::Model field :data, -> { Schematic::Types::ManagePlanResponseResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/checkout_data_request_body.rb b/lib/schematic/checkout/types/checkout_data_request_body.rb index 368657a..ca31e5b 100644 --- a/lib/schematic/checkout/types/checkout_data_request_body.rb +++ b/lib/schematic/checkout/types/checkout_data_request_body.rb @@ -5,7 +5,9 @@ module Checkout module Types class CheckoutDataRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :selected_plan_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/checkout/types/checkout_internal_response.rb b/lib/schematic/checkout/types/checkout_internal_response.rb index 8910fd5..134fba4 100644 --- a/lib/schematic/checkout/types/checkout_internal_response.rb +++ b/lib/schematic/checkout/types/checkout_internal_response.rb @@ -5,6 +5,7 @@ module Checkout module Types class CheckoutInternalResponse < Internal::Types::Model field :data, -> { Schematic::Types::CheckoutSubscription }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/get_checkout_data_response.rb b/lib/schematic/checkout/types/get_checkout_data_response.rb index 11486fb..2275555 100644 --- a/lib/schematic/checkout/types/get_checkout_data_response.rb +++ b/lib/schematic/checkout/types/get_checkout_data_response.rb @@ -5,6 +5,7 @@ module Checkout module Types class GetCheckoutDataResponse < Internal::Types::Model field :data, -> { Schematic::Types::CheckoutDataResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/get_company_billing_details_response.rb b/lib/schematic/checkout/types/get_company_billing_details_response.rb index 3a850ef..d6ba546 100644 --- a/lib/schematic/checkout/types/get_company_billing_details_response.rb +++ b/lib/schematic/checkout/types/get_company_billing_details_response.rb @@ -5,6 +5,7 @@ module Checkout module Types class GetCompanyBillingDetailsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyBillingDetailsResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/manage_plan_response.rb b/lib/schematic/checkout/types/manage_plan_response.rb index 9d5a23d..bdb0c03 100644 --- a/lib/schematic/checkout/types/manage_plan_response.rb +++ b/lib/schematic/checkout/types/manage_plan_response.rb @@ -5,6 +5,7 @@ module Checkout module Types class ManagePlanResponse < Internal::Types::Model field :data, -> { Schematic::Types::ManagePlanResponseResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/preview_checkout_internal_response.rb b/lib/schematic/checkout/types/preview_checkout_internal_response.rb index a52cb9c..8cef4f1 100644 --- a/lib/schematic/checkout/types/preview_checkout_internal_response.rb +++ b/lib/schematic/checkout/types/preview_checkout_internal_response.rb @@ -5,6 +5,7 @@ module Checkout module Types class PreviewCheckoutInternalResponse < Internal::Types::Model field :data, -> { Schematic::Types::PreviewSubscriptionChangeResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/preview_manage_plan_response.rb b/lib/schematic/checkout/types/preview_manage_plan_response.rb index 89841cd..319e22d 100644 --- a/lib/schematic/checkout/types/preview_manage_plan_response.rb +++ b/lib/schematic/checkout/types/preview_manage_plan_response.rb @@ -5,6 +5,7 @@ module Checkout module Types class PreviewManagePlanResponse < Internal::Types::Model field :data, -> { Schematic::Types::ManagePlanPreviewResponseResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/update_company_billing_details_request_body.rb b/lib/schematic/checkout/types/update_company_billing_details_request_body.rb index 1fa49ef..a16cdb0 100644 --- a/lib/schematic/checkout/types/update_company_billing_details_request_body.rb +++ b/lib/schematic/checkout/types/update_company_billing_details_request_body.rb @@ -5,10 +5,15 @@ module Checkout module Types class UpdateCompanyBillingDetailsRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false + field :email, -> { String }, optional: true, nullable: false + field :phone, -> { String }, optional: true, nullable: false + field :tax_id, -> { Schematic::Types::TaxIdInput }, optional: true, nullable: false + field :values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/update_company_billing_details_response.rb b/lib/schematic/checkout/types/update_company_billing_details_response.rb index b14ec4d..40a8c02 100644 --- a/lib/schematic/checkout/types/update_company_billing_details_response.rb +++ b/lib/schematic/checkout/types/update_company_billing_details_response.rb @@ -5,6 +5,7 @@ module Checkout module Types class UpdateCompanyBillingDetailsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyBillingDetailsResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/update_customer_subscription_trial_end_response.rb b/lib/schematic/checkout/types/update_customer_subscription_trial_end_response.rb index 10922c5..241a261 100644 --- a/lib/schematic/checkout/types/update_customer_subscription_trial_end_response.rb +++ b/lib/schematic/checkout/types/update_customer_subscription_trial_end_response.rb @@ -5,6 +5,7 @@ module Checkout module Types class UpdateCustomerSubscriptionTrialEndResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingSubscriptionView }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/checkout/types/update_trial_end_request_body.rb b/lib/schematic/checkout/types/update_trial_end_request_body.rb index 51d62da..f05e9ab 100644 --- a/lib/schematic/checkout/types/update_trial_end_request_body.rb +++ b/lib/schematic/checkout/types/update_trial_end_request_body.rb @@ -5,6 +5,7 @@ module Checkout module Types class UpdateTrialEndRequestBody < Internal::Types::Model field :subscription_id, -> { String }, optional: false, nullable: false + field :trial_end, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/client.rb b/lib/schematic/client.rb index 4c9a580..7b5bcec 100644 --- a/lib/schematic/client.rb +++ b/lib/schematic/client.rb @@ -2,18 +2,51 @@ module Schematic class Client - # @param base_url [String, nil] + # @param request_options [Hash] + # @param _params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @example + # client.get_credit_ledger + # + # @return [untyped] + def get_credit_ledger(request_options: {}, **_params) + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "billing/credits/ledger", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + return if code.between?(200, 299) + + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + # @param api_key [String] + # @param base_url [String, nil] + # @param max_retries [Integer] # # @return [void] - def initialize(api_key:, base_url: nil) + def initialize(api_key:, base_url: nil, max_retries: 2) @raw_client = Schematic::Internal::Http::RawClient.new( base_url: base_url || Schematic::Environment::DEFAULT, headers: { - "User-Agent" => "schematichq/1.4.14", + "User-Agent" => "schematichq/1.4.15", "X-Fern-Language" => "Ruby", "X-Schematic-Api-Key" => api_key.to_s - } + }, + max_retries: max_retries ) end diff --git a/lib/schematic/companies/client.rb b/lib/schematic/companies/client.rb index e9479a2..4bb0772 100644 --- a/lib/schematic/companies/client.rb +++ b/lib/schematic/companies/client.rb @@ -25,6 +25,7 @@ def initialize(client:) # @option params [String, nil] :plan_ids # @option params [String, nil] :plan_version_id # @option params [String, nil] :plan_version_ids + # @option params [Boolean, nil] :plan_version_unpublished # @option params [String, nil] :q # @option params [String, nil] :sort_order_column # @option params [Schematic::Types::SortDirection, nil] :sort_order_direction @@ -38,10 +39,34 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.list_companies( + # credit_type_ids: ["credit_type_ids"], + # has_scheduled_downgrade: true, + # ids: ["ids"], + # monetized_subscriptions: true, + # plan_id: "plan_id", + # plan_ids: ["plan_ids"], + # plan_version_id: "plan_version_id", + # plan_version_ids: ["plan_version_ids"], + # plan_version_unpublished: true, + # q: "q", + # sort_order_column: "sort_order_column", + # sort_order_direction: "asc", + # subscription_statuses: ["active"], + # subscription_types: ["free"], + # with_entitlement_for: "with_entitlement_for", + # without_feature_override_for: "without_feature_override_for", + # without_plan: true, + # without_subscription: true, + # with_subscription: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::ListCompaniesResponse] def list_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - 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] query_params = {} query_params["credit_type_ids"] = params[:credit_type_ids] if params.key?(:credit_type_ids) query_params["has_scheduled_downgrade"] = params[:has_scheduled_downgrade] if params.key?(:has_scheduled_downgrade) @@ -51,6 +76,7 @@ def list_companies(request_options: {}, **params) query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids) query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids) + query_params["plan_version_unpublished"] = params[:plan_version_unpublished] if params.key?(:plan_version_unpublished) query_params["q"] = params[:q] if params.key?(:q) query_params["sort_order_column"] = params[:sort_order_column] if params.key?(:sort_order_column) query_params["sort_order_direction"] = params[:sort_order_direction] if params.key?(:sort_order_direction) @@ -63,7 +89,6 @@ def list_companies(request_options: {}, **params) query_params["with_subscription"] = params[:with_subscription] if params.key?(:with_subscription) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -94,6 +119,11 @@ def list_companies(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.upsert_company(keys: { + # key: "value" + # }) + # # @return [Schematic::Companies::Types::UpsertCompanyResponse] def upsert_company(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -127,6 +157,9 @@ def upsert_company(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :company_id # + # @example + # client.companies.get_company(company_id: "company_id") + # # @return [Schematic::Companies::Types::GetCompanyResponse] def get_company(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -161,14 +194,19 @@ def get_company(request_options: {}, **params) # @option params [Boolean, nil] :cancel_subscription # @option params [Boolean, nil] :prorate # + # @example + # client.companies.delete_company( + # company_id: "company_id", + # cancel_subscription: true, + # prorate: true + # ) + # # @return [Schematic::Companies::Types::DeleteCompanyResponse] def delete_company(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[cancel_subscription prorate] query_params = {} query_params["cancel_subscription"] = params[:cancel_subscription] if params.key?(:cancel_subscription) query_params["prorate"] = params[:prorate] if params.key?(:prorate) - params = params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -206,6 +244,7 @@ def delete_company(request_options: {}, **params) # @option params [String, nil] :plan_ids # @option params [String, nil] :plan_version_id # @option params [String, nil] :plan_version_ids + # @option params [Boolean, nil] :plan_version_unpublished # @option params [String, nil] :q # @option params [String, nil] :sort_order_column # @option params [Schematic::Types::SortDirection, nil] :sort_order_direction @@ -219,10 +258,34 @@ def delete_company(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.count_companies( + # credit_type_ids: ["credit_type_ids"], + # has_scheduled_downgrade: true, + # ids: ["ids"], + # monetized_subscriptions: true, + # plan_id: "plan_id", + # plan_ids: ["plan_ids"], + # plan_version_id: "plan_version_id", + # plan_version_ids: ["plan_version_ids"], + # plan_version_unpublished: true, + # q: "q", + # sort_order_column: "sort_order_column", + # sort_order_direction: "asc", + # subscription_statuses: ["active"], + # subscription_types: ["free"], + # with_entitlement_for: "with_entitlement_for", + # without_feature_override_for: "without_feature_override_for", + # without_plan: true, + # without_subscription: true, + # with_subscription: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::CountCompaniesResponse] def count_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - 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] query_params = {} query_params["credit_type_ids"] = params[:credit_type_ids] if params.key?(:credit_type_ids) query_params["has_scheduled_downgrade"] = params[:has_scheduled_downgrade] if params.key?(:has_scheduled_downgrade) @@ -232,6 +295,7 @@ def count_companies(request_options: {}, **params) query_params["plan_ids"] = params[:plan_ids] if params.key?(:plan_ids) query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids) + query_params["plan_version_unpublished"] = params[:plan_version_unpublished] if params.key?(:plan_version_unpublished) query_params["q"] = params[:q] if params.key?(:q) query_params["sort_order_column"] = params[:sort_order_column] if params.key?(:sort_order_column) query_params["sort_order_direction"] = params[:sort_order_direction] if params.key?(:sort_order_direction) @@ -244,7 +308,6 @@ def count_companies(request_options: {}, **params) query_params["with_subscription"] = params[:with_subscription] if params.key?(:with_subscription) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -275,6 +338,11 @@ def count_companies(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.create_company(keys: { + # key: "value" + # }) + # # @return [Schematic::Companies::Types::CreateCompanyResponse] def create_company(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -307,6 +375,11 @@ def create_company(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.delete_company_by_keys(keys: { + # key: "value" + # }) + # # @return [Schematic::Companies::Types::DeleteCompanyByKeysResponse] def delete_company_by_keys(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -346,13 +419,16 @@ def delete_company_by_keys(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Hash[String, String]] :keys # + # @example + # client.companies.lookup_company(keys: { + # keys: "keys" + # }) + # # @return [Schematic::Companies::Types::LookupCompanyResponse] def lookup_company(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[keys] query_params = {} query_params["keys"] = params[:keys] if params.key?(:keys) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -382,15 +458,16 @@ def lookup_company(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :company_id + # @option params [String] :company_id + # + # @example + # client.companies.get_company_billing_entity(company_id: "company_id") # # @return [Schematic::Companies::Types::GetCompanyBillingEntityResponse] def get_company_billing_entity(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -420,15 +497,16 @@ def get_company_billing_entity(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :company_id + # @option params [String] :company_id + # + # @example + # client.companies.get_billing_entity_child_subscriptions(company_id: "company_id") # # @return [Schematic::Companies::Types::GetBillingEntityChildSubscriptionsResponse] def get_billing_entity_child_subscriptions(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -463,16 +541,22 @@ def get_billing_entity_child_subscriptions(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.list_company_memberships( + # company_id: "company_id", + # user_id: "user_id", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::ListCompanyMembershipsResponse] def list_company_memberships(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id user_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["user_id"] = params[:user_id] if params.key?(:user_id) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -503,6 +587,12 @@ def list_company_memberships(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.get_or_create_company_membership( + # company_id: "company_id", + # user_id: "user_id" + # ) + # # @return [Schematic::Companies::Types::GetOrCreateCompanyMembershipResponse] def get_or_create_company_membership(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -536,6 +626,9 @@ def get_or_create_company_membership(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :company_membership_id # + # @example + # client.companies.delete_company_membership(company_membership_id: "company_membership_id") + # # @return [Schematic::Companies::Types::DeleteCompanyMembershipResponse] def delete_company_membership(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -571,16 +664,22 @@ def delete_company_membership(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.get_active_company_subscription( + # company_id: "company_id", + # company_ids: ["company_ids"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::GetActiveCompanySubscriptionResponse] def get_active_company_subscription(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id company_ids limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_ids"] = params[:company_ids] if params.key?(:company_ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -611,6 +710,14 @@ def get_active_company_subscription(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.upsert_company_trait( + # keys: { + # key: "value" + # }, + # trait: "trait" + # ) + # # @return [Schematic::Companies::Types::UpsertCompanyTraitResponse] def upsert_company_trait(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -648,17 +755,24 @@ def upsert_company_trait(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.list_entity_key_definitions( + # entity_type: "company", + # ids: ["ids"], + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::ListEntityKeyDefinitionsResponse] def list_entity_key_definitions(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[entity_type ids q limit offset] query_params = {} query_params["entity_type"] = params[:entity_type] if params.key?(:entity_type) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -690,6 +804,9 @@ def list_entity_key_definitions(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :entity_key_definition_id # + # @example + # client.companies.delete_entity_key_definition(entity_key_definition_id: "entity_key_definition_id") + # # @return [Schematic::Companies::Types::DeleteEntityKeyDefinitionResponse] def delete_entity_key_definition(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -726,17 +843,24 @@ def delete_entity_key_definition(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.count_entity_key_definitions( + # entity_type: "company", + # ids: ["ids"], + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::CountEntityKeyDefinitionsResponse] def count_entity_key_definitions(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[entity_type ids q limit offset] query_params = {} query_params["entity_type"] = params[:entity_type] if params.key?(:entity_type) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -771,16 +895,22 @@ def count_entity_key_definitions(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.count_entity_keys( + # definition_id: "definition_id", + # entity_type: "company", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::CountEntityKeysResponse] def count_entity_keys(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[definition_id entity_type limit offset] query_params = {} query_params["definition_id"] = params[:definition_id] if params.key?(:definition_id) query_params["entity_type"] = params[:entity_type] if params.key?(:entity_type) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -818,10 +948,20 @@ def count_entity_keys(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.list_entity_trait_definitions( + # entity_type: "company", + # ids: ["ids"], + # q: "q", + # trait_type: "boolean", + # trait_types: ["boolean"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::ListEntityTraitDefinitionsResponse] def list_entity_trait_definitions(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[entity_type ids q trait_type trait_types limit offset] query_params = {} query_params["entity_type"] = params[:entity_type] if params.key?(:entity_type) query_params["ids"] = params[:ids] if params.key?(:ids) @@ -830,7 +970,6 @@ def list_entity_trait_definitions(request_options: {}, **params) query_params["trait_types"] = params[:trait_types] if params.key?(:trait_types) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -861,6 +1000,13 @@ def list_entity_trait_definitions(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.get_or_create_entity_trait_definition( + # entity_type: "company", + # hierarchy: ["hierarchy"], + # trait_type: "boolean" + # ) + # # @return [Schematic::Companies::Types::GetOrCreateEntityTraitDefinitionResponse] def get_or_create_entity_trait_definition(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -894,6 +1040,9 @@ def get_or_create_entity_trait_definition(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :entity_trait_definition_id # + # @example + # client.companies.get_entity_trait_definition(entity_trait_definition_id: "entity_trait_definition_id") + # # @return [Schematic::Companies::Types::GetEntityTraitDefinitionResponse] def get_entity_trait_definition(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -926,11 +1075,17 @@ def get_entity_trait_definition(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :entity_trait_definition_id # + # @example + # client.companies.update_entity_trait_definition( + # entity_trait_definition_id: "entity_trait_definition_id", + # trait_type: "boolean" + # ) + # # @return [Schematic::Companies::Types::UpdateEntityTraitDefinitionResponse] def update_entity_trait_definition(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Companies::Types::UpdateEntityTraitDefinitionRequestBody.new(params).to_h - non_body_param_names = ["entity_trait_definition_id"] + non_body_param_names = %w[entity_trait_definition_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -963,6 +1118,9 @@ def update_entity_trait_definition(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :entity_trait_definition_id # + # @example + # client.companies.delete_entity_trait_definition(entity_trait_definition_id: "entity_trait_definition_id") + # # @return [Schematic::Companies::Types::DeleteEntityTraitDefinitionResponse] def delete_entity_trait_definition(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -995,6 +1153,9 @@ def delete_entity_trait_definition(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :entity_trait_definition_id # + # @example + # client.companies.get_entity_trait_definition_usage(entity_trait_definition_id: "entity_trait_definition_id") + # # @return [Schematic::Companies::Types::GetEntityTraitDefinitionUsageResponse] def get_entity_trait_definition_usage(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1033,10 +1194,20 @@ def get_entity_trait_definition_usage(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.count_entity_trait_definitions( + # entity_type: "company", + # ids: ["ids"], + # q: "q", + # trait_type: "boolean", + # trait_types: ["boolean"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::CountEntityTraitDefinitionsResponse] def count_entity_trait_definitions(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[entity_type ids q trait_type trait_types limit offset] query_params = {} query_params["entity_type"] = params[:entity_type] if params.key?(:entity_type) query_params["ids"] = params[:ids] if params.key?(:ids) @@ -1045,7 +1216,6 @@ def count_entity_trait_definitions(request_options: {}, **params) query_params["trait_types"] = params[:trait_types] if params.key?(:trait_types) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1080,16 +1250,22 @@ def count_entity_trait_definitions(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.get_entity_trait_values( + # definition_id: "definition_id", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::GetEntityTraitValuesResponse] def get_entity_trait_values(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[definition_id q limit offset] query_params = {} query_params["definition_id"] = params[:definition_id] if params.key?(:definition_id) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1124,16 +1300,22 @@ def get_entity_trait_values(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.count_entity_traits( + # definition_id: "definition_id", + # entity_type: "company", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::CountEntityTraitsResponse] def count_entity_traits(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[definition_id entity_type limit offset] query_params = {} query_params["definition_id"] = params[:definition_id] if params.key?(:definition_id) query_params["entity_type"] = params[:entity_type] if params.key?(:entity_type) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1170,10 +1352,19 @@ def count_entity_traits(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.list_plan_changes( + # action: "checkout", + # base_plan_action: "fallback", + # company_id: "company_id", + # company_ids: ["company_ids"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::ListPlanChangesResponse] def list_plan_changes(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[action base_plan_action company_id company_ids limit offset] query_params = {} query_params["action"] = params[:action] if params.key?(:action) query_params["base_plan_action"] = params[:base_plan_action] if params.key?(:base_plan_action) @@ -1181,7 +1372,6 @@ def list_plan_changes(request_options: {}, **params) query_params["company_ids"] = params[:company_ids] if params.key?(:company_ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1213,6 +1403,9 @@ def list_plan_changes(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_change_id # + # @example + # client.companies.get_plan_change(plan_change_id: "plan_change_id") + # # @return [Schematic::Companies::Types::GetPlanChangeResponse] def get_plan_change(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1250,10 +1443,19 @@ def get_plan_change(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.list_plan_traits( + # ids: ["ids"], + # plan_id: "plan_id", + # trait_id: "trait_id", + # trait_ids: ["trait_ids"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::ListPlanTraitsResponse] def list_plan_traits(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids plan_id trait_id trait_ids limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) @@ -1261,7 +1463,6 @@ def list_plan_traits(request_options: {}, **params) query_params["trait_ids"] = params[:trait_ids] if params.key?(:trait_ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1293,6 +1494,9 @@ def list_plan_traits(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_trait_id # + # @example + # client.companies.get_plan_trait(plan_trait_id: "plan_trait_id") + # # @return [Schematic::Companies::Types::GetPlanTraitResponse] def get_plan_trait(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1324,6 +1528,16 @@ def get_plan_trait(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.update_plan_traits_bulk( + # apply_to_existing_companies: true, + # plan_id: "plan_id", + # traits: [{ + # trait_id: "trait_id", + # trait_value: "trait_value" + # }] + # ) + # # @return [Schematic::Companies::Types::UpdatePlanTraitsBulkResponse] def update_plan_traits_bulk(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1362,10 +1576,19 @@ def update_plan_traits_bulk(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.count_plan_traits( + # ids: ["ids"], + # plan_id: "plan_id", + # trait_id: "trait_id", + # trait_ids: ["trait_ids"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::CountPlanTraitsResponse] def count_plan_traits(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids plan_id trait_id trait_ids limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) @@ -1373,7 +1596,6 @@ def count_plan_traits(request_options: {}, **params) query_params["trait_ids"] = params[:trait_ids] if params.key?(:trait_ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1404,6 +1626,14 @@ def count_plan_traits(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.upsert_user_trait( + # keys: { + # key: "value" + # }, + # trait: "trait" + # ) + # # @return [Schematic::Companies::Types::UpsertUserTraitResponse] def upsert_user_trait(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1442,10 +1672,19 @@ def upsert_user_trait(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.list_users( + # company_id: "company_id", + # ids: ["ids"], + # plan_id: "plan_id", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::ListUsersResponse] def list_users(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id ids plan_id q limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["ids"] = params[:ids] if params.key?(:ids) @@ -1453,7 +1692,6 @@ def list_users(request_options: {}, **params) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1484,6 +1722,11 @@ def list_users(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.upsert_user(keys: { + # key: "value" + # }) + # # @return [Schematic::Companies::Types::UpsertUserResponse] def upsert_user(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1517,6 +1760,9 @@ def upsert_user(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :user_id # + # @example + # client.companies.get_user(user_id: "user_id") + # # @return [Schematic::Companies::Types::GetUserResponse] def get_user(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1549,6 +1795,9 @@ def get_user(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :user_id # + # @example + # client.companies.delete_user(user_id: "user_id") + # # @return [Schematic::Companies::Types::DeleteUserResponse] def delete_user(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1586,10 +1835,19 @@ def delete_user(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.companies.count_users( + # company_id: "company_id", + # ids: ["ids"], + # plan_id: "plan_id", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Companies::Types::CountUsersResponse] def count_users(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id ids plan_id q limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["ids"] = params[:ids] if params.key?(:ids) @@ -1597,7 +1855,6 @@ def count_users(request_options: {}, **params) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1628,6 +1885,11 @@ def count_users(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.create_user(keys: { + # key: "value" + # }) + # # @return [Schematic::Companies::Types::CreateUserResponse] def create_user(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1660,6 +1922,11 @@ def create_user(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.companies.delete_user_by_keys(keys: { + # key: "value" + # }) + # # @return [Schematic::Companies::Types::DeleteUserByKeysResponse] def delete_user_by_keys(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -1693,13 +1960,16 @@ def delete_user_by_keys(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Hash[String, String]] :keys # + # @example + # client.companies.lookup_user(keys: { + # keys: "keys" + # }) + # # @return [Schematic::Companies::Types::LookupUserResponse] def lookup_user(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[keys] query_params = {} query_params["keys"] = params[:keys] if params.key?(:keys) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], diff --git a/lib/schematic/companies/types/count_companies_params.rb b/lib/schematic/companies/types/count_companies_params.rb index 9c70bec..096cbc5 100644 --- a/lib/schematic/companies/types/count_companies_params.rb +++ b/lib/schematic/companies/types/count_companies_params.rb @@ -6,24 +6,45 @@ module Types # Input parameters class CountCompaniesParams < Internal::Types::Model field :credit_type_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :plan_version_unpublished, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :sort_order_column, -> { String }, optional: true, nullable: false + field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false + field :subscription_statuses, -> { Internal::Types::Array[Schematic::Types::SubscriptionStatus] }, optional: true, nullable: false + field :subscription_types, -> { Internal::Types::Array[Schematic::Types::SubscriptionType] }, optional: true, nullable: false + field :with_entitlement_for, -> { String }, optional: true, nullable: false + field :with_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_feature_override_for, -> { String }, optional: true, nullable: false + field :without_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_companies_request.rb b/lib/schematic/companies/types/count_companies_request.rb index 21990bb..9c2ce89 100644 --- a/lib/schematic/companies/types/count_companies_request.rb +++ b/lib/schematic/companies/types/count_companies_request.rb @@ -5,24 +5,45 @@ module Companies module Types class CountCompaniesRequest < Internal::Types::Model field :credit_type_ids, -> { String }, optional: true, nullable: false + field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false + + field :plan_version_unpublished, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :sort_order_column, -> { String }, optional: true, nullable: false + field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false + field :subscription_statuses, -> { Schematic::Types::SubscriptionStatus }, optional: true, nullable: false + field :subscription_types, -> { Schematic::Types::SubscriptionType }, optional: true, nullable: false + field :with_entitlement_for, -> { String }, optional: true, nullable: false + field :without_feature_override_for, -> { String }, optional: true, nullable: false + field :without_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_companies_response.rb b/lib/schematic/companies/types/count_companies_response.rb index d97a8ef..1f5ad09 100644 --- a/lib/schematic/companies/types/count_companies_response.rb +++ b/lib/schematic/companies/types/count_companies_response.rb @@ -5,6 +5,7 @@ module Companies module Types class CountCompaniesResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::CountCompaniesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_key_definitions_params.rb b/lib/schematic/companies/types/count_entity_key_definitions_params.rb index 41b7e2d..a537000 100644 --- a/lib/schematic/companies/types/count_entity_key_definitions_params.rb +++ b/lib/schematic/companies/types/count_entity_key_definitions_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class CountEntityKeyDefinitionsParams < Internal::Types::Model field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_key_definitions_request.rb b/lib/schematic/companies/types/count_entity_key_definitions_request.rb index 0c57687..617a43d 100644 --- a/lib/schematic/companies/types/count_entity_key_definitions_request.rb +++ b/lib/schematic/companies/types/count_entity_key_definitions_request.rb @@ -5,9 +5,13 @@ module Companies module Types class CountEntityKeyDefinitionsRequest < Internal::Types::Model field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_key_definitions_response.rb b/lib/schematic/companies/types/count_entity_key_definitions_response.rb index 6d09aaf..d915aa3 100644 --- a/lib/schematic/companies/types/count_entity_key_definitions_response.rb +++ b/lib/schematic/companies/types/count_entity_key_definitions_response.rb @@ -5,6 +5,7 @@ module Companies module Types class CountEntityKeyDefinitionsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::CountEntityKeyDefinitionsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_keys_params.rb b/lib/schematic/companies/types/count_entity_keys_params.rb index faeff7a..bfd84f7 100644 --- a/lib/schematic/companies/types/count_entity_keys_params.rb +++ b/lib/schematic/companies/types/count_entity_keys_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class CountEntityKeysParams < Internal::Types::Model field :definition_id, -> { String }, optional: true, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_keys_request.rb b/lib/schematic/companies/types/count_entity_keys_request.rb index a64bb04..ab9636e 100644 --- a/lib/schematic/companies/types/count_entity_keys_request.rb +++ b/lib/schematic/companies/types/count_entity_keys_request.rb @@ -5,8 +5,11 @@ module Companies module Types class CountEntityKeysRequest < Internal::Types::Model field :definition_id, -> { String }, optional: true, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_keys_response.rb b/lib/schematic/companies/types/count_entity_keys_response.rb index 90d69d0..04238ce 100644 --- a/lib/schematic/companies/types/count_entity_keys_response.rb +++ b/lib/schematic/companies/types/count_entity_keys_response.rb @@ -5,6 +5,7 @@ module Companies module Types class CountEntityKeysResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::CountEntityKeysParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_trait_definitions_params.rb b/lib/schematic/companies/types/count_entity_trait_definitions_params.rb index 3c7d29e..08b3fe2 100644 --- a/lib/schematic/companies/types/count_entity_trait_definitions_params.rb +++ b/lib/schematic/companies/types/count_entity_trait_definitions_params.rb @@ -6,11 +6,17 @@ module Types # Input parameters class CountEntityTraitDefinitionsParams < Internal::Types::Model field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :trait_type, -> { Schematic::Types::TraitType }, optional: true, nullable: false + field :trait_types, -> { Internal::Types::Array[Schematic::Types::TraitType] }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_trait_definitions_request.rb b/lib/schematic/companies/types/count_entity_trait_definitions_request.rb index 043f1e8..61a4dc6 100644 --- a/lib/schematic/companies/types/count_entity_trait_definitions_request.rb +++ b/lib/schematic/companies/types/count_entity_trait_definitions_request.rb @@ -5,11 +5,17 @@ module Companies module Types class CountEntityTraitDefinitionsRequest < Internal::Types::Model field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :trait_type, -> { Schematic::Types::TraitType }, optional: true, nullable: false + field :trait_types, -> { Schematic::Types::TraitType }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_trait_definitions_response.rb b/lib/schematic/companies/types/count_entity_trait_definitions_response.rb index f2463eb..0d48e96 100644 --- a/lib/schematic/companies/types/count_entity_trait_definitions_response.rb +++ b/lib/schematic/companies/types/count_entity_trait_definitions_response.rb @@ -5,6 +5,7 @@ module Companies module Types class CountEntityTraitDefinitionsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::CountEntityTraitDefinitionsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_traits_params.rb b/lib/schematic/companies/types/count_entity_traits_params.rb index 5573f23..2915c7c 100644 --- a/lib/schematic/companies/types/count_entity_traits_params.rb +++ b/lib/schematic/companies/types/count_entity_traits_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class CountEntityTraitsParams < Internal::Types::Model field :definition_id, -> { String }, optional: true, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_traits_request.rb b/lib/schematic/companies/types/count_entity_traits_request.rb index eb6c4dd..d861379 100644 --- a/lib/schematic/companies/types/count_entity_traits_request.rb +++ b/lib/schematic/companies/types/count_entity_traits_request.rb @@ -5,8 +5,11 @@ module Companies module Types class CountEntityTraitsRequest < Internal::Types::Model field :definition_id, -> { String }, optional: true, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_entity_traits_response.rb b/lib/schematic/companies/types/count_entity_traits_response.rb index e30086e..dfbd0c5 100644 --- a/lib/schematic/companies/types/count_entity_traits_response.rb +++ b/lib/schematic/companies/types/count_entity_traits_response.rb @@ -5,6 +5,7 @@ module Companies module Types class CountEntityTraitsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::CountEntityTraitsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/count_plan_traits_params.rb b/lib/schematic/companies/types/count_plan_traits_params.rb index 5fc4a02..d26db38 100644 --- a/lib/schematic/companies/types/count_plan_traits_params.rb +++ b/lib/schematic/companies/types/count_plan_traits_params.rb @@ -6,10 +6,15 @@ module Types # Input parameters class CountPlanTraitsParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :trait_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_plan_traits_request.rb b/lib/schematic/companies/types/count_plan_traits_request.rb index 65bb1e7..77862c8 100644 --- a/lib/schematic/companies/types/count_plan_traits_request.rb +++ b/lib/schematic/companies/types/count_plan_traits_request.rb @@ -5,10 +5,15 @@ module Companies module Types class CountPlanTraitsRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :trait_ids, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_plan_traits_response.rb b/lib/schematic/companies/types/count_plan_traits_response.rb index ad44ac4..1474201 100644 --- a/lib/schematic/companies/types/count_plan_traits_response.rb +++ b/lib/schematic/companies/types/count_plan_traits_response.rb @@ -5,6 +5,7 @@ module Companies module Types class CountPlanTraitsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::CountPlanTraitsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/count_users_params.rb b/lib/schematic/companies/types/count_users_params.rb index cd9b726..9815271 100644 --- a/lib/schematic/companies/types/count_users_params.rb +++ b/lib/schematic/companies/types/count_users_params.rb @@ -6,10 +6,15 @@ module Types # Input parameters class CountUsersParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_users_request.rb b/lib/schematic/companies/types/count_users_request.rb index 33b7352..37b1ddb 100644 --- a/lib/schematic/companies/types/count_users_request.rb +++ b/lib/schematic/companies/types/count_users_request.rb @@ -5,10 +5,15 @@ module Companies module Types class CountUsersRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/count_users_response.rb b/lib/schematic/companies/types/count_users_response.rb index f035794..c4cceb1 100644 --- a/lib/schematic/companies/types/count_users_response.rb +++ b/lib/schematic/companies/types/count_users_response.rb @@ -5,6 +5,7 @@ module Companies module Types class CountUsersResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::CountUsersParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/create_company_response.rb b/lib/schematic/companies/types/create_company_response.rb index 871cd6d..856b743 100644 --- a/lib/schematic/companies/types/create_company_response.rb +++ b/lib/schematic/companies/types/create_company_response.rb @@ -5,6 +5,7 @@ module Companies module Types class CreateCompanyResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/create_entity_trait_definition_request_body.rb b/lib/schematic/companies/types/create_entity_trait_definition_request_body.rb index 597893d..4f20653 100644 --- a/lib/schematic/companies/types/create_entity_trait_definition_request_body.rb +++ b/lib/schematic/companies/types/create_entity_trait_definition_request_body.rb @@ -5,8 +5,11 @@ module Companies module Types class CreateEntityTraitDefinitionRequestBody < Internal::Types::Model field :display_name, -> { String }, optional: true, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: false, nullable: false + field :hierarchy, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :trait_type, -> { Schematic::Types::TraitType }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/create_user_response.rb b/lib/schematic/companies/types/create_user_response.rb index 36f2983..97246b2 100644 --- a/lib/schematic/companies/types/create_user_response.rb +++ b/lib/schematic/companies/types/create_user_response.rb @@ -5,6 +5,7 @@ module Companies module Types class CreateUserResponse < Internal::Types::Model field :data, -> { Schematic::Types::UserDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/delete_company_by_keys_response.rb b/lib/schematic/companies/types/delete_company_by_keys_response.rb index 9095b55..55a0959 100644 --- a/lib/schematic/companies/types/delete_company_by_keys_response.rb +++ b/lib/schematic/companies/types/delete_company_by_keys_response.rb @@ -5,6 +5,7 @@ module Companies module Types class DeleteCompanyByKeysResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/delete_company_membership_response.rb b/lib/schematic/companies/types/delete_company_membership_response.rb index 6d829e2..391678c 100644 --- a/lib/schematic/companies/types/delete_company_membership_response.rb +++ b/lib/schematic/companies/types/delete_company_membership_response.rb @@ -5,6 +5,7 @@ module Companies module Types class DeleteCompanyMembershipResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/delete_company_params.rb b/lib/schematic/companies/types/delete_company_params.rb index 0ce6d60..8145510 100644 --- a/lib/schematic/companies/types/delete_company_params.rb +++ b/lib/schematic/companies/types/delete_company_params.rb @@ -6,6 +6,7 @@ module Types # Input parameters class DeleteCompanyParams < Internal::Types::Model field :cancel_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :prorate, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/delete_company_request.rb b/lib/schematic/companies/types/delete_company_request.rb index 1ee9373..7d7aeff 100644 --- a/lib/schematic/companies/types/delete_company_request.rb +++ b/lib/schematic/companies/types/delete_company_request.rb @@ -5,7 +5,9 @@ module Companies module Types class DeleteCompanyRequest < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :cancel_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :prorate, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/delete_company_response.rb b/lib/schematic/companies/types/delete_company_response.rb index d2bfab8..149bb61 100644 --- a/lib/schematic/companies/types/delete_company_response.rb +++ b/lib/schematic/companies/types/delete_company_response.rb @@ -5,6 +5,7 @@ module Companies module Types class DeleteCompanyResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::DeleteCompanyParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/delete_entity_key_definition_response.rb b/lib/schematic/companies/types/delete_entity_key_definition_response.rb index 22e8ae5..750e942 100644 --- a/lib/schematic/companies/types/delete_entity_key_definition_response.rb +++ b/lib/schematic/companies/types/delete_entity_key_definition_response.rb @@ -5,6 +5,7 @@ module Companies module Types class DeleteEntityKeyDefinitionResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/delete_entity_trait_definition_response.rb b/lib/schematic/companies/types/delete_entity_trait_definition_response.rb index 2e3ca7c..261901c 100644 --- a/lib/schematic/companies/types/delete_entity_trait_definition_response.rb +++ b/lib/schematic/companies/types/delete_entity_trait_definition_response.rb @@ -5,6 +5,7 @@ module Companies module Types class DeleteEntityTraitDefinitionResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/delete_user_by_keys_response.rb b/lib/schematic/companies/types/delete_user_by_keys_response.rb index 1e11c47..b2d41d9 100644 --- a/lib/schematic/companies/types/delete_user_by_keys_response.rb +++ b/lib/schematic/companies/types/delete_user_by_keys_response.rb @@ -5,6 +5,7 @@ module Companies module Types class DeleteUserByKeysResponse < Internal::Types::Model field :data, -> { Schematic::Types::UserResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/delete_user_response.rb b/lib/schematic/companies/types/delete_user_response.rb index c8ebcb9..42ed3bc 100644 --- a/lib/schematic/companies/types/delete_user_response.rb +++ b/lib/schematic/companies/types/delete_user_response.rb @@ -5,6 +5,7 @@ module Companies module Types class DeleteUserResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_active_company_subscription_params.rb b/lib/schematic/companies/types/get_active_company_subscription_params.rb index fa794a4..394e7a4 100644 --- a/lib/schematic/companies/types/get_active_company_subscription_params.rb +++ b/lib/schematic/companies/types/get_active_company_subscription_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class GetActiveCompanySubscriptionParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/get_active_company_subscription_request.rb b/lib/schematic/companies/types/get_active_company_subscription_request.rb index acf11e2..52562cb 100644 --- a/lib/schematic/companies/types/get_active_company_subscription_request.rb +++ b/lib/schematic/companies/types/get_active_company_subscription_request.rb @@ -5,8 +5,11 @@ module Companies module Types class GetActiveCompanySubscriptionRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/get_active_company_subscription_response.rb b/lib/schematic/companies/types/get_active_company_subscription_response.rb index a30fde6..c757cda 100644 --- a/lib/schematic/companies/types/get_active_company_subscription_response.rb +++ b/lib/schematic/companies/types/get_active_company_subscription_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetActiveCompanySubscriptionResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CompanySubscriptionResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::GetActiveCompanySubscriptionParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_billing_entity_child_subscriptions_request.rb b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_request.rb index dacfe34..b713033 100644 --- a/lib/schematic/companies/types/get_billing_entity_child_subscriptions_request.rb +++ b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_request.rb @@ -4,7 +4,7 @@ module Schematic module Companies module Types class GetBillingEntityChildSubscriptionsRequest < Internal::Types::Model - field :company_id, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false end end end diff --git a/lib/schematic/companies/types/get_billing_entity_child_subscriptions_response.rb b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_response.rb index 27fa9d8..635d0bc 100644 --- a/lib/schematic/companies/types/get_billing_entity_child_subscriptions_response.rb +++ b/lib/schematic/companies/types/get_billing_entity_child_subscriptions_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetBillingEntityChildSubscriptionsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CompanyBillingEntitySubscriptionResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::GetBillingEntityChildSubscriptionsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_company_billing_entity_request.rb b/lib/schematic/companies/types/get_company_billing_entity_request.rb index ad748b3..e21b722 100644 --- a/lib/schematic/companies/types/get_company_billing_entity_request.rb +++ b/lib/schematic/companies/types/get_company_billing_entity_request.rb @@ -4,7 +4,7 @@ module Schematic module Companies module Types class GetCompanyBillingEntityRequest < Internal::Types::Model - field :company_id, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false end end end diff --git a/lib/schematic/companies/types/get_company_billing_entity_response.rb b/lib/schematic/companies/types/get_company_billing_entity_response.rb index 20b9b9a..4b8b27b 100644 --- a/lib/schematic/companies/types/get_company_billing_entity_response.rb +++ b/lib/schematic/companies/types/get_company_billing_entity_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetCompanyBillingEntityResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CompanyBillingEntityResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::GetCompanyBillingEntityParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_company_response.rb b/lib/schematic/companies/types/get_company_response.rb index 55831b5..951c85c 100644 --- a/lib/schematic/companies/types/get_company_response.rb +++ b/lib/schematic/companies/types/get_company_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetCompanyResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_entity_trait_definition_response.rb b/lib/schematic/companies/types/get_entity_trait_definition_response.rb index 404cc7b..595cc6c 100644 --- a/lib/schematic/companies/types/get_entity_trait_definition_response.rb +++ b/lib/schematic/companies/types/get_entity_trait_definition_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetEntityTraitDefinitionResponse < Internal::Types::Model field :data, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_entity_trait_definition_usage_response.rb b/lib/schematic/companies/types/get_entity_trait_definition_usage_response.rb index 9c4fce8..8465cf9 100644 --- a/lib/schematic/companies/types/get_entity_trait_definition_usage_response.rb +++ b/lib/schematic/companies/types/get_entity_trait_definition_usage_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetEntityTraitDefinitionUsageResponse < Internal::Types::Model field :data, -> { Schematic::Types::EntityTraitDefinitionUsage }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_entity_trait_values_params.rb b/lib/schematic/companies/types/get_entity_trait_values_params.rb index d438790..acda260 100644 --- a/lib/schematic/companies/types/get_entity_trait_values_params.rb +++ b/lib/schematic/companies/types/get_entity_trait_values_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class GetEntityTraitValuesParams < Internal::Types::Model field :definition_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/get_entity_trait_values_request.rb b/lib/schematic/companies/types/get_entity_trait_values_request.rb index 97193aa..52057f9 100644 --- a/lib/schematic/companies/types/get_entity_trait_values_request.rb +++ b/lib/schematic/companies/types/get_entity_trait_values_request.rb @@ -5,8 +5,11 @@ module Companies module Types class GetEntityTraitValuesRequest < Internal::Types::Model field :definition_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/get_entity_trait_values_response.rb b/lib/schematic/companies/types/get_entity_trait_values_response.rb index a7734be..e21dbc6 100644 --- a/lib/schematic/companies/types/get_entity_trait_values_response.rb +++ b/lib/schematic/companies/types/get_entity_trait_values_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetEntityTraitValuesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::EntityTraitValue] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::GetEntityTraitValuesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_or_create_company_membership_request_body.rb b/lib/schematic/companies/types/get_or_create_company_membership_request_body.rb index ed63cef..51d681c 100644 --- a/lib/schematic/companies/types/get_or_create_company_membership_request_body.rb +++ b/lib/schematic/companies/types/get_or_create_company_membership_request_body.rb @@ -5,6 +5,7 @@ module Companies module Types class GetOrCreateCompanyMembershipRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :user_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_or_create_company_membership_response.rb b/lib/schematic/companies/types/get_or_create_company_membership_response.rb index 6b413fc..a14030b 100644 --- a/lib/schematic/companies/types/get_or_create_company_membership_response.rb +++ b/lib/schematic/companies/types/get_or_create_company_membership_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetOrCreateCompanyMembershipResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyMembershipDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_or_create_entity_trait_definition_response.rb b/lib/schematic/companies/types/get_or_create_entity_trait_definition_response.rb index 416dee2..d20f6bd 100644 --- a/lib/schematic/companies/types/get_or_create_entity_trait_definition_response.rb +++ b/lib/schematic/companies/types/get_or_create_entity_trait_definition_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetOrCreateEntityTraitDefinitionResponse < Internal::Types::Model field :data, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_plan_change_response.rb b/lib/schematic/companies/types/get_plan_change_response.rb index eca822f..ae04a5f 100644 --- a/lib/schematic/companies/types/get_plan_change_response.rb +++ b/lib/schematic/companies/types/get_plan_change_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetPlanChangeResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanChangeResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_plan_trait_response.rb b/lib/schematic/companies/types/get_plan_trait_response.rb index 7a9a53e..ef7fc22 100644 --- a/lib/schematic/companies/types/get_plan_trait_response.rb +++ b/lib/schematic/companies/types/get_plan_trait_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetPlanTraitResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanTraitResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/get_user_response.rb b/lib/schematic/companies/types/get_user_response.rb index e394ffb..e992298 100644 --- a/lib/schematic/companies/types/get_user_response.rb +++ b/lib/schematic/companies/types/get_user_response.rb @@ -5,6 +5,7 @@ module Companies module Types class GetUserResponse < Internal::Types::Model field :data, -> { Schematic::Types::UserDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/list_companies_params.rb b/lib/schematic/companies/types/list_companies_params.rb index 99f9905..bdbf7b4 100644 --- a/lib/schematic/companies/types/list_companies_params.rb +++ b/lib/schematic/companies/types/list_companies_params.rb @@ -6,24 +6,45 @@ module Types # Input parameters class ListCompaniesParams < Internal::Types::Model field :credit_type_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :plan_version_unpublished, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :sort_order_column, -> { String }, optional: true, nullable: false + field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false + field :subscription_statuses, -> { Internal::Types::Array[Schematic::Types::SubscriptionStatus] }, optional: true, nullable: false + field :subscription_types, -> { Internal::Types::Array[Schematic::Types::SubscriptionType] }, optional: true, nullable: false + field :with_entitlement_for, -> { String }, optional: true, nullable: false + field :with_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_feature_override_for, -> { String }, optional: true, nullable: false + field :without_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_companies_request.rb b/lib/schematic/companies/types/list_companies_request.rb index 552f34e..216c14e 100644 --- a/lib/schematic/companies/types/list_companies_request.rb +++ b/lib/schematic/companies/types/list_companies_request.rb @@ -5,24 +5,45 @@ module Companies module Types class ListCompaniesRequest < Internal::Types::Model field :credit_type_ids, -> { String }, optional: true, nullable: false + field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false + + field :plan_version_unpublished, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :sort_order_column, -> { String }, optional: true, nullable: false + field :sort_order_direction, -> { Schematic::Types::SortDirection }, optional: true, nullable: false + field :subscription_statuses, -> { Schematic::Types::SubscriptionStatus }, optional: true, nullable: false + field :subscription_types, -> { Schematic::Types::SubscriptionType }, optional: true, nullable: false + field :with_entitlement_for, -> { String }, optional: true, nullable: false + field :without_feature_override_for, -> { String }, optional: true, nullable: false + field :without_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :with_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_companies_response.rb b/lib/schematic/companies/types/list_companies_response.rb index 3a92ada..eab2ea6 100644 --- a/lib/schematic/companies/types/list_companies_response.rb +++ b/lib/schematic/companies/types/list_companies_response.rb @@ -5,6 +5,7 @@ module Companies module Types class ListCompaniesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CompanyDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::ListCompaniesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/list_company_memberships_params.rb b/lib/schematic/companies/types/list_company_memberships_params.rb index 9559554..352f702 100644 --- a/lib/schematic/companies/types/list_company_memberships_params.rb +++ b/lib/schematic/companies/types/list_company_memberships_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListCompanyMembershipsParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_company_memberships_request.rb b/lib/schematic/companies/types/list_company_memberships_request.rb index b492f7d..72b0cf9 100644 --- a/lib/schematic/companies/types/list_company_memberships_request.rb +++ b/lib/schematic/companies/types/list_company_memberships_request.rb @@ -5,8 +5,11 @@ module Companies module Types class ListCompanyMembershipsRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_company_memberships_response.rb b/lib/schematic/companies/types/list_company_memberships_response.rb index f9789f0..e296032 100644 --- a/lib/schematic/companies/types/list_company_memberships_response.rb +++ b/lib/schematic/companies/types/list_company_memberships_response.rb @@ -5,6 +5,7 @@ module Companies module Types class ListCompanyMembershipsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CompanyMembershipDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::ListCompanyMembershipsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/list_entity_key_definitions_params.rb b/lib/schematic/companies/types/list_entity_key_definitions_params.rb index 2cfd6cf..2fcc918 100644 --- a/lib/schematic/companies/types/list_entity_key_definitions_params.rb +++ b/lib/schematic/companies/types/list_entity_key_definitions_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class ListEntityKeyDefinitionsParams < Internal::Types::Model field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_entity_key_definitions_request.rb b/lib/schematic/companies/types/list_entity_key_definitions_request.rb index 25bf86c..f3aee93 100644 --- a/lib/schematic/companies/types/list_entity_key_definitions_request.rb +++ b/lib/schematic/companies/types/list_entity_key_definitions_request.rb @@ -5,9 +5,13 @@ module Companies module Types class ListEntityKeyDefinitionsRequest < Internal::Types::Model field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_entity_key_definitions_response.rb b/lib/schematic/companies/types/list_entity_key_definitions_response.rb index fbfaade..9a69d51 100644 --- a/lib/schematic/companies/types/list_entity_key_definitions_response.rb +++ b/lib/schematic/companies/types/list_entity_key_definitions_response.rb @@ -5,6 +5,7 @@ module Companies module Types class ListEntityKeyDefinitionsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::EntityKeyDefinitionResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::ListEntityKeyDefinitionsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/list_entity_trait_definitions_params.rb b/lib/schematic/companies/types/list_entity_trait_definitions_params.rb index 68c53c7..117f754 100644 --- a/lib/schematic/companies/types/list_entity_trait_definitions_params.rb +++ b/lib/schematic/companies/types/list_entity_trait_definitions_params.rb @@ -6,11 +6,17 @@ module Types # Input parameters class ListEntityTraitDefinitionsParams < Internal::Types::Model field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :trait_type, -> { Schematic::Types::TraitType }, optional: true, nullable: false + field :trait_types, -> { Internal::Types::Array[Schematic::Types::TraitType] }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_entity_trait_definitions_request.rb b/lib/schematic/companies/types/list_entity_trait_definitions_request.rb index 6a69b92..d87b9e7 100644 --- a/lib/schematic/companies/types/list_entity_trait_definitions_request.rb +++ b/lib/schematic/companies/types/list_entity_trait_definitions_request.rb @@ -5,11 +5,17 @@ module Companies module Types class ListEntityTraitDefinitionsRequest < Internal::Types::Model field :entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :trait_type, -> { Schematic::Types::TraitType }, optional: true, nullable: false + field :trait_types, -> { Schematic::Types::TraitType }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_entity_trait_definitions_response.rb b/lib/schematic/companies/types/list_entity_trait_definitions_response.rb index bbd4826..99090db 100644 --- a/lib/schematic/companies/types/list_entity_trait_definitions_response.rb +++ b/lib/schematic/companies/types/list_entity_trait_definitions_response.rb @@ -5,6 +5,7 @@ module Companies module Types class ListEntityTraitDefinitionsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::EntityTraitDefinitionResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::ListEntityTraitDefinitionsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/list_plan_changes_params.rb b/lib/schematic/companies/types/list_plan_changes_params.rb index 82a325b..29097c2 100644 --- a/lib/schematic/companies/types/list_plan_changes_params.rb +++ b/lib/schematic/companies/types/list_plan_changes_params.rb @@ -6,10 +6,15 @@ module Types # Input parameters class ListPlanChangesParams < Internal::Types::Model field :action, -> { Schematic::Types::PlanChangeAction }, optional: true, nullable: false + field :base_plan_action, -> { Schematic::Types::PlanChangeBasePlanAction }, optional: true, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_plan_changes_request.rb b/lib/schematic/companies/types/list_plan_changes_request.rb index 5062484..be3a13a 100644 --- a/lib/schematic/companies/types/list_plan_changes_request.rb +++ b/lib/schematic/companies/types/list_plan_changes_request.rb @@ -5,10 +5,15 @@ module Companies module Types class ListPlanChangesRequest < Internal::Types::Model field :action, -> { Schematic::Types::PlanChangeAction }, optional: true, nullable: false + field :base_plan_action, -> { Schematic::Types::PlanChangeBasePlanAction }, optional: true, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_plan_changes_response.rb b/lib/schematic/companies/types/list_plan_changes_response.rb index 958f98e..eec87e2 100644 --- a/lib/schematic/companies/types/list_plan_changes_response.rb +++ b/lib/schematic/companies/types/list_plan_changes_response.rb @@ -5,6 +5,7 @@ module Companies module Types class ListPlanChangesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanChangeResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::ListPlanChangesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/list_plan_traits_params.rb b/lib/schematic/companies/types/list_plan_traits_params.rb index 3506d8c..eed0a97 100644 --- a/lib/schematic/companies/types/list_plan_traits_params.rb +++ b/lib/schematic/companies/types/list_plan_traits_params.rb @@ -6,10 +6,15 @@ module Types # Input parameters class ListPlanTraitsParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :trait_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_plan_traits_request.rb b/lib/schematic/companies/types/list_plan_traits_request.rb index 5acbc34..f6c5850 100644 --- a/lib/schematic/companies/types/list_plan_traits_request.rb +++ b/lib/schematic/companies/types/list_plan_traits_request.rb @@ -5,10 +5,15 @@ module Companies module Types class ListPlanTraitsRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :trait_ids, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_plan_traits_response.rb b/lib/schematic/companies/types/list_plan_traits_response.rb index 5d7cf15..f9cee04 100644 --- a/lib/schematic/companies/types/list_plan_traits_response.rb +++ b/lib/schematic/companies/types/list_plan_traits_response.rb @@ -5,6 +5,7 @@ module Companies module Types class ListPlanTraitsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanTraitResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::ListPlanTraitsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/list_users_params.rb b/lib/schematic/companies/types/list_users_params.rb index 9edc62e..4f01181 100644 --- a/lib/schematic/companies/types/list_users_params.rb +++ b/lib/schematic/companies/types/list_users_params.rb @@ -6,10 +6,15 @@ module Types # Input parameters class ListUsersParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_users_request.rb b/lib/schematic/companies/types/list_users_request.rb index 2327a3d..43031de 100644 --- a/lib/schematic/companies/types/list_users_request.rb +++ b/lib/schematic/companies/types/list_users_request.rb @@ -5,10 +5,15 @@ module Companies module Types class ListUsersRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/companies/types/list_users_response.rb b/lib/schematic/companies/types/list_users_response.rb index b5fb2df..75f857b 100644 --- a/lib/schematic/companies/types/list_users_response.rb +++ b/lib/schematic/companies/types/list_users_response.rb @@ -5,6 +5,7 @@ module Companies module Types class ListUsersResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::UserDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::ListUsersParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/lookup_company_response.rb b/lib/schematic/companies/types/lookup_company_response.rb index fdbfa72..0d6ed47 100644 --- a/lib/schematic/companies/types/lookup_company_response.rb +++ b/lib/schematic/companies/types/lookup_company_response.rb @@ -5,6 +5,7 @@ module Companies module Types class LookupCompanyResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyDetailResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::LookupCompanyParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/lookup_user_response.rb b/lib/schematic/companies/types/lookup_user_response.rb index ddf4ae5..cc86158 100644 --- a/lib/schematic/companies/types/lookup_user_response.rb +++ b/lib/schematic/companies/types/lookup_user_response.rb @@ -5,6 +5,7 @@ module Companies module Types class LookupUserResponse < Internal::Types::Model field :data, -> { Schematic::Types::UserDetailResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Companies::Types::LookupUserParams }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/update_entity_trait_definition_request_body.rb b/lib/schematic/companies/types/update_entity_trait_definition_request_body.rb index 7fe7136..cd944bc 100644 --- a/lib/schematic/companies/types/update_entity_trait_definition_request_body.rb +++ b/lib/schematic/companies/types/update_entity_trait_definition_request_body.rb @@ -5,7 +5,9 @@ module Companies module Types class UpdateEntityTraitDefinitionRequestBody < Internal::Types::Model field :entity_trait_definition_id, -> { String }, optional: false, nullable: false + field :display_name, -> { String }, optional: true, nullable: false + field :trait_type, -> { Schematic::Types::TraitType }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/update_entity_trait_definition_response.rb b/lib/schematic/companies/types/update_entity_trait_definition_response.rb index 78b320f..2b44c59 100644 --- a/lib/schematic/companies/types/update_entity_trait_definition_response.rb +++ b/lib/schematic/companies/types/update_entity_trait_definition_response.rb @@ -5,6 +5,7 @@ module Companies module Types class UpdateEntityTraitDefinitionResponse < Internal::Types::Model field :data, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/update_plan_trait_bulk_request_body.rb b/lib/schematic/companies/types/update_plan_trait_bulk_request_body.rb index 3d6a819..2fa2de6 100644 --- a/lib/schematic/companies/types/update_plan_trait_bulk_request_body.rb +++ b/lib/schematic/companies/types/update_plan_trait_bulk_request_body.rb @@ -5,7 +5,9 @@ module Companies module Types class UpdatePlanTraitBulkRequestBody < Internal::Types::Model field :apply_to_existing_companies, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :traits, -> { Internal::Types::Array[Schematic::Types::UpdatePlanTraitTraitRequestBody] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/update_plan_traits_bulk_response.rb b/lib/schematic/companies/types/update_plan_traits_bulk_response.rb index afe32b8..ff1b38f 100644 --- a/lib/schematic/companies/types/update_plan_traits_bulk_response.rb +++ b/lib/schematic/companies/types/update_plan_traits_bulk_response.rb @@ -5,6 +5,7 @@ module Companies module Types class UpdatePlanTraitsBulkResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanTraitResponseData] }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/upsert_company_response.rb b/lib/schematic/companies/types/upsert_company_response.rb index 01e7b20..9d766c7 100644 --- a/lib/schematic/companies/types/upsert_company_response.rb +++ b/lib/schematic/companies/types/upsert_company_response.rb @@ -5,6 +5,7 @@ module Companies module Types class UpsertCompanyResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/upsert_company_trait_response.rb b/lib/schematic/companies/types/upsert_company_trait_response.rb index d4cccb3..e21aab6 100644 --- a/lib/schematic/companies/types/upsert_company_trait_response.rb +++ b/lib/schematic/companies/types/upsert_company_trait_response.rb @@ -5,6 +5,7 @@ module Companies module Types class UpsertCompanyTraitResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/upsert_user_response.rb b/lib/schematic/companies/types/upsert_user_response.rb index 8b03b2b..ec5920c 100644 --- a/lib/schematic/companies/types/upsert_user_response.rb +++ b/lib/schematic/companies/types/upsert_user_response.rb @@ -5,6 +5,7 @@ module Companies module Types class UpsertUserResponse < Internal::Types::Model field :data, -> { Schematic::Types::UserDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/companies/types/upsert_user_trait_response.rb b/lib/schematic/companies/types/upsert_user_trait_response.rb index 92ad120..1e668f7 100644 --- a/lib/schematic/companies/types/upsert_user_trait_response.rb +++ b/lib/schematic/companies/types/upsert_user_trait_response.rb @@ -5,6 +5,7 @@ module Companies module Types class UpsertUserTraitResponse < Internal::Types::Model field :data, -> { Schematic::Types::UserDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/components/client.rb b/lib/schematic/components/client.rb index 6f80c36..c2d6de4 100644 --- a/lib/schematic/components/client.rb +++ b/lib/schematic/components/client.rb @@ -21,15 +21,20 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.components.list_components( + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Components::Types::ListComponentsResponse] def list_components(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[q limit offset] query_params = {} query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -60,6 +65,12 @@ def list_components(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.components.create_component( + # entity_type: "billing", + # name: "name" + # ) + # # @return [Schematic::Components::Types::CreateComponentResponse] def create_component(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -93,6 +104,9 @@ def create_component(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :component_id # + # @example + # client.components.get_component(component_id: "component_id") + # # @return [Schematic::Components::Types::GetComponentResponse] def get_component(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -125,11 +139,14 @@ def get_component(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :component_id # + # @example + # client.components.update_component(component_id: "component_id") + # # @return [Schematic::Components::Types::UpdateComponentResponse] def update_component(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Components::Types::UpdateComponentRequestBody.new(params).to_h - non_body_param_names = ["component_id"] + non_body_param_names = %w[component_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -162,6 +179,9 @@ def update_component(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :component_id # + # @example + # client.components.delete_component(component_id: "component_id") + # # @return [Schematic::Components::Types::DeleteComponentResponse] def delete_component(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -194,11 +214,14 @@ def delete_component(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :component_id # + # @example + # client.components.bind_catalog(component_id: "component_id") + # # @return [Schematic::Components::Types::BindCatalogResponse] def bind_catalog(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Components::Types::BindCatalogRequestBody.new(params).to_h - non_body_param_names = ["component_id"] + non_body_param_names = %w[component_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -233,15 +256,20 @@ def bind_catalog(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.components.count_components( + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Components::Types::CountComponentsResponse] def count_components(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[q limit offset] query_params = {} query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -274,14 +302,18 @@ def count_components(request_options: {}, **params) # @option params [String, nil] :company_id # @option params [String, nil] :component_id # + # @example + # client.components.preview_component_data( + # company_id: "company_id", + # component_id: "component_id" + # ) + # # @return [Schematic::Components::Types::PreviewComponentDataResponse] def preview_component_data(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id component_id] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["component_id"] = params[:component_id] if params.key?(:component_id) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], diff --git a/lib/schematic/components/types/bind_catalog_request_body.rb b/lib/schematic/components/types/bind_catalog_request_body.rb index 3becfe5..1e48a5e 100644 --- a/lib/schematic/components/types/bind_catalog_request_body.rb +++ b/lib/schematic/components/types/bind_catalog_request_body.rb @@ -5,6 +5,7 @@ module Components module Types class BindCatalogRequestBody < Internal::Types::Model field :component_id, -> { String }, optional: false, nullable: false + field :catalog_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/components/types/bind_catalog_response.rb b/lib/schematic/components/types/bind_catalog_response.rb index baf1d10..edc237a 100644 --- a/lib/schematic/components/types/bind_catalog_response.rb +++ b/lib/schematic/components/types/bind_catalog_response.rb @@ -5,6 +5,7 @@ module Components module Types class BindCatalogResponse < Internal::Types::Model field :data, -> { Schematic::Types::ComponentResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/components/types/count_components_params.rb b/lib/schematic/components/types/count_components_params.rb index 07151de..baf4932 100644 --- a/lib/schematic/components/types/count_components_params.rb +++ b/lib/schematic/components/types/count_components_params.rb @@ -6,7 +6,9 @@ module Types # Input parameters class CountComponentsParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/components/types/count_components_request.rb b/lib/schematic/components/types/count_components_request.rb index 97d2b9d..de884c1 100644 --- a/lib/schematic/components/types/count_components_request.rb +++ b/lib/schematic/components/types/count_components_request.rb @@ -5,7 +5,9 @@ module Components module Types class CountComponentsRequest < Internal::Types::Model field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/components/types/count_components_response.rb b/lib/schematic/components/types/count_components_response.rb index 80281ae..1e270eb 100644 --- a/lib/schematic/components/types/count_components_response.rb +++ b/lib/schematic/components/types/count_components_response.rb @@ -5,6 +5,7 @@ module Components module Types class CountComponentsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Components::Types::CountComponentsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/components/types/create_component_request_body.rb b/lib/schematic/components/types/create_component_request_body.rb index c2b0c10..27d6e49 100644 --- a/lib/schematic/components/types/create_component_request_body.rb +++ b/lib/schematic/components/types/create_component_request_body.rb @@ -5,7 +5,9 @@ module Components module Types class CreateComponentRequestBody < Internal::Types::Model field :ast, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false + field :entity_type, -> { Schematic::Types::ComponentEntityType }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/components/types/create_component_response.rb b/lib/schematic/components/types/create_component_response.rb index 0433aa7..fc6afdc 100644 --- a/lib/schematic/components/types/create_component_response.rb +++ b/lib/schematic/components/types/create_component_response.rb @@ -5,6 +5,7 @@ module Components module Types class CreateComponentResponse < Internal::Types::Model field :data, -> { Schematic::Types::ComponentResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/components/types/delete_component_response.rb b/lib/schematic/components/types/delete_component_response.rb index 5e1a4ea..3c4dde5 100644 --- a/lib/schematic/components/types/delete_component_response.rb +++ b/lib/schematic/components/types/delete_component_response.rb @@ -5,6 +5,7 @@ module Components module Types class DeleteComponentResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/components/types/get_component_response.rb b/lib/schematic/components/types/get_component_response.rb index 2b815a4..caafc99 100644 --- a/lib/schematic/components/types/get_component_response.rb +++ b/lib/schematic/components/types/get_component_response.rb @@ -5,6 +5,7 @@ module Components module Types class GetComponentResponse < Internal::Types::Model field :data, -> { Schematic::Types::ComponentResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/components/types/list_components_params.rb b/lib/schematic/components/types/list_components_params.rb index 0beead0..fc66e8b 100644 --- a/lib/schematic/components/types/list_components_params.rb +++ b/lib/schematic/components/types/list_components_params.rb @@ -6,7 +6,9 @@ module Types # Input parameters class ListComponentsParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/components/types/list_components_request.rb b/lib/schematic/components/types/list_components_request.rb index cec8a76..14a3cba 100644 --- a/lib/schematic/components/types/list_components_request.rb +++ b/lib/schematic/components/types/list_components_request.rb @@ -5,7 +5,9 @@ module Components module Types class ListComponentsRequest < Internal::Types::Model field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/components/types/list_components_response.rb b/lib/schematic/components/types/list_components_response.rb index 12b52f3..1a4db28 100644 --- a/lib/schematic/components/types/list_components_response.rb +++ b/lib/schematic/components/types/list_components_response.rb @@ -5,6 +5,7 @@ module Components module Types class ListComponentsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::ComponentResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Components::Types::ListComponentsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/components/types/preview_component_data_params.rb b/lib/schematic/components/types/preview_component_data_params.rb index da76721..00b822e 100644 --- a/lib/schematic/components/types/preview_component_data_params.rb +++ b/lib/schematic/components/types/preview_component_data_params.rb @@ -6,6 +6,7 @@ module Types # Input parameters class PreviewComponentDataParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :component_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/components/types/preview_component_data_request.rb b/lib/schematic/components/types/preview_component_data_request.rb index 4ee65fa..86c9ec7 100644 --- a/lib/schematic/components/types/preview_component_data_request.rb +++ b/lib/schematic/components/types/preview_component_data_request.rb @@ -5,6 +5,7 @@ module Components module Types class PreviewComponentDataRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :component_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/components/types/preview_component_data_response.rb b/lib/schematic/components/types/preview_component_data_response.rb index 16f7ccf..e9c8263 100644 --- a/lib/schematic/components/types/preview_component_data_response.rb +++ b/lib/schematic/components/types/preview_component_data_response.rb @@ -5,6 +5,7 @@ module Components module Types class PreviewComponentDataResponse < Internal::Types::Model field :data, -> { Schematic::Types::ComponentPreviewResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Components::Types::PreviewComponentDataParams }, optional: false, nullable: false end end diff --git a/lib/schematic/components/types/update_component_request_body.rb b/lib/schematic/components/types/update_component_request_body.rb index 96aa260..4ce8ff6 100644 --- a/lib/schematic/components/types/update_component_request_body.rb +++ b/lib/schematic/components/types/update_component_request_body.rb @@ -5,9 +5,13 @@ module Components module Types class UpdateComponentRequestBody < Internal::Types::Model field :component_id, -> { String }, optional: false, nullable: false + field :ast, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false + field :entity_type, -> { Schematic::Types::ComponentEntityType }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :state, -> { Schematic::Types::ComponentState }, optional: true, nullable: false end end diff --git a/lib/schematic/components/types/update_component_response.rb b/lib/schematic/components/types/update_component_response.rb index 207d576..d8dc570 100644 --- a/lib/schematic/components/types/update_component_response.rb +++ b/lib/schematic/components/types/update_component_response.rb @@ -5,6 +5,7 @@ module Components module Types class UpdateComponentResponse < Internal::Types::Model field :data, -> { Schematic::Types::ComponentResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/componentspublic/client.rb b/lib/schematic/componentspublic/client.rb index aa86ac2..87249ed 100644 --- a/lib/schematic/componentspublic/client.rb +++ b/lib/schematic/componentspublic/client.rb @@ -11,16 +11,18 @@ def initialize(client:) end # @param request_options [Hash] - # @param params [Hash] + # @param _params [Hash] # @option request_options [String] :base_url # @option request_options [Hash{String => Object}] :additional_headers # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.componentspublic.get_public_plans + # # @return [Schematic::Componentspublic::Types::GetPublicPlansResponse] - def get_public_plans(request_options: {}, **params) - Schematic::Internal::Types::Utils.normalize_keys(params) + def get_public_plans(request_options: {}, **_params) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "GET", diff --git a/lib/schematic/componentspublic/types/get_public_plans_response.rb b/lib/schematic/componentspublic/types/get_public_plans_response.rb index 090d34b..0422654 100644 --- a/lib/schematic/componentspublic/types/get_public_plans_response.rb +++ b/lib/schematic/componentspublic/types/get_public_plans_response.rb @@ -5,6 +5,7 @@ module Componentspublic module Types class GetPublicPlansResponse < Internal::Types::Model field :data, -> { Schematic::Types::PublicPlansResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/client.rb b/lib/schematic/credits/client.rb index 8c2b7e5..0b65bc6 100644 --- a/lib/schematic/credits/client.rb +++ b/lib/schematic/credits/client.rb @@ -22,16 +22,22 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.list_billing_credits( + # ids: ["ids"], + # name: "name", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::ListBillingCreditsResponse] def list_billing_credits(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids name limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["name"] = params[:name] if params.key?(:name) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -62,6 +68,13 @@ def list_billing_credits(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.credits.create_billing_credit( + # currency: "currency", + # description: "description", + # name: "name" + # ) + # # @return [Schematic::Credits::Types::CreateBillingCreditResponse] def create_billing_credit(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -95,6 +108,9 @@ def create_billing_credit(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :credit_id # + # @example + # client.credits.get_single_billing_credit(credit_id: "credit_id") + # # @return [Schematic::Credits::Types::GetSingleBillingCreditResponse] def get_single_billing_credit(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -127,11 +143,18 @@ def get_single_billing_credit(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :credit_id # + # @example + # client.credits.update_billing_credit( + # credit_id: "credit_id", + # description: "description", + # name: "name" + # ) + # # @return [Schematic::Credits::Types::UpdateBillingCreditResponse] def update_billing_credit(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Credits::Types::UpdateBillingCreditRequestBody.new(params).to_h - non_body_param_names = ["credit_id"] + non_body_param_names = %w[credit_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -164,6 +187,9 @@ def update_billing_credit(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :credit_id # + # @example + # client.credits.soft_delete_billing_credit(credit_id: "credit_id") + # # @return [Schematic::Credits::Types::SoftDeleteBillingCreditResponse] def soft_delete_billing_credit(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -196,13 +222,14 @@ def soft_delete_billing_credit(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :company_id # + # @example + # client.credits.list_company_credit_balances(company_id: "company_id") + # # @return [Schematic::Credits::Types::ListCompanyCreditBalancesResponse] def list_company_credit_balances(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -239,10 +266,19 @@ def list_company_credit_balances(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.list_credit_bundles( + # ids: ["ids"], + # credit_id: "credit_id", + # status: "active", + # bundle_type: "fixed", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::ListCreditBundlesResponse] def list_credit_bundles(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids credit_id status bundle_type limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id) @@ -250,7 +286,6 @@ def list_credit_bundles(request_options: {}, **params) query_params["bundle_type"] = params[:bundle_type] if params.key?(:bundle_type) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -281,6 +316,14 @@ def list_credit_bundles(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.credits.create_credit_bundle( + # bundle_name: "bundle_name", + # credit_id: "credit_id", + # currency: "currency", + # price_per_unit: 1000000 + # ) + # # @return [Schematic::Credits::Types::CreateCreditBundleResponse] def create_credit_bundle(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -314,6 +357,9 @@ def create_credit_bundle(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :bundle_id # + # @example + # client.credits.get_credit_bundle(bundle_id: "bundle_id") + # # @return [Schematic::Credits::Types::GetCreditBundleResponse] def get_credit_bundle(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -346,11 +392,18 @@ def get_credit_bundle(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :bundle_id # + # @example + # client.credits.update_credit_bundle_details( + # bundle_id: "bundle_id", + # bundle_name: "bundle_name", + # price_per_unit: 1000000 + # ) + # # @return [Schematic::Credits::Types::UpdateCreditBundleDetailsResponse] def update_credit_bundle_details(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Credits::Types::UpdateCreditBundleDetailsRequestBody.new(params).to_h - non_body_param_names = ["bundle_id"] + non_body_param_names = %w[bundle_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -383,6 +436,9 @@ def update_credit_bundle_details(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :bundle_id # + # @example + # client.credits.delete_credit_bundle(bundle_id: "bundle_id") + # # @return [Schematic::Credits::Types::DeleteCreditBundleResponse] def delete_credit_bundle(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -420,10 +476,19 @@ def delete_credit_bundle(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.count_credit_bundles( + # ids: ["ids"], + # credit_id: "credit_id", + # status: "active", + # bundle_type: "fixed", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::CountCreditBundlesResponse] def count_credit_bundles(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids credit_id status bundle_type limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id) @@ -431,7 +496,6 @@ def count_credit_bundles(request_options: {}, **params) query_params["bundle_type"] = params[:bundle_type] if params.key?(:bundle_type) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -466,16 +530,22 @@ def count_credit_bundles(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.count_billing_credits( + # ids: ["ids"], + # name: "name", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::CountBillingCreditsResponse] def count_billing_credits(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids name limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["name"] = params[:name] if params.key?(:name) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -507,11 +577,14 @@ def count_billing_credits(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :grant_id # + # @example + # client.credits.zero_out_grant(grant_id: "grant_id") + # # @return [Schematic::Credits::Types::ZeroOutGrantResponse] def zero_out_grant(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Credits::Types::ZeroOutGrantRequestBody.new(params).to_h - non_body_param_names = ["grant_id"] + non_body_param_names = %w[grant_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -543,6 +616,14 @@ def zero_out_grant(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.credits.grant_billing_credits_to_company( + # company_id: "company_id", + # credit_id: "credit_id", + # quantity: 1000000, + # reason: "adjustment" + # ) + # # @return [Schematic::Credits::Types::GrantBillingCreditsToCompanyResponse] def grant_billing_credits_to_company(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -574,23 +655,30 @@ def grant_billing_credits_to_company(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :company_id + # @option params [String] :company_id # @option params [Schematic::Types::CreditGrantSortOrder, nil] :order # @option params [Schematic::Types::SortDirection, nil] :dir # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.count_company_grants( + # company_id: "company_id", + # order: "created_at", + # dir: "asc", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::CountCompanyGrantsResponse] def count_company_grants(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id order dir limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["order"] = params[:order] if params.key?(:order) query_params["dir"] = params[:dir] if params.key?(:dir) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -620,23 +708,30 @@ def count_company_grants(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :company_id + # @option params [String] :company_id # @option params [Schematic::Types::CreditGrantSortOrder, nil] :order # @option params [Schematic::Types::SortDirection, nil] :dir # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.list_company_grants( + # company_id: "company_id", + # order: "created_at", + # dir: "asc", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::ListCompanyGrantsResponse] def list_company_grants(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id order dir limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["order"] = params[:order] if params.key?(:order) query_params["dir"] = params[:dir] if params.key?(:dir) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -671,16 +766,22 @@ def list_company_grants(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.count_billing_credits_grants( + # credit_id: "credit_id", + # ids: ["ids"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::CountBillingCreditsGrantsResponse] def count_billing_credits_grants(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_id ids limit offset] query_params = {} query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -715,16 +816,22 @@ def count_billing_credits_grants(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.list_grants_for_credit( + # credit_id: "credit_id", + # ids: ["ids"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::ListGrantsForCreditResponse] def list_grants_for_credit(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_id ids limit offset] query_params = {} query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -755,6 +862,13 @@ def list_grants_for_credit(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.credits.acquire_credit_lease( + # company_id: "company_id", + # credit_type_id: "credit_type_id", + # requested_amount: 1.1 + # ) + # # @return [Schematic::Credits::Types::AcquireCreditLeaseResponse] def acquire_credit_lease(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -788,11 +902,17 @@ def acquire_credit_lease(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :lease_id # + # @example + # client.credits.extend_credit_lease( + # lease_id: "lease_id", + # additional_amount: 1.1 + # ) + # # @return [Schematic::Credits::Types::ExtendCreditLeaseResponse] def extend_credit_lease(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Credits::Types::ExtendCreditLeaseRequestBody.new(params).to_h - non_body_param_names = ["lease_id"] + non_body_param_names = %w[lease_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -825,14 +945,25 @@ def extend_credit_lease(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :lease_id # + # @example + # client.credits.release_credit_lease( + # lease_id: "lease_id", + # request: { + # key: "value" + # } + # ) + # # @return [Schematic::Credits::Types::ReleaseCreditLeaseResponse] def release_credit_lease(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[lease_id] + body_params = params.except(*path_param_names) + request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "billing/credits/lease/#{URI.encode_uri_component(params[:lease_id].to_s)}/release", - body: params, + body: body_params, request_options: request_options ) begin @@ -865,10 +996,21 @@ def release_credit_lease(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.list_billing_plan_credit_grants( + # credit_id: "credit_id", + # ids: ["ids"], + # plan_id: "plan_id", + # plan_ids: ["plan_ids"], + # plan_version_id: "plan_version_id", + # plan_version_ids: ["plan_version_ids"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::ListBillingPlanCreditGrantsResponse] def list_billing_plan_credit_grants(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id plan_version_ids limit offset] query_params = {} query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id) query_params["ids"] = params[:ids] if params.key?(:ids) @@ -878,7 +1020,6 @@ def list_billing_plan_credit_grants(request_options: {}, **params) query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -909,6 +1050,15 @@ def list_billing_plan_credit_grants(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.credits.create_billing_plan_credit_grant( + # credit_amount: 1000000, + # credit_id: "credit_id", + # plan_id: "plan_id", + # reset_cadence: "daily", + # reset_start: "billing_period" + # ) + # # @return [Schematic::Credits::Types::CreateBillingPlanCreditGrantResponse] def create_billing_plan_credit_grant(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -942,6 +1092,9 @@ def create_billing_plan_credit_grant(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_grant_id # + # @example + # client.credits.get_single_billing_plan_credit_grant(plan_grant_id: "plan_grant_id") + # # @return [Schematic::Credits::Types::GetSingleBillingPlanCreditGrantResponse] def get_single_billing_plan_credit_grant(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -974,14 +1127,24 @@ def get_single_billing_plan_credit_grant(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_grant_id # + # @example + # client.credits.update_billing_plan_credit_grant( + # plan_grant_id: "plan_grant_id", + # reset_cadence: "daily", + # reset_start: "billing_period" + # ) + # # @return [Schematic::Credits::Types::UpdateBillingPlanCreditGrantResponse] def update_billing_plan_credit_grant(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[plan_grant_id] + body_params = params.except(*path_param_names) + request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "billing/credits/plan-grants/#{URI.encode_uri_component(params[:plan_grant_id].to_s)}", - body: Schematic::Types::UpdateBillingPlanCreditGrantRequestBody.new(params).to_h, + body: Schematic::Types::UpdateBillingPlanCreditGrantRequestBody.new(body_params).to_h, request_options: request_options ) begin @@ -1008,13 +1171,17 @@ def update_billing_plan_credit_grant(request_options: {}, **params) # @option params [String] :plan_grant_id # @option params [Boolean, nil] :apply_to_existing # + # @example + # client.credits.delete_billing_plan_credit_grant( + # plan_grant_id: "plan_grant_id", + # apply_to_existing: true + # ) + # # @return [Schematic::Credits::Types::DeleteBillingPlanCreditGrantResponse] def delete_billing_plan_credit_grant(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[apply_to_existing] query_params = {} query_params["apply_to_existing"] = params[:apply_to_existing] if params.key?(:apply_to_existing) - params = params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1053,10 +1220,21 @@ def delete_billing_plan_credit_grant(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.count_billing_plan_credit_grants( + # credit_id: "credit_id", + # ids: ["ids"], + # plan_id: "plan_id", + # plan_ids: ["plan_ids"], + # plan_version_id: "plan_version_id", + # plan_version_ids: ["plan_version_ids"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::CountBillingPlanCreditGrantsResponse] def count_billing_plan_credit_grants(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[credit_id ids plan_id plan_ids plan_version_id plan_version_ids limit offset] query_params = {} query_params["credit_id"] = params[:credit_id] if params.key?(:credit_id) query_params["ids"] = params[:ids] if params.key?(:ids) @@ -1066,7 +1244,6 @@ def count_billing_plan_credit_grants(request_options: {}, **params) query_params["plan_version_ids"] = params[:plan_version_ids] if params.key?(:plan_version_ids) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1105,10 +1282,21 @@ def count_billing_plan_credit_grants(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.list_credit_event_ledger( + # billing_credit_id: "billing_credit_id", + # company_id: "company_id", + # end_time: "end_time", + # event_type: "grant", + # feature_id: "feature_id", + # start_time: "start_time", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::ListCreditEventLedgerResponse] def list_credit_event_ledger(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[billing_credit_id company_id end_time event_type feature_id start_time limit offset] query_params = {} query_params["billing_credit_id"] = params[:billing_credit_id] if params.key?(:billing_credit_id) query_params["company_id"] = params[:company_id] if params.key?(:company_id) @@ -1118,7 +1306,6 @@ def list_credit_event_ledger(request_options: {}, **params) query_params["start_time"] = params[:start_time] if params.key?(:start_time) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -1157,10 +1344,21 @@ def list_credit_event_ledger(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.credits.count_credit_event_ledger( + # billing_credit_id: "billing_credit_id", + # company_id: "company_id", + # end_time: "end_time", + # event_type: "grant", + # feature_id: "feature_id", + # start_time: "start_time", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Credits::Types::CountCreditEventLedgerResponse] def count_credit_event_ledger(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[billing_credit_id company_id end_time event_type feature_id start_time limit offset] query_params = {} query_params["billing_credit_id"] = params[:billing_credit_id] if params.key?(:billing_credit_id) query_params["company_id"] = params[:company_id] if params.key?(:company_id) @@ -1170,7 +1368,6 @@ def count_credit_event_ledger(request_options: {}, **params) query_params["start_time"] = params[:start_time] if params.key?(:start_time) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], diff --git a/lib/schematic/credits/types/acquire_credit_lease_request_body.rb b/lib/schematic/credits/types/acquire_credit_lease_request_body.rb index e873797..dd75bc1 100644 --- a/lib/schematic/credits/types/acquire_credit_lease_request_body.rb +++ b/lib/schematic/credits/types/acquire_credit_lease_request_body.rb @@ -5,8 +5,11 @@ module Credits module Types class AcquireCreditLeaseRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :credit_type_id, -> { String }, optional: false, nullable: false + field :expires_at, -> { String }, optional: true, nullable: false + field :requested_amount, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/acquire_credit_lease_response.rb b/lib/schematic/credits/types/acquire_credit_lease_response.rb index 56e8825..cbcd72b 100644 --- a/lib/schematic/credits/types/acquire_credit_lease_response.rb +++ b/lib/schematic/credits/types/acquire_credit_lease_response.rb @@ -5,6 +5,7 @@ module Credits module Types class AcquireCreditLeaseResponse < Internal::Types::Model field :data, -> { Schematic::Types::CreditLeaseResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/count_billing_credits_grants_params.rb b/lib/schematic/credits/types/count_billing_credits_grants_params.rb index 8b3b834..e5f257c 100644 --- a/lib/schematic/credits/types/count_billing_credits_grants_params.rb +++ b/lib/schematic/credits/types/count_billing_credits_grants_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class CountBillingCreditsGrantsParams < Internal::Types::Model field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_billing_credits_grants_request.rb b/lib/schematic/credits/types/count_billing_credits_grants_request.rb index 8c2304e..a533769 100644 --- a/lib/schematic/credits/types/count_billing_credits_grants_request.rb +++ b/lib/schematic/credits/types/count_billing_credits_grants_request.rb @@ -5,8 +5,11 @@ module Credits module Types class CountBillingCreditsGrantsRequest < Internal::Types::Model field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_billing_credits_grants_response.rb b/lib/schematic/credits/types/count_billing_credits_grants_response.rb index 9100679..537ef81 100644 --- a/lib/schematic/credits/types/count_billing_credits_grants_response.rb +++ b/lib/schematic/credits/types/count_billing_credits_grants_response.rb @@ -5,6 +5,7 @@ module Credits module Types class CountBillingCreditsGrantsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::CountBillingCreditsGrantsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/count_billing_credits_params.rb b/lib/schematic/credits/types/count_billing_credits_params.rb index 71abf3b..5f4c775 100644 --- a/lib/schematic/credits/types/count_billing_credits_params.rb +++ b/lib/schematic/credits/types/count_billing_credits_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class CountBillingCreditsParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_billing_credits_request.rb b/lib/schematic/credits/types/count_billing_credits_request.rb index b81191b..0787359 100644 --- a/lib/schematic/credits/types/count_billing_credits_request.rb +++ b/lib/schematic/credits/types/count_billing_credits_request.rb @@ -5,8 +5,11 @@ module Credits module Types class CountBillingCreditsRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_billing_credits_response.rb b/lib/schematic/credits/types/count_billing_credits_response.rb index 65078f8..3c791b4 100644 --- a/lib/schematic/credits/types/count_billing_credits_response.rb +++ b/lib/schematic/credits/types/count_billing_credits_response.rb @@ -5,6 +5,7 @@ module Credits module Types class CountBillingCreditsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::CountBillingCreditsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/count_billing_plan_credit_grants_params.rb b/lib/schematic/credits/types/count_billing_plan_credit_grants_params.rb index d336b22..a555d61 100644 --- a/lib/schematic/credits/types/count_billing_plan_credit_grants_params.rb +++ b/lib/schematic/credits/types/count_billing_plan_credit_grants_params.rb @@ -6,12 +6,19 @@ module Types # Input parameters class CountBillingPlanCreditGrantsParams < Internal::Types::Model field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb b/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb index 1029e66..21fe8bc 100644 --- a/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb +++ b/lib/schematic/credits/types/count_billing_plan_credit_grants_request.rb @@ -5,12 +5,19 @@ module Credits module Types class CountBillingPlanCreditGrantsRequest < Internal::Types::Model field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_billing_plan_credit_grants_response.rb b/lib/schematic/credits/types/count_billing_plan_credit_grants_response.rb index 632b845..1ed6b7c 100644 --- a/lib/schematic/credits/types/count_billing_plan_credit_grants_response.rb +++ b/lib/schematic/credits/types/count_billing_plan_credit_grants_response.rb @@ -5,6 +5,7 @@ module Credits module Types class CountBillingPlanCreditGrantsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::CountBillingPlanCreditGrantsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/count_company_grants_params.rb b/lib/schematic/credits/types/count_company_grants_params.rb index 210ea72..d12167f 100644 --- a/lib/schematic/credits/types/count_company_grants_params.rb +++ b/lib/schematic/credits/types/count_company_grants_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class CountCompanyGrantsParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :dir, -> { Schematic::Types::SortDirection }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :order, -> { Schematic::Types::CreditGrantSortOrder }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_company_grants_request.rb b/lib/schematic/credits/types/count_company_grants_request.rb index 3b70ef3..e32cfad 100644 --- a/lib/schematic/credits/types/count_company_grants_request.rb +++ b/lib/schematic/credits/types/count_company_grants_request.rb @@ -4,10 +4,14 @@ module Schematic module Credits module Types class CountCompanyGrantsRequest < Internal::Types::Model - field :company_id, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :order, -> { Schematic::Types::CreditGrantSortOrder }, optional: true, nullable: false + field :dir, -> { Schematic::Types::SortDirection }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_company_grants_response.rb b/lib/schematic/credits/types/count_company_grants_response.rb index 63d5694..7f9eee3 100644 --- a/lib/schematic/credits/types/count_company_grants_response.rb +++ b/lib/schematic/credits/types/count_company_grants_response.rb @@ -5,6 +5,7 @@ module Credits module Types class CountCompanyGrantsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::CountCompanyGrantsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/count_credit_bundles_params.rb b/lib/schematic/credits/types/count_credit_bundles_params.rb index 2235c93..8723f87 100644 --- a/lib/schematic/credits/types/count_credit_bundles_params.rb +++ b/lib/schematic/credits/types/count_credit_bundles_params.rb @@ -6,10 +6,15 @@ module Types # Input parameters class CountCreditBundlesParams < Internal::Types::Model field :bundle_type, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :status, -> { Schematic::Types::BillingCreditBundleStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_credit_bundles_request.rb b/lib/schematic/credits/types/count_credit_bundles_request.rb index 1be4bf5..30028d6 100644 --- a/lib/schematic/credits/types/count_credit_bundles_request.rb +++ b/lib/schematic/credits/types/count_credit_bundles_request.rb @@ -5,10 +5,15 @@ module Credits module Types class CountCreditBundlesRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::BillingCreditBundleStatus }, optional: true, nullable: false + field :bundle_type, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_credit_bundles_response.rb b/lib/schematic/credits/types/count_credit_bundles_response.rb index 8ed9391..811dd08 100644 --- a/lib/schematic/credits/types/count_credit_bundles_response.rb +++ b/lib/schematic/credits/types/count_credit_bundles_response.rb @@ -5,6 +5,7 @@ module Credits module Types class CountCreditBundlesResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::CountCreditBundlesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/count_credit_event_ledger_params.rb b/lib/schematic/credits/types/count_credit_event_ledger_params.rb index ba64117..ff9ee0e 100644 --- a/lib/schematic/credits/types/count_credit_event_ledger_params.rb +++ b/lib/schematic/credits/types/count_credit_event_ledger_params.rb @@ -6,12 +6,19 @@ module Types # Input parameters class CountCreditEventLedgerParams < Internal::Types::Model field :billing_credit_id, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :event_type, -> { Schematic::Types::CreditEventType }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_credit_event_ledger_request.rb b/lib/schematic/credits/types/count_credit_event_ledger_request.rb index 5e1d156..b5650df 100644 --- a/lib/schematic/credits/types/count_credit_event_ledger_request.rb +++ b/lib/schematic/credits/types/count_credit_event_ledger_request.rb @@ -5,12 +5,19 @@ module Credits module Types class CountCreditEventLedgerRequest < Internal::Types::Model field :billing_credit_id, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :event_type, -> { Schematic::Types::CreditEventType }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/count_credit_event_ledger_response.rb b/lib/schematic/credits/types/count_credit_event_ledger_response.rb index 44ee537..45d64df 100644 --- a/lib/schematic/credits/types/count_credit_event_ledger_response.rb +++ b/lib/schematic/credits/types/count_credit_event_ledger_response.rb @@ -5,6 +5,7 @@ module Credits module Types class CountCreditEventLedgerResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::CountCreditEventLedgerParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/create_billing_credit_request_body.rb b/lib/schematic/credits/types/create_billing_credit_request_body.rb index e277a7d..f58f4bd 100644 --- a/lib/schematic/credits/types/create_billing_credit_request_body.rb +++ b/lib/schematic/credits/types/create_billing_credit_request_body.rb @@ -5,17 +5,29 @@ module Credits module Types class CreateBillingCreditRequestBody < Internal::Types::Model field :burn_strategy, -> { Schematic::Types::BillingCreditBurnStrategy }, optional: true, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditCurrencyPriceRequestBody] }, optional: true, nullable: false + field :default_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :default_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :default_rollover_policy, -> { Schematic::Types::BillingCreditRolloverPolicy }, optional: true, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :per_unit_price, -> { Integer }, optional: true, nullable: false + field :per_unit_price_decimal, -> { String }, optional: true, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/create_billing_credit_response.rb b/lib/schematic/credits/types/create_billing_credit_response.rb index c756412..c80ca38 100644 --- a/lib/schematic/credits/types/create_billing_credit_response.rb +++ b/lib/schematic/credits/types/create_billing_credit_response.rb @@ -5,6 +5,7 @@ module Credits module Types class CreateBillingCreditResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCreditResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/create_billing_plan_credit_grant_response.rb b/lib/schematic/credits/types/create_billing_plan_credit_grant_response.rb index 80a89d0..a05eead 100644 --- a/lib/schematic/credits/types/create_billing_plan_credit_grant_response.rb +++ b/lib/schematic/credits/types/create_billing_plan_credit_grant_response.rb @@ -5,6 +5,7 @@ module Credits module Types class CreateBillingPlanCreditGrantResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingPlanCreditGrantResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/create_company_credit_grant.rb b/lib/schematic/credits/types/create_company_credit_grant.rb index a13f715..7097d37 100644 --- a/lib/schematic/credits/types/create_company_credit_grant.rb +++ b/lib/schematic/credits/types/create_company_credit_grant.rb @@ -5,16 +5,27 @@ module Credits module Types class CreateCompanyCreditGrant < Internal::Types::Model field :billing_periods_count, -> { Integer }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :expires_at, -> { String }, optional: true, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: false, nullable: false + field :renewal_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :renewal_period, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/create_credit_bundle_request_body.rb b/lib/schematic/credits/types/create_credit_bundle_request_body.rb index 54fd61b..29fc084 100644 --- a/lib/schematic/credits/types/create_credit_bundle_request_body.rb +++ b/lib/schematic/credits/types/create_credit_bundle_request_body.rb @@ -5,17 +5,29 @@ module Credits module Types class CreateCreditBundleRequestBody < Internal::Types::Model field :bundle_name, -> { String }, optional: false, nullable: false + field :bundle_type, -> { String }, optional: true, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPriceRequestBody] }, optional: true, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :price_per_unit, -> { Integer }, optional: false, nullable: false + field :price_per_unit_decimal, -> { String }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: true, nullable: false + field :status, -> { Schematic::Types::BillingCreditBundleStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/create_credit_bundle_response.rb b/lib/schematic/credits/types/create_credit_bundle_response.rb index 38e8af0..2532afd 100644 --- a/lib/schematic/credits/types/create_credit_bundle_response.rb +++ b/lib/schematic/credits/types/create_credit_bundle_response.rb @@ -5,6 +5,7 @@ module Credits module Types class CreateCreditBundleResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCreditBundleResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/delete_billing_plan_credit_grant_request.rb b/lib/schematic/credits/types/delete_billing_plan_credit_grant_request.rb index 6de05aa..20d471c 100644 --- a/lib/schematic/credits/types/delete_billing_plan_credit_grant_request.rb +++ b/lib/schematic/credits/types/delete_billing_plan_credit_grant_request.rb @@ -5,6 +5,7 @@ module Credits module Types class DeleteBillingPlanCreditGrantRequest < Internal::Types::Model field :plan_grant_id, -> { String }, optional: false, nullable: false + field :apply_to_existing, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/delete_billing_plan_credit_grant_response.rb b/lib/schematic/credits/types/delete_billing_plan_credit_grant_response.rb index 96ef6ed..4e67063 100644 --- a/lib/schematic/credits/types/delete_billing_plan_credit_grant_response.rb +++ b/lib/schematic/credits/types/delete_billing_plan_credit_grant_response.rb @@ -5,6 +5,7 @@ module Credits module Types class DeleteBillingPlanCreditGrantResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::DeleteBillingPlanCreditGrantParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/delete_credit_bundle_response.rb b/lib/schematic/credits/types/delete_credit_bundle_response.rb index 58fd794..cc174a9 100644 --- a/lib/schematic/credits/types/delete_credit_bundle_response.rb +++ b/lib/schematic/credits/types/delete_credit_bundle_response.rb @@ -5,6 +5,7 @@ module Credits module Types class DeleteCreditBundleResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/extend_credit_lease_request_body.rb b/lib/schematic/credits/types/extend_credit_lease_request_body.rb index d8ac230..ee37496 100644 --- a/lib/schematic/credits/types/extend_credit_lease_request_body.rb +++ b/lib/schematic/credits/types/extend_credit_lease_request_body.rb @@ -5,7 +5,9 @@ module Credits module Types class ExtendCreditLeaseRequestBody < Internal::Types::Model field :lease_id, -> { String }, optional: false, nullable: false + field :additional_amount, -> { Integer }, optional: false, nullable: false + field :expires_at, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/extend_credit_lease_response.rb b/lib/schematic/credits/types/extend_credit_lease_response.rb index df70a66..65b505b 100644 --- a/lib/schematic/credits/types/extend_credit_lease_response.rb +++ b/lib/schematic/credits/types/extend_credit_lease_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ExtendCreditLeaseResponse < Internal::Types::Model field :data, -> { Schematic::Types::CreditLeaseResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/get_credit_bundle_response.rb b/lib/schematic/credits/types/get_credit_bundle_response.rb index 89c83dc..217cf47 100644 --- a/lib/schematic/credits/types/get_credit_bundle_response.rb +++ b/lib/schematic/credits/types/get_credit_bundle_response.rb @@ -5,6 +5,7 @@ module Credits module Types class GetCreditBundleResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCreditBundleResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/get_single_billing_credit_response.rb b/lib/schematic/credits/types/get_single_billing_credit_response.rb index c4ff739..5beba76 100644 --- a/lib/schematic/credits/types/get_single_billing_credit_response.rb +++ b/lib/schematic/credits/types/get_single_billing_credit_response.rb @@ -5,6 +5,7 @@ module Credits module Types class GetSingleBillingCreditResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCreditResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/get_single_billing_plan_credit_grant_response.rb b/lib/schematic/credits/types/get_single_billing_plan_credit_grant_response.rb index efefe91..eb1bc4c 100644 --- a/lib/schematic/credits/types/get_single_billing_plan_credit_grant_response.rb +++ b/lib/schematic/credits/types/get_single_billing_plan_credit_grant_response.rb @@ -5,6 +5,7 @@ module Credits module Types class GetSingleBillingPlanCreditGrantResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingPlanCreditGrantResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/grant_billing_credits_to_company_response.rb b/lib/schematic/credits/types/grant_billing_credits_to_company_response.rb index 3485db7..9266528 100644 --- a/lib/schematic/credits/types/grant_billing_credits_to_company_response.rb +++ b/lib/schematic/credits/types/grant_billing_credits_to_company_response.rb @@ -5,6 +5,7 @@ module Credits module Types class GrantBillingCreditsToCompanyResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCreditGrantResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/list_billing_credits_params.rb b/lib/schematic/credits/types/list_billing_credits_params.rb index d64e21d..58ef4e0 100644 --- a/lib/schematic/credits/types/list_billing_credits_params.rb +++ b/lib/schematic/credits/types/list_billing_credits_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListBillingCreditsParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_billing_credits_request.rb b/lib/schematic/credits/types/list_billing_credits_request.rb index e6d3d76..2f9d27c 100644 --- a/lib/schematic/credits/types/list_billing_credits_request.rb +++ b/lib/schematic/credits/types/list_billing_credits_request.rb @@ -5,8 +5,11 @@ module Credits module Types class ListBillingCreditsRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_billing_credits_response.rb b/lib/schematic/credits/types/list_billing_credits_response.rb index 0256219..8a4237e 100644 --- a/lib/schematic/credits/types/list_billing_credits_response.rb +++ b/lib/schematic/credits/types/list_billing_credits_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ListBillingCreditsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::ListBillingCreditsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb b/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb index f06137b..c9b0b9f 100644 --- a/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb +++ b/lib/schematic/credits/types/list_billing_plan_credit_grants_params.rb @@ -6,12 +6,19 @@ module Types # Input parameters class ListBillingPlanCreditGrantsParams < Internal::Types::Model field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb b/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb index ae2c3a3..0e0a596 100644 --- a/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb +++ b/lib/schematic/credits/types/list_billing_plan_credit_grants_request.rb @@ -5,12 +5,19 @@ module Credits module Types class ListBillingPlanCreditGrantsRequest < Internal::Types::Model field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_billing_plan_credit_grants_response.rb b/lib/schematic/credits/types/list_billing_plan_credit_grants_response.rb index 262c8e9..e705153 100644 --- a/lib/schematic/credits/types/list_billing_plan_credit_grants_response.rb +++ b/lib/schematic/credits/types/list_billing_plan_credit_grants_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ListBillingPlanCreditGrantsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::ListBillingPlanCreditGrantsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/list_company_credit_balances_response.rb b/lib/schematic/credits/types/list_company_credit_balances_response.rb index 43f34d3..8ec4665 100644 --- a/lib/schematic/credits/types/list_company_credit_balances_response.rb +++ b/lib/schematic/credits/types/list_company_credit_balances_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ListCompanyCreditBalancesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CompanyCreditBalanceResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::ListCompanyCreditBalancesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/list_company_grants_params.rb b/lib/schematic/credits/types/list_company_grants_params.rb index ec2ad88..0bd79f8 100644 --- a/lib/schematic/credits/types/list_company_grants_params.rb +++ b/lib/schematic/credits/types/list_company_grants_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class ListCompanyGrantsParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :dir, -> { Schematic::Types::SortDirection }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :order, -> { Schematic::Types::CreditGrantSortOrder }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_company_grants_request.rb b/lib/schematic/credits/types/list_company_grants_request.rb index 002ca9d..4467e00 100644 --- a/lib/schematic/credits/types/list_company_grants_request.rb +++ b/lib/schematic/credits/types/list_company_grants_request.rb @@ -4,10 +4,14 @@ module Schematic module Credits module Types class ListCompanyGrantsRequest < Internal::Types::Model - field :company_id, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :order, -> { Schematic::Types::CreditGrantSortOrder }, optional: true, nullable: false + field :dir, -> { Schematic::Types::SortDirection }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_company_grants_response.rb b/lib/schematic/credits/types/list_company_grants_response.rb index fd2d631..a4bd6cc 100644 --- a/lib/schematic/credits/types/list_company_grants_response.rb +++ b/lib/schematic/credits/types/list_company_grants_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ListCompanyGrantsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingCreditGrantResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::ListCompanyGrantsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/list_credit_bundles_params.rb b/lib/schematic/credits/types/list_credit_bundles_params.rb index d827b56..95f27c9 100644 --- a/lib/schematic/credits/types/list_credit_bundles_params.rb +++ b/lib/schematic/credits/types/list_credit_bundles_params.rb @@ -6,10 +6,15 @@ module Types # Input parameters class ListCreditBundlesParams < Internal::Types::Model field :bundle_type, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :status, -> { Schematic::Types::BillingCreditBundleStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_credit_bundles_request.rb b/lib/schematic/credits/types/list_credit_bundles_request.rb index 7ba63cc..3d01cbd 100644 --- a/lib/schematic/credits/types/list_credit_bundles_request.rb +++ b/lib/schematic/credits/types/list_credit_bundles_request.rb @@ -5,10 +5,15 @@ module Credits module Types class ListCreditBundlesRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::BillingCreditBundleStatus }, optional: true, nullable: false + field :bundle_type, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_credit_bundles_response.rb b/lib/schematic/credits/types/list_credit_bundles_response.rb index ff80a51..8bf6bc1 100644 --- a/lib/schematic/credits/types/list_credit_bundles_response.rb +++ b/lib/schematic/credits/types/list_credit_bundles_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ListCreditBundlesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingCreditBundleResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::ListCreditBundlesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/list_credit_event_ledger_params.rb b/lib/schematic/credits/types/list_credit_event_ledger_params.rb index 161ba1f..9918aaa 100644 --- a/lib/schematic/credits/types/list_credit_event_ledger_params.rb +++ b/lib/schematic/credits/types/list_credit_event_ledger_params.rb @@ -6,12 +6,19 @@ module Types # Input parameters class ListCreditEventLedgerParams < Internal::Types::Model field :billing_credit_id, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :event_type, -> { Schematic::Types::CreditEventType }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_credit_event_ledger_request.rb b/lib/schematic/credits/types/list_credit_event_ledger_request.rb index 7b0c407..8036a55 100644 --- a/lib/schematic/credits/types/list_credit_event_ledger_request.rb +++ b/lib/schematic/credits/types/list_credit_event_ledger_request.rb @@ -5,12 +5,19 @@ module Credits module Types class ListCreditEventLedgerRequest < Internal::Types::Model field :billing_credit_id, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :event_type, -> { Schematic::Types::CreditEventType }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_credit_event_ledger_response.rb b/lib/schematic/credits/types/list_credit_event_ledger_response.rb index 531a6c0..655017f 100644 --- a/lib/schematic/credits/types/list_credit_event_ledger_response.rb +++ b/lib/schematic/credits/types/list_credit_event_ledger_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ListCreditEventLedgerResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CreditEventLedgerResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::ListCreditEventLedgerParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/list_grants_for_credit_params.rb b/lib/schematic/credits/types/list_grants_for_credit_params.rb index 2a5ded4..d4763ad 100644 --- a/lib/schematic/credits/types/list_grants_for_credit_params.rb +++ b/lib/schematic/credits/types/list_grants_for_credit_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListGrantsForCreditParams < Internal::Types::Model field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_grants_for_credit_request.rb b/lib/schematic/credits/types/list_grants_for_credit_request.rb index df93a58..67eed76 100644 --- a/lib/schematic/credits/types/list_grants_for_credit_request.rb +++ b/lib/schematic/credits/types/list_grants_for_credit_request.rb @@ -5,8 +5,11 @@ module Credits module Types class ListGrantsForCreditRequest < Internal::Types::Model field :credit_id, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/list_grants_for_credit_response.rb b/lib/schematic/credits/types/list_grants_for_credit_response.rb index 623e462..580c24a 100644 --- a/lib/schematic/credits/types/list_grants_for_credit_response.rb +++ b/lib/schematic/credits/types/list_grants_for_credit_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ListGrantsForCreditResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::BillingCreditGrantResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Credits::Types::ListGrantsForCreditParams }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/release_credit_lease_response.rb b/lib/schematic/credits/types/release_credit_lease_response.rb index 07ed352..b29cc80 100644 --- a/lib/schematic/credits/types/release_credit_lease_response.rb +++ b/lib/schematic/credits/types/release_credit_lease_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ReleaseCreditLeaseResponse < Internal::Types::Model field :data, -> { Schematic::Types::CreditLeaseResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/soft_delete_billing_credit_response.rb b/lib/schematic/credits/types/soft_delete_billing_credit_response.rb index 7852d9b..8c606b3 100644 --- a/lib/schematic/credits/types/soft_delete_billing_credit_response.rb +++ b/lib/schematic/credits/types/soft_delete_billing_credit_response.rb @@ -5,6 +5,7 @@ module Credits module Types class SoftDeleteBillingCreditResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/update_billing_credit_request_body.rb b/lib/schematic/credits/types/update_billing_credit_request_body.rb index 5015249..1e3c7aa 100644 --- a/lib/schematic/credits/types/update_billing_credit_request_body.rb +++ b/lib/schematic/credits/types/update_billing_credit_request_body.rb @@ -5,17 +5,29 @@ module Credits module Types class UpdateBillingCreditRequestBody < Internal::Types::Model field :credit_id, -> { String }, optional: false, nullable: false + field :burn_strategy, -> { Schematic::Types::BillingCreditBurnStrategy }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditCurrencyPriceRequestBody] }, optional: true, nullable: false + field :default_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :default_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :default_rollover_policy, -> { Schematic::Types::BillingCreditRolloverPolicy }, optional: true, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :per_unit_price, -> { Integer }, optional: true, nullable: false + field :per_unit_price_decimal, -> { String }, optional: true, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/update_billing_credit_response.rb b/lib/schematic/credits/types/update_billing_credit_response.rb index 5789791..5df5522 100644 --- a/lib/schematic/credits/types/update_billing_credit_response.rb +++ b/lib/schematic/credits/types/update_billing_credit_response.rb @@ -5,6 +5,7 @@ module Credits module Types class UpdateBillingCreditResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCreditResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/update_billing_plan_credit_grant_response.rb b/lib/schematic/credits/types/update_billing_plan_credit_grant_response.rb index 70ab36c..077b978 100644 --- a/lib/schematic/credits/types/update_billing_plan_credit_grant_response.rb +++ b/lib/schematic/credits/types/update_billing_plan_credit_grant_response.rb @@ -5,6 +5,7 @@ module Credits module Types class UpdateBillingPlanCreditGrantResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingPlanCreditGrantResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/update_credit_bundle_details_request_body.rb b/lib/schematic/credits/types/update_credit_bundle_details_request_body.rb index 2d1d875..d4193b7 100644 --- a/lib/schematic/credits/types/update_credit_bundle_details_request_body.rb +++ b/lib/schematic/credits/types/update_credit_bundle_details_request_body.rb @@ -5,15 +5,25 @@ module Credits module Types class UpdateCreditBundleDetailsRequestBody < Internal::Types::Model field :bundle_id, -> { String }, optional: false, nullable: false + field :bundle_name, -> { String }, optional: false, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPriceRequestBody] }, optional: true, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :price_per_unit, -> { Integer }, optional: false, nullable: false + field :price_per_unit_decimal, -> { String }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: true, nullable: false + field :status, -> { Schematic::Types::BillingCreditBundleStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/update_credit_bundle_details_response.rb b/lib/schematic/credits/types/update_credit_bundle_details_response.rb index 8b6d189..da6fa46 100644 --- a/lib/schematic/credits/types/update_credit_bundle_details_response.rb +++ b/lib/schematic/credits/types/update_credit_bundle_details_response.rb @@ -5,6 +5,7 @@ module Credits module Types class UpdateCreditBundleDetailsResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCreditBundleResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/credits/types/zero_out_grant_request_body.rb b/lib/schematic/credits/types/zero_out_grant_request_body.rb index 149a3ba..58d2a92 100644 --- a/lib/schematic/credits/types/zero_out_grant_request_body.rb +++ b/lib/schematic/credits/types/zero_out_grant_request_body.rb @@ -5,6 +5,7 @@ module Credits module Types class ZeroOutGrantRequestBody < Internal::Types::Model field :grant_id, -> { String }, optional: false, nullable: false + field :reason, -> { Schematic::Types::BillingCreditGrantZeroedOutReason }, optional: true, nullable: false end end diff --git a/lib/schematic/credits/types/zero_out_grant_response.rb b/lib/schematic/credits/types/zero_out_grant_response.rb index 536f5ea..078ad7c 100644 --- a/lib/schematic/credits/types/zero_out_grant_response.rb +++ b/lib/schematic/credits/types/zero_out_grant_response.rb @@ -5,6 +5,7 @@ module Credits module Types class ZeroOutGrantResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingCreditGrantResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/dataexports/client.rb b/lib/schematic/dataexports/client.rb index 950ae1c..9f5d48e 100644 --- a/lib/schematic/dataexports/client.rb +++ b/lib/schematic/dataexports/client.rb @@ -22,16 +22,22 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.dataexports.list_data_exports( + # export_type: "audit-log", + # status: "failure", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Dataexports::Types::ListDataExportsResponse] def list_data_exports(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[export_type status limit offset] query_params = {} query_params["export_type"] = params[:export_type] if params.key?(:export_type) query_params["status"] = params[:status] if params.key?(:status) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -62,6 +68,12 @@ def list_data_exports(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.dataexports.create_data_export( + # export_type: "audit-log", + # output_file_type: "csv" + # ) + # # @return [Schematic::Dataexports::Types::CreateDataExportResponse] def create_data_export(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -95,6 +107,9 @@ def create_data_export(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :data_export_id # + # @example + # client.dataexports.get_data_export(data_export_id: "data_export_id") + # # @return [Schematic::Dataexports::Types::GetDataExportResponse] def get_data_export(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -127,6 +142,9 @@ def get_data_export(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :data_export_id # + # @example + # client.dataexports.get_data_export_artifact(data_export_id: "data_export_id") + # # @return [untyped] def get_data_export_artifact(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/schematic/dataexports/types/create_data_export_request_body.rb b/lib/schematic/dataexports/types/create_data_export_request_body.rb index 75d33b2..dc3a6a2 100644 --- a/lib/schematic/dataexports/types/create_data_export_request_body.rb +++ b/lib/schematic/dataexports/types/create_data_export_request_body.rb @@ -5,7 +5,9 @@ module Dataexports module Types class CreateDataExportRequestBody < Internal::Types::Model field :export_type, -> { Schematic::Types::DataExportType }, optional: false, nullable: false + field :metadata, -> { Schematic::Types::DataExportMetadata }, optional: true, nullable: false + field :output_file_type, -> { Schematic::Types::DataExportOutputFileType }, optional: false, nullable: false end end diff --git a/lib/schematic/dataexports/types/create_data_export_response.rb b/lib/schematic/dataexports/types/create_data_export_response.rb index 55c21fc..758026f 100644 --- a/lib/schematic/dataexports/types/create_data_export_response.rb +++ b/lib/schematic/dataexports/types/create_data_export_response.rb @@ -5,6 +5,7 @@ module Dataexports module Types class CreateDataExportResponse < Internal::Types::Model field :data, -> { Schematic::Types::DataExportResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/dataexports/types/get_data_export_response.rb b/lib/schematic/dataexports/types/get_data_export_response.rb index 7a5abf5..4e2b538 100644 --- a/lib/schematic/dataexports/types/get_data_export_response.rb +++ b/lib/schematic/dataexports/types/get_data_export_response.rb @@ -5,6 +5,7 @@ module Dataexports module Types class GetDataExportResponse < Internal::Types::Model field :data, -> { Schematic::Types::DataExportResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/dataexports/types/list_data_exports_params.rb b/lib/schematic/dataexports/types/list_data_exports_params.rb index b9b998a..4e82bd0 100644 --- a/lib/schematic/dataexports/types/list_data_exports_params.rb +++ b/lib/schematic/dataexports/types/list_data_exports_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListDataExportsParams < Internal::Types::Model field :export_type, -> { Schematic::Types::DataExportType }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :status, -> { Schematic::Types::DataExportStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/dataexports/types/list_data_exports_request.rb b/lib/schematic/dataexports/types/list_data_exports_request.rb index 1348925..e0f3c6e 100644 --- a/lib/schematic/dataexports/types/list_data_exports_request.rb +++ b/lib/schematic/dataexports/types/list_data_exports_request.rb @@ -5,8 +5,11 @@ module Dataexports module Types class ListDataExportsRequest < Internal::Types::Model field :export_type, -> { Schematic::Types::DataExportType }, optional: true, nullable: false + field :status, -> { Schematic::Types::DataExportStatus }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/dataexports/types/list_data_exports_response.rb b/lib/schematic/dataexports/types/list_data_exports_response.rb index c271b45..c02ac0e 100644 --- a/lib/schematic/dataexports/types/list_data_exports_response.rb +++ b/lib/schematic/dataexports/types/list_data_exports_response.rb @@ -5,6 +5,7 @@ module Dataexports module Types class ListDataExportsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::DataExportResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Dataexports::Types::ListDataExportsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/datastream/client.rb b/lib/schematic/datastream/client.rb index 93b0f7d..8c27cd1 100644 --- a/lib/schematic/datastream/client.rb +++ b/lib/schematic/datastream/client.rb @@ -262,8 +262,8 @@ def request_entity(entity_type, keys, pending_map, &after_receive) if first_request @ws_client&.send_message({ - data: { entity_type: entity_type, keys: keys } - }) + data: { entity_type: entity_type, keys: keys } + }) end # Wait for response with timeout @@ -288,8 +288,8 @@ def handle_ready @logger.info("DataStream connection is ready") @logger.debug("Requesting initial flag data") @ws_client&.send_message({ - data: { entity_type: ENTITY_TYPE_FLAGS } - }) + data: { entity_type: ENTITY_TYPE_FLAGS } + }) end def handle_message(message) diff --git a/lib/schematic/entitlements/client.rb b/lib/schematic/entitlements/client.rb index afbd8ff..43b8603 100644 --- a/lib/schematic/entitlements/client.rb +++ b/lib/schematic/entitlements/client.rb @@ -27,10 +27,22 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.list_company_overrides( + # company_id: "company_id", + # company_ids: ["company_ids"], + # feature_id: "feature_id", + # feature_ids: ["feature_ids"], + # ids: ["ids"], + # without_expired: true, + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::ListCompanyOverridesResponse] def list_company_overrides(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id company_ids feature_id feature_ids ids without_expired q limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_ids"] = params[:company_ids] if params.key?(:company_ids) @@ -41,7 +53,6 @@ def list_company_overrides(request_options: {}, **params) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -72,6 +83,13 @@ def list_company_overrides(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.entitlements.create_company_override( + # company_id: "company_id", + # feature_id: "feature_id", + # value_type: "boolean" + # ) + # # @return [Schematic::Entitlements::Types::CreateCompanyOverrideResponse] def create_company_override(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -105,6 +123,9 @@ def create_company_override(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :company_override_id # + # @example + # client.entitlements.get_company_override(company_override_id: "company_override_id") + # # @return [Schematic::Entitlements::Types::GetCompanyOverrideResponse] def get_company_override(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -137,11 +158,17 @@ def get_company_override(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :company_override_id # + # @example + # client.entitlements.update_company_override( + # company_override_id: "company_override_id", + # value_type: "boolean" + # ) + # # @return [Schematic::Entitlements::Types::UpdateCompanyOverrideResponse] def update_company_override(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Entitlements::Types::UpdateCompanyOverrideRequestBody.new(params).to_h - non_body_param_names = ["company_override_id"] + non_body_param_names = %w[company_override_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -174,6 +201,9 @@ def update_company_override(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :company_override_id # + # @example + # client.entitlements.delete_company_override(company_override_id: "company_override_id") + # # @return [Schematic::Entitlements::Types::DeleteCompanyOverrideResponse] def delete_company_override(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -214,10 +244,22 @@ def delete_company_override(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.count_company_overrides( + # company_id: "company_id", + # company_ids: ["company_ids"], + # feature_id: "feature_id", + # feature_ids: ["feature_ids"], + # ids: ["ids"], + # without_expired: true, + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::CountCompanyOverridesResponse] def count_company_overrides(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id company_ids feature_id feature_ids ids without_expired q limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_ids"] = params[:company_ids] if params.key?(:company_ids) @@ -228,7 +270,6 @@ def count_company_overrides(request_options: {}, **params) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -263,16 +304,22 @@ def count_company_overrides(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.list_feature_companies( + # feature_id: "feature_id", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::ListFeatureCompaniesResponse] def list_feature_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_id q limit offset] query_params = {} query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -307,16 +354,22 @@ def list_feature_companies(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.count_feature_companies( + # feature_id: "feature_id", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::CountFeatureCompaniesResponse] def count_feature_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_id q limit offset] query_params = {} query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -356,10 +409,21 @@ def count_feature_companies(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.list_feature_usage( + # company_id: "company_id", + # feature_ids: ["feature_ids"], + # include_usage_aggregation: true, + # managed_by: "metronome", + # q: "q", + # without_negative_entitlements: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::ListFeatureUsageResponse] def list_feature_usage(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id company_keys feature_ids include_usage_aggregation managed_by q without_negative_entitlements limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_keys"] = params[:company_keys] if params.key?(:company_keys) @@ -370,7 +434,6 @@ def list_feature_usage(request_options: {}, **params) query_params["without_negative_entitlements"] = params[:without_negative_entitlements] if params.key?(:without_negative_entitlements) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -393,6 +456,65 @@ def list_feature_usage(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :company_ids + # @option params [String] :end_time + # @option params [String, nil] :feature_ids + # @option params [Schematic::Types::TimeSeriesGranularity, nil] :granularity + # @option params [String] :start_time + # @option params [Integer, nil] :limit + # @option params [Integer, nil] :offset + # + # @example + # client.entitlements.list_feature_usage_history( + # company_ids: ["company_ids"], + # end_time: "2024-01-15T09:30:00Z", + # feature_ids: ["feature_ids"], + # granularity: "daily", + # start_time: "2024-01-15T09:30:00Z", + # limit: 1000000, + # offset: 1000000 + # ) + # + # @return [Schematic::Entitlements::Types::ListFeatureUsageHistoryResponse] + def list_feature_usage_history(request_options: {}, **params) + params = Schematic::Internal::Types::Utils.normalize_keys(params) + query_params = {} + query_params["company_ids"] = params[:company_ids] if params.key?(:company_ids) + query_params["end_time"] = params[:end_time] if params.key?(:end_time) + query_params["feature_ids"] = params[:feature_ids] if params.key?(:feature_ids) + query_params["granularity"] = params[:granularity] if params.key?(:granularity) + query_params["start_time"] = params[:start_time] if params.key?(:start_time) + query_params["limit"] = params[:limit] if params.key?(:limit) + query_params["offset"] = params[:offset] if params.key?(:offset) + + request = Schematic::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "feature-usage-history", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Schematic::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Schematic::Entitlements::Types::ListFeatureUsageHistoryResponse.load(response.body) + else + error_class = Schematic::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url @@ -406,17 +528,24 @@ def list_feature_usage(request_options: {}, **params) # @option params [Schematic::Types::TimeSeriesGranularity, nil] :granularity # @option params [String] :start_time # + # @example + # client.entitlements.get_feature_usage_time_series( + # company_id: "company_id", + # end_time: "2024-01-15T09:30:00Z", + # feature_id: "feature_id", + # granularity: "daily", + # start_time: "2024-01-15T09:30:00Z" + # ) + # # @return [Schematic::Entitlements::Types::GetFeatureUsageTimeSeriesResponse] def get_feature_usage_time_series(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id end_time feature_id granularity start_time] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["end_time"] = params[:end_time] if params.key?(:end_time) query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["granularity"] = params[:granularity] if params.key?(:granularity) query_params["start_time"] = params[:start_time] if params.key?(:start_time) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -456,10 +585,21 @@ def get_feature_usage_time_series(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.count_feature_usage( + # company_id: "company_id", + # feature_ids: ["feature_ids"], + # include_usage_aggregation: true, + # managed_by: "metronome", + # q: "q", + # without_negative_entitlements: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::CountFeatureUsageResponse] def count_feature_usage(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id company_keys feature_ids include_usage_aggregation managed_by q without_negative_entitlements limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_keys"] = params[:company_keys] if params.key?(:company_keys) @@ -470,7 +610,6 @@ def count_feature_usage(request_options: {}, **params) query_params["without_negative_entitlements"] = params[:without_negative_entitlements] if params.key?(:without_negative_entitlements) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -505,16 +644,22 @@ def count_feature_usage(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.list_feature_users( + # feature_id: "feature_id", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::ListFeatureUsersResponse] def list_feature_users(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_id q limit offset] query_params = {} query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -549,16 +694,22 @@ def list_feature_users(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.count_feature_users( + # feature_id: "feature_id", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::CountFeatureUsersResponse] def count_feature_users(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_id q limit offset] query_params = {} query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -600,10 +751,24 @@ def count_feature_users(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.list_plan_entitlements( + # feature_id: "feature_id", + # feature_ids: ["feature_ids"], + # ids: ["ids"], + # plan_id: "plan_id", + # plan_ids: ["plan_ids"], + # plan_version_id: "plan_version_id", + # plan_version_ids: ["plan_version_ids"], + # q: "q", + # with_metered_products: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::ListPlanEntitlementsResponse] def list_plan_entitlements(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_id feature_ids ids plan_id plan_ids plan_version_id plan_version_ids q with_metered_products limit offset] query_params = {} query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["feature_ids"] = params[:feature_ids] if params.key?(:feature_ids) @@ -616,7 +781,6 @@ def list_plan_entitlements(request_options: {}, **params) query_params["with_metered_products"] = params[:with_metered_products] if params.key?(:with_metered_products) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -647,6 +811,13 @@ def list_plan_entitlements(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.entitlements.create_plan_entitlement( + # feature_id: "feature_id", + # plan_id: "plan_id", + # value_type: "boolean" + # ) + # # @return [Schematic::Entitlements::Types::CreatePlanEntitlementResponse] def create_plan_entitlement(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -680,6 +851,9 @@ def create_plan_entitlement(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_entitlement_id # + # @example + # client.entitlements.get_plan_entitlement(plan_entitlement_id: "plan_entitlement_id") + # # @return [Schematic::Entitlements::Types::GetPlanEntitlementResponse] def get_plan_entitlement(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -712,11 +886,17 @@ def get_plan_entitlement(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_entitlement_id # + # @example + # client.entitlements.update_plan_entitlement( + # plan_entitlement_id: "plan_entitlement_id", + # value_type: "boolean" + # ) + # # @return [Schematic::Entitlements::Types::UpdatePlanEntitlementResponse] def update_plan_entitlement(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Entitlements::Types::UpdatePlanEntitlementRequestBody.new(params).to_h - non_body_param_names = ["plan_entitlement_id"] + non_body_param_names = %w[plan_entitlement_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -749,6 +929,9 @@ def update_plan_entitlement(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_entitlement_id # + # @example + # client.entitlements.delete_plan_entitlement(plan_entitlement_id: "plan_entitlement_id") + # # @return [Schematic::Entitlements::Types::DeletePlanEntitlementResponse] def delete_plan_entitlement(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -780,6 +963,15 @@ def delete_plan_entitlement(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.entitlements.upsert_plan_entitlement_for_billing_product( + # billing_provider: "metronome", + # external_resource_id: "external_resource_id", + # feature_id: "feature_id", + # plan_id: "plan_id", + # value_type: "boolean" + # ) + # # @return [Schematic::Entitlements::Types::UpsertPlanEntitlementForBillingProductResponse] def upsert_plan_entitlement_for_billing_product(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -823,10 +1015,24 @@ def upsert_plan_entitlement_for_billing_product(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.entitlements.count_plan_entitlements( + # feature_id: "feature_id", + # feature_ids: ["feature_ids"], + # ids: ["ids"], + # plan_id: "plan_id", + # plan_ids: ["plan_ids"], + # plan_version_id: "plan_version_id", + # plan_version_ids: ["plan_version_ids"], + # q: "q", + # with_metered_products: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Entitlements::Types::CountPlanEntitlementsResponse] def count_plan_entitlements(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_id feature_ids ids plan_id plan_ids plan_version_id plan_version_ids q with_metered_products limit offset] query_params = {} query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["feature_ids"] = params[:feature_ids] if params.key?(:feature_ids) @@ -839,7 +1045,6 @@ def count_plan_entitlements(request_options: {}, **params) query_params["with_metered_products"] = params[:with_metered_products] if params.key?(:with_metered_products) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -870,6 +1075,12 @@ def count_plan_entitlements(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.entitlements.duplicate_plan_entitlements( + # source_plan_id: "source_plan_id", + # target_plan_id: "target_plan_id" + # ) + # # @return [Schematic::Entitlements::Types::DuplicatePlanEntitlementsResponse] def duplicate_plan_entitlements(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -903,13 +1114,16 @@ def duplicate_plan_entitlements(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Hash[String, String]] :keys # + # @example + # client.entitlements.get_feature_usage_by_company(keys: { + # keys: "keys" + # }) + # # @return [Schematic::Entitlements::Types::GetFeatureUsageByCompanyResponse] def get_feature_usage_by_company(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[keys] query_params = {} query_params["keys"] = params[:keys] if params.key?(:keys) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -944,16 +1158,22 @@ def get_feature_usage_by_company(request_options: {}, **params) # @option params [String, nil] :feature_id # @option params [String, nil] :start_time # + # @example + # client.entitlements.get_user_usage_by_company( + # company_id: "company_id", + # end_time: "2024-01-15T09:30:00Z", + # feature_id: "feature_id", + # start_time: "2024-01-15T09:30:00Z" + # ) + # # @return [Schematic::Entitlements::Types::GetUserUsageByCompanyResponse] def get_user_usage_by_company(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id end_time feature_id start_time] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["end_time"] = params[:end_time] if params.key?(:end_time) query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["start_time"] = params[:start_time] if params.key?(:start_time) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -988,16 +1208,22 @@ def get_user_usage_by_company(request_options: {}, **params) # @option params [String, nil] :start_time # @option params [String] :user_id # + # @example + # client.entitlements.get_user_usage_detail( + # company_id: "company_id", + # end_time: "2024-01-15T09:30:00Z", + # start_time: "2024-01-15T09:30:00Z", + # user_id: "user_id" + # ) + # # @return [Schematic::Entitlements::Types::GetUserUsageDetailResponse] def get_user_usage_detail(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id end_time start_time user_id] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["end_time"] = params[:end_time] if params.key?(:end_time) query_params["start_time"] = params[:start_time] if params.key?(:start_time) query_params["user_id"] = params[:user_id] if params.key?(:user_id) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], diff --git a/lib/schematic/entitlements/types/count_company_overrides_params.rb b/lib/schematic/entitlements/types/count_company_overrides_params.rb index f9baba2..384d19d 100644 --- a/lib/schematic/entitlements/types/count_company_overrides_params.rb +++ b/lib/schematic/entitlements/types/count_company_overrides_params.rb @@ -6,13 +6,21 @@ module Types # Input parameters class CountCompanyOverridesParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_expired, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_company_overrides_request.rb b/lib/schematic/entitlements/types/count_company_overrides_request.rb index b30a132..590fc93 100644 --- a/lib/schematic/entitlements/types/count_company_overrides_request.rb +++ b/lib/schematic/entitlements/types/count_company_overrides_request.rb @@ -5,13 +5,21 @@ module Entitlements module Types class CountCompanyOverridesRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :feature_ids, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :without_expired, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_company_overrides_response.rb b/lib/schematic/entitlements/types/count_company_overrides_response.rb index 4fbfb03..13dccf4 100644 --- a/lib/schematic/entitlements/types/count_company_overrides_response.rb +++ b/lib/schematic/entitlements/types/count_company_overrides_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class CountCompanyOverridesResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::CountCompanyOverridesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_feature_companies_params.rb b/lib/schematic/entitlements/types/count_feature_companies_params.rb index f786e44..c91ac57 100644 --- a/lib/schematic/entitlements/types/count_feature_companies_params.rb +++ b/lib/schematic/entitlements/types/count_feature_companies_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class CountFeatureCompaniesParams < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_feature_companies_request.rb b/lib/schematic/entitlements/types/count_feature_companies_request.rb index 49f65c5..1caaa9f 100644 --- a/lib/schematic/entitlements/types/count_feature_companies_request.rb +++ b/lib/schematic/entitlements/types/count_feature_companies_request.rb @@ -5,8 +5,11 @@ module Entitlements module Types class CountFeatureCompaniesRequest < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_feature_companies_response.rb b/lib/schematic/entitlements/types/count_feature_companies_response.rb index b8d5d46..6f806f9 100644 --- a/lib/schematic/entitlements/types/count_feature_companies_response.rb +++ b/lib/schematic/entitlements/types/count_feature_companies_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class CountFeatureCompaniesResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::CountFeatureCompaniesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_feature_usage_params.rb b/lib/schematic/entitlements/types/count_feature_usage_params.rb index 8e76c34..c9dadd2 100644 --- a/lib/schematic/entitlements/types/count_feature_usage_params.rb +++ b/lib/schematic/entitlements/types/count_feature_usage_params.rb @@ -6,13 +6,21 @@ module Types # Input parameters class CountFeatureUsageParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_keys, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :include_usage_aggregation, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_negative_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_feature_usage_request.rb b/lib/schematic/entitlements/types/count_feature_usage_request.rb index 3b3541c..8a48b44 100644 --- a/lib/schematic/entitlements/types/count_feature_usage_request.rb +++ b/lib/schematic/entitlements/types/count_feature_usage_request.rb @@ -5,13 +5,21 @@ module Entitlements module Types class CountFeatureUsageRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_keys, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + field :feature_ids, -> { String }, optional: true, nullable: false + field :include_usage_aggregation, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_negative_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_feature_usage_response.rb b/lib/schematic/entitlements/types/count_feature_usage_response.rb index 659a859..f5dc040 100644 --- a/lib/schematic/entitlements/types/count_feature_usage_response.rb +++ b/lib/schematic/entitlements/types/count_feature_usage_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class CountFeatureUsageResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::CountFeatureUsageParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_feature_users_params.rb b/lib/schematic/entitlements/types/count_feature_users_params.rb index 8ee5a15..08ed87b 100644 --- a/lib/schematic/entitlements/types/count_feature_users_params.rb +++ b/lib/schematic/entitlements/types/count_feature_users_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class CountFeatureUsersParams < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_feature_users_request.rb b/lib/schematic/entitlements/types/count_feature_users_request.rb index 3e2d316..3ea1f54 100644 --- a/lib/schematic/entitlements/types/count_feature_users_request.rb +++ b/lib/schematic/entitlements/types/count_feature_users_request.rb @@ -5,8 +5,11 @@ module Entitlements module Types class CountFeatureUsersRequest < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_feature_users_response.rb b/lib/schematic/entitlements/types/count_feature_users_response.rb index 713be45..f593aaa 100644 --- a/lib/schematic/entitlements/types/count_feature_users_response.rb +++ b/lib/schematic/entitlements/types/count_feature_users_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class CountFeatureUsersResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::CountFeatureUsersParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_plan_entitlements_params.rb b/lib/schematic/entitlements/types/count_plan_entitlements_params.rb index a7f1d0c..91ce456 100644 --- a/lib/schematic/entitlements/types/count_plan_entitlements_params.rb +++ b/lib/schematic/entitlements/types/count_plan_entitlements_params.rb @@ -6,15 +6,25 @@ module Types # Input parameters class CountPlanEntitlementsParams < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :with_metered_products, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_plan_entitlements_request.rb b/lib/schematic/entitlements/types/count_plan_entitlements_request.rb index b3da640..4bacba6 100644 --- a/lib/schematic/entitlements/types/count_plan_entitlements_request.rb +++ b/lib/schematic/entitlements/types/count_plan_entitlements_request.rb @@ -5,15 +5,25 @@ module Entitlements module Types class CountPlanEntitlementsRequest < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :feature_ids, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :with_metered_products, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/count_plan_entitlements_response.rb b/lib/schematic/entitlements/types/count_plan_entitlements_response.rb index bbdc21a..944b4a4 100644 --- a/lib/schematic/entitlements/types/count_plan_entitlements_response.rb +++ b/lib/schematic/entitlements/types/count_plan_entitlements_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class CountPlanEntitlementsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::CountPlanEntitlementsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb index 398a2b2..a97ca66 100644 --- a/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb @@ -5,40 +5,75 @@ module Entitlements module Types class CreateBillingLinkedPlanEntitlementRequestBody < Internal::Types::Model field :billing_product_id, -> { String }, optional: true, nullable: false + field :billing_provider, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false + field :external_resource_id, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :monthly_metered_price_id, -> { String }, optional: true, nullable: false + field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :monthly_unit_price, -> { Integer }, optional: true, nullable: false + field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :overage_billing_product_id, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_metered_price_id, -> { String }, optional: true, nullable: false + field :quarterly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_unit_price, -> { Integer }, optional: true, nullable: false + field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit_id, -> { String }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false + field :yearly_metered_price_id, -> { String }, optional: true, nullable: false + field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :yearly_unit_price, -> { Integer }, optional: true, nullable: false + field :yearly_unit_price_decimal, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/create_company_override_request_body.rb b/lib/schematic/entitlements/types/create_company_override_request_body.rb index 979a846..eb22db5 100644 --- a/lib/schematic/entitlements/types/create_company_override_request_body.rb +++ b/lib/schematic/entitlements/types/create_company_override_request_body.rb @@ -5,16 +5,27 @@ module Entitlements module Types class CreateCompanyOverrideRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :expiration_date, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :note, -> { String }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit_id, -> { String }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/create_company_override_response.rb b/lib/schematic/entitlements/types/create_company_override_response.rb index c66ac01..4a405d6 100644 --- a/lib/schematic/entitlements/types/create_company_override_response.rb +++ b/lib/schematic/entitlements/types/create_company_override_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class CreateCompanyOverrideResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyOverrideResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb index 08698be..8ec4edb 100644 --- a/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb @@ -5,38 +5,71 @@ module Entitlements module Types class CreatePlanEntitlementRequestBody < Internal::Types::Model field :billing_product_id, -> { String }, optional: true, nullable: false + field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :monthly_metered_price_id, -> { String }, optional: true, nullable: false + field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :monthly_unit_price, -> { Integer }, optional: true, nullable: false + field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :overage_billing_product_id, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_metered_price_id, -> { String }, optional: true, nullable: false + field :quarterly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_unit_price, -> { Integer }, optional: true, nullable: false + field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit_id, -> { String }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false + field :yearly_metered_price_id, -> { String }, optional: true, nullable: false + field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :yearly_unit_price, -> { Integer }, optional: true, nullable: false + field :yearly_unit_price_decimal, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/create_plan_entitlement_response.rb b/lib/schematic/entitlements/types/create_plan_entitlement_response.rb index bc74d38..ef6022f 100644 --- a/lib/schematic/entitlements/types/create_plan_entitlement_response.rb +++ b/lib/schematic/entitlements/types/create_plan_entitlement_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class CreatePlanEntitlementResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanEntitlementResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/delete_company_override_response.rb b/lib/schematic/entitlements/types/delete_company_override_response.rb index ff9addf..d2f12c6 100644 --- a/lib/schematic/entitlements/types/delete_company_override_response.rb +++ b/lib/schematic/entitlements/types/delete_company_override_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class DeleteCompanyOverrideResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/delete_plan_entitlement_response.rb b/lib/schematic/entitlements/types/delete_plan_entitlement_response.rb index 83c3851..4f55c37 100644 --- a/lib/schematic/entitlements/types/delete_plan_entitlement_response.rb +++ b/lib/schematic/entitlements/types/delete_plan_entitlement_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class DeletePlanEntitlementResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/duplicate_plan_entitlements_request_body.rb b/lib/schematic/entitlements/types/duplicate_plan_entitlements_request_body.rb index da98ab2..a10fb75 100644 --- a/lib/schematic/entitlements/types/duplicate_plan_entitlements_request_body.rb +++ b/lib/schematic/entitlements/types/duplicate_plan_entitlements_request_body.rb @@ -5,6 +5,7 @@ module Entitlements module Types class DuplicatePlanEntitlementsRequestBody < Internal::Types::Model field :source_plan_id, -> { String }, optional: false, nullable: false + field :target_plan_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/duplicate_plan_entitlements_response.rb b/lib/schematic/entitlements/types/duplicate_plan_entitlements_response.rb index c46c821..825c718 100644 --- a/lib/schematic/entitlements/types/duplicate_plan_entitlements_response.rb +++ b/lib/schematic/entitlements/types/duplicate_plan_entitlements_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class DuplicatePlanEntitlementsResponse < Internal::Types::Model field :data, -> { Schematic::Types::DuplicatePlanEntitlementsResponseResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_company_override_response.rb b/lib/schematic/entitlements/types/get_company_override_response.rb index 7d8a66e..7ebf8e8 100644 --- a/lib/schematic/entitlements/types/get_company_override_response.rb +++ b/lib/schematic/entitlements/types/get_company_override_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class GetCompanyOverrideResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyOverrideResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_feature_usage_by_company_response.rb b/lib/schematic/entitlements/types/get_feature_usage_by_company_response.rb index 607709a..9036b09 100644 --- a/lib/schematic/entitlements/types/get_feature_usage_by_company_response.rb +++ b/lib/schematic/entitlements/types/get_feature_usage_by_company_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class GetFeatureUsageByCompanyResponse < Internal::Types::Model field :data, -> { Schematic::Types::FeatureUsageDetailResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::GetFeatureUsageByCompanyParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_feature_usage_time_series_params.rb b/lib/schematic/entitlements/types/get_feature_usage_time_series_params.rb index f355696..c2fbf2b 100644 --- a/lib/schematic/entitlements/types/get_feature_usage_time_series_params.rb +++ b/lib/schematic/entitlements/types/get_feature_usage_time_series_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class GetFeatureUsageTimeSeriesParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_feature_usage_time_series_request.rb b/lib/schematic/entitlements/types/get_feature_usage_time_series_request.rb index 56932ef..ff476cd 100644 --- a/lib/schematic/entitlements/types/get_feature_usage_time_series_request.rb +++ b/lib/schematic/entitlements/types/get_feature_usage_time_series_request.rb @@ -5,9 +5,13 @@ module Entitlements module Types class GetFeatureUsageTimeSeriesRequest < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :end_time, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false + field :start_time, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_feature_usage_time_series_response.rb b/lib/schematic/entitlements/types/get_feature_usage_time_series_response.rb index 54d81d0..8a7c01a 100644 --- a/lib/schematic/entitlements/types/get_feature_usage_time_series_response.rb +++ b/lib/schematic/entitlements/types/get_feature_usage_time_series_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class GetFeatureUsageTimeSeriesResponse < Internal::Types::Model field :data, -> { Schematic::Types::FeatureUsageTimeSeriesResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::GetFeatureUsageTimeSeriesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_plan_entitlement_response.rb b/lib/schematic/entitlements/types/get_plan_entitlement_response.rb index c2fb66f..695f99c 100644 --- a/lib/schematic/entitlements/types/get_plan_entitlement_response.rb +++ b/lib/schematic/entitlements/types/get_plan_entitlement_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class GetPlanEntitlementResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanEntitlementResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_user_usage_by_company_params.rb b/lib/schematic/entitlements/types/get_user_usage_by_company_params.rb index d9e0e46..ed1b37b 100644 --- a/lib/schematic/entitlements/types/get_user_usage_by_company_params.rb +++ b/lib/schematic/entitlements/types/get_user_usage_by_company_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class GetUserUsageByCompanyParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb b/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb index afd2d68..b412873 100644 --- a/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb +++ b/lib/schematic/entitlements/types/get_user_usage_by_company_request.rb @@ -5,8 +5,11 @@ module Entitlements module Types class GetUserUsageByCompanyRequest < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb b/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb index 59df4cf..ba25e42 100644 --- a/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb +++ b/lib/schematic/entitlements/types/get_user_usage_by_company_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class GetUserUsageByCompanyResponse < Internal::Types::Model field :data, -> { Schematic::Types::UserUsageByCompanyResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::GetUserUsageByCompanyParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_user_usage_detail_params.rb b/lib/schematic/entitlements/types/get_user_usage_detail_params.rb index 01b4396..66e1ebd 100644 --- a/lib/schematic/entitlements/types/get_user_usage_detail_params.rb +++ b/lib/schematic/entitlements/types/get_user_usage_detail_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class GetUserUsageDetailParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_user_usage_detail_request.rb b/lib/schematic/entitlements/types/get_user_usage_detail_request.rb index ef2087b..d70fb44 100644 --- a/lib/schematic/entitlements/types/get_user_usage_detail_request.rb +++ b/lib/schematic/entitlements/types/get_user_usage_detail_request.rb @@ -5,8 +5,11 @@ module Entitlements module Types class GetUserUsageDetailRequest < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/get_user_usage_detail_response.rb b/lib/schematic/entitlements/types/get_user_usage_detail_response.rb index 6cdd6f8..416493a 100644 --- a/lib/schematic/entitlements/types/get_user_usage_detail_response.rb +++ b/lib/schematic/entitlements/types/get_user_usage_detail_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class GetUserUsageDetailResponse < Internal::Types::Model field :data, -> { Schematic::Types::UserUsageDetailResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::GetUserUsageDetailParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_company_overrides_params.rb b/lib/schematic/entitlements/types/list_company_overrides_params.rb index de9b0ad..1bf9e63 100644 --- a/lib/schematic/entitlements/types/list_company_overrides_params.rb +++ b/lib/schematic/entitlements/types/list_company_overrides_params.rb @@ -6,13 +6,21 @@ module Types # Input parameters class ListCompanyOverridesParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_expired, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_company_overrides_request.rb b/lib/schematic/entitlements/types/list_company_overrides_request.rb index 4c07721..2fed09e 100644 --- a/lib/schematic/entitlements/types/list_company_overrides_request.rb +++ b/lib/schematic/entitlements/types/list_company_overrides_request.rb @@ -5,13 +5,21 @@ module Entitlements module Types class ListCompanyOverridesRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :feature_ids, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :without_expired, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_company_overrides_response.rb b/lib/schematic/entitlements/types/list_company_overrides_response.rb index 46a94f3..61697c6 100644 --- a/lib/schematic/entitlements/types/list_company_overrides_response.rb +++ b/lib/schematic/entitlements/types/list_company_overrides_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class ListCompanyOverridesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CompanyOverrideResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::ListCompanyOverridesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_feature_companies_params.rb b/lib/schematic/entitlements/types/list_feature_companies_params.rb index 464b53d..95a2045 100644 --- a/lib/schematic/entitlements/types/list_feature_companies_params.rb +++ b/lib/schematic/entitlements/types/list_feature_companies_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListFeatureCompaniesParams < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_feature_companies_request.rb b/lib/schematic/entitlements/types/list_feature_companies_request.rb index 72e244b..9595705 100644 --- a/lib/schematic/entitlements/types/list_feature_companies_request.rb +++ b/lib/schematic/entitlements/types/list_feature_companies_request.rb @@ -5,8 +5,11 @@ module Entitlements module Types class ListFeatureCompaniesRequest < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_feature_companies_response.rb b/lib/schematic/entitlements/types/list_feature_companies_response.rb index 410438c..43f2348 100644 --- a/lib/schematic/entitlements/types/list_feature_companies_response.rb +++ b/lib/schematic/entitlements/types/list_feature_companies_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class ListFeatureCompaniesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::FeatureCompanyResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::ListFeatureCompaniesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_feature_usage_history_params.rb b/lib/schematic/entitlements/types/list_feature_usage_history_params.rb new file mode 100644 index 0000000..822f651 --- /dev/null +++ b/lib/schematic/entitlements/types/list_feature_usage_history_params.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + # Input parameters + class ListFeatureUsageHistoryParams < Internal::Types::Model + field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :end_time, -> { String }, optional: true, nullable: false + + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false + + field :limit, -> { Integer }, optional: true, nullable: false + + field :offset, -> { Integer }, optional: true, nullable: false + + field :start_time, -> { String }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/entitlements/types/list_feature_usage_history_request.rb b/lib/schematic/entitlements/types/list_feature_usage_history_request.rb new file mode 100644 index 0000000..ad72aff --- /dev/null +++ b/lib/schematic/entitlements/types/list_feature_usage_history_request.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + class ListFeatureUsageHistoryRequest < Internal::Types::Model + field :company_ids, -> { String }, optional: true, nullable: false + + field :end_time, -> { String }, optional: false, nullable: false + + field :feature_ids, -> { String }, optional: true, nullable: false + + field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false + + field :start_time, -> { String }, optional: false, nullable: false + + field :limit, -> { Integer }, optional: true, nullable: false + + field :offset, -> { Integer }, optional: true, nullable: false + end + end + end +end diff --git a/lib/schematic/entitlements/types/list_feature_usage_history_response.rb b/lib/schematic/entitlements/types/list_feature_usage_history_response.rb new file mode 100644 index 0000000..99250a2 --- /dev/null +++ b/lib/schematic/entitlements/types/list_feature_usage_history_response.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Entitlements + module Types + class ListFeatureUsageHistoryResponse < Internal::Types::Model + field :data, -> { Internal::Types::Array[Schematic::Types::FeatureUsageHistoryResponseData] }, optional: false, nullable: false + + field :params, -> { Schematic::Entitlements::Types::ListFeatureUsageHistoryParams }, optional: false, nullable: false + end + end + end +end diff --git a/lib/schematic/entitlements/types/list_feature_usage_params.rb b/lib/schematic/entitlements/types/list_feature_usage_params.rb index c25df34..f8a492f 100644 --- a/lib/schematic/entitlements/types/list_feature_usage_params.rb +++ b/lib/schematic/entitlements/types/list_feature_usage_params.rb @@ -6,13 +6,21 @@ module Types # Input parameters class ListFeatureUsageParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_keys, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :include_usage_aggregation, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_negative_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_feature_usage_request.rb b/lib/schematic/entitlements/types/list_feature_usage_request.rb index 214d23b..c651273 100644 --- a/lib/schematic/entitlements/types/list_feature_usage_request.rb +++ b/lib/schematic/entitlements/types/list_feature_usage_request.rb @@ -5,13 +5,21 @@ module Entitlements module Types class ListFeatureUsageRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_keys, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + field :feature_ids, -> { String }, optional: true, nullable: false + field :include_usage_aggregation, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_negative_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_feature_usage_response.rb b/lib/schematic/entitlements/types/list_feature_usage_response.rb index 65aa1af..aebf4a8 100644 --- a/lib/schematic/entitlements/types/list_feature_usage_response.rb +++ b/lib/schematic/entitlements/types/list_feature_usage_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class ListFeatureUsageResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::FeatureUsageResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::ListFeatureUsageParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_feature_users_params.rb b/lib/schematic/entitlements/types/list_feature_users_params.rb index 235cf43..454b20f 100644 --- a/lib/schematic/entitlements/types/list_feature_users_params.rb +++ b/lib/schematic/entitlements/types/list_feature_users_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListFeatureUsersParams < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_feature_users_request.rb b/lib/schematic/entitlements/types/list_feature_users_request.rb index 9b7bd6c..ec32875 100644 --- a/lib/schematic/entitlements/types/list_feature_users_request.rb +++ b/lib/schematic/entitlements/types/list_feature_users_request.rb @@ -5,8 +5,11 @@ module Entitlements module Types class ListFeatureUsersRequest < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_feature_users_response.rb b/lib/schematic/entitlements/types/list_feature_users_response.rb index 3342e78..d13a5f1 100644 --- a/lib/schematic/entitlements/types/list_feature_users_response.rb +++ b/lib/schematic/entitlements/types/list_feature_users_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class ListFeatureUsersResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::FeatureCompanyUserResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::ListFeatureUsersParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_plan_entitlements_params.rb b/lib/schematic/entitlements/types/list_plan_entitlements_params.rb index 59efd76..f94febd 100644 --- a/lib/schematic/entitlements/types/list_plan_entitlements_params.rb +++ b/lib/schematic/entitlements/types/list_plan_entitlements_params.rb @@ -6,15 +6,25 @@ module Types # Input parameters class ListPlanEntitlementsParams < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :with_metered_products, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_plan_entitlements_request.rb b/lib/schematic/entitlements/types/list_plan_entitlements_request.rb index 655c398..f41c03e 100644 --- a/lib/schematic/entitlements/types/list_plan_entitlements_request.rb +++ b/lib/schematic/entitlements/types/list_plan_entitlements_request.rb @@ -5,15 +5,25 @@ module Entitlements module Types class ListPlanEntitlementsRequest < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :feature_ids, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :with_metered_products, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/list_plan_entitlements_response.rb b/lib/schematic/entitlements/types/list_plan_entitlements_response.rb index a79feb7..16f54f4 100644 --- a/lib/schematic/entitlements/types/list_plan_entitlements_response.rb +++ b/lib/schematic/entitlements/types/list_plan_entitlements_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class ListPlanEntitlementsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Entitlements::Types::ListPlanEntitlementsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/update_company_override_request_body.rb b/lib/schematic/entitlements/types/update_company_override_request_body.rb index fb3e7d9..28eb92c 100644 --- a/lib/schematic/entitlements/types/update_company_override_request_body.rb +++ b/lib/schematic/entitlements/types/update_company_override_request_body.rb @@ -5,15 +5,25 @@ module Entitlements module Types class UpdateCompanyOverrideRequestBody < Internal::Types::Model field :company_override_id, -> { String }, optional: false, nullable: false + field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :expiration_date, -> { String }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :note, -> { String }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit_id, -> { String }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/update_company_override_response.rb b/lib/schematic/entitlements/types/update_company_override_response.rb index 4323cce..e023039 100644 --- a/lib/schematic/entitlements/types/update_company_override_response.rb +++ b/lib/schematic/entitlements/types/update_company_override_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class UpdateCompanyOverrideResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyOverrideResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb b/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb index 1967a3e..dbbe1e6 100644 --- a/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +++ b/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb @@ -5,36 +5,67 @@ module Entitlements module Types class UpdatePlanEntitlementRequestBody < Internal::Types::Model field :plan_entitlement_id, -> { String }, optional: false, nullable: false + field :billing_product_id, -> { String }, optional: true, nullable: false + field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :monthly_metered_price_id, -> { String }, optional: true, nullable: false + field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :monthly_unit_price, -> { Integer }, optional: true, nullable: false + field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :overage_billing_product_id, -> { String }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_metered_price_id, -> { String }, optional: true, nullable: false + field :quarterly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_unit_price, -> { Integer }, optional: true, nullable: false + field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit_id, -> { String }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false + field :yearly_metered_price_id, -> { String }, optional: true, nullable: false + field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :yearly_unit_price, -> { Integer }, optional: true, nullable: false + field :yearly_unit_price_decimal, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/entitlements/types/update_plan_entitlement_response.rb b/lib/schematic/entitlements/types/update_plan_entitlement_response.rb index b9a0d97..023ad79 100644 --- a/lib/schematic/entitlements/types/update_plan_entitlement_response.rb +++ b/lib/schematic/entitlements/types/update_plan_entitlement_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class UpdatePlanEntitlementResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanEntitlementResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response.rb b/lib/schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response.rb index 7ed5e16..8ea4f33 100644 --- a/lib/schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response.rb +++ b/lib/schematic/entitlements/types/upsert_plan_entitlement_for_billing_product_response.rb @@ -5,6 +5,7 @@ module Entitlements module Types class UpsertPlanEntitlementForBillingProductResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanEntitlementResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/events/client.rb b/lib/schematic/events/client.rb index a00b92a..14375bb 100644 --- a/lib/schematic/events/client.rb +++ b/lib/schematic/events/client.rb @@ -18,6 +18,11 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.events.create_event_batch(events: [{ + # event_type: "flag_check" + # }]) + # # @return [Schematic::Events::Types::CreateEventBatchResponse] def create_event_batch(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -54,16 +59,22 @@ def create_event_batch(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.events.get_event_summaries( + # q: "q", + # event_subtypes: ["event_subtypes"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Events::Types::GetEventSummariesResponse] def get_event_summaries(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[q event_subtypes limit offset] query_params = {} query_params["q"] = params[:q] if params.key?(:q) query_params["event_subtypes"] = params[:event_subtypes] if params.key?(:event_subtypes) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -102,10 +113,21 @@ def get_event_summaries(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.events.list_events( + # company_id: "company_id", + # event_subtype: "event_subtype", + # event_types: ["flag_check"], + # flag_id: "flag_id", + # idempotency_key: "idempotency_key", + # user_id: "user_id", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Events::Types::ListEventsResponse] def list_events(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id event_subtype event_types flag_id idempotency_key user_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["event_subtype"] = params[:event_subtype] if params.key?(:event_subtype) @@ -115,7 +137,6 @@ def list_events(request_options: {}, **params) query_params["user_id"] = params[:user_id] if params.key?(:user_id) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -146,6 +167,9 @@ def list_events(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.events.create_event(event_type: "flag_check") + # # @return [Schematic::Events::Types::CreateEventResponse] def create_event(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -179,6 +203,9 @@ def create_event(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :event_id # + # @example + # client.events.get_event(event_id: "event_id") + # # @return [Schematic::Events::Types::GetEventResponse] def get_event(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -203,16 +230,18 @@ def get_event(request_options: {}, **params) end # @param request_options [Hash] - # @param params [Hash] + # @param _params [Hash] # @option request_options [String] :base_url # @option request_options [Hash{String => Object}] :additional_headers # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.events.get_segment_integration_status + # # @return [Schematic::Events::Types::GetSegmentIntegrationStatusResponse] - def get_segment_integration_status(request_options: {}, **params) - Schematic::Internal::Types::Utils.normalize_keys(params) + def get_segment_integration_status(request_options: {}, **_params) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "GET", diff --git a/lib/schematic/events/types/create_event_batch_response.rb b/lib/schematic/events/types/create_event_batch_response.rb index 79d5cc4..0ce8db7 100644 --- a/lib/schematic/events/types/create_event_batch_response.rb +++ b/lib/schematic/events/types/create_event_batch_response.rb @@ -5,6 +5,7 @@ module Events module Types class CreateEventBatchResponse < Internal::Types::Model field :data, -> { Schematic::Types::RawEventBatchResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/events/types/create_event_response.rb b/lib/schematic/events/types/create_event_response.rb index d02f53e..c65d68d 100644 --- a/lib/schematic/events/types/create_event_response.rb +++ b/lib/schematic/events/types/create_event_response.rb @@ -5,6 +5,7 @@ module Events module Types class CreateEventResponse < Internal::Types::Model field :data, -> { Schematic::Types::RawEventResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/events/types/get_event_response.rb b/lib/schematic/events/types/get_event_response.rb index 4bd2715..9988993 100644 --- a/lib/schematic/events/types/get_event_response.rb +++ b/lib/schematic/events/types/get_event_response.rb @@ -5,6 +5,7 @@ module Events module Types class GetEventResponse < Internal::Types::Model field :data, -> { Schematic::Types::EventDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/events/types/get_event_summaries_params.rb b/lib/schematic/events/types/get_event_summaries_params.rb index 236bb3e..fb8e0c2 100644 --- a/lib/schematic/events/types/get_event_summaries_params.rb +++ b/lib/schematic/events/types/get_event_summaries_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class GetEventSummariesParams < Internal::Types::Model field :event_subtypes, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/events/types/get_event_summaries_request.rb b/lib/schematic/events/types/get_event_summaries_request.rb index 930863b..53c95d5 100644 --- a/lib/schematic/events/types/get_event_summaries_request.rb +++ b/lib/schematic/events/types/get_event_summaries_request.rb @@ -5,8 +5,11 @@ module Events module Types class GetEventSummariesRequest < Internal::Types::Model field :q, -> { String }, optional: true, nullable: false + field :event_subtypes, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/events/types/get_event_summaries_response.rb b/lib/schematic/events/types/get_event_summaries_response.rb index 57d4d05..619e947 100644 --- a/lib/schematic/events/types/get_event_summaries_response.rb +++ b/lib/schematic/events/types/get_event_summaries_response.rb @@ -5,6 +5,7 @@ module Events module Types class GetEventSummariesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::EventSummaryResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Events::Types::GetEventSummariesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/events/types/get_segment_integration_status_response.rb b/lib/schematic/events/types/get_segment_integration_status_response.rb index 0dbd10d..bc03bbf 100644 --- a/lib/schematic/events/types/get_segment_integration_status_response.rb +++ b/lib/schematic/events/types/get_segment_integration_status_response.rb @@ -5,6 +5,7 @@ module Events module Types class GetSegmentIntegrationStatusResponse < Internal::Types::Model field :data, -> { Schematic::Types::SegmentStatusResp }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/events/types/list_events_params.rb b/lib/schematic/events/types/list_events_params.rb index 4a42e00..5e9192e 100644 --- a/lib/schematic/events/types/list_events_params.rb +++ b/lib/schematic/events/types/list_events_params.rb @@ -6,12 +6,19 @@ module Types # Input parameters class ListEventsParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :event_types, -> { Internal::Types::Array[Schematic::Types::EventType] }, optional: true, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/events/types/list_events_request.rb b/lib/schematic/events/types/list_events_request.rb index 7bb40cc..917fd38 100644 --- a/lib/schematic/events/types/list_events_request.rb +++ b/lib/schematic/events/types/list_events_request.rb @@ -5,12 +5,19 @@ module Events module Types class ListEventsRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :event_types, -> { Schematic::Types::EventType }, optional: true, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/events/types/list_events_response.rb b/lib/schematic/events/types/list_events_response.rb index e330bed..2385eb7 100644 --- a/lib/schematic/events/types/list_events_response.rb +++ b/lib/schematic/events/types/list_events_response.rb @@ -5,6 +5,7 @@ module Events module Types class ListEventsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::EventDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Events::Types::ListEventsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/features/client.rb b/lib/schematic/features/client.rb index 026d46e..49bd47b 100644 --- a/lib/schematic/features/client.rb +++ b/lib/schematic/features/client.rb @@ -28,10 +28,23 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.features.list_features( + # boolean_require_event: true, + # feature_type: ["boolean"], + # ids: ["ids"], + # managed_by: "metronome", + # plan_version_id: "plan_version_id", + # q: "q", + # without_company_override_for: "without_company_override_for", + # without_plan_entitlement_for: "without_plan_entitlement_for", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Features::Types::ListFeaturesResponse] def list_features(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[boolean_require_event feature_type ids managed_by plan_version_id q without_company_override_for without_plan_entitlement_for limit offset] query_params = {} query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event) query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type) @@ -43,7 +56,6 @@ def list_features(request_options: {}, **params) query_params["without_plan_entitlement_for"] = params[:without_plan_entitlement_for] if params.key?(:without_plan_entitlement_for) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -74,6 +86,13 @@ def list_features(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.features.create_feature( + # description: "description", + # feature_type: "boolean", + # name: "name" + # ) + # # @return [Schematic::Features::Types::CreateFeatureResponse] def create_feature(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -107,6 +126,9 @@ def create_feature(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :feature_id # + # @example + # client.features.get_feature(feature_id: "feature_id") + # # @return [Schematic::Features::Types::GetFeatureResponse] def get_feature(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -139,11 +161,14 @@ def get_feature(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :feature_id # + # @example + # client.features.update_feature(feature_id: "feature_id") + # # @return [Schematic::Features::Types::UpdateFeatureResponse] def update_feature(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Features::Types::UpdateFeatureRequestBody.new(params).to_h - non_body_param_names = ["feature_id"] + non_body_param_names = %w[feature_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -176,6 +201,9 @@ def update_feature(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :feature_id # + # @example + # client.features.delete_feature(feature_id: "feature_id") + # # @return [Schematic::Features::Types::DeleteFeatureResponse] def delete_feature(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -207,6 +235,15 @@ def delete_feature(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.features.upsert_feature_for_billing_product( + # billing_provider: "metronome", + # description: "description", + # external_resource_id: "external_resource_id", + # feature_type: "boolean", + # name: "name" + # ) + # # @return [Schematic::Features::Types::UpsertFeatureForBillingProductResponse] def upsert_feature_for_billing_product(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -249,10 +286,23 @@ def upsert_feature_for_billing_product(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.features.count_features( + # boolean_require_event: true, + # feature_type: ["boolean"], + # ids: ["ids"], + # managed_by: "metronome", + # plan_version_id: "plan_version_id", + # q: "q", + # without_company_override_for: "without_company_override_for", + # without_plan_entitlement_for: "without_plan_entitlement_for", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Features::Types::CountFeaturesResponse] def count_features(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[boolean_require_event feature_type ids managed_by plan_version_id q without_company_override_for without_plan_entitlement_for limit offset] query_params = {} query_params["boolean_require_event"] = params[:boolean_require_event] if params.key?(:boolean_require_event) query_params["feature_type"] = params[:feature_type] if params.key?(:feature_type) @@ -264,7 +314,6 @@ def count_features(request_options: {}, **params) query_params["without_plan_entitlement_for"] = params[:without_plan_entitlement_for] if params.key?(:without_plan_entitlement_for) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -300,17 +349,24 @@ def count_features(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.features.list_flags( + # feature_id: "feature_id", + # ids: ["ids"], + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Features::Types::ListFlagsResponse] def list_flags(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_id ids q limit offset] query_params = {} query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -341,6 +397,15 @@ def list_flags(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.features.create_flag( + # default_value: true, + # description: "description", + # flag_type: "boolean", + # key: "key", + # name: "name" + # ) + # # @return [Schematic::Features::Types::CreateFlagResponse] def create_flag(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -374,6 +439,9 @@ def create_flag(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :flag_id # + # @example + # client.features.get_flag(flag_id: "flag_id") + # # @return [Schematic::Features::Types::GetFlagResponse] def get_flag(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -406,14 +474,27 @@ def get_flag(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :flag_id # + # @example + # client.features.update_flag( + # flag_id: "flag_id", + # default_value: true, + # description: "description", + # flag_type: "boolean", + # key: "key", + # name: "name" + # ) + # # @return [Schematic::Features::Types::UpdateFlagResponse] def update_flag(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[flag_id] + body_params = params.except(*path_param_names) + request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "flags/#{URI.encode_uri_component(params[:flag_id].to_s)}", - body: Schematic::Types::CreateFlagRequestBody.new(params).to_h, + body: Schematic::Types::CreateFlagRequestBody.new(body_params).to_h, request_options: request_options ) begin @@ -439,6 +520,9 @@ def update_flag(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :flag_id # + # @example + # client.features.delete_flag(flag_id: "flag_id") + # # @return [Schematic::Features::Types::DeleteFlagResponse] def delete_flag(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -471,11 +555,33 @@ def delete_flag(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :flag_id # + # @example + # client.features.update_flag_rules( + # flag_id: "flag_id", + # rules: [{ + # condition_groups: [{ + # conditions: [{ + # condition_type: "base_plan", + # operator: "eq", + # resource_ids: ["resource_ids"] + # }] + # }], + # conditions: [{ + # condition_type: "base_plan", + # operator: "eq", + # resource_ids: ["resource_ids"] + # }], + # name: "name", + # priority: 1000000, + # value: true + # }] + # ) + # # @return [Schematic::Features::Types::UpdateFlagRulesResponse] def update_flag_rules(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Features::Types::UpdateFlagRulesRequestBody.new(params).to_h - non_body_param_names = ["flag_id"] + non_body_param_names = %w[flag_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -508,14 +614,20 @@ def update_flag_rules(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :key # + # @example + # client.features.check_flag(key: "key") + # # @return [Schematic::Features::Types::CheckFlagResponse] def check_flag(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[key] + body_params = params.except(*path_param_names) + request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "POST", path: "flags/#{URI.encode_uri_component(params[:key].to_s)}/check", - body: Schematic::Types::CheckFlagRequestBody.new(params).to_h, + body: Schematic::Types::CheckFlagRequestBody.new(body_params).to_h, request_options: request_options ) begin @@ -540,6 +652,9 @@ def check_flag(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.features.check_flags + # # @return [Schematic::Features::Types::CheckFlagsResponse] def check_flags(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -572,6 +687,9 @@ def check_flags(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.features.check_flags_bulk(contexts: [{}]) + # # @return [Schematic::Features::Types::CheckFlagsBulkResponse] def check_flags_bulk(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -609,17 +727,24 @@ def check_flags_bulk(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.features.count_flags( + # feature_id: "feature_id", + # ids: ["ids"], + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Features::Types::CountFlagsResponse] def count_flags(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_id ids q limit offset] query_params = {} query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], diff --git a/lib/schematic/features/types/check_flag_response.rb b/lib/schematic/features/types/check_flag_response.rb index 6ab8785..50082dd 100644 --- a/lib/schematic/features/types/check_flag_response.rb +++ b/lib/schematic/features/types/check_flag_response.rb @@ -5,6 +5,7 @@ module Features module Types class CheckFlagResponse < Internal::Types::Model field :data, -> { Schematic::Types::CheckFlagResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/check_flags_bulk_response.rb b/lib/schematic/features/types/check_flags_bulk_response.rb index 4cbb9a7..83b5f75 100644 --- a/lib/schematic/features/types/check_flags_bulk_response.rb +++ b/lib/schematic/features/types/check_flags_bulk_response.rb @@ -5,6 +5,7 @@ module Features module Types class CheckFlagsBulkResponse < Internal::Types::Model field :data, -> { Schematic::Types::CheckFlagsBulkResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/check_flags_response.rb b/lib/schematic/features/types/check_flags_response.rb index 602835e..7f602ec 100644 --- a/lib/schematic/features/types/check_flags_response.rb +++ b/lib/schematic/features/types/check_flags_response.rb @@ -5,6 +5,7 @@ module Features module Types class CheckFlagsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CheckFlagsResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/count_features_params.rb b/lib/schematic/features/types/count_features_params.rb index 4228239..b2c1bbf 100644 --- a/lib/schematic/features/types/count_features_params.rb +++ b/lib/schematic/features/types/count_features_params.rb @@ -6,14 +6,23 @@ module Types # Input parameters class CountFeaturesParams < Internal::Types::Model field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :feature_type, -> { Internal::Types::Array[Schematic::Types::FeatureType] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_company_override_for, -> { String }, optional: true, nullable: false + field :without_plan_entitlement_for, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/count_features_request.rb b/lib/schematic/features/types/count_features_request.rb index b6cd878..07efccb 100644 --- a/lib/schematic/features/types/count_features_request.rb +++ b/lib/schematic/features/types/count_features_request.rb @@ -5,14 +5,23 @@ module Features module Types class CountFeaturesRequest < Internal::Types::Model field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_company_override_for, -> { String }, optional: true, nullable: false + field :without_plan_entitlement_for, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/count_features_response.rb b/lib/schematic/features/types/count_features_response.rb index 73ac5ce..70e3957 100644 --- a/lib/schematic/features/types/count_features_response.rb +++ b/lib/schematic/features/types/count_features_response.rb @@ -5,6 +5,7 @@ module Features module Types class CountFeaturesResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Features::Types::CountFeaturesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/count_flags_params.rb b/lib/schematic/features/types/count_flags_params.rb index bbb475a..b186086 100644 --- a/lib/schematic/features/types/count_flags_params.rb +++ b/lib/schematic/features/types/count_flags_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class CountFlagsParams < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/count_flags_request.rb b/lib/schematic/features/types/count_flags_request.rb index 24a8e66..ff645f7 100644 --- a/lib/schematic/features/types/count_flags_request.rb +++ b/lib/schematic/features/types/count_flags_request.rb @@ -5,9 +5,13 @@ module Features module Types class CountFlagsRequest < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/count_flags_response.rb b/lib/schematic/features/types/count_flags_response.rb index 4902e7d..3264f8f 100644 --- a/lib/schematic/features/types/count_flags_response.rb +++ b/lib/schematic/features/types/count_flags_response.rb @@ -5,6 +5,7 @@ module Features module Types class CountFlagsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Features::Types::CountFlagsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/create_billing_linked_feature_request_body.rb b/lib/schematic/features/types/create_billing_linked_feature_request_body.rb index 45e681a..d3c1bf5 100644 --- a/lib/schematic/features/types/create_billing_linked_feature_request_body.rb +++ b/lib/schematic/features/types/create_billing_linked_feature_request_body.rb @@ -5,17 +5,29 @@ module Features module Types class CreateBillingLinkedFeatureRequestBody < Internal::Types::Model field :billing_provider, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :external_resource_id, -> { String }, optional: false, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + field :flag, -> { Schematic::Types::CreateOrUpdateFlagRequestBody }, optional: true, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/create_feature_request_body.rb b/lib/schematic/features/types/create_feature_request_body.rb index 41dcff7..0f752fa 100644 --- a/lib/schematic/features/types/create_feature_request_body.rb +++ b/lib/schematic/features/types/create_feature_request_body.rb @@ -5,15 +5,25 @@ module Features module Types class CreateFeatureRequestBody < Internal::Types::Model field :description, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + field :flag, -> { Schematic::Types::CreateOrUpdateFlagRequestBody }, optional: true, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/create_feature_response.rb b/lib/schematic/features/types/create_feature_response.rb index 4d5b7d3..9f521ce 100644 --- a/lib/schematic/features/types/create_feature_response.rb +++ b/lib/schematic/features/types/create_feature_response.rb @@ -5,6 +5,7 @@ module Features module Types class CreateFeatureResponse < Internal::Types::Model field :data, -> { Schematic::Types::FeatureDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/create_flag_response.rb b/lib/schematic/features/types/create_flag_response.rb index a9f7e69..b5b5eab 100644 --- a/lib/schematic/features/types/create_flag_response.rb +++ b/lib/schematic/features/types/create_flag_response.rb @@ -5,6 +5,7 @@ module Features module Types class CreateFlagResponse < Internal::Types::Model field :data, -> { Schematic::Types::FlagDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/delete_feature_response.rb b/lib/schematic/features/types/delete_feature_response.rb index e24048b..da00373 100644 --- a/lib/schematic/features/types/delete_feature_response.rb +++ b/lib/schematic/features/types/delete_feature_response.rb @@ -5,6 +5,7 @@ module Features module Types class DeleteFeatureResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/delete_flag_response.rb b/lib/schematic/features/types/delete_flag_response.rb index 8d79078..12192c0 100644 --- a/lib/schematic/features/types/delete_flag_response.rb +++ b/lib/schematic/features/types/delete_flag_response.rb @@ -5,6 +5,7 @@ module Features module Types class DeleteFlagResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/get_feature_response.rb b/lib/schematic/features/types/get_feature_response.rb index b5ec8cd..62d491a 100644 --- a/lib/schematic/features/types/get_feature_response.rb +++ b/lib/schematic/features/types/get_feature_response.rb @@ -5,6 +5,7 @@ module Features module Types class GetFeatureResponse < Internal::Types::Model field :data, -> { Schematic::Types::FeatureDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/get_flag_response.rb b/lib/schematic/features/types/get_flag_response.rb index dbdfda8..12460d8 100644 --- a/lib/schematic/features/types/get_flag_response.rb +++ b/lib/schematic/features/types/get_flag_response.rb @@ -5,6 +5,7 @@ module Features module Types class GetFlagResponse < Internal::Types::Model field :data, -> { Schematic::Types::FlagDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/list_features_params.rb b/lib/schematic/features/types/list_features_params.rb index d574734..5b6726a 100644 --- a/lib/schematic/features/types/list_features_params.rb +++ b/lib/schematic/features/types/list_features_params.rb @@ -6,14 +6,23 @@ module Types # Input parameters class ListFeaturesParams < Internal::Types::Model field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :feature_type, -> { Internal::Types::Array[Schematic::Types::FeatureType] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_company_override_for, -> { String }, optional: true, nullable: false + field :without_plan_entitlement_for, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/list_features_request.rb b/lib/schematic/features/types/list_features_request.rb index 1829293..c899d6a 100644 --- a/lib/schematic/features/types/list_features_request.rb +++ b/lib/schematic/features/types/list_features_request.rb @@ -5,14 +5,23 @@ module Features module Types class ListFeaturesRequest < Internal::Types::Model field :boolean_require_event, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :managed_by, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :without_company_override_for, -> { String }, optional: true, nullable: false + field :without_plan_entitlement_for, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/list_features_response.rb b/lib/schematic/features/types/list_features_response.rb index 538620f..5d8187c 100644 --- a/lib/schematic/features/types/list_features_response.rb +++ b/lib/schematic/features/types/list_features_response.rb @@ -5,6 +5,7 @@ module Features module Types class ListFeaturesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::FeatureDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Features::Types::ListFeaturesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/list_flags_params.rb b/lib/schematic/features/types/list_flags_params.rb index 1950cb1..222a481 100644 --- a/lib/schematic/features/types/list_flags_params.rb +++ b/lib/schematic/features/types/list_flags_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class ListFlagsParams < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/list_flags_request.rb b/lib/schematic/features/types/list_flags_request.rb index 1a72599..3ba8161 100644 --- a/lib/schematic/features/types/list_flags_request.rb +++ b/lib/schematic/features/types/list_flags_request.rb @@ -5,9 +5,13 @@ module Features module Types class ListFlagsRequest < Internal::Types::Model field :feature_id, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/list_flags_response.rb b/lib/schematic/features/types/list_flags_response.rb index ff7878f..3c6ec7b 100644 --- a/lib/schematic/features/types/list_flags_response.rb +++ b/lib/schematic/features/types/list_flags_response.rb @@ -5,6 +5,7 @@ module Features module Types class ListFlagsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::FlagDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Features::Types::ListFlagsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/update_feature_request_body.rb b/lib/schematic/features/types/update_feature_request_body.rb index 56fe4e8..fe03a08 100644 --- a/lib/schematic/features/types/update_feature_request_body.rb +++ b/lib/schematic/features/types/update_feature_request_body.rb @@ -5,16 +5,27 @@ module Features module Types class UpdateFeatureRequestBody < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: true, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: true, nullable: false + field :flag, -> { Schematic::Types::CreateOrUpdateFlagRequestBody }, optional: true, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/features/types/update_feature_response.rb b/lib/schematic/features/types/update_feature_response.rb index 4771978..2165820 100644 --- a/lib/schematic/features/types/update_feature_response.rb +++ b/lib/schematic/features/types/update_feature_response.rb @@ -5,6 +5,7 @@ module Features module Types class UpdateFeatureResponse < Internal::Types::Model field :data, -> { Schematic::Types::FeatureDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/update_flag_response.rb b/lib/schematic/features/types/update_flag_response.rb index 1432211..74618c0 100644 --- a/lib/schematic/features/types/update_flag_response.rb +++ b/lib/schematic/features/types/update_flag_response.rb @@ -5,6 +5,7 @@ module Features module Types class UpdateFlagResponse < Internal::Types::Model field :data, -> { Schematic::Types::FlagDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/update_flag_rules_request_body.rb b/lib/schematic/features/types/update_flag_rules_request_body.rb index cc957c0..373a870 100644 --- a/lib/schematic/features/types/update_flag_rules_request_body.rb +++ b/lib/schematic/features/types/update_flag_rules_request_body.rb @@ -5,6 +5,7 @@ module Features module Types class UpdateFlagRulesRequestBody < Internal::Types::Model field :flag_id, -> { String }, optional: false, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::CreateOrUpdateRuleRequestBody] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/update_flag_rules_response.rb b/lib/schematic/features/types/update_flag_rules_response.rb index 0a280a1..db54739 100644 --- a/lib/schematic/features/types/update_flag_rules_response.rb +++ b/lib/schematic/features/types/update_flag_rules_response.rb @@ -5,6 +5,7 @@ module Features module Types class UpdateFlagRulesResponse < Internal::Types::Model field :data, -> { Schematic::Types::RulesDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/features/types/upsert_feature_for_billing_product_response.rb b/lib/schematic/features/types/upsert_feature_for_billing_product_response.rb index 5b51006..4938572 100644 --- a/lib/schematic/features/types/upsert_feature_for_billing_product_response.rb +++ b/lib/schematic/features/types/upsert_feature_for_billing_product_response.rb @@ -5,6 +5,7 @@ module Features module Types class UpsertFeatureForBillingProductResponse < Internal::Types::Model field :data, -> { Schematic::Types::FeatureDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/insights/client.rb b/lib/schematic/insights/client.rb index e084730..6bb785b 100644 --- a/lib/schematic/insights/client.rb +++ b/lib/schematic/insights/client.rb @@ -19,13 +19,14 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [Integer, nil] :limit # + # @example + # client.insights.get_activity(limit: 1000000) + # # @return [Schematic::Insights::Types::GetActivityResponse] def get_activity(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[limit] query_params = {} query_params["limit"] = params[:limit] if params.key?(:limit) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -60,16 +61,22 @@ def get_activity(request_options: {}, **params) # @option params [Schematic::Types::TimeSeriesGranularity, nil] :granularity # @option params [String] :start_time # + # @example + # client.insights.get_environment_feature_usage_time_series( + # end_time: "2024-01-15T09:30:00Z", + # feature_id: "feature_id", + # granularity: "daily", + # start_time: "2024-01-15T09:30:00Z" + # ) + # # @return [Schematic::Insights::Types::GetEnvironmentFeatureUsageTimeSeriesResponse] def get_environment_feature_usage_time_series(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[end_time feature_id granularity start_time] query_params = {} query_params["end_time"] = params[:end_time] if params.key?(:end_time) query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["granularity"] = params[:granularity] if params.key?(:granularity) query_params["start_time"] = params[:start_time] if params.key?(:start_time) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -101,13 +108,14 @@ def get_environment_feature_usage_time_series(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Integer, nil] :months # + # @example + # client.insights.get_plan_growth(months: 1000000) + # # @return [Schematic::Insights::Types::GetPlanGrowthResponse] def get_plan_growth(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[months] query_params = {} query_params["months"] = params[:months] if params.key?(:months) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -131,16 +139,18 @@ def get_plan_growth(request_options: {}, **params) end # @param request_options [Hash] - # @param params [Hash] + # @param _params [Hash] # @option request_options [String] :base_url # @option request_options [Hash{String => Object}] :additional_headers # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.insights.get_summary + # # @return [Schematic::Insights::Types::GetSummaryResponse] - def get_summary(request_options: {}, **params) - Schematic::Internal::Types::Utils.normalize_keys(params) + def get_summary(request_options: {}, **_params) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "GET", @@ -172,15 +182,20 @@ def get_summary(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [String] :start_time # + # @example + # client.insights.get_top_features_by_usage( + # end_time: "2024-01-15T09:30:00Z", + # limit: 1000000, + # start_time: "2024-01-15T09:30:00Z" + # ) + # # @return [Schematic::Insights::Types::GetTopFeaturesByUsageResponse] def get_top_features_by_usage(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[end_time limit start_time] query_params = {} query_params["end_time"] = params[:end_time] if params.key?(:end_time) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["start_time"] = params[:start_time] if params.key?(:start_time) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -215,16 +230,22 @@ def get_top_features_by_usage(request_options: {}, **params) # @option params [Schematic::Types::TimeSeriesGranularity, nil] :granularity # @option params [String] :start_time # + # @example + # client.insights.get_environment_trait_usage_time_series( + # end_time: "2024-01-15T09:30:00Z", + # feature_id: "feature_id", + # granularity: "daily", + # start_time: "2024-01-15T09:30:00Z" + # ) + # # @return [Schematic::Insights::Types::GetEnvironmentTraitUsageTimeSeriesResponse] def get_environment_trait_usage_time_series(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[end_time feature_id granularity start_time] query_params = {} query_params["end_time"] = params[:end_time] if params.key?(:end_time) query_params["feature_id"] = params[:feature_id] if params.key?(:feature_id) query_params["granularity"] = params[:granularity] if params.key?(:granularity) query_params["start_time"] = params[:start_time] if params.key?(:start_time) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], diff --git a/lib/schematic/insights/types/get_activity_response.rb b/lib/schematic/insights/types/get_activity_response.rb index 2443ded..6236bff 100644 --- a/lib/schematic/insights/types/get_activity_response.rb +++ b/lib/schematic/insights/types/get_activity_response.rb @@ -5,6 +5,7 @@ module Insights module Types class GetActivityResponse < Internal::Types::Model field :data, -> { Schematic::Types::ActivityResponseResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Insights::Types::GetActivityParams }, optional: false, nullable: false end end diff --git a/lib/schematic/insights/types/get_environment_feature_usage_time_series_params.rb b/lib/schematic/insights/types/get_environment_feature_usage_time_series_params.rb index e722d38..34bab04 100644 --- a/lib/schematic/insights/types/get_environment_feature_usage_time_series_params.rb +++ b/lib/schematic/insights/types/get_environment_feature_usage_time_series_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class GetEnvironmentFeatureUsageTimeSeriesParams < Internal::Types::Model field :end_time, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/insights/types/get_environment_feature_usage_time_series_request.rb b/lib/schematic/insights/types/get_environment_feature_usage_time_series_request.rb index 72e1582..5526bea 100644 --- a/lib/schematic/insights/types/get_environment_feature_usage_time_series_request.rb +++ b/lib/schematic/insights/types/get_environment_feature_usage_time_series_request.rb @@ -5,8 +5,11 @@ module Insights module Types class GetEnvironmentFeatureUsageTimeSeriesRequest < Internal::Types::Model field :end_time, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false + field :start_time, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/insights/types/get_environment_feature_usage_time_series_response.rb b/lib/schematic/insights/types/get_environment_feature_usage_time_series_response.rb index d85846f..b11ff9a 100644 --- a/lib/schematic/insights/types/get_environment_feature_usage_time_series_response.rb +++ b/lib/schematic/insights/types/get_environment_feature_usage_time_series_response.rb @@ -5,6 +5,7 @@ module Insights module Types class GetEnvironmentFeatureUsageTimeSeriesResponse < Internal::Types::Model field :data, -> { Schematic::Types::EnvironmentFeatureUsageTimeSeriesResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Insights::Types::GetEnvironmentFeatureUsageTimeSeriesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/insights/types/get_environment_trait_usage_time_series_params.rb b/lib/schematic/insights/types/get_environment_trait_usage_time_series_params.rb index 0670973..d5e5b11 100644 --- a/lib/schematic/insights/types/get_environment_trait_usage_time_series_params.rb +++ b/lib/schematic/insights/types/get_environment_trait_usage_time_series_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class GetEnvironmentTraitUsageTimeSeriesParams < Internal::Types::Model field :end_time, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/insights/types/get_environment_trait_usage_time_series_request.rb b/lib/schematic/insights/types/get_environment_trait_usage_time_series_request.rb index 95556ac..266f1fa 100644 --- a/lib/schematic/insights/types/get_environment_trait_usage_time_series_request.rb +++ b/lib/schematic/insights/types/get_environment_trait_usage_time_series_request.rb @@ -5,8 +5,11 @@ module Insights module Types class GetEnvironmentTraitUsageTimeSeriesRequest < Internal::Types::Model field :end_time, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :granularity, -> { Schematic::Types::TimeSeriesGranularity }, optional: true, nullable: false + field :start_time, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/insights/types/get_environment_trait_usage_time_series_response.rb b/lib/schematic/insights/types/get_environment_trait_usage_time_series_response.rb index b02ebb5..3d112b9 100644 --- a/lib/schematic/insights/types/get_environment_trait_usage_time_series_response.rb +++ b/lib/schematic/insights/types/get_environment_trait_usage_time_series_response.rb @@ -5,6 +5,7 @@ module Insights module Types class GetEnvironmentTraitUsageTimeSeriesResponse < Internal::Types::Model field :data, -> { Schematic::Types::EnvironmentTraitUsageTimeSeriesResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Insights::Types::GetEnvironmentTraitUsageTimeSeriesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/insights/types/get_plan_growth_response.rb b/lib/schematic/insights/types/get_plan_growth_response.rb index ae371e5..837d137 100644 --- a/lib/schematic/insights/types/get_plan_growth_response.rb +++ b/lib/schematic/insights/types/get_plan_growth_response.rb @@ -5,6 +5,7 @@ module Insights module Types class GetPlanGrowthResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanGrowthResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Insights::Types::GetPlanGrowthParams }, optional: false, nullable: false end end diff --git a/lib/schematic/insights/types/get_summary_response.rb b/lib/schematic/insights/types/get_summary_response.rb index 0f55a05..eea9b39 100644 --- a/lib/schematic/insights/types/get_summary_response.rb +++ b/lib/schematic/insights/types/get_summary_response.rb @@ -5,6 +5,7 @@ module Insights module Types class GetSummaryResponse < Internal::Types::Model field :data, -> { Schematic::Types::InsightsSummaryResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/insights/types/get_top_features_by_usage_params.rb b/lib/schematic/insights/types/get_top_features_by_usage_params.rb index 1ae867c..ba35f6b 100644 --- a/lib/schematic/insights/types/get_top_features_by_usage_params.rb +++ b/lib/schematic/insights/types/get_top_features_by_usage_params.rb @@ -6,7 +6,9 @@ module Types # Input parameters class GetTopFeaturesByUsageParams < Internal::Types::Model field :end_time, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/insights/types/get_top_features_by_usage_request.rb b/lib/schematic/insights/types/get_top_features_by_usage_request.rb index 040946b..62ffaf8 100644 --- a/lib/schematic/insights/types/get_top_features_by_usage_request.rb +++ b/lib/schematic/insights/types/get_top_features_by_usage_request.rb @@ -5,7 +5,9 @@ module Insights module Types class GetTopFeaturesByUsageRequest < Internal::Types::Model field :end_time, -> { String }, optional: false, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :start_time, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/insights/types/get_top_features_by_usage_response.rb b/lib/schematic/insights/types/get_top_features_by_usage_response.rb index b703807..71ad7ac 100644 --- a/lib/schematic/insights/types/get_top_features_by_usage_response.rb +++ b/lib/schematic/insights/types/get_top_features_by_usage_response.rb @@ -5,6 +5,7 @@ module Insights module Types class GetTopFeaturesByUsageResponse < Internal::Types::Model field :data, -> { Schematic::Types::TopFeaturesByUsageResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Insights::Types::GetTopFeaturesByUsageParams }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/client.rb b/lib/schematic/integrationsapi/client.rb index 15eddd8..037dbfc 100644 --- a/lib/schematic/integrationsapi/client.rb +++ b/lib/schematic/integrationsapi/client.rb @@ -19,6 +19,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :integration_id # + # @example + # client.integrationsapi.run_integration(integration_id: "integration_id") + # # @return [Schematic::Integrationsapi::Types::RunIntegrationResponse] def run_integration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -57,10 +60,20 @@ def run_integration(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.integrationsapi.list_integrations( + # billing_only: true, + # exclude_ids: ["exclude_ids"], + # id: "id", + # state: "active", + # type: "clerk", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Integrationsapi::Types::ListIntegrationsResponse] def list_integrations(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[billing_only exclude_ids id state type limit offset] query_params = {} query_params["billing_only"] = params[:billing_only] if params.key?(:billing_only) query_params["exclude_ids"] = params[:exclude_ids] if params.key?(:exclude_ids) @@ -69,7 +82,6 @@ def list_integrations(request_options: {}, **params) query_params["type"] = params[:type] if params.key?(:type) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -101,6 +113,9 @@ def list_integrations(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :type # + # @example + # client.integrationsapi.get_integration_webhook_url(type: "type") + # # @return [Schematic::Integrationsapi::Types::GetIntegrationWebhookUrlResponse] def get_integration_webhook_url(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -132,6 +147,9 @@ def get_integration_webhook_url(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.integrationsapi.install_integration(type: "clerk") + # # @return [Schematic::Integrationsapi::Types::InstallIntegrationResponse] def install_integration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -164,6 +182,9 @@ def install_integration(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.integrationsapi.start_data_import(integration_id: "integration_id") + # # @return [Schematic::Integrationsapi::Types::StartDataImportResponse] def start_data_import(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -189,16 +210,18 @@ def start_data_import(request_options: {}, **params) end # @param request_options [Hash] - # @param params [Hash] + # @param _params [Hash] # @option request_options [String] :base_url # @option request_options [Hash{String => Object}] :additional_headers # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.integrationsapi.load_sample_data_set + # # @return [Schematic::Integrationsapi::Types::LoadSampleDataSetResponse] - def load_sample_data_set(request_options: {}, **params) - Schematic::Internal::Types::Utils.normalize_keys(params) + def load_sample_data_set(request_options: {}, **_params) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "GET", @@ -227,6 +250,9 @@ def load_sample_data_set(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.integrationsapi.assume_stripe_installed(type: "clerk") + # # @return [Schematic::Integrationsapi::Types::AssumeStripeInstalledResponse] def assume_stripe_installed(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -259,6 +285,9 @@ def assume_stripe_installed(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.integrationsapi.install_stripe(type: "clerk") + # # @return [Schematic::Integrationsapi::Types::InstallStripeResponse] def install_stripe(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -292,6 +321,9 @@ def install_stripe(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :integration_id # + # @example + # client.integrationsapi.uninstall_integration(integration_id: "integration_id") + # # @return [Schematic::Integrationsapi::Types::UninstallIntegrationResponse] def uninstall_integration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/schematic/integrationsapi/types/assume_stripe_installed_response.rb b/lib/schematic/integrationsapi/types/assume_stripe_installed_response.rb index f71df8a..218f1bc 100644 --- a/lib/schematic/integrationsapi/types/assume_stripe_installed_response.rb +++ b/lib/schematic/integrationsapi/types/assume_stripe_installed_response.rb @@ -5,6 +5,7 @@ module Integrationsapi module Types class AssumeStripeInstalledResponse < Internal::Types::Model field :data, -> { Schematic::Types::IntegrationInstallResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/get_integration_webhook_url_response.rb b/lib/schematic/integrationsapi/types/get_integration_webhook_url_response.rb index 19ee844..493a416 100644 --- a/lib/schematic/integrationsapi/types/get_integration_webhook_url_response.rb +++ b/lib/schematic/integrationsapi/types/get_integration_webhook_url_response.rb @@ -5,6 +5,7 @@ module Integrationsapi module Types class GetIntegrationWebhookUrlResponse < Internal::Types::Model field :data, -> { Schematic::Types::IntegrationWebhookUrlResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/install_integration_response.rb b/lib/schematic/integrationsapi/types/install_integration_response.rb index 2b58a14..2c1d8b8 100644 --- a/lib/schematic/integrationsapi/types/install_integration_response.rb +++ b/lib/schematic/integrationsapi/types/install_integration_response.rb @@ -5,6 +5,7 @@ module Integrationsapi module Types class InstallIntegrationResponse < Internal::Types::Model field :data, -> { Schematic::Types::IntegrationInstallResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/install_stripe_response.rb b/lib/schematic/integrationsapi/types/install_stripe_response.rb index 38698e0..c48a446 100644 --- a/lib/schematic/integrationsapi/types/install_stripe_response.rb +++ b/lib/schematic/integrationsapi/types/install_stripe_response.rb @@ -5,6 +5,7 @@ module Integrationsapi module Types class InstallStripeResponse < Internal::Types::Model field :data, -> { Schematic::Types::IntegrationInstallResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/list_integrations_params.rb b/lib/schematic/integrationsapi/types/list_integrations_params.rb index 2441e33..849fd49 100644 --- a/lib/schematic/integrationsapi/types/list_integrations_params.rb +++ b/lib/schematic/integrationsapi/types/list_integrations_params.rb @@ -6,11 +6,17 @@ module Types # Input parameters class ListIntegrationsParams < Internal::Types::Model field :billing_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :exclude_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: true, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: true, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/list_integrations_request.rb b/lib/schematic/integrationsapi/types/list_integrations_request.rb index 135973b..7ddf0f6 100644 --- a/lib/schematic/integrationsapi/types/list_integrations_request.rb +++ b/lib/schematic/integrationsapi/types/list_integrations_request.rb @@ -5,11 +5,17 @@ module Integrationsapi module Types class ListIntegrationsRequest < Internal::Types::Model field :billing_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :exclude_ids, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: true, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/list_integrations_response.rb b/lib/schematic/integrationsapi/types/list_integrations_response.rb index 7d8f5f5..2114831 100644 --- a/lib/schematic/integrationsapi/types/list_integrations_response.rb +++ b/lib/schematic/integrationsapi/types/list_integrations_response.rb @@ -5,6 +5,7 @@ module Integrationsapi module Types class ListIntegrationsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::IntegrationsListResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Integrationsapi::Types::ListIntegrationsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/load_sample_data_set_response.rb b/lib/schematic/integrationsapi/types/load_sample_data_set_response.rb index e673355..48b5b50 100644 --- a/lib/schematic/integrationsapi/types/load_sample_data_set_response.rb +++ b/lib/schematic/integrationsapi/types/load_sample_data_set_response.rb @@ -5,6 +5,7 @@ module Integrationsapi module Types class LoadSampleDataSetResponse < Internal::Types::Model field :data, -> { Schematic::Types::IntegrationsDataSetResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/run_integration_response.rb b/lib/schematic/integrationsapi/types/run_integration_response.rb index 271cf73..132f152 100644 --- a/lib/schematic/integrationsapi/types/run_integration_response.rb +++ b/lib/schematic/integrationsapi/types/run_integration_response.rb @@ -5,6 +5,7 @@ module Integrationsapi module Types class RunIntegrationResponse < Internal::Types::Model field :data, -> { Schematic::Types::IntegrationsResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/start_data_import_request_body.rb b/lib/schematic/integrationsapi/types/start_data_import_request_body.rb index e6af8e9..e2b67ba 100644 --- a/lib/schematic/integrationsapi/types/start_data_import_request_body.rb +++ b/lib/schematic/integrationsapi/types/start_data_import_request_body.rb @@ -5,7 +5,9 @@ module Integrationsapi module Types class StartDataImportRequestBody < Internal::Types::Model field :company_matching_criteria, -> { Schematic::Types::CompanyMatchingCriteria }, optional: true, nullable: false + field :company_matching_field, -> { String }, optional: true, nullable: false + field :integration_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/start_data_import_response.rb b/lib/schematic/integrationsapi/types/start_data_import_response.rb index 2a3a25b..c5f6a7a 100644 --- a/lib/schematic/integrationsapi/types/start_data_import_response.rb +++ b/lib/schematic/integrationsapi/types/start_data_import_response.rb @@ -5,6 +5,7 @@ module Integrationsapi module Types class StartDataImportResponse < Internal::Types::Model field :data, -> { Schematic::Types::IntegrationsResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/integrationsapi/types/uninstall_integration_response.rb b/lib/schematic/integrationsapi/types/uninstall_integration_response.rb index d5dfce0..2799505 100644 --- a/lib/schematic/integrationsapi/types/uninstall_integration_response.rb +++ b/lib/schematic/integrationsapi/types/uninstall_integration_response.rb @@ -5,6 +5,7 @@ module Integrationsapi module Types class UninstallIntegrationResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/internal/http/raw_client.rb b/lib/schematic/internal/http/raw_client.rb index b1fd45b..b266065 100644 --- a/lib/schematic/internal/http/raw_client.rb +++ b/lib/schematic/internal/http/raw_client.rb @@ -21,21 +21,32 @@ class RawClient # @param max_retries [Integer] The number of times to retry a failed request, defaults to 2. # @param timeout [Float] The timeout for the request, defaults to 60.0 seconds. # @param headers [Hash] The headers for the request. - def initialize(base_url:, max_retries: 2, timeout: 60.0, headers: {}) + # @param overridable_headers [Array] The names of the client-level headers a request + # may replace via `additional_headers`. Holds the API's global headers; SDK metadata and + # auth headers are absent from it and so stay protected. + # @param auth_provider [Object, nil] An optional auth provider responding to + # `auth_headers`. When present its headers are resolved on every request so + # token-based schemes (e.g. OAuth) can refresh an expired token mid-session. + def initialize(base_url:, max_retries: 2, timeout: 60.0, headers: {}, overridable_headers: [], auth_provider: nil) @base_url = base_url @max_retries = max_retries @timeout = timeout + @auth_provider = auth_provider @default_headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "schematic", "X-Fern-SDK-Version": "0.0.1" }.merge(headers) + @overridable_headers = overridable_headers.to_set { |name| name.to_s.downcase } end # @param request [Schematic::Internal::Http::BaseRequest] The HTTP request. # @return [HTTP::Response] The HTTP response. def send(request) url = build_url(request) + # Resolve auth headers once per request (not per retry) so token-based + # providers refresh at most once here; static providers are cheap. + auth_headers = resolve_auth_headers attempt = 0 response = nil @@ -43,8 +54,9 @@ def send(request) http_request = build_http_request( url:, method: request.method, - headers: request.encode_headers(protected_keys: @default_headers.keys), - body: request.encode_body + headers: request.encode_headers(protected_keys: protected_header_keys + auth_headers.keys), + body: request.encode_body, + auth_headers: auth_headers ) conn = connect(url) @@ -65,6 +77,15 @@ def send(request) response end + # The client-level header names that `additional_headers` must not replace: every default + # header except the API's global headers, which are overridable per request. + # @return [Array] The protected header names. + def protected_header_keys + return @default_headers.keys if @overridable_headers.empty? + + @default_headers.keys.reject { |name| @overridable_headers.include?(name.to_s.downcase) } + end + # Determines if a request should be retried based on the response status code. # @param response [Net::HTTPResponse] The HTTP response. # @param attempt [Integer] The current retry attempt (0-indexed). @@ -152,16 +173,32 @@ def validate_https!(url) return if url.scheme != "http" return if LOCALHOST_HOSTS.include?(url.host) - raise ArgumentError, "Refusing to send request to non-HTTPS URL: #{url}. " \ - "HTTP is only allowed for localhost. Use HTTPS or pass a localhost URL." + raise ArgumentError, + "Refusing to send request to non-HTTPS URL: #{url}. " \ + "HTTP is only allowed for localhost. Use HTTPS or pass a localhost URL." + end + + # Resolves the auth headers to send with the next request. Delegates to the + # configured auth provider (if any) on every call so that token-based + # providers (e.g. OAuth client-credentials) can refresh an expired token + # before the request is sent. Returns an empty hash when no provider is set, + # which keeps the api-key / basic / bearer / no-auth paths unchanged. + # @return [Hash] The auth headers for the current request. + def resolve_auth_headers + return {} if @auth_provider.nil? + + @auth_provider.auth_headers end # @param url [URI::Generic] The url to the resource. # @param method [String] The HTTP method to use. # @param headers [Hash] The headers for the request. # @param body [String, nil] The body for the request. + # @param auth_headers [Hash] The auth headers resolved for this request. These + # take precedence over the static default headers but not over per-request + # headers, mirroring the previous baked-header precedence. # @return [HTTP::Request] The HTTP request. - def build_http_request(url:, method:, headers: {}, body: nil) + def build_http_request(url:, method:, headers: {}, body: nil, auth_headers: {}) request = Net::HTTPGenericRequest.new( method, !body.nil?, @@ -169,13 +206,27 @@ def build_http_request(url:, method:, headers: {}, body: nil) url ) - request_headers = @default_headers.merge(headers) + request_headers = @default_headers.merge(auth_headers).merge(headers) request_headers.each { |name, value| request[name] = value } request.body = body if body + # Net::HTTP disables its transparent gzip/deflate decoding as soon as an + # Accept-Encoding header is set explicitly on the request. Re-enable it so + # that compressed response bodies are still inflated. + request.extend(DecodeContent) if request_headers.keys.any? { |name| name.to_s.casecmp("accept-encoding").zero? } + request end + # Keeps Net::HTTP's transparent gzip/deflate response decoding enabled + # even when an Accept-Encoding header is set explicitly on the request. + # @api private + module DecodeContent + def decode_content # rubocop:disable Naming/PredicateMethod + true + end + end + # @param query [Hash] The query for the request. # @return [String, nil] The encoded query. def encode_query(query) diff --git a/lib/schematic/internal/iterators/cursor_page_iterator.rb b/lib/schematic/internal/iterators/cursor_page_iterator.rb index 75e6923..07ebb81 100644 --- a/lib/schematic/internal/iterators/cursor_page_iterator.rb +++ b/lib/schematic/internal/iterators/cursor_page_iterator.rb @@ -5,17 +5,23 @@ module Internal class CursorPageIterator include Enumerable + # The raw HTTP response from the most recent page response. + # @return [Net::HTTPResponse, nil] + attr_reader :http_response + # Instantiates a CursorPageIterator, an Enumerable class which wraps calls to a cursor-based paginated API and yields pages of items. # # @param initial_cursor [String] The initial cursor to use when iterating, if any. # @param cursor_field [Symbol] The name of the field in API responses to extract the next cursor from. # @param block [Proc] A block which is responsible for receiving a cursor to use and returning the given page from the API. + # The block should return a two-element array: [parsed_page, raw_http_response]. # @return [Schematic::Internal::CursorPageIterator] def initialize(initial_cursor:, cursor_field:, &block) @need_initial_load = initial_cursor.nil? @cursor = initial_cursor @cursor_field = cursor_field @get_next_page = block + @http_response = nil end # Iterates over each page returned by the API. @@ -37,12 +43,18 @@ def next? # Retrieves the next page from the API. # - # @return [Boolean] + # @return [Object, nil] def next_page return if !@need_initial_load && @cursor.nil? @need_initial_load = false - fetched_page = @get_next_page.call(@cursor) + result = @get_next_page.call(@cursor) + if result.is_a?(Array) + fetched_page, raw_response = result + @http_response = raw_response + else + fetched_page = result + end @cursor = fetched_page.send(@cursor_field) fetched_page end diff --git a/lib/schematic/internal/iterators/item_iterator.rb b/lib/schematic/internal/iterators/item_iterator.rb index f8374b6..6123b5f 100644 --- a/lib/schematic/internal/iterators/item_iterator.rb +++ b/lib/schematic/internal/iterators/item_iterator.rb @@ -5,6 +5,12 @@ module Internal class ItemIterator include Enumerable + # The raw HTTP response from the most recent page response. + # @return [Net::HTTPResponse, nil] + def http_response + @page_iterator&.http_response + end + # Iterates over each item returned by the API. # # @param block [Proc] The block which each retrieved item is yielded to. diff --git a/lib/schematic/internal/iterators/offset_page_iterator.rb b/lib/schematic/internal/iterators/offset_page_iterator.rb index 5233f2e..8e15b4f 100644 --- a/lib/schematic/internal/iterators/offset_page_iterator.rb +++ b/lib/schematic/internal/iterators/offset_page_iterator.rb @@ -5,6 +5,10 @@ module Internal class OffsetPageIterator include Enumerable + # The raw HTTP response from the most recent page response. + # @return [Net::HTTPResponse, nil] + attr_reader :http_response + # Instantiates an OffsetPageIterator, an Enumerable class which wraps calls to an offset-based paginated API and yields pages of items from it. # # @param initial_page [Integer] The initial page to use when iterating, if any. @@ -12,6 +16,7 @@ class OffsetPageIterator # @param has_next_field [Symbol] The field to pull the boolean of whether a next page exists from, if any. # @param step [Boolean] If true, treats the page number as a true offset (i.e. increments the page number by the number of items returned from each call rather than just 1) # @param block [Proc] A block which is responsible for receiving a page number to use and returning the given page from the API. + # The block should return a two-element array: [parsed_page, raw_http_response]. # @return [Schematic::Internal::OffsetPageIterator] def initialize(initial_page:, item_field:, has_next_field:, step:, &block) @page_number = initial_page || (step ? 0 : 1) @@ -24,6 +29,8 @@ def initialize(initial_page:, item_field:, has_next_field:, step:, &block) @next_page = nil # ...or the actual next page, preloaded, if it doesn't. @has_next_page = nil + + @http_response = nil end # Iterates over each page returned by the API. @@ -43,7 +50,7 @@ def next? return @has_next_page unless @has_next_page.nil? return true if @next_page - fetched_page = @get_next_page.call(@page_number) + fetched_page = fetch_page(@page_number) fetched_page_items = fetched_page&.send(@item_field) if fetched_page_items.nil? || fetched_page_items.empty? @has_next_page = false @@ -61,7 +68,7 @@ def next_page this_page = @next_page @next_page = nil else - this_page = @get_next_page.call(@page_number) + this_page = fetch_page(@page_number) end @has_next_page = this_page&.send(@has_next_field) if @has_next_field @@ -78,6 +85,19 @@ def next_page this_page end + + private + + def fetch_page(page_number) + result = @get_next_page.call(page_number) + if result.is_a?(Array) + fetched_page, raw_response = result + @http_response = raw_response + fetched_page + else + result + end + end end end end diff --git a/lib/schematic/internal/types/utils.rb b/lib/schematic/internal/types/utils.rb index 326488b..0c56b8c 100644 --- a/lib/schematic/internal/types/utils.rb +++ b/lib/schematic/internal/types/utils.rb @@ -76,8 +76,8 @@ def self.coerce(target, value, strict: false) in Module case type in ->(t) { - t.singleton_class.include?(Enum) || - t.singleton_class.include?(Union) + t.singleton_class.included_modules.include?(Enum) || + t.singleton_class.included_modules.include?(Union) } return type.coerce(value, strict: strict) else diff --git a/lib/schematic/licenses/client.rb b/lib/schematic/licenses/client.rb index 817e817..787bd43 100644 --- a/lib/schematic/licenses/client.rb +++ b/lib/schematic/licenses/client.rb @@ -23,17 +23,24 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.licenses.list_licenses( + # feature_ids: ["feature_ids"], + # ids: ["ids"], + # name: "name", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Licenses::Types::ListLicensesResponse] def list_licenses(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_ids ids name limit offset] query_params = {} query_params["feature_ids"] = params[:feature_ids] if params.key?(:feature_ids) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["name"] = params[:name] if params.key?(:name) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -65,6 +72,9 @@ def list_licenses(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :license_id # + # @example + # client.licenses.get_single_license(license_id: "license_id") + # # @return [Schematic::Licenses::Types::GetSingleLicenseResponse] def get_single_license(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -101,17 +111,24 @@ def get_single_license(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.licenses.count_licenses( + # feature_ids: ["feature_ids"], + # ids: ["ids"], + # name: "name", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Licenses::Types::CountLicensesResponse] def count_licenses(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[feature_ids ids name limit offset] query_params = {} query_params["feature_ids"] = params[:feature_ids] if params.key?(:feature_ids) query_params["ids"] = params[:ids] if params.key?(:ids) query_params["name"] = params[:name] if params.key?(:name) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], diff --git a/lib/schematic/licenses/types/count_licenses_params.rb b/lib/schematic/licenses/types/count_licenses_params.rb index bca967f..5183993 100644 --- a/lib/schematic/licenses/types/count_licenses_params.rb +++ b/lib/schematic/licenses/types/count_licenses_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class CountLicensesParams < Internal::Types::Model field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/licenses/types/count_licenses_request.rb b/lib/schematic/licenses/types/count_licenses_request.rb index e1b747b..40034ff 100644 --- a/lib/schematic/licenses/types/count_licenses_request.rb +++ b/lib/schematic/licenses/types/count_licenses_request.rb @@ -5,9 +5,13 @@ module Licenses module Types class CountLicensesRequest < Internal::Types::Model field :feature_ids, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/licenses/types/count_licenses_response.rb b/lib/schematic/licenses/types/count_licenses_response.rb index 1a5ee0b..b5c09d0 100644 --- a/lib/schematic/licenses/types/count_licenses_response.rb +++ b/lib/schematic/licenses/types/count_licenses_response.rb @@ -5,6 +5,7 @@ module Licenses module Types class CountLicensesResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Licenses::Types::CountLicensesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/licenses/types/get_single_license_response.rb b/lib/schematic/licenses/types/get_single_license_response.rb index 5371b78..1677923 100644 --- a/lib/schematic/licenses/types/get_single_license_response.rb +++ b/lib/schematic/licenses/types/get_single_license_response.rb @@ -5,6 +5,7 @@ module Licenses module Types class GetSingleLicenseResponse < Internal::Types::Model field :data, -> { Schematic::Types::LicenseResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/licenses/types/list_licenses_params.rb b/lib/schematic/licenses/types/list_licenses_params.rb index 9d7ba1b..61d9b1f 100644 --- a/lib/schematic/licenses/types/list_licenses_params.rb +++ b/lib/schematic/licenses/types/list_licenses_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class ListLicensesParams < Internal::Types::Model field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/licenses/types/list_licenses_request.rb b/lib/schematic/licenses/types/list_licenses_request.rb index a73af4f..00ef0b0 100644 --- a/lib/schematic/licenses/types/list_licenses_request.rb +++ b/lib/schematic/licenses/types/list_licenses_request.rb @@ -5,9 +5,13 @@ module Licenses module Types class ListLicensesRequest < Internal::Types::Model field :feature_ids, -> { String }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/licenses/types/list_licenses_response.rb b/lib/schematic/licenses/types/list_licenses_response.rb index e863e78..dc96a83 100644 --- a/lib/schematic/licenses/types/list_licenses_response.rb +++ b/lib/schematic/licenses/types/list_licenses_response.rb @@ -5,6 +5,7 @@ module Licenses module Types class ListLicensesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::LicenseResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Licenses::Types::ListLicensesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/planbundle/client.rb b/lib/schematic/planbundle/client.rb index d4ab038..2e910c6 100644 --- a/lib/schematic/planbundle/client.rb +++ b/lib/schematic/planbundle/client.rb @@ -18,6 +18,21 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.planbundle.create_custom_plan_bundle( + # billing_product: { + # charge_type: "free", + # is_trialable: true + # }, + # entitlements: [{ + # action: "create" + # }], + # plan: { + # company_id: "company_id", + # name: "name" + # } + # ) + # # @return [Schematic::Planbundle::Types::CreateCustomPlanBundleResponse] def create_custom_plan_bundle(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -50,6 +65,17 @@ def create_custom_plan_bundle(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.planbundle.create_plan_bundle( + # entitlements: [{ + # action: "create" + # }], + # plan: { + # name: "name", + # plan_type: "plan" + # } + # ) + # # @return [Schematic::Planbundle::Types::CreatePlanBundleResponse] def create_plan_bundle(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -83,11 +109,22 @@ def create_plan_bundle(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_id # + # @example + # client.planbundle.update_plan_bundle( + # plan_id: "plan_id", + # entitlements: [{ + # action: "create" + # }], + # plan: { + # name: "name" + # } + # ) + # # @return [Schematic::Planbundle::Types::UpdatePlanBundleResponse] def update_plan_bundle(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Planbundle::Types::UpdatePlanBundleRequestBody.new(params).to_h - non_body_param_names = ["plan_id"] + non_body_param_names = %w[plan_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( diff --git a/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb b/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb index fd3e123..6335a61 100644 --- a/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb +++ b/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb @@ -4,10 +4,13 @@ module Schematic module Planbundle module Types class CreateCustomPlanBundleRequestBody < Internal::Types::Model - field :billing_product, -> { Schematic::Types::UpsertBillingProductRequestBody }, optional: true, nullable: false + field :billing_product, -> { Schematic::Types::UpsertBillingProductRequestBody }, optional: false, nullable: false + field :credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanBundleCreditGrantRequestBody] }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false - field :plan, -> { Schematic::Types::CreateCustomPlanBundlePlanRequestBody }, optional: true, nullable: false + + field :plan, -> { Schematic::Types::CreateCustomPlanBundlePlanRequestBody }, optional: false, nullable: false end end end diff --git a/lib/schematic/planbundle/types/create_custom_plan_bundle_response.rb b/lib/schematic/planbundle/types/create_custom_plan_bundle_response.rb index bc90c66..e24f7fe 100644 --- a/lib/schematic/planbundle/types/create_custom_plan_bundle_response.rb +++ b/lib/schematic/planbundle/types/create_custom_plan_bundle_response.rb @@ -5,6 +5,7 @@ module Planbundle module Types class CreateCustomPlanBundleResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanBundleResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb b/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb index 00568fa..20d0d14 100644 --- a/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb +++ b/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb @@ -5,9 +5,12 @@ module Planbundle module Types class CreatePlanBundleRequestBody < Internal::Types::Model field :billing_product, -> { Schematic::Types::UpsertBillingProductRequestBody }, optional: true, nullable: false + field :credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanBundleCreditGrantRequestBody] }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false - field :plan, -> { Schematic::Types::CreatePlanRequestBody }, optional: true, nullable: false + + field :plan, -> { Schematic::Types::CreatePlanRequestBody }, optional: false, nullable: false end end end diff --git a/lib/schematic/planbundle/types/create_plan_bundle_response.rb b/lib/schematic/planbundle/types/create_plan_bundle_response.rb index 0f01ddd..c2447b3 100644 --- a/lib/schematic/planbundle/types/create_plan_bundle_response.rb +++ b/lib/schematic/planbundle/types/create_plan_bundle_response.rb @@ -5,6 +5,7 @@ module Planbundle module Types class CreatePlanBundleResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanBundleResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb b/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb index f6c9473..2b11a3b 100644 --- a/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb +++ b/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb @@ -5,10 +5,15 @@ module Planbundle module Types class UpdatePlanBundleRequestBody < Internal::Types::Model field :plan_id, -> { String }, optional: false, nullable: false + field :billing_product, -> { Schematic::Types::UpsertBillingProductRequestBody }, optional: true, nullable: false + field :credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanBundleCreditGrantRequestBody] }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false - field :plan, -> { Schematic::Types::UpdatePlanRequestBody }, optional: true, nullable: false + + field :plan, -> { Schematic::Types::UpdatePlanRequestBody }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/planbundle/types/update_plan_bundle_response.rb b/lib/schematic/planbundle/types/update_plan_bundle_response.rb index d4de186..7e26793 100644 --- a/lib/schematic/planbundle/types/update_plan_bundle_response.rb +++ b/lib/schematic/planbundle/types/update_plan_bundle_response.rb @@ -5,6 +5,7 @@ module Planbundle module Types class UpdatePlanBundleResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanBundleResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plangroups/client.rb b/lib/schematic/plangroups/client.rb index bad070f..08ee023 100644 --- a/lib/schematic/plangroups/client.rb +++ b/lib/schematic/plangroups/client.rb @@ -19,13 +19,14 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [Boolean, nil] :include_company_counts # + # @example + # client.plangroups.get_plan_group(include_company_counts: true) + # # @return [Schematic::Plangroups::Types::GetPlanGroupResponse] def get_plan_group(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[include_company_counts] query_params = {} query_params["include_company_counts"] = params[:include_company_counts] if params.key?(:include_company_counts) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -56,6 +57,36 @@ def get_plan_group(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.plangroups.create_plan_group( + # add_on_ids: ["add_on_ids"], + # checkout_collect_address: true, + # checkout_collect_email: true, + # checkout_collect_phone: true, + # checkout_collect_tax_id: true, + # enable_tax_collection: true, + # opt_in_enabled: true, + # ordered_add_ons: [{ + # plan_id: "plan_id" + # }], + # ordered_bundle_list: [{ + # bundle_id: "bundleId" + # }], + # ordered_plans: [{ + # plan_id: "plan_id" + # }], + # prevent_downgrades_when_over_limit: true, + # prevent_self_service_downgrade: true, + # proration_behavior: "create_prorations", + # show_as_monthly_prices: true, + # show_credits: true, + # show_feature_description: true, + # show_hard_limit: true, + # show_period_toggle: true, + # show_zero_price_as_free: true, + # sync_customer_billing_details: true + # ) + # # @return [Schematic::Plangroups::Types::CreatePlanGroupResponse] def create_plan_group(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -89,11 +120,42 @@ def create_plan_group(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_group_id # + # @example + # client.plangroups.update_plan_group( + # plan_group_id: "plan_group_id", + # add_on_ids: ["add_on_ids"], + # checkout_collect_address: true, + # checkout_collect_email: true, + # checkout_collect_phone: true, + # checkout_collect_tax_id: true, + # enable_tax_collection: true, + # opt_in_enabled: true, + # ordered_add_ons: [{ + # plan_id: "plan_id" + # }], + # ordered_bundle_list: [{ + # bundle_id: "bundleId" + # }], + # ordered_plans: [{ + # plan_id: "plan_id" + # }], + # prevent_downgrades_when_over_limit: true, + # prevent_self_service_downgrade: true, + # proration_behavior: "create_prorations", + # show_as_monthly_prices: true, + # show_credits: true, + # show_feature_description: true, + # show_hard_limit: true, + # show_period_toggle: true, + # show_zero_price_as_free: true, + # sync_customer_billing_details: true + # ) + # # @return [Schematic::Plangroups::Types::UpdatePlanGroupResponse] def update_plan_group(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Plangroups::Types::UpdatePlanGroupRequestBody.new(params).to_h - non_body_param_names = ["plan_group_id"] + non_body_param_names = %w[plan_group_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( diff --git a/lib/schematic/plangroups/types/create_plan_group_request_body.rb b/lib/schematic/plangroups/types/create_plan_group_request_body.rb index 389692c..42c4224 100644 --- a/lib/schematic/plangroups/types/create_plan_group_request_body.rb +++ b/lib/schematic/plangroups/types/create_plan_group_request_body.rb @@ -5,42 +5,79 @@ module Plangroups module Types class CreatePlanGroupRequestBody < Internal::Types::Model field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlans] }, optional: true, nullable: false + field :add_on_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false - field :checkout_bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false + + field :checkout_bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: true, nullable: false + field :checkout_collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout_collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout_collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout_collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldInput] }, optional: true, nullable: false + field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false + field :custom_plan_id, -> { String }, optional: true, nullable: false + field :enable_tax_collection, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :fallback_plan_id, -> { String }, optional: true, nullable: false + field :initial_plan_id, -> { String }, optional: true, nullable: false + field :initial_plan_price_id, -> { String }, optional: true, nullable: false + field :opt_in_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :opt_in_text, -> { String }, optional: true, nullable: false + field :opt_in_title, -> { String }, optional: true, nullable: false + field :ordered_add_ons, -> { Internal::Types::Array[Schematic::Types::OrderedPlansInGroup] }, optional: false, nullable: false + field :ordered_bundle_list, -> { Internal::Types::Array[Schematic::Types::PlanGroupBundleOrder] }, optional: false, nullable: false + field :ordered_plans, -> { Internal::Types::Array[Schematic::Types::OrderedPlansInGroup] }, optional: false, nullable: false + field :prevent_downgrades_when_over_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade_button_text, -> { String }, optional: true, nullable: false + field :prevent_self_service_downgrade_url, -> { String }, optional: true, nullable: false + field :proration_behavior, -> { Schematic::Types::ProrationBehavior }, optional: false, nullable: false + field :scheduled_downgrade_behavior, -> { Schematic::Types::ScheduledDowngradeConfigBehavior }, optional: true, nullable: false + field :scheduled_downgrade_prevent_when_over_limit, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :show_as_monthly_prices, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_feature_description, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_hard_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_period_toggle, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_zero_price_as_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :sync_customer_billing_details, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :trial_expiry_plan_id, -> { String }, optional: true, nullable: false + field :trial_expiry_plan_price_id, -> { String }, optional: true, nullable: false + field :trial_payment_method_required, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/plangroups/types/create_plan_group_response.rb b/lib/schematic/plangroups/types/create_plan_group_response.rb index 4033ab4..130e198 100644 --- a/lib/schematic/plangroups/types/create_plan_group_response.rb +++ b/lib/schematic/plangroups/types/create_plan_group_response.rb @@ -5,6 +5,7 @@ module Plangroups module Types class CreatePlanGroupResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanGroupResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plangroups/types/get_plan_group_response.rb b/lib/schematic/plangroups/types/get_plan_group_response.rb index a43a824..740cf0e 100644 --- a/lib/schematic/plangroups/types/get_plan_group_response.rb +++ b/lib/schematic/plangroups/types/get_plan_group_response.rb @@ -5,6 +5,7 @@ module Plangroups module Types class GetPlanGroupResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanGroupDetailResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Plangroups::Types::GetPlanGroupParams }, optional: false, nullable: false end end diff --git a/lib/schematic/plangroups/types/update_plan_group_request_body.rb b/lib/schematic/plangroups/types/update_plan_group_request_body.rb index dc986ce..1eff393 100644 --- a/lib/schematic/plangroups/types/update_plan_group_request_body.rb +++ b/lib/schematic/plangroups/types/update_plan_group_request_body.rb @@ -5,43 +5,81 @@ module Plangroups module Types class UpdatePlanGroupRequestBody < Internal::Types::Model field :plan_group_id, -> { String }, optional: false, nullable: false + field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlans] }, optional: true, nullable: false + field :add_on_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false - field :checkout_bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false + + field :checkout_bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: true, nullable: false + field :checkout_collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout_collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout_collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout_collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldInput] }, optional: true, nullable: false + field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false + field :custom_plan_id, -> { String }, optional: true, nullable: false + field :enable_tax_collection, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :fallback_plan_id, -> { String }, optional: true, nullable: false + field :initial_plan_id, -> { String }, optional: true, nullable: false + field :initial_plan_price_id, -> { String }, optional: true, nullable: false + field :opt_in_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :opt_in_text, -> { String }, optional: true, nullable: false + field :opt_in_title, -> { String }, optional: true, nullable: false + field :ordered_add_ons, -> { Internal::Types::Array[Schematic::Types::OrderedPlansInGroup] }, optional: false, nullable: false + field :ordered_bundle_list, -> { Internal::Types::Array[Schematic::Types::PlanGroupBundleOrder] }, optional: false, nullable: false + field :ordered_plans, -> { Internal::Types::Array[Schematic::Types::OrderedPlansInGroup] }, optional: false, nullable: false + field :prevent_downgrades_when_over_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade_button_text, -> { String }, optional: true, nullable: false + field :prevent_self_service_downgrade_url, -> { String }, optional: true, nullable: false + field :proration_behavior, -> { Schematic::Types::ProrationBehavior }, optional: false, nullable: false + field :scheduled_downgrade_behavior, -> { Schematic::Types::ScheduledDowngradeConfigBehavior }, optional: true, nullable: false + field :scheduled_downgrade_prevent_when_over_limit, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :show_as_monthly_prices, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_feature_description, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_hard_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_period_toggle, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_zero_price_as_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :sync_customer_billing_details, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :trial_expiry_plan_id, -> { String }, optional: true, nullable: false + field :trial_expiry_plan_price_id, -> { String }, optional: true, nullable: false + field :trial_payment_method_required, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/plangroups/types/update_plan_group_response.rb b/lib/schematic/plangroups/types/update_plan_group_response.rb index a96c227..1492b6b 100644 --- a/lib/schematic/plangroups/types/update_plan_group_response.rb +++ b/lib/schematic/plangroups/types/update_plan_group_response.rb @@ -5,6 +5,7 @@ module Plangroups module Types class UpdatePlanGroupResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanGroupResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/client.rb b/lib/schematic/planmigrations/client.rb index db8cb8c..34a693d 100644 --- a/lib/schematic/planmigrations/client.rb +++ b/lib/schematic/planmigrations/client.rb @@ -17,23 +17,30 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :migration_id + # @option params [String] :migration_id # @option params [String, nil] :q # @option params [Schematic::Types::PlanVersionCompanyMigrationStatus, nil] :status # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.planmigrations.list_company_migrations( + # migration_id: "migration_id", + # q: "q", + # status: "completed", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Planmigrations::Types::ListCompanyMigrationsResponse] def list_company_migrations(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[migration_id q status limit offset] query_params = {} query_params["migration_id"] = params[:migration_id] if params.key?(:migration_id) query_params["q"] = params[:q] if params.key?(:q) query_params["status"] = params[:status] if params.key?(:status) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -65,6 +72,9 @@ def list_company_migrations(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_version_company_migration_id # + # @example + # client.planmigrations.retry_company_migration(plan_version_company_migration_id: "plan_version_company_migration_id") + # # @return [Schematic::Planmigrations::Types::RetryCompanyMigrationResponse] def retry_company_migration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -95,23 +105,30 @@ def retry_company_migration(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :migration_id + # @option params [String] :migration_id # @option params [String, nil] :q # @option params [Schematic::Types::PlanVersionCompanyMigrationStatus, nil] :status # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.planmigrations.count_company_migrations( + # migration_id: "migration_id", + # q: "q", + # status: "completed", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Planmigrations::Types::CountCompanyMigrationsResponse] def count_company_migrations(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[migration_id q status limit offset] query_params = {} query_params["migration_id"] = params[:migration_id] if params.key?(:migration_id) query_params["q"] = params[:q] if params.key?(:q) query_params["status"] = params[:status] if params.key?(:status) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -141,21 +158,27 @@ def count_company_migrations(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :plan_version_id + # @option params [String] :plan_version_id # @option params [Schematic::Types::PlanVersionMigrationStatus, nil] :status # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.planmigrations.list_migrations( + # plan_version_id: "plan_version_id", + # status: "completed", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Planmigrations::Types::ListMigrationsResponse] def list_migrations(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[plan_version_id status limit offset] query_params = {} query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["status"] = params[:status] if params.key?(:status) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -186,6 +209,14 @@ def list_migrations(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.planmigrations.create_migration( + # plan_id: "plan_id", + # plan_version_id_to: "plan_version_id_to", + # strategy: "immediate", + # target_plan_type: "plan" + # ) + # # @return [Schematic::Planmigrations::Types::CreateMigrationResponse] def create_migration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -219,6 +250,9 @@ def create_migration(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_version_migration_id # + # @example + # client.planmigrations.get_migration(plan_version_migration_id: "plan_version_migration_id") + # # @return [Schematic::Planmigrations::Types::GetMigrationResponse] def get_migration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -251,11 +285,17 @@ def get_migration(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_version_migration_id # + # @example + # client.planmigrations.retry_migration( + # plan_version_migration_id: "plan_version_migration_id", + # error_codes: ["ambiguous_subscription_item"] + # ) + # # @return [Schematic::Planmigrations::Types::RetryMigrationResponse] def retry_migration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Planmigrations::Types::RetryMigrationRequestBody.new(params).to_h - non_body_param_names = ["plan_version_migration_id"] + non_body_param_names = %w[plan_version_migration_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -286,21 +326,27 @@ def retry_migration(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_query_parameters # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :plan_version_id + # @option params [String] :plan_version_id # @option params [Schematic::Types::PlanVersionMigrationStatus, nil] :status # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.planmigrations.count_migrations( + # plan_version_id: "plan_version_id", + # status: "completed", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Planmigrations::Types::CountMigrationsResponse] def count_migrations(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[plan_version_id status limit offset] query_params = {} query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) query_params["status"] = params[:status] if params.key?(:status) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -331,6 +377,13 @@ def count_migrations(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.planmigrations.preview_migration( + # plan_id: "plan_id", + # plan_version_id_to: "plan_version_id_to", + # target_plan_type: "plan" + # ) + # # @return [Schematic::Planmigrations::Types::PreviewMigrationResponse] def preview_migration(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/schematic/planmigrations/types/count_company_migrations_params.rb b/lib/schematic/planmigrations/types/count_company_migrations_params.rb index 2a01c63..45521d0 100644 --- a/lib/schematic/planmigrations/types/count_company_migrations_params.rb +++ b/lib/schematic/planmigrations/types/count_company_migrations_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class CountCompanyMigrationsParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :migration_id, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::PlanVersionCompanyMigrationStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/planmigrations/types/count_company_migrations_request.rb b/lib/schematic/planmigrations/types/count_company_migrations_request.rb index a27f944..352256d 100644 --- a/lib/schematic/planmigrations/types/count_company_migrations_request.rb +++ b/lib/schematic/planmigrations/types/count_company_migrations_request.rb @@ -4,10 +4,14 @@ module Schematic module Planmigrations module Types class CountCompanyMigrationsRequest < Internal::Types::Model - field :migration_id, -> { String }, optional: true, nullable: false + field :migration_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::PlanVersionCompanyMigrationStatus }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/planmigrations/types/count_company_migrations_response.rb b/lib/schematic/planmigrations/types/count_company_migrations_response.rb index bf91f72..e70c512 100644 --- a/lib/schematic/planmigrations/types/count_company_migrations_response.rb +++ b/lib/schematic/planmigrations/types/count_company_migrations_response.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class CountCompanyMigrationsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Planmigrations::Types::CountCompanyMigrationsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/count_migrations_params.rb b/lib/schematic/planmigrations/types/count_migrations_params.rb index acad870..b367787 100644 --- a/lib/schematic/planmigrations/types/count_migrations_params.rb +++ b/lib/schematic/planmigrations/types/count_migrations_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class CountMigrationsParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::PlanVersionMigrationStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/planmigrations/types/count_migrations_request.rb b/lib/schematic/planmigrations/types/count_migrations_request.rb index d85407e..6d1a26f 100644 --- a/lib/schematic/planmigrations/types/count_migrations_request.rb +++ b/lib/schematic/planmigrations/types/count_migrations_request.rb @@ -4,9 +4,12 @@ module Schematic module Planmigrations module Types class CountMigrationsRequest < Internal::Types::Model - field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: false, nullable: false + field :status, -> { Schematic::Types::PlanVersionMigrationStatus }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/planmigrations/types/count_migrations_response.rb b/lib/schematic/planmigrations/types/count_migrations_response.rb index e2c2834..a3e4fab 100644 --- a/lib/schematic/planmigrations/types/count_migrations_response.rb +++ b/lib/schematic/planmigrations/types/count_migrations_response.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class CountMigrationsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Planmigrations::Types::CountMigrationsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/create_migration_input.rb b/lib/schematic/planmigrations/types/create_migration_input.rb index 174c35a..1222af6 100644 --- a/lib/schematic/planmigrations/types/create_migration_input.rb +++ b/lib/schematic/planmigrations/types/create_migration_input.rb @@ -5,12 +5,19 @@ module Planmigrations module Types class CreateMigrationInput < Internal::Types::Model field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id_to, -> { String }, optional: false, nullable: false + field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false + field :strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false + field :target_plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/create_migration_response.rb b/lib/schematic/planmigrations/types/create_migration_response.rb index 046ca3e..eff5410 100644 --- a/lib/schematic/planmigrations/types/create_migration_response.rb +++ b/lib/schematic/planmigrations/types/create_migration_response.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class CreateMigrationResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanVersionMigrationResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/get_migration_response.rb b/lib/schematic/planmigrations/types/get_migration_response.rb index c746e3b..a6404b5 100644 --- a/lib/schematic/planmigrations/types/get_migration_response.rb +++ b/lib/schematic/planmigrations/types/get_migration_response.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class GetMigrationResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanVersionMigrationResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/list_company_migrations_params.rb b/lib/schematic/planmigrations/types/list_company_migrations_params.rb index 2a3d38b..45b6a5c 100644 --- a/lib/schematic/planmigrations/types/list_company_migrations_params.rb +++ b/lib/schematic/planmigrations/types/list_company_migrations_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class ListCompanyMigrationsParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :migration_id, -> { String }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::PlanVersionCompanyMigrationStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/planmigrations/types/list_company_migrations_request.rb b/lib/schematic/planmigrations/types/list_company_migrations_request.rb index b792b5f..ba2b6d6 100644 --- a/lib/schematic/planmigrations/types/list_company_migrations_request.rb +++ b/lib/schematic/planmigrations/types/list_company_migrations_request.rb @@ -4,10 +4,14 @@ module Schematic module Planmigrations module Types class ListCompanyMigrationsRequest < Internal::Types::Model - field :migration_id, -> { String }, optional: true, nullable: false + field :migration_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::PlanVersionCompanyMigrationStatus }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/planmigrations/types/list_company_migrations_response.rb b/lib/schematic/planmigrations/types/list_company_migrations_response.rb index 0abc9c8..f06b1e9 100644 --- a/lib/schematic/planmigrations/types/list_company_migrations_response.rb +++ b/lib/schematic/planmigrations/types/list_company_migrations_response.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class ListCompanyMigrationsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanVersionCompanyMigrationResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Planmigrations::Types::ListCompanyMigrationsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/list_migrations_params.rb b/lib/schematic/planmigrations/types/list_migrations_params.rb index 6759bb9..05f279c 100644 --- a/lib/schematic/planmigrations/types/list_migrations_params.rb +++ b/lib/schematic/planmigrations/types/list_migrations_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListMigrationsParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::PlanVersionMigrationStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/planmigrations/types/list_migrations_request.rb b/lib/schematic/planmigrations/types/list_migrations_request.rb index 092a828..a103485 100644 --- a/lib/schematic/planmigrations/types/list_migrations_request.rb +++ b/lib/schematic/planmigrations/types/list_migrations_request.rb @@ -4,9 +4,12 @@ module Schematic module Planmigrations module Types class ListMigrationsRequest < Internal::Types::Model - field :plan_version_id, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: false, nullable: false + field :status, -> { Schematic::Types::PlanVersionMigrationStatus }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/planmigrations/types/list_migrations_response.rb b/lib/schematic/planmigrations/types/list_migrations_response.rb index 18af731..9a129fd 100644 --- a/lib/schematic/planmigrations/types/list_migrations_response.rb +++ b/lib/schematic/planmigrations/types/list_migrations_response.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class ListMigrationsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanVersionMigrationResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Planmigrations::Types::ListMigrationsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/preview_migration_request_body.rb b/lib/schematic/planmigrations/types/preview_migration_request_body.rb index ea1192b..87dbd85 100644 --- a/lib/schematic/planmigrations/types/preview_migration_request_body.rb +++ b/lib/schematic/planmigrations/types/preview_migration_request_body.rb @@ -5,9 +5,13 @@ module Planmigrations module Types class PreviewMigrationRequestBody < Internal::Types::Model field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id_to, -> { String }, optional: false, nullable: false + field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :target_plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/preview_migration_response.rb b/lib/schematic/planmigrations/types/preview_migration_response.rb index 7a0ccb4..472e805 100644 --- a/lib/schematic/planmigrations/types/preview_migration_response.rb +++ b/lib/schematic/planmigrations/types/preview_migration_response.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class PreviewMigrationResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanVersionMigrationPreviewResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/retry_company_migration_response.rb b/lib/schematic/planmigrations/types/retry_company_migration_response.rb index 78d0c77..7a4f972 100644 --- a/lib/schematic/planmigrations/types/retry_company_migration_response.rb +++ b/lib/schematic/planmigrations/types/retry_company_migration_response.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class RetryCompanyMigrationResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanVersionCompanyMigrationResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/retry_migration_request_body.rb b/lib/schematic/planmigrations/types/retry_migration_request_body.rb index 7a57a6e..a156de0 100644 --- a/lib/schematic/planmigrations/types/retry_migration_request_body.rb +++ b/lib/schematic/planmigrations/types/retry_migration_request_body.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class RetryMigrationRequestBody < Internal::Types::Model field :plan_version_migration_id, -> { String }, optional: false, nullable: false + field :error_codes, -> { Internal::Types::Array[Schematic::Types::MigrationErrorCode] }, optional: false, nullable: false end end diff --git a/lib/schematic/planmigrations/types/retry_migration_response.rb b/lib/schematic/planmigrations/types/retry_migration_response.rb index 46ea547..0d303ef 100644 --- a/lib/schematic/planmigrations/types/retry_migration_response.rb +++ b/lib/schematic/planmigrations/types/retry_migration_response.rb @@ -5,6 +5,7 @@ module Planmigrations module Types class RetryMigrationResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanVersionMigrationResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/client.rb b/lib/schematic/plans/client.rb index 8763f87..b62e412 100644 --- a/lib/schematic/plans/client.rb +++ b/lib/schematic/plans/client.rb @@ -19,11 +19,17 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :company_id # + # @example + # client.plans.update_company_plans( + # company_id: "company_id", + # add_on_ids: ["add_on_ids"] + # ) + # # @return [Schematic::Plans::Types::UpdateCompanyPlansResponse] def update_company_plans(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Plans::Types::UpdateCompanyPlansRequestBody.new(params).to_h - non_body_param_names = ["company_id"] + non_body_param_names = %w[company_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -62,10 +68,20 @@ def update_company_plans(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.plans.list_custom_plan_billings( + # company_id: "company_id", + # plan_id: "plan_id", + # plan_billing_source: "custom_plan", + # status: "active", + # statuses: ["active"], + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Plans::Types::ListCustomPlanBillingsResponse] def list_custom_plan_billings(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id plan_id plan_billing_source status statuses limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) @@ -74,7 +90,6 @@ def list_custom_plan_billings(request_options: {}, **params) query_params["statuses"] = params[:statuses] if params.key?(:statuses) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -106,14 +121,25 @@ def list_custom_plan_billings(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :custom_plan_billing_id # + # @example + # client.plans.mark_custom_plan_billing_paid( + # custom_plan_billing_id: "custom_plan_billing_id", + # request: { + # key: "value" + # } + # ) + # # @return [Schematic::Plans::Types::MarkCustomPlanBillingPaidResponse] def mark_custom_plan_billing_paid(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[custom_plan_billing_id] + body_params = params.except(*path_param_names) + request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "custom-plan-billings/#{URI.encode_uri_component(params[:custom_plan_billing_id].to_s)}/mark-paid", - body: params, + body: body_params, request_options: request_options ) begin @@ -139,11 +165,17 @@ def mark_custom_plan_billing_paid(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :custom_plan_billing_id # + # @example + # client.plans.retry_custom_plan_billing( + # custom_plan_billing_id: "custom_plan_billing_id", + # customer_email: "customer_email" + # ) + # # @return [Schematic::Plans::Types::RetryCustomPlanBillingResponse] def retry_custom_plan_billing(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Plans::Types::RetryCustomPlanBillingRequestBody.new(params).to_h - non_body_param_names = ["custom_plan_billing_id"] + non_body_param_names = %w[custom_plan_billing_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -175,6 +207,12 @@ def retry_custom_plan_billing(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.plans.create_custom_plan( + # company_id: "company_id", + # name: "name" + # ) + # # @return [Schematic::Plans::Types::CreateCustomPlanResponse] def create_custom_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -224,10 +262,30 @@ def create_custom_plan(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.plans.list_plans( + # company_id: "company_id", + # company_scoped_only: true, + # exclude_company_scoped: true, + # for_fallback_plan: true, + # for_initial_plan: true, + # for_trial_expiry_plan: true, + # has_product_id: true, + # ids: ["ids"], + # include_draft_versions: true, + # plan_type: "plan", + # q: "q", + # scoped_to_company_id: "scoped_to_company_id", + # with_entitlements: true, + # without_entitlement_for: "without_entitlement_for", + # without_paid_product_id: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Plans::Types::ListPlansResponse] def list_plans(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id company_scoped_only exclude_company_scoped for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q scoped_to_company_id with_entitlements without_entitlement_for without_paid_product_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_scoped_only"] = params[:company_scoped_only] if params.key?(:company_scoped_only) @@ -246,7 +304,6 @@ def list_plans(request_options: {}, **params) query_params["without_paid_product_id"] = params[:without_paid_product_id] if params.key?(:without_paid_product_id) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -277,6 +334,12 @@ def list_plans(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.plans.create_plan( + # name: "name", + # plan_type: "plan" + # ) + # # @return [Schematic::Plans::Types::CreatePlanResponse] def create_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -311,13 +374,17 @@ def create_plan(request_options: {}, **params) # @option params [String] :plan_id # @option params [String, nil] :plan_version_id # + # @example + # client.plans.get_plan( + # plan_id: "plan_id", + # plan_version_id: "plan_version_id" + # ) + # # @return [Schematic::Plans::Types::GetPlanResponse] def get_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[plan_version_id] query_params = {} query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) - params = params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -349,14 +416,23 @@ def get_plan(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_id # + # @example + # client.plans.update_plan( + # plan_id: "plan_id", + # name: "name" + # ) + # # @return [Schematic::Plans::Types::UpdatePlanResponse] def update_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[plan_id] + body_params = params.except(*path_param_names) + request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "plans/#{URI.encode_uri_component(params[:plan_id].to_s)}", - body: Schematic::Types::UpdatePlanRequestBody.new(params).to_h, + body: Schematic::Types::UpdatePlanRequestBody.new(body_params).to_h, request_options: request_options ) begin @@ -382,6 +458,9 @@ def update_plan(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_id # + # @example + # client.plans.delete_plan(plan_id: "plan_id") + # # @return [Schematic::Plans::Types::DeletePlanResponse] def delete_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -414,14 +493,24 @@ def delete_plan(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_id # + # @example + # client.plans.upsert_billing_product_plan( + # plan_id: "plan_id", + # charge_type: "free", + # is_trialable: true + # ) + # # @return [Schematic::Plans::Types::UpsertBillingProductPlanResponse] def upsert_billing_product_plan(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[plan_id] + body_params = params.except(*path_param_names) + request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "plans/#{URI.encode_uri_component(params[:plan_id].to_s)}/billing_products", - body: Schematic::Types::UpsertBillingProductRequestBody.new(params).to_h, + body: Schematic::Types::UpsertBillingProductRequestBody.new(body_params).to_h, request_options: request_options ) begin @@ -446,6 +535,14 @@ def upsert_billing_product_plan(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.plans.upsert_plan_for_billing_product( + # billing_provider: "metronome", + # external_resource_id: "external_resource_id", + # name: "name", + # plan_type: "plan" + # ) + # # @return [Schematic::Plans::Types::UpsertPlanForBillingProductResponse] def upsert_plan_for_billing_product(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -482,16 +579,22 @@ def upsert_plan_for_billing_product(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.plans.list_billing_product_match_companies( + # plan_id: "plan_id", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Plans::Types::ListBillingProductMatchCompaniesResponse] def list_billing_product_match_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[plan_id q limit offset] query_params = {} query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -526,16 +629,22 @@ def list_billing_product_match_companies(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.plans.count_billing_product_match_companies( + # plan_id: "plan_id", + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Plans::Types::CountBillingProductMatchCompaniesResponse] def count_billing_product_match_companies(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[plan_id q limit offset] query_params = {} query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -583,10 +692,30 @@ def count_billing_product_match_companies(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.plans.count_plans( + # company_id: "company_id", + # company_scoped_only: true, + # exclude_company_scoped: true, + # for_fallback_plan: true, + # for_initial_plan: true, + # for_trial_expiry_plan: true, + # has_product_id: true, + # ids: ["ids"], + # include_draft_versions: true, + # plan_type: "plan", + # q: "q", + # scoped_to_company_id: "scoped_to_company_id", + # with_entitlements: true, + # without_entitlement_for: "without_entitlement_for", + # without_paid_product_id: true, + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Plans::Types::CountPlansResponse] def count_plans(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id company_scoped_only exclude_company_scoped for_fallback_plan for_initial_plan for_trial_expiry_plan has_product_id ids include_draft_versions plan_type q scoped_to_company_id with_entitlements without_entitlement_for without_paid_product_id limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["company_scoped_only"] = params[:company_scoped_only] if params.key?(:company_scoped_only) @@ -605,7 +734,6 @@ def count_plans(request_options: {}, **params) query_params["without_paid_product_id"] = params[:without_paid_product_id] if params.key?(:without_paid_product_id) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -638,14 +766,18 @@ def count_plans(request_options: {}, **params) # @option params [String] :plan_id # @option params [String, nil] :plan_version_id # + # @example + # client.plans.list_plan_issues( + # plan_id: "plan_id", + # plan_version_id: "plan_version_id" + # ) + # # @return [Schematic::Plans::Types::ListPlanIssuesResponse] def list_plan_issues(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[plan_id plan_version_id] query_params = {} query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id) query_params["plan_version_id"] = params[:plan_version_id] if params.key?(:plan_version_id) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -678,13 +810,17 @@ def list_plan_issues(request_options: {}, **params) # @option params [String] :plan_version_id # @option params [Boolean, nil] :promote_archived_version # + # @example + # client.plans.delete_plan_version( + # plan_version_id: "plan_version_id", + # promote_archived_version: true + # ) + # # @return [Schematic::Plans::Types::DeletePlanVersionResponse] def delete_plan_version(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[promote_archived_version] query_params = {} query_params["promote_archived_version"] = params[:promote_archived_version] if params.key?(:promote_archived_version) - params = params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -716,11 +852,18 @@ def delete_plan_version(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :plan_version_id # + # @example + # client.plans.publish_plan_version( + # plan_version_id: "plan_version_id", + # excluded_company_ids: ["excluded_company_ids"], + # migration_strategy: "immediate" + # ) + # # @return [Schematic::Plans::Types::PublishPlanVersionResponse] def publish_plan_version(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Plans::Types::PublishPlanVersionRequestBody.new(params).to_h - non_body_param_names = ["plan_version_id"] + non_body_param_names = %w[plan_version_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( diff --git a/lib/schematic/plans/types/count_billing_product_match_companies_params.rb b/lib/schematic/plans/types/count_billing_product_match_companies_params.rb index 85f0256..e5961a1 100644 --- a/lib/schematic/plans/types/count_billing_product_match_companies_params.rb +++ b/lib/schematic/plans/types/count_billing_product_match_companies_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class CountBillingProductMatchCompaniesParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/count_billing_product_match_companies_request.rb b/lib/schematic/plans/types/count_billing_product_match_companies_request.rb index 871ec81..39ccd7d 100644 --- a/lib/schematic/plans/types/count_billing_product_match_companies_request.rb +++ b/lib/schematic/plans/types/count_billing_product_match_companies_request.rb @@ -5,8 +5,11 @@ module Plans module Types class CountBillingProductMatchCompaniesRequest < Internal::Types::Model field :plan_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/count_billing_product_match_companies_response.rb b/lib/schematic/plans/types/count_billing_product_match_companies_response.rb index c23b8f2..25483e4 100644 --- a/lib/schematic/plans/types/count_billing_product_match_companies_response.rb +++ b/lib/schematic/plans/types/count_billing_product_match_companies_response.rb @@ -5,6 +5,7 @@ module Plans module Types class CountBillingProductMatchCompaniesResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::CountBillingProductMatchCompaniesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/count_plans_params.rb b/lib/schematic/plans/types/count_plans_params.rb index d2b2000..a009ddf 100644 --- a/lib/schematic/plans/types/count_plans_params.rb +++ b/lib/schematic/plans/types/count_plans_params.rb @@ -6,21 +6,37 @@ module Types # Input parameters class CountPlansParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_scoped_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :exclude_company_scoped, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_fallback_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :has_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :include_draft_versions, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :scoped_to_company_id, -> { String }, optional: true, nullable: false + field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_entitlement_for, -> { String }, optional: true, nullable: false + field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/count_plans_request.rb b/lib/schematic/plans/types/count_plans_request.rb index 5ec0173..5589ddc 100644 --- a/lib/schematic/plans/types/count_plans_request.rb +++ b/lib/schematic/plans/types/count_plans_request.rb @@ -5,21 +5,37 @@ module Plans module Types class CountPlansRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_scoped_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :exclude_company_scoped, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_fallback_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :has_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :include_draft_versions, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :scoped_to_company_id, -> { String }, optional: true, nullable: false + field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_entitlement_for, -> { String }, optional: true, nullable: false + field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/count_plans_response.rb b/lib/schematic/plans/types/count_plans_response.rb index 9fb7fdf..a3347fc 100644 --- a/lib/schematic/plans/types/count_plans_response.rb +++ b/lib/schematic/plans/types/count_plans_response.rb @@ -5,6 +5,7 @@ module Plans module Types class CountPlansResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::CountPlansParams }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb b/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb index d9fa9c3..6295083 100644 --- a/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb +++ b/lib/schematic/plans/types/create_billing_linked_plan_request_body.rb @@ -5,11 +5,17 @@ module Plans module Types class CreateBillingLinkedPlanRequestBody < Internal::Types::Model field :billing_provider, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false - field :description, -> { String }, optional: false, nullable: false + + field :description, -> { String }, optional: true, nullable: false + field :external_resource_id, -> { String }, optional: false, nullable: false + field :external_resource_version, -> { String }, optional: true, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/create_custom_plan_request_body.rb b/lib/schematic/plans/types/create_custom_plan_request_body.rb index f51a4ec..970917e 100644 --- a/lib/schematic/plans/types/create_custom_plan_request_body.rb +++ b/lib/schematic/plans/types/create_custom_plan_request_body.rb @@ -5,9 +5,15 @@ module Plans module Types class CreateCustomPlanRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false - field :description, -> { String }, optional: false, nullable: false + + field :copied_price_id, -> { String }, optional: true, nullable: false + + field :description, -> { String }, optional: true, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/create_custom_plan_response.rb b/lib/schematic/plans/types/create_custom_plan_response.rb index e0b3006..7e96000 100644 --- a/lib/schematic/plans/types/create_custom_plan_response.rb +++ b/lib/schematic/plans/types/create_custom_plan_response.rb @@ -5,6 +5,7 @@ module Plans module Types class CreateCustomPlanResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/create_plan_response.rb b/lib/schematic/plans/types/create_plan_response.rb index 4bce1b0..202d4e7 100644 --- a/lib/schematic/plans/types/create_plan_response.rb +++ b/lib/schematic/plans/types/create_plan_response.rb @@ -5,6 +5,7 @@ module Plans module Types class CreatePlanResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/delete_plan_response.rb b/lib/schematic/plans/types/delete_plan_response.rb index aca04bc..e882308 100644 --- a/lib/schematic/plans/types/delete_plan_response.rb +++ b/lib/schematic/plans/types/delete_plan_response.rb @@ -5,6 +5,7 @@ module Plans module Types class DeletePlanResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/delete_plan_version_request.rb b/lib/schematic/plans/types/delete_plan_version_request.rb index ad478ab..ceda643 100644 --- a/lib/schematic/plans/types/delete_plan_version_request.rb +++ b/lib/schematic/plans/types/delete_plan_version_request.rb @@ -5,6 +5,7 @@ module Plans module Types class DeletePlanVersionRequest < Internal::Types::Model field :plan_version_id, -> { String }, optional: false, nullable: false + field :promote_archived_version, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/delete_plan_version_response.rb b/lib/schematic/plans/types/delete_plan_version_response.rb index 675dda5..6cfbb7c 100644 --- a/lib/schematic/plans/types/delete_plan_version_response.rb +++ b/lib/schematic/plans/types/delete_plan_version_response.rb @@ -5,6 +5,7 @@ module Plans module Types class DeletePlanVersionResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::DeletePlanVersionParams }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/get_plan_request.rb b/lib/schematic/plans/types/get_plan_request.rb index 0c2991f..aa84400 100644 --- a/lib/schematic/plans/types/get_plan_request.rb +++ b/lib/schematic/plans/types/get_plan_request.rb @@ -5,6 +5,7 @@ module Plans module Types class GetPlanRequest < Internal::Types::Model field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/get_plan_response.rb b/lib/schematic/plans/types/get_plan_response.rb index cbcb5ef..d2f92df 100644 --- a/lib/schematic/plans/types/get_plan_response.rb +++ b/lib/schematic/plans/types/get_plan_response.rb @@ -5,6 +5,7 @@ module Plans module Types class GetPlanResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanDetailResponseData }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::GetPlanParams }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/list_billing_product_match_companies_params.rb b/lib/schematic/plans/types/list_billing_product_match_companies_params.rb index 7bbde34..24a37e2 100644 --- a/lib/schematic/plans/types/list_billing_product_match_companies_params.rb +++ b/lib/schematic/plans/types/list_billing_product_match_companies_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListBillingProductMatchCompaniesParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/list_billing_product_match_companies_request.rb b/lib/schematic/plans/types/list_billing_product_match_companies_request.rb index ab58b77..dfe4597 100644 --- a/lib/schematic/plans/types/list_billing_product_match_companies_request.rb +++ b/lib/schematic/plans/types/list_billing_product_match_companies_request.rb @@ -5,8 +5,11 @@ module Plans module Types class ListBillingProductMatchCompaniesRequest < Internal::Types::Model field :plan_id, -> { String }, optional: false, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/list_billing_product_match_companies_response.rb b/lib/schematic/plans/types/list_billing_product_match_companies_response.rb index 3aaade5..f31fb22 100644 --- a/lib/schematic/plans/types/list_billing_product_match_companies_response.rb +++ b/lib/schematic/plans/types/list_billing_product_match_companies_response.rb @@ -5,6 +5,7 @@ module Plans module Types class ListBillingProductMatchCompaniesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CompanyDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::ListBillingProductMatchCompaniesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/list_custom_plan_billings_params.rb b/lib/schematic/plans/types/list_custom_plan_billings_params.rb index 47ca5b1..69efa4e 100644 --- a/lib/schematic/plans/types/list_custom_plan_billings_params.rb +++ b/lib/schematic/plans/types/list_custom_plan_billings_params.rb @@ -6,11 +6,17 @@ module Types # Input parameters class ListCustomPlanBillingsParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_billing_source, -> { Schematic::Types::PlanBillingSource }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false + field :statuses, -> { Internal::Types::Array[Schematic::Types::CustomPlanBillingStatus] }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/list_custom_plan_billings_request.rb b/lib/schematic/plans/types/list_custom_plan_billings_request.rb index 7f24148..bc01197 100644 --- a/lib/schematic/plans/types/list_custom_plan_billings_request.rb +++ b/lib/schematic/plans/types/list_custom_plan_billings_request.rb @@ -5,11 +5,17 @@ module Plans module Types class ListCustomPlanBillingsRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_billing_source, -> { Schematic::Types::PlanBillingSource }, optional: true, nullable: false + field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false + field :statuses, -> { Schematic::Types::CustomPlanBillingStatus }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/list_custom_plan_billings_response.rb b/lib/schematic/plans/types/list_custom_plan_billings_response.rb index 2b41c35..d8c930f 100644 --- a/lib/schematic/plans/types/list_custom_plan_billings_response.rb +++ b/lib/schematic/plans/types/list_custom_plan_billings_response.rb @@ -5,6 +5,7 @@ module Plans module Types class ListCustomPlanBillingsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::CustomPlanBillingResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::ListCustomPlanBillingsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/list_plan_issues_params.rb b/lib/schematic/plans/types/list_plan_issues_params.rb index 0ce2857..0bb6713 100644 --- a/lib/schematic/plans/types/list_plan_issues_params.rb +++ b/lib/schematic/plans/types/list_plan_issues_params.rb @@ -6,6 +6,7 @@ module Types # Input parameters class ListPlanIssuesParams < Internal::Types::Model field :plan_id, -> { String }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/list_plan_issues_request.rb b/lib/schematic/plans/types/list_plan_issues_request.rb index 9f96514..c4637b6 100644 --- a/lib/schematic/plans/types/list_plan_issues_request.rb +++ b/lib/schematic/plans/types/list_plan_issues_request.rb @@ -5,6 +5,7 @@ module Plans module Types class ListPlanIssuesRequest < Internal::Types::Model field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/list_plan_issues_response.rb b/lib/schematic/plans/types/list_plan_issues_response.rb index cd5b6b3..10c32ec 100644 --- a/lib/schematic/plans/types/list_plan_issues_response.rb +++ b/lib/schematic/plans/types/list_plan_issues_response.rb @@ -5,6 +5,7 @@ module Plans module Types class ListPlanIssuesResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanIssueResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::ListPlanIssuesParams }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/list_plans_params.rb b/lib/schematic/plans/types/list_plans_params.rb index b0313c2..02765c9 100644 --- a/lib/schematic/plans/types/list_plans_params.rb +++ b/lib/schematic/plans/types/list_plans_params.rb @@ -6,21 +6,37 @@ module Types # Input parameters class ListPlansParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_scoped_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :exclude_company_scoped, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_fallback_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :has_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :include_draft_versions, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :scoped_to_company_id, -> { String }, optional: true, nullable: false + field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_entitlement_for, -> { String }, optional: true, nullable: false + field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/list_plans_request.rb b/lib/schematic/plans/types/list_plans_request.rb index 393211a..a89f5ab 100644 --- a/lib/schematic/plans/types/list_plans_request.rb +++ b/lib/schematic/plans/types/list_plans_request.rb @@ -5,21 +5,37 @@ module Plans module Types class ListPlansRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_scoped_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :exclude_company_scoped, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_fallback_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_initial_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :for_trial_expiry_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :has_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :ids, -> { String }, optional: true, nullable: false + field :include_draft_versions, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :scoped_to_company_id, -> { String }, optional: true, nullable: false + field :with_entitlements, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_entitlement_for, -> { String }, optional: true, nullable: false + field :without_paid_product_id, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/list_plans_response.rb b/lib/schematic/plans/types/list_plans_response.rb index a9d70ba..7884fbe 100644 --- a/lib/schematic/plans/types/list_plans_response.rb +++ b/lib/schematic/plans/types/list_plans_response.rb @@ -5,6 +5,7 @@ module Plans module Types class ListPlansResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Plans::Types::ListPlansParams }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/mark_custom_plan_billing_paid_response.rb b/lib/schematic/plans/types/mark_custom_plan_billing_paid_response.rb index c22a686..fd9baed 100644 --- a/lib/schematic/plans/types/mark_custom_plan_billing_paid_response.rb +++ b/lib/schematic/plans/types/mark_custom_plan_billing_paid_response.rb @@ -5,6 +5,7 @@ module Plans module Types class MarkCustomPlanBillingPaidResponse < Internal::Types::Model field :data, -> { Schematic::Types::CustomPlanBillingResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/publish_plan_version_request_body.rb b/lib/schematic/plans/types/publish_plan_version_request_body.rb index ddf9490..3b0efc3 100644 --- a/lib/schematic/plans/types/publish_plan_version_request_body.rb +++ b/lib/schematic/plans/types/publish_plan_version_request_body.rb @@ -5,17 +5,31 @@ module Plans module Types class PublishPlanVersionRequestBody < Internal::Types::Model field :plan_version_id, -> { String }, optional: false, nullable: false + field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false + field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false + field :coupon_external_id, -> { String }, optional: true, nullable: false + field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: true, nullable: false + field :customer_email, -> { String }, optional: true, nullable: false + field :days_until_due, -> { Integer }, optional: true, nullable: false + field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :migration_strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false + field :phone, -> { String }, optional: true, nullable: false + field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false + + field :require_no_migration, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :tax_id, -> { Schematic::Types::TaxIdInput }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/publish_plan_version_response.rb b/lib/schematic/plans/types/publish_plan_version_response.rb index ba61e3a..bf99a8a 100644 --- a/lib/schematic/plans/types/publish_plan_version_response.rb +++ b/lib/schematic/plans/types/publish_plan_version_response.rb @@ -5,6 +5,7 @@ module Plans module Types class PublishPlanVersionResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanVersionResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb b/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb index e8fa24e..a036de6 100644 --- a/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +++ b/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb @@ -5,9 +5,13 @@ module Plans module Types class RetryCustomPlanBillingRequestBody < Internal::Types::Model field :custom_plan_billing_id, -> { String }, optional: false, nullable: false + field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false + field :customer_email, -> { String }, optional: false, nullable: false + field :days_until_due, -> { Integer }, optional: true, nullable: false + field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/retry_custom_plan_billing_response.rb b/lib/schematic/plans/types/retry_custom_plan_billing_response.rb index 8abac7c..c89cffc 100644 --- a/lib/schematic/plans/types/retry_custom_plan_billing_response.rb +++ b/lib/schematic/plans/types/retry_custom_plan_billing_response.rb @@ -5,6 +5,7 @@ module Plans module Types class RetryCustomPlanBillingResponse < Internal::Types::Model field :data, -> { Schematic::Types::CustomPlanBillingResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/update_company_plans_request_body.rb b/lib/schematic/plans/types/update_company_plans_request_body.rb index 1137514..239fb06 100644 --- a/lib/schematic/plans/types/update_company_plans_request_body.rb +++ b/lib/schematic/plans/types/update_company_plans_request_body.rb @@ -5,7 +5,9 @@ module Plans module Types class UpdateCompanyPlansRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :add_on_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :base_plan_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/plans/types/update_company_plans_response.rb b/lib/schematic/plans/types/update_company_plans_response.rb index b3199a7..59c8a17 100644 --- a/lib/schematic/plans/types/update_company_plans_response.rb +++ b/lib/schematic/plans/types/update_company_plans_response.rb @@ -5,6 +5,7 @@ module Plans module Types class UpdateCompanyPlansResponse < Internal::Types::Model field :data, -> { Schematic::Types::CompanyDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/update_plan_response.rb b/lib/schematic/plans/types/update_plan_response.rb index 47b82e1..9a4c2ed 100644 --- a/lib/schematic/plans/types/update_plan_response.rb +++ b/lib/schematic/plans/types/update_plan_response.rb @@ -5,6 +5,7 @@ module Plans module Types class UpdatePlanResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/upsert_billing_product_plan_response.rb b/lib/schematic/plans/types/upsert_billing_product_plan_response.rb index 70c93cd..3c806c0 100644 --- a/lib/schematic/plans/types/upsert_billing_product_plan_response.rb +++ b/lib/schematic/plans/types/upsert_billing_product_plan_response.rb @@ -5,6 +5,7 @@ module Plans module Types class UpsertBillingProductPlanResponse < Internal::Types::Model field :data, -> { Schematic::Types::BillingProductPlanResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/plans/types/upsert_plan_for_billing_product_response.rb b/lib/schematic/plans/types/upsert_plan_for_billing_product_response.rb index 259ab9b..dda62df 100644 --- a/lib/schematic/plans/types/upsert_plan_for_billing_product_response.rb +++ b/lib/schematic/plans/types/upsert_plan_for_billing_product_response.rb @@ -5,6 +5,7 @@ module Plans module Types class UpsertPlanForBillingProductResponse < Internal::Types::Model field :data, -> { Schematic::Types::PlanDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/scheduledcheckout/client.rb b/lib/schematic/scheduledcheckout/client.rb index ce39e13..78da6d8 100644 --- a/lib/schematic/scheduledcheckout/client.rb +++ b/lib/schematic/scheduledcheckout/client.rb @@ -22,16 +22,22 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.scheduledcheckout.list_scheduled_checkouts( + # company_id: "company_id", + # status: "cancelled", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Scheduledcheckout::Types::ListScheduledCheckoutsResponse] def list_scheduled_checkouts(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[company_id status limit offset] query_params = {} query_params["company_id"] = params[:company_id] if params.key?(:company_id) query_params["status"] = params[:status] if params.key?(:status) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -62,6 +68,14 @@ def list_scheduled_checkouts(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.scheduledcheckout.create_scheduled_checkout( + # company_id: "company_id", + # execute_after: "2024-01-15T09:30:00Z", + # from_plan_id: "from_plan_id", + # to_plan_id: "to_plan_id" + # ) + # # @return [Schematic::Scheduledcheckout::Types::CreateScheduledCheckoutResponse] def create_scheduled_checkout(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -95,6 +109,9 @@ def create_scheduled_checkout(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :scheduled_checkout_id # + # @example + # client.scheduledcheckout.get_scheduled_checkout(scheduled_checkout_id: "scheduled_checkout_id") + # # @return [Schematic::Scheduledcheckout::Types::GetScheduledCheckoutResponse] def get_scheduled_checkout(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -127,11 +144,14 @@ def get_scheduled_checkout(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :scheduled_checkout_id # + # @example + # client.scheduledcheckout.update_scheduled_checkout(scheduled_checkout_id: "scheduled_checkout_id") + # # @return [Schematic::Scheduledcheckout::Types::UpdateScheduledCheckoutResponse] def update_scheduled_checkout(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Scheduledcheckout::Types::UpdateScheduledCheckoutRequest.new(params).to_h - non_body_param_names = ["scheduled_checkout_id"] + non_body_param_names = %w[scheduled_checkout_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( diff --git a/lib/schematic/scheduledcheckout/types/create_scheduled_checkout_request.rb b/lib/schematic/scheduledcheckout/types/create_scheduled_checkout_request.rb index c6ebd2a..da3ff77 100644 --- a/lib/schematic/scheduledcheckout/types/create_scheduled_checkout_request.rb +++ b/lib/schematic/scheduledcheckout/types/create_scheduled_checkout_request.rb @@ -5,8 +5,11 @@ module Scheduledcheckout module Types class CreateScheduledCheckoutRequest < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :execute_after, -> { String }, optional: false, nullable: false + field :from_plan_id, -> { String }, optional: false, nullable: false + field :to_plan_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/scheduledcheckout/types/create_scheduled_checkout_response.rb b/lib/schematic/scheduledcheckout/types/create_scheduled_checkout_response.rb index 28c0d5a..a1fc58d 100644 --- a/lib/schematic/scheduledcheckout/types/create_scheduled_checkout_response.rb +++ b/lib/schematic/scheduledcheckout/types/create_scheduled_checkout_response.rb @@ -5,6 +5,7 @@ module Scheduledcheckout module Types class CreateScheduledCheckoutResponse < Internal::Types::Model field :data, -> { Schematic::Types::ScheduledCheckoutResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/scheduledcheckout/types/get_scheduled_checkout_response.rb b/lib/schematic/scheduledcheckout/types/get_scheduled_checkout_response.rb index 5b4f5ff..4b05986 100644 --- a/lib/schematic/scheduledcheckout/types/get_scheduled_checkout_response.rb +++ b/lib/schematic/scheduledcheckout/types/get_scheduled_checkout_response.rb @@ -5,6 +5,7 @@ module Scheduledcheckout module Types class GetScheduledCheckoutResponse < Internal::Types::Model field :data, -> { Schematic::Types::ScheduledCheckoutResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_params.rb b/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_params.rb index f52efc1..8504cee 100644 --- a/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_params.rb +++ b/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_params.rb @@ -6,8 +6,11 @@ module Types # Input parameters class ListScheduledCheckoutsParams < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :status, -> { Schematic::Types::ScheduledCheckoutStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_request.rb b/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_request.rb index 5a2806f..b177e36 100644 --- a/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_request.rb +++ b/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_request.rb @@ -5,8 +5,11 @@ module Scheduledcheckout module Types class ListScheduledCheckoutsRequest < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::ScheduledCheckoutStatus }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_response.rb b/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_response.rb index f91ba63..b614d74 100644 --- a/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_response.rb +++ b/lib/schematic/scheduledcheckout/types/list_scheduled_checkouts_response.rb @@ -5,6 +5,7 @@ module Scheduledcheckout module Types class ListScheduledCheckoutsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::ScheduledCheckoutResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Scheduledcheckout::Types::ListScheduledCheckoutsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/scheduledcheckout/types/update_scheduled_checkout_request.rb b/lib/schematic/scheduledcheckout/types/update_scheduled_checkout_request.rb index 4543ec0..bc9992f 100644 --- a/lib/schematic/scheduledcheckout/types/update_scheduled_checkout_request.rb +++ b/lib/schematic/scheduledcheckout/types/update_scheduled_checkout_request.rb @@ -5,7 +5,9 @@ module Scheduledcheckout module Types class UpdateScheduledCheckoutRequest < Internal::Types::Model field :scheduled_checkout_id, -> { String }, optional: false, nullable: false + field :execute_after, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::ScheduledCheckoutStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/scheduledcheckout/types/update_scheduled_checkout_response.rb b/lib/schematic/scheduledcheckout/types/update_scheduled_checkout_response.rb index 94f5ce6..b3da848 100644 --- a/lib/schematic/scheduledcheckout/types/update_scheduled_checkout_response.rb +++ b/lib/schematic/scheduledcheckout/types/update_scheduled_checkout_response.rb @@ -5,6 +5,7 @@ module Scheduledcheckout module Types class UpdateScheduledCheckoutResponse < Internal::Types::Model field :data, -> { Schematic::Types::ScheduledCheckoutResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/schematic_client.rb b/lib/schematic/schematic_client.rb index 10fad27..28e7e11 100644 --- a/lib/schematic/schematic_client.rb +++ b/lib/schematic/schematic_client.rb @@ -542,10 +542,10 @@ def enqueue_flag_check_event(flag_key, response, company, user) body[:user] = user if user&.any? @event_buffer.push({ - event_type: "flag_check", - body: body, - sent_at: Time.now.utc.iso8601 - }) + event_type: "flag_check", + body: body, + sent_at: Time.now.utc.iso8601 + }) end def setup_datastream(options) diff --git a/lib/schematic/types/account_member_response_data.rb b/lib/schematic/types/account_member_response_data.rb index ce27c06..194ee5e 100644 --- a/lib/schematic/types/account_member_response_data.rb +++ b/lib/schematic/types/account_member_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class AccountMemberResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :email, -> { String }, optional: true, nullable: false + field :first_name, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :image_url, -> { String }, optional: true, nullable: false + field :last_name, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :permissions, -> { Internal::Types::Hash[String, Internal::Types::Array[Schematic::Types::AccountMemberPermission]] }, optional: false, nullable: false + field :role, -> { Schematic::Types::AccountMemberRole }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/activity_entry_response_data.rb b/lib/schematic/types/activity_entry_response_data.rb index 39c7fc9..7c154aa 100644 --- a/lib/schematic/types/activity_entry_response_data.rb +++ b/lib/schematic/types/activity_entry_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class ActivityEntryResponseData < Internal::Types::Model field :actor_name, -> { String }, optional: false, nullable: false + field :method_, -> { String }, optional: false, nullable: false, api_name: "method" + field :resource_name, -> { String }, optional: false, nullable: false + field :resource_type, -> { String }, optional: false, nullable: false + field :timestamp, -> { String }, optional: false, nullable: false + field :title, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/api_key_create_response_data.rb b/lib/schematic/types/api_key_create_response_data.rb index 868c8d8..586924a 100644 --- a/lib/schematic/types/api_key_create_response_data.rb +++ b/lib/schematic/types/api_key_create_response_data.rb @@ -4,17 +4,29 @@ module Schematic module Types class ApiKeyCreateResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: true, nullable: false + field :environment, -> { Schematic::Types::EnvironmentResponseData }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :integration, -> { Schematic::Types::ApiKeyIntegrationResponseData }, optional: true, nullable: false + field :last_used_at, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :rate_limit_percent, -> { Integer }, optional: true, nullable: false + field :readonly, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :scopes, -> { Internal::Types::Array[Schematic::Types::ApiKeyScope] }, optional: false, nullable: false + field :secret, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/api_key_integration_response_data.rb b/lib/schematic/types/api_key_integration_response_data.rb index 059cc1b..b936bb3 100644 --- a/lib/schematic/types/api_key_integration_response_data.rb +++ b/lib/schematic/types/api_key_integration_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class ApiKeyIntegrationResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/api_key_response_data.rb b/lib/schematic/types/api_key_response_data.rb index 1097c8a..ea6e2cb 100644 --- a/lib/schematic/types/api_key_response_data.rb +++ b/lib/schematic/types/api_key_response_data.rb @@ -4,16 +4,27 @@ module Schematic module Types class ApiKeyResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: true, nullable: false + field :environment, -> { Schematic::Types::EnvironmentResponseData }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :integration, -> { Schematic::Types::ApiKeyIntegrationResponseData }, optional: true, nullable: false + field :last_used_at, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :rate_limit_percent, -> { Integer }, optional: true, nullable: false + field :readonly, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :scopes, -> { Internal::Types::Array[Schematic::Types::ApiKeyScope] }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/audit_log_export_metadata.rb b/lib/schematic/types/audit_log_export_metadata.rb index 2748264..d314050 100644 --- a/lib/schematic/types/audit_log_export_metadata.rb +++ b/lib/schematic/types/audit_log_export_metadata.rb @@ -4,9 +4,13 @@ module Schematic module Types class AuditLogExportMetadata < Internal::Types::Model field :actor_type, -> { String }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :notification_email_recipient_email_addresses, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/audit_log_list_response_data.rb b/lib/schematic/types/audit_log_list_response_data.rb index 3ccb144..8150487 100644 --- a/lib/schematic/types/audit_log_list_response_data.rb +++ b/lib/schematic/types/audit_log_list_response_data.rb @@ -4,21 +4,37 @@ module Schematic module Types class AuditLogListResponseData < Internal::Types::Model field :actor_type, -> { Schematic::Types::ActorType }, optional: false, nullable: false + field :api_key, -> { Schematic::Types::ApiKeyResponseData }, optional: true, nullable: false + field :api_key_id, -> { String }, optional: true, nullable: false + field :ended_at, -> { String }, optional: true, nullable: false + field :environment, -> { Schematic::Types::EnvironmentResponseData }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :method_, -> { String }, optional: false, nullable: false, api_name: "method" + field :resource_id, -> { Integer }, optional: true, nullable: false + field :resource_id_string, -> { String }, optional: true, nullable: false + field :resource_name, -> { String }, optional: true, nullable: false + field :resource_type, -> { String }, optional: true, nullable: false + field :resp_code, -> { Integer }, optional: true, nullable: false + field :secondary_resource, -> { String }, optional: true, nullable: false + field :started_at, -> { String }, optional: false, nullable: false + field :url, -> { String }, optional: false, nullable: false + field :user_name, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/audit_log_response_data.rb b/lib/schematic/types/audit_log_response_data.rb index 5c280a9..d5a760e 100644 --- a/lib/schematic/types/audit_log_response_data.rb +++ b/lib/schematic/types/audit_log_response_data.rb @@ -3,25 +3,46 @@ module Schematic module Types class AuditLogResponseData < Internal::Types::Model + field :account_member_id, -> { String }, optional: true, nullable: false + field :actor_type, -> { Schematic::Types::ActorType }, optional: false, nullable: false + field :api_key, -> { Schematic::Types::ApiKeyResponseData }, optional: true, nullable: false + field :api_key_id, -> { String }, optional: true, nullable: false + field :ended_at, -> { String }, optional: true, nullable: false + field :environment, -> { Schematic::Types::EnvironmentResponseData }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :method_, -> { String }, optional: false, nullable: false, api_name: "method" + field :req_body, -> { String }, optional: true, nullable: false + field :resource_id, -> { Integer }, optional: true, nullable: false + field :resource_id_string, -> { String }, optional: true, nullable: false + field :resource_name, -> { String }, optional: true, nullable: false + field :resource_type, -> { String }, optional: true, nullable: false + field :resp_body, -> { String }, optional: true, nullable: false + field :resp_code, -> { Integer }, optional: true, nullable: false + field :secondary_resource, -> { String }, optional: true, nullable: false + field :started_at, -> { String }, optional: false, nullable: false + field :url, -> { String }, optional: false, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :user_name, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/billing_coupon_response_data.rb b/lib/schematic/types/billing_coupon_response_data.rb index 957ec27..d07cb52 100644 --- a/lib/schematic/types/billing_coupon_response_data.rb +++ b/lib/schematic/types/billing_coupon_response_data.rb @@ -4,21 +4,37 @@ module Schematic module Types class BillingCouponResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :amount_off, -> { Integer }, optional: true, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :duration, -> { String }, optional: true, nullable: false + field :duration_in_months, -> { Integer }, optional: true, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :max_redemptions, -> { Integer }, optional: true, nullable: false + field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :percent_off, -> { Integer }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :times_redeemed, -> { Integer }, optional: false, nullable: false + field :valid_from, -> { String }, optional: true, nullable: false + field :valid_until, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/billing_credit_bundle_response_data.rb b/lib/schematic/types/billing_credit_bundle_response_data.rb index 668dbdb..71f0e8f 100644 --- a/lib/schematic/types/billing_credit_bundle_response_data.rb +++ b/lib/schematic/types/billing_credit_bundle_response_data.rb @@ -4,26 +4,47 @@ module Schematic module Types class BillingCreditBundleResponseData < Internal::Types::Model field :billing_invoice_id, -> { String }, optional: true, nullable: false + field :bundle_type, -> { String }, optional: false, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit_description, -> { String }, optional: true, nullable: false + field :credit_icon, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPriceResponseData] }, optional: false, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: false, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: false, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :has_grants, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::BillingCreditBundleStatus }, optional: false, nullable: false + field :unit_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_credit_bundle_view.rb b/lib/schematic/types/billing_credit_bundle_view.rb index 7a8197d..a159d7e 100644 --- a/lib/schematic/types/billing_credit_bundle_view.rb +++ b/lib/schematic/types/billing_credit_bundle_view.rb @@ -4,25 +4,45 @@ module Schematic module Types class BillingCreditBundleView < Internal::Types::Model field :bundle_type, -> { String }, optional: false, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit_description, -> { String }, optional: true, nullable: false + field :credit_icon, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditBundleCurrencyPrice] }, optional: false, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: false, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: false, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :has_grants, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :price, -> { Schematic::Types::BillingProductPriceResponseData }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::BillingCreditBundleStatus }, optional: false, nullable: false + field :unit_price, -> { Schematic::Types::BillingProductPriceResponseData }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_credit_grant_response_data.rb b/lib/schematic/types/billing_credit_grant_response_data.rb index 5bc93be..aa4d551 100644 --- a/lib/schematic/types/billing_credit_grant_response_data.rb +++ b/lib/schematic/types/billing_credit_grant_response_data.rb @@ -4,33 +4,61 @@ module Schematic module Types class BillingCreditGrantResponseData < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :company_license_id, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit_icon, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :expires_at, -> { String }, optional: true, nullable: false + field :grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :license_name, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_name, -> { String }, optional: true, nullable: false + field :price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :quantity_remaining, -> { Integer }, optional: false, nullable: false + field :quantity_used, -> { Integer }, optional: false, nullable: false + field :renewal_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :renewal_period, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false + field :reserved, -> { Integer }, optional: true, nullable: false + field :settled, -> { Integer }, optional: true, nullable: false + field :source_grant_id, -> { String }, optional: true, nullable: false + field :source_label, -> { String }, optional: false, nullable: false + field :transfers, -> { Internal::Types::Array[Schematic::Types::CreditTransferResponseData] }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :valid_from, -> { String }, optional: true, nullable: false + field :zeroed_out_date, -> { String }, optional: true, nullable: false + field :zeroed_out_reason, -> { Schematic::Types::BillingCreditGrantZeroedOutReason }, optional: true, nullable: false end end diff --git a/lib/schematic/types/billing_credit_ledger_response_data.rb b/lib/schematic/types/billing_credit_ledger_response_data.rb index f4d1b30..6ba73ff 100644 --- a/lib/schematic/types/billing_credit_ledger_response_data.rb +++ b/lib/schematic/types/billing_credit_ledger_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class BillingCreditLedgerResponseData < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/billing_credit_response_data.rb b/lib/schematic/types/billing_credit_response_data.rb index 9ddd90d..3f2a37e 100644 --- a/lib/schematic/types/billing_credit_response_data.rb +++ b/lib/schematic/types/billing_credit_response_data.rb @@ -4,20 +4,35 @@ module Schematic module Types class BillingCreditResponseData < Internal::Types::Model field :burn_strategy, -> { Schematic::Types::BillingCreditBurnStrategy }, optional: false, nullable: false + field :cost_editable, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditCurrencyPriceResponseData] }, optional: false, nullable: false + field :default_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: false, nullable: false + field :default_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :default_rollover_policy, -> { Schematic::Types::BillingCreditRolloverPolicy }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :product, -> { Schematic::Types::BillingProductResponseData }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_credit_view.rb b/lib/schematic/types/billing_credit_view.rb index 3132d78..7586a3f 100644 --- a/lib/schematic/types/billing_credit_view.rb +++ b/lib/schematic/types/billing_credit_view.rb @@ -4,25 +4,45 @@ module Schematic module Types class BillingCreditView < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :burn_strategy, -> { Schematic::Types::BillingCreditBurnStrategy }, optional: false, nullable: false + field :cost_editable, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CreditCurrencyPrice] }, optional: false, nullable: false + field :default_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: false, nullable: false + field :default_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :default_rollover_policy, -> { Schematic::Types::BillingCreditRolloverPolicy }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :ledger_authority, -> { Schematic::Types::BillingCreditLedgerAuthority }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :price_per_unit, -> { Integer }, optional: true, nullable: false + field :price_per_unit_decimal, -> { String }, optional: true, nullable: false + field :product, -> { Schematic::Types::BillingProductRecordResponseData }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_customer_response_data.rb b/lib/schematic/types/billing_customer_response_data.rb index d8f8c87..9484ef5 100644 --- a/lib/schematic/types/billing_customer_response_data.rb +++ b/lib/schematic/types/billing_customer_response_data.rb @@ -4,12 +4,19 @@ module Schematic module Types class BillingCustomerResponseData < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :deleted_at, -> { String }, optional: true, nullable: false + field :email, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_customer_subscription.rb b/lib/schematic/types/billing_customer_subscription.rb index bbb5999..9ecf4e4 100644 --- a/lib/schematic/types/billing_customer_subscription.rb +++ b/lib/schematic/types/billing_customer_subscription.rb @@ -4,10 +4,15 @@ module Schematic module Types class BillingCustomerSubscription < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :expired_at, -> { String }, optional: true, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :metered_usage, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :per_unit_price, -> { Integer }, optional: false, nullable: false + field :total_price, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_customer_with_subscriptions_response_data.rb b/lib/schematic/types/billing_customer_with_subscriptions_response_data.rb index 93323a8..f2170bb 100644 --- a/lib/schematic/types/billing_customer_with_subscriptions_response_data.rb +++ b/lib/schematic/types/billing_customer_with_subscriptions_response_data.rb @@ -4,13 +4,21 @@ module Schematic module Types class BillingCustomerWithSubscriptionsResponseData < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :deleted_at, -> { String }, optional: true, nullable: false + field :email, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :subscriptions, -> { Internal::Types::Array[Schematic::Types::BillingCustomerSubscription] }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_linked_resource_response_data.rb b/lib/schematic/types/billing_linked_resource_response_data.rb index 6e7b57d..e716960 100644 --- a/lib/schematic/types/billing_linked_resource_response_data.rb +++ b/lib/schematic/types/billing_linked_resource_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class BillingLinkedResourceResponseData < Internal::Types::Model field :billing_provider, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :external_resource_id, -> { String }, optional: false, nullable: false + field :originator, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_meter_response_data.rb b/lib/schematic/types/billing_meter_response_data.rb index e1601b9..f0d146f 100644 --- a/lib/schematic/types/billing_meter_response_data.rb +++ b/lib/schematic/types/billing_meter_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class BillingMeterResponseData < Internal::Types::Model field :dispaly_name, -> { String }, optional: false, nullable: false + field :event_name, -> { String }, optional: false, nullable: false + field :event_payload_key, -> { String }, optional: false, nullable: false + field :external_price_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_plan_credit_grant_response_data.rb b/lib/schematic/types/billing_plan_credit_grant_response_data.rb index 6a0a9a3..72c8404 100644 --- a/lib/schematic/types/billing_plan_credit_grant_response_data.rb +++ b/lib/schematic/types/billing_plan_credit_grant_response_data.rb @@ -4,38 +4,71 @@ module Schematic module Types class BillingPlanCreditGrantResponseData < Internal::Types::Model field :auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: false, nullable: false + field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :auto_topup_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :auto_topup_self_service, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false + field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_credit_amount, -> { Integer }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit, -> { Schematic::Types::BillingCreditResponseData }, optional: true, nullable: false + field :credit_amount, -> { Integer }, optional: false, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :credit_plural_name, -> { String }, optional: true, nullable: false + field :credit_singular_name, -> { String }, optional: true, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false + field :plan, -> { Schematic::Types::PreviewObjectResponseData }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_name, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false + field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false + field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false + field :rollover_percentage, -> { Integer }, optional: false, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_price_response_data.rb b/lib/schematic/types/billing_price_response_data.rb index f90048c..05da903 100644 --- a/lib/schematic/types/billing_price_response_data.rb +++ b/lib/schematic/types/billing_price_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class BillingPriceResponseData < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :external_price_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :interval, -> { Schematic::Types::BillingProductPriceInterval }, optional: false, nullable: false + field :interval_count, -> { Integer }, optional: false, nullable: false + field :nickname, -> { String }, optional: true, nullable: false + field :price, -> { Integer }, optional: false, nullable: false + field :price_decimal, -> { String }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :scheme, -> { Schematic::Types::BillingPriceScheme }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_price_view.rb b/lib/schematic/types/billing_price_view.rb index c4966b0..e758187 100644 --- a/lib/schematic/types/billing_price_view.rb +++ b/lib/schematic/types/billing_price_view.rb @@ -4,28 +4,51 @@ module Schematic module Types class BillingPriceView < Internal::Types::Model field :billing_scheme, -> { Schematic::Types::BillingPriceScheme }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :interval, -> { Schematic::Types::BillingProductPriceInterval }, optional: false, nullable: false + field :interval_count, -> { Integer }, optional: false, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :meter_event_name, -> { String }, optional: true, nullable: false + field :meter_event_payload_key, -> { String }, optional: true, nullable: false + field :meter_id, -> { String }, optional: true, nullable: false + field :nickname, -> { String }, optional: true, nullable: false + field :package_size, -> { Integer }, optional: false, nullable: false + field :price, -> { Integer }, optional: false, nullable: false + field :price_decimal, -> { String }, optional: true, nullable: false + field :price_external_id, -> { String }, optional: false, nullable: false + field :price_id, -> { String }, optional: false, nullable: false + field :price_tier, -> { Internal::Types::Array[Schematic::Types::BillingProductPriceTierResponseData] }, optional: false, nullable: false + field :product_external_id, -> { String }, optional: false, nullable: false + field :product_id, -> { String }, optional: false, nullable: false + field :product_name, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :tiers_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_product_detail_response_data.rb b/lib/schematic/types/billing_product_detail_response_data.rb index 8da8461..417018e 100644 --- a/lib/schematic/types/billing_product_detail_response_data.rb +++ b/lib/schematic/types/billing_product_detail_response_data.rb @@ -4,19 +4,33 @@ module Schematic module Types class BillingProductDetailResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :price, -> { Integer }, optional: false, nullable: false + field :price_decimal, -> { String }, optional: true, nullable: false + field :prices, -> { Internal::Types::Array[Schematic::Types::BillingPriceResponseData] }, optional: false, nullable: false + field :product_id, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :subscription_count, -> { Integer }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_product_for_subscription_response_data.rb b/lib/schematic/types/billing_product_for_subscription_response_data.rb index d64ac9d..1a29dfb 100644 --- a/lib/schematic/types/billing_product_for_subscription_response_data.rb +++ b/lib/schematic/types/billing_product_for_subscription_response_data.rb @@ -4,27 +4,49 @@ module Schematic module Types class BillingProductForSubscriptionResponseData < Internal::Types::Model field :billing_scheme, -> { Schematic::Types::BillingPriceScheme }, optional: false, nullable: false + field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :interval_count, -> { Integer }, optional: true, nullable: false + field :meter_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :package_size, -> { Integer }, optional: false, nullable: false + field :price, -> { Integer }, optional: false, nullable: false + field :price_decimal, -> { String }, optional: true, nullable: false + field :price_external_id, -> { String }, optional: false, nullable: false + field :price_id, -> { String }, optional: false, nullable: false + field :price_tier, -> { Internal::Types::Array[Schematic::Types::BillingProductPriceTierResponseData] }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :subscription_id, -> { String }, optional: false, nullable: false + field :subscription_item_external_id, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_product_plan_response_data.rb b/lib/schematic/types/billing_product_plan_response_data.rb index ae0161a..4a5d0b7 100644 --- a/lib/schematic/types/billing_product_plan_response_data.rb +++ b/lib/schematic/types/billing_product_plan_response_data.rb @@ -4,16 +4,27 @@ module Schematic module Types class BillingProductPlanResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :billing_product_id, -> { String }, optional: false, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false + field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :monthly_price_id, -> { String }, optional: true, nullable: false + field :one_time_price_id, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :yearly_price_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/billing_product_price_response_data.rb b/lib/schematic/types/billing_product_price_response_data.rb index 50f452f..45e7ab0 100644 --- a/lib/schematic/types/billing_product_price_response_data.rb +++ b/lib/schematic/types/billing_product_price_response_data.rb @@ -4,22 +4,39 @@ module Schematic module Types class BillingProductPriceResponseData < Internal::Types::Model field :billing_scheme, -> { Schematic::Types::BillingPriceScheme }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :interval, -> { Schematic::Types::BillingProductPriceInterval }, optional: false, nullable: false + field :interval_count, -> { Integer }, optional: false, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :meter_id, -> { String }, optional: true, nullable: false + field :nickname, -> { String }, optional: true, nullable: false + field :package_size, -> { Integer }, optional: false, nullable: false + field :price, -> { Integer }, optional: false, nullable: false + field :price_decimal, -> { String }, optional: true, nullable: false + field :price_external_id, -> { String }, optional: false, nullable: false + field :product_external_id, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :tiers_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_product_price_tier_response_data.rb b/lib/schematic/types/billing_product_price_tier_response_data.rb index 4602e6c..2039adc 100644 --- a/lib/schematic/types/billing_product_price_tier_response_data.rb +++ b/lib/schematic/types/billing_product_price_tier_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class BillingProductPriceTierResponseData < Internal::Types::Model field :flat_amount, -> { Integer }, optional: true, nullable: false + field :per_unit_price, -> { Integer }, optional: true, nullable: false + field :per_unit_price_decimal, -> { String }, optional: true, nullable: false + field :up_to, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/types/billing_product_pricing.rb b/lib/schematic/types/billing_product_pricing.rb index eb43c7a..e9d072a 100644 --- a/lib/schematic/types/billing_product_pricing.rb +++ b/lib/schematic/types/billing_product_pricing.rb @@ -4,16 +4,27 @@ module Schematic module Types class BillingProductPricing < Internal::Types::Model field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :meter_id, -> { String }, optional: true, nullable: false + field :package_size, -> { Integer }, optional: true, nullable: false + field :price, -> { Integer }, optional: false, nullable: false + field :price_decimal, -> { String }, optional: true, nullable: false + field :price_external_id, -> { String }, optional: false, nullable: false + field :product_external_id, -> { String }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :subscription_item_external_id, -> { String }, optional: true, nullable: false + field :usage_type, -> { Schematic::Types::BillingPriceUsageType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_product_record_response_data.rb b/lib/schematic/types/billing_product_record_response_data.rb index 9b53e82..dced24d 100644 --- a/lib/schematic/types/billing_product_record_response_data.rb +++ b/lib/schematic/types/billing_product_record_response_data.rb @@ -4,13 +4,21 @@ module Schematic module Types class BillingProductRecordResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_product_response_data.rb b/lib/schematic/types/billing_product_response_data.rb index a04a536..0039ebd 100644 --- a/lib/schematic/types/billing_product_response_data.rb +++ b/lib/schematic/types/billing_product_response_data.rb @@ -4,17 +4,29 @@ module Schematic module Types class BillingProductResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :price, -> { Integer }, optional: false, nullable: false + field :price_decimal, -> { String }, optional: true, nullable: false + field :product_id, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_subscription_discount.rb b/lib/schematic/types/billing_subscription_discount.rb index 0ac9acc..8d92864 100644 --- a/lib/schematic/types/billing_subscription_discount.rb +++ b/lib/schematic/types/billing_subscription_discount.rb @@ -4,11 +4,17 @@ module Schematic module Types class BillingSubscriptionDiscount < Internal::Types::Model field :coupon_external_id, -> { String }, optional: false, nullable: false + field :customer_facing_code, -> { String }, optional: true, nullable: false + field :ended_at, -> { String }, optional: true, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :promo_code_external_id, -> { String }, optional: true, nullable: false + field :started_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_subscription_discount_view.rb b/lib/schematic/types/billing_subscription_discount_view.rb index 77751fb..d0b6fbb 100644 --- a/lib/schematic/types/billing_subscription_discount_view.rb +++ b/lib/schematic/types/billing_subscription_discount_view.rb @@ -4,18 +4,31 @@ module Schematic module Types class BillingSubscriptionDiscountView < Internal::Types::Model field :amount_off, -> { Integer }, optional: true, nullable: false + field :coupon_id, -> { String }, optional: false, nullable: false + field :coupon_name, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :customer_facing_code, -> { String }, optional: true, nullable: false + field :discount_external_id, -> { String }, optional: false, nullable: false + field :duration, -> { String }, optional: false, nullable: false + field :duration_in_months, -> { Integer }, optional: true, nullable: false + field :ended_at, -> { String }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :percent_off, -> { Integer }, optional: true, nullable: false + field :promo_code_external_id, -> { String }, optional: true, nullable: false + field :started_at, -> { String }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/billing_subscription_response_data.rb b/lib/schematic/types/billing_subscription_response_data.rb index 0a28053..8881dc5 100644 --- a/lib/schematic/types/billing_subscription_response_data.rb +++ b/lib/schematic/types/billing_subscription_response_data.rb @@ -4,24 +4,43 @@ module Schematic module Types class BillingSubscriptionResponseData < Internal::Types::Model field :application_id, -> { String }, optional: true, nullable: false + field :cancel_at, -> { Integer }, optional: true, nullable: false + field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :default_payment_method_id, -> { String }, optional: true, nullable: false + field :expired_at, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :period_end, -> { Integer }, optional: false, nullable: false + field :period_start, -> { Integer }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :status, -> { String }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: false, nullable: false + field :total_price, -> { Integer }, optional: false, nullable: false + field :trial_end, -> { Integer }, optional: true, nullable: false + field :trial_end_setting, -> { Schematic::Types::BillingSubscriptionTrialEndSetting }, optional: true, nullable: false end end diff --git a/lib/schematic/types/billing_subscription_view.rb b/lib/schematic/types/billing_subscription_view.rb index ed16eb9..03a22d1 100644 --- a/lib/schematic/types/billing_subscription_view.rb +++ b/lib/schematic/types/billing_subscription_view.rb @@ -4,28 +4,51 @@ module Schematic module Types class BillingSubscriptionView < Internal::Types::Model field :application_id, -> { String }, optional: true, nullable: false + field :cancel_at, -> { Integer }, optional: true, nullable: false + field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :default_payment_method_id, -> { String }, optional: true, nullable: false + field :discounts, -> { Internal::Types::Array[Schematic::Types::BillingSubscriptionDiscountView] }, optional: false, nullable: false + field :expired_at, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :latest_invoice, -> { Schematic::Types::InvoiceResponseData }, optional: true, nullable: false + field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :payment_method, -> { Schematic::Types::PaymentMethodResponseData }, optional: true, nullable: false + field :period_end, -> { Integer }, optional: false, nullable: false + field :period_start, -> { Integer }, optional: false, nullable: false + field :products, -> { Internal::Types::Array[Schematic::Types::BillingProductForSubscriptionResponseData] }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :status, -> { String }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: false, nullable: false + field :total_price, -> { Integer }, optional: false, nullable: false + field :trial_end, -> { Integer }, optional: true, nullable: false + field :trial_end_setting, -> { Schematic::Types::BillingSubscriptionTrialEndSetting }, optional: true, nullable: false end end diff --git a/lib/schematic/types/capture_raw_event.rb b/lib/schematic/types/capture_raw_event.rb index 05dbd3e..baf500b 100644 --- a/lib/schematic/types/capture_raw_event.rb +++ b/lib/schematic/types/capture_raw_event.rb @@ -4,9 +4,13 @@ module Schematic module Types class CaptureRawEvent < Internal::Types::Model field :captured_at, -> { String }, optional: false, nullable: false + field :event_id, -> { String }, optional: true, nullable: false + field :raw_bytes, -> { String }, optional: false, nullable: false + field :remote_ip, -> { String }, optional: false, nullable: false + field :user_agent, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/catalog_config_ordered_entitlement.rb b/lib/schematic/types/catalog_config_ordered_entitlement.rb index ddaa6de..cb842ba 100644 --- a/lib/schematic/types/catalog_config_ordered_entitlement.rb +++ b/lib/schematic/types/catalog_config_ordered_entitlement.rb @@ -4,6 +4,7 @@ module Schematic module Types class CatalogConfigOrderedEntitlement < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :visible, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb b/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb index c9f15c2..2f3bc37 100644 --- a/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb +++ b/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class CatalogConfigOrderedEntitlementResponseData < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :visible, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/catalog_config_ordered_plan.rb b/lib/schematic/types/catalog_config_ordered_plan.rb index 12900ba..86dcb70 100644 --- a/lib/schematic/types/catalog_config_ordered_plan.rb +++ b/lib/schematic/types/catalog_config_ordered_plan.rb @@ -4,6 +4,7 @@ module Schematic module Types class CatalogConfigOrderedPlan < Internal::Types::Model field :entitlements, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedEntitlement] }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/catalog_config_ordered_plan_response_data.rb b/lib/schematic/types/catalog_config_ordered_plan_response_data.rb index 038b734..a1682df 100644 --- a/lib/schematic/types/catalog_config_ordered_plan_response_data.rb +++ b/lib/schematic/types/catalog_config_ordered_plan_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class CatalogConfigOrderedPlanResponseData < Internal::Types::Model field :entitlements, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedEntitlementResponseData] }, optional: false, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/catalog_configuration_response_data.rb b/lib/schematic/types/catalog_configuration_response_data.rb index 5f98998..2e75a5e 100644 --- a/lib/schematic/types/catalog_configuration_response_data.rb +++ b/lib/schematic/types/catalog_configuration_response_data.rb @@ -4,15 +4,25 @@ module Schematic module Types class CatalogConfigurationResponseData < Internal::Types::Model field :add_ons, -> { Internal::Types::Array[Schematic::Types::PlanGroupPlanDetailResponseData] }, optional: false, nullable: false + field :custom_plan_cta_text, -> { String }, optional: true, nullable: false + field :custom_plan_cta_url, -> { String }, optional: true, nullable: false + field :custom_plan_price_text, -> { String }, optional: true, nullable: false + field :custom_plans_visible, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :ordered_add_ons, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedPlanResponseData] }, optional: false, nullable: false + field :ordered_bundles, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedBundleResponseData] }, optional: false, nullable: false + field :ordered_plans, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedPlanResponseData] }, optional: false, nullable: false + field :plans, -> { Internal::Types::Array[Schematic::Types::PlanGroupPlanDetailResponseData] }, optional: false, nullable: false + field :pricing_model, -> { String }, optional: true, nullable: false + field :pricing_url, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/catalog_derived_feature_response_data.rb b/lib/schematic/types/catalog_derived_feature_response_data.rb index 3ca905c..8e7a733 100644 --- a/lib/schematic/types/catalog_derived_feature_response_data.rb +++ b/lib/schematic/types/catalog_derived_feature_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class CatalogDerivedFeatureResponseData < Internal::Types::Model field :icon, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/catalog_response_data.rb b/lib/schematic/types/catalog_response_data.rb index 6bb93db..bd94e1d 100644 --- a/lib/schematic/types/catalog_response_data.rb +++ b/lib/schematic/types/catalog_response_data.rb @@ -4,17 +4,29 @@ module Schematic module Types class CatalogResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :custom_plan_cta_text, -> { String }, optional: true, nullable: false + field :custom_plan_cta_url, -> { String }, optional: true, nullable: false + field :custom_plan_price_text, -> { String }, optional: true, nullable: false + field :custom_plans_visible, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :description, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :pricing_model, -> { String }, optional: true, nullable: false + field :pricing_url, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/change_subscription_internal_request_body.rb b/lib/schematic/types/change_subscription_internal_request_body.rb index 6273b3b..4452911 100644 --- a/lib/schematic/types/change_subscription_internal_request_body.rb +++ b/lib/schematic/types/change_subscription_internal_request_body.rb @@ -4,18 +4,31 @@ module Schematic module Types class ChangeSubscriptionInternalRequestBody < Internal::Types::Model field :add_on_ids, -> { Internal::Types::Array[Schematic::Types::UpdateAddOnRequestBody] }, optional: false, nullable: false + field :auto_topup_overrides, -> { Internal::Types::Array[Schematic::Types::UpdateAutoTopupOverrideRequestBody] }, optional: false, nullable: false + field :billing_entity_id, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :coupon_external_id, -> { String }, optional: true, nullable: false + field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false + field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false + field :new_plan_id, -> { String }, optional: false, nullable: false + field :new_price_id, -> { String }, optional: false, nullable: false + field :opt_in_accepted, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :pay_in_advance, -> { Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody] }, optional: false, nullable: false + field :payment_method_id, -> { String }, optional: true, nullable: false + field :promo_code, -> { String }, optional: true, nullable: false + field :skip_trial, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/change_subscription_request_body.rb b/lib/schematic/types/change_subscription_request_body.rb index 38c70ae..b7286ca 100644 --- a/lib/schematic/types/change_subscription_request_body.rb +++ b/lib/schematic/types/change_subscription_request_body.rb @@ -4,17 +4,29 @@ module Schematic module Types class ChangeSubscriptionRequestBody < Internal::Types::Model field :add_on_ids, -> { Internal::Types::Array[Schematic::Types::UpdateAddOnRequestBody] }, optional: false, nullable: false + field :auto_topup_overrides, -> { Internal::Types::Array[Schematic::Types::UpdateAutoTopupOverrideRequestBody] }, optional: false, nullable: false + field :billing_entity_id, -> { String }, optional: true, nullable: false + field :coupon_external_id, -> { String }, optional: true, nullable: false + field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false + field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false + field :new_plan_id, -> { String }, optional: false, nullable: false + field :new_price_id, -> { String }, optional: false, nullable: false + field :opt_in_accepted, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :pay_in_advance, -> { Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody] }, optional: false, nullable: false + field :payment_method_id, -> { String }, optional: true, nullable: false + field :promo_code, -> { String }, optional: true, nullable: false + field :skip_trial, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/check_flag_request_body.rb b/lib/schematic/types/check_flag_request_body.rb index a7f4927..4d50ac3 100644 --- a/lib/schematic/types/check_flag_request_body.rb +++ b/lib/schematic/types/check_flag_request_body.rb @@ -4,6 +4,9 @@ module Schematic module Types class CheckFlagRequestBody < Internal::Types::Model field :company, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + + field :preflight, -> { Schematic::Types::PreflightRequestBody }, optional: true, nullable: false + field :user, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false end end diff --git a/lib/schematic/types/check_flag_response_data.rb b/lib/schematic/types/check_flag_response_data.rb index f274c03..1d5df57 100644 --- a/lib/schematic/types/check_flag_response_data.rb +++ b/lib/schematic/types/check_flag_response_data.rb @@ -4,19 +4,33 @@ module Schematic module Types class CheckFlagResponseData < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :entitlement, -> { Schematic::Types::FeatureEntitlement }, optional: true, nullable: false + field :error, -> { String }, optional: true, nullable: false + field :feature_allocation, -> { Integer }, optional: true, nullable: false + field :feature_usage, -> { Integer }, optional: true, nullable: false + field :feature_usage_event, -> { String }, optional: true, nullable: false + field :feature_usage_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :feature_usage_reset_at, -> { String }, optional: true, nullable: false + field :flag, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :reason, -> { String }, optional: false, nullable: false + field :rule_id, -> { String }, optional: true, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/check_flags_response_data.rb b/lib/schematic/types/check_flags_response_data.rb index 8e3da0e..9bc6413 100644 --- a/lib/schematic/types/check_flags_response_data.rb +++ b/lib/schematic/types/check_flags_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class CheckFlagsResponseData < Internal::Types::Model field :credit_balances, -> { Internal::Types::Hash[String, Schematic::Types::CompanyCreditBalance] }, optional: true, nullable: false + field :flags, -> { Internal::Types::Array[Schematic::Types::CheckFlagResponseData] }, optional: false, nullable: false + field :plan, -> { Schematic::Types::DatastreamCompanyPlan }, optional: true, nullable: false end end diff --git a/lib/schematic/types/checkout_data_response_data.rb b/lib/schematic/types/checkout_data_response_data.rb index a95bec5..b59dcc9 100644 --- a/lib/schematic/types/checkout_data_response_data.rb +++ b/lib/schematic/types/checkout_data_response_data.rb @@ -4,15 +4,25 @@ module Schematic module Types class CheckoutDataResponseData < Internal::Types::Model field :active_add_ons, -> { Internal::Types::Array[Schematic::Types::PlanDetailResponseData] }, optional: false, nullable: false + field :active_plan, -> { Schematic::Types::PlanDetailResponseData }, optional: true, nullable: false + field :active_usage_based_entitlements, -> { Internal::Types::Array[Schematic::Types::UsageBasedEntitlementResponseData] }, optional: false, nullable: false + field :available_credit_bundles, -> { Internal::Types::Array[Schematic::Types::BillingCreditBundleResponseData] }, optional: false, nullable: false + field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false + field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false + field :feature_usage, -> { Schematic::Types::FeatureUsageDetailResponseData }, optional: true, nullable: false + field :selected_credit_bundles, -> { Internal::Types::Array[Schematic::Types::CreditBundlePurchaseResponseData] }, optional: false, nullable: false + field :selected_plan, -> { Schematic::Types::PlanDetailResponseData }, optional: true, nullable: false + field :selected_usage_based_entitlements, -> { Internal::Types::Array[Schematic::Types::UsageBasedEntitlementResponseData] }, optional: false, nullable: false + field :subscription, -> { Schematic::Types::CompanySubscriptionResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/checkout_field_input.rb b/lib/schematic/types/checkout_field_input.rb index a7f985c..8a089ca 100644 --- a/lib/schematic/types/checkout_field_input.rb +++ b/lib/schematic/types/checkout_field_input.rb @@ -4,10 +4,15 @@ module Schematic module Types class CheckoutFieldInput < Internal::Types::Model field :definition_id, -> { String }, optional: true, nullable: false + field :helper_text, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :required, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :stripe_metadata_key, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/checkout_field_response_data.rb b/lib/schematic/types/checkout_field_response_data.rb index 64bfaf6..18910a8 100644 --- a/lib/schematic/types/checkout_field_response_data.rb +++ b/lib/schematic/types/checkout_field_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class CheckoutFieldResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :definition_id, -> { String }, optional: false, nullable: false + field :helper_text, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :position, -> { Integer }, optional: false, nullable: false + field :required, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :stripe_metadata_key, -> { String }, optional: false, nullable: false + field :trait_hierarchy, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/checkout_field_value.rb b/lib/schematic/types/checkout_field_value.rb index 8da8eaa..fd7c5f3 100644 --- a/lib/schematic/types/checkout_field_value.rb +++ b/lib/schematic/types/checkout_field_value.rb @@ -4,6 +4,7 @@ module Schematic module Types class CheckoutFieldValue < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/checkout_field_with_value.rb b/lib/schematic/types/checkout_field_with_value.rb index 66777e8..1b169a3 100644 --- a/lib/schematic/types/checkout_field_with_value.rb +++ b/lib/schematic/types/checkout_field_with_value.rb @@ -4,11 +4,17 @@ module Schematic module Types class CheckoutFieldWithValue < Internal::Types::Model field :definition_id, -> { String }, optional: false, nullable: false + field :helper_text, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :required, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :stripe_metadata_key, -> { String }, optional: false, nullable: false + field :value, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/checkout_settings_response_data.rb b/lib/schematic/types/checkout_settings_response_data.rb index a427b68..f5193c8 100644 --- a/lib/schematic/types/checkout_settings_response_data.rb +++ b/lib/schematic/types/checkout_settings_response_data.rb @@ -4,12 +4,19 @@ module Schematic module Types class CheckoutSettingsResponseData < Internal::Types::Model field :bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false + field :collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :opt_in_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :opt_in_text, -> { String }, optional: true, nullable: false + field :opt_in_title, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/checkout_subscription.rb b/lib/schematic/types/checkout_subscription.rb index a2cee6b..7afa52d 100644 --- a/lib/schematic/types/checkout_subscription.rb +++ b/lib/schematic/types/checkout_subscription.rb @@ -4,28 +4,51 @@ module Schematic module Types class CheckoutSubscription < Internal::Types::Model field :application_id, -> { String }, optional: true, nullable: false + field :cancel_at, -> { Integer }, optional: true, nullable: false + field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :confirm_payment_intent_client_secret, -> { String }, optional: true, nullable: false + field :confirm_payment_intent_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :default_payment_method_id, -> { String }, optional: true, nullable: false + field :expired_at, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :invoice_id, -> { String }, optional: true, nullable: false + field :invoice_url, -> { String }, optional: true, nullable: false + field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :period_end, -> { Integer }, optional: false, nullable: false + field :period_start, -> { Integer }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :status, -> { String }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: false, nullable: false + field :total_price, -> { Integer }, optional: false, nullable: false + field :trial_end, -> { Integer }, optional: true, nullable: false + field :trial_end_setting, -> { Schematic::Types::BillingSubscriptionTrialEndSetting }, optional: true, nullable: false end end diff --git a/lib/schematic/types/clerk_integration_config.rb b/lib/schematic/types/clerk_integration_config.rb index 4d8713a..cd22fb5 100644 --- a/lib/schematic/types/clerk_integration_config.rb +++ b/lib/schematic/types/clerk_integration_config.rb @@ -4,6 +4,7 @@ module Schematic module Types class ClerkIntegrationConfig < Internal::Types::Model field :first_events_received, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :webhook_url, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/company_billing_address_view.rb b/lib/schematic/types/company_billing_address_view.rb index b6901d4..e4d5514 100644 --- a/lib/schematic/types/company_billing_address_view.rb +++ b/lib/schematic/types/company_billing_address_view.rb @@ -4,10 +4,15 @@ module Schematic module Types class CompanyBillingAddressView < Internal::Types::Model field :city, -> { String }, optional: false, nullable: false + field :country, -> { String }, optional: false, nullable: false + field :line_1, -> { String }, optional: false, nullable: false, api_name: "line1" + field :line_2, -> { String }, optional: false, nullable: false, api_name: "line2" + field :postal_code, -> { String }, optional: false, nullable: false + field :state, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_billing_checkout_settings.rb b/lib/schematic/types/company_billing_checkout_settings.rb index b372c4c..bbe521c 100644 --- a/lib/schematic/types/company_billing_checkout_settings.rb +++ b/lib/schematic/types/company_billing_checkout_settings.rb @@ -4,8 +4,11 @@ module Schematic module Types class CompanyBillingCheckoutSettings < Internal::Types::Model field :collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_billing_details_response_data.rb b/lib/schematic/types/company_billing_details_response_data.rb index 6364343..d1bd427 100644 --- a/lib/schematic/types/company_billing_details_response_data.rb +++ b/lib/schematic/types/company_billing_details_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class CompanyBillingDetailsResponseData < Internal::Types::Model field :address, -> { Schematic::Types::CompanyBillingAddressView }, optional: true, nullable: false + field :checkout_settings, -> { Schematic::Types::CompanyBillingCheckoutSettings }, optional: false, nullable: false + field :custom_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false + field :email, -> { String }, optional: true, nullable: false + field :phone, -> { String }, optional: true, nullable: false + field :tax_ids, -> { Internal::Types::Array[Schematic::Types::CompanyTaxIdView] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_billing_details_view.rb b/lib/schematic/types/company_billing_details_view.rb index 3910fb3..0955c5d 100644 --- a/lib/schematic/types/company_billing_details_view.rb +++ b/lib/schematic/types/company_billing_details_view.rb @@ -4,10 +4,15 @@ module Schematic module Types class CompanyBillingDetailsView < Internal::Types::Model field :address, -> { Schematic::Types::CompanyBillingAddressView }, optional: true, nullable: false + field :checkout_settings, -> { Schematic::Types::CompanyBillingCheckoutSettings }, optional: false, nullable: false + field :custom_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false + field :email, -> { String }, optional: true, nullable: false + field :phone, -> { String }, optional: true, nullable: false + field :tax_ids, -> { Internal::Types::Array[Schematic::Types::CompanyTaxIdView] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_billing_entity_response_data.rb b/lib/schematic/types/company_billing_entity_response_data.rb index 936bd92..883310b 100644 --- a/lib/schematic/types/company_billing_entity_response_data.rb +++ b/lib/schematic/types/company_billing_entity_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class CompanyBillingEntityResponseData < Internal::Types::Model field :billing_entity, -> { Schematic::Types::CompanyResponseData }, optional: true, nullable: false + field :has_own_stripe_customer, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_billing_entity_subscription_response_data.rb b/lib/schematic/types/company_billing_entity_subscription_response_data.rb index 676f898..fb258d5 100644 --- a/lib/schematic/types/company_billing_entity_subscription_response_data.rb +++ b/lib/schematic/types/company_billing_entity_subscription_response_data.rb @@ -4,22 +4,39 @@ module Schematic module Types class CompanyBillingEntitySubscriptionResponseData < Internal::Types::Model field :cancel_at, -> { String }, optional: true, nullable: false + field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company, -> { Schematic::Types::CompanyResponseData }, optional: true, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :discounts, -> { Internal::Types::Array[Schematic::Types::BillingSubscriptionDiscountView] }, optional: false, nullable: false + field :expired_at, -> { String }, optional: true, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :is_initial, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :latest_invoice, -> { Schematic::Types::InvoiceResponseData }, optional: true, nullable: false + field :payment_method, -> { Schematic::Types::PaymentMethodResponseData }, optional: true, nullable: false + field :plan_name, -> { String }, optional: false, nullable: false + field :products, -> { Internal::Types::Array[Schematic::Types::BillingProductForSubscriptionResponseData] }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :status, -> { String }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: false, nullable: false + field :total_price, -> { Integer }, optional: false, nullable: false + field :trial_end, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/company_credit_balance.rb b/lib/schematic/types/company_credit_balance.rb index 80aeba8..5638ca2 100644 --- a/lib/schematic/types/company_credit_balance.rb +++ b/lib/schematic/types/company_credit_balance.rb @@ -4,7 +4,9 @@ module Schematic module Types class CompanyCreditBalance < Internal::Types::Model field :remaining, -> { Integer }, optional: false, nullable: false + field :reserved, -> { Integer }, optional: false, nullable: false + field :settled, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_credit_balance_response_data.rb b/lib/schematic/types/company_credit_balance_response_data.rb index dbac71c..9336fcd 100644 --- a/lib/schematic/types/company_credit_balance_response_data.rb +++ b/lib/schematic/types/company_credit_balance_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class CompanyCreditBalanceResponseData < Internal::Types::Model field :credit_id, -> { String }, optional: false, nullable: false + field :remaining, -> { Integer }, optional: false, nullable: false + field :reserved, -> { Integer }, optional: false, nullable: false + field :settled, -> { Integer }, optional: false, nullable: false + field :source, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :total, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/types/company_detail_response_data.rb b/lib/schematic/types/company_detail_response_data.rb index 623dde9..36e269e 100644 --- a/lib/schematic/types/company_detail_response_data.rb +++ b/lib/schematic/types/company_detail_response_data.rb @@ -4,28 +4,51 @@ module Schematic module Types class CompanyDetailResponseData < Internal::Types::Model field :add_ons, -> { Internal::Types::Array[Schematic::Types::CompanyPlanWithBillingSubView] }, optional: false, nullable: false + field :billing_credit_balances, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false + field :billing_subscription, -> { Schematic::Types::BillingSubscriptionView }, optional: true, nullable: false + field :billing_subscriptions, -> { Internal::Types::Array[Schematic::Types::BillingSubscriptionView] }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :custom_plan_billings, -> { Internal::Types::Array[Schematic::Types::CustomPlanBillingResponseData] }, optional: false, nullable: false + field :default_payment_method, -> { Schematic::Types::PaymentMethodResponseData }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::FeatureEntitlement] }, optional: false, nullable: false + field :entity_traits, -> { Internal::Types::Array[Schematic::Types::EntityTraitDetailResponseData] }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :keys, -> { Internal::Types::Array[Schematic::Types::EntityKeyDetailResponseData] }, optional: false, nullable: false + field :last_seen_at, -> { String }, optional: true, nullable: false + field :logo_url, -> { String }, optional: true, nullable: false + field :metrics, -> { Internal::Types::Array[Schematic::Types::CompanyEventPeriodMetricsResponseData] }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :payment_methods, -> { Internal::Types::Array[Schematic::Types::PaymentMethodResponseData] }, optional: false, nullable: false + field :plan, -> { Schematic::Types::CompanyPlanWithBillingSubView }, optional: true, nullable: false + field :plans, -> { Internal::Types::Array[Schematic::Types::GenericPreviewObject] }, optional: false, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::Rule] }, optional: false, nullable: false + field :scheduled_downgrade, -> { Schematic::Types::ScheduledDowngradeResponseData }, optional: true, nullable: false + field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :user_count, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_event_period_metrics_response_data.rb b/lib/schematic/types/company_event_period_metrics_response_data.rb index fc2c37a..18ef7a4 100644 --- a/lib/schematic/types/company_event_period_metrics_response_data.rb +++ b/lib/schematic/types/company_event_period_metrics_response_data.rb @@ -4,15 +4,25 @@ module Schematic module Types class CompanyEventPeriodMetricsResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :captured_at_max, -> { String }, optional: false, nullable: false + field :captured_at_min, -> { String }, optional: false, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: false, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: false, nullable: false + field :period, -> { Schematic::Types::MetricPeriod }, optional: false, nullable: false + field :valid_until, -> { String }, optional: true, nullable: false + field :value, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_feature_usage_export_metadata.rb b/lib/schematic/types/company_feature_usage_export_metadata.rb index d5fac9f..6d8b975 100644 --- a/lib/schematic/types/company_feature_usage_export_metadata.rb +++ b/lib/schematic/types/company_feature_usage_export_metadata.rb @@ -4,26 +4,49 @@ module Schematic module Types class CompanyFeatureUsageExportMetadata < Internal::Types::Model field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :credit_type_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :entity_key_definition_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :entity_trait_definition_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :feature_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :notification_email_recipient_email_addresses, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + + field :plan_version_unpublished, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :sort_order_column, -> { String }, optional: true, nullable: false + field :sort_order_direction, -> { Schematic::Types::CompanyFeatureUsageExportMetadataSortOrderDirection }, optional: true, nullable: false + field :subscription_statuses, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :subscription_types, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :visible_columns, -> { Internal::Types::Array[Schematic::Types::CompanyFeatureUsageExportMetadataVisibleColumnsItem] }, optional: true, nullable: false + field :with_entitlement_for, -> { String }, optional: true, nullable: false + field :with_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_feature_override_for, -> { String }, optional: true, nullable: false + field :without_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :without_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/company_ledger_response_data.rb b/lib/schematic/types/company_ledger_response_data.rb index b806396..4bfb17f 100644 --- a/lib/schematic/types/company_ledger_response_data.rb +++ b/lib/schematic/types/company_ledger_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class CompanyLedgerResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :logo_url, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_membership_detail_response_data.rb b/lib/schematic/types/company_membership_detail_response_data.rb index b51ca60..86da9a0 100644 --- a/lib/schematic/types/company_membership_detail_response_data.rb +++ b/lib/schematic/types/company_membership_detail_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class CompanyMembershipDetailResponseData < Internal::Types::Model field :company, -> { Schematic::Types::CompanyResponseData }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :user_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_membership_response_data.rb b/lib/schematic/types/company_membership_response_data.rb index 382289d..8403323 100644 --- a/lib/schematic/types/company_membership_response_data.rb +++ b/lib/schematic/types/company_membership_response_data.rb @@ -4,9 +4,13 @@ module Schematic module Types class CompanyMembershipResponseData < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :user_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_override_note_response_data.rb b/lib/schematic/types/company_override_note_response_data.rb index ead7623..329d175 100644 --- a/lib/schematic/types/company_override_note_response_data.rb +++ b/lib/schematic/types/company_override_note_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class CompanyOverrideNoteResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :external_user_id, -> { String }, optional: false, nullable: false + field :external_user_name, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :note, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_override_response_data.rb b/lib/schematic/types/company_override_response_data.rb index 0aea964..b3b722f 100644 --- a/lib/schematic/types/company_override_response_data.rb +++ b/lib/schematic/types/company_override_response_data.rb @@ -4,24 +4,43 @@ module Schematic module Types class CompanyOverrideResponseData < Internal::Types::Model field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :consumption_rate, -> { Integer }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :expiration_date, -> { String }, optional: true, nullable: false + field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :notes, -> { Internal::Types::Array[Schematic::Types::CompanyOverrideNoteResponseData] }, optional: false, nullable: false + field :rule_id, -> { String }, optional: true, nullable: false + field :rule_id_usage_exceeded, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_plan_credit_grant_view.rb b/lib/schematic/types/company_plan_credit_grant_view.rb index d34466b..dc82b7d 100644 --- a/lib/schematic/types/company_plan_credit_grant_view.rb +++ b/lib/schematic/types/company_plan_credit_grant_view.rb @@ -4,42 +4,79 @@ module Schematic module Types class CompanyPlanCreditGrantView < Internal::Types::Model field :billing_credit_auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :billing_credit_auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :billing_credit_auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false + field :billing_credit_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :billing_credit_auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :billing_credit_auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :billing_credit_auto_topup_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :billing_credit_auto_topup_self_service, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :billing_credit_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false + field :billing_credit_auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :billing_credit_can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :company_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :company_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false + field :company_credit_amount, -> { Integer }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit, -> { Schematic::Types::BillingCreditView }, optional: true, nullable: false + field :credit_amount, -> { Integer }, optional: false, nullable: false + field :credit_description, -> { String }, optional: false, nullable: false + field :credit_icon, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false + field :plan, -> { Schematic::Types::GenericPreviewObject }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false + field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false + field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: false, nullable: false + field :rollover_percentage, -> { Integer }, optional: false, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_plan_detail_response_data.rb b/lib/schematic/types/company_plan_detail_response_data.rb index 2077bf9..19551a6 100644 --- a/lib/schematic/types/company_plan_detail_response_data.rb +++ b/lib/schematic/types/company_plan_detail_response_data.rb @@ -4,49 +4,93 @@ module Schematic module Types class CompanyPlanDetailResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false + field :audience_type, -> { String }, optional: true, nullable: false + field :available_periods, -> { Internal::Types::Array[Schematic::Types::PlanPriceCadence] }, optional: false, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false + field :catalogs, -> { Internal::Types::Array[Schematic::Types::PlanCatalogMembershipResponseData] }, optional: true, nullable: false + field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false + field :company_can_trial, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_count, -> { Integer }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_logo_url, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: true, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false + field :current, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :custom, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false + field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantView] }, optional: false, nullable: false + field :invalid_reason, -> { Schematic::Types::CompanyPlanInvalidReason }, optional: true, nullable: false + field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :one_time_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false + field :quarterly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :usage_violations, -> { Internal::Types::Array[Schematic::Types::FeatureUsageResponseData] }, optional: false, nullable: false + field :valid, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :versions, -> { Internal::Types::Array[Schematic::Types::PlanVersionResponseData] }, optional: false, nullable: false + field :yearly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/company_plan_with_billing_sub_view.rb b/lib/schematic/types/company_plan_with_billing_sub_view.rb index 77da110..f8f94f2 100644 --- a/lib/schematic/types/company_plan_with_billing_sub_view.rb +++ b/lib/schematic/types/company_plan_with_billing_sub_view.rb @@ -4,15 +4,25 @@ module Schematic module Types class CompanyPlanWithBillingSubView < Internal::Types::Model field :added_on, -> { String }, optional: true, nullable: false + field :billing_product_external_id, -> { String }, optional: true, nullable: false + field :billing_product_id, -> { String }, optional: true, nullable: false + field :description, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :image_url, -> { String }, optional: true, nullable: false + field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::CompanyPlanCreditGrantView] }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plan_period, -> { String }, optional: true, nullable: false + field :plan_price, -> { Integer }, optional: true, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/company_response_data.rb b/lib/schematic/types/company_response_data.rb index 2b9b8cb..672299a 100644 --- a/lib/schematic/types/company_response_data.rb +++ b/lib/schematic/types/company_response_data.rb @@ -4,11 +4,17 @@ module Schematic module Types class CompanyResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :last_seen_at, -> { String }, optional: true, nullable: false + field :logo_url, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/company_subscription_response_data.rb b/lib/schematic/types/company_subscription_response_data.rb index 86c0588..26449da 100644 --- a/lib/schematic/types/company_subscription_response_data.rb +++ b/lib/schematic/types/company_subscription_response_data.rb @@ -4,20 +4,35 @@ module Schematic module Types class CompanySubscriptionResponseData < Internal::Types::Model field :cancel_at, -> { String }, optional: true, nullable: false + field :cancel_at_period_end, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :discounts, -> { Internal::Types::Array[Schematic::Types::BillingSubscriptionDiscountView] }, optional: false, nullable: false + field :expired_at, -> { String }, optional: true, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :is_initial, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :latest_invoice, -> { Schematic::Types::InvoiceResponseData }, optional: true, nullable: false + field :payment_method, -> { Schematic::Types::PaymentMethodResponseData }, optional: true, nullable: false + field :products, -> { Internal::Types::Array[Schematic::Types::BillingProductForSubscriptionResponseData] }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :status, -> { String }, optional: false, nullable: false + field :subscription_external_id, -> { String }, optional: false, nullable: false + field :total_price, -> { Integer }, optional: false, nullable: false + field :trial_end, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/company_tax_id_view.rb b/lib/schematic/types/company_tax_id_view.rb index f1df16a..2ca2b92 100644 --- a/lib/schematic/types/company_tax_id_view.rb +++ b/lib/schematic/types/company_tax_id_view.rb @@ -4,9 +4,13 @@ module Schematic module Types class CompanyTaxIdView < Internal::Types::Model field :country, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :type, -> { String }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false + field :verification_status, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/compatible_plans.rb b/lib/schematic/types/compatible_plans.rb index 6f50711..65c595c 100644 --- a/lib/schematic/types/compatible_plans.rb +++ b/lib/schematic/types/compatible_plans.rb @@ -4,6 +4,7 @@ module Schematic module Types class CompatiblePlans < Internal::Types::Model field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :source_plan_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/compatible_plans_response_data.rb b/lib/schematic/types/compatible_plans_response_data.rb index 388e5a2..f5a6554 100644 --- a/lib/schematic/types/compatible_plans_response_data.rb +++ b/lib/schematic/types/compatible_plans_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class CompatiblePlansResponseData < Internal::Types::Model field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :source_plan_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/component_capabilities.rb b/lib/schematic/types/component_capabilities.rb index 59b4f9e..36c9c25 100644 --- a/lib/schematic/types/component_capabilities.rb +++ b/lib/schematic/types/component_capabilities.rb @@ -4,6 +4,7 @@ module Schematic module Types class ComponentCapabilities < Internal::Types::Model field :badge_visibility, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/component_checkout_settings.rb b/lib/schematic/types/component_checkout_settings.rb index b0d1f86..90629d8 100644 --- a/lib/schematic/types/component_checkout_settings.rb +++ b/lib/schematic/types/component_checkout_settings.rb @@ -4,11 +4,17 @@ module Schematic module Types class ComponentCheckoutSettings < Internal::Types::Model field :bundle_purchase_behavior, -> { Schematic::Types::CheckoutBundlePurchaseBehavior }, optional: false, nullable: false + field :collect_address, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_email, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_phone, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :collect_tax_id, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :proration_behavior, -> { Schematic::Types::ProrationBehavior }, optional: false, nullable: false + field :tax_collection_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/component_display_settings.rb b/lib/schematic/types/component_display_settings.rb index 367585f..2fc939d 100644 --- a/lib/schematic/types/component_display_settings.rb +++ b/lib/schematic/types/component_display_settings.rb @@ -4,10 +4,15 @@ module Schematic module Types class ComponentDisplaySettings < Internal::Types::Model field :show_as_monthly_prices, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_feature_description, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_hard_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_period_toggle, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_zero_price_as_free, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/component_hydrate_response_data.rb b/lib/schematic/types/component_hydrate_response_data.rb index 2485411..d39ecc0 100644 --- a/lib/schematic/types/component_hydrate_response_data.rb +++ b/lib/schematic/types/component_hydrate_response_data.rb @@ -4,32 +4,58 @@ module Schematic module Types class ComponentHydrateResponseData < Internal::Types::Model field :active_add_ons, -> { Internal::Types::Array[Schematic::Types::CompanyPlanDetailResponseData] }, optional: false, nullable: false + field :active_plans, -> { Internal::Types::Array[Schematic::Types::CompanyPlanDetailResponseData] }, optional: false, nullable: false + field :active_usage_based_entitlements, -> { Internal::Types::Array[Schematic::Types::UsageBasedEntitlementResponseData] }, optional: false, nullable: false + field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlans] }, optional: false, nullable: false + field :capabilities, -> { Schematic::Types::ComponentCapabilities }, optional: true, nullable: false + field :checkout_settings, -> { Schematic::Types::ComponentCheckoutSettings }, optional: false, nullable: false + field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false + field :component, -> { Schematic::Types::ComponentResponseData }, optional: true, nullable: false + field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::BillingCreditBundleView] }, optional: false, nullable: false + field :credit_grants, -> { Internal::Types::Array[Schematic::Types::CreditCompanyGrantView] }, optional: false, nullable: false + field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false + field :default_plan, -> { Schematic::Types::PlanDetailResponseData }, optional: true, nullable: false + field :display_settings, -> { Schematic::Types::ComponentDisplaySettings }, optional: false, nullable: false + field :feature_usage, -> { Schematic::Types::FeatureUsageDetailResponseData }, optional: true, nullable: false + field :post_trial_plan, -> { Schematic::Types::PlanDetailResponseData }, optional: true, nullable: false + field :prevent_self_service_downgrade, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade_button_text, -> { String }, optional: true, nullable: false + field :prevent_self_service_downgrade_url, -> { String }, optional: true, nullable: false + field :scheduled_downgrade, -> { Schematic::Types::ScheduledDowngradeResponseData }, optional: true, nullable: false + field :show_as_monthly_prices, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_period_toggle, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_zero_price_as_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :stripe_embed, -> { Schematic::Types::StripeEmbedInfo }, optional: true, nullable: false + field :subscription, -> { Schematic::Types::CompanySubscriptionResponseData }, optional: true, nullable: false + field :trial_payment_method_required, -> { Internal::Types::Boolean }, optional: true, nullable: false - field :upcoming_invoice, -> { Schematic::Types::InvoiceResponseData }, optional: true, nullable: false + + field :upcoming_invoice, -> { Schematic::Types::UpcomingInvoiceResponseData }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/component_preview_response_data.rb b/lib/schematic/types/component_preview_response_data.rb index f03c7b0..d5f30bc 100644 --- a/lib/schematic/types/component_preview_response_data.rb +++ b/lib/schematic/types/component_preview_response_data.rb @@ -4,33 +4,60 @@ module Schematic module Types class ComponentPreviewResponseData < Internal::Types::Model field :active_add_ons, -> { Internal::Types::Array[Schematic::Types::CompanyPlanDetailResponseData] }, optional: false, nullable: false + field :active_plans, -> { Internal::Types::Array[Schematic::Types::CompanyPlanDetailResponseData] }, optional: false, nullable: false + field :active_usage_based_entitlements, -> { Internal::Types::Array[Schematic::Types::UsageBasedEntitlementResponseData] }, optional: false, nullable: false + field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlans] }, optional: false, nullable: false + field :capabilities, -> { Schematic::Types::ComponentCapabilities }, optional: true, nullable: false + field :checkout_settings, -> { Schematic::Types::ComponentCheckoutSettings }, optional: false, nullable: false + field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false + field :component, -> { Schematic::Types::ComponentResponseData }, optional: true, nullable: false + field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::BillingCreditBundleView] }, optional: false, nullable: false + field :credit_grants, -> { Internal::Types::Array[Schematic::Types::CreditCompanyGrantView] }, optional: false, nullable: false + field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldWithValue] }, optional: false, nullable: false + field :default_plan, -> { Schematic::Types::PlanDetailResponseData }, optional: true, nullable: false + field :display_settings, -> { Schematic::Types::ComponentDisplaySettings }, optional: false, nullable: false + field :feature_usage, -> { Schematic::Types::FeatureUsageDetailResponseData }, optional: true, nullable: false + field :invoices, -> { Internal::Types::Array[Schematic::Types::InvoiceResponseData] }, optional: false, nullable: false + field :post_trial_plan, -> { Schematic::Types::PlanDetailResponseData }, optional: true, nullable: false + field :prevent_self_service_downgrade, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade_button_text, -> { String }, optional: true, nullable: false + field :prevent_self_service_downgrade_url, -> { String }, optional: true, nullable: false + field :scheduled_downgrade, -> { Schematic::Types::ScheduledDowngradeResponseData }, optional: true, nullable: false + field :show_as_monthly_prices, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_period_toggle, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_zero_price_as_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :stripe_embed, -> { Schematic::Types::StripeEmbedInfo }, optional: true, nullable: false + field :subscription, -> { Schematic::Types::CompanySubscriptionResponseData }, optional: true, nullable: false + field :trial_payment_method_required, -> { Internal::Types::Boolean }, optional: true, nullable: false - field :upcoming_invoice, -> { Schematic::Types::InvoiceResponseData }, optional: true, nullable: false + + field :upcoming_invoice, -> { Schematic::Types::UpcomingInvoiceResponseData }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/component_response_data.rb b/lib/schematic/types/component_response_data.rb index 3a953c3..82f2c76 100644 --- a/lib/schematic/types/component_response_data.rb +++ b/lib/schematic/types/component_response_data.rb @@ -4,12 +4,19 @@ module Schematic module Types class ComponentResponseData < Internal::Types::Model field :ast, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false + field :catalog_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :state, -> { Schematic::Types::ComponentState }, optional: false, nullable: false + field :type, -> { Schematic::Types::ComponentEntityType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/component_settings_response_data.rb b/lib/schematic/types/component_settings_response_data.rb index 424734f..cb51050 100644 --- a/lib/schematic/types/component_settings_response_data.rb +++ b/lib/schematic/types/component_settings_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class ComponentSettingsResponseData < Internal::Types::Model field :show_as_monthly_prices, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_feature_description, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_hard_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_period_toggle, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_zero_price_as_free, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/condition.rb b/lib/schematic/types/condition.rb index f7294a7..651f788 100644 --- a/lib/schematic/types/condition.rb +++ b/lib/schematic/types/condition.rb @@ -4,19 +4,33 @@ module Schematic module Types class Condition < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :comparison_trait_definition, -> { Schematic::Types::TraitDefinition }, optional: true, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false + field :consumption_rate, -> { Integer }, optional: true, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :metric_value, -> { Integer }, optional: true, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false + field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :trait_definition, -> { Schematic::Types::TraitDefinition }, optional: true, nullable: false + field :trait_value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/condition_group_response_data.rb b/lib/schematic/types/condition_group_response_data.rb index 620038a..c00c62b 100644 --- a/lib/schematic/types/condition_group_response_data.rb +++ b/lib/schematic/types/condition_group_response_data.rb @@ -4,11 +4,17 @@ module Schematic module Types class ConditionGroupResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :rule_id, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/condition_group_view.rb b/lib/schematic/types/condition_group_view.rb index e3e9cfd..6364cc9 100644 --- a/lib/schematic/types/condition_group_view.rb +++ b/lib/schematic/types/condition_group_view.rb @@ -4,12 +4,19 @@ module Schematic module Types class ConditionGroupView < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :conditions, -> { Internal::Types::Array[Schematic::Types::ConditionView] }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :rule_id, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/condition_response_data.rb b/lib/schematic/types/condition_response_data.rb index 8cf47a0..1f9a63a 100644 --- a/lib/schematic/types/condition_response_data.rb +++ b/lib/schematic/types/condition_response_data.rb @@ -4,28 +4,51 @@ module Schematic module Types class ConditionResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :comparison_trait_id, -> { String }, optional: true, nullable: false + field :condition_group_id, -> { String }, optional: true, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false + field :consumption_rate, -> { Integer }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :metric_value, -> { Integer }, optional: true, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false + field :resource_unspecified_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :rule_id, -> { String }, optional: false, nullable: false + field :trait_entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :trait_value, -> { String }, optional: false, nullable: false + field :trait_value_bool, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :trait_value_date, -> { String }, optional: true, nullable: false + field :trait_value_int, -> { Integer }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/condition_view.rb b/lib/schematic/types/condition_view.rb index ef5532a..2bdca6b 100644 --- a/lib/schematic/types/condition_view.rb +++ b/lib/schematic/types/condition_view.rb @@ -4,35 +4,65 @@ module Schematic module Types class ConditionView < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :billing_products, -> { Internal::Types::Array[Schematic::Types::GenericPreviewObject] }, optional: false, nullable: false + field :companies, -> { Internal::Types::Array[Schematic::Types::GenericPreviewObject] }, optional: false, nullable: false + field :comparison_trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :comparison_trait_id, -> { String }, optional: true, nullable: false + field :condition_group_id, -> { String }, optional: true, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false + field :consumption_rate, -> { Integer }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :metric_value, -> { Integer }, optional: true, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false + field :plan_versions, -> { Internal::Types::Array[Schematic::Types::GenericPreviewObject] }, optional: false, nullable: false + field :plans, -> { Internal::Types::Array[Schematic::Types::GenericPreviewObject] }, optional: false, nullable: false + field :resource_unspecified_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :rule_id, -> { String }, optional: false, nullable: false + field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :trait_entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :trait_value, -> { String }, optional: false, nullable: false + field :trait_value_bool, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :trait_value_date, -> { String }, optional: true, nullable: false + field :trait_value_int, -> { Integer }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :users, -> { Internal::Types::Array[Schematic::Types::GenericPreviewObject] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/coupon_request_body.rb b/lib/schematic/types/coupon_request_body.rb index 4bce89b..65bf063 100644 --- a/lib/schematic/types/coupon_request_body.rb +++ b/lib/schematic/types/coupon_request_body.rb @@ -4,12 +4,19 @@ module Schematic module Types class CouponRequestBody < Internal::Types::Model field :amount_off, -> { Integer }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :duration, -> { String }, optional: false, nullable: false + field :duration_in_months, -> { Integer }, optional: false, nullable: false + field :max_redemptions, -> { Integer }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :percent_off, -> { Integer }, optional: false, nullable: false + field :times_redeemed, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb b/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb index 58069bf..b2ceb0f 100644 --- a/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +++ b/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb @@ -4,30 +4,55 @@ module Schematic module Types class CreateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :apply_to_existing, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false + field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :auto_topup_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :auto_topup_self_service, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false + field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :company_credit_amount, -> { Integer }, optional: true, nullable: false + field :credit_amount, -> { Integer }, optional: false, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :license_id, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false + field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false + field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false + field :rollover_percentage, -> { Integer }, optional: true, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: true, nullable: false end end diff --git a/lib/schematic/types/create_billing_price_tier_request_body.rb b/lib/schematic/types/create_billing_price_tier_request_body.rb index 3842144..1c4fad7 100644 --- a/lib/schematic/types/create_billing_price_tier_request_body.rb +++ b/lib/schematic/types/create_billing_price_tier_request_body.rb @@ -4,10 +4,15 @@ module Schematic module Types class CreateBillingPriceTierRequestBody < Internal::Types::Model field :flat_amount, -> { Integer }, optional: true, nullable: false + field :per_unit_decimal, -> { String }, optional: true, nullable: false + field :per_unit_price, -> { Integer }, optional: true, nullable: false + field :price_external_id, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false + field :up_to, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/types/create_custom_plan_bundle_plan_request_body.rb b/lib/schematic/types/create_custom_plan_bundle_plan_request_body.rb index 5036c67..3d109cf 100644 --- a/lib/schematic/types/create_custom_plan_bundle_plan_request_body.rb +++ b/lib/schematic/types/create_custom_plan_bundle_plan_request_body.rb @@ -4,8 +4,11 @@ module Schematic module Types class CreateCustomPlanBundlePlanRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false - field :description, -> { String }, optional: false, nullable: false + + field :description, -> { String }, optional: true, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_entitlement_in_bundle_request_body.rb b/lib/schematic/types/create_entitlement_in_bundle_request_body.rb index 7fc9d55..be3d0ab 100644 --- a/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +++ b/lib/schematic/types/create_entitlement_in_bundle_request_body.rb @@ -4,38 +4,71 @@ module Schematic module Types class CreateEntitlementInBundleRequestBody < Internal::Types::Model field :billing_product_id, -> { String }, optional: true, nullable: false + field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :monthly_metered_price_id, -> { String }, optional: true, nullable: false + field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :monthly_unit_price, -> { Integer }, optional: true, nullable: false + field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :overage_billing_product_id, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_metered_price_id, -> { String }, optional: true, nullable: false + field :quarterly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_unit_price, -> { Integer }, optional: true, nullable: false + field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit_id, -> { String }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false + field :yearly_metered_price_id, -> { String }, optional: true, nullable: false + field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :yearly_unit_price, -> { Integer }, optional: true, nullable: false + field :yearly_unit_price_decimal, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/create_entitlement_req_common.rb b/lib/schematic/types/create_entitlement_req_common.rb index 6f50a4e..2c82fac 100644 --- a/lib/schematic/types/create_entitlement_req_common.rb +++ b/lib/schematic/types/create_entitlement_req_common.rb @@ -4,13 +4,21 @@ module Schematic module Types class CreateEntitlementReqCommon < Internal::Types::Model field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit_id, -> { String }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_event_request_body.rb b/lib/schematic/types/create_event_request_body.rb index 6fb0950..44fd9a4 100644 --- a/lib/schematic/types/create_event_request_body.rb +++ b/lib/schematic/types/create_event_request_body.rb @@ -4,10 +4,15 @@ module Schematic module Types class CreateEventRequestBody < Internal::Types::Model field :backfill, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :body, -> { Schematic::Types::EventBody }, optional: true, nullable: false + field :event_type, -> { Schematic::Types::EventType }, optional: false, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false + field :sent_at, -> { String }, optional: true, nullable: false + field :trusted_client_clock, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/create_flag_request_body.rb b/lib/schematic/types/create_flag_request_body.rb index 121af50..ec752c7 100644 --- a/lib/schematic/types/create_flag_request_body.rb +++ b/lib/schematic/types/create_flag_request_body.rb @@ -4,11 +4,17 @@ module Schematic module Types class CreateFlagRequestBody < Internal::Types::Model field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :flag_type, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_or_update_condition_group_request_body.rb b/lib/schematic/types/create_or_update_condition_group_request_body.rb index 6c55a81..7e0ff97 100644 --- a/lib/schematic/types/create_or_update_condition_group_request_body.rb +++ b/lib/schematic/types/create_or_update_condition_group_request_body.rb @@ -4,7 +4,9 @@ module Schematic module Types class CreateOrUpdateConditionGroupRequestBody < Internal::Types::Model field :conditions, -> { Internal::Types::Array[Schematic::Types::CreateOrUpdateConditionRequestBody] }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/create_or_update_condition_request_body.rb b/lib/schematic/types/create_or_update_condition_request_body.rb index 4ed140f..6f8a4f2 100644 --- a/lib/schematic/types/create_or_update_condition_request_body.rb +++ b/lib/schematic/types/create_or_update_condition_request_body.rb @@ -4,17 +4,29 @@ module Schematic module Types class CreateOrUpdateConditionRequestBody < Internal::Types::Model field :comparison_trait_id, -> { String }, optional: true, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false + field :credit_cost, -> { Integer }, optional: true, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :metric_value, -> { Integer }, optional: true, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false + field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :trait_value, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/create_or_update_flag_request_body.rb b/lib/schematic/types/create_or_update_flag_request_body.rb index 914e97d..bf8b1d7 100644 --- a/lib/schematic/types/create_or_update_flag_request_body.rb +++ b/lib/schematic/types/create_or_update_flag_request_body.rb @@ -4,12 +4,19 @@ module Schematic module Types class CreateOrUpdateFlagRequestBody < Internal::Types::Model field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :flag_type, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_or_update_rule_request_body.rb b/lib/schematic/types/create_or_update_rule_request_body.rb index efae468..cf8f3c0 100644 --- a/lib/schematic/types/create_or_update_rule_request_body.rb +++ b/lib/schematic/types/create_or_update_rule_request_body.rb @@ -4,11 +4,17 @@ module Schematic module Types class CreateOrUpdateRuleRequestBody < Internal::Types::Model field :condition_groups, -> { Internal::Types::Array[Schematic::Types::CreateOrUpdateConditionGroupRequestBody] }, optional: false, nullable: false + field :conditions, -> { Internal::Types::Array[Schematic::Types::CreateOrUpdateConditionRequestBody] }, optional: false, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :priority, -> { Integer }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: true, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_plan_request_body.rb b/lib/schematic/types/create_plan_request_body.rb index 77295c1..754b558 100644 --- a/lib/schematic/types/create_plan_request_body.rb +++ b/lib/schematic/types/create_plan_request_body.rb @@ -3,9 +3,12 @@ module Schematic module Types class CreatePlanRequestBody < Internal::Types::Model - field :description, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: true, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/create_price_tier_request_body.rb b/lib/schematic/types/create_price_tier_request_body.rb index e318906..dc90921 100644 --- a/lib/schematic/types/create_price_tier_request_body.rb +++ b/lib/schematic/types/create_price_tier_request_body.rb @@ -4,8 +4,11 @@ module Schematic module Types class CreatePriceTierRequestBody < Internal::Types::Model field :flat_amount, -> { Integer }, optional: true, nullable: false + field :per_unit_price, -> { Integer }, optional: true, nullable: false + field :per_unit_price_decimal, -> { String }, optional: true, nullable: false + field :up_to, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_bundle_currency_price.rb b/lib/schematic/types/credit_bundle_currency_price.rb index 12447e9..cf12f62 100644 --- a/lib/schematic/types/credit_bundle_currency_price.rb +++ b/lib/schematic/types/credit_bundle_currency_price.rb @@ -4,6 +4,7 @@ module Schematic module Types class CreditBundleCurrencyPrice < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_bundle_currency_price_request_body.rb b/lib/schematic/types/credit_bundle_currency_price_request_body.rb index f554bd1..37da511 100644 --- a/lib/schematic/types/credit_bundle_currency_price_request_body.rb +++ b/lib/schematic/types/credit_bundle_currency_price_request_body.rb @@ -4,7 +4,9 @@ module Schematic module Types class CreditBundleCurrencyPriceRequestBody < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :price_per_unit, -> { Integer }, optional: true, nullable: false + field :price_per_unit_decimal, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_bundle_currency_price_response_data.rb b/lib/schematic/types/credit_bundle_currency_price_response_data.rb index 26cc1b1..61fe292 100644 --- a/lib/schematic/types/credit_bundle_currency_price_response_data.rb +++ b/lib/schematic/types/credit_bundle_currency_price_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class CreditBundleCurrencyPriceResponseData < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_bundle_purchase_response_data.rb b/lib/schematic/types/credit_bundle_purchase_response_data.rb index 500b671..0debf18 100644 --- a/lib/schematic/types/credit_bundle_purchase_response_data.rb +++ b/lib/schematic/types/credit_bundle_purchase_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class CreditBundlePurchaseResponseData < Internal::Types::Model field :bundle, -> { Schematic::Types::BillingCreditBundleResponseData }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :total, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credit_company_grant_view.rb b/lib/schematic/types/credit_company_grant_view.rb index 71b2818..e6b22d2 100644 --- a/lib/schematic/types/credit_company_grant_view.rb +++ b/lib/schematic/types/credit_company_grant_view.rb @@ -4,41 +4,77 @@ module Schematic module Types class CreditCompanyGrantView < Internal::Types::Model field :billing_credit_bundle_id, -> { String }, optional: true, nullable: false + field :billing_credit_id, -> { String }, optional: false, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :company_license_id, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit_description, -> { String }, optional: false, nullable: false + field :credit_icon, -> { String }, optional: true, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :exhausted_at, -> { String }, optional: true, nullable: false + field :expires_at, -> { String }, optional: true, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :license_name, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :plan_name, -> { String }, optional: true, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :price, -> { Schematic::Types::BillingProductPriceResponseData }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :quantity_remaining, -> { Integer }, optional: false, nullable: false + field :quantity_used, -> { Integer }, optional: false, nullable: false + field :renewal_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :renewal_period, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false + field :reserved, -> { Integer }, optional: true, nullable: false + field :settled, -> { Integer }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :source_grant_id, -> { String }, optional: true, nullable: false + field :source_label, -> { String }, optional: false, nullable: false + field :transfers, -> { Internal::Types::Array[Schematic::Types::CreditTransferView] }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :valid_from, -> { String }, optional: true, nullable: false + field :zeroed_out_date, -> { String }, optional: true, nullable: false + field :zeroed_out_reason, -> { Schematic::Types::BillingCreditGrantZeroedOutReason }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_currency_price.rb b/lib/schematic/types/credit_currency_price.rb index c2c43e6..e296966 100644 --- a/lib/schematic/types/credit_currency_price.rb +++ b/lib/schematic/types/credit_currency_price.rb @@ -4,6 +4,7 @@ module Schematic module Types class CreditCurrencyPrice < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_currency_price_request_body.rb b/lib/schematic/types/credit_currency_price_request_body.rb index fd9ba30..c6f9d04 100644 --- a/lib/schematic/types/credit_currency_price_request_body.rb +++ b/lib/schematic/types/credit_currency_price_request_body.rb @@ -4,7 +4,9 @@ module Schematic module Types class CreditCurrencyPriceRequestBody < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :price_per_unit, -> { Integer }, optional: true, nullable: false + field :price_per_unit_decimal, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_currency_price_response_data.rb b/lib/schematic/types/credit_currency_price_response_data.rb index d64d7ad..0f53a11 100644 --- a/lib/schematic/types/credit_currency_price_response_data.rb +++ b/lib/schematic/types/credit_currency_price_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class CreditCurrencyPriceResponseData < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_event_ledger_response_data.rb b/lib/schematic/types/credit_event_ledger_response_data.rb index d8df1bb..d684695 100644 --- a/lib/schematic/types/credit_event_ledger_response_data.rb +++ b/lib/schematic/types/credit_event_ledger_response_data.rb @@ -4,36 +4,67 @@ module Schematic module Types class CreditEventLedgerResponseData < Internal::Types::Model field :amount, -> { Integer }, optional: false, nullable: false + field :auto_topup_log_id, -> { String }, optional: true, nullable: false + field :billing_credit_bundle_id, -> { String }, optional: true, nullable: false + field :billing_credit_id, -> { String }, optional: false, nullable: false + field :company, -> { Schematic::Types::CompanyLedgerResponseData }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :credit, -> { Schematic::Types::BillingCreditLedgerResponseData }, optional: true, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_at, -> { String }, optional: false, nullable: false + field :event_id, -> { String }, optional: false, nullable: false + field :event_type, -> { Schematic::Types::CreditEventType }, optional: false, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :feature, -> { Schematic::Types::FeatureLedgerResponseData }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :from_grant_id, -> { String }, optional: true, nullable: false + field :grant_expires_at, -> { String }, optional: true, nullable: false + field :grant_id, -> { String }, optional: true, nullable: false + field :grant_quantity, -> { Integer }, optional: true, nullable: false + field :grant_quantity_remaining, -> { Integer }, optional: true, nullable: false + field :grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: true, nullable: false + field :grant_valid_from, -> { String }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :quantity_consumed, -> { Integer }, optional: true, nullable: false + field :quantity_remaining_at_zero_out, -> { Integer }, optional: true, nullable: false + field :source_id, -> { Integer }, optional: false, nullable: false + field :to_grant_id, -> { String }, optional: true, nullable: false + field :usage_event_id, -> { String }, optional: true, nullable: false + field :usage_reason, -> { Schematic::Types::CreditUsageReason }, optional: true, nullable: false + field :zeroed_out_reason, -> { Schematic::Types::BillingCreditGrantZeroedOutReason }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_grant_detail.rb b/lib/schematic/types/credit_grant_detail.rb index 0086625..c3c0630 100644 --- a/lib/schematic/types/credit_grant_detail.rb +++ b/lib/schematic/types/credit_grant_detail.rb @@ -4,8 +4,11 @@ module Schematic module Types class CreditGrantDetail < Internal::Types::Model field :credit_type_icon, -> { String }, optional: true, nullable: false + field :expires_at, -> { String }, optional: true, nullable: false + field :grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credit_grant_expiry_request_body.rb b/lib/schematic/types/credit_grant_expiry_request_body.rb index 7859788..dca7c11 100644 --- a/lib/schematic/types/credit_grant_expiry_request_body.rb +++ b/lib/schematic/types/credit_grant_expiry_request_body.rb @@ -4,10 +4,15 @@ module Schematic module Types class CreditGrantExpiryRequestBody < Internal::Types::Model field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false + field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false + field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_lease_response_data.rb b/lib/schematic/types/credit_lease_response_data.rb index 48a9f2d..c294d03 100644 --- a/lib/schematic/types/credit_lease_response_data.rb +++ b/lib/schematic/types/credit_lease_response_data.rb @@ -4,12 +4,19 @@ module Schematic module Types class CreditLeaseResponseData < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit_type_id, -> { String }, optional: false, nullable: false + field :expires_at, -> { String }, optional: false, nullable: false + field :granted_amount, -> { Integer }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :released_at, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credit_transfer_response_data.rb b/lib/schematic/types/credit_transfer_response_data.rb index 1dd09d6..10ad74c 100644 --- a/lib/schematic/types/credit_transfer_response_data.rb +++ b/lib/schematic/types/credit_transfer_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class CreditTransferResponseData < Internal::Types::Model field :amount, -> { Integer }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :direction, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :reason, -> { String }, optional: false, nullable: false + field :related_grant_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credit_transfer_view.rb b/lib/schematic/types/credit_transfer_view.rb index 44342fd..efb78e5 100644 --- a/lib/schematic/types/credit_transfer_view.rb +++ b/lib/schematic/types/credit_transfer_view.rb @@ -4,10 +4,15 @@ module Schematic module Types class CreditTransferView < Internal::Types::Model field :amount, -> { Integer }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :direction, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :reason, -> { String }, optional: false, nullable: false + field :related_grant_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credit_usage.rb b/lib/schematic/types/credit_usage.rb index 009b539..fd63539 100644 --- a/lib/schematic/types/credit_usage.rb +++ b/lib/schematic/types/credit_usage.rb @@ -4,13 +4,21 @@ module Schematic module Types class CreditUsage < Internal::Types::Model field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :credit_grant_counts, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false + field :credit_grant_details, -> { Internal::Types::Array[Schematic::Types::CreditGrantDetail] }, optional: true, nullable: false + field :credit_remaining, -> { Integer }, optional: true, nullable: false + field :credit_total, -> { Integer }, optional: true, nullable: false + field :credit_type_icon, -> { String }, optional: true, nullable: false + field :credit_type_name, -> { String }, optional: true, nullable: false + field :credit_used, -> { Integer }, optional: true, nullable: false + field :usage_aggregation, -> { Schematic::Types::CreditUsageAggregation }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credit_usage_aggregation.rb b/lib/schematic/types/credit_usage_aggregation.rb index 55023f1..db6c540 100644 --- a/lib/schematic/types/credit_usage_aggregation.rb +++ b/lib/schematic/types/credit_usage_aggregation.rb @@ -4,8 +4,11 @@ module Schematic module Types class CreditUsageAggregation < Internal::Types::Model field :usage_this_billing_period, -> { Integer }, optional: true, nullable: false + field :usage_this_calendar_month, -> { Integer }, optional: true, nullable: false + field :usage_this_week, -> { Integer }, optional: true, nullable: false + field :usage_today, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credits_auto_topup_company_summary.rb b/lib/schematic/types/credits_auto_topup_company_summary.rb index b18b241..3bc23a1 100644 --- a/lib/schematic/types/credits_auto_topup_company_summary.rb +++ b/lib/schematic/types/credits_auto_topup_company_summary.rb @@ -4,6 +4,7 @@ module Schematic module Types class CreditsAutoTopupCompanySummary < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credits_auto_topup_credit_summary.rb b/lib/schematic/types/credits_auto_topup_credit_summary.rb index 46c3945..38e03a8 100644 --- a/lib/schematic/types/credits_auto_topup_credit_summary.rb +++ b/lib/schematic/types/credits_auto_topup_credit_summary.rb @@ -4,6 +4,7 @@ module Schematic module Types class CreditsAutoTopupCreditSummary < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credits_auto_topup_hard_failure.rb b/lib/schematic/types/credits_auto_topup_hard_failure.rb index e22b6af..15f35ee 100644 --- a/lib/schematic/types/credits_auto_topup_hard_failure.rb +++ b/lib/schematic/types/credits_auto_topup_hard_failure.rb @@ -4,8 +4,11 @@ module Schematic module Types class CreditsAutoTopupHardFailure < Internal::Types::Model field :company, -> { Schematic::Types::CreditsAutoTopupCompanySummary }, optional: true, nullable: false + field :credit, -> { Schematic::Types::CreditsAutoTopupCreditSummary }, optional: true, nullable: false + field :error_message, -> { String }, optional: true, nullable: false + field :stripe_error_code, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credits_auto_topup_retry_failure.rb b/lib/schematic/types/credits_auto_topup_retry_failure.rb index 181e1cd..c6bc27b 100644 --- a/lib/schematic/types/credits_auto_topup_retry_failure.rb +++ b/lib/schematic/types/credits_auto_topup_retry_failure.rb @@ -4,9 +4,13 @@ module Schematic module Types class CreditsAutoTopupRetryFailure < Internal::Types::Model field :company, -> { Schematic::Types::CreditsAutoTopupCompanySummary }, optional: true, nullable: false + field :consecutive_failures, -> { Integer }, optional: false, nullable: false + field :credit, -> { Schematic::Types::CreditsAutoTopupCreditSummary }, optional: true, nullable: false + field :last_error_message, -> { String }, optional: true, nullable: false + field :stripe_error_code, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/credits_auto_topup_success.rb b/lib/schematic/types/credits_auto_topup_success.rb index 1a2769e..b034cd7 100644 --- a/lib/schematic/types/credits_auto_topup_success.rb +++ b/lib/schematic/types/credits_auto_topup_success.rb @@ -4,8 +4,11 @@ module Schematic module Types class CreditsAutoTopupSuccess < Internal::Types::Model field :company, -> { Schematic::Types::CreditsAutoTopupCompanySummary }, optional: true, nullable: false + field :credit, -> { Schematic::Types::CreditsAutoTopupCreditSummary }, optional: true, nullable: false + field :grant_id, -> { String }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credits_credit_purchase_success.rb b/lib/schematic/types/credits_credit_purchase_success.rb index af5e2af..d2a4321 100644 --- a/lib/schematic/types/credits_credit_purchase_success.rb +++ b/lib/schematic/types/credits_credit_purchase_success.rb @@ -4,10 +4,15 @@ module Schematic module Types class CreditsCreditPurchaseSuccess < Internal::Types::Model field :bundle_id, -> { String }, optional: false, nullable: false + field :bundle_name, -> { String }, optional: false, nullable: false + field :company, -> { Schematic::Types::CreditsWebhookCompanySummary }, optional: true, nullable: false + field :credit, -> { Schematic::Types::CreditsWebhookCreditSummary }, optional: true, nullable: false + field :grant_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credits_webhook_company_summary.rb b/lib/schematic/types/credits_webhook_company_summary.rb index 6846859..65cb77d 100644 --- a/lib/schematic/types/credits_webhook_company_summary.rb +++ b/lib/schematic/types/credits_webhook_company_summary.rb @@ -4,6 +4,7 @@ module Schematic module Types class CreditsWebhookCompanySummary < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/credits_webhook_credit_summary.rb b/lib/schematic/types/credits_webhook_credit_summary.rb index 8501ed8..3017e63 100644 --- a/lib/schematic/types/credits_webhook_credit_summary.rb +++ b/lib/schematic/types/credits_webhook_credit_summary.rb @@ -4,6 +4,7 @@ module Schematic module Types class CreditsWebhookCreditSummary < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/currency_price_request_body.rb b/lib/schematic/types/currency_price_request_body.rb index 6f3d85a..5fabf7a 100644 --- a/lib/schematic/types/currency_price_request_body.rb +++ b/lib/schematic/types/currency_price_request_body.rb @@ -4,14 +4,23 @@ module Schematic module Types class CurrencyPriceRequestBody < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :monthly_unit_price, -> { Integer }, optional: true, nullable: false + field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :quarterly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_unit_price, -> { Integer }, optional: true, nullable: false + field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :yearly_unit_price, -> { Integer }, optional: true, nullable: false + field :yearly_unit_price_decimal, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/custom_plan_billing_response_data.rb b/lib/schematic/types/custom_plan_billing_response_data.rb index f92b01d..59a25cf 100644 --- a/lib/schematic/types/custom_plan_billing_response_data.rb +++ b/lib/schematic/types/custom_plan_billing_response_data.rb @@ -4,19 +4,33 @@ module Schematic module Types class CustomPlanBillingResponseData < Internal::Types::Model field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: false, nullable: false + field :billing_cycle_anchor, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :days_until_due, -> { Integer }, optional: false, nullable: false + field :external_invoice_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :paid_at, -> { String }, optional: true, nullable: false + field :plan_billing_source, -> { Schematic::Types::PlanBillingSource }, optional: false, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :published_at, -> { String }, optional: true, nullable: false + field :send_invoice, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :status, -> { Schematic::Types::CustomPlanBillingStatus }, optional: false, nullable: false + field :stripe_invoice_url, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/custom_plan_config.rb b/lib/schematic/types/custom_plan_config.rb index c001f02..ee8560c 100644 --- a/lib/schematic/types/custom_plan_config.rb +++ b/lib/schematic/types/custom_plan_config.rb @@ -4,7 +4,9 @@ module Schematic module Types class CustomPlanConfig < Internal::Types::Model field :cta_text, -> { String }, optional: false, nullable: false + field :cta_web_site, -> { String }, optional: false, nullable: false + field :price_text, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/custom_plan_view_config_response_data.rb b/lib/schematic/types/custom_plan_view_config_response_data.rb index 3dc62e9..e5b9525 100644 --- a/lib/schematic/types/custom_plan_view_config_response_data.rb +++ b/lib/schematic/types/custom_plan_view_config_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class CustomPlanViewConfigResponseData < Internal::Types::Model field :cta_text, -> { String }, optional: false, nullable: false + field :cta_web_site, -> { String }, optional: false, nullable: false + field :price_text, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/customer_billing_address.rb b/lib/schematic/types/customer_billing_address.rb index dbf093e..712d0d4 100644 --- a/lib/schematic/types/customer_billing_address.rb +++ b/lib/schematic/types/customer_billing_address.rb @@ -4,10 +4,15 @@ module Schematic module Types class CustomerBillingAddress < Internal::Types::Model field :city, -> { String }, optional: false, nullable: false + field :country, -> { String }, optional: false, nullable: false + field :line_1, -> { String }, optional: false, nullable: false, api_name: "line1" + field :line_2, -> { String }, optional: false, nullable: false, api_name: "line2" + field :postal_code, -> { String }, optional: false, nullable: false + field :state, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/data_event_payload.rb b/lib/schematic/types/data_event_payload.rb index 3c6b7fc..b2ef069 100644 --- a/lib/schematic/types/data_event_payload.rb +++ b/lib/schematic/types/data_event_payload.rb @@ -4,11 +4,17 @@ module Schematic module Types class DataEventPayload < Internal::Types::Model field :api_key, -> { String }, optional: false, nullable: false + field :backfill, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :body, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false + field :sent_at, -> { String }, optional: true, nullable: false + field :trusted_client_clock, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :type, -> { Schematic::Types::EventType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/data_export_metadata.rb b/lib/schematic/types/data_export_metadata.rb index 399b8a4..e7f745d 100644 --- a/lib/schematic/types/data_export_metadata.rb +++ b/lib/schematic/types/data_export_metadata.rb @@ -8,7 +8,9 @@ class DataExportMetadata < Internal::Types::Model discriminant :export_type member -> { Schematic::Types::AuditLogExportMetadata }, key: "AUDIT_LOG" + member -> { Schematic::Types::CompanyFeatureUsageExportMetadata }, key: "COMPANY_FEATURE_USAGE" + member -> { Schematic::Types::EventExportMetadata }, key: "EVENT" end end diff --git a/lib/schematic/types/data_export_response_data.rb b/lib/schematic/types/data_export_response_data.rb index a8eb8bc..5bc504d 100644 --- a/lib/schematic/types/data_export_response_data.rb +++ b/lib/schematic/types/data_export_response_data.rb @@ -4,13 +4,21 @@ module Schematic module Types class DataExportResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :export_type, -> { Schematic::Types::DataExportType }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :metadata, -> { Schematic::Types::DataExportMetadata }, optional: true, nullable: false + field :output_file_type, -> { Schematic::Types::DataExportOutputFileType }, optional: false, nullable: false + field :status, -> { Schematic::Types::DataExportStatus }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/datastream_company_plan.rb b/lib/schematic/types/datastream_company_plan.rb index d18795c..f0a08e0 100644 --- a/lib/schematic/types/datastream_company_plan.rb +++ b/lib/schematic/types/datastream_company_plan.rb @@ -4,8 +4,11 @@ module Schematic module Types class DatastreamCompanyPlan < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :trial_end_date, -> { String }, optional: true, nullable: false + field :trial_status, -> { Schematic::Types::TrialStatus }, optional: true, nullable: false end end diff --git a/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb b/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb index 7d58721..3a86273 100644 --- a/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb +++ b/lib/schematic/types/duplicate_plan_entitlements_response_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class DuplicatePlanEntitlementsResponseResponseData < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: false, nullable: false + field :issues, -> { Internal::Types::Array[Schematic::Types::PlanIssueResponseData] }, optional: false, nullable: false + field :skipped, -> { Internal::Types::Array[Schematic::Types::SkippedEntitlementResponseData] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/entitlement_currency_prices_response_data.rb b/lib/schematic/types/entitlement_currency_prices_response_data.rb index afa23b3..6dae292 100644 --- a/lib/schematic/types/entitlement_currency_prices_response_data.rb +++ b/lib/schematic/types/entitlement_currency_prices_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class EntitlementCurrencyPricesResponseData < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :monthly_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :quarterly_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :yearly_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false end end diff --git a/lib/schematic/types/entitlements_in_plan.rb b/lib/schematic/types/entitlements_in_plan.rb index 52fbf8b..d5ce594 100644 --- a/lib/schematic/types/entitlements_in_plan.rb +++ b/lib/schematic/types/entitlements_in_plan.rb @@ -4,6 +4,7 @@ module Schematic module Types class EntitlementsInPlan < Internal::Types::Model field :entitlement_id, -> { String }, optional: false, nullable: false + field :visible, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/entity_key_definition_response_data.rb b/lib/schematic/types/entity_key_definition_response_data.rb index c82b157..26b74e7 100644 --- a/lib/schematic/types/entity_key_definition_response_data.rb +++ b/lib/schematic/types/entity_key_definition_response_data.rb @@ -4,9 +4,13 @@ module Schematic module Types class EntityKeyDefinitionResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/entity_key_detail_response_data.rb b/lib/schematic/types/entity_key_detail_response_data.rb index 30b3aa8..6c9fb33 100644 --- a/lib/schematic/types/entity_key_detail_response_data.rb +++ b/lib/schematic/types/entity_key_detail_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class EntityKeyDetailResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :definition, -> { Schematic::Types::EntityKeyDefinitionResponseData }, optional: true, nullable: false + field :definition_id, -> { String }, optional: false, nullable: false + field :entity_id, -> { String }, optional: false, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/entity_key_response_data.rb b/lib/schematic/types/entity_key_response_data.rb index 09483ab..94e944b 100644 --- a/lib/schematic/types/entity_key_response_data.rb +++ b/lib/schematic/types/entity_key_response_data.rb @@ -4,13 +4,21 @@ module Schematic module Types class EntityKeyResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :definition_id, -> { String }, optional: false, nullable: false + field :entity_id, -> { String }, optional: false, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/entity_trait_definition_response_data.rb b/lib/schematic/types/entity_trait_definition_response_data.rb index 0ef69af..f7fbd37 100644 --- a/lib/schematic/types/entity_trait_definition_response_data.rb +++ b/lib/schematic/types/entity_trait_definition_response_data.rb @@ -4,11 +4,17 @@ module Schematic module Types class EntityTraitDefinitionResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :display_name, -> { String }, optional: false, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: false, nullable: false + field :hierarchy, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :trait_type, -> { Schematic::Types::TraitType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/entity_trait_definition_usage.rb b/lib/schematic/types/entity_trait_definition_usage.rb index ae4f323..bfa8315 100644 --- a/lib/schematic/types/entity_trait_definition_usage.rb +++ b/lib/schematic/types/entity_trait_definition_usage.rb @@ -4,10 +4,15 @@ module Schematic module Types class EntityTraitDefinitionUsage < Internal::Types::Model field :checkout_field_config_count, -> { Integer }, optional: false, nullable: false + field :company_override_count, -> { Integer }, optional: false, nullable: false + field :feature_count, -> { Integer }, optional: false, nullable: false + field :plan_entitlement_count, -> { Integer }, optional: false, nullable: false + field :plan_trait_count, -> { Integer }, optional: false, nullable: false + field :rule_condition_count, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/entity_trait_detail_response_data.rb b/lib/schematic/types/entity_trait_detail_response_data.rb index 0682a50..859fdd7 100644 --- a/lib/schematic/types/entity_trait_detail_response_data.rb +++ b/lib/schematic/types/entity_trait_detail_response_data.rb @@ -4,11 +4,17 @@ module Schematic module Types class EntityTraitDetailResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :definition, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :definition_id, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/entity_trait_response_data.rb b/lib/schematic/types/entity_trait_response_data.rb index a17ed0e..450eec4 100644 --- a/lib/schematic/types/entity_trait_response_data.rb +++ b/lib/schematic/types/entity_trait_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class EntityTraitResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :definition_id, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/entity_trait_value.rb b/lib/schematic/types/entity_trait_value.rb index 5e8d8aa..b1cabc5 100644 --- a/lib/schematic/types/entity_trait_value.rb +++ b/lib/schematic/types/entity_trait_value.rb @@ -4,6 +4,7 @@ module Schematic module Types class EntityTraitValue < Internal::Types::Model field :definition_id, -> { String }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/environment_detail_response_data.rb b/lib/schematic/types/environment_detail_response_data.rb index d801a69..234fe8b 100644 --- a/lib/schematic/types/environment_detail_response_data.rb +++ b/lib/schematic/types/environment_detail_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class EnvironmentDetailResponseData < Internal::Types::Model field :api_keys, -> { Internal::Types::Array[Schematic::Types::ApiKeyResponseData] }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_type, -> { Schematic::Types::EnvironmentType }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/environment_feature_usage_time_series_response_data.rb b/lib/schematic/types/environment_feature_usage_time_series_response_data.rb index ecafc2a..cd4e606 100644 --- a/lib/schematic/types/environment_feature_usage_time_series_response_data.rb +++ b/lib/schematic/types/environment_feature_usage_time_series_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class EnvironmentFeatureUsageTimeSeriesResponseData < Internal::Types::Model field :event_subtype, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :points, -> { Internal::Types::Array[Schematic::Types::EnvironmentUsagePointResponseData] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/environment_response_data.rb b/lib/schematic/types/environment_response_data.rb index feb7150..dda32ad 100644 --- a/lib/schematic/types/environment_response_data.rb +++ b/lib/schematic/types/environment_response_data.rb @@ -4,9 +4,13 @@ module Schematic module Types class EnvironmentResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :environment_type, -> { Schematic::Types::EnvironmentType }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/environment_trait_usage_time_series_response_data.rb b/lib/schematic/types/environment_trait_usage_time_series_response_data.rb index 95815c0..e99fe60 100644 --- a/lib/schematic/types/environment_trait_usage_time_series_response_data.rb +++ b/lib/schematic/types/environment_trait_usage_time_series_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class EnvironmentTraitUsageTimeSeriesResponseData < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :points, -> { Internal::Types::Array[Schematic::Types::EnvironmentUsagePointResponseData] }, optional: false, nullable: false + field :trait_definition_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/environment_usage_point_response_data.rb b/lib/schematic/types/environment_usage_point_response_data.rb index 14222b5..88c7015 100644 --- a/lib/schematic/types/environment_usage_point_response_data.rb +++ b/lib/schematic/types/environment_usage_point_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class EnvironmentUsagePointResponseData < Internal::Types::Model field :timestamp, -> { String }, optional: false, nullable: false + field :usage, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/event_body.rb b/lib/schematic/types/event_body.rb index 48c1dd7..0958441 100644 --- a/lib/schematic/types/event_body.rb +++ b/lib/schematic/types/event_body.rb @@ -6,8 +6,11 @@ class EventBody < Internal::Types::Model extend Schematic::Internal::Types::Union member -> { Schematic::Types::EventBodyTrack } + member -> { Schematic::Types::EventBodyFlagCheck } + member -> { Schematic::Types::EventBodyIdentify } + member -> { Schematic::Types::EventBodyInference } end end diff --git a/lib/schematic/types/event_body_flag_check.rb b/lib/schematic/types/event_body_flag_check.rb index 809210e..965b84a 100644 --- a/lib/schematic/types/event_body_flag_check.rb +++ b/lib/schematic/types/event_body_flag_check.rb @@ -4,14 +4,25 @@ module Schematic module Types class EventBodyFlagCheck < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :error, -> { String }, optional: true, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :flag_key, -> { String }, optional: false, nullable: false + + field :preflight, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :reason, -> { String }, optional: false, nullable: false + field :req_company, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + field :req_user, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + field :rule_id, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/event_body_identify.rb b/lib/schematic/types/event_body_identify.rb index 6312873..a49fbd3 100644 --- a/lib/schematic/types/event_body_identify.rb +++ b/lib/schematic/types/event_body_identify.rb @@ -4,8 +4,11 @@ module Schematic module Types class EventBodyIdentify < Internal::Types::Model field :company, -> { Schematic::Types::EventBodyIdentifyCompany }, optional: true, nullable: false + field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false end end diff --git a/lib/schematic/types/event_body_identify_company.rb b/lib/schematic/types/event_body_identify_company.rb index 206d54d..7c8ed35 100644 --- a/lib/schematic/types/event_body_identify_company.rb +++ b/lib/schematic/types/event_body_identify_company.rb @@ -5,7 +5,9 @@ module Types # Information about the company associated with the user; required only if it is a new user class EventBodyIdentifyCompany < Internal::Types::Model field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false end end diff --git a/lib/schematic/types/event_body_inference.rb b/lib/schematic/types/event_body_inference.rb index 8a81427..bee0c0d 100644 --- a/lib/schematic/types/event_body_inference.rb +++ b/lib/schematic/types/event_body_inference.rb @@ -4,18 +4,31 @@ module Schematic module Types class EventBodyInference < Internal::Types::Model field :cached_input_tokens, -> { Integer }, optional: true, nullable: false + field :company, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :cost, -> { String }, optional: true, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :event, -> { String }, optional: true, nullable: false + field :input_tokens, -> { Integer }, optional: false, nullable: false + field :operation, -> { String }, optional: true, nullable: false + field :output_tokens, -> { Integer }, optional: false, nullable: false + field :provider, -> { String }, optional: false, nullable: false + field :reasoning_tokens, -> { Integer }, optional: true, nullable: false + field :request_model, -> { String }, optional: true, nullable: false + field :requests, -> { Integer }, optional: true, nullable: false + field :response_model, -> { String }, optional: false, nullable: false + field :user, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false end end diff --git a/lib/schematic/types/event_body_track.rb b/lib/schematic/types/event_body_track.rb index a1bf9ce..88d5fcd 100644 --- a/lib/schematic/types/event_body_track.rb +++ b/lib/schematic/types/event_body_track.rb @@ -4,10 +4,15 @@ module Schematic module Types class EventBodyTrack < Internal::Types::Model field :company, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + field :event, -> { String }, optional: false, nullable: false + field :lease_id, -> { String }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: true, nullable: false + field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :user, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false end end diff --git a/lib/schematic/types/event_detail_response_data.rb b/lib/schematic/types/event_detail_response_data.rb index 5301f58..8b42510 100644 --- a/lib/schematic/types/event_detail_response_data.rb +++ b/lib/schematic/types/event_detail_response_data.rb @@ -4,29 +4,53 @@ module Schematic module Types class EventDetailResponseData < Internal::Types::Model field :api_key, -> { String }, optional: true, nullable: false + field :api_key_view, -> { Schematic::Types::ApiKeyResponseData }, optional: true, nullable: false + field :body, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + field :body_preview, -> { String }, optional: false, nullable: false + field :captured_at, -> { String }, optional: false, nullable: false + field :company, -> { Schematic::Types::PreviewObject }, optional: true, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :enriched_at, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :error_message, -> { String }, optional: true, nullable: false + field :feature_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :features, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false + field :lease_id, -> { String }, optional: true, nullable: false + field :loaded_at, -> { String }, optional: true, nullable: false + field :processed_at, -> { String }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :sent_at, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::EventStatus }, optional: false, nullable: false + field :subtype, -> { String }, optional: true, nullable: false + field :type, -> { Schematic::Types::EventType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: true, nullable: false + field :user, -> { Schematic::Types::PreviewObject }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/event_export_metadata.rb b/lib/schematic/types/event_export_metadata.rb index 0511cda..027b9c5 100644 --- a/lib/schematic/types/event_export_metadata.rb +++ b/lib/schematic/types/event_export_metadata.rb @@ -4,12 +4,19 @@ module Schematic module Types class EventExportMetadata < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :end_time, -> { String }, optional: true, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :event_types, -> { Internal::Types::Array[Schematic::Types::EventExportMetadataEventTypesItem] }, optional: true, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :notification_email_recipient_email_addresses, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :start_time, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/event_response_data.rb b/lib/schematic/types/event_response_data.rb index 8cd0e51..b096ef4 100644 --- a/lib/schematic/types/event_response_data.rb +++ b/lib/schematic/types/event_response_data.rb @@ -4,25 +4,45 @@ module Schematic module Types class EventResponseData < Internal::Types::Model field :api_key, -> { String }, optional: true, nullable: false + field :body, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + field :body_preview, -> { String }, optional: false, nullable: false + field :captured_at, -> { String }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :enriched_at, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :error_message, -> { String }, optional: true, nullable: false + field :feature_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :idempotency_key, -> { String }, optional: true, nullable: false + field :lease_id, -> { String }, optional: true, nullable: false + field :loaded_at, -> { String }, optional: true, nullable: false + field :processed_at, -> { String }, optional: true, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false + field :sent_at, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::EventStatus }, optional: false, nullable: false + field :subtype, -> { String }, optional: true, nullable: false + field :type, -> { Schematic::Types::EventType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/event_summary_response_data.rb b/lib/schematic/types/event_summary_response_data.rb index d2222f1..40057ec 100644 --- a/lib/schematic/types/event_summary_response_data.rb +++ b/lib/schematic/types/event_summary_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class EventSummaryResponseData < Internal::Types::Model field :company_count, -> { Integer }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_count, -> { Integer }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: false, nullable: false + field :last_seen_at, -> { String }, optional: true, nullable: false + field :user_count, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/feature_company_response_data.rb b/lib/schematic/types/feature_company_response_data.rb index c0b0523..2de9523 100644 --- a/lib/schematic/types/feature_company_response_data.rb +++ b/lib/schematic/types/feature_company_response_data.rb @@ -4,41 +4,77 @@ module Schematic module Types class FeatureCompanyResponseData < Internal::Types::Model field :access, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :allocation, -> { Integer }, optional: true, nullable: false + field :allocation_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false + field :company_override, -> { Schematic::Types::CompanyOverrideResponseData }, optional: true, nullable: false + field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :credit_grant_counts, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false + field :credit_grant_details, -> { Internal::Types::Array[Schematic::Types::CreditGrantDetail] }, optional: true, nullable: false + field :credit_grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: true, nullable: false + field :credit_remaining, -> { Integer }, optional: true, nullable: false + field :credit_total, -> { Integer }, optional: true, nullable: false + field :credit_type_icon, -> { String }, optional: true, nullable: false + field :credit_usage, -> { Schematic::Types::CreditUsage }, optional: true, nullable: false + field :credit_usage_aggregation, -> { Schematic::Types::CreditUsageAggregation }, optional: true, nullable: false + field :credit_used, -> { Integer }, optional: true, nullable: false + field :effective_limit, -> { Integer }, optional: true, nullable: false + field :effective_price, -> { Integer }, optional: true, nullable: false + field :entitlement_expiration_date, -> { String }, optional: true, nullable: false + field :entitlement_id, -> { String }, optional: false, nullable: false + field :entitlement_source, -> { String }, optional: true, nullable: false + field :entitlement_type, -> { Schematic::Types::EntitlementType }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureInPlanResponseData }, optional: true, nullable: false + field :has_valid_allocation, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :is_unlimited, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :metric_reset_at, -> { String }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :monthly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :overuse, -> { Integer }, optional: true, nullable: false + field :percent_used, -> { Integer }, optional: true, nullable: false + field :period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false + field :plan_entitlement, -> { Schematic::Types::PlanEntitlementResponseData }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :quarterly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :usage, -> { Integer }, optional: true, nullable: false + field :yearly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false end end diff --git a/lib/schematic/types/feature_company_user_response_data.rb b/lib/schematic/types/feature_company_user_response_data.rb index 30a2719..19ac862 100644 --- a/lib/schematic/types/feature_company_user_response_data.rb +++ b/lib/schematic/types/feature_company_user_response_data.rb @@ -4,17 +4,29 @@ module Schematic module Types class FeatureCompanyUserResponseData < Internal::Types::Model field :access, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :allocation, -> { Integer }, optional: true, nullable: false + field :allocation_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false + field :entitlement_id, -> { String }, optional: false, nullable: false + field :entitlement_type, -> { Schematic::Types::EntitlementType }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureDetailResponseData }, optional: true, nullable: false + field :metric_reset_at, -> { String }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false + field :usage, -> { Integer }, optional: true, nullable: false + field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/feature_detail_response_data.rb b/lib/schematic/types/feature_detail_response_data.rb index cdda0fe..9771717 100644 --- a/lib/schematic/types/feature_detail_response_data.rb +++ b/lib/schematic/types/feature_detail_response_data.rb @@ -4,26 +4,47 @@ module Schematic module Types class FeatureDetailResponseData < Internal::Types::Model field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :billing_product, -> { Schematic::Types::BillingProductResponseData }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :event_summary, -> { Schematic::Types::EventSummaryResponseData }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + field :flags, -> { Internal::Types::Array[Schematic::Types::FlagDetailResponseData] }, optional: false, nullable: false + field :icon, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false + field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false + field :maintainer, -> { Schematic::Types::AccountMemberResponseData }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plans, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :usage_limit_trait_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/feature_entitlement.rb b/lib/schematic/types/feature_entitlement.rb index 68408a3..8a680ab 100644 --- a/lib/schematic/types/feature_entitlement.rb +++ b/lib/schematic/types/feature_entitlement.rb @@ -4,23 +4,41 @@ module Schematic module Types class FeatureEntitlement < Internal::Types::Model field :allocation, -> { Integer }, optional: true, nullable: false + field :consumption_rate, -> { Integer }, optional: true, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :credit_remaining, -> { Integer }, optional: true, nullable: false + field :credit_reserved, -> { Integer }, optional: true, nullable: false + field :credit_settled, -> { Integer }, optional: true, nullable: false + field :credit_total, -> { Integer }, optional: true, nullable: false + field :credit_used, -> { Integer }, optional: true, nullable: false + field :event_name, -> { String }, optional: true, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :feature_key, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_reset_at, -> { String }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :usage, -> { Integer }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTier] }, optional: true, nullable: false end end diff --git a/lib/schematic/types/feature_in_plan_response_data.rb b/lib/schematic/types/feature_in_plan_response_data.rb index f7ea7e6..7917dce 100644 --- a/lib/schematic/types/feature_in_plan_response_data.rb +++ b/lib/schematic/types/feature_in_plan_response_data.rb @@ -4,24 +4,43 @@ module Schematic module Types class FeatureInPlanResponseData < Internal::Types::Model field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :event_summary, -> { Schematic::Types::EventSummaryResponseData }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + field :flags, -> { Internal::Types::Array[Schematic::Types::FlagInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false + field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plans, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :usage_limit_trait_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/feature_ledger_response_data.rb b/lib/schematic/types/feature_ledger_response_data.rb index ef13dbb..428eda2 100644 --- a/lib/schematic/types/feature_ledger_response_data.rb +++ b/lib/schematic/types/feature_ledger_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class FeatureLedgerResponseData < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false + field :icon, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/feature_response_data.rb b/lib/schematic/types/feature_response_data.rb index 563b538..94a39ad 100644 --- a/lib/schematic/types/feature_response_data.rb +++ b/lib/schematic/types/feature_response_data.rb @@ -4,19 +4,33 @@ module Schematic module Types class FeatureResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + field :icon, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false + field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :usage_limit_trait_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/feature_usage_history_response_data.rb b/lib/schematic/types/feature_usage_history_response_data.rb new file mode 100644 index 0000000..ab686aa --- /dev/null +++ b/lib/schematic/types/feature_usage_history_response_data.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Schematic + module Types + class FeatureUsageHistoryResponseData < Internal::Types::Model + field :company_id, -> { String }, optional: false, nullable: false + + field :event_subtype, -> { String }, optional: false, nullable: false + + field :feature_id, -> { String }, optional: false, nullable: false + + field :period_end, -> { String }, optional: false, nullable: false + + field :period_start, -> { String }, optional: false, nullable: false + + field :usage, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/feature_usage_legacy_response_data.rb b/lib/schematic/types/feature_usage_legacy_response_data.rb index df15307..e68d8c3 100644 --- a/lib/schematic/types/feature_usage_legacy_response_data.rb +++ b/lib/schematic/types/feature_usage_legacy_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class FeatureUsageLegacyResponseData < Internal::Types::Model field :allocation, -> { Integer }, optional: true, nullable: false, api_name: "Allocation" + field :credit_usage, -> { Schematic::Types::CreditUsage }, optional: true, nullable: false, api_name: "CreditUsage" + field :entitlement, -> { String }, optional: false, nullable: false, api_name: "Entitlement" + field :feature, -> { Schematic::Types::FeatureView }, optional: true, nullable: false, api_name: "Feature" + field :metric_reset_at, -> { String }, optional: true, nullable: false, api_name: "MetricResetAt" + field :usage, -> { Integer }, optional: true, nullable: false, api_name: "Usage" end end diff --git a/lib/schematic/types/feature_usage_response_data.rb b/lib/schematic/types/feature_usage_response_data.rb index 54afc99..0999781 100644 --- a/lib/schematic/types/feature_usage_response_data.rb +++ b/lib/schematic/types/feature_usage_response_data.rb @@ -4,39 +4,73 @@ module Schematic module Types class FeatureUsageResponseData < Internal::Types::Model field :access, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :allocation, -> { Integer }, optional: true, nullable: false + field :allocation_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :company_override, -> { Schematic::Types::CompanyOverrideResponseData }, optional: true, nullable: false + field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :credit_grant_counts, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false + field :credit_grant_details, -> { Internal::Types::Array[Schematic::Types::CreditGrantDetail] }, optional: true, nullable: false + field :credit_grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: true, nullable: false + field :credit_remaining, -> { Integer }, optional: true, nullable: false + field :credit_total, -> { Integer }, optional: true, nullable: false + field :credit_type_icon, -> { String }, optional: true, nullable: false + field :credit_usage_aggregation, -> { Schematic::Types::CreditUsageAggregation }, optional: true, nullable: false + field :credit_used, -> { Integer }, optional: true, nullable: false + field :effective_limit, -> { Integer }, optional: true, nullable: false + field :effective_price, -> { Integer }, optional: true, nullable: false + field :entitlement_expiration_date, -> { String }, optional: true, nullable: false + field :entitlement_id, -> { String }, optional: false, nullable: false + field :entitlement_source, -> { String }, optional: true, nullable: false + field :entitlement_type, -> { Schematic::Types::EntitlementType }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureInPlanResponseData }, optional: true, nullable: false + field :has_valid_allocation, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :is_unlimited, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :metric_reset_at, -> { String }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :monthly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :overuse, -> { Integer }, optional: true, nullable: false + field :percent_used, -> { Integer }, optional: true, nullable: false + field :period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false + field :plan_entitlement, -> { Schematic::Types::PlanEntitlementResponseData }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :quarterly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :usage, -> { Integer }, optional: true, nullable: false + field :yearly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false end end diff --git a/lib/schematic/types/feature_usage_time_series_response_data.rb b/lib/schematic/types/feature_usage_time_series_response_data.rb index 6330e06..658d5d4 100644 --- a/lib/schematic/types/feature_usage_time_series_response_data.rb +++ b/lib/schematic/types/feature_usage_time_series_response_data.rb @@ -4,9 +4,13 @@ module Schematic module Types class FeatureUsageTimeSeriesResponseData < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + field :limits, -> { Internal::Types::Array[Schematic::Types::LimitTimeSeriesPointResponseData] }, optional: false, nullable: false + field :period_type, -> { String }, optional: true, nullable: false + field :usage_points, -> { Internal::Types::Array[Schematic::Types::UsageTimeSeriesPointResponseData] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/feature_view.rb b/lib/schematic/types/feature_view.rb index 51833e9..f40127c 100644 --- a/lib/schematic/types/feature_view.rb +++ b/lib/schematic/types/feature_view.rb @@ -4,25 +4,45 @@ module Schematic module Types class FeatureView < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :billing_product, -> { Schematic::Types::BillingProductRecordResponseData }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :event_summary, -> { Schematic::Types::EventSummaryResponseData }, optional: true, nullable: false + field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false + field :flags, -> { Internal::Types::Array[Schematic::Types::FlagView] }, optional: false, nullable: false + field :icon, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false + field :lifecycle_phase, -> { Schematic::Types::FeatureLifecyclePhase }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plans, -> { Internal::Types::Array[Schematic::Types::PreviewObject] }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :usage_limit_trait_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/flag_detail_response_data.rb b/lib/schematic/types/flag_detail_response_data.rb index 2ed860d..67ac5a2 100644 --- a/lib/schematic/types/flag_detail_response_data.rb +++ b/lib/schematic/types/flag_detail_response_data.rb @@ -4,18 +4,31 @@ module Schematic module Types class FlagDetailResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :flag_type, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :last_checked_at, -> { String }, optional: true, nullable: false + field :maintainer, -> { Schematic::Types::AccountMemberResponseData }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::RuleDetailResponseData] }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/flag_in_plan_response_data.rb b/lib/schematic/types/flag_in_plan_response_data.rb index e4d96c0..d0277ad 100644 --- a/lib/schematic/types/flag_in_plan_response_data.rb +++ b/lib/schematic/types/flag_in_plan_response_data.rb @@ -4,17 +4,29 @@ module Schematic module Types class FlagInPlanResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :flag_type, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :last_checked_at, -> { String }, optional: true, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::RuleDetailResponseData] }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/flag_response_data.rb b/lib/schematic/types/flag_response_data.rb index b1c2193..c785688 100644 --- a/lib/schematic/types/flag_response_data.rb +++ b/lib/schematic/types/flag_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class FlagResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :flag_type, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :maintainer_account_member_id, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/flag_view.rb b/lib/schematic/types/flag_view.rb index b866d59..dd0bb62 100644 --- a/lib/schematic/types/flag_view.rb +++ b/lib/schematic/types/flag_view.rb @@ -4,17 +4,29 @@ module Schematic module Types class FlagView < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :feature_id, -> { String }, optional: true, nullable: false + field :flag_type, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :last_checked_at, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::RuleView] }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/generic_preview_object.rb b/lib/schematic/types/generic_preview_object.rb index 913ef54..aad68c3 100644 --- a/lib/schematic/types/generic_preview_object.rb +++ b/lib/schematic/types/generic_preview_object.rb @@ -4,8 +4,11 @@ module Schematic module Types class GenericPreviewObject < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :image_url, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/get_onboarding_state_resp.rb b/lib/schematic/types/get_onboarding_state_resp.rb index 28e90e0..738694e 100644 --- a/lib/schematic/types/get_onboarding_state_resp.rb +++ b/lib/schematic/types/get_onboarding_state_resp.rb @@ -4,10 +4,15 @@ module Schematic module Types class GetOnboardingStateResp < Internal::Types::Model field :environment_id, -> { String }, optional: true, nullable: false + field :milestones, -> { Internal::Types::Array[Schematic::Types::OnboardingMilestoneView] }, optional: false, nullable: false + field :path, -> { Schematic::Types::OnboardingPath }, optional: true, nullable: false + field :requirements, -> { Internal::Types::Array[Schematic::Types::OnboardingRequirementView] }, optional: false, nullable: false + field :suggested_next, -> { Internal::Types::Array[Schematic::Types::OnboardingRequirement] }, optional: false, nullable: false + field :track, -> { Schematic::Types::OnboardingTrack }, optional: true, nullable: false end end diff --git a/lib/schematic/types/insights_summary_response_data.rb b/lib/schematic/types/insights_summary_response_data.rb index d7a9f12..e63afe1 100644 --- a/lib/schematic/types/insights_summary_response_data.rb +++ b/lib/schematic/types/insights_summary_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class InsightsSummaryResponseData < Internal::Types::Model field :active_credits, -> { Integer }, optional: false, nullable: false + field :mrr, -> { Internal::Types::Array[Schematic::Types::MrrResponseData] }, optional: false, nullable: false + field :paid_companies, -> { Integer }, optional: false, nullable: false + field :total_companies, -> { Integer }, optional: false, nullable: false + field :total_features, -> { Integer }, optional: false, nullable: false + field :total_plans, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/install_integration_request_body.rb b/lib/schematic/types/install_integration_request_body.rb index 0806a26..f6f090a 100644 --- a/lib/schematic/types/install_integration_request_body.rb +++ b/lib/schematic/types/install_integration_request_body.rb @@ -4,10 +4,15 @@ module Schematic module Types class InstallIntegrationRequestBody < Internal::Types::Model field :company_matching_criteria, -> { Schematic::Types::CompanyMatchingCriteria }, optional: true, nullable: false + field :company_matching_field, -> { String }, optional: true, nullable: false + field :config, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :is_sandbox, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :live_mode, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/integration_capabilities.rb b/lib/schematic/types/integration_capabilities.rb index bd78cf0..0eaf181 100644 --- a/lib/schematic/types/integration_capabilities.rb +++ b/lib/schematic/types/integration_capabilities.rb @@ -4,7 +4,9 @@ module Schematic module Types class IntegrationCapabilities < Internal::Types::Model field :author_plans, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :checkout, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :edit_billing, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/integration_config.rb b/lib/schematic/types/integration_config.rb index bded1f6..af94c9a 100644 --- a/lib/schematic/types/integration_config.rb +++ b/lib/schematic/types/integration_config.rb @@ -8,9 +8,13 @@ class IntegrationConfig < Internal::Types::Model discriminant :type member -> { Schematic::Types::ClerkIntegrationConfig }, key: "CLERK" + member -> { Schematic::Types::MetronomeIntegrationConfig }, key: "METRONOME" + member -> { Schematic::Types::OrbIntegrationConfig }, key: "ORB" + member -> { Schematic::Types::StripeIntegrationConfig }, key: "STRIPE" + member -> { Schematic::Types::WorkOsIntegrationConfig }, key: "WORKOS" end end diff --git a/lib/schematic/types/integration_install_config.rb b/lib/schematic/types/integration_install_config.rb index 8aaa0c8..a093e1c 100644 --- a/lib/schematic/types/integration_install_config.rb +++ b/lib/schematic/types/integration_install_config.rb @@ -4,14 +4,23 @@ module Schematic module Types class IntegrationInstallConfig < Internal::Types::Model field :company_matching_criteria, -> { Schematic::Types::CompanyMatchingCriteria }, optional: true, nullable: false + field :company_matching_field, -> { String }, optional: true, nullable: false + field :config, -> { Schematic::Types::IntegrationConfig }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :integration_id, -> { String }, optional: false, nullable: false + field :is_app_install, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_connect_install, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :live_mode, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/integration_install_response_data.rb b/lib/schematic/types/integration_install_response_data.rb index 6260089..f44ccce 100644 --- a/lib/schematic/types/integration_install_response_data.rb +++ b/lib/schematic/types/integration_install_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class IntegrationInstallResponseData < Internal::Types::Model field :capabilities, -> { Schematic::Types::IntegrationCapabilities }, optional: false, nullable: false + field :config, -> { Schematic::Types::IntegrationInstallConfig }, optional: false, nullable: false + field :integration, -> { Schematic::Types::IntegrationResponseData }, optional: false, nullable: false end end diff --git a/lib/schematic/types/integration_response_data.rb b/lib/schematic/types/integration_response_data.rb index 05d4f8c..1ec3559 100644 --- a/lib/schematic/types/integration_response_data.rb +++ b/lib/schematic/types/integration_response_data.rb @@ -4,9 +4,13 @@ module Schematic module Types class IntegrationResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/integration_webhook_url_response_data.rb b/lib/schematic/types/integration_webhook_url_response_data.rb index 1c1ad68..e899103 100644 --- a/lib/schematic/types/integration_webhook_url_response_data.rb +++ b/lib/schematic/types/integration_webhook_url_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class IntegrationWebhookUrlResponseData < Internal::Types::Model field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + field :url, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/integrations_list_response_data.rb b/lib/schematic/types/integrations_list_response_data.rb index edfd46b..b8a0b3f 100644 --- a/lib/schematic/types/integrations_list_response_data.rb +++ b/lib/schematic/types/integrations_list_response_data.rb @@ -4,12 +4,19 @@ module Schematic module Types class IntegrationsListResponseData < Internal::Types::Model field :capabilities, -> { Schematic::Types::IntegrationCapabilities }, optional: false, nullable: false + field :config, -> { Schematic::Types::IntegrationConfig }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :is_app_install, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_connect_install, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :last_webhook_received_at, -> { String }, optional: true, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/integrations_response_data.rb b/lib/schematic/types/integrations_response_data.rb index 06a62f9..cf60b3e 100644 --- a/lib/schematic/types/integrations_response_data.rb +++ b/lib/schematic/types/integrations_response_data.rb @@ -4,9 +4,13 @@ module Schematic module Types class IntegrationsResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :state, -> { Schematic::Types::IntegrationState }, optional: false, nullable: false + field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/invoice_request_body.rb b/lib/schematic/types/invoice_request_body.rb index d733455..963480b 100644 --- a/lib/schematic/types/invoice_request_body.rb +++ b/lib/schematic/types/invoice_request_body.rb @@ -4,18 +4,31 @@ module Schematic module Types class InvoiceRequestBody < Internal::Types::Model field :amount_due, -> { Integer }, optional: false, nullable: false + field :amount_paid, -> { Integer }, optional: false, nullable: false + field :amount_remaining, -> { Integer }, optional: false, nullable: false + field :collection_method, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :due_date, -> { String }, optional: true, nullable: false + field :ending_balance, -> { Integer }, optional: true, nullable: false + field :payment_method_external_id, -> { String }, optional: true, nullable: false + field :starting_balance, -> { Integer }, optional: true, nullable: false + field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false + field :subscription_external_id, -> { String }, optional: true, nullable: false + field :subtotal, -> { Integer }, optional: false, nullable: false + field :url, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/invoice_response_data.rb b/lib/schematic/types/invoice_response_data.rb index aae9382..57651cf 100644 --- a/lib/schematic/types/invoice_response_data.rb +++ b/lib/schematic/types/invoice_response_data.rb @@ -4,25 +4,45 @@ module Schematic module Types class InvoiceResponseData < Internal::Types::Model field :amount_due, -> { Integer }, optional: false, nullable: false + field :amount_paid, -> { Integer }, optional: false, nullable: false + field :amount_remaining, -> { Integer }, optional: false, nullable: false + field :collection_method, -> { String }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :due_date, -> { String }, optional: true, nullable: false + field :ending_balance, -> { Integer }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :payment_method_external_id, -> { String }, optional: true, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :starting_balance, -> { Integer }, optional: false, nullable: false + field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false + field :subscription_external_id, -> { String }, optional: true, nullable: false + field :subtotal, -> { Integer }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :url, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/issue_temporary_access_token_response_data.rb b/lib/schematic/types/issue_temporary_access_token_response_data.rb index d73de8c..66939c7 100644 --- a/lib/schematic/types/issue_temporary_access_token_response_data.rb +++ b/lib/schematic/types/issue_temporary_access_token_response_data.rb @@ -4,12 +4,19 @@ module Schematic module Types class IssueTemporaryAccessTokenResponseData < Internal::Types::Model field :api_key_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :expired_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :resource_type, -> { String }, optional: false, nullable: false + field :token, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/license_response_data.rb b/lib/schematic/types/license_response_data.rb index ed6a4ce..2bc5b01 100644 --- a/lib/schematic/types/license_response_data.rb +++ b/lib/schematic/types/license_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class LicenseResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/limit_time_series_point_response_data.rb b/lib/schematic/types/limit_time_series_point_response_data.rb index 374cb8c..0791fb4 100644 --- a/lib/schematic/types/limit_time_series_point_response_data.rb +++ b/lib/schematic/types/limit_time_series_point_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class LimitTimeSeriesPointResponseData < Internal::Types::Model field :effective_at, -> { String }, optional: false, nullable: false + field :is_soft_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :limit_source, -> { Schematic::Types::EntitlementType }, optional: false, nullable: false + field :limit_value, -> { Integer }, optional: true, nullable: false + field :plan_id, -> { String }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false end end diff --git a/lib/schematic/types/manage_plan_request.rb b/lib/schematic/types/manage_plan_request.rb index 460f1dc..b3bc9e7 100644 --- a/lib/schematic/types/manage_plan_request.rb +++ b/lib/schematic/types/manage_plan_request.rb @@ -4,26 +4,47 @@ module Schematic module Types class ManagePlanRequest < Internal::Types::Model field :activate_on_payment, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :add_on_selections, -> { Internal::Types::Array[Schematic::Types::PlanSelection] }, optional: false, nullable: false + field :base_plan_id, -> { String }, optional: true, nullable: false + field :base_plan_price_id, -> { String }, optional: true, nullable: false + field :base_plan_version_id, -> { String }, optional: true, nullable: false + field :billing_cycle_anchor, -> { String }, optional: true, nullable: false + field :billing_email, -> { String }, optional: true, nullable: false + field :billing_entity_id, -> { String }, optional: true, nullable: false + field :cancel_immediately, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :collection_method, -> { Schematic::Types::BillingCollectionMethod }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :coupon_external_id, -> { String }, optional: true, nullable: false + field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false + field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false + field :days_until_due, -> { Integer }, optional: true, nullable: false + field :pay_in_advance_entitlements, -> { Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody] }, optional: false, nullable: false + field :payment_method_external_id, -> { String }, optional: true, nullable: false + field :promo_code, -> { String }, optional: true, nullable: false + field :prorate, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :prorate_first_period, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :trial_end, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/manage_plan_response_response_data.rb b/lib/schematic/types/manage_plan_response_response_data.rb index 1a3a09d..c39735b 100644 --- a/lib/schematic/types/manage_plan_response_response_data.rb +++ b/lib/schematic/types/manage_plan_response_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class ManagePlanResponseResponseData < Internal::Types::Model field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false + field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/meter_request_body.rb b/lib/schematic/types/meter_request_body.rb index 37c7ef3..f85d5ad 100644 --- a/lib/schematic/types/meter_request_body.rb +++ b/lib/schematic/types/meter_request_body.rb @@ -4,7 +4,9 @@ module Schematic module Types class MeterRequestBody < Internal::Types::Model field :display_name, -> { String }, optional: false, nullable: false + field :event_name, -> { String }, optional: false, nullable: false + field :event_payload_key, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/migration_proration_behavior.rb b/lib/schematic/types/migration_proration_behavior.rb index 8bcf916..f579495 100644 --- a/lib/schematic/types/migration_proration_behavior.rb +++ b/lib/schematic/types/migration_proration_behavior.rb @@ -7,6 +7,7 @@ module MigrationProrationBehavior ALWAYS_INVOICE = "always_invoice" CREATE_PRORATIONS = "create_prorations" + NONE = "none" end end end diff --git a/lib/schematic/types/mrr_response_data.rb b/lib/schematic/types/mrr_response_data.rb index 7d5ec94..569f55d 100644 --- a/lib/schematic/types/mrr_response_data.rb +++ b/lib/schematic/types/mrr_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class MrrResponseData < Internal::Types::Model field :amount, -> { Integer }, optional: false, nullable: false + field :currency, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/onboarding_milestone_view.rb b/lib/schematic/types/onboarding_milestone_view.rb index 880be83..ca14deb 100644 --- a/lib/schematic/types/onboarding_milestone_view.rb +++ b/lib/schematic/types/onboarding_milestone_view.rb @@ -4,8 +4,11 @@ module Schematic module Types class OnboardingMilestoneView < Internal::Types::Model field :id, -> { Schematic::Types::OnboardingMilestone }, optional: false, nullable: false + field :missing, -> { Internal::Types::Array[Schematic::Types::OnboardingRequirement] }, optional: false, nullable: false + field :progress, -> { Integer }, optional: false, nullable: false + field :reached_at, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/onboarding_requirement_view.rb b/lib/schematic/types/onboarding_requirement_view.rb index d546a77..e4d9853 100644 --- a/lib/schematic/types/onboarding_requirement_view.rb +++ b/lib/schematic/types/onboarding_requirement_view.rb @@ -4,8 +4,13 @@ module Schematic module Types class OnboardingRequirementView < Internal::Types::Model field :blocked_by, -> { Internal::Types::Array[Schematic::Types::OnboardingRequirement] }, optional: true, nullable: false + field :id, -> { Schematic::Types::OnboardingRequirement }, optional: false, nullable: false + + field :reached_at, -> { String }, optional: true, nullable: false + field :satisfied_by, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::OnboardingRequirementStatus }, optional: false, nullable: false end end diff --git a/lib/schematic/types/ordered_plans_in_group.rb b/lib/schematic/types/ordered_plans_in_group.rb index 968c79c..de01d59 100644 --- a/lib/schematic/types/ordered_plans_in_group.rb +++ b/lib/schematic/types/ordered_plans_in_group.rb @@ -4,6 +4,7 @@ module Schematic module Types class OrderedPlansInGroup < Internal::Types::Model field :entitlements, -> { Internal::Types::Array[Schematic::Types::EntitlementsInPlan] }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/payment_method_request_body.rb b/lib/schematic/types/payment_method_request_body.rb index 0d005ab..73c60d4 100644 --- a/lib/schematic/types/payment_method_request_body.rb +++ b/lib/schematic/types/payment_method_request_body.rb @@ -4,15 +4,25 @@ module Schematic module Types class PaymentMethodRequestBody < Internal::Types::Model field :account_last_4, -> { String }, optional: true, nullable: false, api_name: "account_last4" + field :account_name, -> { String }, optional: true, nullable: false + field :bank_name, -> { String }, optional: true, nullable: false + field :billing_email, -> { String }, optional: true, nullable: false + field :billing_name, -> { String }, optional: true, nullable: false + field :card_brand, -> { String }, optional: true, nullable: false + field :card_exp_month, -> { Integer }, optional: true, nullable: false + field :card_exp_year, -> { Integer }, optional: true, nullable: false + field :card_last_4, -> { String }, optional: true, nullable: false, api_name: "card_last4" + field :customer_external_id, -> { String }, optional: false, nullable: false + field :payment_method_type, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/payment_method_response_data.rb b/lib/schematic/types/payment_method_response_data.rb index ad5e245..d351c0e 100644 --- a/lib/schematic/types/payment_method_response_data.rb +++ b/lib/schematic/types/payment_method_response_data.rb @@ -4,22 +4,39 @@ module Schematic module Types class PaymentMethodResponseData < Internal::Types::Model field :account_last_4, -> { String }, optional: true, nullable: false, api_name: "account_last4" + field :account_name, -> { String }, optional: true, nullable: false + field :bank_name, -> { String }, optional: true, nullable: false + field :billing_email, -> { String }, optional: true, nullable: false + field :billing_name, -> { String }, optional: true, nullable: false + field :card_brand, -> { String }, optional: true, nullable: false + field :card_exp_month, -> { Integer }, optional: true, nullable: false + field :card_exp_year, -> { Integer }, optional: true, nullable: false + field :card_last_4, -> { String }, optional: true, nullable: false, api_name: "card_last4" + field :company_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :customer_external_id, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :external_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :payment_method_type, -> { String }, optional: false, nullable: false + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_bundle_credit_grant_request_body.rb b/lib/schematic/types/plan_bundle_credit_grant_request_body.rb index 0513507..fc6a960 100644 --- a/lib/schematic/types/plan_bundle_credit_grant_request_body.rb +++ b/lib/schematic/types/plan_bundle_credit_grant_request_body.rb @@ -4,9 +4,13 @@ module Schematic module Types class PlanBundleCreditGrantRequestBody < Internal::Types::Model field :action, -> { Schematic::Types::PlanBundleAction }, optional: false, nullable: false + field :create_req, -> { Schematic::Types::CreateBillingPlanCreditGrantRequestBody }, optional: true, nullable: false + field :credit_grant_id, -> { String }, optional: true, nullable: false + field :delete_req, -> { Schematic::Types::DeleteBillingPlanCreditGrantRequestBody }, optional: true, nullable: false + field :update_req, -> { Schematic::Types::UpdateBillingPlanCreditGrantRequestBody }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_bundle_entitlement_request_body.rb b/lib/schematic/types/plan_bundle_entitlement_request_body.rb index 9e2708f..7958a62 100644 --- a/lib/schematic/types/plan_bundle_entitlement_request_body.rb +++ b/lib/schematic/types/plan_bundle_entitlement_request_body.rb @@ -4,7 +4,9 @@ module Schematic module Types class PlanBundleEntitlementRequestBody < Internal::Types::Model field :action, -> { Schematic::Types::PlanBundleAction }, optional: false, nullable: false + field :entitlement_id, -> { String }, optional: true, nullable: false + field :req, -> { Schematic::Types::CreateEntitlementInBundleRequestBody }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_bundle_response_data.rb b/lib/schematic/types/plan_bundle_response_data.rb index d34d56c..91bff35 100644 --- a/lib/schematic/types/plan_bundle_response_data.rb +++ b/lib/schematic/types/plan_bundle_response_data.rb @@ -4,9 +4,13 @@ module Schematic module Types class PlanBundleResponseData < Internal::Types::Model field :billing_product, -> { Schematic::Types::BillingProductPlanResponseData }, optional: true, nullable: false + field :credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false + field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false + field :plan_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_catalog_membership_response_data.rb b/lib/schematic/types/plan_catalog_membership_response_data.rb index e8cc48e..d72dbfe 100644 --- a/lib/schematic/types/plan_catalog_membership_response_data.rb +++ b/lib/schematic/types/plan_catalog_membership_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class PlanCatalogMembershipResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_change_response_data.rb b/lib/schematic/types/plan_change_response_data.rb index d25d025..1a5d884 100644 --- a/lib/schematic/types/plan_change_response_data.rb +++ b/lib/schematic/types/plan_change_response_data.rb @@ -4,28 +4,57 @@ module Schematic module Types class PlanChangeResponseData < Internal::Types::Model field :action, -> { Schematic::Types::PlanChangeAction }, optional: false, nullable: false + field :actor_type, -> { Schematic::Types::ActorType }, optional: false, nullable: false + field :add_ons_added, -> { Internal::Types::Array[Schematic::Types::PlanSnapshotView] }, optional: false, nullable: false + field :add_ons_removed, -> { Internal::Types::Array[Schematic::Types::PlanSnapshotView] }, optional: false, nullable: false + field :api_key, -> { Schematic::Types::ApiKeyResponseData }, optional: true, nullable: false + field :audit_log, -> { Schematic::Types::AuditLogListResponseData }, optional: true, nullable: false + field :base_plan, -> { Schematic::Types::PlanSnapshotView }, optional: true, nullable: false + field :base_plan_action, -> { Schematic::Types::PlanChangeBasePlanAction }, optional: true, nullable: false + field :base_plan_version, -> { Schematic::Types::PlanVersionSnapshotView }, optional: true, nullable: false + field :company, -> { Schematic::Types::CompanyResponseData }, optional: true, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :integration, -> { Schematic::Types::IntegrationResponseData }, optional: true, nullable: false + field :is_version_upgrade, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :previous_base_plan, -> { Schematic::Types::PlanSnapshotView }, optional: true, nullable: false + field :previous_base_plan_version, -> { Schematic::Types::PlanVersionSnapshotView }, optional: true, nullable: false + field :request_id, -> { String }, optional: true, nullable: false + field :subscription_change_action, -> { Schematic::Types::PlanChangeSubscriptionAction }, optional: true, nullable: false + field :traits_updated, -> { Internal::Types::Array[Schematic::Types::SubscriptionTraitUpdate] }, optional: false, nullable: false + + field :trial_converted_at, -> { String }, optional: true, nullable: false + + field :trial_expires_at, -> { String }, optional: true, nullable: false + + field :trial_status, -> { Schematic::Types::TrialStatus }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :user_name, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_credit_grant_view.rb b/lib/schematic/types/plan_credit_grant_view.rb index 365a417..8e5b0f9 100644 --- a/lib/schematic/types/plan_credit_grant_view.rb +++ b/lib/schematic/types/plan_credit_grant_view.rb @@ -4,39 +4,73 @@ module Schematic module Types class PlanCreditGrantView < Internal::Types::Model field :billing_credit_auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :billing_credit_auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :billing_credit_auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false + field :billing_credit_auto_topup_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :billing_credit_auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :billing_credit_auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :billing_credit_auto_topup_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :billing_credit_auto_topup_self_service, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :billing_credit_auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false + field :billing_credit_auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :billing_credit_can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :company_credit_amount, -> { Integer }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credit, -> { Schematic::Types::BillingCreditView }, optional: true, nullable: false + field :credit_amount, -> { Integer }, optional: false, nullable: false + field :credit_description, -> { String }, optional: false, nullable: false + field :credit_icon, -> { String }, optional: true, nullable: false + field :credit_id, -> { String }, optional: false, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :license_id, -> { String }, optional: true, nullable: false + field :plan, -> { Schematic::Types::GenericPreviewObject }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id, -> { String }, optional: true, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false + field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: true, nullable: false + field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: false, nullable: false + field :rollover_percentage, -> { Integer }, optional: false, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false + field :singular_name, -> { String }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_currency_price_request_body.rb b/lib/schematic/types/plan_currency_price_request_body.rb index 30ea894..54c163b 100644 --- a/lib/schematic/types/plan_currency_price_request_body.rb +++ b/lib/schematic/types/plan_currency_price_request_body.rb @@ -4,9 +4,13 @@ module Schematic module Types class PlanCurrencyPriceRequestBody < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :monthly_price, -> { Integer }, optional: true, nullable: false + field :one_time_price, -> { Integer }, optional: true, nullable: false + field :quarterly_price, -> { Integer }, optional: true, nullable: false + field :yearly_price, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_currency_prices_response_data.rb b/lib/schematic/types/plan_currency_prices_response_data.rb index 5731c3a..535fccd 100644 --- a/lib/schematic/types/plan_currency_prices_response_data.rb +++ b/lib/schematic/types/plan_currency_prices_response_data.rb @@ -4,9 +4,13 @@ module Schematic module Types class PlanCurrencyPricesResponseData < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :one_time_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :quarterly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :yearly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_detail_response_data.rb b/lib/schematic/types/plan_detail_response_data.rb index f7429a5..2eda1fb 100644 --- a/lib/schematic/types/plan_detail_response_data.rb +++ b/lib/schematic/types/plan_detail_response_data.rb @@ -4,39 +4,73 @@ module Schematic module Types class PlanDetailResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false + field :audience_type, -> { String }, optional: true, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false + field :catalogs, -> { Internal::Types::Array[Schematic::Types::PlanCatalogMembershipResponseData] }, optional: true, nullable: false + field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false + field :company_count, -> { Integer }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_logo_url, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: true, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false + field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false + field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :one_time_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false + field :quarterly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :versions, -> { Internal::Types::Array[Schematic::Types::PlanVersionResponseData] }, optional: false, nullable: false + field :yearly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_entitlement_response_data.rb b/lib/schematic/types/plan_entitlement_response_data.rb index b8b2138..ad14879 100644 --- a/lib/schematic/types/plan_entitlement_response_data.rb +++ b/lib/schematic/types/plan_entitlement_response_data.rb @@ -4,34 +4,63 @@ module Schematic module Types class PlanEntitlementResponseData < Internal::Types::Model field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :consumption_rate, -> { Integer }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::EntitlementCurrencyPricesResponseData] }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :metered_monthly_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :metered_quarterly_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :metered_yearly_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :plan, -> { Schematic::Types::PlanResponseData }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :rule_id, -> { String }, optional: false, nullable: false + field :rule_id_usage_exceeded, -> { String }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :usage_based_product, -> { Schematic::Types::BillingProductResponseData }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit, -> { Schematic::Types::BillingCreditResponseData }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierResponseData] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_entitlements_order.rb b/lib/schematic/types/plan_entitlements_order.rb index 5456d28..4d4d661 100644 --- a/lib/schematic/types/plan_entitlements_order.rb +++ b/lib/schematic/types/plan_entitlements_order.rb @@ -4,6 +4,7 @@ module Schematic module Types class PlanEntitlementsOrder < Internal::Types::Model field :plan_entitlement_id, -> { String }, optional: false, nullable: false + field :visible, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_group_detail_response_data.rb b/lib/schematic/types/plan_group_detail_response_data.rb index 88f9361..b777db2 100644 --- a/lib/schematic/types/plan_group_detail_response_data.rb +++ b/lib/schematic/types/plan_group_detail_response_data.rb @@ -4,42 +4,79 @@ module Schematic module Types class PlanGroupDetailResponseData < Internal::Types::Model field :add_ons, -> { Internal::Types::Array[Schematic::Types::PlanGroupPlanDetailResponseData] }, optional: false, nullable: false + field :checkout_settings, -> { Schematic::Types::CheckoutSettingsResponseData }, optional: false, nullable: false + field :component_settings, -> { Schematic::Types::ComponentSettingsResponseData }, optional: false, nullable: false + field :custom_checkout_fields, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldResponseData] }, optional: false, nullable: false + field :custom_plan_config, -> { Schematic::Types::CustomPlanViewConfigResponseData }, optional: true, nullable: false + field :custom_plan_id, -> { String }, optional: true, nullable: false + field :default_plan, -> { Schematic::Types::PlanGroupPlanDetailResponseData }, optional: true, nullable: false + field :default_plan_id, -> { String }, optional: true, nullable: false + field :fallback_plan, -> { Schematic::Types::PlanGroupPlanDetailResponseData }, optional: true, nullable: false + field :fallback_plan_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :initial_plan, -> { Schematic::Types::PlanGroupPlanDetailResponseData }, optional: true, nullable: false + field :initial_plan_id, -> { String }, optional: true, nullable: false + field :initial_plan_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :initial_plan_price_id, -> { String }, optional: true, nullable: false + field :ordered_add_on_list, -> { Internal::Types::Array[Schematic::Types::PlanGroupPlanEntitlementsOrder] }, optional: false, nullable: false + field :ordered_bundle_list, -> { Internal::Types::Array[Schematic::Types::PlanGroupBundleOrder] }, optional: false, nullable: false + field :ordered_plan_list, -> { Internal::Types::Array[Schematic::Types::PlanGroupPlanEntitlementsOrder] }, optional: false, nullable: false + field :plans, -> { Internal::Types::Array[Schematic::Types::PlanGroupPlanDetailResponseData] }, optional: false, nullable: false + field :prevent_downgrades_when_over_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade_button_text, -> { String }, optional: true, nullable: false + field :prevent_self_service_downgrade_url, -> { String }, optional: true, nullable: false + field :proration_behavior, -> { String }, optional: false, nullable: false + field :scheduled_downgrade_behavior, -> { String }, optional: true, nullable: false + field :scheduled_downgrade_prevent_when_over_limit, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :show_as_monthly_prices, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_period_toggle, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_zero_price_as_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :sync_customer_billing_details, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :tax_collection_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :trial_expiry_plan, -> { Schematic::Types::PlanGroupPlanDetailResponseData }, optional: true, nullable: false + field :trial_expiry_plan_id, -> { String }, optional: true, nullable: false + field :trial_expiry_plan_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :trial_expiry_plan_price_id, -> { String }, optional: true, nullable: false + field :trial_payment_method_required, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_group_plan_detail_response_data.rb b/lib/schematic/types/plan_group_plan_detail_response_data.rb index a85e079..a3d134f 100644 --- a/lib/schematic/types/plan_group_plan_detail_response_data.rb +++ b/lib/schematic/types/plan_group_plan_detail_response_data.rb @@ -4,43 +4,81 @@ module Schematic module Types class PlanGroupPlanDetailResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false + field :audience_type, -> { String }, optional: true, nullable: false + field :available_periods, -> { Internal::Types::Array[Schematic::Types::PlanPriceCadence] }, optional: false, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false + field :catalogs, -> { Internal::Types::Array[Schematic::Types::PlanCatalogMembershipResponseData] }, optional: true, nullable: false + field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false + field :company_count, -> { Integer }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_logo_url, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: true, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false + field :custom_plan_config, -> { Schematic::Types::CustomPlanViewConfigResponseData }, optional: true, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false + field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantResponseData] }, optional: true, nullable: false + field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :one_time_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false + field :quarterly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :versions, -> { Internal::Types::Array[Schematic::Types::PlanVersionResponseData] }, optional: false, nullable: false + field :yearly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_group_plan_entitlements_order.rb b/lib/schematic/types/plan_group_plan_entitlements_order.rb index c8b93a6..56941e3 100644 --- a/lib/schematic/types/plan_group_plan_entitlements_order.rb +++ b/lib/schematic/types/plan_group_plan_entitlements_order.rb @@ -4,6 +4,7 @@ module Schematic module Types class PlanGroupPlanEntitlementsOrder < Internal::Types::Model field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementsOrder] }, optional: true, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_group_response_data.rb b/lib/schematic/types/plan_group_response_data.rb index 6cec2c8..4da736a 100644 --- a/lib/schematic/types/plan_group_response_data.rb +++ b/lib/schematic/types/plan_group_response_data.rb @@ -4,32 +4,59 @@ module Schematic module Types class PlanGroupResponseData < Internal::Types::Model field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlansResponseData] }, optional: false, nullable: false + field :add_on_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :checkout_settings, -> { Schematic::Types::CheckoutSettingsResponseData }, optional: false, nullable: false + field :component_settings, -> { Schematic::Types::ComponentSettingsResponseData }, optional: false, nullable: false + field :default_plan_id, -> { String }, optional: true, nullable: false + field :fallback_plan_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :initial_plan_id, -> { String }, optional: true, nullable: false + field :initial_plan_price_id, -> { String }, optional: true, nullable: false + field :ordered_add_on_ids, -> { Internal::Types::Array[Schematic::Types::OrderedPlansInGroup] }, optional: false, nullable: false + field :plan_ids, -> { Internal::Types::Array[Schematic::Types::OrderedPlansInGroup] }, optional: false, nullable: false + field :prevent_downgrades_when_over_limit, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :prevent_self_service_downgrade_button_text, -> { String }, optional: true, nullable: false + field :prevent_self_service_downgrade_url, -> { String }, optional: true, nullable: false + field :proration_behavior, -> { String }, optional: false, nullable: false + field :scheduled_downgrade_behavior, -> { String }, optional: true, nullable: false + field :scheduled_downgrade_prevent_when_over_limit, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :show_as_monthly_prices, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_period_toggle, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_zero_price_as_free, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :sync_customer_billing_details, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :tax_collection_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :trial_expiry_plan_id, -> { String }, optional: true, nullable: false + field :trial_expiry_plan_price_id, -> { String }, optional: true, nullable: false + field :trial_payment_method_required, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_growth_point_response_data.rb b/lib/schematic/types/plan_growth_point_response_data.rb index 01ffea5..32df188 100644 --- a/lib/schematic/types/plan_growth_point_response_data.rb +++ b/lib/schematic/types/plan_growth_point_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class PlanGrowthPointResponseData < Internal::Types::Model field :month, -> { String }, optional: false, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_name, -> { String }, optional: false, nullable: false + field :subscribers, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_issue_response_data.rb b/lib/schematic/types/plan_issue_response_data.rb index 8f415c6..0b45aa3 100644 --- a/lib/schematic/types/plan_issue_response_data.rb +++ b/lib/schematic/types/plan_issue_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class PlanIssueResponseData < Internal::Types::Model field :code, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :detail, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_response_data.rb b/lib/schematic/types/plan_response_data.rb index 2a2de02..dbf554f 100644 --- a/lib/schematic/types/plan_response_data.rb +++ b/lib/schematic/types/plan_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class PlanResponseData < Internal::Types::Model field :audience_type, -> { String }, optional: true, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_selection.rb b/lib/schematic/types/plan_selection.rb index f5d6a73..7f32390 100644 --- a/lib/schematic/types/plan_selection.rb +++ b/lib/schematic/types/plan_selection.rb @@ -4,7 +4,9 @@ module Schematic module Types class PlanSelection < Internal::Types::Model field :plan_id, -> { String }, optional: false, nullable: false + field :price_id, -> { String }, optional: true, nullable: false + field :version_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/plan_snapshot_view.rb b/lib/schematic/types/plan_snapshot_view.rb index a7c031e..ae16493 100644 --- a/lib/schematic/types/plan_snapshot_view.rb +++ b/lib/schematic/types/plan_snapshot_view.rb @@ -4,9 +4,13 @@ module Schematic module Types class PlanSnapshotView < Internal::Types::Model field :deleted, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :icon, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_trait_response_data.rb b/lib/schematic/types/plan_trait_response_data.rb index 78c0dba..6fccdd9 100644 --- a/lib/schematic/types/plan_trait_response_data.rb +++ b/lib/schematic/types/plan_trait_response_data.rb @@ -4,13 +4,21 @@ module Schematic module Types class PlanTraitResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_type, -> { String }, optional: false, nullable: false + field :trait_id, -> { String }, optional: false, nullable: false + field :trait_value, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_version_company_migration_response_data.rb b/lib/schematic/types/plan_version_company_migration_response_data.rb index 3626429..acd072e 100644 --- a/lib/schematic/types/plan_version_company_migration_response_data.rb +++ b/lib/schematic/types/plan_version_company_migration_response_data.rb @@ -4,16 +4,27 @@ module Schematic module Types class PlanVersionCompanyMigrationResponseData < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :company_name, -> { String }, optional: false, nullable: false + field :completed_at, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :error, -> { String }, optional: true, nullable: false + field :error_code, -> { Schematic::Types::MigrationErrorCode }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :migration_id, -> { String }, optional: false, nullable: false + field :plan_version_id_from, -> { String }, optional: true, nullable: false + field :started_at, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::PlanVersionCompanyMigrationStatus }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_version_migration_preview_company_response_data.rb b/lib/schematic/types/plan_version_migration_preview_company_response_data.rb index 07a20a1..e38e32e 100644 --- a/lib/schematic/types/plan_version_migration_preview_company_response_data.rb +++ b/lib/schematic/types/plan_version_migration_preview_company_response_data.rb @@ -4,11 +4,18 @@ module Schematic module Types class PlanVersionMigrationPreviewCompanyResponseData < Internal::Types::Model field :company_id, -> { String }, optional: false, nullable: false + field :has_billing_changes, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :has_custom_pricing, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :note, -> { String }, optional: true, nullable: false + field :plan_version_id_from, -> { String }, optional: true, nullable: false + field :will_update_subscription, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :would_fail, -> { Internal::Types::Boolean }, optional: false, nullable: false end end end diff --git a/lib/schematic/types/plan_version_migration_preview_response_data.rb b/lib/schematic/types/plan_version_migration_preview_response_data.rb index fa48837..df818b7 100644 --- a/lib/schematic/types/plan_version_migration_preview_response_data.rb +++ b/lib/schematic/types/plan_version_migration_preview_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class PlanVersionMigrationPreviewResponseData < Internal::Types::Model field :companies, -> { Internal::Types::Array[Schematic::Types::PlanVersionMigrationPreviewCompanyResponseData] }, optional: false, nullable: false + field :has_billing_changes, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_version_migration_response_data.rb b/lib/schematic/types/plan_version_migration_response_data.rb index b2577e2..1d4be18 100644 --- a/lib/schematic/types/plan_version_migration_response_data.rb +++ b/lib/schematic/types/plan_version_migration_response_data.rb @@ -4,21 +4,37 @@ module Schematic module Types class PlanVersionMigrationResponseData < Internal::Types::Model field :completed_at, -> { String }, optional: true, nullable: false + field :completed_companies, -> { Integer }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :error, -> { String }, optional: true, nullable: false + field :failed_companies, -> { Integer }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :plan_id, -> { String }, optional: false, nullable: false + field :plan_version_id_from, -> { String }, optional: true, nullable: false + field :plan_version_id_to, -> { String }, optional: false, nullable: false + field :plan_version_ids_from, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false + field :skipped_companies, -> { Integer }, optional: false, nullable: false + field :started_at, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::PlanVersionMigrationStatus }, optional: false, nullable: false + field :strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false + field :total_companies, -> { Integer }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_version_response_data.rb b/lib/schematic/types/plan_version_response_data.rb index 743097d..18e025a 100644 --- a/lib/schematic/types/plan_version_response_data.rb +++ b/lib/schematic/types/plan_version_response_data.rb @@ -4,15 +4,25 @@ module Schematic module Types class PlanVersionResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :original_plan_id, -> { String }, optional: true, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false + field :status, -> { Schematic::Types::PlanVersionStatus }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :version, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_version_snapshot_view.rb b/lib/schematic/types/plan_version_snapshot_view.rb index d158598..f4bfecc 100644 --- a/lib/schematic/types/plan_version_snapshot_view.rb +++ b/lib/schematic/types/plan_version_snapshot_view.rb @@ -4,7 +4,9 @@ module Schematic module Types class PlanVersionSnapshotView < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :version, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/plan_view_public_response_data.rb b/lib/schematic/types/plan_view_public_response_data.rb index 4a3305d..a41c4f2 100644 --- a/lib/schematic/types/plan_view_public_response_data.rb +++ b/lib/schematic/types/plan_view_public_response_data.rb @@ -4,44 +4,83 @@ module Schematic module Types class PlanViewPublicResponseData < Internal::Types::Model field :active_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false + field :audience_type, -> { String }, optional: true, nullable: false + field :available_periods, -> { Internal::Types::Array[Schematic::Types::PlanPriceCadence] }, optional: false, nullable: false + field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false + field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false + field :catalogs, -> { Internal::Types::Array[Schematic::Types::PlanCatalogMembershipResponseData] }, optional: true, nullable: false + field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false + field :company_count, -> { Integer }, optional: false, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_logo_url, -> { String }, optional: true, nullable: false + field :company_name, -> { String }, optional: true, nullable: false + field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :controlled_by, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + field :copied_from_plan_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false + field :custom, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :custom_plan_config, -> { Schematic::Types::CustomPlanConfig }, optional: true, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :draft_version, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementResponseData] }, optional: true, nullable: false + field :features, -> { Internal::Types::Array[Schematic::Types::FeatureInPlanResponseData] }, optional: false, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantView] }, optional: false, nullable: false + field :is_custom, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_default, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :is_free, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :monthly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :one_time_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false + field :quarterly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :versions, -> { Internal::Types::Array[Schematic::Types::PlanVersionResponseData] }, optional: false, nullable: false + field :yearly_price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/preflight_event_usage_request_body.rb b/lib/schematic/types/preflight_event_usage_request_body.rb new file mode 100644 index 0000000..98832a8 --- /dev/null +++ b/lib/schematic/types/preflight_event_usage_request_body.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PreflightEventUsageRequestBody < Internal::Types::Model + field :event_subtype, -> { String }, optional: false, nullable: false + + field :quantity, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/schematic/types/preflight_request_body.rb b/lib/schematic/types/preflight_request_body.rb new file mode 100644 index 0000000..2b639ae --- /dev/null +++ b/lib/schematic/types/preflight_request_body.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Schematic + module Types + class PreflightRequestBody < Internal::Types::Model + field :credit_cost, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false + + field :event_usage, -> { Schematic::Types::PreflightEventUsageRequestBody }, optional: true, nullable: false + + field :usage, -> { Integer }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/preview_object.rb b/lib/schematic/types/preview_object.rb index 29b7ccb..00b189f 100644 --- a/lib/schematic/types/preview_object.rb +++ b/lib/schematic/types/preview_object.rb @@ -4,8 +4,11 @@ module Schematic module Types class PreviewObject < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :image_url, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/preview_object_response_data.rb b/lib/schematic/types/preview_object_response_data.rb index 1e73598..56e3285 100644 --- a/lib/schematic/types/preview_object_response_data.rb +++ b/lib/schematic/types/preview_object_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class PreviewObjectResponseData < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :image_url, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/preview_subscription_change_response_data.rb b/lib/schematic/types/preview_subscription_change_response_data.rb index 5d69701..6dccc0a 100644 --- a/lib/schematic/types/preview_subscription_change_response_data.rb +++ b/lib/schematic/types/preview_subscription_change_response_data.rb @@ -4,20 +4,35 @@ module Schematic module Types class PreviewSubscriptionChangeResponseData < Internal::Types::Model field :amount_off, -> { Integer }, optional: false, nullable: false + field :due_now, -> { Integer }, optional: false, nullable: false + field :finance, -> { Schematic::Types::PreviewSubscriptionFinanceResponseData }, optional: true, nullable: false + field :is_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :new_charges, -> { Integer }, optional: false, nullable: false + field :opt_in_required, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :opt_in_text, -> { String }, optional: true, nullable: false + field :opt_in_title, -> { String }, optional: true, nullable: false + field :payment_method_required, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :percent_off, -> { Integer }, optional: false, nullable: false + field :period_start, -> { String }, optional: false, nullable: false + field :promo_code_applied, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :proration, -> { Integer }, optional: false, nullable: false + field :scheduled_change_time, -> { String }, optional: true, nullable: false + field :trial_end, -> { String }, optional: true, nullable: false + field :usage_violations, -> { Internal::Types::Array[Schematic::Types::FeatureUsageResponseData] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/preview_subscription_discount_response_data.rb b/lib/schematic/types/preview_subscription_discount_response_data.rb index 9a96dd8..f114435 100644 --- a/lib/schematic/types/preview_subscription_discount_response_data.rb +++ b/lib/schematic/types/preview_subscription_discount_response_data.rb @@ -4,15 +4,25 @@ module Schematic module Types class PreviewSubscriptionDiscountResponseData < Internal::Types::Model field :amount_off, -> { Integer }, optional: true, nullable: false + field :coupon_name, -> { String }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :customer_facing_code, -> { String }, optional: true, nullable: false + field :duration, -> { String }, optional: false, nullable: false + field :duration_in_months, -> { Integer }, optional: true, nullable: false + field :ended_at, -> { String }, optional: true, nullable: false + field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :percent_off, -> { Integer }, optional: true, nullable: false + field :promo_code_external_id, -> { String }, optional: true, nullable: false + field :started_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/preview_subscription_finance_response_data.rb b/lib/schematic/types/preview_subscription_finance_response_data.rb index 9874ffd..d0c4cf2 100644 --- a/lib/schematic/types/preview_subscription_finance_response_data.rb +++ b/lib/schematic/types/preview_subscription_finance_response_data.rb @@ -4,20 +4,37 @@ module Schematic module Types class PreviewSubscriptionFinanceResponseData < Internal::Types::Model field :amount_off, -> { Integer }, optional: false, nullable: false + field :discount_amount, -> { Integer }, optional: false, nullable: false + field :discounts, -> { Internal::Types::Array[Schematic::Types::PreviewSubscriptionDiscountResponseData] }, optional: false, nullable: false + field :due_now, -> { Integer }, optional: false, nullable: false + field :new_charges, -> { Integer }, optional: false, nullable: false + field :percent_off, -> { Integer }, optional: false, nullable: false + field :period_end, -> { String }, optional: false, nullable: false + field :period_start, -> { String }, optional: false, nullable: false + field :promo_code_applied, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :proration, -> { Integer }, optional: false, nullable: false + + field :proration_billed_at, -> { String }, optional: true, nullable: false + field :tax_amount, -> { Integer }, optional: true, nullable: false + field :tax_display_name, -> { String }, optional: true, nullable: false + field :tax_require_billing_details, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :total_per_billing_period, -> { Integer }, optional: false, nullable: false + field :trial_end, -> { String }, optional: true, nullable: false + field :upcoming_invoice_line_items, -> { Internal::Types::Array[Schematic::Types::PreviewSubscriptionUpcomingInvoiceLineItems] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/preview_subscription_upcoming_invoice_line_items.rb b/lib/schematic/types/preview_subscription_upcoming_invoice_line_items.rb index 446b317..d25e94b 100644 --- a/lib/schematic/types/preview_subscription_upcoming_invoice_line_items.rb +++ b/lib/schematic/types/preview_subscription_upcoming_invoice_line_items.rb @@ -4,9 +4,13 @@ module Schematic module Types class PreviewSubscriptionUpcomingInvoiceLineItems < Internal::Types::Model field :amount, -> { Integer }, optional: false, nullable: false + field :description, -> { String }, optional: false, nullable: false + field :price_id, -> { String }, optional: false, nullable: false + field :proration, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/public_plans_response_data.rb b/lib/schematic/types/public_plans_response_data.rb index eac092b..f2fc811 100644 --- a/lib/schematic/types/public_plans_response_data.rb +++ b/lib/schematic/types/public_plans_response_data.rb @@ -4,13 +4,21 @@ module Schematic module Types class PublicPlansResponseData < Internal::Types::Model field :active_add_ons, -> { Internal::Types::Array[Schematic::Types::PlanViewPublicResponseData] }, optional: false, nullable: false + field :active_plans, -> { Internal::Types::Array[Schematic::Types::PlanViewPublicResponseData] }, optional: false, nullable: false + field :add_on_compatibilities, -> { Internal::Types::Array[Schematic::Types::CompatiblePlans] }, optional: false, nullable: false + field :capabilities, -> { Schematic::Types::ComponentCapabilities }, optional: true, nullable: false + field :display_settings, -> { Schematic::Types::ComponentDisplaySettings }, optional: false, nullable: false + field :show_as_monthly_prices, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_credits, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_period_toggle, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :show_zero_price_as_free, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/raw_event_response_data.rb b/lib/schematic/types/raw_event_response_data.rb index bccb37c..ea08ab5 100644 --- a/lib/schematic/types/raw_event_response_data.rb +++ b/lib/schematic/types/raw_event_response_data.rb @@ -4,9 +4,13 @@ module Schematic module Types class RawEventResponseData < Internal::Types::Model field :captured_at, -> { String }, optional: false, nullable: false + field :event_id, -> { String }, optional: true, nullable: false + field :remote_addr, -> { String }, optional: true, nullable: false + field :remote_ip, -> { String }, optional: false, nullable: false + field :user_agent, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rule.rb b/lib/schematic/types/rule.rb index 315b515..2d800e6 100644 --- a/lib/schematic/types/rule.rb +++ b/lib/schematic/types/rule.rb @@ -4,14 +4,23 @@ module Schematic module Types class Rule < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :condition_groups, -> { Internal::Types::Array[Schematic::Types::ConditionGroup] }, optional: false, nullable: false + field :conditions, -> { Internal::Types::Array[Schematic::Types::Condition] }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :priority, -> { Integer }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: false, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rule_condition_detail_response_data.rb b/lib/schematic/types/rule_condition_detail_response_data.rb index 6a74606..53011b2 100644 --- a/lib/schematic/types/rule_condition_detail_response_data.rb +++ b/lib/schematic/types/rule_condition_detail_response_data.rb @@ -4,25 +4,45 @@ module Schematic module Types class RuleConditionDetailResponseData < Internal::Types::Model field :comparison_trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :comparison_trait_id, -> { String }, optional: true, nullable: false + field :condition_group_id, -> { String }, optional: true, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :metric_value, -> { Integer }, optional: true, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false + field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :resources, -> { Internal::Types::Array[Schematic::Types::PreviewObjectResponseData] }, optional: false, nullable: false + field :rule_id, -> { String }, optional: false, nullable: false + field :trait, -> { Schematic::Types::EntityTraitDefinitionResponseData }, optional: true, nullable: false + field :trait_entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :trait_value, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rule_condition_group_detail_response_data.rb b/lib/schematic/types/rule_condition_group_detail_response_data.rb index 7987597..c5e5b47 100644 --- a/lib/schematic/types/rule_condition_group_detail_response_data.rb +++ b/lib/schematic/types/rule_condition_group_detail_response_data.rb @@ -4,11 +4,17 @@ module Schematic module Types class RuleConditionGroupDetailResponseData < Internal::Types::Model field :conditions, -> { Internal::Types::Array[Schematic::Types::RuleConditionDetailResponseData] }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :rule_id, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rule_condition_group_response_data.rb b/lib/schematic/types/rule_condition_group_response_data.rb index 705048b..9dae554 100644 --- a/lib/schematic/types/rule_condition_group_response_data.rb +++ b/lib/schematic/types/rule_condition_group_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class RuleConditionGroupResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :rule_id, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rule_condition_response_data.rb b/lib/schematic/types/rule_condition_response_data.rb index 1d66369..4f7d5c3 100644 --- a/lib/schematic/types/rule_condition_response_data.rb +++ b/lib/schematic/types/rule_condition_response_data.rb @@ -4,22 +4,39 @@ module Schematic module Types class RuleConditionResponseData < Internal::Types::Model field :comparison_trait_id, -> { String }, optional: true, nullable: false + field :condition_group_id, -> { String }, optional: true, nullable: false + field :condition_type, -> { Schematic::Types::ConditionType }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :metric_value, -> { Integer }, optional: true, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false + field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :rule_id, -> { String }, optional: false, nullable: false + field :trait_entity_type, -> { Schematic::Types::EntityType }, optional: true, nullable: false + field :trait_id, -> { String }, optional: true, nullable: false + field :trait_value, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rule_detail_response_data.rb b/lib/schematic/types/rule_detail_response_data.rb index 4f4b145..4b503ac 100644 --- a/lib/schematic/types/rule_detail_response_data.rb +++ b/lib/schematic/types/rule_detail_response_data.rb @@ -4,15 +4,25 @@ module Schematic module Types class RuleDetailResponseData < Internal::Types::Model field :condition_groups, -> { Internal::Types::Array[Schematic::Types::RuleConditionGroupDetailResponseData] }, optional: false, nullable: false + field :conditions, -> { Internal::Types::Array[Schematic::Types::RuleConditionDetailResponseData] }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :priority, -> { Integer }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rule_response_data.rb b/lib/schematic/types/rule_response_data.rb index a541b0b..714211b 100644 --- a/lib/schematic/types/rule_response_data.rb +++ b/lib/schematic/types/rule_response_data.rb @@ -4,13 +4,21 @@ module Schematic module Types class RuleResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :priority, -> { Integer }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rule_view.rb b/lib/schematic/types/rule_view.rb index 5ef2119..9840d0e 100644 --- a/lib/schematic/types/rule_view.rb +++ b/lib/schematic/types/rule_view.rb @@ -4,16 +4,27 @@ module Schematic module Types class RuleView < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :condition_groups, -> { Internal::Types::Array[Schematic::Types::ConditionGroupView] }, optional: false, nullable: false + field :conditions, -> { Internal::Types::Array[Schematic::Types::ConditionView] }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :priority, -> { Integer }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RuleType }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rules_detail_response_data.rb b/lib/schematic/types/rules_detail_response_data.rb index af7d3c2..0535471 100644 --- a/lib/schematic/types/rules_detail_response_data.rb +++ b/lib/schematic/types/rules_detail_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class RulesDetailResponseData < Internal::Types::Model field :flag, -> { Schematic::Types::FlagResponseData }, optional: true, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::RuleDetailResponseData] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rules_engine_schema_version.rb b/lib/schematic/types/rules_engine_schema_version.rb index ed490c8..68f9167 100644 --- a/lib/schematic/types/rules_engine_schema_version.rb +++ b/lib/schematic/types/rules_engine_schema_version.rb @@ -5,7 +5,7 @@ module Types module RulesEngineSchemaVersion extend Schematic::Internal::Types::Enum - V_5_B_3_E_7220 = "v5b3e7220" + VC_8_EB_8_DF_4 = "vc8eb8df4" PLACEHOLDER_FOR_FERN_COMPATIBILITY = "placeholder-for-fern-compatibility" end end diff --git a/lib/schematic/types/rulesengine_check_flag_result.rb b/lib/schematic/types/rulesengine_check_flag_result.rb index 8d1e208..99333eb 100644 --- a/lib/schematic/types/rulesengine_check_flag_result.rb +++ b/lib/schematic/types/rulesengine_check_flag_result.rb @@ -4,19 +4,33 @@ module Schematic module Types class RulesengineCheckFlagResult < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :entitlement, -> { Schematic::Types::RulesengineFeatureEntitlement }, optional: true, nullable: false + field :err, -> { String }, optional: true, nullable: false + field :feature_allocation, -> { Integer }, optional: true, nullable: false + field :feature_usage, -> { Integer }, optional: true, nullable: false + field :feature_usage_event, -> { String }, optional: true, nullable: false + field :feature_usage_period, -> { Schematic::Types::RulesengineMetricPeriod }, optional: true, nullable: false + field :feature_usage_reset_at, -> { String }, optional: true, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :flag_key, -> { String }, optional: false, nullable: false + field :reason, -> { String }, optional: false, nullable: false + field :rule_id, -> { String }, optional: true, nullable: false + field :rule_type, -> { Schematic::Types::RulesengineRuleType }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_company.rb b/lib/schematic/types/rulesengine_company.rb index ccb4a89..d8fb810 100644 --- a/lib/schematic/types/rulesengine_company.rb +++ b/lib/schematic/types/rulesengine_company.rb @@ -4,18 +4,31 @@ module Schematic module Types class RulesengineCompany < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :base_plan_id, -> { String }, optional: true, nullable: false + field :billing_product_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :credit_balances, -> { Internal::Types::Hash[String, Integer] }, optional: false, nullable: false + field :entitlements, -> { Internal::Types::Array[Schematic::Types::RulesengineFeatureEntitlement] }, optional: true, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :metrics, -> { Internal::Types::Array[Schematic::Types::RulesengineCompanyMetric] }, optional: false, nullable: false + field :plan_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :plan_version_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::RulesengineRule] }, optional: false, nullable: false + field :subscription, -> { Schematic::Types::RulesengineSubscription }, optional: true, nullable: false + field :traits, -> { Internal::Types::Array[Schematic::Types::RulesengineTrait] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_company_metric.rb b/lib/schematic/types/rulesengine_company_metric.rb index 8f55468..8c01222 100644 --- a/lib/schematic/types/rulesengine_company_metric.rb +++ b/lib/schematic/types/rulesengine_company_metric.rb @@ -4,13 +4,21 @@ module Schematic module Types class RulesengineCompanyMetric < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: false, nullable: false + field :month_reset, -> { Schematic::Types::RulesengineMetricPeriodMonthReset }, optional: false, nullable: false + field :period, -> { Schematic::Types::RulesengineMetricPeriod }, optional: false, nullable: false + field :valid_until, -> { String }, optional: true, nullable: false + field :value, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_condition.rb b/lib/schematic/types/rulesengine_condition.rb index 76ebba0..82fd2c0 100644 --- a/lib/schematic/types/rulesengine_condition.rb +++ b/lib/schematic/types/rulesengine_condition.rb @@ -4,19 +4,33 @@ module Schematic module Types class RulesengineCondition < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :comparison_trait_definition, -> { Schematic::Types::RulesengineTraitDefinition }, optional: true, nullable: false + field :condition_type, -> { Schematic::Types::RulesengineConditionType }, optional: false, nullable: false + field :consumption_rate, -> { Integer }, optional: true, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::RulesengineMetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::RulesengineMetricPeriodMonthReset }, optional: true, nullable: false + field :metric_value, -> { Integer }, optional: true, nullable: false + field :operator, -> { Schematic::Types::ComparableOperator }, optional: false, nullable: false + field :resource_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :trait_definition, -> { Schematic::Types::RulesengineTraitDefinition }, optional: true, nullable: false + field :trait_value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_feature_entitlement.rb b/lib/schematic/types/rulesengine_feature_entitlement.rb index af35866..2279a65 100644 --- a/lib/schematic/types/rulesengine_feature_entitlement.rb +++ b/lib/schematic/types/rulesengine_feature_entitlement.rb @@ -4,23 +4,41 @@ module Schematic module Types class RulesengineFeatureEntitlement < Internal::Types::Model field :allocation, -> { Integer }, optional: true, nullable: false + field :consumption_rate, -> { Integer }, optional: true, nullable: false + field :credit_id, -> { String }, optional: true, nullable: false + field :credit_remaining, -> { Integer }, optional: true, nullable: false + field :credit_reserved, -> { Integer }, optional: true, nullable: false + field :credit_settled, -> { Integer }, optional: true, nullable: false + field :credit_total, -> { Integer }, optional: true, nullable: false + field :credit_used, -> { Integer }, optional: true, nullable: false + field :event_name, -> { String }, optional: true, nullable: false + field :event_subtype, -> { String }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :feature_key, -> { String }, optional: false, nullable: false + field :metric_period, -> { Schematic::Types::RulesengineMetricPeriod }, optional: true, nullable: false + field :metric_reset_at, -> { String }, optional: true, nullable: false + field :month_reset, -> { Schematic::Types::RulesengineMetricPeriodMonthReset }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :usage, -> { Integer }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::RulesengineEntitlementValueType }, optional: false, nullable: false + field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::RulesengineWarningTier] }, optional: true, nullable: false end end diff --git a/lib/schematic/types/rulesengine_flag.rb b/lib/schematic/types/rulesengine_flag.rb index 87be770..f4fc5b2 100644 --- a/lib/schematic/types/rulesengine_flag.rb +++ b/lib/schematic/types/rulesengine_flag.rb @@ -4,10 +4,15 @@ module Schematic module Types class RulesengineFlag < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::RulesengineRule] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_rule.rb b/lib/schematic/types/rulesengine_rule.rb index 191258e..6139c9b 100644 --- a/lib/schematic/types/rulesengine_rule.rb +++ b/lib/schematic/types/rulesengine_rule.rb @@ -4,14 +4,23 @@ module Schematic module Types class RulesengineRule < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :condition_groups, -> { Internal::Types::Array[Schematic::Types::RulesengineConditionGroup] }, optional: false, nullable: false + field :conditions, -> { Internal::Types::Array[Schematic::Types::RulesengineCondition] }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :flag_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :priority, -> { Integer }, optional: false, nullable: false + field :rule_type, -> { Schematic::Types::RulesengineRuleType }, optional: false, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_subscription.rb b/lib/schematic/types/rulesengine_subscription.rb index 23a27f7..5af9c25 100644 --- a/lib/schematic/types/rulesengine_subscription.rb +++ b/lib/schematic/types/rulesengine_subscription.rb @@ -4,7 +4,9 @@ module Schematic module Types class RulesengineSubscription < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :period_end, -> { String }, optional: false, nullable: false + field :period_start, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_trait.rb b/lib/schematic/types/rulesengine_trait.rb index 1cfc6c1..570829e 100644 --- a/lib/schematic/types/rulesengine_trait.rb +++ b/lib/schematic/types/rulesengine_trait.rb @@ -4,6 +4,7 @@ module Schematic module Types class RulesengineTrait < Internal::Types::Model field :trait_definition, -> { Schematic::Types::RulesengineTraitDefinition }, optional: true, nullable: false + field :value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_trait_definition.rb b/lib/schematic/types/rulesengine_trait_definition.rb index 94a6b17..b38e876 100644 --- a/lib/schematic/types/rulesengine_trait_definition.rb +++ b/lib/schematic/types/rulesengine_trait_definition.rb @@ -4,7 +4,9 @@ module Schematic module Types class RulesengineTraitDefinition < Internal::Types::Model field :comparable_type, -> { Schematic::Types::RulesengineTraitDefinitionComparableType }, optional: false, nullable: false + field :entity_type, -> { Schematic::Types::RulesengineEntityType }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_user.rb b/lib/schematic/types/rulesengine_user.rb index 6786a70..b4eb4ac 100644 --- a/lib/schematic/types/rulesengine_user.rb +++ b/lib/schematic/types/rulesengine_user.rb @@ -4,10 +4,15 @@ module Schematic module Types class RulesengineUser < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :rules, -> { Internal::Types::Array[Schematic::Types::RulesengineRule] }, optional: false, nullable: false + field :traits, -> { Internal::Types::Array[Schematic::Types::RulesengineTrait] }, optional: false, nullable: false end end diff --git a/lib/schematic/types/rulesengine_warning_tier.rb b/lib/schematic/types/rulesengine_warning_tier.rb index 29e9059..907d182 100644 --- a/lib/schematic/types/rulesengine_warning_tier.rb +++ b/lib/schematic/types/rulesengine_warning_tier.rb @@ -4,6 +4,7 @@ module Schematic module Types class RulesengineWarningTier < Internal::Types::Model field :key, -> { String }, optional: false, nullable: false + field :value, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/scheduled_checkout_response_data.rb b/lib/schematic/types/scheduled_checkout_response_data.rb index fec4ef5..7ea6c03 100644 --- a/lib/schematic/types/scheduled_checkout_response_data.rb +++ b/lib/schematic/types/scheduled_checkout_response_data.rb @@ -4,18 +4,31 @@ module Schematic module Types class ScheduledCheckoutResponseData < Internal::Types::Model field :actor_type, -> { String }, optional: false, nullable: false + field :company_id, -> { String }, optional: false, nullable: false + field :completed_at, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :error_message, -> { String }, optional: true, nullable: false + field :execute_after, -> { String }, optional: false, nullable: false + field :from_plan_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :scheduled_interval, -> { String }, optional: true, nullable: false + field :scheduled_price, -> { Integer }, optional: true, nullable: false + field :started_at, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::ScheduledCheckoutStatus }, optional: false, nullable: false + field :to_plan_id, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/scheduled_downgrade_response_data.rb b/lib/schematic/types/scheduled_downgrade_response_data.rb index d705ba9..f9f82a4 100644 --- a/lib/schematic/types/scheduled_downgrade_response_data.rb +++ b/lib/schematic/types/scheduled_downgrade_response_data.rb @@ -4,15 +4,25 @@ module Schematic module Types class ScheduledDowngradeResponseData < Internal::Types::Model field :currency, -> { String }, optional: false, nullable: false + field :effective_after, -> { String }, optional: false, nullable: false + field :from_plan_id, -> { String }, optional: false, nullable: false + field :from_plan_name, -> { String }, optional: false, nullable: false + field :from_subscription_price, -> { Integer }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :interval, -> { String }, optional: false, nullable: false + field :scheduled_interval, -> { String }, optional: true, nullable: false + field :scheduled_price, -> { Integer }, optional: true, nullable: false + field :to_plan_id, -> { String }, optional: false, nullable: false + field :to_plan_name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/segment_status_resp.rb b/lib/schematic/types/segment_status_resp.rb index 38568e9..c714370 100644 --- a/lib/schematic/types/segment_status_resp.rb +++ b/lib/schematic/types/segment_status_resp.rb @@ -4,7 +4,9 @@ module Schematic module Types class SegmentStatusResp < Internal::Types::Model field :connected, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :last_event_at, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/skipped_entitlement_response_data.rb b/lib/schematic/types/skipped_entitlement_response_data.rb index fd6e4de..0d1f2bd 100644 --- a/lib/schematic/types/skipped_entitlement_response_data.rb +++ b/lib/schematic/types/skipped_entitlement_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class SkippedEntitlementResponseData < Internal::Types::Model field :entitlement_id, -> { String }, optional: false, nullable: false + field :errors, -> { Internal::Types::Array[Schematic::Types::SkippedEntitlementErrorResponseData] }, optional: false, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :feature_name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/stripe_embed_info.rb b/lib/schematic/types/stripe_embed_info.rb index 25c5ccf..bf7b8a8 100644 --- a/lib/schematic/types/stripe_embed_info.rb +++ b/lib/schematic/types/stripe_embed_info.rb @@ -4,8 +4,11 @@ module Schematic module Types class StripeEmbedInfo < Internal::Types::Model field :account_id, -> { String }, optional: true, nullable: false + field :publishable_key, -> { String }, optional: true, nullable: false + field :schematic_publishable_key, -> { String }, optional: false, nullable: false + field :setup_intent_client_secret, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/stripe_integration_config.rb b/lib/schematic/types/stripe_integration_config.rb index 66a2b32..bfb9079 100644 --- a/lib/schematic/types/stripe_integration_config.rb +++ b/lib/schematic/types/stripe_integration_config.rb @@ -4,11 +4,18 @@ module Schematic module Types class StripeIntegrationConfig < Internal::Types::Model field :account_id, -> { String }, optional: true, nullable: false + field :account_name, -> { String }, optional: true, nullable: false + field :company_update_only, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :is_sandbox, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :live_mode, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :onboard_url, -> { String }, optional: true, nullable: false + + field :return_to, -> { String }, optional: true, nullable: false end end end diff --git a/lib/schematic/types/subscription_trait_update.rb b/lib/schematic/types/subscription_trait_update.rb index 8cba104..7180545 100644 --- a/lib/schematic/types/subscription_trait_update.rb +++ b/lib/schematic/types/subscription_trait_update.rb @@ -4,11 +4,17 @@ module Schematic module Types class SubscriptionTraitUpdate < Internal::Types::Model field :feature_id, -> { String }, optional: false, nullable: false + field :hierarchy, -> { Internal::Types::Array[String] }, optional: false, nullable: false + field :reason, -> { String }, optional: false, nullable: false + field :trait_id, -> { String }, optional: false, nullable: false + field :trait_name, -> { String }, optional: false, nullable: false + field :trait_type, -> { Schematic::Types::TraitType }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/tax_id_input.rb b/lib/schematic/types/tax_id_input.rb index 8d7679e..30a03b9 100644 --- a/lib/schematic/types/tax_id_input.rb +++ b/lib/schematic/types/tax_id_input.rb @@ -4,6 +4,7 @@ module Schematic module Types class TaxIdInput < Internal::Types::Model field :type, -> { Schematic::Types::TaxIdType }, optional: false, nullable: false + field :value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/temporary_access_token_response_data.rb b/lib/schematic/types/temporary_access_token_response_data.rb index 01378a5..5cc4497 100644 --- a/lib/schematic/types/temporary_access_token_response_data.rb +++ b/lib/schematic/types/temporary_access_token_response_data.rb @@ -4,11 +4,17 @@ module Schematic module Types class TemporaryAccessTokenResponseData < Internal::Types::Model field :api_key_id, -> { String }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :expired_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :resource_type, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/test_webhook_response_data.rb b/lib/schematic/types/test_webhook_response_data.rb index 027d5e7..fbeb66b 100644 --- a/lib/schematic/types/test_webhook_response_data.rb +++ b/lib/schematic/types/test_webhook_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class TestWebhookResponseData < Internal::Types::Model field :failure_reason, -> { String }, optional: true, nullable: false + field :response_code, -> { Integer }, optional: false, nullable: false + field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/top_feature_by_usage_response_data.rb b/lib/schematic/types/top_feature_by_usage_response_data.rb index 5a1f29d..832bb02 100644 --- a/lib/schematic/types/top_feature_by_usage_response_data.rb +++ b/lib/schematic/types/top_feature_by_usage_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class TopFeatureByUsageResponseData < Internal::Types::Model field :change_pct, -> { Integer }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :feature_name, -> { String }, optional: false, nullable: false + field :plural_name, -> { String }, optional: true, nullable: false + field :prior_usage, -> { Integer }, optional: false, nullable: false + field :usage, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/trait_definition.rb b/lib/schematic/types/trait_definition.rb index a8113a8..7919d04 100644 --- a/lib/schematic/types/trait_definition.rb +++ b/lib/schematic/types/trait_definition.rb @@ -4,7 +4,9 @@ module Schematic module Types class TraitDefinition < Internal::Types::Model field :comparable_type, -> { Schematic::Types::TraitDefinitionComparableType }, optional: false, nullable: false + field :entity_type, -> { Schematic::Types::EntityType }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/upcoming_invoice_response_data.rb b/lib/schematic/types/upcoming_invoice_response_data.rb new file mode 100644 index 0000000..a5da47b --- /dev/null +++ b/lib/schematic/types/upcoming_invoice_response_data.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +module Schematic + module Types + class UpcomingInvoiceResponseData < Internal::Types::Model + field :amount_due, -> { Integer }, optional: false, nullable: false + + field :amount_paid, -> { Integer }, optional: false, nullable: false + + field :amount_remaining, -> { Integer }, optional: false, nullable: false + + field :collection_method, -> { String }, optional: false, nullable: false + + field :company_id, -> { String }, optional: true, nullable: false + + field :created_at, -> { String }, optional: false, nullable: false + + field :currency, -> { String }, optional: false, nullable: false + + field :customer_external_id, -> { String }, optional: false, nullable: false + + field :due_date, -> { String }, optional: true, nullable: false + + field :ending_balance, -> { Integer }, optional: false, nullable: false + + field :environment_id, -> { String }, optional: false, nullable: false + + field :external_id, -> { String }, optional: true, nullable: false + + field :payment_method_external_id, -> { String }, optional: true, nullable: false + + field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: false, nullable: false + + field :starting_balance, -> { Integer }, optional: false, nullable: false + + field :status, -> { Schematic::Types::InvoiceStatus }, optional: true, nullable: false + + field :subscription_external_id, -> { String }, optional: true, nullable: false + + field :subtotal, -> { Integer }, optional: false, nullable: false + + field :updated_at, -> { String }, optional: false, nullable: false + + field :url, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/schematic/types/update_add_on_request_body.rb b/lib/schematic/types/update_add_on_request_body.rb index fb4c465..efed7aa 100644 --- a/lib/schematic/types/update_add_on_request_body.rb +++ b/lib/schematic/types/update_add_on_request_body.rb @@ -4,6 +4,7 @@ module Schematic module Types class UpdateAddOnRequestBody < Internal::Types::Model field :add_on_id, -> { String }, optional: false, nullable: false + field :price_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/update_auto_topup_override_request_body.rb b/lib/schematic/types/update_auto_topup_override_request_body.rb index 87d9aab..b4bdbb7 100644 --- a/lib/schematic/types/update_auto_topup_override_request_body.rb +++ b/lib/schematic/types/update_auto_topup_override_request_body.rb @@ -4,8 +4,11 @@ module Schematic module Types class UpdateAutoTopupOverrideRequestBody < Internal::Types::Model field :auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false + field :plan_credit_grant_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb b/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb index e4a8eb1..0622ca6 100644 --- a/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +++ b/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb @@ -4,27 +4,49 @@ module Schematic module Types class UpdateBillingPlanCreditGrantRequestBody < Internal::Types::Model field :apply_to_existing, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :auto_topup_amount, -> { Integer }, optional: true, nullable: false + field :auto_topup_amount_type, -> { String }, optional: true, nullable: false + field :auto_topup_availability, -> { Schematic::Types::BillingCreditAutoTopupAvailability }, optional: true, nullable: false + field :auto_topup_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :auto_topup_expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :auto_topup_expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :auto_topup_expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :auto_topup_self_service, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :auto_topup_threshold_credits, -> { Integer }, optional: true, nullable: false + field :auto_topup_threshold_percent, -> { Integer }, optional: true, nullable: false + field :can_buy_bundles, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :company_credit_amount, -> { Integer }, optional: true, nullable: false + field :credit_amount, -> { Integer }, optional: true, nullable: false + field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false + field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: true, nullable: false + field :expiry_unit_count, -> { Integer }, optional: true, nullable: false + field :license_id, -> { String }, optional: true, nullable: false + field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: false, nullable: false + field :reset_start, -> { Schematic::Types::BillingPlanCreditGrantResetStart }, optional: false, nullable: false + field :reset_type, -> { Schematic::Types::BillingPlanCreditGrantResetType }, optional: true, nullable: false + field :rollover_percentage, -> { Integer }, optional: true, nullable: false + field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: true, nullable: false end end diff --git a/lib/schematic/types/update_credit_bundle_request_body.rb b/lib/schematic/types/update_credit_bundle_request_body.rb index 004010d..0759778 100644 --- a/lib/schematic/types/update_credit_bundle_request_body.rb +++ b/lib/schematic/types/update_credit_bundle_request_body.rb @@ -4,6 +4,7 @@ module Schematic module Types class UpdateCreditBundleRequestBody < Internal::Types::Model field :bundle_id, -> { String }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/update_entitlement_req_common.rb b/lib/schematic/types/update_entitlement_req_common.rb index 54557ad..0518b66 100644 --- a/lib/schematic/types/update_entitlement_req_common.rb +++ b/lib/schematic/types/update_entitlement_req_common.rb @@ -4,12 +4,19 @@ module Schematic module Types class UpdateEntitlementReqCommon < Internal::Types::Model field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_credit_id, -> { String }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_trait_id, -> { String }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false end end diff --git a/lib/schematic/types/update_pay_in_advance_request_body.rb b/lib/schematic/types/update_pay_in_advance_request_body.rb index 35040c7..20358a0 100644 --- a/lib/schematic/types/update_pay_in_advance_request_body.rb +++ b/lib/schematic/types/update_pay_in_advance_request_body.rb @@ -4,6 +4,7 @@ module Schematic module Types class UpdatePayInAdvanceRequestBody < Internal::Types::Model field :price_id, -> { String }, optional: false, nullable: false + field :quantity, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/update_plan_request_body.rb b/lib/schematic/types/update_plan_request_body.rb index 00bee0d..9659acb 100644 --- a/lib/schematic/types/update_plan_request_body.rb +++ b/lib/schematic/types/update_plan_request_body.rb @@ -4,7 +4,9 @@ module Schematic module Types class UpdatePlanRequestBody < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false + field :icon, -> { Schematic::Types::PlanIcon }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/update_plan_trait_trait_request_body.rb b/lib/schematic/types/update_plan_trait_trait_request_body.rb index dd7844c..723352e 100644 --- a/lib/schematic/types/update_plan_trait_trait_request_body.rb +++ b/lib/schematic/types/update_plan_trait_trait_request_body.rb @@ -4,6 +4,7 @@ module Schematic module Types class UpdatePlanTraitTraitRequestBody < Internal::Types::Model field :trait_id, -> { String }, optional: false, nullable: false + field :trait_value, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/update_rule_request_body.rb b/lib/schematic/types/update_rule_request_body.rb index fb78bcc..24ecdd7 100644 --- a/lib/schematic/types/update_rule_request_body.rb +++ b/lib/schematic/types/update_rule_request_body.rb @@ -4,9 +4,13 @@ module Schematic module Types class UpdateRuleRequestBody < Internal::Types::Model field :condition_groups, -> { Internal::Types::Array[Schematic::Types::CreateOrUpdateConditionGroupRequestBody] }, optional: false, nullable: false + field :conditions, -> { Internal::Types::Array[Schematic::Types::CreateOrUpdateConditionRequestBody] }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :priority, -> { Integer }, optional: false, nullable: false + field :value, -> { Internal::Types::Boolean }, optional: false, nullable: false end end diff --git a/lib/schematic/types/upsert_billing_product_request_body.rb b/lib/schematic/types/upsert_billing_product_request_body.rb index 9ba6a6e..03cf110 100644 --- a/lib/schematic/types/upsert_billing_product_request_body.rb +++ b/lib/schematic/types/upsert_billing_product_request_body.rb @@ -4,19 +4,33 @@ module Schematic module Types class UpsertBillingProductRequestBody < Internal::Types::Model field :billing_product_id, -> { String }, optional: true, nullable: false + field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: true, nullable: false + field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPriceRequestBody] }, optional: true, nullable: false + field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :monthly_price, -> { Integer }, optional: true, nullable: false + field :monthly_price_id, -> { String }, optional: true, nullable: false + field :one_time_price, -> { Integer }, optional: true, nullable: false + field :one_time_price_id, -> { String }, optional: true, nullable: false + field :quarterly_price, -> { Integer }, optional: true, nullable: false + field :quarterly_price_id, -> { String }, optional: true, nullable: false + field :trial_days, -> { Integer }, optional: true, nullable: false + field :yearly_price, -> { Integer }, optional: true, nullable: false + field :yearly_price_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/upsert_company_request_body.rb b/lib/schematic/types/upsert_company_request_body.rb index 4de52f9..b2d0475 100644 --- a/lib/schematic/types/upsert_company_request_body.rb +++ b/lib/schematic/types/upsert_company_request_body.rb @@ -4,14 +4,23 @@ module Schematic module Types class UpsertCompanyRequestBody < Internal::Types::Model field :base_plan_id, -> { String }, optional: true, nullable: false + field :base_plan_price_id, -> { String }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :last_seen_at, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :prevent_key_remap, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :remove_keys, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :update_only, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/upsert_trait_request_body.rb b/lib/schematic/types/upsert_trait_request_body.rb index d9f98a1..9cf380e 100644 --- a/lib/schematic/types/upsert_trait_request_body.rb +++ b/lib/schematic/types/upsert_trait_request_body.rb @@ -4,9 +4,13 @@ module Schematic module Types class UpsertTraitRequestBody < Internal::Types::Model field :incr, -> { Integer }, optional: true, nullable: false + field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :set, -> { String }, optional: true, nullable: false + field :trait, -> { String }, optional: false, nullable: false + field :update_only, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/upsert_user_request_body.rb b/lib/schematic/types/upsert_user_request_body.rb index a375f80..49afaca 100644 --- a/lib/schematic/types/upsert_user_request_body.rb +++ b/lib/schematic/types/upsert_user_request_body.rb @@ -4,15 +4,25 @@ module Schematic module Types class UpsertUserRequestBody < Internal::Types::Model field :companies, -> { Internal::Types::Array[Internal::Types::Hash[String, String]] }, optional: true, nullable: false + field :company, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :last_seen_at, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :remove_keys, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :update_only, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/upsert_user_sub_request_body.rb b/lib/schematic/types/upsert_user_sub_request_body.rb index 7b415cb..1a432d5 100644 --- a/lib/schematic/types/upsert_user_sub_request_body.rb +++ b/lib/schematic/types/upsert_user_sub_request_body.rb @@ -4,13 +4,21 @@ module Schematic module Types class UpsertUserSubRequestBody < Internal::Types::Model field :company_id, -> { String }, optional: true, nullable: false + field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :id, -> { String }, optional: true, nullable: false + field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false + field :last_seen_at, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :remove_keys, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :update_only, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/schematic/types/usage_based_entitlement_request_body.rb b/lib/schematic/types/usage_based_entitlement_request_body.rb index 5aabf57..d867a32 100644 --- a/lib/schematic/types/usage_based_entitlement_request_body.rb +++ b/lib/schematic/types/usage_based_entitlement_request_body.rb @@ -4,26 +4,47 @@ module Schematic module Types class UsageBasedEntitlementRequestBody < Internal::Types::Model field :billing_product_id, -> { String }, optional: true, nullable: false + field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :currency, -> { String }, optional: true, nullable: false + field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CurrencyPriceRequestBody] }, optional: true, nullable: false + field :monthly_metered_price_id, -> { String }, optional: true, nullable: false + field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :monthly_unit_price, -> { Integer }, optional: true, nullable: false + field :monthly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :overage_billing_product_id, -> { String }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_metered_price_id, -> { String }, optional: true, nullable: false + field :quarterly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :quarterly_unit_price, -> { Integer }, optional: true, nullable: false + field :quarterly_unit_price_decimal, -> { String }, optional: true, nullable: false + field :soft_limit, -> { Integer }, optional: true, nullable: false + field :tier_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false + field :yearly_metered_price_id, -> { String }, optional: true, nullable: false + field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false + field :yearly_unit_price, -> { Integer }, optional: true, nullable: false + field :yearly_unit_price_decimal, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/usage_based_entitlement_response_data.rb b/lib/schematic/types/usage_based_entitlement_response_data.rb index ce34aea..bbc3ae1 100644 --- a/lib/schematic/types/usage_based_entitlement_response_data.rb +++ b/lib/schematic/types/usage_based_entitlement_response_data.rb @@ -4,18 +4,31 @@ module Schematic module Types class UsageBasedEntitlementResponseData < Internal::Types::Model field :billing_threshold, -> { Integer }, optional: true, nullable: false + field :consumption_rate, -> { Integer }, optional: true, nullable: false + field :feature_id, -> { String }, optional: false, nullable: false + field :metered_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false + field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false + field :monthly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false + field :quarterly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false + field :usage_quantity, -> { Integer }, optional: true, nullable: false + field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :value_numeric, -> { Integer }, optional: true, nullable: false + field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false + field :yearly_usage_based_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false end end diff --git a/lib/schematic/types/usage_time_series_point_response_data.rb b/lib/schematic/types/usage_time_series_point_response_data.rb index 5d5367d..a09e17d 100644 --- a/lib/schematic/types/usage_time_series_point_response_data.rb +++ b/lib/schematic/types/usage_time_series_point_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class UsageTimeSeriesPointResponseData < Internal::Types::Model field :period_end, -> { String }, optional: true, nullable: false + field :period_start, -> { String }, optional: true, nullable: false + field :timestamp, -> { String }, optional: false, nullable: false + field :usage, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/user_credit_usage_response_data.rb b/lib/schematic/types/user_credit_usage_response_data.rb index d8a3768..b836c78 100644 --- a/lib/schematic/types/user_credit_usage_response_data.rb +++ b/lib/schematic/types/user_credit_usage_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class UserCreditUsageResponseData < Internal::Types::Model field :billing_credit_id, -> { String }, optional: false, nullable: false + field :credit_name, -> { String }, optional: false, nullable: false + field :credits_used, -> { Integer }, optional: false, nullable: false + field :share, -> { Integer }, optional: false, nullable: false + field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/user_daily_credit_point_response_data.rb b/lib/schematic/types/user_daily_credit_point_response_data.rb index 6b4a703..4002b69 100644 --- a/lib/schematic/types/user_daily_credit_point_response_data.rb +++ b/lib/schematic/types/user_daily_credit_point_response_data.rb @@ -4,6 +4,7 @@ module Schematic module Types class UserDailyCreditPointResponseData < Internal::Types::Model field :credits_used, -> { Integer }, optional: false, nullable: false + field :date, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/user_daily_usage_point_response_data.rb b/lib/schematic/types/user_daily_usage_point_response_data.rb index 074bd8e..fcf7db2 100644 --- a/lib/schematic/types/user_daily_usage_point_response_data.rb +++ b/lib/schematic/types/user_daily_usage_point_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class UserDailyUsagePointResponseData < Internal::Types::Model field :date, -> { String }, optional: false, nullable: false + field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :value, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/user_detail_response_data.rb b/lib/schematic/types/user_detail_response_data.rb index 51cc0ed..55ccd90 100644 --- a/lib/schematic/types/user_detail_response_data.rb +++ b/lib/schematic/types/user_detail_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class UserDetailResponseData < Internal::Types::Model field :company_memberships, -> { Internal::Types::Array[Schematic::Types::CompanyMembershipDetailResponseData] }, optional: false, nullable: false + field :created_at, -> { String }, optional: false, nullable: false + field :entity_traits, -> { Internal::Types::Array[Schematic::Types::EntityTraitDetailResponseData] }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :keys, -> { Internal::Types::Array[Schematic::Types::EntityKeyDetailResponseData] }, optional: false, nullable: false + field :last_seen_at, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :traits, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/user_feature_usage_response_data.rb b/lib/schematic/types/user_feature_usage_response_data.rb index 05452c7..1203f67 100644 --- a/lib/schematic/types/user_feature_usage_response_data.rb +++ b/lib/schematic/types/user_feature_usage_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class UserFeatureUsageResponseData < Internal::Types::Model field :feature, -> { Schematic::Types::FeatureResponseData }, optional: true, nullable: false + field :last_seen, -> { String }, optional: false, nullable: false + field :share, -> { Integer }, optional: false, nullable: false + field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :value, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/user_response_data.rb b/lib/schematic/types/user_response_data.rb index 0968f9c..e0c4241 100644 --- a/lib/schematic/types/user_response_data.rb +++ b/lib/schematic/types/user_response_data.rb @@ -4,10 +4,15 @@ module Schematic module Types class UserResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :environment_id, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :last_seen_at, -> { String }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/user_usage_by_company_response_data.rb b/lib/schematic/types/user_usage_by_company_response_data.rb index 400a87e..c65b42c 100644 --- a/lib/schematic/types/user_usage_by_company_response_data.rb +++ b/lib/schematic/types/user_usage_by_company_response_data.rb @@ -4,8 +4,11 @@ module Schematic module Types class UserUsageByCompanyResponseData < Internal::Types::Model field :credits, -> { Internal::Types::Array[Schematic::Types::UserCreditUsageResponseData] }, optional: false, nullable: false + field :end_time, -> { String }, optional: false, nullable: false + field :rows, -> { Internal::Types::Array[Schematic::Types::UserFeatureUsageResponseData] }, optional: false, nullable: false + field :start_time, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/user_usage_detail_response_data.rb b/lib/schematic/types/user_usage_detail_response_data.rb index 43c7eee..d95a7aa 100644 --- a/lib/schematic/types/user_usage_detail_response_data.rb +++ b/lib/schematic/types/user_usage_detail_response_data.rb @@ -4,11 +4,17 @@ module Schematic module Types class UserUsageDetailResponseData < Internal::Types::Model field :credits, -> { Internal::Types::Array[Schematic::Types::UserCreditUsageResponseData] }, optional: false, nullable: false + field :daily_credit_points, -> { Internal::Types::Array[Schematic::Types::UserDailyCreditPointResponseData] }, optional: false, nullable: false + field :daily_points, -> { Internal::Types::Array[Schematic::Types::UserDailyUsagePointResponseData] }, optional: false, nullable: false + field :end_time, -> { String }, optional: false, nullable: false + field :feature_totals, -> { Internal::Types::Array[Schematic::Types::UserFeatureUsageResponseData] }, optional: false, nullable: false + field :start_time, -> { String }, optional: false, nullable: false + field :user, -> { Schematic::Types::UserResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/warning_tier.rb b/lib/schematic/types/warning_tier.rb index 807e8e6..5ff5549 100644 --- a/lib/schematic/types/warning_tier.rb +++ b/lib/schematic/types/warning_tier.rb @@ -4,6 +4,7 @@ module Schematic module Types class WarningTier < Internal::Types::Model field :key, -> { String }, optional: false, nullable: false + field :value, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/warning_tier_request_body.rb b/lib/schematic/types/warning_tier_request_body.rb index 1202627..f48ceff 100644 --- a/lib/schematic/types/warning_tier_request_body.rb +++ b/lib/schematic/types/warning_tier_request_body.rb @@ -4,6 +4,7 @@ module Schematic module Types class WarningTierRequestBody < Internal::Types::Model field :key, -> { String }, optional: false, nullable: false + field :value, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/warning_tier_response_data.rb b/lib/schematic/types/warning_tier_response_data.rb index e88309f..1da5efa 100644 --- a/lib/schematic/types/warning_tier_response_data.rb +++ b/lib/schematic/types/warning_tier_response_data.rb @@ -4,7 +4,9 @@ module Schematic module Types class WarningTierResponseData < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :key, -> { String }, optional: false, nullable: false + field :value, -> { Integer }, optional: false, nullable: false end end diff --git a/lib/schematic/types/web_feature_usage_webhook_output.rb b/lib/schematic/types/web_feature_usage_webhook_output.rb index aead77c..50cdf21 100644 --- a/lib/schematic/types/web_feature_usage_webhook_output.rb +++ b/lib/schematic/types/web_feature_usage_webhook_output.rb @@ -4,11 +4,17 @@ module Schematic module Types class WebFeatureUsageWebhookOutput < Internal::Types::Model field :allocation, -> { Integer }, optional: true, nullable: false, api_name: "Allocation" + field :credit_usage, -> { Schematic::Types::CreditUsage }, optional: true, nullable: false, api_name: "CreditUsage" + field :entitlement, -> { String }, optional: false, nullable: false, api_name: "Entitlement" + field :feature, -> { Schematic::Types::FeatureView }, optional: true, nullable: false, api_name: "Feature" + field :metric_reset_at, -> { String }, optional: true, nullable: false, api_name: "MetricResetAt" + field :usage, -> { Integer }, optional: true, nullable: false, api_name: "Usage" + field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false end end diff --git a/lib/schematic/types/web_scheduled_downgrade_webhook_output.rb b/lib/schematic/types/web_scheduled_downgrade_webhook_output.rb index fdf4613..7315ca8 100644 --- a/lib/schematic/types/web_scheduled_downgrade_webhook_output.rb +++ b/lib/schematic/types/web_scheduled_downgrade_webhook_output.rb @@ -4,11 +4,17 @@ module Schematic module Types class WebScheduledDowngradeWebhookOutput < Internal::Types::Model field :company, -> { Schematic::Types::CompanyResponseData }, optional: true, nullable: false + field :execute_after, -> { String }, optional: false, nullable: false + field :from_plan, -> { Schematic::Types::PlanSnapshotView }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :scheduled_interval, -> { String }, optional: true, nullable: false + field :scheduled_price, -> { Integer }, optional: true, nullable: false + field :to_plan, -> { Schematic::Types::PlanSnapshotView }, optional: true, nullable: false end end diff --git a/lib/schematic/types/webhook_event_detail_response_data.rb b/lib/schematic/types/webhook_event_detail_response_data.rb index 50885e0..cfa39a9 100644 --- a/lib/schematic/types/webhook_event_detail_response_data.rb +++ b/lib/schematic/types/webhook_event_detail_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class WebhookEventDetailResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :payload, -> { String }, optional: true, nullable: false + field :request_type, -> { Schematic::Types::WebhookRequestType }, optional: false, nullable: false + field :response_code, -> { Integer }, optional: true, nullable: false + field :sent_at, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::WebhookEventStatus }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :webhook, -> { Schematic::Types::WebhookResponseData }, optional: true, nullable: false + field :webhook_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/webhook_event_response_data.rb b/lib/schematic/types/webhook_event_response_data.rb index b98d163..5b193f9 100644 --- a/lib/schematic/types/webhook_event_response_data.rb +++ b/lib/schematic/types/webhook_event_response_data.rb @@ -4,13 +4,21 @@ module Schematic module Types class WebhookEventResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :payload, -> { String }, optional: true, nullable: false + field :request_type, -> { Schematic::Types::WebhookRequestType }, optional: false, nullable: false + field :response_code, -> { Integer }, optional: true, nullable: false + field :sent_at, -> { String }, optional: true, nullable: false + field :status, -> { Schematic::Types::WebhookEventStatus }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :webhook_id, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/webhook_response_data.rb b/lib/schematic/types/webhook_response_data.rb index 76eda84..867c5ee 100644 --- a/lib/schematic/types/webhook_response_data.rb +++ b/lib/schematic/types/webhook_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class WebhookResponseData < Internal::Types::Model field :created_at, -> { String }, optional: false, nullable: false + field :credit_trigger_configs, -> { Internal::Types::Array[Schematic::Types::CreditTriggerConfig] }, optional: true, nullable: false + field :entitlement_trigger_configs, -> { Internal::Types::Array[Schematic::Types::EntitlementTriggerConfig] }, optional: true, nullable: false + field :id, -> { String }, optional: false, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :request_types, -> { Internal::Types::Array[Schematic::Types::WebhookRequestType] }, optional: false, nullable: false + field :secret, -> { String }, optional: false, nullable: false + field :status, -> { Schematic::Types::WebhookStatus }, optional: false, nullable: false + field :updated_at, -> { String }, optional: false, nullable: false + field :url, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/webhook_url.rb b/lib/schematic/types/webhook_url.rb index 5fe5ba2..129d4fa 100644 --- a/lib/schematic/types/webhook_url.rb +++ b/lib/schematic/types/webhook_url.rb @@ -4,6 +4,7 @@ module Schematic module Types class WebhookUrl < Internal::Types::Model field :type, -> { Schematic::Types::IntegrationType }, optional: false, nullable: false + field :url, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/types/who_am_i_response_data.rb b/lib/schematic/types/who_am_i_response_data.rb index 554433c..6b75717 100644 --- a/lib/schematic/types/who_am_i_response_data.rb +++ b/lib/schematic/types/who_am_i_response_data.rb @@ -4,14 +4,23 @@ module Schematic module Types class WhoAmIResponseData < Internal::Types::Model field :account_id, -> { String }, optional: false, nullable: false + field :account_name, -> { String }, optional: false, nullable: false + field :actor_type, -> { Schematic::Types::ActorType }, optional: false, nullable: false + field :api_key_id, -> { String }, optional: true, nullable: false + field :environment_id, -> { String }, optional: true, nullable: false + field :environments, -> { Internal::Types::Array[Schematic::Types::EnvironmentResponseData] }, optional: false, nullable: false + field :onboarding_complete, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :stripe_user_id, -> { String }, optional: true, nullable: false + field :user_id, -> { String }, optional: true, nullable: false + field :user_name, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/types/work_os_integration_config.rb b/lib/schematic/types/work_os_integration_config.rb index 426a165..c60ac4a 100644 --- a/lib/schematic/types/work_os_integration_config.rb +++ b/lib/schematic/types/work_os_integration_config.rb @@ -4,6 +4,7 @@ module Schematic module Types class WorkOsIntegrationConfig < Internal::Types::Model field :first_events_received, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :webhook_url, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/version.rb b/lib/schematic/version.rb index 301012d..20fb7ff 100644 --- a/lib/schematic/version.rb +++ b/lib/schematic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Schematic - VERSION = "1.4.14" + VERSION = "1.4.15" end diff --git a/lib/schematic/webhooks/client.rb b/lib/schematic/webhooks/client.rb index d712bf4..1f48a2b 100644 --- a/lib/schematic/webhooks/client.rb +++ b/lib/schematic/webhooks/client.rb @@ -23,17 +23,24 @@ def initialize(client:) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.webhooks.list_webhook_events( + # ids: ["ids"], + # q: "q", + # webhook_id: "webhook_id", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Webhooks::Types::ListWebhookEventsResponse] def list_webhook_events(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids q webhook_id limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) query_params["webhook_id"] = params[:webhook_id] if params.key?(:webhook_id) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -65,6 +72,9 @@ def list_webhook_events(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :webhook_event_id # + # @example + # client.webhooks.get_webhook_event(webhook_event_id: "webhook_event_id") + # # @return [Schematic::Webhooks::Types::GetWebhookEventResponse] def get_webhook_event(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -101,17 +111,24 @@ def get_webhook_event(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.webhooks.count_webhook_events( + # ids: ["ids"], + # q: "q", + # webhook_id: "webhook_id", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Webhooks::Types::CountWebhookEventsResponse] def count_webhook_events(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[ids q webhook_id limit offset] query_params = {} query_params["ids"] = params[:ids] if params.key?(:ids) query_params["q"] = params[:q] if params.key?(:q) query_params["webhook_id"] = params[:webhook_id] if params.key?(:webhook_id) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -145,15 +162,20 @@ def count_webhook_events(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.webhooks.list_webhooks( + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Webhooks::Types::ListWebhooksResponse] def list_webhooks(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[q limit offset] query_params = {} query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -184,6 +206,13 @@ def list_webhooks(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.webhooks.create_webhook( + # name: "name", + # request_types: ["subscription.trial.ended"], + # url: "url" + # ) + # # @return [Schematic::Webhooks::Types::CreateWebhookResponse] def create_webhook(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -217,6 +246,9 @@ def create_webhook(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :webhook_id # + # @example + # client.webhooks.get_webhook(webhook_id: "webhook_id") + # # @return [Schematic::Webhooks::Types::GetWebhookResponse] def get_webhook(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -249,11 +281,14 @@ def get_webhook(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :webhook_id # + # @example + # client.webhooks.update_webhook(webhook_id: "webhook_id") + # # @return [Schematic::Webhooks::Types::UpdateWebhookResponse] def update_webhook(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Webhooks::Types::UpdateWebhookRequestBody.new(params).to_h - non_body_param_names = ["webhook_id"] + non_body_param_names = %w[webhook_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -286,6 +321,9 @@ def update_webhook(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :webhook_id # + # @example + # client.webhooks.delete_webhook(webhook_id: "webhook_id") + # # @return [Schematic::Webhooks::Types::DeleteWebhookResponse] def delete_webhook(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) @@ -318,11 +356,17 @@ def delete_webhook(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :webhook_id # + # @example + # client.webhooks.send_test_webhook_action( + # webhook_id: "webhook_id", + # request_type: "subscription.trial.ended" + # ) + # # @return [Schematic::Webhooks::Types::SendTestWebhookActionResponse] def send_test_webhook_action(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) request_data = Schematic::Webhooks::Types::TestWebhookRequestBody.new(params).to_h - non_body_param_names = ["webhook_id"] + non_body_param_names = %w[webhook_id] body = request_data.except(*non_body_param_names) request = Schematic::Internal::JSON::Request.new( @@ -357,15 +401,20 @@ def send_test_webhook_action(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [Integer, nil] :offset # + # @example + # client.webhooks.count_webhooks( + # q: "q", + # limit: 1000000, + # offset: 1000000 + # ) + # # @return [Schematic::Webhooks::Types::CountWebhooksResponse] def count_webhooks(request_options: {}, **params) params = Schematic::Internal::Types::Utils.normalize_keys(params) - query_param_names = %i[q limit offset] query_params = {} query_params["q"] = params[:q] if params.key?(:q) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["offset"] = params[:offset] if params.key?(:offset) - params.except(*query_param_names) request = Schematic::Internal::JSON::Request.new( base_url: request_options[:base_url], diff --git a/lib/schematic/webhooks/types/count_webhook_events_params.rb b/lib/schematic/webhooks/types/count_webhook_events_params.rb index 1a57222..5ce1b70 100644 --- a/lib/schematic/webhooks/types/count_webhook_events_params.rb +++ b/lib/schematic/webhooks/types/count_webhook_events_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class CountWebhookEventsParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :webhook_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/webhooks/types/count_webhook_events_request.rb b/lib/schematic/webhooks/types/count_webhook_events_request.rb index 1074f0c..da4580b 100644 --- a/lib/schematic/webhooks/types/count_webhook_events_request.rb +++ b/lib/schematic/webhooks/types/count_webhook_events_request.rb @@ -5,9 +5,13 @@ module Webhooks module Types class CountWebhookEventsRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :webhook_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/webhooks/types/count_webhook_events_response.rb b/lib/schematic/webhooks/types/count_webhook_events_response.rb index d20848a..c07f3ad 100644 --- a/lib/schematic/webhooks/types/count_webhook_events_response.rb +++ b/lib/schematic/webhooks/types/count_webhook_events_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class CountWebhookEventsResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Webhooks::Types::CountWebhookEventsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/count_webhooks_params.rb b/lib/schematic/webhooks/types/count_webhooks_params.rb index 963a9fe..a43c414 100644 --- a/lib/schematic/webhooks/types/count_webhooks_params.rb +++ b/lib/schematic/webhooks/types/count_webhooks_params.rb @@ -6,7 +6,9 @@ module Types # Input parameters class CountWebhooksParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/webhooks/types/count_webhooks_request.rb b/lib/schematic/webhooks/types/count_webhooks_request.rb index 1111ccd..6f726cb 100644 --- a/lib/schematic/webhooks/types/count_webhooks_request.rb +++ b/lib/schematic/webhooks/types/count_webhooks_request.rb @@ -5,7 +5,9 @@ module Webhooks module Types class CountWebhooksRequest < Internal::Types::Model field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/webhooks/types/count_webhooks_response.rb b/lib/schematic/webhooks/types/count_webhooks_response.rb index e926518..9cd25dc 100644 --- a/lib/schematic/webhooks/types/count_webhooks_response.rb +++ b/lib/schematic/webhooks/types/count_webhooks_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class CountWebhooksResponse < Internal::Types::Model field :data, -> { Schematic::Types::CountResponse }, optional: false, nullable: false + field :params, -> { Schematic::Webhooks::Types::CountWebhooksParams }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/create_webhook_request_body.rb b/lib/schematic/webhooks/types/create_webhook_request_body.rb index 834a928..6ad8e9c 100644 --- a/lib/schematic/webhooks/types/create_webhook_request_body.rb +++ b/lib/schematic/webhooks/types/create_webhook_request_body.rb @@ -5,9 +5,13 @@ module Webhooks module Types class CreateWebhookRequestBody < Internal::Types::Model field :credit_trigger_configs, -> { Internal::Types::Array[Schematic::Types::CreditTriggerConfig] }, optional: true, nullable: false + field :entitlement_trigger_configs, -> { Internal::Types::Array[Schematic::Types::EntitlementTriggerConfig] }, optional: true, nullable: false + field :name, -> { String }, optional: false, nullable: false + field :request_types, -> { Internal::Types::Array[Schematic::Types::WebhookRequestType] }, optional: false, nullable: false + field :url, -> { String }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/create_webhook_response.rb b/lib/schematic/webhooks/types/create_webhook_response.rb index 3bac1b7..9e4b976 100644 --- a/lib/schematic/webhooks/types/create_webhook_response.rb +++ b/lib/schematic/webhooks/types/create_webhook_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class CreateWebhookResponse < Internal::Types::Model field :data, -> { Schematic::Types::WebhookResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/delete_webhook_response.rb b/lib/schematic/webhooks/types/delete_webhook_response.rb index 4a3862b..8e587d4 100644 --- a/lib/schematic/webhooks/types/delete_webhook_response.rb +++ b/lib/schematic/webhooks/types/delete_webhook_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class DeleteWebhookResponse < Internal::Types::Model field :data, -> { Schematic::Types::DeleteResponse }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/get_webhook_event_response.rb b/lib/schematic/webhooks/types/get_webhook_event_response.rb index f610aa7..e342386 100644 --- a/lib/schematic/webhooks/types/get_webhook_event_response.rb +++ b/lib/schematic/webhooks/types/get_webhook_event_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class GetWebhookEventResponse < Internal::Types::Model field :data, -> { Schematic::Types::WebhookEventDetailResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/get_webhook_response.rb b/lib/schematic/webhooks/types/get_webhook_response.rb index 8259093..b7e1a85 100644 --- a/lib/schematic/webhooks/types/get_webhook_response.rb +++ b/lib/schematic/webhooks/types/get_webhook_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class GetWebhookResponse < Internal::Types::Model field :data, -> { Schematic::Types::WebhookResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/list_webhook_events_params.rb b/lib/schematic/webhooks/types/list_webhook_events_params.rb index 2e6a182..55f8971 100644 --- a/lib/schematic/webhooks/types/list_webhook_events_params.rb +++ b/lib/schematic/webhooks/types/list_webhook_events_params.rb @@ -6,9 +6,13 @@ module Types # Input parameters class ListWebhookEventsParams < Internal::Types::Model field :ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :webhook_id, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/webhooks/types/list_webhook_events_request.rb b/lib/schematic/webhooks/types/list_webhook_events_request.rb index 6abb0c1..2eb91a2 100644 --- a/lib/schematic/webhooks/types/list_webhook_events_request.rb +++ b/lib/schematic/webhooks/types/list_webhook_events_request.rb @@ -5,9 +5,13 @@ module Webhooks module Types class ListWebhookEventsRequest < Internal::Types::Model field :ids, -> { String }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false + field :webhook_id, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/webhooks/types/list_webhook_events_response.rb b/lib/schematic/webhooks/types/list_webhook_events_response.rb index 99583d3..4a7f295 100644 --- a/lib/schematic/webhooks/types/list_webhook_events_response.rb +++ b/lib/schematic/webhooks/types/list_webhook_events_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class ListWebhookEventsResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::WebhookEventDetailResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Webhooks::Types::ListWebhookEventsParams }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/list_webhooks_params.rb b/lib/schematic/webhooks/types/list_webhooks_params.rb index 1153a88..c67dc2d 100644 --- a/lib/schematic/webhooks/types/list_webhooks_params.rb +++ b/lib/schematic/webhooks/types/list_webhooks_params.rb @@ -6,7 +6,9 @@ module Types # Input parameters class ListWebhooksParams < Internal::Types::Model field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false + field :q, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/webhooks/types/list_webhooks_request.rb b/lib/schematic/webhooks/types/list_webhooks_request.rb index a7e3d15..a78608e 100644 --- a/lib/schematic/webhooks/types/list_webhooks_request.rb +++ b/lib/schematic/webhooks/types/list_webhooks_request.rb @@ -5,7 +5,9 @@ module Webhooks module Types class ListWebhooksRequest < Internal::Types::Model field :q, -> { String }, optional: true, nullable: false + field :limit, -> { Integer }, optional: true, nullable: false + field :offset, -> { Integer }, optional: true, nullable: false end end diff --git a/lib/schematic/webhooks/types/list_webhooks_response.rb b/lib/schematic/webhooks/types/list_webhooks_response.rb index cf038a0..fdf0179 100644 --- a/lib/schematic/webhooks/types/list_webhooks_response.rb +++ b/lib/schematic/webhooks/types/list_webhooks_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class ListWebhooksResponse < Internal::Types::Model field :data, -> { Internal::Types::Array[Schematic::Types::WebhookResponseData] }, optional: false, nullable: false + field :params, -> { Schematic::Webhooks::Types::ListWebhooksParams }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/send_test_webhook_action_response.rb b/lib/schematic/webhooks/types/send_test_webhook_action_response.rb index a627e13..7cc3ed3 100644 --- a/lib/schematic/webhooks/types/send_test_webhook_action_response.rb +++ b/lib/schematic/webhooks/types/send_test_webhook_action_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class SendTestWebhookActionResponse < Internal::Types::Model field :data, -> { Schematic::Types::TestWebhookResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/test_webhook_request_body.rb b/lib/schematic/webhooks/types/test_webhook_request_body.rb index 613f05b..8e279ef 100644 --- a/lib/schematic/webhooks/types/test_webhook_request_body.rb +++ b/lib/schematic/webhooks/types/test_webhook_request_body.rb @@ -5,6 +5,7 @@ module Webhooks module Types class TestWebhookRequestBody < Internal::Types::Model field :webhook_id, -> { String }, optional: false, nullable: false + field :request_type, -> { Schematic::Types::WebhookRequestType }, optional: false, nullable: false end end diff --git a/lib/schematic/webhooks/types/update_webhook_request_body.rb b/lib/schematic/webhooks/types/update_webhook_request_body.rb index d52f932..4f85247 100644 --- a/lib/schematic/webhooks/types/update_webhook_request_body.rb +++ b/lib/schematic/webhooks/types/update_webhook_request_body.rb @@ -5,11 +5,17 @@ module Webhooks module Types class UpdateWebhookRequestBody < Internal::Types::Model field :webhook_id, -> { String }, optional: false, nullable: false + field :credit_trigger_configs, -> { Internal::Types::Array[Schematic::Types::CreditTriggerConfig] }, optional: true, nullable: false + field :entitlement_trigger_configs, -> { Internal::Types::Array[Schematic::Types::EntitlementTriggerConfig] }, optional: true, nullable: false + field :name, -> { String }, optional: true, nullable: false + field :request_types, -> { Internal::Types::Array[Schematic::Types::WebhookRequestType] }, optional: true, nullable: false + field :status, -> { Schematic::Types::WebhookStatus }, optional: true, nullable: false + field :url, -> { String }, optional: true, nullable: false end end diff --git a/lib/schematic/webhooks/types/update_webhook_response.rb b/lib/schematic/webhooks/types/update_webhook_response.rb index 7a0310e..8670a70 100644 --- a/lib/schematic/webhooks/types/update_webhook_response.rb +++ b/lib/schematic/webhooks/types/update_webhook_response.rb @@ -5,6 +5,7 @@ module Webhooks module Types class UpdateWebhookResponse < Internal::Types::Model field :data, -> { Schematic::Types::WebhookResponseData }, optional: false, nullable: false + field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false end end diff --git a/reference.md b/reference.md index 2d0f6bf..998398f 100644 --- a/reference.md +++ b/reference.md @@ -126,7 +126,7 @@ client.accounts.list_account_members( -
client.accounts.get_account_member(account_member_id) -> Schematic::Accounts::Types::GetAccountMemberResponse +
client.accounts.get_account_member(account_member_id:) -> Schematic::Accounts::Types::GetAccountMemberResponse
@@ -417,7 +417,7 @@ client.accounts.create_api_key(name: "name")
-
client.accounts.get_api_key(api_key_id) -> Schematic::Accounts::Types::GetApiKeyResponse +
client.accounts.get_api_key(api_key_id:) -> Schematic::Accounts::Types::GetApiKeyResponse
@@ -465,7 +465,7 @@ client.accounts.get_api_key(api_key_id: "api_key_id")
-
client.accounts.update_api_key(api_key_id, request) -> Schematic::Accounts::Types::UpdateApiKeyResponse +
client.accounts.update_api_key(api_key_id:, request) -> Schematic::Accounts::Types::UpdateApiKeyResponse
@@ -537,7 +537,7 @@ client.accounts.update_api_key(api_key_id: "api_key_id")
-
client.accounts.delete_api_key(api_key_id) -> Schematic::Accounts::Types::DeleteApiKeyResponse +
client.accounts.delete_api_key(api_key_id:) -> Schematic::Accounts::Types::DeleteApiKeyResponse
@@ -766,7 +766,7 @@ client.accounts.list_audit_logs(
-
client.accounts.get_audit_log(audit_log_id) -> Schematic::Accounts::Types::GetAuditLogResponse +
client.accounts.get_audit_log(audit_log_id:) -> Schematic::Accounts::Types::GetAuditLogResponse
@@ -1045,7 +1045,7 @@ client.accounts.create_environment(
-
client.accounts.get_environment(environment_id) -> Schematic::Accounts::Types::GetEnvironmentResponse +
client.accounts.get_environment(environment_id:) -> Schematic::Accounts::Types::GetEnvironmentResponse
@@ -1093,7 +1093,7 @@ client.accounts.get_environment(environment_id: "environment_id")
-
client.accounts.update_environment(environment_id, request) -> Schematic::Accounts::Types::UpdateEnvironmentResponse +
client.accounts.update_environment(environment_id:, request) -> Schematic::Accounts::Types::UpdateEnvironmentResponse
@@ -1157,7 +1157,7 @@ client.accounts.update_environment(environment_id: "environment_id")
-
client.accounts.delete_environment(environment_id) -> Schematic::Accounts::Types::DeleteEnvironmentResponse +
client.accounts.delete_environment(environment_id:) -> Schematic::Accounts::Types::DeleteEnvironmentResponse
@@ -1596,7 +1596,7 @@ client.billing.upsert_billing_coupon(
-
client.billing.delete_billing_coupon(billing_id) -> Schematic::Billing::Types::DeleteBillingCouponResponse +
client.billing.delete_billing_coupon(billing_id:) -> Schematic::Billing::Types::DeleteBillingCouponResponse
@@ -1644,7 +1644,7 @@ client.billing.delete_billing_coupon(billing_id: "billing_id")
-
client.billing.delete_billing_customer(billing_id) -> Schematic::Billing::Types::DeleteBillingCustomerResponse +
client.billing.delete_billing_customer(billing_id:) -> Schematic::Billing::Types::DeleteBillingCustomerResponse
@@ -2239,7 +2239,7 @@ client.billing.upsert_invoice(
-
client.billing.delete_billing_invoice(billing_id) -> Schematic::Billing::Types::DeleteBillingInvoiceResponse +
client.billing.delete_billing_invoice(billing_id:) -> Schematic::Billing::Types::DeleteBillingInvoiceResponse
@@ -2657,7 +2657,7 @@ client.billing.upsert_payment_method(
-
client.billing.delete_payment_method_by_external_id(billing_id) -> Schematic::Billing::Types::DeletePaymentMethodByExternalIdResponse +
client.billing.delete_payment_method_by_external_id(billing_id:) -> Schematic::Billing::Types::DeletePaymentMethodByExternalIdResponse
@@ -3097,7 +3097,7 @@ client.billing.upsert_billing_price(
-
client.billing.delete_billing_product(billing_id) -> Schematic::Billing::Types::DeleteBillingProductResponse +
client.billing.delete_billing_product(billing_id:) -> Schematic::Billing::Types::DeleteBillingProductResponse
@@ -3348,7 +3348,7 @@ client.billing.list_billing_product_prices(
-
client.billing.delete_product_price(billing_id) -> Schematic::Billing::Types::DeleteProductPriceResponse +
client.billing.delete_product_price(billing_id:) -> Schematic::Billing::Types::DeleteProductPriceResponse
@@ -4251,7 +4251,7 @@ client.credits.create_billing_credit(
-
client.credits.get_single_billing_credit(credit_id) -> Schematic::Credits::Types::GetSingleBillingCreditResponse +
client.credits.get_single_billing_credit(credit_id:) -> Schematic::Credits::Types::GetSingleBillingCreditResponse
@@ -4299,7 +4299,7 @@ client.credits.get_single_billing_credit(credit_id: "credit_id")
-
client.credits.update_billing_credit(credit_id, request) -> Schematic::Credits::Types::UpdateBillingCreditResponse +
client.credits.update_billing_credit(credit_id:, request) -> Schematic::Credits::Types::UpdateBillingCreditResponse
@@ -4447,7 +4447,7 @@ client.credits.update_billing_credit(
-
client.credits.soft_delete_billing_credit(credit_id) -> Schematic::Credits::Types::SoftDeleteBillingCreditResponse +
client.credits.soft_delete_billing_credit(credit_id:) -> Schematic::Credits::Types::SoftDeleteBillingCreditResponse
@@ -4787,7 +4787,7 @@ client.credits.create_credit_bundle(
-
client.credits.get_credit_bundle(bundle_id) -> Schematic::Credits::Types::GetCreditBundleResponse +
client.credits.get_credit_bundle(bundle_id:) -> Schematic::Credits::Types::GetCreditBundleResponse
@@ -4835,7 +4835,7 @@ client.credits.get_credit_bundle(bundle_id: "bundle_id")
-
client.credits.update_credit_bundle_details(bundle_id, request) -> Schematic::Credits::Types::UpdateCreditBundleDetailsResponse +
client.credits.update_credit_bundle_details(bundle_id:, request) -> Schematic::Credits::Types::UpdateCreditBundleDetailsResponse
@@ -4967,7 +4967,7 @@ client.credits.update_credit_bundle_details(
-
client.credits.delete_credit_bundle(bundle_id) -> Schematic::Credits::Types::DeleteCreditBundleResponse +
client.credits.delete_credit_bundle(bundle_id:) -> Schematic::Credits::Types::DeleteCreditBundleResponse
@@ -5187,7 +5187,7 @@ client.credits.count_billing_credits(
-
client.credits.zero_out_grant(grant_id, request) -> Schematic::Credits::Types::ZeroOutGrantResponse +
client.credits.zero_out_grant(grant_id:, request) -> Schematic::Credits::Types::ZeroOutGrantResponse
@@ -5786,7 +5786,7 @@ client.credits.acquire_credit_lease(
-
client.credits.extend_credit_lease(lease_id, request) -> Schematic::Credits::Types::ExtendCreditLeaseResponse +
client.credits.extend_credit_lease(lease_id:, request) -> Schematic::Credits::Types::ExtendCreditLeaseResponse
@@ -5853,7 +5853,7 @@ client.credits.extend_credit_lease(
-
client.credits.release_credit_lease(lease_id, request) -> Schematic::Credits::Types::ReleaseCreditLeaseResponse +
client.credits.release_credit_lease(lease_id:, request) -> Schematic::Credits::Types::ReleaseCreditLeaseResponse
@@ -5868,7 +5868,9 @@ client.credits.extend_credit_lease( ```ruby client.credits.release_credit_lease( lease_id: "lease_id", - request: {} + request: { + key: "value" + } ) ```
@@ -6079,7 +6081,7 @@ client.credits.create_billing_plan_credit_grant(
-
client.credits.get_single_billing_plan_credit_grant(plan_grant_id) -> Schematic::Credits::Types::GetSingleBillingPlanCreditGrantResponse +
client.credits.get_single_billing_plan_credit_grant(plan_grant_id:) -> Schematic::Credits::Types::GetSingleBillingPlanCreditGrantResponse
@@ -6127,7 +6129,7 @@ client.credits.get_single_billing_plan_credit_grant(plan_grant_id: "plan_grant_i
-
client.credits.update_billing_plan_credit_grant(plan_grant_id, request) -> Schematic::Credits::Types::UpdateBillingPlanCreditGrantResponse +
client.credits.update_billing_plan_credit_grant(plan_grant_id:, request) -> Schematic::Credits::Types::UpdateBillingPlanCreditGrantResponse
@@ -6187,7 +6189,7 @@ client.credits.update_billing_plan_credit_grant(
-
client.credits.delete_billing_plan_credit_grant(plan_grant_id) -> Schematic::Credits::Types::DeleteBillingPlanCreditGrantResponse +
client.credits.delete_billing_plan_credit_grant(plan_grant_id:) -> Schematic::Credits::Types::DeleteBillingPlanCreditGrantResponse
@@ -6719,7 +6721,7 @@ client.catalogs.create_catalog(name: "name")
-
client.catalogs.get_catalog(catalog_id) -> Schematic::Catalogs::Types::GetCatalogResponse +
client.catalogs.get_catalog(catalog_id:) -> Schematic::Catalogs::Types::GetCatalogResponse
@@ -6767,7 +6769,7 @@ client.catalogs.get_catalog(catalog_id: "catalog_id")
-
client.catalogs.update_catalog(catalog_id, request) -> Schematic::Catalogs::Types::UpdateCatalogResponse +
client.catalogs.update_catalog(catalog_id:, request) -> Schematic::Catalogs::Types::UpdateCatalogResponse
@@ -6839,7 +6841,7 @@ client.catalogs.update_catalog(catalog_id: "catalog_id")
-
client.catalogs.delete_catalog(catalog_id) -> Schematic::Catalogs::Types::DeleteCatalogResponse +
client.catalogs.delete_catalog(catalog_id:) -> Schematic::Catalogs::Types::DeleteCatalogResponse
@@ -6887,7 +6889,7 @@ client.catalogs.delete_catalog(catalog_id: "catalog_id")
-
client.catalogs.get_configuration(catalog_id) -> Schematic::Catalogs::Types::GetConfigurationResponse +
client.catalogs.get_configuration(catalog_id:) -> Schematic::Catalogs::Types::GetConfigurationResponse
@@ -6935,7 +6937,7 @@ client.catalogs.get_configuration(catalog_id: "catalog_id")
-
client.catalogs.update_configuration(catalog_id, request) -> Schematic::Catalogs::Types::UpdateConfigurationResponse +
client.catalogs.update_configuration(catalog_id:, request) -> Schematic::Catalogs::Types::UpdateConfigurationResponse
@@ -7055,7 +7057,7 @@ client.catalogs.update_configuration(catalog_id: "catalog_id")
-
client.catalogs.get_credit_bundles_in_catalog(catalog_id) -> Schematic::Catalogs::Types::GetCreditBundlesInCatalogResponse +
client.catalogs.get_credit_bundles_in_catalog(catalog_id:) -> Schematic::Catalogs::Types::GetCreditBundlesInCatalogResponse
@@ -7103,7 +7105,7 @@ client.catalogs.get_credit_bundles_in_catalog(catalog_id: "catalog_id")
-
client.catalogs.add_credit_bundle(catalog_id, credit_bundle_id) -> +
client.catalogs.add_credit_bundle(catalog_id:, credit_bundle_id:) ->
@@ -7162,7 +7164,7 @@ client.catalogs.add_credit_bundle(
-
client.catalogs.remove_credit_bundle(catalog_id, credit_bundle_id) -> +
client.catalogs.remove_credit_bundle(catalog_id:, credit_bundle_id:) ->
@@ -7221,7 +7223,7 @@ client.catalogs.remove_credit_bundle(
-
client.catalogs.get_derived_features(catalog_id) -> Schematic::Catalogs::Types::GetDerivedFeaturesResponse +
client.catalogs.get_derived_features(catalog_id:) -> Schematic::Catalogs::Types::GetDerivedFeaturesResponse
@@ -7269,7 +7271,7 @@ client.catalogs.get_derived_features(catalog_id: "catalog_id")
-
client.catalogs.get_plans_in_catalog(catalog_id) -> Schematic::Catalogs::Types::GetPlansInCatalogResponse +
client.catalogs.get_plans_in_catalog(catalog_id:) -> Schematic::Catalogs::Types::GetPlansInCatalogResponse
@@ -7317,7 +7319,7 @@ client.catalogs.get_plans_in_catalog(catalog_id: "catalog_id")
-
client.catalogs.add_plan(catalog_id, plan_id) -> +
client.catalogs.add_plan(catalog_id:, plan_id:) ->
@@ -7376,7 +7378,7 @@ client.catalogs.add_plan(
-
client.catalogs.remove_plan(catalog_id, plan_id) -> +
client.catalogs.remove_plan(catalog_id:, plan_id:) ->
@@ -7644,7 +7646,7 @@ client.checkout.preview_checkout_internal(
-
client.checkout.get_company_billing_details(company_id) -> Schematic::Checkout::Types::GetCompanyBillingDetailsResponse +
client.checkout.get_company_billing_details(company_id:) -> Schematic::Checkout::Types::GetCompanyBillingDetailsResponse
@@ -7692,7 +7694,7 @@ client.checkout.get_company_billing_details(company_id: "company_id")
-
client.checkout.update_company_billing_details(company_id, request) -> Schematic::Checkout::Types::UpdateCompanyBillingDetailsResponse +
client.checkout.update_company_billing_details(company_id:, request) -> Schematic::Checkout::Types::UpdateCompanyBillingDetailsResponse
@@ -7980,7 +7982,7 @@ client.checkout.cancel_subscription(company_id: "company_id")
-
client.checkout.update_customer_subscription_trial_end(subscription_id, request) -> Schematic::Checkout::Types::UpdateCustomerSubscriptionTrialEndResponse +
client.checkout.update_customer_subscription_trial_end(subscription_id:, request) -> Schematic::Checkout::Types::UpdateCustomerSubscriptionTrialEndResponse
@@ -8059,6 +8061,7 @@ client.companies.list_companies( plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", plan_version_ids: ["plan_version_ids"], + plan_version_unpublished: true, q: "q", sort_order_column: "sort_order_column", sort_order_direction: "asc", @@ -8150,6 +8153,14 @@ client.companies.list_companies(
+**plan_version_unpublished:** `Internal::Types::Boolean` — Filter companies assigned to a plan version that is no longer published, meaning the plan has since moved on to a newer version + +
+
+ +
+
+ **q:** `String` — Search for companies by name, keys or string traits
@@ -8308,7 +8319,7 @@ client.companies.upsert_company(keys: {
-
client.companies.get_company(company_id) -> Schematic::Companies::Types::GetCompanyResponse +
client.companies.get_company(company_id:) -> Schematic::Companies::Types::GetCompanyResponse
@@ -8356,7 +8367,7 @@ client.companies.get_company(company_id: "company_id")
-
client.companies.delete_company(company_id) -> Schematic::Companies::Types::DeleteCompanyResponse +
client.companies.delete_company(company_id:) -> Schematic::Companies::Types::DeleteCompanyResponse
@@ -8446,6 +8457,7 @@ client.companies.count_companies( plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", plan_version_ids: ["plan_version_ids"], + plan_version_unpublished: true, q: "q", sort_order_column: "sort_order_column", sort_order_direction: "asc", @@ -8537,6 +8549,14 @@ client.companies.count_companies(
+**plan_version_unpublished:** `Internal::Types::Boolean` — Filter companies assigned to a plan version that is no longer published, meaning the plan has since moved on to a newer version + +
+
+ +
+
+ **q:** `String` — Search for companies by name, keys or string traits
@@ -9045,7 +9065,7 @@ client.companies.get_or_create_company_membership(
-
client.companies.delete_company_membership(company_membership_id) -> Schematic::Companies::Types::DeleteCompanyMembershipResponse +
client.companies.delete_company_membership(company_membership_id:) -> Schematic::Companies::Types::DeleteCompanyMembershipResponse
@@ -9309,7 +9329,7 @@ client.companies.list_entity_key_definitions(
-
client.companies.delete_entity_key_definition(entity_key_definition_id) -> Schematic::Companies::Types::DeleteEntityKeyDefinitionResponse +
client.companies.delete_entity_key_definition(entity_key_definition_id:) -> Schematic::Companies::Types::DeleteEntityKeyDefinitionResponse
@@ -9700,7 +9720,7 @@ client.companies.get_or_create_entity_trait_definition(
-
client.companies.get_entity_trait_definition(entity_trait_definition_id) -> Schematic::Companies::Types::GetEntityTraitDefinitionResponse +
client.companies.get_entity_trait_definition(entity_trait_definition_id:) -> Schematic::Companies::Types::GetEntityTraitDefinitionResponse
@@ -9748,7 +9768,7 @@ client.companies.get_entity_trait_definition(entity_trait_definition_id: "entity
-
client.companies.update_entity_trait_definition(entity_trait_definition_id, request) -> Schematic::Companies::Types::UpdateEntityTraitDefinitionResponse +
client.companies.update_entity_trait_definition(entity_trait_definition_id:, request) -> Schematic::Companies::Types::UpdateEntityTraitDefinitionResponse
@@ -9815,7 +9835,7 @@ client.companies.update_entity_trait_definition(
-
client.companies.delete_entity_trait_definition(entity_trait_definition_id) -> Schematic::Companies::Types::DeleteEntityTraitDefinitionResponse +
client.companies.delete_entity_trait_definition(entity_trait_definition_id:) -> Schematic::Companies::Types::DeleteEntityTraitDefinitionResponse
@@ -9863,7 +9883,7 @@ client.companies.delete_entity_trait_definition(entity_trait_definition_id: "ent
-
client.companies.get_entity_trait_definition_usage(entity_trait_definition_id) -> Schematic::Companies::Types::GetEntityTraitDefinitionUsageResponse +
client.companies.get_entity_trait_definition_usage(entity_trait_definition_id:) -> Schematic::Companies::Types::GetEntityTraitDefinitionUsageResponse
@@ -10264,7 +10284,7 @@ client.companies.list_plan_changes(
-
client.companies.get_plan_change(plan_change_id) -> Schematic::Companies::Types::GetPlanChangeResponse +
client.companies.get_plan_change(plan_change_id:) -> Schematic::Companies::Types::GetPlanChangeResponse
@@ -10407,7 +10427,7 @@ client.companies.list_plan_traits(
-
client.companies.get_plan_trait(plan_trait_id) -> Schematic::Companies::Types::GetPlanTraitResponse +
client.companies.get_plan_trait(plan_trait_id:) -> Schematic::Companies::Types::GetPlanTraitResponse
@@ -10819,7 +10839,7 @@ client.companies.upsert_user(keys: {
-
client.companies.get_user(user_id) -> Schematic::Companies::Types::GetUserResponse +
client.companies.get_user(user_id:) -> Schematic::Companies::Types::GetUserResponse
@@ -10867,7 +10887,7 @@ client.companies.get_user(user_id: "user_id")
-
client.companies.delete_user(user_id) -> Schematic::Companies::Types::DeleteUserResponse +
client.companies.delete_user(user_id:) -> Schematic::Companies::Types::DeleteUserResponse
@@ -11423,7 +11443,7 @@ client.entitlements.create_company_override(
-
client.entitlements.get_company_override(company_override_id) -> Schematic::Entitlements::Types::GetCompanyOverrideResponse +
client.entitlements.get_company_override(company_override_id:) -> Schematic::Entitlements::Types::GetCompanyOverrideResponse
@@ -11471,7 +11491,7 @@ client.entitlements.get_company_override(company_override_id: "company_override_
-
client.entitlements.update_company_override(company_override_id, request) -> Schematic::Entitlements::Types::UpdateCompanyOverrideResponse +
client.entitlements.update_company_override(company_override_id:, request) -> Schematic::Entitlements::Types::UpdateCompanyOverrideResponse
@@ -11602,7 +11622,7 @@ client.entitlements.update_company_override(
-
client.entitlements.delete_company_override(company_override_id) -> Schematic::Entitlements::Types::DeleteCompanyOverrideResponse +
client.entitlements.delete_company_override(company_override_id:) -> Schematic::Entitlements::Types::DeleteCompanyOverrideResponse
@@ -12043,6 +12063,110 @@ client.entitlements.list_feature_usage(
+ + +
+ +
client.entitlements.list_feature_usage_history() -> Schematic::Entitlements::Types::ListFeatureUsageHistoryResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.entitlements.list_feature_usage_history( + company_ids: ["company_ids"], + end_time: "2024-01-15T09:30:00Z", + feature_ids: ["feature_ids"], + granularity: "daily", + start_time: "2024-01-15T09:30:00Z", + limit: 1000000, + offset: 1000000 +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_ids:** `String` — Restrict to these company IDs; omit for every company in the environment + +
+
+ +
+
+ +**end_time:** `String` — Exclusive end of the window; must fall on an hour boundary + +
+
+ +
+
+ +**feature_ids:** `String` — Restrict to these event features; omit for every event feature in the environment. Where several features measure the same event, each is reported separately and a page may carry more rows than the requested limit + +
+
+ +
+
+ +**granularity:** `Schematic::Types::TimeSeriesGranularity` — Bucket the window; omit for a single total per company and feature + +
+
+ +
+
+ +**start_time:** `String` — Inclusive start of the window; must fall on an hour boundary + +
+
+ +
+
+ +**limit:** `Integer` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `Integer` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `Schematic::Entitlements::RequestOptions` + +
+
+
+
+ +
@@ -12864,7 +12988,7 @@ client.entitlements.create_plan_entitlement(
-
client.entitlements.get_plan_entitlement(plan_entitlement_id) -> Schematic::Entitlements::Types::GetPlanEntitlementResponse +
client.entitlements.get_plan_entitlement(plan_entitlement_id:) -> Schematic::Entitlements::Types::GetPlanEntitlementResponse
@@ -12912,7 +13036,7 @@ client.entitlements.get_plan_entitlement(plan_entitlement_id: "plan_entitlement_
-
client.entitlements.update_plan_entitlement(plan_entitlement_id, request) -> Schematic::Entitlements::Types::UpdatePlanEntitlementResponse +
client.entitlements.update_plan_entitlement(plan_entitlement_id:, request) -> Schematic::Entitlements::Types::UpdatePlanEntitlementResponse
@@ -13211,7 +13335,7 @@ client.entitlements.update_plan_entitlement(
-
client.entitlements.delete_plan_entitlement(plan_entitlement_id) -> Schematic::Entitlements::Types::DeletePlanEntitlementResponse +
client.entitlements.delete_plan_entitlement(plan_entitlement_id:) -> Schematic::Entitlements::Types::DeletePlanEntitlementResponse
@@ -13997,7 +14121,7 @@ client.entitlements.get_user_usage_detail(
## plans -
client.plans.update_company_plans(company_id, request) -> Schematic::Plans::Types::UpdateCompanyPlansResponse +
client.plans.update_company_plans(company_id:, request) -> Schematic::Plans::Types::UpdateCompanyPlansResponse
@@ -14168,7 +14292,7 @@ client.plans.list_custom_plan_billings(
-
client.plans.mark_custom_plan_billing_paid(custom_plan_billing_id, request) -> Schematic::Plans::Types::MarkCustomPlanBillingPaidResponse +
client.plans.mark_custom_plan_billing_paid(custom_plan_billing_id:, request) -> Schematic::Plans::Types::MarkCustomPlanBillingPaidResponse
@@ -14183,7 +14307,9 @@ client.plans.list_custom_plan_billings( ```ruby client.plans.mark_custom_plan_billing_paid( custom_plan_billing_id: "custom_plan_billing_id", - request: {} + request: { + key: "value" + } ) ```
@@ -14227,7 +14353,7 @@ client.plans.mark_custom_plan_billing_paid(
-
client.plans.retry_custom_plan_billing(custom_plan_billing_id, request) -> Schematic::Plans::Types::RetryCustomPlanBillingResponse +
client.plans.retry_custom_plan_billing(custom_plan_billing_id:, request) -> Schematic::Plans::Types::RetryCustomPlanBillingResponse
@@ -14325,7 +14451,6 @@ client.plans.retry_custom_plan_billing( ```ruby client.plans.create_custom_plan( company_id: "company_id", - description: "description", name: "name" ) ``` @@ -14358,6 +14483,14 @@ client.plans.create_custom_plan(
+**copied_price_id:** `String` + +
+
+ +
+
+ **description:** `String`
@@ -14602,7 +14735,6 @@ client.plans.list_plans( ```ruby client.plans.create_plan( - description: "description", name: "name", plan_type: "plan" ) @@ -14640,7 +14772,7 @@ client.plans.create_plan(
-
client.plans.get_plan(plan_id) -> Schematic::Plans::Types::GetPlanResponse +
client.plans.get_plan(plan_id:) -> Schematic::Plans::Types::GetPlanResponse
@@ -14699,7 +14831,7 @@ client.plans.get_plan(
-
client.plans.update_plan(plan_id, request) -> Schematic::Plans::Types::UpdatePlanResponse +
client.plans.update_plan(plan_id:, request) -> Schematic::Plans::Types::UpdatePlanResponse
@@ -14758,7 +14890,7 @@ client.plans.update_plan(
-
client.plans.delete_plan(plan_id) -> Schematic::Plans::Types::DeletePlanResponse +
client.plans.delete_plan(plan_id:) -> Schematic::Plans::Types::DeletePlanResponse
@@ -14806,7 +14938,7 @@ client.plans.delete_plan(plan_id: "plan_id")
-
client.plans.upsert_billing_product_plan(plan_id, request) -> Schematic::Plans::Types::UpsertBillingProductPlanResponse +
client.plans.upsert_billing_product_plan(plan_id:, request) -> Schematic::Plans::Types::UpsertBillingProductPlanResponse
@@ -14881,7 +15013,6 @@ client.plans.upsert_billing_product_plan( ```ruby client.plans.upsert_plan_for_billing_product( billing_provider: "metronome", - description: "description", external_resource_id: "external_resource_id", name: "name", plan_type: "plan" @@ -15375,7 +15506,7 @@ client.plans.list_plan_issues(
-
client.plans.delete_plan_version(plan_version_id) -> Schematic::Plans::Types::DeletePlanVersionResponse +
client.plans.delete_plan_version(plan_version_id:) -> Schematic::Plans::Types::DeletePlanVersionResponse
@@ -15434,7 +15565,7 @@ client.plans.delete_plan_version(
-
client.plans.publish_plan_version(plan_version_id, request) -> Schematic::Plans::Types::PublishPlanVersionResponse +
client.plans.publish_plan_version(plan_version_id:, request) -> Schematic::Plans::Types::PublishPlanVersionResponse
@@ -15554,6 +15685,14 @@ client.plans.publish_plan_version(
+**require_no_migration:** `Internal::Types::Boolean` — Refuse the publish if any company would be migrated onto the new version + +
+
+ +
+
+ **send_invoice:** `Internal::Types::Boolean` — Whether Stripe emails the invoice when it is finalized. Defaults to true.
@@ -15718,7 +15857,7 @@ client.components.create_component(
-
client.components.get_component(component_id) -> Schematic::Components::Types::GetComponentResponse +
client.components.get_component(component_id:) -> Schematic::Components::Types::GetComponentResponse
@@ -15766,7 +15905,7 @@ client.components.get_component(component_id: "component_id")
-
client.components.update_component(component_id, request) -> Schematic::Components::Types::UpdateComponentResponse +
client.components.update_component(component_id:, request) -> Schematic::Components::Types::UpdateComponentResponse
@@ -15846,7 +15985,7 @@ client.components.update_component(component_id: "component_id")
-
client.components.delete_component(component_id) -> Schematic::Components::Types::DeleteComponentResponse +
client.components.delete_component(component_id:) -> Schematic::Components::Types::DeleteComponentResponse
@@ -15894,7 +16033,7 @@ client.components.delete_component(component_id: "component_id")
-
client.components.bind_catalog(component_id, request) -> Schematic::Components::Types::BindCatalogResponse +
client.components.bind_catalog(component_id:, request) -> Schematic::Components::Types::BindCatalogResponse
@@ -16091,9 +16230,19 @@ client.components.preview_component_data(
```ruby -client.planbundle.create_custom_plan_bundle(entitlements: [{ - action: "create" -}]) +client.planbundle.create_custom_plan_bundle( + billing_product: { + charge_type: "free", + is_trialable: true + }, + entitlements: [{ + action: "create" + }], + plan: { + company_id: "company_id", + name: "name" + } +) ```
@@ -16165,9 +16314,15 @@ client.planbundle.create_custom_plan_bundle(entitlements: [{
```ruby -client.planbundle.create_plan_bundle(entitlements: [{ - action: "create" -}]) +client.planbundle.create_plan_bundle( + entitlements: [{ + action: "create" + }], + plan: { + name: "name", + plan_type: "plan" + } +) ```
@@ -16226,7 +16381,7 @@ client.planbundle.create_plan_bundle(entitlements: [{
-
client.planbundle.update_plan_bundle(plan_id, request) -> Schematic::Planbundle::Types::UpdatePlanBundleResponse +
client.planbundle.update_plan_bundle(plan_id:, request) -> Schematic::Planbundle::Types::UpdatePlanBundleResponse
@@ -16243,7 +16398,10 @@ client.planbundle.update_plan_bundle( plan_id: "plan_id", entitlements: [{ action: "create" - }] + }], + plan: { + name: "name" + } ) ```
@@ -16464,7 +16622,7 @@ client.dataexports.create_data_export(
-
client.dataexports.get_data_export(data_export_id) -> Schematic::Dataexports::Types::GetDataExportResponse +
client.dataexports.get_data_export(data_export_id:) -> Schematic::Dataexports::Types::GetDataExportResponse
@@ -16512,7 +16670,7 @@ client.dataexports.get_data_export(data_export_id: "data_export_id")
-
client.dataexports.get_data_export_artifact(data_export_id) -> String +
client.dataexports.get_data_export_artifact(data_export_id:) -> String
@@ -16849,7 +17007,7 @@ client.events.create_event(event_type: "flag_check")
-
client.events.get_event(event_id) -> Schematic::Events::Types::GetEventResponse +
client.events.get_event(event_id:) -> Schematic::Events::Types::GetEventResponse
@@ -17201,7 +17359,7 @@ client.features.create_feature(
-
client.features.get_feature(feature_id) -> Schematic::Features::Types::GetFeatureResponse +
client.features.get_feature(feature_id:) -> Schematic::Features::Types::GetFeatureResponse
@@ -17249,7 +17407,7 @@ client.features.get_feature(feature_id: "feature_id")
-
client.features.update_feature(feature_id, request) -> Schematic::Features::Types::UpdateFeatureResponse +
client.features.update_feature(feature_id:, request) -> Schematic::Features::Types::UpdateFeatureResponse
@@ -17385,7 +17543,7 @@ client.features.update_feature(feature_id: "feature_id")
-
client.features.delete_feature(feature_id) -> Schematic::Features::Types::DeleteFeatureResponse +
client.features.delete_feature(feature_id:) -> Schematic::Features::Types::DeleteFeatureResponse
@@ -17854,7 +18012,7 @@ client.features.create_flag(
-
client.features.get_flag(flag_id) -> Schematic::Features::Types::GetFlagResponse +
client.features.get_flag(flag_id:) -> Schematic::Features::Types::GetFlagResponse
@@ -17902,7 +18060,7 @@ client.features.get_flag(flag_id: "flag_id")
-
client.features.update_flag(flag_id, request) -> Schematic::Features::Types::UpdateFlagResponse +
client.features.update_flag(flag_id:, request) -> Schematic::Features::Types::UpdateFlagResponse
@@ -17965,7 +18123,7 @@ client.features.update_flag(
-
client.features.delete_flag(flag_id) -> Schematic::Features::Types::DeleteFlagResponse +
client.features.delete_flag(flag_id:) -> Schematic::Features::Types::DeleteFlagResponse
@@ -18013,7 +18171,7 @@ client.features.delete_flag(flag_id: "flag_id")
-
client.features.update_flag_rules(flag_id, request) -> Schematic::Features::Types::UpdateFlagRulesResponse +
client.features.update_flag_rules(flag_id:, request) -> Schematic::Features::Types::UpdateFlagRulesResponse
@@ -18088,7 +18246,7 @@ client.features.update_flag_rules(
-
client.features.check_flag(key, request) -> Schematic::Features::Types::CheckFlagResponse +
client.features.check_flag(key:, request) -> Schematic::Features::Types::CheckFlagResponse
@@ -18686,7 +18844,7 @@ client.insights.get_environment_trait_usage_time_series(
## integrationsapi -
client.integrationsapi.run_integration(integration_id) -> Schematic::Integrationsapi::Types::RunIntegrationResponse +
client.integrationsapi.run_integration(integration_id:) -> Schematic::Integrationsapi::Types::RunIntegrationResponse
@@ -18838,7 +18996,7 @@ client.integrationsapi.list_integrations(
-
client.integrationsapi.get_integration_webhook_url(type) -> Schematic::Integrationsapi::Types::GetIntegrationWebhookUrlResponse +
client.integrationsapi.get_integration_webhook_url(type:) -> Schematic::Integrationsapi::Types::GetIntegrationWebhookUrlResponse
@@ -19134,7 +19292,7 @@ client.integrationsapi.install_stripe(type: "clerk")
-
client.integrationsapi.uninstall_integration(integration_id) -> Schematic::Integrationsapi::Types::UninstallIntegrationResponse +
client.integrationsapi.uninstall_integration(integration_id:) -> Schematic::Integrationsapi::Types::UninstallIntegrationResponse
@@ -19269,7 +19427,7 @@ client.licenses.list_licenses(
-
client.licenses.get_single_license(license_id) -> Schematic::Licenses::Types::GetSingleLicenseResponse +
client.licenses.get_single_license(license_id:) -> Schematic::Licenses::Types::GetSingleLicenseResponse
@@ -19467,7 +19625,6 @@ client.plangroups.get_plan_group(include_company_counts: true) ```ruby client.plangroups.create_plan_group( add_on_ids: ["add_on_ids"], - checkout_bundle_purchase_behavior: "individual", checkout_collect_address: true, checkout_collect_email: true, checkout_collect_phone: true, @@ -19824,7 +19981,7 @@ client.plangroups.create_plan_group(
-
client.plangroups.update_plan_group(plan_group_id, request) -> Schematic::Plangroups::Types::UpdatePlanGroupResponse +
client.plangroups.update_plan_group(plan_group_id:, request) -> Schematic::Plangroups::Types::UpdatePlanGroupResponse
@@ -19840,7 +19997,6 @@ client.plangroups.create_plan_group( client.plangroups.update_plan_group( plan_group_id: "plan_group_id", add_on_ids: ["add_on_ids"], - checkout_bundle_purchase_behavior: "individual", checkout_collect_address: true, checkout_collect_email: true, checkout_collect_phone: true, @@ -20292,7 +20448,7 @@ client.planmigrations.list_company_migrations(
-
client.planmigrations.retry_company_migration(plan_version_company_migration_id) -> Schematic::Planmigrations::Types::RetryCompanyMigrationResponse +
client.planmigrations.retry_company_migration(plan_version_company_migration_id:) -> Schematic::Planmigrations::Types::RetryCompanyMigrationResponse
@@ -20612,7 +20768,7 @@ client.planmigrations.create_migration(
-
client.planmigrations.get_migration(plan_version_migration_id) -> Schematic::Planmigrations::Types::GetMigrationResponse +
client.planmigrations.get_migration(plan_version_migration_id:) -> Schematic::Planmigrations::Types::GetMigrationResponse
@@ -20660,7 +20816,7 @@ client.planmigrations.get_migration(plan_version_migration_id: "plan_version_mig
-
client.planmigrations.retry_migration(plan_version_migration_id, request) -> Schematic::Planmigrations::Types::RetryMigrationResponse +
client.planmigrations.retry_migration(plan_version_migration_id:, request) -> Schematic::Planmigrations::Types::RetryMigrationResponse
@@ -21076,7 +21232,7 @@ client.scheduledcheckout.create_scheduled_checkout(
-
client.scheduledcheckout.get_scheduled_checkout(scheduled_checkout_id) -> Schematic::Scheduledcheckout::Types::GetScheduledCheckoutResponse +
client.scheduledcheckout.get_scheduled_checkout(scheduled_checkout_id:) -> Schematic::Scheduledcheckout::Types::GetScheduledCheckoutResponse
@@ -21124,7 +21280,7 @@ client.scheduledcheckout.get_scheduled_checkout(scheduled_checkout_id: "schedule
-
client.scheduledcheckout.update_scheduled_checkout(scheduled_checkout_id, request) -> Schematic::Scheduledcheckout::Types::UpdateScheduledCheckoutResponse +
client.scheduledcheckout.update_scheduled_checkout(scheduled_checkout_id:, request) -> Schematic::Scheduledcheckout::Types::UpdateScheduledCheckoutResponse
@@ -21337,7 +21493,7 @@ client.webhooks.list_webhook_events(
-
client.webhooks.get_webhook_event(webhook_event_id) -> Schematic::Webhooks::Types::GetWebhookEventResponse +
client.webhooks.get_webhook_event(webhook_event_id:) -> Schematic::Webhooks::Types::GetWebhookEventResponse
@@ -21623,7 +21779,7 @@ client.webhooks.create_webhook(
-
client.webhooks.get_webhook(webhook_id) -> Schematic::Webhooks::Types::GetWebhookResponse +
client.webhooks.get_webhook(webhook_id:) -> Schematic::Webhooks::Types::GetWebhookResponse
@@ -21671,7 +21827,7 @@ client.webhooks.get_webhook(webhook_id: "webhook_id")
-
client.webhooks.update_webhook(webhook_id, request) -> Schematic::Webhooks::Types::UpdateWebhookResponse +
client.webhooks.update_webhook(webhook_id:, request) -> Schematic::Webhooks::Types::UpdateWebhookResponse
@@ -21767,7 +21923,7 @@ client.webhooks.update_webhook(webhook_id: "webhook_id")
-
client.webhooks.delete_webhook(webhook_id) -> Schematic::Webhooks::Types::DeleteWebhookResponse +
client.webhooks.delete_webhook(webhook_id:) -> Schematic::Webhooks::Types::DeleteWebhookResponse
@@ -21815,7 +21971,7 @@ client.webhooks.delete_webhook(webhook_id: "webhook_id")
-
client.webhooks.send_test_webhook_action(webhook_id, request) -> Schematic::Webhooks::Types::SendTestWebhookActionResponse +
client.webhooks.send_test_webhook_action(webhook_id:, request) -> Schematic::Webhooks::Types::SendTestWebhookActionResponse
diff --git a/schematic.gemspec b/schematic.gemspec index e96fd84..839c6b7 100644 --- a/schematic.gemspec +++ b/schematic.gemspec @@ -16,17 +16,29 @@ Gem::Specification.new do |spec| # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. + # When the gem is built outside a git checkout (e.g. generated output), fall back to + # globbing the filesystem. gemspec = File.basename(__FILE__) - spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls| - ls.readlines("\x0", chomp: true).reject do |f| - (f == gemspec) || - f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile]) + tracked_files = begin + IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls| + ls.readlines("\x0", chomp: true) end + rescue SystemCallError + [] + end || [] + if tracked_files.empty? + tracked_files = Dir.chdir(__dir__) do + Dir.glob("{lib,exe,sig}/**/*", File::FNM_DOTMATCH).select { |f| File.file?(f) } + + Dir.glob("*").select { |f| File.file?(f) } + end + end + spec.files = tracked_files.reject do |f| + (f == gemspec) || + f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile]) end spec.bindir = "exe" spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency "wasmtime", ">= 19.0" spec.add_dependency "websocket", ">= 1.2" # For more information and examples about making a new gem, check out our diff --git a/test/custom.test.rb b/test/custom.test.rb index d5de91e..41bfadb 100644 --- a/test/custom.test.rb +++ b/test/custom.test.rb @@ -549,13 +549,13 @@ def stop = @inner.stop ) buffer.push({ - event_type: "track", - body: { event: "page_view" }, - sent_at: "2024-01-01T00:00:00Z", - idempotency_key: "evt_xyz", - trusted_client_clock: true, - backfill: false - }) + event_type: "track", + body: { event: "page_view" }, + sent_at: "2024-01-01T00:00:00Z", + idempotency_key: "evt_xyz", + trusted_client_clock: true, + backfill: false + }) buffer.flush event = request_body[:events][0] @@ -1650,11 +1650,11 @@ def build_client(api_key: "test_api_key") ) client.track({ - event: "query-tokens", - company: { "org_id" => "abc" }, - user: { "email" => "test@test.com" }, - quantity: 1500 - }) + event: "query-tokens", + company: { "org_id" => "abc" }, + user: { "email" => "test@test.com" }, + quantity: 1500 + }) buffer = client.instance_variable_get(:@event_buffer) buffer.flush @@ -2744,10 +2744,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ company_data = { id: "comp_1", keys: { "org_id" => "abc" }, traits: { "plan" => "pro" }, name: "Acme" } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company_data - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company_data + }) cached = ds.instance_variable_get(:@company_cache).get_by_id("comp_1") @@ -2763,10 +2763,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ user_data = { id: "user_1", keys: { "email" => "test@test.com" }, traits: { "role" => "admin" } } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_USER, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: user_data - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_USER, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: user_data + }) cached = ds.instance_variable_get(:@user_cache).get_by_id("user_1") @@ -2782,10 +2782,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ flag_data = { key: "my-flag", type: "boolean", default_value: true, rules: [] } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_FLAG, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: flag_data - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_FLAG, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: flag_data + }) # Flags are stored with versioned keys: "flags:{version}:{key}" versioned_key = ds.send(:flag_cache_key, "my-flag") @@ -2810,10 +2810,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ { key: "flag-b", type: "boolean", default_value: false, rules: [] } ] ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_FLAGS, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: flags - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_FLAGS, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: flags + }) refute_nil ctx[:flag_cache].get(ds.send(:flag_cache_key, "flag-a")) refute_nil ctx[:flag_cache].get(ds.send(:flag_cache_key, "flag-b")) @@ -2831,19 +2831,19 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ # Seed a company existing = { id: "comp_1", keys: { "org_id" => "abc" }, traits: { "plan" => "pro" } } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: existing - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: existing + }) # Send a partial update. The cache lookup uses entity_id from the envelope; # data is the wrapped partial payload with no top-level id. ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - entity_id: "comp_1", - message_type: Schematic::DataStream::MESSAGE_TYPE_PARTIAL, - data: { traits: { "seats" => "25" } } - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + entity_id: "comp_1", + message_type: Schematic::DataStream::MESSAGE_TYPE_PARTIAL, + data: { traits: { "seats" => "25" } } + }) cached = ds.instance_variable_get(:@company_cache).get_by_id("comp_1") @@ -2862,19 +2862,19 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ existing = { id: "user_1", keys: { "email" => "old@test.com" }, traits: { "role" => "viewer" } } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_USER, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: existing - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_USER, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: existing + }) # Send a partial update. Cache lookup uses entity_id from the envelope; # data is the wrapped partial payload with no top-level id. ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_USER, - entity_id: "user_1", - message_type: Schematic::DataStream::MESSAGE_TYPE_PARTIAL, - data: { keys: { "user_id" => "u123" } } - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_USER, + entity_id: "user_1", + message_type: Schematic::DataStream::MESSAGE_TYPE_PARTIAL, + data: { keys: { "user_id" => "u123" } } + }) cached = ds.instance_variable_get(:@user_cache).get_by_id("user_1") keys = cached[:keys] @@ -2891,11 +2891,11 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ # No FULL message for new_comp; partial should be dropped on cache miss. ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - entity_id: "new_comp", - message_type: Schematic::DataStream::MESSAGE_TYPE_PARTIAL, - data: { traits: { "tier" => "free" } } - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + entity_id: "new_comp", + message_type: Schematic::DataStream::MESSAGE_TYPE_PARTIAL, + data: { traits: { "tier" => "free" } } + }) cached = ds.instance_variable_get(:@company_cache).get_by_id("new_comp") @@ -2909,11 +2909,11 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ ds = ctx[:client] ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_USER, - entity_id: "new_user", - message_type: Schematic::DataStream::MESSAGE_TYPE_PARTIAL, - data: { keys: { "email" => "new@test.com" } } - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_USER, + entity_id: "new_user", + message_type: Schematic::DataStream::MESSAGE_TYPE_PARTIAL, + data: { keys: { "email" => "new@test.com" } } + }) cached = ds.instance_variable_get(:@user_cache).get_by_id("new_user") @@ -2930,18 +2930,18 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ company = { id: "comp_del", keys: { "org_id" => "del-me" } } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company + }) refute_nil ds.instance_variable_get(:@company_cache).get_by_id("comp_del") ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_DELETE, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_DELETE, + data: company + }) assert_nil ds.instance_variable_get(:@company_cache).get_by_id("comp_del") @@ -2954,18 +2954,18 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ user = { id: "user_del", keys: { "email" => "del@test.com" } } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_USER, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: user - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_USER, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: user + }) refute_nil ds.instance_variable_get(:@user_cache).get_by_id("user_del") ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_USER, - message_type: Schematic::DataStream::MESSAGE_TYPE_DELETE, - data: user - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_USER, + message_type: Schematic::DataStream::MESSAGE_TYPE_DELETE, + data: user + }) assert_nil ds.instance_variable_get(:@user_cache).get_by_id("user_del") @@ -2978,20 +2978,20 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ flag = { key: "del-flag", type: "boolean", default_value: false, rules: [] } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_FLAG, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: flag - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_FLAG, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: flag + }) versioned_key = ds.send(:flag_cache_key, "del-flag") refute_nil ctx[:flag_cache].get(versioned_key) ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_FLAG, - message_type: Schematic::DataStream::MESSAGE_TYPE_DELETE, - data: flag - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_FLAG, + message_type: Schematic::DataStream::MESSAGE_TYPE_DELETE, + data: flag + }) assert_nil ctx[:flag_cache].get(versioned_key) @@ -3006,10 +3006,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ company = { id: "comp_immut", keys: { "org_id" => "abc" }, traits: { "plan" => "pro" } } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company + }) # Retrieve and mutate retrieved = ds.instance_variable_get(:@company_cache).get_by_id("comp_immut") @@ -3040,10 +3040,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ ] } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company + }) # Get a reference to the cached data before update before = ds.instance_variable_get(:@company_cache).get_by_keys({ "org_id" => "metrics-co" }) @@ -3069,9 +3069,9 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ # Should not raise ds.send(:handle_message, { - error: "something went wrong", - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY - }) + error: "something went wrong", + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY + }) ds.close end @@ -3082,10 +3082,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ # Should not raise ds.send(:handle_message, { - entity_type: "unknown.Type", - message_type: "full", - data: { id: "x" } - }) + entity_type: "unknown.Type", + message_type: "full", + data: { id: "x" } + }) ds.close end @@ -3109,10 +3109,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ company = { id: "comp_lookup", keys: { "org_id" => "lookup-org", "slug" => "acme" }, name: "Lookup Co" } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company + }) # Look up by either key by_org = ds.instance_variable_get(:@company_cache).get_by_keys({ "org_id" => "lookup-org" }) @@ -3134,10 +3134,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ user = { id: "user_lookup", keys: { "email" => "lookup@test.com", "user_id" => "uid_1" } } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_USER, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: user - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_USER, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: user + }) by_email = ds.instance_variable_get(:@user_cache).get_by_keys({ "email" => "lookup@test.com" }) @@ -3153,18 +3153,18 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ company = { id: "comp_keydel", keys: { "org_id" => "keydel-org" } } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company + }) refute_nil ds.instance_variable_get(:@company_cache).get_by_keys({ "org_id" => "keydel-org" }) ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_DELETE, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_DELETE, + data: company + }) assert_nil ds.instance_variable_get(:@company_cache).get_by_keys({ "org_id" => "keydel-org" }) @@ -3180,10 +3180,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ ds = ctx[:client] ds.send(:handle_message, { - "entity_type" => Schematic::DataStream::ENTITY_TYPE_COMPANY, - "message_type" => Schematic::DataStream::MESSAGE_TYPE_FULL, - "data" => { "id" => "str_comp", "keys" => { "org_id" => "str-org" }, "name" => "Str Co" } - }) + "entity_type" => Schematic::DataStream::ENTITY_TYPE_COMPANY, + "message_type" => Schematic::DataStream::MESSAGE_TYPE_FULL, + "data" => { "id" => "str_comp", "keys" => { "org_id" => "str-org" }, "name" => "Str Co" } + }) cached = ds.instance_variable_get(:@company_cache).get_by_id("str_comp") @@ -3197,10 +3197,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ ds = ctx[:client] ds.send(:handle_message, { - "entity_type" => Schematic::DataStream::ENTITY_TYPE_FLAG, - "message_type" => Schematic::DataStream::MESSAGE_TYPE_FULL, - "data" => { "key" => "str-flag", "type" => "boolean", "default_value" => true, "rules" => [] } - }) + "entity_type" => Schematic::DataStream::ENTITY_TYPE_FLAG, + "message_type" => Schematic::DataStream::MESSAGE_TYPE_FULL, + "data" => { "key" => "str-flag", "type" => "boolean", "default_value" => true, "rules" => [] } + }) versioned_key = ds.send(:flag_cache_key, "str-flag") cached = ctx[:flag_cache].get(versioned_key) @@ -3225,10 +3225,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ ] } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company + }) ds.update_company_metrics({ "org_id" => "met-org" }, "api_call", 10) @@ -3267,10 +3267,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ ] } ds.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company + }) ds.update_company_metrics({ "org_id" => "nomatch-org" }, "unknown_event", 10) @@ -3382,10 +3382,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ # Cache a company via handle_message company = { id: "comp_redis", keys: { "org_id" => "redis-org" }, name: "Redis Co" } ds_client.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company + }) # Verify data landed in the mock Redis store (not just local memory) redis_keys = @store.keys.select { |k| k.start_with?("schematic:") } @@ -3411,10 +3411,10 @@ def build_ds_client(flag_cache: nil, company_cache: nil, user_cache: nil, rules_ company = { id: "comp_prefix", keys: { "org_id" => "pfx-org" }, name: "Prefix Co" } ds_client.send(:handle_message, { - entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, - message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, - data: company - }) + entity_type: Schematic::DataStream::ENTITY_TYPE_COMPANY, + message_type: Schematic::DataStream::MESSAGE_TYPE_FULL, + data: company + }) redis_keys = @store.keys.select { |k| k.start_with?("myapp:") } diff --git a/test/unit/internal/http/test_raw_client.rb b/test/unit/internal/http/test_raw_client.rb new file mode 100644 index 0000000..ec0ef82 --- /dev/null +++ b/test/unit/internal/http/test_raw_client.rb @@ -0,0 +1,195 @@ +# frozen_string_literal: true + +require "test_helper" +require "socket" +require "zlib" + +describe Schematic::Internal::Http::RawClient do + def make_response(status_code) + response = Minitest::Mock.new + response.expect(:code, status_code.to_s) + response + end + + describe "#should_retry?" do + let(:client) do + Schematic::Internal::Http::RawClient.new(base_url: "https://example.com", max_retries: 3) + end + + it "retries on 408 Request Timeout" do + assert client.should_retry?(make_response(408), 0) + end + + it "retries on 429 Too Many Requests" do + assert client.should_retry?(make_response(429), 0) + end + + it "retries on retryable 5xx statuses" do + [500, 502, 503, 504, 521, 522, 524].each do |status| + assert client.should_retry?(make_response(status), 0), "expected retry for status #{status}" + end + end + + it "does not retry on non-retryable 5xx statuses" do + [501, 505, 510, 599].each do |status| + refute client.should_retry?(make_response(status), 0), "expected no retry for status #{status}" + end + end + + it "does not retry on 2xx success codes" do + [200, 201, 204].each do |status| + refute client.should_retry?(make_response(status), 0), "expected no retry for status #{status}" + end + end + + it "does not retry on 4xx other than 408 and 429" do + [400, 401, 403, 404, 422].each do |status| + refute client.should_retry?(make_response(status), 0), "expected no retry for status #{status}" + end + end + + it "does not retry when max retries is reached" do + refute client.should_retry?(make_response(502), 3) + end + + it "retries when attempt is below max retries" do + assert client.should_retry?(make_response(502), 2) + end + end + + describe "gzip response decompression" do + it "decompresses a gzip response when Accept-Encoding is set explicitly" do + body = '{"message": "gzipped response"}' + compressed = Zlib.gzip(body) + + server = TCPServer.new("127.0.0.1", 0) + port = server.addr[1] + server_thread = Thread.new do + socket = server.accept + request_lines = [] + while (line = socket.gets) && line != "\r\n" + request_lines << line + end + socket.write("HTTP/1.1 200 OK\r\n") + socket.write("Content-Type: application/json\r\n") + socket.write("Content-Encoding: gzip\r\n") + socket.write("Content-Length: #{compressed.bytesize}\r\n") + socket.write("\r\n") + socket.write(compressed) + socket.close + request_lines + end + + client = Schematic::Internal::Http::RawClient.new( + base_url: "http://127.0.0.1:#{port}", + max_retries: 0 + ) + request = Schematic::Internal::JSON::Request.new( + base_url: "http://127.0.0.1:#{port}", + path: "/gzip", + method: "GET", + headers: { "Accept-Encoding" => "gzip" } + ) + + response = client.send(request) + request_lines = server_thread.value + server.close + + assert(request_lines.any? { |line| line.casecmp("accept-encoding: gzip\r\n").zero? }) + assert_equal "200", response.code + assert_equal body, response.body + end + end + + # A minimal auth provider whose `auth_headers` returns a *different* token on + # each call, simulating a token that is refreshed on expiry. + class RefreshingAuthProvider + def initialize + @count = 0 + end + + def auth_headers + @count += 1 + { "Authorization" => "Bearer TOKEN_#{@count}" } + end + end + + describe "#resolve_auth_headers" do + it "returns an empty hash when no auth provider is configured" do + client = Schematic::Internal::Http::RawClient.new(base_url: "https://example.com") + + assert_equal({}, client.resolve_auth_headers) + end + + it "consults the auth provider on every call so an expired token is refreshed" do + client = Schematic::Internal::Http::RawClient.new( + base_url: "https://example.com", + auth_provider: RefreshingAuthProvider.new + ) + + assert_equal({ "Authorization" => "Bearer TOKEN_1" }, client.resolve_auth_headers) + assert_equal({ "Authorization" => "Bearer TOKEN_2" }, client.resolve_auth_headers) + end + end + + describe "#build_http_request auth header precedence" do + let(:client) do + Schematic::Internal::Http::RawClient.new( + base_url: "https://example.com", + headers: { "Authorization" => "Bearer STATIC" } + ) + end + + it "lets resolved auth headers override the static default headers" do + request = client.build_http_request( + url: URI.parse("https://example.com"), + method: "GET", + auth_headers: { "Authorization" => "Bearer FRESH" } + ) + + assert_equal("Bearer FRESH", request["Authorization"]) + end + + it "lets per-request headers take precedence over auth headers" do + request = client.build_http_request( + url: URI.parse("https://example.com"), + method: "GET", + headers: { "Authorization" => "Bearer PER_REQUEST" }, + auth_headers: { "Authorization" => "Bearer FRESH" } + ) + + assert_equal("Bearer PER_REQUEST", request["Authorization"]) + end + + it "defaults auth headers to empty, leaving the default headers unchanged" do + request = client.build_http_request(url: URI.parse("https://example.com"), method: "GET") + + assert_equal("Bearer STATIC", request["Authorization"]) + end + end + + describe "#protected_header_keys" do + def client_with(overridable_headers) + Schematic::Internal::Http::RawClient.new( + base_url: "https://example.com", + headers: { "X-Api-Version" => "1", "User-Agent" => "sdk/0.0.1" }, + overridable_headers: overridable_headers + ) + end + + it "protects every default header when no header is overridable" do + assert_includes client_with([]).protected_header_keys, "X-Api-Version" + end + + it "leaves an overridable header unprotected so a request can replace it" do + protected_keys = client_with(["X-Api-Version"]).protected_header_keys + + refute_includes protected_keys, "X-Api-Version" + assert_includes protected_keys, "User-Agent" + end + + it "matches overridable header names case-insensitively" do + refute_includes client_with(["x-api-version"]).protected_header_keys, "X-Api-Version" + end + end +end diff --git a/test/unit/internal/iterators/test_cursor_item_iterator.rb b/test/unit/internal/iterators/test_cursor_item_iterator.rb index ff3c53a..f46dd28 100644 --- a/test/unit/internal/iterators/test_cursor_item_iterator.rb +++ b/test/unit/internal/iterators/test_cursor_item_iterator.rb @@ -6,7 +6,7 @@ require "test_helper" NUMBERS = (1..65).to_a -PageResponse = Struct.new(:cards, :next_cursor) +PageResponse = Struct.new(:cards, :next_cursor, keyword_init: true) class CursorItemIteratorTest < Minitest::Test def make_iterator(initial_cursor:) @@ -90,6 +90,7 @@ def test_items_iterator_can_be_advanced_manually assert_equal expected_times_called, @times_called assert_equal item != NUMBERS.last, iterator.next?, "#{item} #{iterator}" + items.push(item) end @@ -139,6 +140,7 @@ def test_pages_iterator_iterates_lazily iterator = make_iterator(initial_cursor: 0).pages assert_equal 0, @times_called + iterator.first assert_equal 1, @times_called @@ -170,6 +172,7 @@ def test_pages_iterator_can_be_advanced_manually expected_times_called += 1 assert_equal expected_times_called, @times_called + lengths.push(page.cards.length) end diff --git a/test/unit/internal/iterators/test_offset_item_iterator.rb b/test/unit/internal/iterators/test_offset_item_iterator.rb index 3b7d2f6..eeece7b 100644 --- a/test/unit/internal/iterators/test_offset_item_iterator.rb +++ b/test/unit/internal/iterators/test_offset_item_iterator.rb @@ -5,7 +5,7 @@ require "json" require "test_helper" -OffsetPageResponse = Struct.new(:items, :has_next) +OffsetPageResponse = Struct.new(:items, :has_next, keyword_init: true) TestIteratorConfig = Struct.new( :step, :has_next_field, @@ -70,30 +70,27 @@ def make_iterator(config) end end - def test_item_iterator_can_iterate_to_exhaustion - ALL_TEST_ITERATOR_CONFIGS.each do |config| + ALL_TEST_ITERATOR_CONFIGS.each do |config| + define_method("test_item_iterator_can_iterate_to_exhaustion_#{config.to_a.join("_")}") do iterator = make_iterator(config) assert_equal (config.first_item_returned..config.total_item_count).to_a, iterator.to_a end - end - def test_items_iterator_can_be_advanced_manually_and_has_accurate_has_next - ALL_TEST_ITERATOR_CONFIGS.each do |config| + define_method("test_items_iterator_can_be_advanced_manually_and_has_accurate_has_next_#{config.to_a.join("_")}") do iterator = make_iterator(config) items = [] while (item = iterator.next_element) assert_equal(item != config.total_item_count, iterator.next?, "#{item} #{iterator}") + items.push(item) end assert_equal (config.first_item_returned..config.total_item_count).to_a, items end - end - def test_pages_iterator_can_be_advanced_manually_and_has_accurate_has_next - ALL_TEST_ITERATOR_CONFIGS.each do |config| + define_method("test_pages_iterator_can_be_advanced_manually_and_has_accurate_has_next_#{config.to_a.join("_")}") do iterator = make_iterator(config).pages pages = [] @@ -102,6 +99,7 @@ def test_pages_iterator_can_be_advanced_manually_and_has_accurate_has_next page = iterator.next_page assert_equal(has_next_output, !page.nil?, "next? was inaccurate: #{config} #{iterator.inspect}") + break if page.nil? pages.push(page) @@ -138,6 +136,7 @@ def test_pages_iterator_iterates_lazily iterator = make_iterator(LAZY_TEST_ITERATOR_CONFIG).pages assert_equal 0, @times_called + iterator.first assert_equal 1, @times_called