コード例 #1
0
        public async Task <AdvanceReceiptsResult> GetAdvanceReceipts([FromBody] long originalReceiptId, CancellationToken token)
        {
            var originalReceipt = await receiptProcessor.GetReceiptAsync(originalReceiptId);

            var advanceReceipts = (await advanceReceivedProcessor.GetAdvanceReceiptsAsync(originalReceiptId)).ToList();

            return(new AdvanceReceiptsResult
            {
                ProcessResult = new ProcessResult {
                    Result = true
                },
                OriginalReceipt = originalReceipt,
                AdvanceReceipts = advanceReceipts,
            });
        }
コード例 #2
0
ファイル: ReceiptService.svc.cs プロジェクト: fwka1605/next
        public async Task <AdvanceReceiptsResult> GetAdvanceReceiptsAsync(string SessionKey, long originalReceiptId)
        {
            return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
            {
                var originalReceipt = await receiptProcessor.GetReceiptAsync(originalReceiptId, token);
                var advanceReceipts = (await advanceReceivedProcessor.GetAdvanceReceiptsAsync(originalReceiptId, token)).ToList();

                return new AdvanceReceiptsResult
                {
                    ProcessResult = new ProcessResult {
                        Result = true
                    },
                    OriginalReceipt = originalReceipt,
                    AdvanceReceipts = advanceReceipts,
                };
            }, logger));
        }