Class: CyberSource::CreateNewWebhooksApi
- Inherits:
-
Object
- Object
- CyberSource::CreateNewWebhooksApi
- Defined in:
- lib/cybersource_rest_client/api/create_new_webhooks_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default, config) ⇒ CreateNewWebhooksApi
constructor
A new instance of CreateNewWebhooksApi.
-
#save_sym_egress_key(v_c_sender_organization_id, v_c_permissions, opts = {}) ⇒ InlineResponse2013
Create Webhook Security Keys Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature.
-
#save_sym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissions, opts = {}) ⇒ Array<(InlineResponse2013, Fixnum, Hash)>
Create Webhook Security Keys Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature.
Constructor Details
#initialize(api_client = ApiClient.default, config) ⇒ CreateNewWebhooksApi
Returns a new instance of CreateNewWebhooksApi.
18 19 20 21 |
# File 'lib/cybersource_rest_client/api/create_new_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/create_new_webhooks_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#save_sym_egress_key(v_c_sender_organization_id, v_c_permissions, opts = {}) ⇒ InlineResponse2013
Create Webhook Security Keys Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later.
DISCLAIMER : Cybersource may allow Customer to access, use, and/or test a Cybersource product or service that may still be in development or has not been market-tested (“Beta Product”) solely for the purpose of evaluating the functionality or marketability of the Beta Product (a “Beta Evaluation”). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer’s participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period (“Beta Product Form”). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer’s use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. Cybersource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided “AS IS” and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR © FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS.
33 34 35 36 |
# File 'lib/cybersource_rest_client/api/create_new_webhooks_api.rb', line 33 def save_sym_egress_key(v_c_sender_organization_id, , opts = {}) data, status_code, headers = save_sym_egress_key_with_http_info(v_c_sender_organization_id, , opts) return data, status_code, headers end |
#save_sym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissions, opts = {}) ⇒ Array<(InlineResponse2013, Fixnum, Hash)>
Create Webhook Security Keys Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later.
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 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/cybersource_rest_client/api/create_new_webhooks_api.rb', line 46 def save_sym_egress_key_with_http_info(v_c_sender_organization_id, , opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: CreateNewWebhooksApi.save_sym_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 CreateNewWebhooksApi.save_sym_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 CreateNewWebhooksApi.save_sym_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 CreateNewWebhooksApi.save_sym_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 CreateNewWebhooksApi.save_sym_egress_key, must conform to the pattern /^[A-Za-z0-9\\.\\-_:]+$/." #end # resource path local_var_path = 'kms/egress/v2/keys-sym' # 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(opts[:'save_sym_egress_key']) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'SaveSymEgressKey', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) is_mle_supported_by_cybs_for_api = false if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, is_mle_supported_by_cybs_for_api, ["save_sym_egress_key","save_sym_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 => 'InlineResponse2013') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: CreateNewWebhooksApi#save_sym_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 |