Class: CyberSource::SymmetricKeyManagementApi
- Inherits:
-
Object
- Object
- CyberSource::SymmetricKeyManagementApi
- Defined in:
- lib/cybersource_rest_client/api/symmetric_key_management_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_v2_shared_secret_keys(create_shared_secret_keys_request, opts = {}) ⇒ KmsV2KeysSymPost201Response
Create Shared-Secret Keys Create one or more Shared-Secret Keys.
-
#create_v2_shared_secret_keys_with_http_info(create_shared_secret_keys_request, opts = {}) ⇒ Array<(KmsV2KeysSymPost201Response, Fixnum, Hash)>
Create Shared-Secret Keys Create one or more Shared-Secret Keys.
-
#delete_bulk_symmetric_keys(delete_bulk_symmetric_keys_request, opts = {}) ⇒ KmsV2KeysSymDeletesPost200Response
Delete one or more Symmetric keys ‘Delete one or more Symmetric keys’.
-
#delete_bulk_symmetric_keys_with_http_info(delete_bulk_symmetric_keys_request, opts = {}) ⇒ Array<(KmsV2KeysSymDeletesPost200Response, Fixnum, Hash)>
Delete one or more Symmetric keys 'Delete one or more Symmetric keys'.
-
#get_key_details(key_id, opts = {}) ⇒ KmsV2KeysSymGet200Response
Retrieves shared secret key details Retrieves keys details by providing the key id.
-
#get_key_details_with_http_info(key_id, opts = {}) ⇒ Array<(KmsV2KeysSymGet200Response, Fixnum, Hash)>
Retrieves shared secret key details Retrieves keys details by providing the key id.
-
#initialize(api_client = ApiClient.default, config) ⇒ SymmetricKeyManagementApi
constructor
A new instance of SymmetricKeyManagementApi.
Constructor Details
#initialize(api_client = ApiClient.default, config) ⇒ SymmetricKeyManagementApi
Returns a new instance of SymmetricKeyManagementApi.
19 20 21 22 |
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 19 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.
17 18 19 |
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_v2_shared_secret_keys(create_shared_secret_keys_request, opts = {}) ⇒ KmsV2KeysSymPost201Response
Create Shared-Secret Keys Create one or more Shared-Secret Keys
28 29 30 31 |
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 28 def create_v2_shared_secret_keys(create_shared_secret_keys_request, opts = {}) data, status_code, headers = create_v2_shared_secret_keys_with_http_info(create_shared_secret_keys_request, opts) return data, status_code, headers end |
#create_v2_shared_secret_keys_with_http_info(create_shared_secret_keys_request, opts = {}) ⇒ Array<(KmsV2KeysSymPost201Response, Fixnum, Hash)>
Create Shared-Secret Keys Create one or more Shared-Secret Keys
38 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 |
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 38 def create_v2_shared_secret_keys_with_http_info(create_shared_secret_keys_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: SymmetricKeyManagementApi.create_v2_shared_secret_keys ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'create_shared_secret_keys_request' is set if @api_client.config.client_side_validation && create_shared_secret_keys_request.nil? fail ArgumentError, "Missing the required parameter 'create_shared_secret_keys_request' when calling SymmetricKeyManagementApi.create_v2_shared_secret_keys" end # resource path local_var_path = 'kms/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']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(create_shared_secret_keys_request) 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 => 'KmsV2KeysSymPost201Response') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: SymmetricKeyManagementApi#create_v2_shared_secret_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_symmetric_keys(delete_bulk_symmetric_keys_request, opts = {}) ⇒ KmsV2KeysSymDeletesPost200Response
Delete one or more Symmetric keys ‘Delete one or more Symmetric keys’
93 94 95 96 |
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 93 def delete_bulk_symmetric_keys(delete_bulk_symmetric_keys_request, opts = {}) data, status_code, headers = delete_bulk_symmetric_keys_with_http_info(delete_bulk_symmetric_keys_request, opts) return data, status_code, headers end |
#delete_bulk_symmetric_keys_with_http_info(delete_bulk_symmetric_keys_request, opts = {}) ⇒ Array<(KmsV2KeysSymDeletesPost200Response, Fixnum, Hash)>
Delete one or more Symmetric keys 'Delete one or more Symmetric keys'
103 104 105 106 107 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 |
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 103 def delete_bulk_symmetric_keys_with_http_info(delete_bulk_symmetric_keys_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: SymmetricKeyManagementApi.delete_bulk_symmetric_keys ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'delete_bulk_symmetric_keys_request' is set if @api_client.config.client_side_validation && delete_bulk_symmetric_keys_request.nil? fail ArgumentError, "Missing the required parameter 'delete_bulk_symmetric_keys_request' when calling SymmetricKeyManagementApi.delete_bulk_symmetric_keys" end # resource path local_var_path = 'kms/v2/keys-sym/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_symmetric_keys_request) 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 => 'KmsV2KeysSymDeletesPost200Response') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: SymmetricKeyManagementApi#delete_bulk_symmetric_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_key_details(key_id, opts = {}) ⇒ KmsV2KeysSymGet200Response
Retrieves shared secret key details Retrieves keys details by providing the key id.
158 159 160 161 |
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 158 def get_key_details(key_id, opts = {}) data, status_code, headers = get_key_details_with_http_info(key_id, opts) return data, status_code, headers end |
#get_key_details_with_http_info(key_id, opts = {}) ⇒ Array<(KmsV2KeysSymGet200Response, Fixnum, Hash)>
Retrieves shared secret key details Retrieves keys details by providing the key id.
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 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 168 def get_key_details_with_http_info(key_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: SymmetricKeyManagementApi.get_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 SymmetricKeyManagementApi.get_key_details" end # resource path local_var_path = 'kms/v2/keys-sym/{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 = nil 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 => 'KmsV2KeysSymGet200Response') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: SymmetricKeyManagementApi#get_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 |