Example #1
0
        public async Task <ReceiptInfo> GetReceiptInfoAsync(ReceiptMainInfo data)
        {
            if (data == null)
            {
                throw new ArgumentNullException(nameof(data));
            }

            bool receiptExists = await _fnsService.ReceiptExistsAsync(data);

            if (!receiptExists)
            {
                return(null);
            }

            var settings   = _cashlogSettingsService.ReadSettings();
            var detailInfo = await _fnsService.GetReceiptAsync(data, settings.FnsPhone, settings.FnsPassword);

            return(detailInfo?.ToCore(data));
        }