Exemplo n.º 1
0
        static Transaction GetTransactionFromExternalId(Configuration configuration)
        {
            // Please see https://docs.transferzero.com/docs/transaction-flow/#external-id
            // for more details on external IDs

            TransactionsApi transactionsApi = new TransactionsApi(configuration);
            String          externalId      = "TRANSACTION-00001";

            TransactionListResponse transactionListResponse = transactionsApi.GetTransactions(externalId: externalId);

            if (transactionListResponse.Object.Count > 0)
            {
                System.Console.WriteLine("Transaction found");
                Transaction result = transactionListResponse.Object[0];
                System.Console.WriteLine(result);
                return(result);
            }
            else
            {
                System.Console.WriteLine("Transaction not found");
                return(null);
            }
        }