Exemplo n.º 1
0
        /// <summary>
        /// Transfer a domain name from another domain registrar into DNSimple.
        /// </summary>
        /// <param name="accountId">The account Id</param>
        /// <param name="domainName">The domain name</param>
        /// <param name="transfer">The transfer command</param>
        /// <returns>The transferred domain</returns>
        /// <remarks>Your account must be active for this command to complete
        /// successfully. You will be automatically charged the 1-year transfer
        /// fee upon successful transfer, so please be careful with this
        /// command. The transfer may take anywhere from a few minutes up to
        /// 7 days.</remarks>
        /// <see cref="DomainTransfer"/>
        /// <see>https://developer.dnsimple.com/v2/registrar/#transferDomain</see>
        public DomainRegistrationResponse TransferDomain(long accountId,
                                                         string domainName, DomainTransfer transfer)
        {
            var requestBuilder =
                Client.Http.RequestBuilder(
                    DomainTransferPath(accountId, domainName));

            requestBuilder.Method(Method.POST);
            requestBuilder.AddJsonPayload(transfer);

            return(new DomainRegistrationResponse(
                       Client.Http.Execute(requestBuilder.Request)));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Transfer a domain name from another domain registrar into DNSimple.
        /// </summary>
        /// <param name="accountId">The account Id</param>
        /// <param name="domainName">The domain name</param>
        /// <param name="transfer">The transfer command</param>
        /// <returns>The transferred domain</returns>
        /// <remarks>Your account must be active for this command to complete
        /// successfully. You will be automatically charged the 1-year transfer
        /// fee upon successful transfer, so please be careful with this
        /// command. The transfer may take anywhere from a few minutes up to
        /// 7 days.</remarks>
        /// <see cref="DomainTransfer"/>
        /// <see>https://developer.dnsimple.com/v2/registrar/#transferDomain</see>
        public SimpleDnsimpleResponse <RegisteredDomain> TransferDomain(long accountId,
                                                                        string domainName, DomainTransfer transfer)
        {
            var requestBuilder =
                Client.Http.RequestBuilder(
                    DomainTransferPath(accountId, domainName));

            requestBuilder.Method(Method.POST);
            requestBuilder.AddJsonPayload(transfer);

            return(new SimpleDnsimpleResponse <RegisteredDomain>(
                       Client.Http.Execute(requestBuilder.Request)));
        }