Advertisement
afterlife88

Untitled

Mar 28th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.11 KB | None | 0 0
  1. using System;
  2. using System.Web.Http;
  3. using BillingService.Contracts;
  4. using CustomerService.Contracts;
  5. using ReportService.Contracts;
  6.  
  7. namespace Api.Controllers
  8. {
  9.     /// <summary>
  10.     /// Scheduled job controller
  11.     /// </summary>
  12.     public class ScheduledJobController : ApiController
  13.     {
  14.         private readonly IBillingService _billingService;
  15.         private readonly ICustomerService _customerService;
  16.         private IReportService _reportService;
  17.         /// <summary>
  18.         /// Default constructor
  19.         /// </summary>
  20.         /// <param name="reportService"></param>
  21.         /// <param name="customerService"></param>
  22.         /// <param name="billingService"></param>
  23.         public ScheduledJobController(IReportService reportService, ICustomerService customerService, IBillingService billingService)
  24.         {
  25.             _reportService = reportService;
  26.             _customerService = customerService;
  27.             _billingService = billingService;
  28.         }
  29.         [Route("ProccessPayments/{key}")]
  30.         public IHttpActionResult ProccessPayments(string key)
  31.         {
  32.             //var request = new CheckNewPaymentsServiceRequest();
  33.             //var response = _billingService.CheckNewPayments(request);
  34.             //if (response.ServiceStatus == ServiceStatus.ServiceError)
  35.             //  return InternalServerError();
  36.             throw new NotImplementedException();
  37.         }
  38.         [Route("GenerateInvoices/{key}")]
  39.         public IHttpActionResult GenerateInvoices(string key)
  40.         {
  41.             //var request = new GenerateInvoiceServiceRequest() { CompanyId = 1};
  42.             //var responce = _billingService.GenerateInvoice(request);
  43.             //if (responce.ServiceStatus == ServiceStatus.ServiceError)
  44.             //  return InternalServerError();
  45.             //return Ok(responce.Invoice);
  46.             throw new NotImplementedException();
  47.         }
  48.         [Route("DisableCustomers/{key}")]
  49.         public IHttpActionResult DisableCustomers(string key)
  50.         {
  51.             //var request = new GetAllCustomersServiceRequest();
  52.             //var response = _customerService.GetAllCustomers(request);
  53.             //return Ok(response.Customers);
  54.             throw new NotImplementedException();
  55.         }
  56.         [Route("SendReporst/{key}")]
  57.         public IHttpActionResult SendReporst(string key)
  58.         {
  59.             //var response = _reportService.
  60.             throw new NotImplementedException();
  61.         }
  62.     }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement