Exemplo n.º 1
0
        public async Task TestEditZoneAsync()
        {
            using var client = new CloudFlareClient(Credentials.Credentials.Authentication);
            var zonesQueryResult    = (await client.GetZonesAsync()).Result.First();
            var editZoneQueryResult = await client.EditZoneAsync(zonesQueryResult.Id, new PatchZone
            {
                Paused = false,
                Plan   = new Plan
                {
                    Id = "e592fd9519420ba7405e1307bff33214"
                },
                VanityNameServers = new List <string>
                {
                    "ns1.example.com",
                    "ns2.example.com"
                }
            });

            Assert.NotNull(editZoneQueryResult);
            Assert.Empty(editZoneQueryResult.Errors);
            Assert.True(editZoneQueryResult.Success);
        }