Ejemplo n.º 1
0
 public APIMasterResponseDetails SendInvitation(UserRequestDetails objUserRequestDetails)
 {
     try
     {
         objDecisionPointEngine = new DecisionPointEngine();
         objAPIMasterResponse   = new APIMasterResponse();
         objAPIMasterResponse   = objDecisionPointEngine.ValidateAPIUser(objUserRequestDetails.ApiUserName, objUserRequestDetails.ApiPassword);
         if (objAPIMasterResponse.ResultCode != 216 && objAPIMasterResponse.ResultCode != 217)
         {
             objAPILogRequest = new APILogRequest()
             {
                 APIUserName = objUserRequestDetails.ApiUserName,
                 APIPassword = objUserRequestDetails.ApiPassword,
                 RefrenceId  = objUserRequestDetails.ReferenceId,
                 RequestData = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.RequestUri.OriginalString,
             };
             objAPIMasterResponse = objDecisionPointEngine.InsertAPILog(objAPILogRequest);
             if (objAPIMasterResponse.ResultCode != 218)
             {
                 DSTInviteRequest objDSTInviteRequest = new DSTInviteRequest()
                 {
                     FirstName     = objUserRequestDetails.FirstName,
                     LastName      = objUserRequestDetails.LastName,
                     EmailId       = objUserRequestDetails.EmailId,
                     RoleTypeId    = objUserRequestDetails.RoleTypeId,
                     ClientId      = objUserRequestDetails.ClientId,
                     SubClientId   = objUserRequestDetails.SubClientId,
                     PackageId     = objUserRequestDetails.PackageId,
                     ProductId     = objUserRequestDetails.ProductId,
                     PaymentTypeId = objUserRequestDetails.PaymentTypeId,
                     ICTypeId      = objUserRequestDetails.ICTypeId,
                     BusinessName  = objUserRequestDetails.BusinessName,
                     RoleType      = objUserRequestDetails.RoleType,
                 };
                 objAPIMasterResponse = objDecisionPointEngine.SendInvitationByDST(objDSTInviteRequest);
             }
         }
         if (!object.Equals(objAPIMasterResponse, null))
         {
             objAPIMasterResponseDetails = new APIMasterResponseDetails()
             {
                 ResultId   = objAPIMasterResponse.ResultId,
                 ResultCode = objAPIMasterResponse.ResultCode
             };
         }
         return(objAPIMasterResponseDetails);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
 public APIMasterResponseDetails AddUpdateSubClient(UserRequestDetails objUserRequestDetails)
 {
     try
     {
         objDecisionPointEngine = new DecisionPointEngine();
         objAPIMasterResponse   = new APIMasterResponse();
         objAPIMasterResponse   = objDecisionPointEngine.ValidateAPIUser(objUserRequestDetails.ApiUserName, objUserRequestDetails.ApiPassword);
         if (objAPIMasterResponse.ResultCode != 216 && objAPIMasterResponse.ResultCode != 217)
         {
             objAPILogRequest = new APILogRequest()
             {
                 APIUserName = objUserRequestDetails.ApiUserName,
                 APIPassword = objUserRequestDetails.ApiPassword,
                 RefrenceId  = objUserRequestDetails.ReferenceId,
                 RequestData = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.RequestUri.OriginalString,
             };
             objAPIMasterResponse = objDecisionPointEngine.InsertAPILog(objAPILogRequest);
             if (objAPIMasterResponse.ResultCode != 218)
             {
                 DSTInviteRequest objDSTInviteRequest = new DSTInviteRequest()
                 {
                     SubClientId  = objUserRequestDetails.SubClientId,
                     ClientId     = objUserRequestDetails.ClientId,
                     BusinessName = objUserRequestDetails.BusinessName
                 };
                 objAPIMasterResponse = objDecisionPointEngine.AddUpdateSubClient(objDSTInviteRequest);
             }
         }
         if (!object.Equals(objAPIMasterResponse, null))
         {
             objAPIMasterResponseDetails = new APIMasterResponseDetails()
             {
                 ResultId   = objAPIMasterResponse.ResultId,
                 ResultCode = objAPIMasterResponse.ResultCode
             };
         }
         return(objAPIMasterResponseDetails);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }