Inheritance: IDomainRecordsClient
        public void CorrectRequestForDelete() {
            var factory = Substitute.For<IConnection>();
            var domainClient = new DomainRecordsClient(factory);

            domainClient.Delete("vevix.net", 9001);

            var parameters = Arg.Is<List<Parameter>>(list =>
                (string)list[0].Value == "vevix.net" && (int)list[1].Value == 9001);
            factory.Received().ExecuteRaw("domains/{name}/records/{id}", parameters, Method.DELETE);
        }
        public void CorrectRequestForGetAll() {
            var factory = Substitute.For<IConnection>();
            var domainClient = new DomainRecordsClient(factory);

            domainClient.GetAll("vevix.net");

            var parameters = Arg.Is<List<Parameter>>(list =>
                (string)list[0].Value == "vevix.net");
            factory.Received().GetPaginated<DomainRecord>("domains/{name}/records", parameters, "domain_records");
        }
        public void CorrectRequestForUpdate() {
            var factory = Substitute.For<IConnection>();
            var domainClient = new DomainRecordsClient(factory);

            var data = new Models.Requests.DomainRecord { Name = "CNAME" };
            domainClient.Update("vevix.net", 9001, data);

            var parameters = Arg.Is<List<Parameter>>(list =>
                (string)list[0].Value == "vevix.net" && (int)list[1].Value == 9001);
            factory.Received().ExecuteRequest<DomainRecord>(
                "domains/{name}/records/{id}", parameters, data, "domain_record", Method.PUT);
        }
        public DigitalOceanClient(string token) {
            var client = new RestClient(DigitalOceanApiUrl) {
                UserAgent = "digitalocean-api-dotnet"
            };
            client.AddDefaultHeader("Authorization", string.Format("Bearer {0}", token));

            _connection = new Connection(client);

            Actions = new ActionsClient(_connection);
            DomainRecords = new DomainRecordsClient(_connection);
            Domains = new DomainsClient(_connection);
            DropletActions = new DropletActionsClient(_connection);
            Droplets = new DropletsClient(_connection);
            ImageActions = new ImageActionsClient(_connection);
            Images = new ImagesClient(_connection);
            Keys = new KeysClient(_connection);
            Regions = new RegionsClient(_connection);
            Sizes = new SizesClient(_connection);
        }