class CyberSource::SearchTransactionsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default, config) click to toggle source
# File lib/cybersource_rest_client/api/search_transactions_api.rb, line 19
def initialize(api_client = ApiClient.default, config)
  @api_client = api_client
      @api_client.set_configuration(config)
end

Public Instance Methods

create_search_with_http_info(create_search_request, opts = {}) click to toggle source

Create a Search Request Create a search request. @param create_search_request @param [Hash] opts the optional parameters @return [Array<(TssV2TransactionsPost201Response, Fixnum, Hash)>] TssV2TransactionsPost201Response data, response status code and response headers

# File lib/cybersource_rest_client/api/search_transactions_api.rb, line 38
def create_search_with_http_info(create_search_request, opts = {})
  
      if @api_client.config.debugging
           begin
                    raise
                            @api_client.config.logger.debug 'Calling API: SearchTransactionsApi.create_search ...'
                    rescue
                            puts 'Cannot write to log'
                    end
  end
  # verify the required parameter 'create_search_request' is set
  if @api_client.config.client_side_validation && create_search_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_search_request' when calling SearchTransactionsApi.create_search"
  end
  # resource path
  local_var_path = 'tss/v2/searches'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/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_search_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 => 'TssV2TransactionsPost201Response')
  if @api_client.config.debugging
            begin
            raise
                    @api_client.config.logger.debug "API called: SearchTransactionsApi#create_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
            rescue
                    puts 'Cannot write to log'
            end
      end
  return data, status_code, headers
end
get_search_with_http_info(search_id, opts = {}) click to toggle source

Get Search Results Include the Search ID in the GET request to retrieve the search results. @param search_id Search ID. @param [Hash] opts the optional parameters @return [Array<(TssV2TransactionsPost201Response, Fixnum, Hash)>] TssV2TransactionsPost201Response data, response status code and response headers

# File lib/cybersource_rest_client/api/search_transactions_api.rb, line 103
def get_search_with_http_info(search_id, opts = {})
  
      if @api_client.config.debugging
           begin
                    raise
                            @api_client.config.logger.debug 'Calling API: SearchTransactionsApi.get_search ...'
                    rescue
                            puts 'Cannot write to log'
                    end
  end
  # verify the required parameter 'search_id' is set
  if @api_client.config.client_side_validation && search_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_id' when calling SearchTransactionsApi.get_search"
  end
  # resource path
  local_var_path = 'tss/v2/searches/{searchId}'.sub('{' + 'searchId' + '}', search_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # 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 => 'TssV2TransactionsPost201Response')
  if @api_client.config.debugging
            begin
            raise
                    @api_client.config.logger.debug "API called: SearchTransactionsApi#get_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
            rescue
                    puts 'Cannot write to log'
            end
      end
  return data, status_code, headers
end