def payments_id_refunds_post(id, opts = {})
      if Configuration.debugging
        Configuration.logger.debug "Calling API: PaymentsApi#payments_id_refunds_post ..."
      end
      
      # verify the required parameter 'id' is set
      fail "Missing the required parameter 'id' when calling payments_id_refunds_post" if id.nil?
      
      # resource path
      path = "/payments/{id}/refunds".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}

      # HTTP header 'Accept' (if needed)
      _header_accept = ['application/json']
      _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

      # HTTP header 'Content-Type'
      _header_content_type = ['application/x-www-form-urlencoded']
      header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

      # form parameters
      form_params = {}
      form_params["amount"] = opts[:'amount'] if opts[:'amount']

      # http body (model)
      post_body = nil
      

      auth_names = ['khipu']
      result = @api_client.call_api(:POST, path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'SuccessResponse')
      if Configuration.debugging
        Configuration.logger.debug "API called: PaymentsApi#payments_id_refunds_post. Result: #{result.inspect}"
      end
      return result
    end
def payments_id_refunds_post(id, opts = {})
      if Configuration.debugging
        Configuration.logger.debug "Calling API: PaymentsApi#payments_id_refunds_post ..."
      end
      
      # verify the required parameter 'id' is set
      fail "Missing the required parameter 'id' when calling payments_id_refunds_post" if id.nil?
      
      # resource path
      path = "/payments/{id}/refunds".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}

      # HTTP header 'Accept' (if needed)
      _header_accept = ['application/json']
      _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

      # HTTP header 'Content-Type'
      _header_content_type = ['application/x-www-form-urlencoded']
      header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

      # form parameters
      form_params = {}
      form_params["amount"] = opts[:'amount'] if opts[:'amount']

      # http body (model)
      post_body = nil
      

      auth_names = ['khipu']
      result = @api_client.call_api(:POST, path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'SuccessResponse')
      if Configuration.debugging
        Configuration.logger.debug "API called: PaymentsApi#payments_id_refunds_post. Result: #{result.inspect}"
      end
      return result
    end
Reembolsar total o parcialmente un pago
 Reembolsa total o parcialmente el monto de un pago. Esta operación solo se puede realizar en los comercios que recauden en cuenta khipu y antes de la rendición de los fondos correspondientes.
 @param id Identificador del pago
 @param [Hash] opts the optional parameters
 @option opts [Float] :amount El monto a devolver. Sin separador de miles y usando &#39;.&#39; como separador de decimales. Hasta 4 lugares decimales, dependiendo de la moneda. Si se omite el reembolso se hará por el total del monto del pago.
 @return [SuccessResponse]