private static Uri AddActionAndStatusToUri(Uri uri, WebhookOutputModel model)
        {
            NameValueCollection queryParams = HttpUtility.ParseQueryString(uri.Query);
            UriBuilder          uriBuilder  = new UriBuilder(uri);

            queryParams["action"] = model.Action.ToString().ToLower();
            queryParams["status"] = model.Status.ToString().ToLower();

            uriBuilder.Query = queryParams.ToString();
            return(uriBuilder.Uri);
        }
        public static RestRequest CreateRequest(Uri uri, ActionEnum action, ResourceStatusEnum status)
        {
            WebhookOutputModel model = new WebhookOutputModel
            {
                Action = action,
                Status = status
            };

            uri = AddActionAndStatusToUri(uri, model);
            RestRequest request = new RestRequest(uri, Method.POST);
            string      payload = JsonConvert.SerializeObject(model);

            request.AddParameter("application/json", payload, ParameterType.RequestBody);
            request.RequestFormat = DataFormat.Json;

            return(request);
        }