Class: CyberSource::ManageWebhooksApi
- Inherits:
-
Object
- Object
- CyberSource::ManageWebhooksApi
- Defined in:
- lib/cybersource_rest_client/api/manage_webhooks_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_webhook_subscription(webhook_id, opts = {}) ⇒ nil
Delete a Webhook Subscription Delete the webhook.
-
#delete_webhook_subscription_with_http_info(webhook_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a Webhook Subscription Delete the webhook.
-
#get_webhook_subscription_by_id(webhook_id, opts = {}) ⇒ InlineResponse2015
Get Details On a Single Webhook Retrieve the details of a specific webhook by supplying the webhook ID in the path.
-
#get_webhook_subscription_by_id_with_http_info(webhook_id, opts = {}) ⇒ Array<(InlineResponse2015, Fixnum, Hash)>
Get Details On a Single Webhook Retrieve the details of a specific webhook by supplying the webhook ID in the path.
-
#get_webhook_subscriptions_by_org(organization_id, opts = {}) ⇒ Array<InlineResponse2006>
Get Details On All Created Webhooks Retrieve a list of all previously created webhooks.
-
#get_webhook_subscriptions_by_org_with_http_info(organization_id, opts = {}) ⇒ Array<(Array<InlineResponse2006>, Fixnum, Hash)>
Get Details On All Created Webhooks Retrieve a list of all previously created webhooks.
-
#initialize(api_client = ApiClient.default, config) ⇒ ManageWebhooksApi
constructor
A new instance of ManageWebhooksApi.
-
#notification_subscriptions_v1_webhooks_webhook_id_post(webhook_id, opts = {}) ⇒ InlineResponse2016
Test a Webhook Configuration Test the webhook configuration by sending a sample webhook.
-
#notification_subscriptions_v1_webhooks_webhook_id_post_with_http_info(webhook_id, opts = {}) ⇒ Array<(InlineResponse2016, Fixnum, Hash)>
Test a Webhook Configuration Test the webhook configuration by sending a sample webhook.
-
#notification_subscriptions_v2_webhooks_webhook_id_patch(webhook_id, opts = {}) ⇒ InlineResponse2007
Update a Webhook Subscription Update a Webhook Subscription.
-
#notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info(webhook_id, opts = {}) ⇒ Array<(InlineResponse2007, Fixnum, Hash)>
Update a Webhook Subscription Update a Webhook Subscription.
-
#notification_subscriptions_v2_webhooks_webhook_id_status_put(webhook_id, opts = {}) ⇒ nil
Update a Webhook Status Users can update the status of a webhook subscription by calling this endpoint.
-
#notification_subscriptions_v2_webhooks_webhook_id_status_put_with_http_info(webhook_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update a Webhook Status Users can update the status of a webhook subscription by calling this endpoint.
-
#save_asym_egress_key(v_c_sender_organization_id, v_c_permissions, save_asym_egress_key, opts = {}) ⇒ InlineResponse2017
Message Level Encryption Store and manage certificates that will be used to preform Message Level Encryption (MLE).
-
#save_asym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissions, save_asym_egress_key, opts = {}) ⇒ Array<(InlineResponse2017, Fixnum, Hash)>
Message Level Encryption Store and manage certificates that will be used to preform Message Level Encryption (MLE).
Constructor Details
#initialize(api_client = ApiClient.default, config) ⇒ ManageWebhooksApi
Returns a new instance of ManageWebhooksApi.
18 19 20 21 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 18 def initialize(api_client = ApiClient.default, config) @api_client = api_client @api_client.set_configuration(config) end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#delete_webhook_subscription(webhook_id, opts = {}) ⇒ nil
Delete a Webhook Subscription Delete the webhook. Please note that deleting a particular webhook does not delete the history of the webhook notifications.
29 30 31 32 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 29 def delete_webhook_subscription(webhook_id, opts = {}) data, status_code, headers = delete_webhook_subscription_with_http_info(webhook_id, opts) return data, status_code, headers end |
#delete_webhook_subscription_with_http_info(webhook_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a Webhook Subscription Delete the webhook. Please note that deleting a particular webhook does not delete the history of the webhook notifications.
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 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 39 def delete_webhook_subscription_with_http_info(webhook_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ManageWebhooksApi.delete_webhook_subscription ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'webhook_id' is set if @api_client.config.client_side_validation && webhook_id.nil? fail ArgumentError, "Missing the required parameter 'webhook_id' when calling ManageWebhooksApi.delete_webhook_subscription" end # resource path local_var_path = 'notification-subscriptions/v2/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', webhook_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/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) if 'DELETE' == 'POST' post_body = '{}' else post_body = nil end inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_webhook_subscription","delete_webhook_subscription_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end auth_names = [] 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 begin raise @api_client.config.logger.debug "API called: ManageWebhooksApi#delete_webhook_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#get_webhook_subscription_by_id(webhook_id, opts = {}) ⇒ InlineResponse2015
Get Details On a Single Webhook Retrieve the details of a specific webhook by supplying the webhook ID in the path.
107 108 109 110 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 107 def get_webhook_subscription_by_id(webhook_id, opts = {}) data, status_code, headers = get_webhook_subscription_by_id_with_http_info(webhook_id, opts) return data, status_code, headers end |
#get_webhook_subscription_by_id_with_http_info(webhook_id, opts = {}) ⇒ Array<(InlineResponse2015, Fixnum, Hash)>
Get Details On a Single Webhook Retrieve the details of a specific webhook by supplying the webhook ID in the path.
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 117 def get_webhook_subscription_by_id_with_http_info(webhook_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ManageWebhooksApi.get_webhook_subscription_by_id ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'webhook_id' is set if @api_client.config.client_side_validation && webhook_id.nil? fail ArgumentError, "Missing the required parameter 'webhook_id' when calling ManageWebhooksApi.get_webhook_subscription_by_id" end # resource path local_var_path = 'notification-subscriptions/v2/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', webhook_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/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) if 'GET' == 'POST' post_body = '{}' else post_body = nil end inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_webhook_subscription_by_id","get_webhook_subscription_by_id_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end auth_names = [] 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 => 'InlineResponse2015') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ManageWebhooksApi#get_webhook_subscription_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#get_webhook_subscriptions_by_org(organization_id, opts = {}) ⇒ Array<InlineResponse2006>
Get Details On All Created Webhooks Retrieve a list of all previously created webhooks.
188 189 190 191 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 188 def get_webhook_subscriptions_by_org(organization_id, opts = {}) data, status_code, headers = get_webhook_subscriptions_by_org_with_http_info(organization_id, opts) return data, status_code, headers end |
#get_webhook_subscriptions_by_org_with_http_info(organization_id, opts = {}) ⇒ Array<(Array<InlineResponse2006>, Fixnum, Hash)>
Get Details On All Created Webhooks Retrieve a list of all previously created webhooks.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 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 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 200 def get_webhook_subscriptions_by_org_with_http_info(organization_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ManageWebhooksApi.get_webhook_subscriptions_by_org ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'organization_id' is set if @api_client.config.client_side_validation && organization_id.nil? fail ArgumentError, "Missing the required parameter 'organization_id' when calling ManageWebhooksApi.get_webhook_subscriptions_by_org" end # resource path local_var_path = 'notification-subscriptions/v2/webhooks' # query parameters query_params = {} query_params[:'organizationId'] = organization_id query_params[:'productId'] = opts[:'product_id'] if !opts[:'product_id'].nil? query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) if 'GET' == 'POST' post_body = '{}' else post_body = nil end inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_webhook_subscriptions_by_org","get_webhook_subscriptions_by_org_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end auth_names = [] 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<InlineResponse2006>') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ManageWebhooksApi#get_webhook_subscriptions_by_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#notification_subscriptions_v1_webhooks_webhook_id_post(webhook_id, opts = {}) ⇒ InlineResponse2016
Test a Webhook Configuration Test the webhook configuration by sending a sample webhook. Calling this endpoint sends a sample webhook to the endpoint identified in the user’s subscription. It will contain sample values for the product & eventType based on values present in your subscription along with a sample message in the payload. Based on the webhook response users can make any necessary modifications or rest assured knowing their setup is configured correctly.
272 273 274 275 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 272 def notification_subscriptions_v1_webhooks_webhook_id_post(webhook_id, opts = {}) data, status_code, headers = notification_subscriptions_v1_webhooks_webhook_id_post_with_http_info(webhook_id, opts) return data, status_code, headers end |
#notification_subscriptions_v1_webhooks_webhook_id_post_with_http_info(webhook_id, opts = {}) ⇒ Array<(InlineResponse2016, Fixnum, Hash)>
Test a Webhook Configuration Test the webhook configuration by sending a sample webhook. Calling this endpoint sends a sample webhook to the endpoint identified in the user's subscription. It will contain sample values for the product & eventType based on values present in your subscription along with a sample message in the payload. Based on the webhook response users can make any necessary modifications or rest assured knowing their setup is configured correctly.
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 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 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 282 def notification_subscriptions_v1_webhooks_webhook_id_post_with_http_info(webhook_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ManageWebhooksApi.notification_subscriptions_v1_webhooks_webhook_id_post ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'webhook_id' is set if @api_client.config.client_side_validation && webhook_id.nil? fail ArgumentError, "Missing the required parameter 'webhook_id' when calling ManageWebhooksApi.notification_subscriptions_v1_webhooks_webhook_id_post" end # resource path local_var_path = 'notification-subscriptions/v1/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', webhook_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/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) if 'POST' == 'POST' post_body = '{}' else post_body = nil end inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["notification_subscriptions_v1_webhooks_webhook_id_post","notification_subscriptions_v1_webhooks_webhook_id_post_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end auth_names = [] 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, :return_type => 'InlineResponse2016') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ManageWebhooksApi#notification_subscriptions_v1_webhooks_webhook_id_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#notification_subscriptions_v2_webhooks_webhook_id_patch(webhook_id, opts = {}) ⇒ InlineResponse2007
Update a Webhook Subscription Update a Webhook Subscription.
352 353 354 355 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 352 def notification_subscriptions_v2_webhooks_webhook_id_patch(webhook_id, opts = {}) data, status_code, headers = notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info(webhook_id, opts) return data, status_code, headers end |
#notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info(webhook_id, opts = {}) ⇒ Array<(InlineResponse2007, Fixnum, Hash)>
Update a Webhook Subscription Update a Webhook Subscription.
363 364 365 366 367 368 369 370 371 372 373 374 375 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 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 363 def notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info(webhook_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ManageWebhooksApi.notification_subscriptions_v2_webhooks_webhook_id_patch ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'webhook_id' is set if @api_client.config.client_side_validation && webhook_id.nil? fail ArgumentError, "Missing the required parameter 'webhook_id' when calling ManageWebhooksApi.notification_subscriptions_v2_webhooks_webhook_id_patch" end # resource path local_var_path = 'notification-subscriptions/v2/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', webhook_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/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'update_webhook']) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdateWebhook', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["notification_subscriptions_v2_webhooks_webhook_id_patch","notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2007') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ManageWebhooksApi#notification_subscriptions_v2_webhooks_webhook_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#notification_subscriptions_v2_webhooks_webhook_id_status_put(webhook_id, opts = {}) ⇒ nil
Update a Webhook Status Users can update the status of a webhook subscription by calling this endpoint. The webhookId parameter in the URL path identifies the specific webhook subscription to be updated. The request body accepts the values ACTIVE or INACTIVE. If the subscription is set to INACTIVE, webhooks will not be delivered until the subscription is activated again.
431 432 433 434 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 431 def notification_subscriptions_v2_webhooks_webhook_id_status_put(webhook_id, opts = {}) data, status_code, headers = notification_subscriptions_v2_webhooks_webhook_id_status_put_with_http_info(webhook_id, opts) return data, status_code, headers end |
#notification_subscriptions_v2_webhooks_webhook_id_status_put_with_http_info(webhook_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update a Webhook Status Users can update the status of a webhook subscription by calling this endpoint. The webhookId parameter in the URL path identifies the specific webhook subscription to be updated. The request body accepts the values ACTIVE or INACTIVE. If the subscription is set to INACTIVE, webhooks will not be delivered until the subscription is activated again.
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 495 496 497 498 499 500 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 442 def notification_subscriptions_v2_webhooks_webhook_id_status_put_with_http_info(webhook_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ManageWebhooksApi.notification_subscriptions_v2_webhooks_webhook_id_status_put ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'webhook_id' is set if @api_client.config.client_side_validation && webhook_id.nil? fail ArgumentError, "Missing the required parameter 'webhook_id' when calling ManageWebhooksApi.notification_subscriptions_v2_webhooks_webhook_id_status_put" end # resource path local_var_path = 'notification-subscriptions/v2/webhooks/{webhookId}/status'.sub('{' + 'webhookId' + '}', webhook_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/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'update_status']) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdateStatus', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["notification_subscriptions_v2_webhooks_webhook_id_status_put","notification_subscriptions_v2_webhooks_webhook_id_status_put_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end auth_names = [] 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 begin raise @api_client.config.logger.debug "API called: ManageWebhooksApi#notification_subscriptions_v2_webhooks_webhook_id_status_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#save_asym_egress_key(v_c_sender_organization_id, v_c_permissions, save_asym_egress_key, opts = {}) ⇒ InlineResponse2017
Message Level Encryption Store and manage certificates that will be used to preform Message Level Encryption (MLE). Each new webhook will need its own unique asymmetric certificate. You can either use a digital certificate issued/signed by a CA or self-sign your own using the documentation available on the Developer Guide.
511 512 513 514 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 511 def save_asym_egress_key(v_c_sender_organization_id, , save_asym_egress_key, opts = {}) data, status_code, headers = save_asym_egress_key_with_http_info(v_c_sender_organization_id, , save_asym_egress_key, opts) return data, status_code, headers end |
#save_asym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissions, save_asym_egress_key, opts = {}) ⇒ Array<(InlineResponse2017, Fixnum, Hash)>
Message Level Encryption Store and manage certificates that will be used to preform Message Level Encryption (MLE). Each new webhook will need its own unique asymmetric certificate. You can either use a digital certificate issued/signed by a CA or self-sign your own using the documentation available on the Developer Guide.
524 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 591 592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 524 def save_asym_egress_key_with_http_info(v_c_sender_organization_id, , save_asym_egress_key, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ManageWebhooksApi.save_asym_egress_key ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'v_c_sender_organization_id' is set if @api_client.config.client_side_validation && v_c_sender_organization_id.nil? fail ArgumentError, "Missing the required parameter 'v_c_sender_organization_id' when calling ManageWebhooksApi.save_asym_egress_key" end #if @api_client.config.client_side_validation && v_c_sender_organization_id !~ Regexp.new(/^[A-Za-z0-9\\-_]+$/) #fail ArgumentError, "invalid value for 'v_c_sender_organization_id' when calling ManageWebhooksApi.save_asym_egress_key, must conform to the pattern /^[A-Za-z0-9\\-_]+$/." #end # verify the required parameter 'v_c_permissions' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'v_c_permissions' when calling ManageWebhooksApi.save_asym_egress_key" end # verify the required parameter 'save_asym_egress_key' is set if @api_client.config.client_side_validation && save_asym_egress_key.nil? fail ArgumentError, "Missing the required parameter 'save_asym_egress_key' when calling ManageWebhooksApi.save_asym_egress_key" end #if @api_client.config.client_side_validation && !opts[:'v_c_correlation_id'].nil? && opts[:'v_c_correlation_id'] !~ Regexp.new(/^[A-Za-z0-9\\.\\-_:]+$/) #fail ArgumentError, "invalid value for 'opts[:\"v_c_correlation_id\"]' when calling ManageWebhooksApi.save_asym_egress_key, must conform to the pattern /^[A-Za-z0-9\\.\\-_:]+$/." #end # resource path local_var_path = 'kms/egress/v2/keys-asym' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) header_params[:'v-c-sender-organization-id'] = v_c_sender_organization_id header_params[:'v-c-permissions'] = header_params[:'v-c-correlation-id'] = opts[:'v_c_correlation_id'] if !opts[:'v_c_correlation_id'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(save_asym_egress_key) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'SaveAsymEgressKey', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["save_asym_egress_key","save_asym_egress_key_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end auth_names = [] 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, :return_type => 'InlineResponse2017') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ManageWebhooksApi#save_asym_egress_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |