Class: CyberSource::SymmetricKeyManagementApi

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/api/symmetric_key_management_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_clientObject

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

Parameters:

  • create_shared_secret_keys_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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_verifi(v_ic_domain, create_shared_secret_keys_verifi_request, opts = {}) ⇒ KmsV2KeysSymPost201Response

Create Shared-Secret Keys as per verifi spec Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation.

Parameters:

  • v_ic_domain

    domain

  • create_shared_secret_keys_verifi_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



94
95
96
97
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 94

def create_v2_shared_secret_keys_verifi(v_ic_domain, create_shared_secret_keys_verifi_request, opts = {})
  data, status_code, headers = create_v2_shared_secret_keys_verifi_with_http_info(v_ic_domain, create_shared_secret_keys_verifi_request, opts)
  return data, status_code, headers
end

#create_v2_shared_secret_keys_verifi_with_http_info(v_ic_domain, create_shared_secret_keys_verifi_request, opts = {}) ⇒ Array<(KmsV2KeysSymPost201Response, Fixnum, Hash)>

Create Shared-Secret Keys as per verifi spec Create one or more Shared-Secret Keys as per Verifi spec with 32 chars, store digest algo during key generation.

Parameters:

  • v_ic_domain

    domain

  • create_shared_secret_keys_verifi_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
153
154
155
156
157
158
159
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 105

def create_v2_shared_secret_keys_verifi_with_http_info(v_ic_domain, create_shared_secret_keys_verifi_request, opts = {})

  if @api_client.config.debugging
      begin
        raise
            @api_client.config.logger.debug 'Calling API: SymmetricKeyManagementApi.create_v2_shared_secret_keys_verifi ...'
        rescue
            puts 'Cannot write to log'
        end
  end
  # verify the required parameter 'v_ic_domain' is set
  if @api_client.config.client_side_validation && v_ic_domain.nil?
    fail ArgumentError, "Missing the required parameter 'v_ic_domain' when calling SymmetricKeyManagementApi.create_v2_shared_secret_keys_verifi"
  end
  # verify the required parameter 'create_shared_secret_keys_verifi_request' is set
  if @api_client.config.client_side_validation && create_shared_secret_keys_verifi_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_shared_secret_keys_verifi_request' when calling SymmetricKeyManagementApi.create_v2_shared_secret_keys_verifi"
  end
  # resource path
  local_var_path = 'kms/v2/keys-sym/verifi'

  # 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-ic-domain'] = v_ic_domain

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(create_shared_secret_keys_verifi_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_verifi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
    rescue
        puts 'Cannot write to log'
    end
  end
  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

Parameters:

  • create_shared_secret_keys_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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’

Parameters:

  • delete_bulk_symmetric_keys_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



165
166
167
168
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 165

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 &#39;Delete one or more Symmetric keys&#39;

Parameters:

  • delete_bulk_symmetric_keys_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
218
219
220
221
222
223
224
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 175

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.

Parameters:

  • key_id

    Key ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



230
231
232
233
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 230

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.

Parameters:

  • key_id

    Key ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(KmsV2KeysSymGet200Response, Fixnum, Hash)>)

    KmsV2KeysSymGet200Response data, response status code and response headers



240
241
242
243
244
245
246
247
248
249
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
# File 'lib/cybersource_rest_client/api/symmetric_key_management_api.rb', line 240

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)
  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 => '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