/// <summary> /// Updates the given <see cref="ShopifyOrderRisk"/>. Id must not be null. /// </summary> /// <param name="orderId">The order the risk belongs to.</param> /// <param name="risk">The risk to update.</param> public virtual async Task <ShopifyOrderRisk> UpdateAsync(long orderId, ShopifyOrderRisk risk) { var req = RequestEngine.CreateRequest($"orders/{orderId}/risks/{risk.Id.Value}.json", Method.PUT, "risk"); req.AddJsonBody(new { risk }); return(await RequestEngine.ExecuteRequestAsync <ShopifyOrderRisk>(_RestClient, req)); }
/// <summary> /// Updates the given <see cref="ShopifyOrderRisk"/>. Id must not be null. /// </summary> /// <param name="orderId">The order the risk belongs to.</param> /// <param name="risk">The risk to update.</param> public async Task<ShopifyOrderRisk> UpdateAsync(long orderId, ShopifyOrderRisk risk) { var req = RequestEngine.CreateRequest($"orders/{orderId}/risks/{risk.Id.Value}.json", Method.PUT, "risk"); req.AddJsonBody(new { risk }); return await RequestEngine.ExecuteRequestAsync<ShopifyOrderRisk>(_RestClient, req); }