예제 #1
0
        public async Task <Response> Update(RelayWebhook relayWebhook)
        {
            var request = new Request
            {
                Url    = $"api/{client.Version}/relay-webhooks/{relayWebhook.Id}",
                Method = "PUT",
                Data   = dataMapper.ToDictionary(relayWebhook)
            };

            var response = await requestSender.Send(request);

            if (response.StatusCode != HttpStatusCode.OK)
            {
                throw new ResponseException(response);
            }

            var createWebhookResponse = new Response();

            LeftRight.SetValuesToMatch(createWebhookResponse, response);
            return(createWebhookResponse);
        }
예제 #2
0
 public IDictionary <string, object> ToDictionary(RelayWebhook relayWebhook)
 {
     return(WithCommonConventions(relayWebhook));
 }