/// <summary> /// Creates a new <see cref="ShopifyCollect"/> on the store. Map product to collection /// </summary> /// <param name="collect">A new <see cref="ShopifyCollect"/>. Id should be set to null.</param> /// <returns>The new <see cref="ShopifyCollect"/>.</returns> public virtual async Task <ShopifyCollect> CreateAsync(ShopifyCollect collect) { IRestRequest req = RequestEngine.CreateRequest("collects.json", RestSharp.Method.POST, "collect"); Dictionary <string, object> body = new Dictionary <string, object>() { { "collect", collect } }; req.AddJsonBody(body); return(await RequestEngine.ExecuteRequestAsync <ShopifyCollect>(_RestClient, req)); }
/// <summary> /// Creates a new <see cref="ShopifyCollect"/> on the store. Map product to collection /// </summary> /// <param name="collect">A new <see cref="ShopifyCollect"/>. Id should be set to null.</param> /// <returns>The new <see cref="ShopifyCollect"/>.</returns> public async Task<ShopifyCollect> CreateAsync(ShopifyCollect collect) { IRestRequest req = RequestEngine.CreateRequest("collects.json", RestSharp.Method.POST, "collect"); Dictionary<string, object> body = new Dictionary<string, object>() { { "collect", collect } }; req.AddJsonBody(body); return await RequestEngine.ExecuteRequestAsync<ShopifyCollect>(_RestClient, req); }