示例#1
0
 public PaymentRecord CreatePayment(PaymentRecord payment)
 {
     return(Execute(session =>
     {
         var svc = new MoneySourceService();
         return svc.CreatePayment(payment, null, null);
     }));
 }
示例#2
0
 public MoneySource GetById(string id)
 {
     return(Execute(session =>
     {
         var svc = new MoneySourceService();
         return svc.GetById(id);
     }));
 }
示例#3
0
 public List <MoneySource> GetAll()
 {
     return(Execute(session =>
     {
         var svc = new MoneySourceService();
         return svc.GetAll(session.User);
     }));
 }
示例#4
0
 public ObjectPermissions GetObjectPermissions(string moneySourceId)
 {
     return(Execute(session =>
     {
         var svc = new MoneySourceService();
         return svc.GetPermissions(moneySourceId);
     }));
 }
示例#5
0
 public HttpResponseMessage UpdatePayment(PaymentRecord payment)
 {
     return(Execute(session =>
     {
         var svc = new MoneySourceService();
         svc.UpdatePayment(payment, null, null);
         return Request.CreateResponse(HttpStatusCode.OK);
     }));
 }
示例#6
0
 public HttpResponseMessage Update(MoneySource source)
 {
     return(Execute(session =>
     {
         var svc = new MoneySourceService();
         svc.Update(source);
         return Request.CreateResponse(HttpStatusCode.OK);
     }));
 }
示例#7
0
 public HttpResponseMessage SetObjectPermissions(ObjectPermissions permissions)
 {
     return(Execute(session =>
     {
         var svc = new MoneySourceService();
         svc.SetPermission(permissions);
         return Request.CreateResponse(HttpStatusCode.OK);
     }));
 }
示例#8
0
 public HttpResponseMessage DeletePayment(string id)
 {
     return(Execute(session =>
     {
         var svc = new MoneySourceService();
         svc.DeletePayment(id, null, null);
         return Request.CreateResponse(HttpStatusCode.NoContent);
     }));
 }
示例#9
0
        public MoneySource Insert(MoneySource source)
        {
            return(Execute(session =>
            {
                var svc = new MoneySourceService();
                source.Owner = session.User;

                return svc.Insert(source);
            }));
        }