Esempio n. 1
0
        /// <summary>
        /// Returns MTTransactionDetailLookupResponse for the DailyTransactionDetailLookup Request...
        /// </summary>
        /// <param name="isInTrainingMode">If is true Training mode is enabled</param>
        /// <param name="mtTransactionDetailLookupRequest">MTTransactionDetailLookupRequest Request</param>
        /// <param name="strPosIdList">Filtered list of POS Ids</param>
        /// <returns>MTTransactionDetailLookupResponse</returns>
        public DOMAIN.Response.MTTransactionDetailLookupResponse MTTransactionDetailLookup(bool isInTrainingMode, DOMAIN.Request.MTTransactionDetailLookupRequest mtTransactionDetailLookupRequest, IList <string> strPosIdList)
        {
            Task <DOMAIN.Response.MTTransactionDetailLookupResponse> callTask = Task.Run(() => this.MTTransactionDetailLookupAsync(isInTrainingMode, mtTransactionDetailLookupRequest, strPosIdList));

            callTask.Wait();

            return(callTask.Result);
        }
Esempio n. 2
0
        /// <summary>
        /// Returns MTTransactionDetailLookupResponse for the DailyTransactionDetailLookup Request...
        /// </summary>
        /// <param name="isInTrainingMode">If is true Training mode is enabled</param>
        /// <param name="mtTransactionDetailLookupRequest">MTTransactionDetailLookupRequest Request</param>
        /// <param name="strPosIdList">Filtered list of POS Ids</param>
        /// <returns>MTTransactionDetailLookupResponse</returns>
        public async Task <DOMAIN.Response.MTTransactionDetailLookupResponse> MTTransactionDetailLookupAsync(bool isInTrainingMode, DOMAIN.Request.MTTransactionDetailLookupRequest mtTransactionDetailLookupRequest, IList <string> strPosIdList)
        {
            mtTransactionDetailLookupRequest.ThrowIfNull(nameof(mtTransactionDetailLookupRequest));

            var mtTransactionDetailLookupResponse = await _proxyFactory.UseService(service => service.MTTransactionDetailLookupAsync(mtTransactionDetailLookupRequest.ToService()));

            var transactions = mtTransactionDetailLookupResponse.mtTransactionDetailLookupResponse.ToDomain();

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

            return(transactions);
        }