/// <summary> /// Creates a new <see cref="ShopifyTransaction"/> of the given kind. /// </summary> /// <param name="orderId">The order id to which the fulfillments belong.</param> /// <param name="transaction">The transaction.</param> /// <returns>The new <see cref="ShopifyTransaction"/>.</returns> public virtual async Task <ShopifyTransaction> CreateAsync(long orderId, ShopifyTransaction transaction) { var req = RequestEngine.CreateRequest($"orders/{orderId}/transactions.json", Method.POST, "transaction"); req.AddJsonBody(new { transaction = transaction }); return(await RequestEngine.ExecuteRequestAsync <ShopifyTransaction>(_RestClient, req)); }
/// <summary> /// Creates a new <see cref="ShopifyTransaction"/> of the given kind. /// </summary> /// <param name="orderId">The order id to which the fulfillments belong.</param> /// <param name="transaction">The transaction.</param> /// <returns>The new <see cref="ShopifyTransaction"/>.</returns> public async Task<ShopifyTransaction> CreateAsync(long orderId, ShopifyTransaction transaction) { var req = RequestEngine.CreateRequest($"orders/{orderId}/transactions.json", Method.POST, "transaction"); req.AddJsonBody(new { transaction = transaction }); return await RequestEngine.ExecuteRequestAsync<ShopifyTransaction>(_RestClient, req); }