Class: CyberSource::KeyManagementApi
- Inherits:
- 
      Object
      
        - Object
- CyberSource::KeyManagementApi
 
- Defined in:
- lib/cybersource_rest_client/api/key_management_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)  ⇒ KeyManagementApi 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of KeyManagementApi. 
- 
  
    
      #search_keys(opts = {})  ⇒ InlineResponse2001 
    
    
  
  
  
  
  
  
  
  
  
    Search Keys Search one or more Keys. 
- 
  
    
      #search_keys_with_http_info(opts = {})  ⇒ Array<(InlineResponse2001, Fixnum, Hash)> 
    
    
  
  
  
  
  
  
  
  
  
    Search Keys Search one or more Keys. 
Constructor Details
#initialize(api_client = ApiClient.default, config) ⇒ KeyManagementApi
Returns a new instance of KeyManagementApi.
| 18 19 20 21 | # File 'lib/cybersource_rest_client/api/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/key_management_api.rb', line 16 def api_client @api_client end | 
Instance Method Details
#search_keys(opts = {}) ⇒ InlineResponse2001
Search Keys Search one or more Keys
| 36 37 38 39 | # File 'lib/cybersource_rest_client/api/key_management_api.rb', line 36 def search_keys(opts = {}) data, status_code, headers = search_keys_with_http_info(opts) return data, status_code, headers end | 
#search_keys_with_http_info(opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>
Search Keys Search one or more Keys
| 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 117 118 | # File 'lib/cybersource_rest_client/api/key_management_api.rb', line 53 def search_keys_with_http_info(opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: KeyManagementApi.search_keys ...' rescue puts 'Cannot write to log' end end #if @api_client.config.client_side_validation && !opts[:'expiration_start_date'].nil? && opts[:'expiration_start_date'] !~ Regexp.new(/yyyy-mm-dd/) #fail ArgumentError, "invalid value for 'opts[:\"expiration_start_date\"]' when calling KeyManagementApi.search_keys, must conform to the pattern /yyyy-mm-dd/." #end #if @api_client.config.client_side_validation && !opts[:'expiration_end_date'].nil? && opts[:'expiration_end_date'] !~ Regexp.new(/yyyy-mm-dd/) #fail ArgumentError, "invalid value for 'opts[:\"expiration_end_date\"]' when calling KeyManagementApi.search_keys, must conform to the pattern /yyyy-mm-dd/." #end # resource path local_var_path = 'kms/v2/keys' # query parameters query_params = {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'organizationIds'] = @api_client.build_collection_param(opts[:'organization_ids'], :csv) if !opts[:'organization_ids'].nil? query_params[:'keyIds'] = @api_client.build_collection_param(opts[:'key_ids'], :csv) if !opts[:'key_ids'].nil? query_params[:'keyTypes'] = @api_client.build_collection_param(opts[:'key_types'], :csv) if !opts[:'key_types'].nil? query_params[:'expirationStartDate'] = opts[:'expiration_start_date'] if !opts[:'expiration_start_date'].nil? query_params[:'expirationEndDate'] = opts[:'expiration_end_date'] if !opts[:'expiration_end_date'].nil? # 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 => 'InlineResponse2001') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: KeyManagementApi#search_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |