public QuotaUpdateResultBatch UpdateQuota(QuotaUpdateBatch quotaUpdateBatch) { var subscriptionList = quotaUpdateBatch.SubscriptionIdsToUpdate; if (subscriptionList == null || subscriptionList.Count == 0) { //Throw exception since no subscription is send to update quota for throw Utility.ThrowResponseException(this.Request, HttpStatusCode.BadRequest, ErrorMessages.NullOrEmptySubscriptionList); } // For this sample sake we are just returning QuotaUpdateResultBatch since no quota value is exposed from hello world RP // For your service do perform quota update using base quota and addon quota return new QuotaUpdateResultBatch { UpdatedSubscriptionIds = subscriptionList }; }
public QuotaUpdateResultBatch UpdateQuota(QuotaUpdateBatch quotaUpdateBatch) { var subscriptionList = quotaUpdateBatch.SubscriptionIdsToUpdate; if (subscriptionList == null || subscriptionList.Count == 0) { //Throw exception since no subscription is send to update quota for throw Utility.ThrowResponseException(this.Request, HttpStatusCode.BadRequest, ErrorMessages.NullOrEmptySubscriptionList); } // For this sample sake we are just returning QuotaUpdateResultBatch since no quota value is exposed from hello world RP // For your service do perform quota update using base quota and addon quota return(new QuotaUpdateResultBatch { UpdatedSubscriptionIds = subscriptionList }); }
public HttpResponseMessage ValidateQuota(QuotaUpdateBatch quotaUpdateBatch, bool validateOnly) { // For this sample sake we are just returning status code Ok. // For your service do validate incoming quota information and return appropriate status code return this.Request.CreateResponse<QuotaUpdateBatch>(HttpStatusCode.OK, quotaUpdateBatch); }
public HttpResponseMessage ValidateQuota(QuotaUpdateBatch quotaUpdateBatch, bool validateOnly) { // For this sample sake we are just returning status code Ok. // For your service do validate incoming quota information and return appropriate status code return(this.Request.CreateResponse <QuotaUpdateBatch>(HttpStatusCode.OK, quotaUpdateBatch)); }