Class: CyberSource::AsymmetricKeyManagementApi
- Inherits:
-
Object
- Object
- CyberSource::AsymmetricKeyManagementApi
- Defined in:
- lib/cybersource_rest_client/api/asymmetric_key_management_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_p12_keys(create_p12_keys_request, opts = {}) ⇒ KmsV2KeysAsymPost201Response
Create one or more PKCS12 keys ‘Create one or more PKCS12 keys’.
-
#create_p12_keys_with_http_info(create_p12_keys_request, opts = {}) ⇒ Array<(KmsV2KeysAsymPost201Response, Fixnum, Hash)>
Create one or more PKCS12 keys 'Create one or more PKCS12 keys'.
-
#delete_bulk_p12_keys(delete_bulk_p12_keys_request, opts = {}) ⇒ KmsV2KeysAsymDeletesPost200Response
Delete one or more PKCS12 keys ‘Delete one or more PKCS12 keys’.
-
#delete_bulk_p12_keys_with_http_info(delete_bulk_p12_keys_request, opts = {}) ⇒ Array<(KmsV2KeysAsymDeletesPost200Response, Fixnum, Hash)>
Delete one or more PKCS12 keys 'Delete one or more PKCS12 keys'.
-
#get_p12_key_details(key_id, opts = {}) ⇒ KmsV2KeysAsymGet200Response
Retrieves PKCS12 key details Retrieves keys details by providing the key id.
-
#get_p12_key_details_with_http_info(key_id, opts = {}) ⇒ Array<(KmsV2KeysAsymGet200Response, Fixnum, Hash)>
Retrieves PKCS12 key details Retrieves keys details by providing the key id.
-
#initialize(api_client = ApiClient.default, config) ⇒ AsymmetricKeyManagementApi
constructor
A new instance of AsymmetricKeyManagementApi.
-
#update_asym_key(key_id, update_asym_keys_request, opts = {}) ⇒ Object
Activate or De-activate Asymmetric Key Activate or De-activate Asymmetric Key.
-
#update_asym_key_with_http_info(key_id, update_asym_keys_request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Activate or De-activate Asymmetric Key Activate or De-activate Asymmetric Key.
Constructor Details
#initialize(api_client = ApiClient.default, config) ⇒ AsymmetricKeyManagementApi
Returns a new instance of AsymmetricKeyManagementApi.
18 19 20 21 |
# File 'lib/cybersource_rest_client/api/asymmetric_key_management_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/asymmetric_key_management_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#create_p12_keys(create_p12_keys_request, opts = {}) ⇒ KmsV2KeysAsymPost201Response
Create one or more PKCS12 keys ‘Create one or more PKCS12 keys’
29 30 31 32 |
# File 'lib/cybersource_rest_client/api/asymmetric_key_management_api.rb', line 29 def create_p12_keys(create_p12_keys_request, opts = {}) data, status_code, headers = create_p12_keys_with_http_info(create_p12_keys_request, opts) return data, status_code, headers end |
#create_p12_keys_with_http_info(create_p12_keys_request, opts = {}) ⇒ Array<(KmsV2KeysAsymPost201Response, Fixnum, Hash)>
Create one or more PKCS12 keys 'Create one or more PKCS12 keys'
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 |
# File 'lib/cybersource_rest_client/api/asymmetric_key_management_api.rb', line 39 def create_p12_keys_with_http_info(create_p12_keys_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: AsymmetricKeyManagementApi.create_p12_keys ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'create_p12_keys_request' is set if @api_client.config.client_side_validation && create_p12_keys_request.nil? fail ArgumentError, "Missing the required parameter 'create_p12_keys_request' when calling AsymmetricKeyManagementApi.create_p12_keys" end # resource path local_var_path = 'kms/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']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(create_p12_keys_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateP12KeysRequest', @api_client.config.host) 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 => 'KmsV2KeysAsymPost201Response') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: AsymmetricKeyManagementApi#create_p12_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#delete_bulk_p12_keys(delete_bulk_p12_keys_request, opts = {}) ⇒ KmsV2KeysAsymDeletesPost200Response
Delete one or more PKCS12 keys ‘Delete one or more PKCS12 keys’
98 99 100 101 |
# File 'lib/cybersource_rest_client/api/asymmetric_key_management_api.rb', line 98 def delete_bulk_p12_keys(delete_bulk_p12_keys_request, opts = {}) data, status_code, headers = delete_bulk_p12_keys_with_http_info(delete_bulk_p12_keys_request, opts) return data, status_code, headers end |
#delete_bulk_p12_keys_with_http_info(delete_bulk_p12_keys_request, opts = {}) ⇒ Array<(KmsV2KeysAsymDeletesPost200Response, Fixnum, Hash)>
Delete one or more PKCS12 keys 'Delete one or more PKCS12 keys'
108 109 110 111 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/cybersource_rest_client/api/asymmetric_key_management_api.rb', line 108 def delete_bulk_p12_keys_with_http_info(delete_bulk_p12_keys_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: AsymmetricKeyManagementApi.delete_bulk_p12_keys ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'delete_bulk_p12_keys_request' is set if @api_client.config.client_side_validation && delete_bulk_p12_keys_request.nil? fail ArgumentError, "Missing the required parameter 'delete_bulk_p12_keys_request' when calling AsymmetricKeyManagementApi.delete_bulk_p12_keys" end # resource path local_var_path = 'kms/v2/keys-asym/deletes' # 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(delete_bulk_p12_keys_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'DeleteBulkP12KeysRequest', @api_client.config.host) 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 => 'KmsV2KeysAsymDeletesPost200Response') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: AsymmetricKeyManagementApi#delete_bulk_p12_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#get_p12_key_details(key_id, opts = {}) ⇒ KmsV2KeysAsymGet200Response
Retrieves PKCS12 key details Retrieves keys details by providing the key id.
167 168 169 170 |
# File 'lib/cybersource_rest_client/api/asymmetric_key_management_api.rb', line 167 def get_p12_key_details(key_id, opts = {}) data, status_code, headers = get_p12_key_details_with_http_info(key_id, opts) return data, status_code, headers end |
#get_p12_key_details_with_http_info(key_id, opts = {}) ⇒ Array<(KmsV2KeysAsymGet200Response, Fixnum, Hash)>
Retrieves PKCS12 key details Retrieves keys details by providing the key id.
177 178 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 224 225 226 227 228 229 230 |
# File 'lib/cybersource_rest_client/api/asymmetric_key_management_api.rb', line 177 def get_p12_key_details_with_http_info(key_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: AsymmetricKeyManagementApi.get_p12_key_details ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'key_id' is set if @api_client.config.client_side_validation && key_id.nil? fail ArgumentError, "Missing the required parameter 'key_id' when calling AsymmetricKeyManagementApi.get_p12_key_details" end # resource path local_var_path = 'kms/v2/keys-asym/{keyId}'.sub('{' + 'keyId' + '}', key_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 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 => 'KmsV2KeysAsymGet200Response') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: AsymmetricKeyManagementApi#get_p12_key_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#update_asym_key(key_id, update_asym_keys_request, opts = {}) ⇒ Object
Activate or De-activate Asymmetric Key Activate or De-activate Asymmetric Key
239 240 241 242 |
# File 'lib/cybersource_rest_client/api/asymmetric_key_management_api.rb', line 239 def update_asym_key(key_id, update_asym_keys_request, opts = {}) data, status_code, headers = update_asym_key_with_http_info(key_id, update_asym_keys_request, opts) return data, status_code, headers end |
#update_asym_key_with_http_info(key_id, update_asym_keys_request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Activate or De-activate Asymmetric Key Activate or De-activate Asymmetric Key
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 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/cybersource_rest_client/api/asymmetric_key_management_api.rb', line 250 def update_asym_key_with_http_info(key_id, update_asym_keys_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: AsymmetricKeyManagementApi.update_asym_key ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'key_id' is set if @api_client.config.client_side_validation && key_id.nil? fail ArgumentError, "Missing the required parameter 'key_id' when calling AsymmetricKeyManagementApi.update_asym_key" end # verify the required parameter 'update_asym_keys_request' is set if @api_client.config.client_side_validation && update_asym_keys_request.nil? fail ArgumentError, "Missing the required parameter 'update_asym_keys_request' when calling AsymmetricKeyManagementApi.update_asym_key" end # resource path local_var_path = 'kms/v2/keys-asym/{keyId}'.sub('{' + 'keyId' + '}', key_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(update_asym_keys_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdateAsymKeysRequest', @api_client.config.host) 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 => 'Object') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: AsymmetricKeyManagementApi#update_asym_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |