コード例 #1
0
ファイル: DomainService.cs プロジェクト: depeter/TransIP-API
        /// <summary>
        /// Cancels a domain name, will automatically create and sign a cancellation document.
        /// Please note that domains with webhosting cannot be cancelled through the API.
        /// </summary>
        /// <param name="domainName">The domain name that needs to be cancelled.</param>
        /// <param name="endTime">The time to cancel the domain.</param>
        public void Cancel(string domainName, CancellationTime endTime)
        {
            var endTimeStr = endTime.ToString().ToUpper();

            SetSignatureCookies("cancel", new object[] { domainName, endTimeStr });
            Client.cancel(domainName, endTimeStr);
        }
コード例 #2
0
        /// <summary>
        /// Cancels a domain name, will automatically create and sign a cancellation document.
        /// Please note that domains with webhosting cannot be cancelled through the API.
        /// </summary>
        /// <param name="domainName">The domain name that needs to be cancelled.</param>
        /// <param name="endTime">The time to cancel the domain.</param>
        public async Task CancelAsync(string domainName, CancellationTime endTime)
        {
            var endTimeStr = endTime.ToString().ToUpper();

            SetSignatureCookies("cancel", new object[] { domainName, endTimeStr });
            await Client.cancelAsync(domainName, endTimeStr);
        }