コード例 #1
0
        public void Test_create()
        {
            string domainName = Guid.NewGuid() + ".com";

            var contact = new ContactInformation()
            {
                Address1 = "1 never never land",
                City = "New York",
                Country = "US",
                EmailAddress = "*****@*****.**",
                FirstName = "Billy",
                LastName = "Bob",
                Phone = "+011.5555555555",
                PostalCode = "l5Z5Z5",
                StateProvince = "California"
            };

            var domain = _api.Domains.Create(new DomainCreateRequest()
            {
                DomainName = domainName,
                Admin = contact,
                AuxBilling = contact,
                Registrant = contact,
                Tech = contact,
                Years = 1
            });

            Assert.AreEqual(domainName, domain.Domain);
        }
コード例 #2
0
        public void Test_set_Contacts()
        {
            var contact = new ContactInformation()
            {
                Address1 = "1 never never land",
                City = "New York",
                Country = "US",
                EmailAddress = "*****@*****.**",
                FirstName = "Billy",
                LastName = "Bob",
                Phone = "+011.5555555555",
                PostalCode = "l5Z5Z5",
                StateProvince = "California"
            };

            _api.Domains.SetContacts(new DomainContactsRequest()
            {
                DomainName = _domainName,
                Admin = contact,
                AuxBilling = contact,
                Registrant = contact,
                Tech = contact
            });
        }