Пример #1
0
        public TokenExpireCheckResult GetTokenExpireDate(string token)
        {
            TokenExpireCheckResult result = new TokenExpireCheckResult();
            try
            {
                List<Dictionary<string, string>> dic = new List<Dictionary<string, string>>();
                var req = new GetTokenStatusRequest
                {
                    EbayTokenID = token
                };

                var res = new ItemService(UrlConst.Instance.CBT_GEPAPI_URL + "api/Outbound_ItemService").GetTokenStatus(req);
                foreach (var data in res.Response)
                {
                    if (data.Key == "ExpirationTime")
                    {
                        result.Date = DateTime.Parse(data.Value);
                    }
                    result.Result = true;
                }
            }
            catch (Exception ex)
            {
                result.Result = false;
            }

            return result;
        }
Пример #2
0
 public GetTokenStatusResponse GetTokenStatus(GetTokenStatusRequest Request)
 {
     return GetClient().GetTokenStatus(Request);
 }
Пример #3
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 1:
       if (field.Type == TType.Struct) {
     Request = new GetTokenStatusRequest();
     Request.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Пример #4
0
 public void send_GetTokenStatus(GetTokenStatusRequest Request)
 {
     oprot_.WriteMessageBegin(new TMessage("GetTokenStatus", TMessageType.Call, seqid_));
     GetTokenStatus_args args = new GetTokenStatus_args();
     args.Request = Request;
     args.Write(oprot_);
     oprot_.WriteMessageEnd();
     oprot_.Transport.Flush();
 }
Пример #5
0
 public GetTokenStatusResponse GetTokenStatus(GetTokenStatusRequest Request)
 {
     send_GetTokenStatus(Request);
     return recv_GetTokenStatus();
 }