public void ListOrderByCreatedAt()
        {
            Transaction.Order orderDesc = Transaction.CreateOrder().ByCreatedAt().Desc();
            Transaction.Order orderAsc = Transaction.CreateOrder().ByCreatedAt().Asc();

            List<Transaction> transactionsDesc = _paymill.TransactionService.ListAsync(null, orderDesc).Result.Data;
            List<Transaction> transactionsAsc = _paymill.TransactionService.ListAsync(null, orderAsc).Result.Data;
            if (transactionsDesc.Count > 1
                && transactionsAsc.Count > 1)
            {
                Assert.AreNotEqual(transactionsDesc[0].Id, transactionsAsc[0].Id);
            }
        }
        public void GetTransactionsById()
        {
            Transaction.Order orderDesc = Transaction.CreateOrder().ByCreatedAt().Desc();
            Transaction.Order orderAsc = Transaction.CreateOrder().ByCreatedAt().Asc();

            List<Transaction> transactionsDesc = _paymill.TransactionService.ListAsync(null, orderDesc).Result.Data;
            List<Transaction> transactionsAsc = _paymill.TransactionService.ListAsync(null, orderAsc).Result.Data;
            if (transactionsDesc.Count > 1
                && transactionsAsc.Count > 1)
            {
                foreach (var tran in transactionsDesc)
                {
                   var getTr = _paymill.TransactionService.GetAsync(tran.Id).Result;
                }
             }
        }
Exemple #3
0
 /// <summary>
 /// This function returns a <see cref="PaymillList"/> of PAYMILL objects. In which order this list is returned depends on the
 /// optional parameters. If null is given, no filter or order will be applied, overriding the default count and
 /// offset.
 /// </summary>
 /// <param name="filter">Filter or null</param>
 /// <param name="order">Order or null.</param>
 /// <param name="count">Max count of returned objects in the PaymillList</param>
 /// <param name="offset">The offset to start from.</param>
 /// <returns>PaymillList which contains a List of PAYMILL objects and their total count.</returns>
 public async Task <PaymillWrapper.Models.PaymillList <Transaction> > ListAsync(Transaction.Filter filter, Transaction.Order order, int?count, int?offset)
 {
     return(await base.listAsync(filter, order, count, offset));
 }
Exemple #4
0
 /// This function returns a <see cref="PaymillList"/>of PAYMILL Client objects. In which order this list is returned depends on the
 /// </summary>
 /// <param name="filter">Filter or null</param>
 /// <param name="order">Order or null.</param>
 /// <returns>PaymillList which contains a List of PAYMILL Client object and their total count.</returns>
 public async Task <PaymillWrapper.Models.PaymillList <Transaction> > ListAsync(Transaction.Filter filter, Transaction.Order order)
 {
     return(await base.listAsync(filter, order, null, null));
 }