예제 #1
0
        public PosDeviceResponse GetPOSDevice(PosDeviceRequest posDeviceRequest)
        {
            Task <PosDeviceResponse> task = Task.Run(() => this.GetPOSDeviceAsync(posDeviceRequest));

            task.Wait();

            return(task.Result);
        }
예제 #2
0
        /// <summary>
        /// Returns PosDeviceResponse for the PartnerService Request...
        /// </summary>
        /// <param name="posDeviceRequest">posDeviceRequest</param>
        /// <returns>PosDeviceResponse</returns>
        public async Task <PosDeviceResponse> GetPOSDeviceAsync(PosDeviceRequest posDeviceRequest)
        {
            posDeviceRequest.ThrowIfNull(nameof(posDeviceRequest));

            var posDeviceResponse = await PartnerServiceProxyFactory.UseService(service => service.getPOSDeviceAsync(posDeviceRequest.ToPOSDeviceRequest1Service()));

            return(posDeviceResponse.getPOSDeviceResponse.ToDomain());
        }
예제 #3
0
        public ApiResponse <PosResponse, ApiData> GetPosListForLocation(decimal locationId)
        {
            var req                = new PosDeviceRequest();
            var header             = new MoneyGram.PartnerService.DomainModel.Header();
            var processInstruction = new MoneyGram.PartnerService.DomainModel.ProcessingInstruction();

            req.header = header;
            req.header.ProcessingInstruction = processInstruction;

            req.header.ProcessingInstruction.Action = "GetPOSDevice";
            req.AgentId = locationId;
            // Partner Service will allow now to pass NULL for PoeCode
            // If NULL is passed, Partner Service will return the list of all POS types that are active
            //req.PoeCode = poeCode;

            var posDeviceResp   = _partnerIntegration.GetPOSById(req);
            var posDeviceRespVm = posDeviceResp.ToVm();

            return(new ApiResponse <PosResponse, ApiData>
            {
                ResponseData = posDeviceRespVm,
                BusinessMetadata = MapperHelper.SetResponseProperties(null, DataSource.PartnerService)
            });
        }
예제 #4
0
 public Task <PosDeviceResponse> GetPOSDeviceAsync(PosDeviceRequest posDeviceRequest)
 {
     return(_partnerService.GetPOSDeviceAsync(posDeviceRequest));
 }
예제 #5
0
 public virtual PosDeviceResponse GetPOSDevice(PosDeviceRequest posDeviceRequest)
 {
     return(_partnerService.GetPOSDevice(posDeviceRequest));
 }
예제 #6
0
 public PosDeviceResponse GetPOSById(PosDeviceRequest posDeviceRequest)
 {
     return(_partnerServiceRepository.GetPOSDevice(posDeviceRequest));
 }