Ejemplo n.º 1
0
        public void ListOfferByAmountDesc()
        {
            Offer newOffer = createOffer();

            Offer.Order order = Offer.CreateOrder().ByCreatedAt().Desc();

            PaymillList <Offer> wrapper = _paymill.OfferService.ListAsync(null, order).Result;
            List <Offer>        offers  = wrapper.Data;

            Assert.IsNotNull(offers);
            Assert.IsFalse(offers.Count == 0);
            Assert.AreEqual(offers[0].Amount, offerAmount);
        }
Ejemplo n.º 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 <Offer> > ListAsync(Offer.Filter filter, Offer.Order order, int?count, int?offset)
 {
     return(await base.listAsync(filter, order, count, offset));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// This function returns a <see cref="PaymillList"/>of PAYMILL Offer 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 object and their total count.</returns>
 public async Task <PaymillWrapper.Models.PaymillList <Offer> > ListAsync(Offer.Filter filter, Offer.Order order)
 {
     return(await base.listAsync(filter, order, null, null));
 }