Ejemplo n.º 1
0
 @GET
 @Path("masspayment")
 @Transactional
 @Produces("application/xml")
 public String massPayment(
     @QueryParam("from") @DefaultValue("0") Long from, @QueryParam("to") Long to) {
   DataFilter<Debts.PaymentOrdering> filter = DataFilter.newInstance();
   filter
       .setFrom(from)
       .setTo(to)
       .setOrdering(Debts.PaymentOrdering.AMOUNT)
       .setDirection(OrderingDirection.DESC);
   return massPaymentXml(debts.payments(Debts.PayMethod.AUTO, filter));
 }
Ejemplo n.º 2
0
 @GET
 @Path("payments")
 @Transactional
 @Produces("application/xml")
 public String payments(
     @QueryParam("pay_method") Debts.PayMethod payMethod,
     @QueryParam("from") @DefaultValue("0") Long from,
     @QueryParam("to") Long to,
     @QueryParam("offset") int offset,
     @QueryParam("limit") @DefaultValue("20") int limit,
     @QueryParam("ordering") @DefaultValue("AMOUNT") Debts.PaymentOrdering ordering,
     @QueryParam("direction") @DefaultValue("DESC") OrderingDirection direction) {
   DataFilter<Debts.PaymentOrdering> filter = DataFilter.newInstance();
   filter
       .setFrom(from)
       .setTo(to)
       .setOffset(offset)
       .setLimit(limit)
       .setOrdering(ordering)
       .setDirection(direction);
   return paymentsXml(debts.payments(payMethod, filter));
 }