public async Task <Tuple <List <Models.Response>, Response> > GetCustomerEnquiryByAccountNumber(CustomerEnquiryRequest request)
        {
            List <AccountEnquiryResponse> br = new List <AccountEnquiryResponse>();
            Response res = new Response();
            string   reqString; string respMsg = string.Empty; string resultContent = string.Empty;
            int      respCode = 0;

            try
            {
                using (var client = new HttpClient())
                {
                    reqString = JsonHelper.toJson(request);
                    var content = new StringContent(reqString, Encoding.UTF8, Constant.CONTENTTYPE);
                    var result  = await client.PostAsync(_settings.baseURL + _settings.ceURL, content);

                    respCode      = (int)result.StatusCode;
                    respMsg       = result.ReasonPhrase;
                    resultContent = await result.Content.ReadAsStringAsync();
                };
            }
            catch (Exception ex)
            {
                respCode = (int)HttpStatusCode.InternalServerError;
                res      = new Response()
                {
                    message = ex.Message,
                    status  = false
                };

                _logger.LogInformation($"{request.customerNumber} : {ex.ToString()}");
            }

            res.message = respMsg;
            res.status  = respCode == (int)HttpStatusCode.Created || respCode == (int)HttpStatusCode.OK;

            if (!string.IsNullOrEmpty(resultContent))
            {
                if (!res.status)
                {
                    res = JsonHelper.fromJson <Response>(resultContent);
                }
                else
                {
                    br = JsonHelper.fromJson <List <AccountEnquiryResponse> >(resultContent);
                }
            }
            else
            {
                res = new Response()
                {
                    message = Constant.UKNOWN_MSG,
                    status  = false
                };
            }

            return(new Tuple <List <Models.Response>, Response>(GetAccountEnquiryResponse(br), res));
        }
        public async Task <List <AccountEnquiryResponse> > GetAccountEnquiryByCustomerNumber(CustomerEnquiryRequest request)
        {
            List <AccountEnquiryResponse> ar = new List <AccountEnquiryResponse>();

            var oralConnect = new OracleConnection(_protector.Unprotect(_appSettings.FlexConnection));

            using (oralConnect)
            {
                string query = $@"SELECT LPAD(A.BRANCH_CODE,3,0) COD_CC_BRN, A.CUST_AC_NO COD_ACCT_NO, A.AC_DESC COD_ACCT_TITLE,
                                  DECODE(C.ACCOUNT_CLASS,'222','S',C.ac_class_type) ACCOUNT_TYPE,
                                  A.CCY NAM_CCY_SHORT, A.AC_OPEN_DATE DAT_ACCT_OPEN, A.CUST_NO COD_CUST,A.AC_STAT_NO_DR, A.AC_STAT_NO_CR,
                                  A.AC_STAT_BLOCK, A.AC_STAT_STOP_PAY, A.AC_STAT_DORMANT, A.AC_STAT_FROZEN, A.ACCOUNT_CLASS COD_PROD,
                                  A.AC_STAT_DE_POST,C.description ACCOUNTDESC, BR.branch_name BRANCH,A.RECORD_STAT,
                                  A.ACY_AVL_BAL BAL_AVAILABLE, Y.DATE_OF_BIRTH,NVL(Y.TELEPHONE, Y.FAX) CUSTOMER_PHONENUMBER,DECODE(B.CUSTOMER_TYPE,'C','CORPORATE','I','INDIVIDUAL') CUSTOMER_CATEGORY
                                  FROM {_appSettings.FlexSchema}.STTM_CUST_ACCOUNT A
                                  INNER JOIN {_appSettings.FlexSchema}.STTM_CUSTOMER B ON B.CUSTOMER_NO = A.CUST_NO
                                  LEFT OUTER JOIN {_appSettings.FlexSchema}.STTM_CUST_PERSONAL Y ON Y.CUSTOMER_NO = A.CUST_NO
                                  LEFT OUTER JOIN {_appSettings.FlexSchema}.MITB_CLASS_MAPPING D ON D.UNIT_REF_NO = A.CUST_AC_NO 
                                  LEFT OUTER JOIN {_appSettings.FlexSchema}.STTM_CUST_CORPORATE Z ON Z.CUSTOMER_NO=A.CUST_NO
                                  LEFT OUTER JOIN {_appSettings.FlexSchema}.STTM_ACCOUNT_CLASS C ON C.account_class = A.account_class 
                                  LEFT OUTER JOIN {_appSettings.FlexSchema}.STTM_BRANCH BR ON BR.branch_code = A.branch_code
                                  WHERE B.CUSTOMER_NO in (:customerNumber) ";

                var ars = await oralConnect.QueryAsync <AccountEnquiryResponse>(query, new { request.customerNumber });

                ar = ars.ToList();
            }
            return(ar);
        }