public IHttpActionResult GetCollectingLists(int activeCollectingListId, [FromBody] string newStatus) { switch (activeCollectingListId) { case 1: { return(ApiControllerExtension.Accepted(this, "An exception was encountered while processing the request, check response body for details.", "1", 0));; } case 2: { return(BadRequest("Bad Request.")); } case 3: { Uri uri = this.Request.RequestUri; return(ApiControllerExtension.NotFound(this, string.Format("No HTTP resource was found that matches the request URI '{0}'.", uri.AbsoluteUri))); } default: { CollectingList collectingList = new CollectingList(); collectingList.Agreements = new List <Agreement>(); collectingList.Agreements.Add(new Agreement()); collectingList.Customers = new List <Customer>(); collectingList.Customers.Add(new Customer()); collectingList.PaymentHistory = new List <PaymentHistory>(); collectingList.PaymentHistory.Add(new PaymentHistory()); return(Ok(collectingList)); } } }
public IHttpActionResult GetCollectingLists(long?RepresentativeId, long?ModifiedSinceTimeStamp) { switch (RepresentativeId) { case 1: { return(ApiControllerExtension.Accepted(this, "An exception was encountered while processing the request, check response body for details.", "1", 0));; } case 2: { return(BadRequest("Bad Request.")); } default: { AvailableCollectingListResults availableCollectingList = new AvailableCollectingListResults(); availableCollectingList.ServerTimestamp = 1; return(Ok(availableCollectingList)); } } }