public async Task <JsonResult> EditMobileNumber(string tenantUid, string username, string customerToken, string mobile, string countryCode) { var newMobile = new EditMobileNumber { Username = LoginSession.Username, Mobile = $"{countryCode}{mobile}" }; var origin = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid); var key = ApiKeyCache.GetByTenantUid(tenantUid); var authorization = await new Authorization().GetAuthorizationAsync(key); var response = await apiService.EditMobileAsync(newMobile, tenantUid, origin, customerToken); return(Json(response, JsonRequestBehavior.DenyGet)); }
public async Task <IResponseContent> EditMobileAsync(EditMobileNumber mobile, string tenantUid, string origin, string token) { try { IRestResponse response = await SubmitPostAsync(URL_CHANGE_MOBILE, origin, mobile, token, tenantUid); return(await AssertResponseContentAsync <EditMobileNumberResponseContent>(response)); } catch (Exception ex) { return(new EditMobileNumberResponseContent { Exception = ex }); } }