/// <summary> /// Updates the given <see cref="CustomCollection"/>. /// </summary> /// <param name="customCollectionId">Id of the object being updated.</param> /// <param name="customCollection">The <see cref="CustomCollection"/> to update.</param> /// <param name="cancellationToken">Cancellation Token</param> /// <returns>The updated <see cref="CustomCollection"/>.</returns> public virtual async Task <CustomCollection> UpdateAsync(long customCollectionId, CustomCollection customCollection, CancellationToken cancellationToken = default) { var req = PrepareRequest($"custom_collections/{customCollectionId}.json"); var content = new JsonContent(new { custom_collection = customCollection }); var response = await ExecuteRequestAsync <CustomCollection>(req, HttpMethod.Put, cancellationToken, content, "custom_collection"); return(response.Result); }
/// <summary> /// Updates the given <see cref="CustomCollection"/>. /// </summary> /// <param name="customCollectionId">Id of the object being updated.</param> /// <param name="customCollection">The <see cref="CustomCollection"/> to update.</param> /// <returns>The updated <see cref="CustomCollection"/>.</returns> public virtual async Task <CustomCollection> UpdateAsync(long customCollectionId, CustomCollection customCollection) { var req = PrepareRequest($"custom_collections/{customCollectionId}.json"); var content = new JsonContent(new { custom_collection = customCollection }); return(await ExecuteRequestAsync <CustomCollection>(req, HttpMethod.Put, content, "custom_collection")); }