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
-
#initialize(api_client = ApiClient.default, config) ⇒ ManageWebhooksApi
constructor
A new instance of ManageWebhooksApi.
-
#notification_subscriptions_v1_webhooks_webhook_id_post(webhook_id, opts = {}) ⇒ InlineResponse2014
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<(InlineResponse2014, Fixnum, Hash)>
Test a Webhook Configuration Test the webhook configuration by sending a sample webhook.
-
#save_asym_egress_key(v_c_sender_organization_id, v_c_permissions, save_asym_egress_key, opts = {}) ⇒ InlineResponse2015
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<(InlineResponse2015, 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
#notification_subscriptions_v1_webhooks_webhook_id_post(webhook_id, opts = {}) ⇒ InlineResponse2014
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.
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.
30 31 32 33 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 30 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<(InlineResponse2014, 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.
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 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 40 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 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, ["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 => 'InlineResponse2014') 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 |
#save_asym_egress_key(v_c_sender_organization_id, v_c_permissions, save_asym_egress_key, opts = {}) ⇒ InlineResponse2015
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.
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.
109 110 111 112 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 109 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<(InlineResponse2015, 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.
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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/cybersource_rest_client/api/manage_webhooks_api.rb', line 122 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) 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_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 => 'InlineResponse2015') 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 |