示例#1
0
        public void step_s_03()
        {
            Logger.PrintStepName("Step 3");
            SubscriberService.SubscriberInterface   si          = new SubscriberInterfaceClient();
            SubscriberService.getRequestListRequest getRequests = new getRequestListRequest();
            getRequests.token          = token;
            getRequests.login          = login;
            getRequests.endDate        = endDate;
            getRequests.startDate      = startDate;
            getRequests.page           = page;
            getRequests.hash           = ths.GetHashAPI(login + startDateHash + endDateHash + "0");
            getRequests.recordsPerPage = 20;

            try
            {
                Logger.PrintAction("Получение списка запросов", "");
                SubscriberService.getRequestListResponse requestList = si.getRequestList(getRequests);
                apiRequestPageDO s = requestList.requestList;
                Logger.PrintAction("Список заявок получен", "");
            }
            catch (Exception ex)
            {
                Logger.PrintRezult(false, "Ошибка получения истории запросов: " + ex.Message);
            }
        }
示例#2
0
 public void step_s_06()
 {
     Logger.PrintStepName("Step 6");
     SubscriberService.SubscriberInterface   si          = new SubscriberInterfaceClient();
     SubscriberService.getRequestListRequest getRequests = new getRequestListRequest();
     getRequests.token          = token;
     getRequests.login          = loginx;
     getRequests.endDate        = endDate;
     getRequests.startDate      = startDate;
     getRequests.page           = page;
     getRequests.hash           = ths.GetHashAPI(loginx + startDateHash + endDateHash + requestId);
     getRequests.recordsPerPage = 20;
     getRequests.requestId      = requestId;
     try
     {
         Logger.PrintAction("Получение списка запросов", "");
         SubscriberService.getRequestListResponse requestList = si.getRequestList(getRequests);
         apiRequestPageDO s = requestList.requestList;
         if (s.requests == null)
         {
             Logger.PrintRezult(true, "");
         }
         Logger.PrintAction("Список заявок получен", s.requests[0].requestComments[0]);
     }
     catch (FaultException <UssWsApiException> exception)
     {
         if (exception.Detail.errorCode == 20006 && exception.Detail.errorDescription == "FORBIDDEN (login="******")")
         {
             Logger.PrintRezult(true, exception.Detail.errorCode + exception.Detail.errorDescription);
         }
         else
         {
             Logger.PrintRezult(false, exception.Detail.errorCode + exception.Detail.errorDescription);
         }
     }
     catch (Exception ex)
     {
         Logger.PrintRezult(false, "Ошибка получения истории запросов: " + ex.Message);
     }
 }