Ejemplo n.º 1
0
        /// <summary>
        /// Returns BPTransactionDetailLookupResponse for the BPTransactionDetailLookupRequest Request...
        /// </summary>
        /// <param name="isInTrainingMode">If is true Training mode is enabled</param>
        /// <param name="bpTransactionDetailLookupRequest">BPTransactionDetailLookupRequest Request</param>
        /// <param name="strPosIdList">Filtered list of POS Ids</param>
        /// <returns>Task<BPTransactionDetailLookupResponse></returns>
        public async Task <DOMAIN.Response.BPTransactionDetailLookupResponse> BPTransactionDetailLookupAsync(bool isInTrainingMode, DOMAIN.Request.BPTransactionDetailLookupRequest bpTransactionDetailLookupRequest, IList <string> strPosIdList)
        {
            bpTransactionDetailLookupRequest.ThrowIfNull(nameof(bpTransactionDetailLookupRequest));

            var bpTransactionDetailLookupResponse = await _proxyFactory.UseService(service => service.BPTransactionDetailLookupAsync(bpTransactionDetailLookupRequest.ToService()));

            var transactions = bpTransactionDetailLookupResponse.bpTransactionDetailLookupResponse.ToDomain();

            transactions.GetDailyTransactionDetailLookupResultList = transactions.GetDailyTransactionDetailLookupResultList
                                                                     .Where(x => strPosIdList.Contains(x.PosId)).ToList();

            return(bpTransactionDetailLookupResponse.bpTransactionDetailLookupResponse.ToDomain());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns BPTransactionDetailLookupResponse for the BPTransactionDetailLookupRequest Request...
        /// </summary>
        /// <param name="isInTrainingMode">If is true Training mode is enabled</param>
        /// <param name="bpTransactionDetailLookupRequest">BPTransactionDetailLookupRequest Request</param>
        /// <param name="strPosIdList">Filtered list of POS Ids</param>
        /// <returns>BPTransactionDetailLookupResponse</returns>
        public DOMAIN.Response.BPTransactionDetailLookupResponse BPTransactionDetailLookup(bool isInTrainingMode, DOMAIN.Request.BPTransactionDetailLookupRequest bpTransactionDetailLookupRequest, IList <string> strPosIdList)
        {
            Task <DOMAIN.Response.BPTransactionDetailLookupResponse> callTask = Task.Run(() => this.BPTransactionDetailLookupAsync(isInTrainingMode, bpTransactionDetailLookupRequest, strPosIdList));

            callTask.Wait();

            return(callTask.Result);
        }