/// <summary> /// Categories are subdivisions within an account. /// The `defaultCategory` from [`/api/v2/accounts`](#operations-tag-Accounts) is where the main balance and transactions are held. /// Other categories are used for Savings Goals. /// </summary> /// <param name="accountUid">Required parameter: Account uid</param> /// <param name="categoryUid">Required parameter: Category uid</param> /// <param name="feedItemUid">Required parameter: Feed item uid</param> /// <param name="body">Required parameter: User Note</param> /// <return>Returns the void response from the API call</return> public void UpdateUserNote( Guid accountUid, Guid categoryUid, Guid feedItemUid, UserNoteWrapper body) { var t = UpdateUserNoteAsync(accountUid, categoryUid, feedItemUid, body); APIHelper.RunTaskSynchronously(t); }
/// <summary> /// Categories are subdivisions within an account. /// The `defaultCategory` from [`/api/v2/accounts`](#operations-tag-Accounts) is where the main balance and transactions are held. /// Other categories are used for Savings Goals. /// </summary> /// <param name="accountUid">Required parameter: Account uid</param> /// <param name="categoryUid">Required parameter: Category uid</param> /// <param name="feedItemUid">Required parameter: Feed item uid</param> /// <param name="body">Required parameter: User Note</param> /// <return>Returns the void response from the API call</return> public async Task UpdateUserNoteAsync( Guid accountUid, Guid categoryUid, Guid feedItemUid, UserNoteWrapper body) { //validating required parameters if (null == body) { throw new ArgumentNullException(nameof(body), "The parameter \"body\" is a required parameter and cannot be null."); } //the base uri for api requests var baseUri = Configuration.GetBaseURI(); //prepare query string for API call var queryBuilder = new StringBuilder(baseUri); queryBuilder.Append("/api/v2/feed/account/{accountUid}/category/{categoryUid}/{feedItemUid}/user-note"); //process optional template parameters APIHelper.AppendUrlWithTemplateParameters(queryBuilder, new Dictionary <string, object> { { "accountUid", accountUid }, { "categoryUid", categoryUid }, { "feedItemUid", feedItemUid } }); //validate and preprocess url var queryUrl = APIHelper.CleanUrl(queryBuilder); //append request with appropriate headers and parameters var headers = APIHelper.GetContentRequestHeaders(); //append body params var serializedBody = APIHelper.JsonSerialize(body); //prepare the API call request to fetch the response var request = ClientInstance.PutBody(queryUrl, headers, serializedBody); //invoke request and get response var response = (HttpStringResponse)await ClientInstance.ExecuteAsStringAsync(request).ConfigureAwait(false); var context = new HTTPContext(request, response); //handle errors ValidateResponse(response, context); }