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);
        }
Ejemplo n.º 2
0
 public IDictionary <string, object> ToDictionary(RelayWebhook relayWebhook)
 {
     return(WithCommonConventions(relayWebhook));
 }