/// <summary>
        /// To update the TTL, certificate ID, or the FQDN of the custom subdomain for an existing CDN endpoint.
        /// </summary>
        public Task <CdnEndpoint> Update(string endpointId, Models.Requests.UpdateCdnEndpoint updateEndpoint)
        {
            var parameters = new List <Parameter> {
                new Parameter("endpoint_id", endpointId, ParameterType.UrlSegment)
            };

            return(_connection.ExecuteRequest <CdnEndpoint>("cdn/endpoints/{endpoint_id}", parameters, updateEndpoint, "endpoint", Method.PUT));
        }
        public void CorrectRequestForUpdate()
        {
            var factory = Substitute.For <IConnection>();
            var client  = new CdnEndpointsClient(factory);

            var body = new Models.Requests.UpdateCdnEndpoint();

            client.Update("endpoint:abc123", body);

            var parameters = Arg.Is <List <Parameter> >(list => (string)list[0].Value == "endpoint:abc123");

            factory.Received().ExecuteRequest <CdnEndpoint>("cdn/endpoints/{endpoint_id}", parameters, body, "endpoint", Method.PUT);
        }