Class: Fastly::VersionApi
- Inherits:
-
Object
- Object
- Fastly::VersionApi
- Defined in:
- lib/fastly/api/version_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#activate_service_version(opts = {}) ⇒ VersionResponse
Activate a service version Activate the current version.
-
#activate_service_version_with_http_info(opts = {}) ⇒ Array<(VersionResponse, Integer, Hash)>
Activate a service version Activate the current version.
-
#clone_service_version(opts = {}) ⇒ Version
Clone a service version Clone the current configuration into a new version.
-
#clone_service_version_with_http_info(opts = {}) ⇒ Array<(Version, Integer, Hash)>
Clone a service version Clone the current configuration into a new version.
-
#create_service_version(opts = {}) ⇒ VersionCreateResponse
Create a service version Create a version for a particular service.
-
#create_service_version_with_http_info(opts = {}) ⇒ Array<(VersionCreateResponse, Integer, Hash)>
Create a service version Create a version for a particular service.
-
#deactivate_service_version(opts = {}) ⇒ VersionResponse
Deactivate a service version Deactivate the current version.
-
#deactivate_service_version_with_http_info(opts = {}) ⇒ Array<(VersionResponse, Integer, Hash)>
Deactivate a service version Deactivate the current version.
-
#get_service_version(opts = {}) ⇒ VersionResponse
Get a version of a service Get the version for a particular service.
-
#get_service_version_with_http_info(opts = {}) ⇒ Array<(VersionResponse, Integer, Hash)>
Get a version of a service Get the version for a particular service.
-
#initialize(api_client = ApiClient.default) ⇒ VersionApi
constructor
A new instance of VersionApi.
-
#list_service_versions(opts = {}) ⇒ Array<VersionResponse>
List versions of a service List the versions for a particular service.
-
#list_service_versions_with_http_info(opts = {}) ⇒ Array<(Array<VersionResponse>, Integer, Hash)>
List versions of a service List the versions for a particular service.
-
#lock_service_version(opts = {}) ⇒ Version
Lock a service version Locks the specified version.
-
#lock_service_version_with_http_info(opts = {}) ⇒ Array<(Version, Integer, Hash)>
Lock a service version Locks the specified version.
-
#update_service_version(opts = {}) ⇒ VersionResponse
Update a service version Update a particular version for a particular service.
-
#update_service_version_with_http_info(opts = {}) ⇒ Array<(VersionResponse, Integer, Hash)>
Update a service version Update a particular version for a particular service.
-
#validate_service_version(opts = {}) ⇒ InlineResponse200
Validate a service version Validate the version for a particular service and version.
-
#validate_service_version_with_http_info(opts = {}) ⇒ Array<(InlineResponse200, Integer, Hash)>
Validate a service version Validate the version for a particular service and version.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ VersionApi
Returns a new instance of VersionApi.
17 18 19 |
# File 'lib/fastly/api/version_api.rb', line 17 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
15 16 17 |
# File 'lib/fastly/api/version_api.rb', line 15 def api_client @api_client end |
Instance Method Details
#activate_service_version(opts = {}) ⇒ VersionResponse
Activate a service version Activate the current version.
25 26 27 28 |
# File 'lib/fastly/api/version_api.rb', line 25 def activate_service_version(opts = {}) data, _status_code, _headers = activate_service_version_with_http_info(opts) data end |
#activate_service_version_with_http_info(opts = {}) ⇒ Array<(VersionResponse, Integer, Hash)>
Activate a service version Activate the current version.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/fastly/api/version_api.rb', line 35 def activate_service_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VersionApi.activate_service_version ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.activate_service_version" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling VersionApi.activate_service_version" end # resource path local_var_path = '/service/{service_id}/version/{version_id}/activate'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VersionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"VersionApi.activate_service_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VersionApi#activate_service_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#clone_service_version(opts = {}) ⇒ Version
Clone a service version Clone the current configuration into a new version.
95 96 97 98 |
# File 'lib/fastly/api/version_api.rb', line 95 def clone_service_version(opts = {}) data, _status_code, _headers = clone_service_version_with_http_info(opts) data end |
#clone_service_version_with_http_info(opts = {}) ⇒ Array<(Version, Integer, Hash)>
Clone a service version Clone the current configuration into a new version.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/fastly/api/version_api.rb', line 105 def clone_service_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VersionApi.clone_service_version ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.clone_service_version" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling VersionApi.clone_service_version" end # resource path local_var_path = '/service/{service_id}/version/{version_id}/clone'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Version' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"VersionApi.clone_service_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VersionApi#clone_service_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_service_version(opts = {}) ⇒ VersionCreateResponse
Create a service version Create a version for a particular service.
164 165 166 167 |
# File 'lib/fastly/api/version_api.rb', line 164 def create_service_version(opts = {}) data, _status_code, _headers = create_service_version_with_http_info(opts) data end |
#create_service_version_with_http_info(opts = {}) ⇒ Array<(VersionCreateResponse, Integer, Hash)>
Create a service version Create a version for a particular service.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 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/fastly/api/version_api.rb', line 173 def create_service_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VersionApi.create_service_version ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.create_service_version" end # resource path local_var_path = '/service/{service_id}/version'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VersionCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"VersionApi.create_service_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VersionApi#create_service_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#deactivate_service_version(opts = {}) ⇒ VersionResponse
Deactivate a service version Deactivate the current version.
228 229 230 231 |
# File 'lib/fastly/api/version_api.rb', line 228 def deactivate_service_version(opts = {}) data, _status_code, _headers = deactivate_service_version_with_http_info(opts) data end |
#deactivate_service_version_with_http_info(opts = {}) ⇒ Array<(VersionResponse, Integer, Hash)>
Deactivate a service version Deactivate the current version.
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/fastly/api/version_api.rb', line 238 def deactivate_service_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VersionApi.deactivate_service_version ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.deactivate_service_version" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling VersionApi.deactivate_service_version" end # resource path local_var_path = '/service/{service_id}/version/{version_id}/deactivate'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VersionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"VersionApi.deactivate_service_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VersionApi#deactivate_service_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_service_version(opts = {}) ⇒ VersionResponse
Get a version of a service Get the version for a particular service.
298 299 300 301 |
# File 'lib/fastly/api/version_api.rb', line 298 def get_service_version(opts = {}) data, _status_code, _headers = get_service_version_with_http_info(opts) data end |
#get_service_version_with_http_info(opts = {}) ⇒ Array<(VersionResponse, Integer, Hash)>
Get a version of a service Get the version for a particular service.
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/fastly/api/version_api.rb', line 308 def get_service_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VersionApi.get_service_version ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.get_service_version" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling VersionApi.get_service_version" end # resource path local_var_path = '/service/{service_id}/version/{version_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VersionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"VersionApi.get_service_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VersionApi#get_service_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_service_versions(opts = {}) ⇒ Array<VersionResponse>
List versions of a service List the versions for a particular service.
367 368 369 370 |
# File 'lib/fastly/api/version_api.rb', line 367 def list_service_versions(opts = {}) data, _status_code, _headers = list_service_versions_with_http_info(opts) data end |
#list_service_versions_with_http_info(opts = {}) ⇒ Array<(Array<VersionResponse>, Integer, Hash)>
List versions of a service List the versions for a particular service.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/fastly/api/version_api.rb', line 376 def list_service_versions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VersionApi.list_service_versions ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.list_service_versions" end # resource path local_var_path = '/service/{service_id}/version'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<VersionResponse>' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"VersionApi.list_service_versions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VersionApi#list_service_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#lock_service_version(opts = {}) ⇒ Version
Lock a service version Locks the specified version.
431 432 433 434 |
# File 'lib/fastly/api/version_api.rb', line 431 def lock_service_version(opts = {}) data, _status_code, _headers = lock_service_version_with_http_info(opts) data end |
#lock_service_version_with_http_info(opts = {}) ⇒ Array<(Version, Integer, Hash)>
Lock a service version Locks the specified version.
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/fastly/api/version_api.rb', line 441 def lock_service_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VersionApi.lock_service_version ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.lock_service_version" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling VersionApi.lock_service_version" end # resource path local_var_path = '/service/{service_id}/version/{version_id}/lock'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Version' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"VersionApi.lock_service_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VersionApi#lock_service_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_service_version(opts = {}) ⇒ VersionResponse
Update a service version Update a particular version for a particular service.
508 509 510 511 |
# File 'lib/fastly/api/version_api.rb', line 508 def update_service_version(opts = {}) data, _status_code, _headers = update_service_version_with_http_info(opts) data end |
#update_service_version_with_http_info(opts = {}) ⇒ Array<(VersionResponse, Integer, Hash)>
Update a service version Update a particular version for a particular service.
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'lib/fastly/api/version_api.rb', line 525 def update_service_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VersionApi.update_service_version ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.update_service_version" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling VersionApi.update_service_version" end # resource path local_var_path = '/service/{service_id}/version/{version_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['active'] = opts[:'active'] if !opts[:'active'].nil? form_params['comment'] = opts[:'comment'] if !opts[:'comment'].nil? form_params['deployed'] = opts[:'deployed'] if !opts[:'deployed'].nil? form_params['locked'] = opts[:'locked'] if !opts[:'locked'].nil? form_params['number'] = opts[:'number'] if !opts[:'number'].nil? form_params['staging'] = opts[:'staging'] if !opts[:'staging'].nil? form_params['testing'] = opts[:'testing'] if !opts[:'testing'].nil? # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VersionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"VersionApi.update_service_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VersionApi#update_service_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#validate_service_version(opts = {}) ⇒ InlineResponse200
Validate a service version Validate the version for a particular service and version.
597 598 599 600 |
# File 'lib/fastly/api/version_api.rb', line 597 def validate_service_version(opts = {}) data, _status_code, _headers = validate_service_version_with_http_info(opts) data end |
#validate_service_version_with_http_info(opts = {}) ⇒ Array<(InlineResponse200, Integer, Hash)>
Validate a service version Validate the version for a particular service and version.
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'lib/fastly/api/version_api.rb', line 607 def validate_service_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VersionApi.validate_service_version ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling VersionApi.validate_service_version" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling VersionApi.validate_service_version" end # resource path local_var_path = '/service/{service_id}/version/{version_id}/validate'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InlineResponse200' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"VersionApi.validate_service_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VersionApi#validate_service_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |