/// <summary>
        /// Gets a list of up to 250 of the shop's webhooks.
        /// </summary>
        /// <param name="options">Options for filtering the list.</param>
        /// <returns>The list of webhooks matching the filter.</returns>
        public async Task<IEnumerable<ShopifyWebhook>> ListAsync(ShopifyWebhookFilterOptions options = null)
        {
            IRestRequest req = RequestEngine.CreateRequest("webhooks.json", Method.GET, "webhooks");

            //Add optional parameters to request
            if (options != null) req.Parameters.AddRange(options.ToParameters(ParameterType.GetOrPost));

            return await RequestEngine.ExecuteRequestAsync<List<ShopifyWebhook>>(_RestClient, req);
        }
Exemple #2
0
        /// <summary>
        /// Gets a list of up to 250 of the shop's webhooks.
        /// </summary>
        /// <param name="options">Options for filtering the list.</param>
        /// <returns>The list of webhooks matching the filter.</returns>
        public async Task <IEnumerable <ShopifyWebhook> > ListAsync(ShopifyWebhookFilterOptions options = null)
        {
            IRestRequest req = RequestEngine.CreateRequest("webhooks.json", Method.GET, "webhooks");

            //Add optional parameters to request
            if (options != null)
            {
                req.Parameters.AddRange(options.ToParameters(ParameterType.GetOrPost));
            }

            return(await RequestEngine.ExecuteRequestAsync <List <ShopifyWebhook> >(_RestClient, req));
        }