Class: Harbor2Client::WebhookApi
- Inherits:
-
Object
- Object
- Harbor2Client::WebhookApi
- Defined in:
- lib/harbor2_client/api/webhook_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_webhook_policy_of_project(project_name_or_id, policy, opts = {}) ⇒ nil
Create project webhook policy.
-
#create_webhook_policy_of_project_with_http_info(project_name_or_id, policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create project webhook policy.
-
#delete_webhook_policy_of_project(project_name_or_id, webhook_policy_id, opts = {}) ⇒ nil
Delete webhook policy of a project This endpoint is aimed to delete webhookpolicy of a project.
-
#delete_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete webhook policy of a project This endpoint is aimed to delete webhookpolicy of a project.
-
#get_supported_event_types(project_name_or_id, opts = {}) ⇒ SupportedWebhookEventTypes
Get supported event types and notify types.
-
#get_supported_event_types_with_http_info(project_name_or_id, opts = {}) ⇒ Array<(SupportedWebhookEventTypes, Fixnum, Hash)>
Get supported event types and notify types.
-
#get_webhook_policy_of_project(project_name_or_id, webhook_policy_id, opts = {}) ⇒ WebhookPolicy
Get project webhook policy This endpoint returns specified webhook policy of a project.
-
#get_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, opts = {}) ⇒ Array<(WebhookPolicy, Fixnum, Hash)>
Get project webhook policy This endpoint returns specified webhook policy of a project.
-
#initialize(api_client = ApiClient.default) ⇒ WebhookApi
constructor
A new instance of WebhookApi.
-
#last_trigger(project_name_or_id, opts = {}) ⇒ Array<WebhookLastTrigger>
Get project webhook policy last trigger info This endpoint returns last trigger information of project webhook policy.
-
#last_trigger_with_http_info(project_name_or_id, opts = {}) ⇒ Array<(Array<WebhookLastTrigger>, Fixnum, Hash)>
Get project webhook policy last trigger info This endpoint returns last trigger information of project webhook policy.
-
#list_webhook_policies_of_project(project_name_or_id, opts = {}) ⇒ Array<WebhookPolicy>
List project webhook policies.
-
#list_webhook_policies_of_project_with_http_info(project_name_or_id, opts = {}) ⇒ Array<(Array<WebhookPolicy>, Fixnum, Hash)>
List project webhook policies.
-
#update_webhook_policy_of_project(project_name_or_id, webhook_policy_id, policy, opts = {}) ⇒ nil
Update webhook policy of a project.
-
#update_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update webhook policy of a project.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WebhookApi
Returns a new instance of WebhookApi.
19 20 21 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_webhook_policy_of_project(project_name_or_id, policy, opts = {}) ⇒ nil
Create project webhook policy. This endpoint create a webhook policy if the project does not have one.
30 31 32 33 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 30 def create_webhook_policy_of_project(project_name_or_id, policy, opts = {}) create_webhook_policy_of_project_with_http_info(project_name_or_id, policy, opts) nil end |
#create_webhook_policy_of_project_with_http_info(project_name_or_id, policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create project webhook policy. This endpoint create a webhook policy if the project does not have one.
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 89 90 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 43 def create_webhook_policy_of_project_with_http_info(project_name_or_id, policy, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebhookApi.create_webhook_policy_of_project ...' end # verify the required parameter 'project_name_or_id' is set if @api_client.config.client_side_validation && project_name_or_id.nil? fail ArgumentError, "Missing the required parameter 'project_name_or_id' when calling WebhookApi.create_webhook_policy_of_project" end # verify the required parameter 'policy' is set if @api_client.config.client_side_validation && policy.nil? fail ArgumentError, "Missing the required parameter 'policy' when calling WebhookApi.create_webhook_policy_of_project" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling WebhookApi.create_webhook_policy_of_project, the character length must be great than or equal to 1.' end # resource path local_var_path = '/projects/{project_name_or_id}/webhook/policies'.sub('{' + 'project_name_or_id' + '}', project_name_or_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? header_params[:'X-Is-Resource-Name'] = opts[:'x_is_resource_name'] if !opts[:'x_is_resource_name'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(policy) auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhookApi#create_webhook_policy_of_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_webhook_policy_of_project(project_name_or_id, webhook_policy_id, opts = {}) ⇒ nil
Delete webhook policy of a project This endpoint is aimed to delete webhookpolicy of a project.
99 100 101 102 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 99 def delete_webhook_policy_of_project(project_name_or_id, webhook_policy_id, opts = {}) delete_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, opts) nil end |
#delete_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete webhook policy of a project This endpoint is aimed to delete webhookpolicy of a project.
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 159 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 112 def delete_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebhookApi.delete_webhook_policy_of_project ...' end # verify the required parameter 'project_name_or_id' is set if @api_client.config.client_side_validation && project_name_or_id.nil? fail ArgumentError, "Missing the required parameter 'project_name_or_id' when calling WebhookApi.delete_webhook_policy_of_project" end # verify the required parameter 'webhook_policy_id' is set if @api_client.config.client_side_validation && webhook_policy_id.nil? fail ArgumentError, "Missing the required parameter 'webhook_policy_id' when calling WebhookApi.delete_webhook_policy_of_project" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling WebhookApi.delete_webhook_policy_of_project, the character length must be great than or equal to 1.' end # resource path local_var_path = '/projects/{project_name_or_id}/webhook/policies/{webhook_policy_id}'.sub('{' + 'project_name_or_id' + '}', project_name_or_id.to_s).sub('{' + 'webhook_policy_id' + '}', webhook_policy_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? header_params[:'X-Is-Resource-Name'] = opts[:'x_is_resource_name'] if !opts[:'x_is_resource_name'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhookApi#delete_webhook_policy_of_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_supported_event_types(project_name_or_id, opts = {}) ⇒ SupportedWebhookEventTypes
Get supported event types and notify types. Get supportted event types and notify types.
167 168 169 170 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 167 def get_supported_event_types(project_name_or_id, opts = {}) data, _status_code, _headers = get_supported_event_types_with_http_info(project_name_or_id, opts) data end |
#get_supported_event_types_with_http_info(project_name_or_id, opts = {}) ⇒ Array<(SupportedWebhookEventTypes, Fixnum, Hash)>
Get supported event types and notify types. Get supportted event types and notify types.
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 222 223 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 179 def get_supported_event_types_with_http_info(project_name_or_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebhookApi.get_supported_event_types ...' end # verify the required parameter 'project_name_or_id' is set if @api_client.config.client_side_validation && project_name_or_id.nil? fail ArgumentError, "Missing the required parameter 'project_name_or_id' when calling WebhookApi.get_supported_event_types" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling WebhookApi.get_supported_event_types, the character length must be great than or equal to 1.' end # resource path local_var_path = '/projects/{project_name_or_id}/webhook/events'.sub('{' + 'project_name_or_id' + '}', project_name_or_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? header_params[:'X-Is-Resource-Name'] = opts[:'x_is_resource_name'] if !opts[:'x_is_resource_name'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SupportedWebhookEventTypes') if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhookApi#get_supported_event_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_webhook_policy_of_project(project_name_or_id, webhook_policy_id, opts = {}) ⇒ WebhookPolicy
Get project webhook policy This endpoint returns specified webhook policy of a project.
232 233 234 235 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 232 def get_webhook_policy_of_project(project_name_or_id, webhook_policy_id, opts = {}) data, _status_code, _headers = get_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, opts) data end |
#get_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, opts = {}) ⇒ Array<(WebhookPolicy, Fixnum, Hash)>
Get project webhook policy This endpoint returns specified webhook policy of a project.
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 292 293 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 245 def get_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebhookApi.get_webhook_policy_of_project ...' end # verify the required parameter 'project_name_or_id' is set if @api_client.config.client_side_validation && project_name_or_id.nil? fail ArgumentError, "Missing the required parameter 'project_name_or_id' when calling WebhookApi.get_webhook_policy_of_project" end # verify the required parameter 'webhook_policy_id' is set if @api_client.config.client_side_validation && webhook_policy_id.nil? fail ArgumentError, "Missing the required parameter 'webhook_policy_id' when calling WebhookApi.get_webhook_policy_of_project" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling WebhookApi.get_webhook_policy_of_project, the character length must be great than or equal to 1.' end # resource path local_var_path = '/projects/{project_name_or_id}/webhook/policies/{webhook_policy_id}'.sub('{' + 'project_name_or_id' + '}', project_name_or_id.to_s).sub('{' + 'webhook_policy_id' + '}', webhook_policy_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? header_params[:'X-Is-Resource-Name'] = opts[:'x_is_resource_name'] if !opts[:'x_is_resource_name'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'WebhookPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhookApi#get_webhook_policy_of_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#last_trigger(project_name_or_id, opts = {}) ⇒ Array<WebhookLastTrigger>
Get project webhook policy last trigger info This endpoint returns last trigger information of project webhook policy.
301 302 303 304 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 301 def last_trigger(project_name_or_id, opts = {}) data, _status_code, _headers = last_trigger_with_http_info(project_name_or_id, opts) data end |
#last_trigger_with_http_info(project_name_or_id, opts = {}) ⇒ Array<(Array<WebhookLastTrigger>, Fixnum, Hash)>
Get project webhook policy last trigger info This endpoint returns last trigger information of project webhook policy.
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 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 313 def last_trigger_with_http_info(project_name_or_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebhookApi.last_trigger ...' end # verify the required parameter 'project_name_or_id' is set if @api_client.config.client_side_validation && project_name_or_id.nil? fail ArgumentError, "Missing the required parameter 'project_name_or_id' when calling WebhookApi.last_trigger" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling WebhookApi.last_trigger, the character length must be great than or equal to 1.' end # resource path local_var_path = '/projects/{project_name_or_id}/webhook/lasttrigger'.sub('{' + 'project_name_or_id' + '}', project_name_or_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? header_params[:'X-Is-Resource-Name'] = opts[:'x_is_resource_name'] if !opts[:'x_is_resource_name'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<WebhookLastTrigger>') if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhookApi#last_trigger\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_webhook_policies_of_project(project_name_or_id, opts = {}) ⇒ Array<WebhookPolicy>
List project webhook policies. This endpoint returns webhook policies of a project.
369 370 371 372 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 369 def list_webhook_policies_of_project(project_name_or_id, opts = {}) data, _status_code, _headers = list_webhook_policies_of_project_with_http_info(project_name_or_id, opts) data end |
#list_webhook_policies_of_project_with_http_info(project_name_or_id, opts = {}) ⇒ Array<(Array<WebhookPolicy>, Fixnum, Hash)>
List project webhook policies. This endpoint returns webhook policies of a project.
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 425 426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 385 def list_webhook_policies_of_project_with_http_info(project_name_or_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebhookApi.list_webhook_policies_of_project ...' end # verify the required parameter 'project_name_or_id' is set if @api_client.config.client_side_validation && project_name_or_id.nil? fail ArgumentError, "Missing the required parameter 'project_name_or_id' when calling WebhookApi.list_webhook_policies_of_project" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling WebhookApi.list_webhook_policies_of_project, the character length must be great than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling WebhookApi.list_webhook_policies_of_project, must be smaller than or equal to 100.' end # resource path local_var_path = '/projects/{project_name_or_id}/webhook/policies'.sub('{' + 'project_name_or_id' + '}', project_name_or_id.to_s) # query parameters query_params = {} query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? header_params[:'X-Is-Resource-Name'] = opts[:'x_is_resource_name'] if !opts[:'x_is_resource_name'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<WebhookPolicy>') if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhookApi#list_webhook_policies_of_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_webhook_policy_of_project(project_name_or_id, webhook_policy_id, policy, opts = {}) ⇒ nil
Update webhook policy of a project. This endpoint is aimed to update the webhook policy of a project.
447 448 449 450 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 447 def update_webhook_policy_of_project(project_name_or_id, webhook_policy_id, policy, opts = {}) update_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, policy, opts) nil end |
#update_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, policy, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update webhook policy of a project. This endpoint is aimed to update the webhook policy of a project.
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 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/harbor2_client/api/webhook_api.rb', line 461 def update_webhook_policy_of_project_with_http_info(project_name_or_id, webhook_policy_id, policy, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WebhookApi.update_webhook_policy_of_project ...' end # verify the required parameter 'project_name_or_id' is set if @api_client.config.client_side_validation && project_name_or_id.nil? fail ArgumentError, "Missing the required parameter 'project_name_or_id' when calling WebhookApi.update_webhook_policy_of_project" end # verify the required parameter 'webhook_policy_id' is set if @api_client.config.client_side_validation && webhook_policy_id.nil? fail ArgumentError, "Missing the required parameter 'webhook_policy_id' when calling WebhookApi.update_webhook_policy_of_project" end # verify the required parameter 'policy' is set if @api_client.config.client_side_validation && policy.nil? fail ArgumentError, "Missing the required parameter 'policy' when calling WebhookApi.update_webhook_policy_of_project" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling WebhookApi.update_webhook_policy_of_project, the character length must be great than or equal to 1.' end # resource path local_var_path = '/projects/{project_name_or_id}/webhook/policies/{webhook_policy_id}'.sub('{' + 'project_name_or_id' + '}', project_name_or_id.to_s).sub('{' + 'webhook_policy_id' + '}', webhook_policy_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? header_params[:'X-Is-Resource-Name'] = opts[:'x_is_resource_name'] if !opts[:'x_is_resource_name'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(policy) auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhookApi#update_webhook_policy_of_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |