def cancel(refund)
      unless @is_valid
        return make_response_with_exception(Exceptions::APIKeyInvalidException.new('API key, password or Rapid endpoint missing or invalid'), RefundResponse)
      end
      begin
        url = @web_url + Constants::CANCEL_AUTHORISATION_METHOD

        request = Message::RefundProcess::CancelAuthorisationMsgProcess.create_request(refund)
        response = Message::RefundProcess::CancelAuthorisationMsgProcess.send_request(url, @api_key, @password, @version, request)
        Message::RefundProcess::CancelAuthorisationMsgProcess.make_result(response)
      rescue => e
        @logger.error(e.to_s) if @logger
        make_response_with_exception(e, RefundResponse)
      end
    end
def cancel(refund)
      unless @is_valid
        return make_response_with_exception(Exceptions::APIKeyInvalidException.new('API key, password or Rapid endpoint missing or invalid'), RefundResponse)
      end
      begin
        url = @web_url + Constants::CANCEL_AUTHORISATION_METHOD

        request = Message::RefundProcess::CancelAuthorisationMsgProcess.create_request(refund)
        response = Message::RefundProcess::CancelAuthorisationMsgProcess.send_request(url, @api_key, @password, @version, request)
        Message::RefundProcess::CancelAuthorisationMsgProcess.make_result(response)
      rescue => e
        @logger.error(e.to_s) if @logger
        make_response_with_exception(e, RefundResponse)
      end
    end
Cancel a non-captured transaction (an authorisation)

 @param [Models::Refund] refund contains transaction to cancel
 @return [RefundResponse]