Class: Vellum::AsyncTestSuiteRunsClient
- Inherits:
-
Object
- Object
- Vellum::AsyncTestSuiteRunsClient
- Defined in:
- lib/vellum_ai/test_suite_runs/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#create(test_suite_id: nil, test_suite_name: nil, exec_config:, request_options: nil) ⇒ Object
api.test_suite_runs.create(exec_config: { type: “DEPLOYMENT_RELEASE_TAG”, data: { deployment_id: “deployment_id” } }).
- #initialize(request_client:) ⇒ Vellum::AsyncTestSuiteRunsClient constructor
-
#list_executions(id:, expand: nil, limit: nil, offset: nil, request_options: nil) ⇒ Object
api.test_suite_runs.list_executions(id: “id”).
-
#retrieve(id:, request_options: nil) ⇒ Object
api.test_suite_runs.retrieve(id: “id”).
Constructor Details
#initialize(request_client:) ⇒ Vellum::AsyncTestSuiteRunsClient
143 144 145 |
# File 'lib/vellum_ai/test_suite_runs/client.rb', line 143 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ Vellum::AsyncRequestClient (readonly)
138 139 140 |
# File 'lib/vellum_ai/test_suite_runs/client.rb', line 138 def request_client @request_client end |
Instance Method Details
#create(test_suite_id: nil, test_suite_name: nil, exec_config:, request_options: nil) ⇒ Object
api.test_suite_runs.create(exec_config: { type: “DEPLOYMENT_RELEASE_TAG”, data: { deployment_id: “deployment_id” } })
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/vellum_ai/test_suite_runs/client.rb', line 160 def create(test_suite_id: nil, test_suite_name: nil, exec_config:, request_options: nil) Async do response = @request_client.conn.post do | req | unless &.timeout_in_seconds.nil? req..timeout = .timeout_in_seconds end unless &.api_key.nil? req.headers["X-API-KEY"] = .api_key end unless &.api_version.nil? req.headers["X-API-Version"] = .api_version else req.headers["X-API-Version"] = "2025-07-30" end req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact unless .nil? || &.additional_query_parameters.nil? req.params = { **(&.additional_query_parameters || {}) }.compact end req.body = { **(&.additional_body_parameters || {}), test_suite_id: test_suite_id, test_suite_name: test_suite_name, exec_config: exec_config }.compact req.url "#{@request_client.get_url(environment: Default, request_options: )}/v1/test-suite-runs" end Vellum::TestSuiteRunRead.from_json(json_object: response.body) end end |
#list_executions(id:, expand: nil, limit: nil, offset: nil, request_options: nil) ⇒ Object
api.test_suite_runs.list_executions(id: “id”)
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/vellum_ai/test_suite_runs/client.rb', line 241 def list_executions(id:, expand: nil, limit: nil, offset: nil, request_options: nil) Async do response = @request_client.conn.get do | req | unless &.timeout_in_seconds.nil? req..timeout = .timeout_in_seconds end unless &.api_key.nil? req.headers["X-API-KEY"] = .api_key end unless &.api_version.nil? req.headers["X-API-Version"] = .api_version else req.headers["X-API-Version"] = "2025-07-30" end req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "expand": , "limit": limit, "offset": offset }.compact unless .nil? || &.additional_body_parameters.nil? req.body = { **(&.additional_body_parameters || {}) }.compact end req.url "#{@request_client.get_url(environment: Default, request_options: )}/v1/test-suite-runs/#{id}/executions" end Vellum::PaginatedTestSuiteRunExecutionList.from_json(json_object: response.body) end end |
#retrieve(id:, request_options: nil) ⇒ Object
api.test_suite_runs.retrieve(id: “id”)
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/vellum_ai/test_suite_runs/client.rb', line 196 def retrieve(id:, request_options: nil) Async do response = @request_client.conn.get do | req | unless &.timeout_in_seconds.nil? req..timeout = .timeout_in_seconds end unless &.api_key.nil? req.headers["X-API-KEY"] = .api_key end unless &.api_version.nil? req.headers["X-API-Version"] = .api_version else req.headers["X-API-Version"] = "2025-07-30" end req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact unless .nil? || &.additional_query_parameters.nil? req.params = { **(&.additional_query_parameters || {}) }.compact end unless .nil? || &.additional_body_parameters.nil? req.body = { **(&.additional_body_parameters || {}) }.compact end req.url "#{@request_client.get_url(environment: Default, request_options: )}/v1/test-suite-runs/#{id}" end Vellum::TestSuiteRunRead.from_json(json_object: response.body) end end |