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<InlineResponse2004>
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<InlineResponse2004>, 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 = {}) ⇒ InlineResponse2005
Update a Webhook Subscription Update a Webhook Subscription.
-
#notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info(webhook_id, opts = {}) ⇒ Array<(InlineResponse2005, 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 |
# 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"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) 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.
103 104 105 106 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 103 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.
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 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 113 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"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) 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<InlineResponse2004>
Get Details On All Created Webhooks Retrieve a list of all previously created webhooks.
180 181 182 183 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 180 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<InlineResponse2004>, Fixnum, Hash)>
Get Details On All Created Webhooks Retrieve a list of all previously created webhooks.
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 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 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 192 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"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) 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<InlineResponse2004>') 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.
260 261 262 263 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 260 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.
270 271 272 273 274 275 276 277 278 279 280 281 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 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 270 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"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) 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 = {}) ⇒ InlineResponse2005
Update a Webhook Subscription Update a Webhook Subscription.
336 337 338 339 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 336 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<(InlineResponse2005, Fixnum, Hash)>
Update a Webhook Subscription Update a Webhook Subscription.
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 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 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 347 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"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) 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 => 'InlineResponse2005') 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.
411 412 413 414 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 411 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.
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 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 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 422 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"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) 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.
487 488 489 490 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 487 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.
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 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 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 500 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"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) 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 |