예제 #1
0
        /// <summary>
        /// Cancels an order.
        /// </summary>
        /// <param name="orderId">The order's id.</param>
        /// <returns>The cancelled <see cref="ShopifyOrder"/>.</returns>
        public virtual async Task CancelAsync(long orderId, ShopifyOrderCancelOptions options = null)
        {
            IRestRequest req = RequestEngine.CreateRequest($"orders/{orderId}/cancel.json", Method.POST);

            req.AddJsonBody(options);

            await RequestEngine.ExecuteRequestAsync(_RestClient, req);
        }
        /// <summary>
        /// Cancels an order.
        /// </summary>
        /// <param name="orderId">The order's id.</param>
        /// <returns>The cancelled <see cref="ShopifyOrder"/>.</returns>
        public async Task CancelAsync(long orderId, ShopifyOrderCancelOptions options = null)
        {
            IRestRequest req = RequestEngine.CreateRequest($"orders/{orderId}/cancel.json", Method.POST);

            req.AddJsonBody(options);

            await RequestEngine.ExecuteRequestAsync(_RestClient, req);
        }