public OutPutResult CreateCredentialType(CredentialTypeMsgEntity credentialTypeMsgEntity) { CredentialTypeRequestAPI credentialTypeRequestAPI = credentialTypeBusinessServiceMapper.MapCredentialTypeRequestAPI(credentialTypeMsgEntity); CredentialTypeRequestIPost credentialTypeRequestIPost = credentialTypeBusinessServiceMapper.MapCredentialTypeRequestIPost(credentialTypeMsgEntity, credentialTypeRequestAPI); RestResponse restResponse = katavuccolClient.Post(credentialTypeRequestIPost); CredentialTypeResponseAPI credentialTypeResponseAPI = JsonConvert.DeserializeObject <CredentialTypeResponseAPI>(restResponse.ResponseContent); OutPutResult outPutResult = new OutPutResult(); if (credentialTypeResponseAPI == null) { outPutResult.ResultStatus = ResultStatus.Fail; outPutResult.ResultMessage = new List <ResultMessage> { new ResultMessage() { ErrorCode = katavuccolPortalWebErrorCode.InternalError } }; return(outPutResult); } if (credentialTypeResponseAPI.resultMessages.AnyWithNullCheck()) { outPutResult.ResultStatus = ResultStatus.Fail; outPutResult.ResultMessage = credentialTypeResponseAPI.resultMessages.ToResultMsgEntity(); return(outPutResult); } outPutResult.Key = credentialTypeResponseAPI.id; return(outPutResult); }
public CredentialTypeRequestIPost MapCredentialTypeRequestIPost(CredentialTypeMsgEntity credentialTypeMsgEntity, CredentialTypeRequestAPI credentialTypeRequestAPI) { CredentialTypeRequestIPost credentialTypeRequestIPost = new CredentialTypeRequestIPost { Request = credentialTypeRequestAPI, Endpoint = EndPoints.KatavuccolAPIUrl.ToString(), UserId = credentialTypeMsgEntity.UserId }; return(credentialTypeRequestIPost); }
public CredentialTypeRequestIPost MapCredentialTypeRequestIPost(CredentialTypeRequestAPI credentialTypeRequestAPI) { CredentialTypeRequestIPost credentialTypeRequestIPost = new CredentialTypeRequestIPost(); return(credentialTypeRequestIPost); }