public ApiResponse <RoleContextData> UpsertContext(string uid, AccountRoleContextModel _ListRoleContext) { Validate(new ArrayList { uid }); var resourcePath = SDKUtil.FormatURIPath(new LoginRadiusResoucePath("{0}/rolecontext"), new object[] { uid }); return(ConfigureAndExecute <RoleContextData>(RequestType.Identity, HttpMethod.Put, resourcePath, _ListRoleContext.ConvertToJson())); }
/// <summary> /// This API creates a Context with a set of Roles /// </summary> /// <param name="accountRoleContextModel">Model Class containing Definition of RoleContext payload</param> /// <param name="uid">UID, the unified identifier for each user account</param> /// <returns>Complete user RoleContext data</returns> /// 18.11 public ApiResponse <ListReturn <RoleContext> > UpdateRoleContextByUid(AccountRoleContextModel accountRoleContextModel, string uid) { if (accountRoleContextModel == null) { throw new ArgumentException(BaseConstants.ValidationMessage, nameof(accountRoleContextModel)); } if (string.IsNullOrWhiteSpace(uid)) { throw new ArgumentException(BaseConstants.ValidationMessage, nameof(uid)); } var queryParameters = new QueryParameters { { "apiKey", ConfigDictionary[LRConfigConstants.LoginRadiusApiKey] }, { "apiSecret", ConfigDictionary[LRConfigConstants.LoginRadiusApiSecret] } }; var resourcePath = $"identity/v2/manage/account/{uid}/rolecontext"; return(ConfigureAndExecute <ListReturn <RoleContext> >(HttpMethod.PUT, resourcePath, queryParameters, ConvertToJson(accountRoleContextModel))); }