Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Web.Http;
- using BillingService.Contracts;
- using CustomerService.Contracts;
- using ReportService.Contracts;
- namespace Api.Controllers
- {
- /// <summary>
- /// Scheduled job controller
- /// </summary>
- public class ScheduledJobController : ApiController
- {
- private readonly IBillingService _billingService;
- private readonly ICustomerService _customerService;
- private IReportService _reportService;
- /// <summary>
- /// Default constructor
- /// </summary>
- /// <param name="reportService"></param>
- /// <param name="customerService"></param>
- /// <param name="billingService"></param>
- public ScheduledJobController(IReportService reportService, ICustomerService customerService, IBillingService billingService)
- {
- _reportService = reportService;
- _customerService = customerService;
- _billingService = billingService;
- }
- [Route("ProccessPayments/{key}")]
- public IHttpActionResult ProccessPayments(string key)
- {
- //var request = new CheckNewPaymentsServiceRequest();
- //var response = _billingService.CheckNewPayments(request);
- //if (response.ServiceStatus == ServiceStatus.ServiceError)
- // return InternalServerError();
- throw new NotImplementedException();
- }
- [Route("GenerateInvoices/{key}")]
- public IHttpActionResult GenerateInvoices(string key)
- {
- //var request = new GenerateInvoiceServiceRequest() { CompanyId = 1};
- //var responce = _billingService.GenerateInvoice(request);
- //if (responce.ServiceStatus == ServiceStatus.ServiceError)
- // return InternalServerError();
- //return Ok(responce.Invoice);
- throw new NotImplementedException();
- }
- [Route("DisableCustomers/{key}")]
- public IHttpActionResult DisableCustomers(string key)
- {
- //var request = new GetAllCustomersServiceRequest();
- //var response = _customerService.GetAllCustomers(request);
- //return Ok(response.Customers);
- throw new NotImplementedException();
- }
- [Route("SendReporst/{key}")]
- public IHttpActionResult SendReporst(string key)
- {
- //var response = _reportService.
- throw new NotImplementedException();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement