示例#1
0
        public void ListOrderByCreatedAt()
        {
            Payment.Order orderAsc  = Payment.createOrder().ByCreatedAt().Asc();
            Payment.Order orderDesc = Payment.createOrder().ByCreatedAt().Desc();

            List <Payment> paymentsAsc  = _paymill.PaymentService.ListAsync(null, orderAsc).Result.Data;
            List <Payment> paymentsDesc = _paymill.PaymentService.ListAsync(null, orderDesc).Result.Data;

            Assert.IsNotNull(paymentsAsc);
            Assert.IsNotNull(paymentsDesc);
            Assert.IsFalse(paymentsAsc.Count == 0);
            Assert.IsFalse(paymentsDesc.Count == 0);
            Assert.IsNotNull(paymentsAsc[0].Id);
            Assert.AreNotEqual(paymentsAsc[0].Id, paymentsDesc[0].Id);
        }
示例#2
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 <Payment> > ListAsync(Payment.Filter filter, Payment.Order order, int?count, int?offset)
 {
     return(await base.listAsync(filter, order, count, offset));
 }
示例#3
0
 /// <summary>
 /// 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 <Payment> > ListAsync(Payment.Filter filter, Payment.Order order)
 {
     return(await base.listAsync(filter, order, null, null));
 }