Exemplo n.º 1
0
 public IList <APIMasterResponseDetails> GetRoleType(APICredenrials objAPICredenrials)
 {
     try
     {
         objDecisionPointEngine   = new DecisionPointEngine();
         objMasterResponseDetails = new List <APIMasterResponseDetails>();
         objAPIMasterResponse     = objDecisionPointEngine.ValidateAPIUser(objAPICredenrials.ApiUserName, objAPICredenrials.ApiPassword);
         if (objAPIMasterResponse.ResultCode != 216 && objAPIMasterResponse.ResultCode != 217)
         {
             objMasterResponseDetails = objDecisionPointEngine.GetRoleType().Select(x => new APIMasterResponseDetails {
                 Name = x.Name, Id = x.Id
             }).ToList();
         }
         else
         {
             objAPIMasterResponseDetails = new APIMasterResponseDetails()
             {
                 ResultId   = objAPIMasterResponse.ResultId,
                 ResultCode = objAPIMasterResponse.ResultCode
             };
             objMasterResponseDetails.Add(objAPIMasterResponseDetails);
         }
         return(objMasterResponseDetails);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }