public void testCardPoolList()
        {
            CardPoolListRequest request = new CardPoolListRequest();
            SimbossResponse <List <CardPoolModel> > response = client.Excute <List <CardPoolModel> >(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 2
0
        public void testUserDashboardGet()
        {
            UserDashboardGetRequest          request  = new UserDashboardGetRequest();
            SimbossResponse <DashboardModel> response = TestAccountInfo.client.Excute <DashboardModel>(request);

            log.WriteLine(response.ToString());
            log.WriteLine(response.Data.company);
        }
Exemplo n.º 3
0
        public void testDeviceGprsStatus()
        {
            DeviceGprsStatusRequest request = new DeviceGprsStatusRequest();

            request.Iccid = "89860401101730528432";
            SimbossResponse <DeviceGprsStatusModel> response = client.Excute <DeviceGprsStatusModel>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 4
0
        public void testDeviceRechargeRecords()
        {
            DeviceRechargeRecordsRequest request = new DeviceRechargeRecordsRequest();

            request.Iccid = "8986031746205137487";
            SimbossResponse <List <RechargeRecordsModel> > response = client.Excute <List <RechargeRecordsModel> >(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 5
0
        public void testDeviceRateplans()
        {
            DeviceRateplansRequest request = new DeviceRateplansRequest();

            request.Iccid = "89860401101730528432";
            SimbossResponse <List <RatePlansModel> > response = client.Excute <List <RatePlansModel> >(request);

            log.WriteLine(response.ToString());
        }
        public void testCardPoolDetail()
        {
            CardPoolDetailRequest request = new CardPoolDetailRequest();

            request.Iccid = "8986031740205777419";
            SimbossResponse <CardPoolModel> response = client.Excute <CardPoolModel>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 7
0
        public void testDeviceCancelTesting()
        {
            DeviceCancelTestingRequest request = new DeviceCancelTestingRequest();

            request.Iccid = "89860401101730528432";
            SimbossResponse <String> response = client.Excute <String>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 8
0
        public void testDeviceRatePlanSummary()
        {
            DeviceRatePlanSummaryRequest request = new DeviceRatePlanSummaryRequest();

            request.Iccid = "8986031746205137487";
            SimbossResponse <RatePlanSummaryModel> response = client.Excute <RatePlanSummaryModel>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 9
0
        public void testDeviceRecharge()
        {
            DeviceRechargeRequest request = new DeviceRechargeRequest();

            request.Iccid      = "8986031746205137487";
            request.RatePlanId = 500;
            SimbossResponse <String> response = client.Excute <String>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 10
0
        public void testDeviceDetailBatch()
        {
            DeviceDetailBatchRequest request = new DeviceDetailBatchRequest();

            request.AddIccid("89860401101730528432");
            request.AddIccid("8986031740205777418");
            SimbossResponse <List <DeviceDetailModel> > response = client.Excute <List <DeviceDetailModel> >(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 11
0
        public void testDeviceMemoUpdate()
        {
            DeviceMemoUpdateRequest request = new DeviceMemoUpdateRequest();

            request.Iccid = "89860401101730528432";
            request.Memo  = "C#单个备注";
            SimbossResponse <String> response = client.Excute <String>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 12
0
        public void testDeviceDailyUsage()
        {
            DeviceDailyUsageRequest request = new DeviceDailyUsageRequest();

            request.Iccid = "8986031746205137487";
            request.Date  = DateTime.Now.AddDays(-1);
            SimbossResponse <DailyUsageModel> response = client.Excute <DailyUsageModel>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 13
0
        public void testDeviceModifyDeviceStatus()
        {
            DeviceModifyDeviceStatusRequest request = new DeviceModifyDeviceStatusRequest();

            request.Iccid  = "89860401101730528432";
            request.Status = CardStatusConstant.CarrierStatusEnum.ActivatedName;
            SimbossResponse <String> response = client.Excute <String>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 14
0
        public void testSmsList()
        {
            SmsListRequest request = new SmsListRequest();

            request.Iccid  = "89860401101730528433";
            request.PageNo = 1;
            SimbossResponse <SmsListModel> response = client.Excute <SmsListModel>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 15
0
        public void testSmsSend()
        {
            SmsSendRequest request = new SmsSendRequest();

            request.Iccid = "89860401101730528433";
            request.Text  = "C#发送短信";
            SimbossResponse <String> response = client.Excute <String>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 16
0
        public void testDeviceMemoBatchUpdate()
        {
            DeviceMemoBatchUpdateRequest request = new DeviceMemoBatchUpdateRequest();

            request.AddIccid("89860401101730528432");
            request.AddIccid("8986031740205777418");
            request.Memo = "C#批量配置";
            SimbossResponse <String> response = client.Excute <String>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 17
0
        public void testRealnameSubmitRealname()
        {
            RealnameSubmitRealnameRequest request = new RealnameSubmitRealnameRequest();

            request.Iccid           = "89860401101730528432";
            request.Name            = "张三-C#";
            request.LicenseType     = Constant.LicenseTypeEnum.Idcard;
            request.LicenseCode     = "49900023923";
            request.Phone           = "13655445565";
            request.ExtenalUserName = "******";
            request.SetPic1(new FileStream("/Users/Abel/logo.jpg", FileMode.Open));
            request.SetPic2(new FileStream("/Users/Abel/logo.jpg", FileMode.Open));
            SimbossResponse <String> response = client.Excute <String>(request);

            log.WriteLine(response.ToString());
        }
Exemplo n.º 18
0
        public SimbossResponse <T> Excute <T>(SimbossRequest request)
        {
            SimbossResponse <T> response;
            String result = null;

            try
            {
                String url = this.config.ApiUrl + request.GetUri();
                SortedDictionary <String, String> paramDic = GetRequestParam(request);
                Task <String> task = Post(url, paramDic);
                result   = task.Result;
                response = JsonConvert.DeserializeObject <SimbossResponse <T> >(result);
            }
            catch (System.Exception e)
            {
                response         = new SimbossResponse <T>();
                response.Success = false;
                response.Message = e.Message + ", result: " + result;
                response.Code    = "599";
            }
            return(response);
        }