CSP_Web.Controllers.CustomerController.GetSubscriptions C# (CSharp) Method

GetSubscriptions() private method

private GetSubscriptions ( string CustomerAADId, int jtStartIndex, int jtPageSize, string jtSorting = null ) : System.Web.Mvc.JsonResult
CustomerAADId string
jtStartIndex int
jtPageSize int
jtSorting string
return System.Web.Mvc.JsonResult
        public JsonResult GetSubscriptions(string CustomerAADId, int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null)
        {
            if (graphService.app_id != resellerService.crest_app_id || !graphService.initialized)
                graphService.Initialize(resellerService.tenant_name, resellerService.crest_app_id, resellerService.crest_app_key);
            if (!crestService.initialized)
                crestService.Initialize(graphService.oauth_token.token, resellerService.crest_account_id);

            Customer c = crestService.GetCustomer(CustomerAADId);

            List<Subscription> subscriptions = crestService.GetSubscriptionsByCustomer(c.id).OrderBy(x => x.friendly_name).ToList();

            return Json(new { Result = "OK", Records = subscriptions, TotalRecordCount = subscriptions.Count });
        }