Class: Telnyx::Resources::AI::Assistants::Tests::TestSuites::Runs
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Assistants::Tests::TestSuites::Runs
- Defined in:
- lib/telnyx/resources/ai/assistants/tests/test_suites/runs.rb,
sig/telnyx/resources/ai/assistants/tests/test_suites/runs.rbs
Overview
Configure AI assistant specifications
Instance Method Summary collapse
-
#initialize(client:) ⇒ Runs
constructor
private
A new instance of Runs.
-
#list(suite_name, page_number: nil, page_size: nil, status: nil, test_suite_run_id: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Assistants::Tests::TestRunResponse>
Retrieves paginated history of test runs for a specific test suite with filtering options.
-
#trigger(suite_name, destination_version_id: nil, idempotency_key: nil, request_options: {}) ⇒ Array<Telnyx::Models::AI::Assistants::Tests::TestRunResponse>
Some parameter documentations has been truncated, see Models::AI::Assistants::Tests::TestSuites::RunTriggerParams for more details.
Constructor Details
#initialize(client:) ⇒ Runs
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Runs.
79 80 81 |
# File 'lib/telnyx/resources/ai/assistants/tests/test_suites/runs.rb', line 79 def initialize(client:) @client = client end |
Instance Method Details
#list(suite_name, page_number: nil, page_size: nil, status: nil, test_suite_run_id: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Assistants::Tests::TestRunResponse>
Retrieves paginated history of test runs for a specific test suite with filtering options
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/telnyx/resources/ai/assistants/tests/test_suites/runs.rb', line 31 def list(suite_name, params = {}) parsed, = Telnyx::AI::Assistants::Tests::TestSuites::RunListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["ai/assistants/tests/test-suites/%1$s/runs", suite_name], query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::AI::Assistants::Tests::TestRunResponse, options: ) end |
#trigger(suite_name, destination_version_id: nil, idempotency_key: nil, request_options: {}) ⇒ Array<Telnyx::Models::AI::Assistants::Tests::TestRunResponse>
Some parameter documentations has been truncated, see Models::AI::Assistants::Tests::TestSuites::RunTriggerParams for more details.
Executes all tests within a specific test suite as a batch operation
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/telnyx/resources/ai/assistants/tests/test_suites/runs.rb', line 63 def trigger(suite_name, params = {}) parsed, = Telnyx::AI::Assistants::Tests::TestSuites::RunTriggerParams.dump_request(params) header_params = {idempotency_key: "idempotency-key"} @client.request( method: :post, path: ["ai/assistants/tests/test-suites/%1$s/runs", suite_name], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::Tests::TestRunResponse], options: ) end |