lib/velopayments/api/payors_api.rb
# Create API Key
# Create an an API key for the given payor Id and application Id
# @param payor_id [String] The Payor Id
# @param application_id [String] Application ID
# @param payor_create_api_key_request [PayorCreateApiKeyRequest] Details of application API key to create
# @param [Hash] opts the optional parameters
# @return [Array<(PayorCreateApiKeyResponse, Integer, Hash)>] PayorCreateApiKeyResponse data, response status code and response headers
Create API Key
Create an an API key for the given payor Id and application Id
Create API Key Create an an API key for the given payor Id and application Id
def payor_create_api_key_request_with_http_info(payor_id, application_id, payor_create_api_key_request, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: PayorsApi.payor_create_api_key_request ...'
      end
      if @api_client.config.client_side_validation && payor_id.nil?
        fail ArgumentError, "Missing the required parameter 'payor_id' when calling PayorsApi.payor_create_api_key_request"
      end
      if @api_client.config.client_side_validation && application_id.nil?
        fail ArgumentError, "Missing the required parameter 'application_id' when calling PayorsApi.payor_create_api_key_request"
      end
      if @api_client.config.client_side_validation && payor_create_api_key_request.nil?
        fail ArgumentError, "Missing the required parameter 'payor_create_api_key_request' when calling PayorsApi.payor_create_api_key_request"
      end
      local_var_path = '/v1/payors/{payorId}/applications/{applicationId}/keys'.sub('{' + 'payorId' + '}', CGI.escape(payor_id.to_s)).sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(payor_create_api_key_request)
      return_type = opts[:debug_return_type] || 'PayorCreateApiKeyResponse'
      auth_names = opts[:debug_auth_names] || ['OAuth2']
      new_options = opts.merge(
        :operation => :"PayorsApi.payor_create_api_key_request",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: PayorsApi#payor_create_api_key_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def payor_create_api_key_request_with_http_info ( payor_id , application_id , payor_create_api_key_request , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: PayorsApi.payor_create_api_key_request ...' end if @api_client . config . client_side_validation && payor_id . nil? fail ArgumentError , "Missing the required parameter 'payor_id' when calling PayorsApi.payor_create_api_key_request" end if @api_client . config . client_side_validation && application_id . nil? fail ArgumentError , "Missing the required parameter 'application_id' when calling PayorsApi.payor_create_api_key_request" end if @api_client . config . client_side_validation && payor_create_api_key_request . nil? fail ArgumentError , "Missing the required parameter 'payor_create_api_key_request' when calling PayorsApi.payor_create_api_key_request" end local_var_path = '/v1/payors/{payorId}/applications/{applicationId}/keys' . sub ( '{' + 'payorId' + '}' , CGI . escape ( payor_id . to_s ) ) . sub ( '{' + 'applicationId' + '}' , CGI . escape ( application_id . to_s ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( payor_create_api_key_request ) return_type = opts [ :debug_return_type ] || 'PayorCreateApiKeyResponse' auth_names = opts [ :debug_auth_names ] || [ 'OAuth2' ] new_options = opts . merge ( :operation => :" PayorsApi.payor_create_api_key_request " , :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: PayorsApi#payor_create_api_key_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Create API Key
Create an an API key for the given payor Id and application Id
Create API Key Create an an API key for the given payor Id and application Id
# verify the required parameter 'payor_id' is set # verify the required parameter 'application_id' is set # verify the required parameter 'payor_create_api_key_request' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
PayorCreateApiKeyResponse data, response status code and response headers
PayorCreateApiKeyResponse data response status code and response headers
Array<(PayorCreateApiKeyResponse, Integer, Hash)>
payor_id
The Payor Id
The Payor Id
application_id
None
payor_create_api_key_request
Details of application API key to create
Details of application API key to create
opts
<not_specific>
<not_specific>
opts the optional parameters
opts the optional parameters